@docx-editor.dev/core 2.7.0 → 2.9.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 (118) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.cts +5 -6
  3. package/dist/automation.d.ts +5 -6
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.cts +12 -12
  7. package/dist/binding.d.ts +12 -12
  8. package/dist/binding.js +1 -1
  9. package/dist/chunk-2RDMWJPF.cjs +2 -0
  10. package/dist/chunk-5VC5HGJA.js +2 -0
  11. package/dist/chunk-A2JIBG75.js +1 -0
  12. package/dist/chunk-DKMKH77K.cjs +5 -0
  13. package/dist/chunk-DTQPINIM.js +15 -0
  14. package/dist/chunk-HHFMXG25.js +2 -0
  15. package/dist/chunk-IEXDXWTA.cjs +1 -0
  16. package/dist/chunk-IMMAG4QP.cjs +10 -0
  17. package/dist/chunk-KBCC66CI.js +5 -0
  18. package/dist/chunk-P5YSGSYC.cjs +15 -0
  19. package/dist/chunk-Q66ZJFRE.js +18 -0
  20. package/dist/chunk-TP4EHWEX.cjs +18 -0
  21. package/dist/chunk-VUJGPCPU.js +10 -0
  22. package/dist/chunk-XMHWBL3K.cjs +2 -0
  23. package/dist/contracts/document.d.cts +25 -3
  24. package/dist/contracts/document.d.ts +25 -3
  25. package/dist/contracts/editor.d.cts +10 -10
  26. package/dist/contracts/editor.d.ts +10 -10
  27. package/dist/contracts/interaction.d.cts +9 -9
  28. package/dist/contracts/interaction.d.ts +9 -9
  29. package/dist/contracts/modules.d.cts +6 -5
  30. package/dist/contracts/modules.d.ts +6 -5
  31. package/dist/contracts/types.d.cts +101 -1
  32. package/dist/contracts/types.d.ts +101 -1
  33. package/dist/{custom-node-writes-BpOBjNzo.d.ts → custom-node-writes-7ERv0f_X.d.cts} +25 -11
  34. package/dist/{custom-node-writes-C_AlNvds.d.cts → custom-node-writes-QyVZdTUA.d.ts} +25 -11
  35. package/dist/{editor-CXaGlcUa.d.cts → editor-CojjwMmF.d.cts} +78 -67
  36. package/dist/{editor-C--WWCBA.d.ts → editor-PUlv5Pp7.d.ts} +78 -67
  37. package/dist/editor.cjs +1 -1
  38. package/dist/editor.css +124 -14
  39. package/dist/editor.d.cts +68 -36
  40. package/dist/editor.d.ts +68 -36
  41. package/dist/editor.js +1 -1
  42. package/dist/{hf-references-BdjsQNE_.d.ts → hf-references-Dvk6De4Q.d.cts} +1 -2
  43. package/dist/{hf-references-CgEOSw3i.d.cts → hf-references-z5Y4N1ab.d.ts} +1 -2
  44. package/dist/{image-resources-Bkmu1Jei.d.cts → image-resources-DQOiwOuE.d.cts} +2 -2
  45. package/dist/{image-resources-BWd5u-op.d.ts → image-resources-eZqD_-vC.d.ts} +2 -2
  46. package/dist/{index-QsE1xXyT.d.cts → index-DGPSeLI0.d.cts} +1632 -1435
  47. package/dist/{index-DW0TsrYl.d.ts → index-oN-v8DQ5.d.ts} +1632 -1435
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.d.cts +19 -19
  50. package/dist/index.d.ts +19 -19
  51. package/dist/index.js +1 -1
  52. package/dist/layout.cjs +1 -1
  53. package/dist/layout.d.cts +545 -336
  54. package/dist/layout.d.ts +545 -336
  55. package/dist/layout.js +1 -1
  56. package/dist/{note-nodes-BPSTVDMr.d.ts → note-nodes-BNCANoGN.d.ts} +1 -1
  57. package/dist/{note-nodes-C6DLxlvj.d.cts → note-nodes-DL-Au22P.d.cts} +1 -1
  58. package/dist/note-properties-CQlxjic_.d.cts +67 -0
  59. package/dist/note-properties-jvnw_DGG.d.ts +67 -0
  60. package/dist/omml-equation-BD-LsmWE.d.cts +84 -0
  61. package/dist/omml-equation-Dd3mBep-.d.ts +84 -0
  62. package/dist/{ooxml-tree-BU0e3DVi.d.ts → ooxml-package-CdEy9ufK.d.cts} +352 -1
  63. package/dist/{ooxml-tree-BU0e3DVi.d.cts → ooxml-package-CdEy9ufK.d.ts} +352 -1
  64. package/dist/output.cjs +1 -1
  65. package/dist/output.d.cts +9 -8
  66. package/dist/output.d.ts +9 -8
  67. package/dist/output.js +1 -1
  68. package/dist/{protocol-CD7slqvl.d.cts → protocol-C7ahrdUx.d.ts} +28 -4
  69. package/dist/{protocol-DsbfgBwA.d.ts → protocol-UuZOcOp7.d.cts} +28 -4
  70. package/dist/{review-support-Cr2n7f1-.d.ts → review-items-D5SPFtsO.d.ts} +49 -102
  71. package/dist/{review-support-oQrX6Xu3.d.cts → review-items-DpsqTHio.d.cts} +49 -102
  72. package/dist/review-reads-B2Ji3fVU.d.ts +176 -0
  73. package/dist/review-reads-CP106AHp.d.cts +176 -0
  74. package/dist/{revision-projection-UKqvPa4-.d.ts → revision-projection-CILpvv4M.d.ts} +1 -1
  75. package/dist/{revision-projection-WzlQGBJx.d.cts → revision-projection-Cc4wz30g.d.cts} +1 -1
  76. package/dist/{semantic-cell-selection-C8RC0VnN.d.ts → semantic-cell-selection-BWhVAk5B.d.ts} +16 -4
  77. package/dist/{semantic-cell-selection-CQOgvtbT.d.cts → semantic-cell-selection-DJPjBWzf.d.cts} +16 -4
  78. package/dist/{semantic-interaction-f4GyBQ_1.d.cts → semantic-interaction-BjOcDB06.d.cts} +14 -2
  79. package/dist/{semantic-interaction-C45D_oG2.d.ts → semantic-interaction-Cca1-X_a.d.ts} +14 -2
  80. package/dist/{semantic-paint-DUkGLJ_L.d.ts → semantic-paint-CufpIQFw.d.ts} +7 -7
  81. package/dist/{semantic-paint-BUt0ePEW.d.cts → semantic-paint-Ur7pAINj.d.cts} +7 -7
  82. package/dist/{semantic-records-DoW_xNgJ.d.ts → semantic-records-C3Z76KeN.d.cts} +77 -31
  83. package/dist/{semantic-records-CuT3Wsd-.d.cts → semantic-records-Cc1MJrhM.d.ts} +77 -31
  84. package/dist/{shaped-measurer-CakZ7g1s.d.ts → shaped-measurer-CYSK20E2.d.cts} +2 -4
  85. package/dist/{shaped-measurer-CDcHzjhf.d.cts → shaped-measurer-CwlTPDJO.d.ts} +2 -4
  86. package/dist/store.cjs +1 -1
  87. package/dist/store.d.cts +90 -18
  88. package/dist/store.d.ts +90 -18
  89. package/dist/store.js +1 -1
  90. package/dist/{tree-op-types-fZgbrR5F.d.ts → tree-op-types-B0-sCtw-.d.cts} +79 -10
  91. package/dist/{tree-op-types-QujrzgCz.d.cts → tree-op-types-XMVsJSpe.d.ts} +79 -10
  92. package/dist/{tree-session-5UWKAQ41.d.cts → tree-session-D945D43B.d.cts} +45 -19
  93. package/dist/{tree-session--6LDTNjR.d.ts → tree-session-DBJgmdmc.d.ts} +45 -19
  94. package/dist/{tree-store-Dy9FZ1pa.d.ts → tree-store-C6vc8E_2.d.cts} +14 -3
  95. package/dist/{tree-store-DhYIACNE.d.cts → tree-store-ClA-qng4.d.ts} +14 -3
  96. package/package.json +2 -2
  97. package/dist/chunk-32HTRN7R.js +0 -10
  98. package/dist/chunk-42PRWWVE.js +0 -2
  99. package/dist/chunk-BRBRYJKE.cjs +0 -2
  100. package/dist/chunk-DTR64XCS.cjs +0 -2
  101. package/dist/chunk-EMQSFPJO.cjs +0 -15
  102. package/dist/chunk-GBK7Z6F4.cjs +0 -5
  103. package/dist/chunk-GPJXQDHC.js +0 -2
  104. package/dist/chunk-JLSB6KNZ.js +0 -5
  105. package/dist/chunk-LEV2X47E.cjs +0 -18
  106. package/dist/chunk-NDTLLSG7.js +0 -1
  107. package/dist/chunk-O4VILLOM.cjs +0 -1
  108. package/dist/chunk-OB6JFVYA.js +0 -15
  109. package/dist/chunk-QTUZFJ4O.js +0 -18
  110. package/dist/chunk-UE7KTQLK.js +0 -2
  111. package/dist/chunk-WC3LI6FC.cjs +0 -10
  112. package/dist/chunk-XRDTD4X3.cjs +0 -2
  113. package/dist/content-control-walk-CbTqHq6O.d.cts +0 -56
  114. package/dist/content-control-walk-D06GijR0.d.ts +0 -56
  115. package/dist/ooxml-package-CR5us6ad.d.cts +0 -354
  116. package/dist/ooxml-package-D_CtywTW.d.ts +0 -354
  117. package/dist/review-reads-C5E7u-pt.d.ts +0 -432
  118. package/dist/review-reads-ChgUq41I.d.cts +0 -432
@@ -1,18 +0,0 @@
1
- import {f,c,d,e}from'./chunk-WU7PUTVA.js';import {y}from'./chunk-GPJXQDHC.js';import {E,He,xd as xd$1,j,g,h,f as f$1,ma as ma$1,ed as ed$1,vd as vd$1,ld as ld$1,md as md$1,jd as jd$1,rd as rd$1,sd as sd$1,od as od$1,td as td$1,S,me as me$1,Xb as Xb$1,rb as rb$1,hb as hb$1,fb as fb$1,Ac as Ac$1,ta as ta$1,zd as zd$1,qd as qd$1,pd as pd$1,nd as nd$1,Ad as Ad$1,kd as kd$1,db as db$1,te,re,we,se,Pb as Pb$1,Fa as Fa$1,xa as xa$1,$a,eb as eb$1,Lb as Lb$1,Kb as Kb$1,Nb as Nb$1,ic as ic$1,kc as kc$1,Zd as Zd$1,fe,pe as pe$1,_a,Ya,Ob as Ob$1,dc as dc$1,bc as bc$1,ab as ab$1,n,Sd as Sd$1,gc as gc$1,qc as qc$1,rc as rc$1,Wa,fc as fc$1,hc as hc$1,bb as bb$1,Va,oc as oc$1,pc as pc$1,ra as ra$1,Yb as Yb$1,_b as _b$1,nc as nc$1,gb as gb$1}from'./chunk-32HTRN7R.js';var Zn=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},Ka=(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`)},eb=(e,n)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${n} must be a four-byte ASCII tag`)},mf=(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(eb(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)},Is=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),nb=e=>e?Object.freeze({requested:Is(e.requested),resolved:Is(e.resolved)}):void 0,gf=new WeakSet,Ts=e=>{if(h(e),!gf.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");gf.add(e);}},vs=e=>(Ts(e),e),Za=e=>(Ts(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:Is(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:nb(e.substitution)??null})),ar=e=>{if(Ka(e.shapingLibrary.name,"shaping library name"),Ka(e.shapingLibrary.version,"shaping library version"),Ka(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(Ka(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=vs(e.font),t=e.fallbackOrder.map(vs),r=new Set;for(let o of t){let a=JSON.stringify(Za(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:n,variationAxes:mf(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:mf(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...t]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},yf=e=>{let n=ar(e);return Object.freeze({font:Za(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(Za)),fixedPointScale:n.fixedPointScale,roundingMode:n.roundingMode})},ks=e=>JSON.stringify(yf(e)),or=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},_n=e=>{try{return Zn(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},hf=new WeakMap,Ua=e=>{let n=hf.get(e);if(n)return n;Ts(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 hf.set(e,t),t},qa=(e,n)=>{let t=ar(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(or(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(s=>{or(s.id,"glyph id"),or(s.cluster,"glyph cluster");let d=r.get(s.outline);if(!d){if(!Number.isSafeInteger(s.outline.unitsPerEm)||s.outline.unitsPerEm<=0)throw new RangeError("Glyph outline units per em must be a positive safe integer");d=Object.isFrozen(s.outline)?s.outline:Object.freeze({path:s.outline.path,unitsPerEm:s.outline.unitsPerEm}),r.set(s.outline,d);}return Object.freeze({id:s.id,cluster:s.cluster,originX:_n(s.originX),originY:_n(s.originY),advanceX:_n(s.advanceX),advanceY:_n(s.advanceY),offsetX:_n(s.offsetX),offsetY:_n(s.offsetY),outline:d})}),a=e.fontSpans.map(s=>{if(or(s.glyphStart,"font span start"),or(s.glyphEnd,"font span end"),s.glyphEnd<=s.glyphStart||s.glyphEnd>o.length)throw new RangeError("Font span glyph range is invalid");s.fallbackIndex!==null&&or(s.fallbackIndex,"fallback index");let d=vs(s.font);if(s.fallbackIndex===null){if(Ua(d)!==Ua(t.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=t.fallbackOrder[s.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(Ua(d)!==Ua(c))throw new TypeError("Shaped fallback font does not match shaping environment provenance")}return Object.freeze({...s,font:d})});for(let s=0;s<a.length;s+=1){let d=s===0?0:a[s-1].glyphEnd;if(a[s].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(s=>{for(let[c,u]of [["cluster text start",s.textStart],["cluster text end",s.textEnd],["cluster glyph start",s.glyphStart],["cluster glyph end",s.glyphEnd],["cluster font span",s.fontSpan]])or(u,c);if(s.textEnd<=s.textStart||s.textEnd>e.text.length||s.glyphEnd<=s.glyphStart||s.glyphEnd>o.length)throw new RangeError("Shaped cluster range is invalid");let d=a[s.fontSpan];if(!d||s.glyphStart<d.glyphStart||s.glyphEnd>d.glyphEnd)throw new RangeError("Shaped cluster does not belong to its declared font span");return Object.freeze({...s,advance:_n(s.advance),caretEdges:Object.freeze(s.caretEdges.map(_n))})}),l=Object.freeze({ascent:_n(e.metrics.ascent),descent:_n(e.metrics.descent),lineGap:_n(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:l})},tb=(e,n)=>{let t=qa(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:Za(r.font)}))),metrics:t.metrics})};var Do=Object.freeze({name:"HarfBuzz",version:"14.3.0"}),_o=null,No=null;function rb(){return _o?Promise.resolve():No||(No=import('./dist-YFULGVS3.js').then(e=>{let n=e.versionString();if(n!==Do.version)throw new Le("shapingLibraryMismatch",{diagnostic:f(Do.version,n)});_o=e;}).catch(e$1=>{throw No=null,e$1 instanceof Le?e$1:c(e$1)?new Le("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new Le("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),No)}function ob(){return _o!==null}function ab(){if(!_o)throw new Le("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return _o}var Le=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;}},ib=16*1024*1024,lb=1e6,sb=1e6,db=1e6,cb=4,ub=512,fb=1024*1024,pb=16*1024*1024,mb=32*1024*1024,gb=64*1024*1024,hb=64*1024*1024,yb=1e6,bb=1e6,xb=1e6,Sb=64,Pb=4096,wb=4*1024*1024,Rb=64*1024*1024,Ib=64*1024*1024,vb=256*1024*1024,Tb=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),bf=["cmap","head","hhea","hmtx","maxp"],kb=(e,n)=>e[n]<<8|e[n+1],Ob=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,Cb=(e,n)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Ob(e,12+n*4):0,Bb=(e,n)=>{let t=Cb(e,n),r=kb(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},Lb=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),Mb=(e,n)=>{let t=j(e,n);if(!t.valid)return t;let r=Bb(e,n);for(let o of bf)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},Fb=Mb,qn=(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},Eb=(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 l=r?-a:a,s=Number(l);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},xf=(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 Zn(Eb(BigInt(e)*BigInt(t),BigInt(n),r))},Nb=(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=>xf(i,a,o,r)},Ab=(e,n)=>{if(n.length===0)return [];let t=[...new Set(n.map(i=>i.cluster))].sort((i,l)=>i-l),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,l=a+1;for(;l<n.length&&n[l].cluster===i;)l+=1;let s=n.slice(a,l).reduce((c,u)=>c+u.advanceX,0),d=Zn(s);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:l,advance:d,caretEdges:Object.freeze([Zn(0),d]),fontSpan:0}),a=l;}return o},Jn=64,ft=8,ir=8,Db=32,Sf=Jn+2*ft,_b=Jn+ft+ir,Hb=Jn+ft+ir,zb=Jn+ft+ir,Pf=Jn+8*ft,wf=Jn+8*ir+ft,jb=Jn+6*ir+ft,Wb=Jn+3*ir+2*ft,Gb=Jn+3*ir,Ho=e=>Jn+e.length*Uint16Array.BYTES_PER_ELEMENT,Cs=e=>zb+Ho(e),Ao=e=>Db+e*ft,Xb=(e,n)=>Sf+Ho(e)+_b+Cs(n),$b=e=>Pf+Ho(e)+Ao(e.length)+e.length*wf,Vb=e=>{let n=new Set(e.glyphs.map(t=>t.outline));return Pf+Ho(e.text)+Ao(e.glyphs.length)+e.glyphs.length*wf+Ao(e.clusters.length)+e.clusters.length*jb+e.clusters.reduce((t,r)=>t+Ao(r.caretEdges.length),0)+Ao(e.fontSpans.length)+e.fontSpans.length*Wb+Gb+[...n].reduce((t,r)=>t+Cs(r.path),0)},Yb=(e,n)=>Sf+Ho(e)+Hb+n,Os=class{#n;#l;#u;#f;#p;#y;#b;#m;#g;#s;#h;#d;#e;#o=new Map;#a=new Map;#t=new Map;#i=0;#r=0;#c;constructor(n,t){this.#n=n,this.#l=qn(t.maxFontBytes??ib,"maximum font bytes",hb),this.#u=qn(t.maxInputUtf16??lb,"maximum input UTF-16 code units",yb),this.#f=qn(t.maxCodepoints??sb,"maximum input code points",bb),this.#p=qn(t.maxGlyphs??db,"maximum shaped glyphs",xb),this.#y=qn(t.maxCachedFaces??cb,"maximum cached faces",Sb),this.#b=qn(t.maxCachedShapes??ub,"maximum cached shape results",Pb),this.#m=qn(t.maxOutlineBytes??fb,"maximum outline bytes",wb),this.#g=qn(t.maxCachedOutlineBytes??pb,"maximum cached outline bytes",Rb),this.#s=qn(t.maxShapedRunBytes??mb,"maximum shaped run bytes",Ib),this.#h=qn(t.maxCachedShapeBytes??gb,"maximum cached shape bytes",vb),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=g(n);for(let c of bf)if(!o.has(c))throw new Le("malformedFont",{diagnostic:`missing required ${c} table`});this.#e?.onByteCopy?.();let a=new this.#n.Blob(Lb(t)),i=new this.#n.Face(a,n.faceIndex),l=new this.#n.Font(i),s=l.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new Le("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});if(l.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:l,unitsPerEm:i.upem};return this.#o.set(n.identity,d),this.#d?.(Object.freeze({kind:"created",identity:n.identity})),d}#P(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),l=Cs(i);if(l>this.#m)throw new Le("outlineOverLimit",{limit:this.#m,actual:l});let s=Object.freeze({path:i,unitsPerEm:n.unitsPerEm}),d=Xb(o,i);if(d>this.#g)return this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#i})),s;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:s,bytes:d}),this.#i+=d,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),s}#x(n){if(n.length>this.#u)throw new Le("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 Le("codepointsOverLimit",{limit:this.#f,actual:t})}}shape(n){if(!this.#c)throw new Le("disposed");if(h(n.environment.font),n.environment.font.byteLength>this.#l)throw new Le("fontOverLimit",{limit:this.#l,actual:n.environment.font.byteLength});this.#x(n.text);let t=$b(n.text);if(t>this.#s)throw new Le("shapedRunOverLimit",{limit:this.#s,actual:t});let r=ar(n.environment),o=JSON.stringify([n.text,n.fontSizeHalfPoints,n.bidiLevel,ks(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!==Do.name||r.shapingLibrary.version!==Do.version)throw new Le("shapingLibraryMismatch");if(r.normalization!=="none")throw new Le("unsupportedNormalization");if(!Number.isSafeInteger(n.bidiLevel)||n.bidiLevel<0||(n.bidiLevel&1)===1!=(r.direction==="rtl"))throw new Le("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new Le("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new Le("unsupportedFallback");let i=f$1(r.font),l=g(r.font);if([...Tb].some(d=>l.has(d)))throw new Le("unsupportedColorFont");let s=n.text;this.#x(s);try{let d=this.#S(r.font,i),{face:c,font:u}=d,f=this.#c;f.reset(),f.addText(s),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(([O,T])=>new this.#n.Feature(O,T));this.#e?.onShapeCall?.(),this.#n.shape(u,f,p);let m=f.getGlyphInfosAndPositions();if(m.length>this.#p)throw new Le("glyphOverLimit",{limit:this.#p,actual:m.length});let g=Nb(c.upem,n.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),h=Zn(0),b=Zn(0),x=new Map,k=JSON.stringify(Object.entries(r.variationAxes).sort(([O],[T])=>O.localeCompare(T))),I=m.map(O=>{let T=g(O.xAdvance??0),y=g(O.yAdvance??0),D={id:O.codepoint,cluster:O.cluster,originX:h,originY:b,advanceX:T,advanceY:y,offsetX:g(O.xOffset??0),offsetY:g(O.yOffset??0),outline:x.get(O.codepoint)??(()=>{let G=this.#P(d,O.codepoint,k);return x.set(O.codepoint,G),G})()};return h=Zn(h+T),b=Zn(b+y),D}),B=u.hExtents(),F=qa({text:s,direction:r.direction,bidiLevel:n.bidiLevel,glyphs:I,clusters:Ab(s,I),fontSpans:I.length===0?[]:[{glyphStart:0,glyphEnd:I.length,font:r.font,fallbackIndex:null}],metrics:{ascent:g(B.ascender),descent:g(-B.descender),lineGap:g(B.lineGap)}},r),P=Vb(F);if(P>this.#s)throw new Le("shapedRunOverLimit",{limit:this.#s,actual:P});let L=Yb(o,P);if(L>this.#h)return this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),F;for(;this.#t.size>=this.#b||this.#r+L>this.#h;){let O=this.#t.keys().next().value;if(O===void 0)break;let T=this.#t.get(O);this.#t.delete(O),this.#r-=T.bytes,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#t.set(o,{run:F,bytes:L}),this.#r+=L,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),F}catch(d){throw d instanceof Le?d:new Le("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},Kb=(e={})=>new Os(ab(),e);var ne=(e,n,t)=>e>=n&&e<=t,Ja=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(n){super(`Unsupported Unicode script at U+${n.toString(16).toUpperCase()}`),this.codePoint=n;}},Ub=e=>{if(ne(e,65313,65338)||ne(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(ne(e,1424,1535)||ne(e,64285,64335))return {slot:"cs",script:"Hebr"};if(ne(e,1536,1791)||ne(e,1872,1919)||ne(e,2160,2207)||ne(e,2208,2303)||ne(e,64336,65023)||ne(e,65136,65279)||ne(e,126464,126719))return {slot:"cs",script:"Arab"};if(ne(e,4352,4607)||ne(e,11904,12351)||ne(e,12352,12543)||ne(e,12544,12687)||ne(e,12784,12799)||ne(e,13312,19903)||ne(e,19968,40959)||ne(e,44032,55215)||ne(e,63744,64255)||ne(e,65382,65437)||ne(e,65440,65500)||ne(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(ne(e,2304,2431)||ne(e,43232,43263))return {slot:"cs",script:"Deva"};if(ne(e,2432,2559))return {slot:"cs",script:"Beng"};if(ne(e,880,1023)||ne(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(ne(e,1024,1327)||ne(e,7296,7311)||ne(e,11744,11775)||ne(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(ne(e,3584,3711))return {slot:"cs",script:"Thai"};if(ne(e,6016,6143)||ne(e,6624,6655))return {slot:"cs",script:"Khmr"};if(ne(e,768,879)||ne(e,6832,6911)||ne(e,7616,7679)||ne(e,8400,8447)||ne(e,8192,8303)||ne(e,65056,65071)||e<=47||ne(e,58,64)||ne(e,91,96)||ne(e,123,191)||e===5760||ne(e,8192,11263)||ne(e,65024,65039)||ne(e,65280,65381)||ne(e,65438,65439)||ne(e,65501,65535)||ne(e,126976,129791)||ne(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(ne(e,192,687)||ne(e,7424,7551)||ne(e,7552,7615)||ne(e,7680,7935)||ne(e,11360,11391)||ne(e,42784,43007)||ne(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new Ja(e)};function Zb(e,n,t){let r=[];for(let l=0;l<e.length;){let s=e.codePointAt(l),d=l+(s>65535?2:1);r.push({from:l,to:d,classified:Ub(s)}),l=d;}let o=null;for(let l of r)l.classified?o=l.classified:o&&(l.classified=o);o=null;for(let l=r.length-1;l>=0;l-=1){let s=r[l];s.classified?o=s.classified:o&&(s.classified=o);}let a=[],i=r.every(({from:l})=>e.codePointAt(l)<=127)?"ascii":"hAnsi";for(let l of r){let s=t.levels[n+l.from]??0,d=(s&1)===1?"rtl":"ltr",c=l.classified??{slot:i,script:"Zyyy"},u=a.at(-1);u&&u.to===l.from&&u.bidiLevel===s&&u.slot===c.slot&&u.script===c.script?a[a.length-1]={...u,to:l.to}:a.push({from:l.from,to:l.to,direction:d,bidiLevel:s,script:c.script,slot:c.slot});}return a}var qb="und";function Jb(){return typeof Intl.Segmenter=="function"}function Qb(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function ex(){let e=new(Qb())("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 Ms=ex(),Fs=Ms,Rf=0;function Es(){return Rf}var Dr=null,lr=null,Qa=null,zo=null;function Hn(e){if(Dr===e&&lr)return lr;if(Qa===e&&zo){let t=zo;return Qa=Dr,zo=lr,Dr=e,lr=t,t}let n=Fs.segment(e);return Qa=Dr,zo=lr,Dr=e,lr=n,n}function nx(e){Fs=e,If();}function tx(){Fs=Ms,If();}function If(){Rf+=1,Dr=null,lr=null,Qa=null,zo=null,Bs=null,ei=null,Ls=0;}function rx(e){return Hn(e).length}var Bs=null,ei=null,Ls=0;function ox(e){if(Bs===e&&ei)return {offsets:ei,count:Ls};let n=Hn(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,Bs=e,ei=t,Ls=n.length,{offsets:t,count:n.length}}function ni(e,n){let t=Math.max(0,Math.min(n,e.length)),{offsets:r}=ox(e);return r[t]}function ax(e,n){let t=Hn(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 Ns(e){let n=new Set([0,e.text.length]);for(let r of Hn(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 ti(e,n){return Ns(e).includes(n)}function ix(e,n){return ti(e,n)}function lx(e,n,t){return t>=n&&ti(e,n)&&ti(e,t)}function sx(e){let n=Hn(e.text);return Ns(e).map(t=>t===e.text.length?n.length:n.findIndex(r=>r.utf16From===t))}var Ds="und";function Of(){return typeof Intl.Segmenter=="function"}function dx(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Ds})`);return e}function Cf(){let e=new(dx())(Ds,{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 cx=/^[\p{L}\p{N}']$/u,ux=/^\s$/u;function vf(e){return cx.test(e)}function Tf(e){return ux.test(e)}function As(e,n,t,r){let o=e[n],a=e[t-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function Bf(e){let n=Hn(e);if(n.length===0)return [];let t=[],r=0;for(;r<n.length;){let o=n[r];if(Tf(o.text)){let a=r+1;for(;a<n.length&&Tf(n[a].text);)a+=1;t.push(As(n,r,a,false)),r=a;continue}if(vf(o.text)){let a=r+1;for(;a<n.length&&vf(n[a].text);)a+=1;t.push(As(n,r,a,true)),r=a;continue}t.push(As(n,r,r+1,false)),r+=1;}return t}function Lf(){return {segment:Bf}}function Mf(e={}){let n=e.isIntlAvailable??Of,t=e.createIntlBoundary??Cf,r=e.createFallbackBoundary??Lf;if(!n())return r();try{return t()}catch{return r()}}var kf;function Ff(){return kf??=Mf(),kf}function fx(e,n=Ff()){return n.segment(e)}function px(e,n){return n.map(t=>({graphemeFrom:ni(e,t.utf16From),graphemeTo:ni(e,t.utf16To),wordLike:t.wordLike}))}var ri=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},_r=(e,n)=>{if(e.trim().length===0)throw new TypeError(`${n} must not be blank`)},Hr=e=>(ri(e.resourceEpoch,"resourceEpoch"),ri(e.configEpoch,"configEpoch"),ri(e.producerVersion,"producerVersion"),_r(e.extensionFingerprint,"extensionFingerprint"),_r(e.shapingHash,"shapingHash"),Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})),mx=(e,n)=>{let t=Hr(e),r=Hr(n),a=["resourceEpoch","configEpoch","extensionFingerprint","shapingHash","producerVersion"].filter(i=>t[i]!==r[i]);return a.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(a)})},_s=e=>{let n=e.map(({key:t,fingerprint:r})=>(_r(t,"resource dependency key"),_r(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)},gx=e=>(ri(e.revision,"revision"),_r(e.dependencyFingerprint,"dependencyFingerprint"),_r(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:_s(e.resourceDependencies),...Hr(e)})),hx=(e,n)=>{let t=_s(e),r=_s(n),o=Math.max(t.length,r.length);for(let a=0;a<o;a+=1){let i=t[a],l=r[a];if(i?.key!==l?.key||i?.fingerprint!==l?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??l.key}}return null};function yx(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=hx(e.resourceDependencies,n.resourceDependencies);if(t)return t;let r=["configEpoch","extensionFingerprint","shapingHash","producerVersion"];for(let o of r)if(e[o]!==n[o])return {hit:false,reason:"epoch-changed",epoch:o};return null}var Hs=class{entries=new Map;get(n,t){let r=this.entries.get(n);if(!r)return {hit:false,reason:"absent"};let o=yx(r.provenance,t);return o||{hit:true,value:r.value,provenance:r.provenance}}set(n,t,r){this.entries.set(n,{value:t,provenance:gx(r)});}evictEpoch(n){let t=Hr(n),r=0;for(let[o,a]of this.entries){let i=a.provenance;(i.configEpoch!==t.configEpoch||i.extensionFingerprint!==t.extensionFingerprint||i.shapingHash!==t.shapingHash||i.producerVersion!==t.producerVersion)&&(this.entries.delete(o),r+=1);}return r}evictResources(n,t){let r=Hr(n),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>t.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};var jo=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});function Je(e,n=false){return Nf(e.fragments,n)}var Ef=new WeakMap;function Nf(e,n=false){let t=Ef.get(e),r=n?"withRepeats":"withoutRepeats",o=t?.[r];if(o)return o;let a=[],i=l=>{for(let s of l){if(s.kind==="paragraph"){a.push(s);continue}for(let d of s.rows)if(!(d.isHeaderRepeat&&!n))for(let c of d.cells)i(c.blocks);}};return i(e),t||(t={},Ef.set(e,t)),t[r]=a,a}function Af(e){let n=[];for(let t of e.pages)for(let r of Je(t))n.push(...r.lines);return n}function av(e){return e.anchoredDrawings??[]}function bx(e,n){let t=[];for(let r of e.pages)for(let o of Je(r))o.paragraphId===n&&t.push(o);return t.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function oi(e,n,t,r){for(let o of r??Af(e)){let a=o.range.paragraphId===n?o.range.start:Number.NaN,i=o.range.paragraphId===n?o.range.end:Number.NaN;for(let l of o.spans)l.range.paragraphId===n&&(a=Number.isNaN(a)?l.range.start:Math.min(a,l.range.start),i=Number.isNaN(i)?l.range.end:Math.max(i,l.range.end));for(let l of o.drawings??[])l.paragraphId===n&&(a=Number.isNaN(a)?l.start:Math.min(a,l.start),i=Number.isNaN(i)?l.start+1:Math.max(i,l.start+1));if(!Number.isNaN(a)&&t>=a&&t<=i)return o}return null}function zs(e){return e.contentControls??[]}function ai(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 js(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 Df=1,ii=1;function zr(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 xx=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function Sx(e){return xx.has(e)}function _f(e,n){return Sx(e)?zr(n).extentPt:n}function Gs(e){let n=false;for(let t of e){if(t.localName!=="pageBreakBefore")continue;let r=t.attributes?.val;n=r===void 0||si(r);}return n}var zf=31680/20,Go=12,jf=3168,Wf=14,Wr=Object.freeze({rule:"auto",value:240}),Px=132,wx=1584,Gf=["top","left","bottom","right","between","bar"],Rx=Object.freeze({}),Ix=/^[0-9A-Fa-f]{6}$/,vx=new Set(["nil","none"]);function li(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function Ws(e,n){return !Number.isFinite(e)||e<=0?0:e>n?n:e}function Hf(e){let n=li(e,true);return n===null?0:Ws(n/20,zf)}function si(e){return e!=="0"&&e!=="false"&&e!=="off"}function Tx(e){return e===void 0||e==="auto"?null:Ix.test(e)?e.toUpperCase():null}function Wo(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Qn(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function dv(e,n){let t=null;for(let r of e)r.localName===n&&(t={...t??{},...r.attributes??{}});return t}function Xs(e,n){let t=0,r=0,o=false,a=false;for(let i of e){if(i.localName!=="spacing")continue;let l=i.attributes?.before,s=i.attributes?.after;l!==void 0&&(t=Hf(l)),s!==void 0&&(r=Hf(s));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=si(d)),c!==void 0&&(a=si(c));}if(o||a){let i=n?.inList||n?.inTableCell?0:Wf;o&&(t=i),a&&(r=i);}return {before:t,after:r}}function $s(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 l=a.attributes?.line;if(l!==void 0){let s=li(l,true);s!==null&&(t=s);}}if(t===void 0)return Wr;let r=n??"auto";if(r==="auto"){let a=t/240;return a>0?{rule:"auto",value:Math.min(a,Px)*240}:Wr}let o=t/20;return o>0?{rule:r,value:Math.min(o,wx)}:Wr}function Vs(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 Ys(e){let n=false;for(let t of e){if(t.localName!=="contextualSpacing")continue;let r=t.attributes?.val;n=r===void 0||si(r);}return n}function jr(e){if(!e)return;let n=Wo(e,"val");if(!n||vx.has(n))return;let t=li(Wo(e,"sz")),r=t===null?.5:Ws(t/8,Go)||.5,o=li(Wo(e,"space")),a=o===null?0:Ws(o,jf),i=Wo(e,"shadow"),l=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:n,color:Tx(Wo(e,"color")),widthPt:r,spacePt:a,...l?{shadow:true}:{}}}function Xf(e){let n=jr(Qn(e,"top")),t=jr(Qn(e,"left")??Qn(e,"start")),r=jr(Qn(e,"bottom")),o=jr(Qn(e,"right")??Qn(e,"end")),a=jr(Qn(e,"between")),i=jr(Qn(e,"bar"));return {...n?{top:n}:{},...t?{left:t}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function pt(e){if(!e||e.kind==="textValue")return {};let n=Qn(e,"pBdr");return n?Xf(n):{}}function Xo(e){let n=Rx;for(let t of e){if(!t||t.kind==="textValue")continue;let r=Qn(t,"pBdr");r&&(n=Xf(r));}return n}function Rn(e){return _f(e.val,e.widthPt)}function At(e){return e?e.spacePt+Rn(e):0}function kx(e){return At(e)}function Ks(e){let n=[];for(let t of Gf){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 Gr(e,n){return Math.max(e,n)-n}function Us(e,n,t,r){return t&&!r?0:Gr(e,n)}var Ox=/^[0-9A-Fa-f]{6}$/;function di(e){if(!(e===void 0||e==="auto"||e==="nil")&&Ox.test(e))return e.toUpperCase()}function $o(e){if(e&&e.val!=="nil")return di(e.fill)}function Zs(e){if(!e||e.localName!=="shd")return;let n={};for(let t of e.attributes)n[t.localName]=t.value;return $o(n)}function qs(e){let n;for(let t of e)t.localName==="shd"&&(n=$o(t.attributes));return n}function Vo(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 Cx=64,Bx=31680,Lx=720,Mx=36,Js=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),Xr=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),Fx=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),Ex=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function Yo(e){return e.kind!=="textValue"}function ci(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Qs(e,n){for(let t of e.children)if(Yo(t)&&t.localName===n)return t}function $f(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function Nx(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function Vf(e,n){if(!n)return;let t=0;for(let r of n.children){if(t>=128)break;if(t+=1,!Yo(r)||r.localName!=="tab")continue;let o=Nx($f(ci(r,"pos"))??NaN);if(o===null)continue;let a=ci(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=Fx.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let l=ci(r,"leader");e.set(o,{alignment:i,...l!==void 0&&Ex.has(l)?{leader:l}:{}});}}function Yf(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,...Ax(i)});}return {stops:Object.freeze(r),defaultIntervalPt:n}}function Ax(e){return e.leader?{leader:e.leader}:{}}function ed(e){let n=new Map;for(let t of e)!t||!Yo(t)||Vf(n,Qs(t,"tabs"));return Yf(n)}function nd(e){if(!e||!Yo(e))return Xr;let n=new Map;return Vf(n,Qs(e,"tabs")),Yf(n)}function Ko(e,n){return n===void 0||!Number.isFinite(n)||n<=0||n===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:n}}function Dx(e){if(!e||!Yo(e))return 36;let n=Qs(e,"defaultTabStop");if(!n)return 36;let t=$f(ci(n,"val"));return t===null||t<=0||t>31680?36:t/20}function $r(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 td(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 sr(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 ui=4,Kf=4096,Dt=64,id=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),_x=/\s*\\\*\s*MERGEFORMAT\s*$/i;function Vr(e){if(e.length>qc$1)return null;let n=e.replace(/\s+/g," ").trim().toUpperCase();return n.length>qc$1?null:n.replace(_x,"").trim()}function dr(e){let n=Vr(e);return n==="PAGE"||n==="NUMPAGES"||n==="SECTIONPAGES"?n:null}function In(e,n){return fc$1(e,n)}function cr(e){return gc$1(e)}function ld(){return {nodes:0,exhausted:false}}function mt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>Kf?(e.exhausted=true,false):true)}function Zo(){return {nesting:0,instruction:"",instructionOverflow:false,deletedInstruction:"",deletedInstructionOverflow:false,sawLiveInstruction:false,nestingOverflow:false,phase:"idle",inner:[]}}function Uo(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 fi(e){return e.sawLiveInstruction?{instruction:e.instruction,overflow:e.instructionOverflow}:{instruction:e.deletedInstruction,overflow:e.deletedInstructionOverflow}}function Hx(e){return e.sawLive?{instruction:e.instruction,overflow:e.overflow}:{instruction:e.deletedInstruction,overflow:e.deletedOverflow}}function qo(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>ui?e.nestingOverflow=true:e.nesting>=2&&(e.inner[e.nesting-2]={instruction:"",overflow:false,deletedInstruction:"",deletedOverflow:false,sawLive:false,separated:false});}function Yr(e){return e.nesting<2||e.nesting>ui?null:e.inner[e.nesting-2]??null}function Uf(e){if(e.nesting===1)return e.phase==="instruction";let n=Yr(e);return n!==null&&!n.separated}function od(e,n){if(!Uf(e))return false;if(e.nesting===1)return n?!e.deletedInstructionOverflow:!e.instructionOverflow;let t=Yr(e);return n?!t.deletedOverflow:!t.overflow}function Zf(e){if(e.nesting===1){e.sawLiveInstruction=true;return}let n=Yr(e);n&&(n.sawLive=true);}function ad(e,n){if(e.nesting===1){n?(e.deletedInstructionOverflow=true,e.deletedInstruction=""):(e.instructionOverflow=true,e.instruction="");return}let t=Yr(e);t&&(n?(t.deletedOverflow=true,t.deletedInstruction=""):(t.overflow=true,t.instruction=""));}function rd(e){ad(e,false),ad(e,true);}function zx(e,n,t=false){if(!od(e,t))return;let r=Yr(e);t||Zf(e);let o=r?t?r.deletedInstruction:r.instruction:t?e.deletedInstruction:e.instruction;if(o.length+n.length>qc$1){ad(e,t);return}r?t?r.deletedInstruction=o+n:r.instruction=o+n:t?e.deletedInstruction=o+n:e.instruction=o+n;}function Jo(e,n,t,r){if(!Uf(e))return;let o=hc$1(n);if(o||Zf(e),!od(e,o))return;if(r>Dt){rd(e);return}let a=[],i=n.kind==="textValue"?[]:n.children??[];for(let l=i.length-1;l>=0;l-=1)a.push({node:i[l],depth:r+1});for(;a.length>0;){let l=a.pop();if(!mt(t)){rd(e);return}if(l.depth>Dt){rd(e);return}if(l.node.kind==="textValue"){if(zx(e,l.node.value,o),!od(e,o))return;continue}let s=l.node.children??[];for(let d=s.length-1;d>=0;d-=1)a.push({node:s[d],depth:l.depth+1});}}function Qo(e){if(e.nesting===1){if(e.phase!=="instruction"||(e.phase="result",e.nestingOverflow))return null;let r=fi(e);return r.overflow?null:dr(r.instruction)}let n=Yr(e);if(!n||n.separated)return null;n.separated=true;let t=Hx(n);return t.overflow?null:dr(t.instruction)}function ea(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&Uo(e);}function qf(e){return e.phase==="instruction"&&e.nesting>=1}function Jf(e){return e.phase==="result"&&e.nesting>=1}function sd(e){let n=false,t=false,r=false,o=ld(),a=Zo(),i=()=>n&&t&&r,l=p=>{p==="PAGE"?n=true:p==="NUMPAGES"?t=true:r=true;},s=false,d=[],c=(p,m)=>{if(p.kind!=="runProperties"){if(In(p,"begin")){qo(a),a.nestingOverflow&&(s=true);return}if(cr(p)){Jo(a,p,o,m);return}if(In(p,"separate")){let g=a.nesting,h=a.phase,b=Qo(a);if(s)return;b&&(g<=1||h==="result")&&d.push(b);return}if(In(p,"end")&&(ea(a),a.nesting===0)){if(!s)for(let g of d)l(g);d.length=0;}}},u=(p,m)=>{if(p.kind==="run")for(let g of p.children){if(!mt(o))return;if(c(g,m+1),(g.kind==="drawing"||g.kind==="generic")&&!cr(g)&&"children"in g&&g.children.length>0){let h={...a,inner:a.inner.map(k=>({...k}))},b=s,x=d;d=[],f(g,m+1),Object.assign(a,h),s=b,d=x;}if(i()||o.exhausted)return}},f=(p,m)=>{if(!i()&&mt(o)&&!(m>Dt)&&p.kind!=="textValue"){if(p.kind==="paragraph"){Uo(a),s=false,d.length=0;for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return;Uo(a),s=false,d.length=0;return}if(p.kind==="run"){u(p,m);return}if(ic$1(p)){let g=dr(kc$1(p)??"");if(g){l(g);return}}for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return}};return f(e,0),!n&&!t&&!r?id:{hasPage:n,hasNumPages:t,hasSectionPages:r}}var jx=64,Wx=64,Gx=[{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 gt(e){if(!Number.isFinite(e))return 1;let n=Math.trunc(e);return n<0?1:n>9999?9999:n}function _t(e){return String(gt(e))}function Qf(e){let n=gt(e);return n<10?`0${n}`:String(n)}function dd(e){let n=gt(e);n>3999&&(n=3999);let t="";for(let{value:r,glyph:o}of Gx)for(;n>=r;)if(t+=o,n-=r,t.length>=64)return t.slice(0,64);return t||"I"}function ep(e){return dd(e).toLowerCase()}function cd(e){let n=gt(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 np(e){return cd(e).toLowerCase()}function Xx(e){let n=gt(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 $x(e){return gt(e).toString(16).toUpperCase()}function Vx(e){let n=["*","\u2020","\u2021","\xA7"],t=gt(e);if(t<=0)return n[0];let r=(t-1)%n.length,o=Math.min(Math.floor((t-1)/n.length)+1,Yx);return n[r].repeat(o)}var Yx=8,pi=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Kx=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function mi(e){let n=gt(e);if(n<20)return pi[n];if(n<100){let r=n%10;return Kx[Math.floor(n/10)]+(r===0?"":`-${pi[r]}`)}if(n<1e3){let r=n%100;return `${pi[Math.floor(n/100)]} hundred${r===0?"":` ${mi(r)}`}`}let t=n%1e3;return `${pi[Math.floor(n/1e3)]} thousand${t===0?"":` ${mi(t)}`}`}function tp(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function Ux(e){return tp(mi(e))}var Zx=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function qx(e){let n=Zx.get(e);return n!==void 0?n:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function Jx(e){let n=mi(e),t=Math.max(n.lastIndexOf(" "),n.lastIndexOf("-")),r=t<0?"":n.slice(0,t+1);return tp(r+qx(n.slice(t+1)))}function ht(e,n){switch(e){case "decimal":return _t(n);case "decimalZero":return Qf(n);case "upperRoman":return dd(n);case "lowerRoman":return ep(n);case "upperLetter":return cd(n);case "lowerLetter":return np(n);case "ordinal":return Xx(n);case "cardinalText":return Ux(n);case "ordinalText":return Jx(n);case "hex":return $x(n);case "chicago":return Vx(n);case "numberInDash":return `- ${_t(n)} -`;case "none":case "bullet":return "";default:return _t(n)}}function ud(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 l=r[a+1];if(l>="1"&&l<="9"){let s=Number(l)-1,d=t[s]??"decimal",c=n[s]??1,u=d==="bullet"?"":ht(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}var gi="0";function fd(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 _t(t);let o=ht(r,t);return o.length>0?o:_t(t)}function yt(e,n){if(e==="PAGE")return fd(n.pageNumber,n.format);let t=e==="NUMPAGES"?n.pageCount:n.sectionPageCount??n.pageCount;return !Number.isFinite(t)||t<0?"":_t(Math.floor(t))}function Ht(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function pd(e,n=id){if(!e||!Ht(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 Kr(e,n,t,r){let o=false,a=e.map((i,l)=>{let s=n+l,d=i.pageFieldSource;return d&&d.pageNumber===s&&d.sectionPageCount===t&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:s,sectionPageCount:t,...r?{format:r}:{}}})});return o?a:e}function Qx(e){for(let n of e.spans)if(n.fieldAtom?.pageField)return true;return false}function rp(e){if(e.kind==="paragraph"){for(let n of e.lines)if(Qx(n))return true;return false}for(let n of e.rows)for(let t of n.cells)for(let r of t.blocks)if(rp(r))return true;return false}function md(e,n){let t=n,r=false;for(let o of e)t=Math.max(t,o.box.y+o.box.height),!r&&rp(o)&&(r=true);return {usedBottom:t,hasBodyPageFields:r}}function eS(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=yt(a,n);i!==o.text&&(t||(t=e.spans.slice()),t[r]={...o,text:i});}return t?{...e,spans:t}:e}function op(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 l=0;l<o.lines.length;l+=1){let s=o.lines[l],d=eS(s,n);d!==s&&(i||(i=o.lines.slice()),i[l]=d);}i&&(a={...o,lines:i});}else {let i=null;for(let l=0;l<o.rows.length;l+=1){let s=o.rows[l],d=null;for(let c=0;c<s.cells.length;c+=1){let u=s.cells[c],f=op(u.blocks,n);f!==u.blocks&&(d||(d=s.cells.slice()),d[c]={...u,blocks:f});}d&&(i||(i=o.rows.slice()),i[l]={...s,cells:d});}i&&(a={...o,rows:i});}a!==o&&(t||(t=e.slice()),t[r]=a);}return t??e}function zt(e){let n=e.pages.length;if(n===0)return e;let t=false,r=e.pages.map(o=>{let a=o.pageFieldSource,i={pageNumber:a?.pageNumber??o.index+1,pageCount:n,sectionPageCount:a?.sectionPageCount??n,...a?.format?{format:a.format}:{}},l=u=>{if(!u?.pageFieldProjector)return u;t=true;let f=u.pageFieldProjector(i),{pageFieldProjector:p,...m}=f;return m},s=l(o.header),d=l(o.footer),c=o.hasBodyPageFields===false?o.fragments:op(o.fragments,i);return s===o.header&&d===o.footer&&c===o.fragments?o:(c!==o.fragments&&(t=true),{...o,...s!==void 0?{header:s}:{},...d!==void 0?{footer:d}:{},...c!==o.fragments?{fragments:c}:{}})});return t?{revision:e.revision,pages:r}:e}var nS=`
2
- \r`,tS=/[ \t\n\r]*\\\*[ \t\n\r]*(?:"[^"]*"|[^ \t\n\r"\\]+)?[ \t\n\r]*$/;function ap(e,n){let t=n;for(;t<e.length&&nS.includes(e[t]);)t+=1;return t}function ip(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 hi(e){if(e.length===0||e.length>256)return null;let n=ap(e,0);if(e[n]==='"')return null;let t=ip(e,n),r=e.slice(n,t).toUpperCase();if(r!=="MACROBUTTON"&&r!=="GOTOBUTTON")return null;let o=ap(e,t);if(o>=e.length)return null;let a=ip(e,o),i=e.slice(a).trim();for(;;){let l=i.replace(tS,"").trimEnd();if(l===i)break;i=l;}if(i[0]==='"'){let l=i.indexOf('"',1);l===-1?i=i.slice(1):l===i.length-1&&(i=i.slice(1,-1));}return i.length===0?null:{display:i}}var lp=Object.freeze({TITLE:"title",AUTHOR:"creator",SUBJECT:"subject",KEYWORDS:"keywords",LASTSAVEDBY:"lastModifiedBy",COMMENTS:"description"}),rS=/\s*\\[A-Z*@#!]\s*(?:"[^"]*"|[^\s"\\]+)?\s*$/;function oS(e){let n=e;for(;;){let t=n.replace(rS,"").trimEnd();if(t===n)return n;n=t;}}function aS(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 yi(e){let n=Vr(e);if(n===null||n.length===0)return null;let t=oS(n),r=lp[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=aS(o);if(a===null)return null;let i=lp[a];return i?{property:i}:null}function bi(e,n){if(!n)return null;let t=n[e.property];return t!==void 0&&t.length>0?t:null}var iS=qc$1,lS=2048,sS=256;function dS(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 cS=new Set(["\\l","\\o","\\t","\\m","\\n","\\*","\\#","\\@"]);function xi(e){if(e.length===0||e.length>iS)return null;let n=dS(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,l=null,s=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(!cS.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<=sS;u==="\\l"?i||(i=true,p&&(a=f.value)):u==="\\o"&&(s||(s=true,p&&(l=f.value)));continue}o||(o=true,c.value.length>0&&c.value.length<=lS&&(r=c.value));}return r===null&&a===null?null:{target:r,anchor:a,tooltip:l}}function na(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 Ur(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 Si(e,n,t){let r=Ur(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}var et=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}),uS=/^[0-9A-Fa-f]{6}$/;function jt(e){let n=e.attributes?.val;return n===void 0||!(n==="0"||n==="false"||n==="off")}function ta(e,n=false){return e===void 0||!(n?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function sp(e){return e===void 0||e==="auto"?null:uS.test(e)?e.toUpperCase():null}function dp(e,n){return e==="minorAscii"||e==="minorHAnsi"?n.minor:e==="majorAscii"||e==="majorHAnsi"?n.major:null}function Fe(e,n){let t={...et};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(n?dp(o?.asciiTheme,n)??dp(o?.hAnsiTheme,n):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(t.fontFamily=i);break}case "sz":{let o=ta(r.attributes?.val);o!==null&&o>0&&(t.fontSizePt=o/2);break}case "color":{t.color=sp(r.attributes?.val);break}case "b":t.bold=jt(r);break;case "i":t.italic=jt(r);break;case "u":{let o=r.attributes?.val??"single";t.underline=o==="none"||!jt(r)?null:{variant:o,color:sp(r.attributes?.color)};break}case "strike":t.strike=jt(r);break;case "dstrike":t.doubleStrike=jt(r);break;case "highlight":{let o=r.attributes?.val;t.highlight=o&&o!=="none"?o:null;break}case "shd":{t.shading=$o(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=ta(r.attributes?.val,true);o!==null&&(t.baselineShiftPt=o/2);break}case "caps":t.caps=jt(r);break;case "smallCaps":t.smallCaps=jt(r);break;case "spacing":{let o=ta(r.attributes?.val,true);o!==null&&(t.characterSpacingPt=o/20);break}case "w":{let o=ta(r.attributes?.val);o!==null&&o>0&&(t.horizontalScalePercent=o);break}case "kern":{let o=ta(r.attributes?.val);o!==null&&(t.kerningMinPt=o/2);break}case "vanish":t.hidden=jt(r);break;}return t}function Wt(e,n){return n.caps?e.toUpperCase():e}function nt(e,n,t){return t.measure(Wt(e,n),n)}function fS(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 gd(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}var pS=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),cp=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),up=new Map([[167,"\u25AA"],[183,"\u2022"]]),fp=new Map([["symbol",pS],["wingdings",cp],["wingdings 2",up],["wingdings 3",up],["webdings",cp]]),mS=64;function ra(e){return !e||e.length>mS?false:fp.has(e.toLowerCase())}function Zr(e,n,t){if(e.length===0||!ra(n))return e;let r=fp.get(n.toLowerCase());if(t?.(n)===true)return e;let o="",a=false;for(let i of e){let l=i.codePointAt(0);if(l>=61440&&l<=61695){let s=r.get(l-61440);if(s!==void 0){o+=s,a=true;continue}}o+=i;}return a?o:e}var Gt=61440,oa=61695,hd=128;function qr(e){return e.kind==="generic"&&e.namespaceUri===ma$1&&e.localName==="sym"}function pp(e,n){if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes)if(t.localName===n&&(t.namespaceUri===ma$1||t.namespaceUri===""))return t.value}}function gS(e){return !e||e.length>4||!/^[0-9A-Fa-f]{1,4}$/.test(e)?null:Number.parseInt(e,16)}function Pi(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 Jr(e){if(!qr(e))return null;let n=gS(pp(e,"char"));if(n===null)return null;let t=pp(e,"font"),r=t&&t.length<=hd?t:null,o=ra(r),a=o&&n<=255&&n+Gt<=oa?n+Gt:n;if(o&&a>=Gt&&a<=oa){let i=Zr(String.fromCodePoint(a),r),l=i.codePointAt(0)<Gt;return {text:i,font:r,unicode:l}}return Pi(n)?{text:String.fromCodePoint(n),font:r,unicode:n<57344||n>63743}:null}function yd(e,n,t){if(!n.font)return {props:e,style:Fe(e,t)};let r=[...e,{localName:"rFonts",attributes:{ascii:n.font,hAnsi:n.font}}];return {props:r,style:Fe(r,t)}}var hS=256,yS=9;function bS(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 xS(e){if(e.quoted)return null;let n=e.value;if(n.length===0||n.length>yS)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 wi(e){if(e.length===0||e.length>hS)return null;let n=bS(e);if(n.length<2)return null;let t=n[0];if(t.quoted||t.value.toUpperCase()!=="SYMBOL")return null;let r=xS(n[1]);if(r===null)return null;let o=null,a=null,i=false;for(let l=2;l<n.length;l+=1){let s=n[l];if(s.quoted||!s.value.startsWith("\\"))continue;let d=s.value.toLowerCase();if(d==="\\f"){let c=n[l+1];c&&c.value.length>0&&c.value.length<=hd&&(c.quoted||!c.value.startsWith("\\"))&&(o=c.value,l+=1);continue}if(d==="\\s"){let c=n[l+1];if(c&&(c.quoted||!c.value.startsWith("\\"))&&(l+=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 Ri(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=Fe(o,t);if(e.unicode)return Pi(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null;let i=e.font??a.fontFamily;if(ra(i)){let l=e.code<=255&&e.code+Gt<=oa?e.code+Gt:e.code;if(l>=Gt&&l<=oa)return {text:Zr(String.fromCodePoint(l),i),props:o,style:a}}return Pi(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null}function Ii(){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 l=a===n,d=l&&i&&!(t&&!r)?yt(e,i):"";return o(),l?d:null},reset:o,noteResult(a){t=true,a&&(r=true);}}}var pn="all-markup",mp=Object.freeze([]),SS=32,PS={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function bt(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 Ti(e){if(e.kind==="textValue")return null;let n=PS[e.kind];if(n===void 0)return null;let t=bt(e,"date");return {kind:n,id:bt(e,"id")??"",author:bt(e,"author")??"",...t===void 0?{}:{date:t},nodeId:e.id}}function ki(e,n){return e.length===0?[n]:[...e,n]}function Oi(e){return e.kind!=="textValue"&&ra$1(e.kind)}var Qr=SS;function tn(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 eo(e){if(e.kind==="textValue")return vi;let n=e.children.find(o=>o.kind==="paragraphProperties");if(!n||n.kind==="textValue")return vi;let t=n.children.find(o=>o.kind==="runProperties");if(!t||t.kind==="textValue")return vi;let r=[];for(let o of t.children){if(o.kind==="textValue"||o.namespaceUri!==ma$1)continue;let a=wS[o.localName];if(a===void 0)continue;let i=bt(o,"date");r.push({kind:a,id:bt(o,"id")??"",author:bt(o,"author")??"",...i===void 0?{}:{date:i},nodeId:o.id});}return r.length>0?r:vi}var wS={ins:"insert",del:"delete",moveFrom:"moveFrom",moveTo:"moveTo"};function aa(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!==ma$1||r.localName!=="rPrChange")continue;let o=bt(r,"date");return {kind:"format",id:bt(r,"id")??"",author:bt(r,"author")??"",...o===void 0?{}:{date:o},nodeId:r.id}}return null}var vi=Object.freeze([]);function bd(e){return e.find(n=>gp(n))??e[0]}function gp(e){return e.kind==="delete"||e.kind==="moveFrom"}function Ci(e,n){let t=bd(e);return {...t?{markRevisions:e,markRevision:t}:{},...n?{markFormatRevision:n}:{}}}function RS(e){return bd(eo(e))??null}function IS(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 xt(e){return e.some(n=>n.kind==="delete"||n.kind==="moveFrom")}function vS(e){let{simple:n,depth:t,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:l,cascadeRuns:s,themeFonts:d}=e,c="",u,f,p=false,m=Zo(),g=Ii(),h=(x,k)=>{u||(u=x,f=k);},b=(x,k,I)=>{if(!(x.kind==="textValue"||k>Dt)){for(let B of x.children)if(B.kind!=="textValue"){if(!mt(o))return;if(B.kind==="run"){let F=Si(B,l,s),P=Fe(F,d);for(let L of B.children){if(L.kind==="runProperties")continue;if(In(L,"begin")){qo(m),m.nesting===1&&g.reset();continue}if(cr(L)){Jo(m,L,o,k+1);continue}if(In(L,"separate")){let G=m.nesting,ee=m.phase,R=Qo(m);(G===1||ee==="result"&&!m.nestingOverflow)&&g.onSeparate(r?R:null,G);continue}if(In(L,"end")){let G=g.onEnd(m.nesting,r);G!==null&&(c+=G),ea(m);continue}if(nc$1(L))continue;if(qr(L)){if(tn(I,i)&&(p=true),g.active){g.noteResult(!P.hidden&&tn(I,i));continue}let G=Jr(L);if(!G?.unicode||P.hidden||!tn(I,i))continue;h(F,P),c+=G.text;continue}let O=na(L);if(O.length===0)continue;let T=xt(I),y=!tn(I,i)||L.kind==="deletedText"&&!T;y||(p=true);let D=P.hidden||y;if(g.active){g.noteResult(!D),D||h(F,P);continue}D||(h(F,P),c+=O);}continue}if(ic$1(B)){let F=g.active?null:dr(kc$1(B)??"");if(F&&r){if(!tn(I,i))continue;let P=c.length;b(B,k+1,I),c=c.slice(0,P),c+=yt(F,r);continue}b(B,k+1,I);continue}if(B.kind==="hyperlink"){b(B,k+1,I);continue}if(Oi(B)&&I.length<Qr){let F=Ti(B);b(B,k+1,F?ki(I,F):I);continue}b(B,k+1,I);}}};return b(n,t,a),{text:c,resultProps:u,resultStyle:f,sawResultContent:p}}function hp(e){let{simple:n,pageContext:t,inheritedRunProperties:r,themeFonts:o}=e,a=vS(e),i=kc$1(n)??"",l=a.resultProps??r,s=dr(i);if(s&&t){let g=a.resultStyle??Fe(r,o);return g.hidden?null:{text:yt(s,t),props:l,style:g}}if(s&&e.bodyPageFields&&!t&&a.text.length===0&&!a.sawResultContent){let g=a.resultStyle??Fe(r,o);return g.hidden?null:{text:gi,props:l,style:g,pageField:{kind:s}}}let d=wi(i);if(d){let g=Ri(d,l,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=yi(i);if(g){let h=bi(g,e.documentProperties);if(h!==null){let b=a.resultStyle??Fe(r,o);return b.hidden?null:{text:h,props:l,style:b}}}}let u=c?hi(i):null;if(u){let g=a.resultStyle??Fe(r,o);return g.hidden?null:{text:u.display,props:l,style:g}}if(a.text.length===0)return null;let f=a.resultStyle??Fe(r,o);if(f.hidden)return null;let p=e.currentLink?null:xi(i),m=p?e.projectFieldLink?.(p)??null:null;return {text:a.text,props:l,style:f,...m?{link:m}:{}}}var TS="\u2612",kS="\u2610";function OS(e){let n=Vr(e);return n==="FORMCHECKBOX"?"checkbox":n==="FORMDROPDOWN"?"dropdown":null}function xd(e,n){e.symbolSpec=wi(n),!e.symbolSpec&&(e.linkSpec=xi(n),!e.linkSpec&&(e.formSpec=OS(n),!e.formSpec&&(e.buttonSpec=hi(n),!e.buttonSpec&&(e.docPropertySpec=yi(n)))));}function yp(e,n){if(e.formSpec==="checkbox"){if(e.formData?.kind!=="checkbox")return null;let t=e.formData.checked?TS:kS;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:Fe(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 bp(e,n){if(e.symbolSpec){let r=Ri(e.symbolSpec,e.props,n.themeFonts);if(r)return {text:r.text,props:r.props,style:r.style}}let t=yp(e,n.themeFonts);if(t)return {text:t.text,props:t.props,style:t.style};if(e.kind&&n.pageContext)return {text:yt(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:gi,props:e.props,style:e.style,pageField:{kind:e.kind}};if(e.docPropertySpec){let r=bi(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 ur(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 CS=new Set(["left","center","right"]),BS=new Set(["margin","indent","leftMargin"]),LS=new Set(["dot","hyphen","underscore","middleDot"]);function xp(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==ma$1)return null;let n="left",t="margin",r;for(let o of e.attributes)o.namespaceUri===ma$1&&(o.localName==="alignment"?n=o.value:o.localName==="relativeTo"?t=o.value:o.localName==="leader"&&(r=o.value));return {alignment:CS.has(n)?n:"left",relativeTo:BS.has(t)?t:"margin",...r!==void 0&&LS.has(r)?{leader:r}:{}}}Object.freeze({marks:Object.freeze(new Map)});function fr(e,n){return ed$1(e,n)}function Sd(e,n){if(!vd$1(e))return null;if(ld$1(e)||md$1(e))return {text:"",projected:true,kind:null,noteId:null};let t=jd$1(e),r=rd$1(e)??sd$1(e);if(!r)return null;let o=od$1(e),a=o!==null?fr(r,o):t?void 0:n?.activeNoteKey,i=o!==null?o:a?MS(a,r)??null:null,l=a,s=l!==void 0?t?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...s?{nav:s}:{},...l?{scopeId:l}:{}};if(t&&o!==null&&td$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 MS(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 Pp(e){return jd$1(e)||kd$1(e)||ld$1(e)||md$1(e)}function FS(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 Sp=new WeakMap;function wp(e){if(!e)return "";let n=Sp.get(e);if(n!==void 0)return n;let t=JSON.stringify([[...e.marks],e.reservedMarkText??null,e.activeNoteKey??null]),r=`${e.marks.size}:${FS(t)}`;return Sp.set(e,r),r}function Bi(e,n=[],t,r,o,a,i=pn,l,s,d,c,u,f=false){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let p=[],m=0,g,h=rc$1(e,{maxNesting:ui,maxInstructionChars:qc$1}),b=h.filter(v=>v.addressing==="atomic"),x=new Set(b.filter(v=>v.kind==="complex").map(v=>v.node.id)),k=new Set(h.filter(v=>v.kind==="complex"&&v.addressing==="editable-result").map(v=>v.node.id)),I=new Set;for(let v of b)for(let z of v.removeNodeIds)I.add(z);let B=Zo(),F=ld(),P=null,L=null,O=Ii(),T=mp,y=(v,z,C,U,q,Y,H)=>{if(v.length===0&&!U&&!H?.inlineDrawing)return;let X=H?.linkOverride??g,Z=H?.revisionsOverride??T,re=X?{link:X}:{},J=Z.length===0?{}:{revisions:Z};if(U){p.push({text:v,props:z,style:C,start:q,end:Y,projected:true,...H?.measureText!==void 0?{measureText:H.measureText}:{},...H?.noteNav?{noteNav:H.noteNav}:{},...H?.inlineDrawing?{inlineDrawing:H.inlineDrawing}:{},...H?.fieldAtom?{fieldAtom:H.fieldAtom}:{},...re,...J});return}v.length!==0&&p.push({text:v,props:z,style:C,start:q,end:Y,...H?.positionalTab?{positionalTab:H.positionalTab}:{},...H?.breakKind?{breakKind:H.breakKind}:{},...re,...J});},D=()=>{if(!P||!P.atomic){P=null,L=null;return}let v=P.atomStart,z=v+1;if(P.style.hidden){P=null,L=null;return}if(!tn(P.resultRevisions,i)){l&&xt(P.resultRevisions)&&ur(l,v,z),P=null,L=null;return}let{resultLink:C,linkSpec:U,resultRevisions:q,formField:Y}=P,H,X=()=>{if(H)return H;let re=!C&&U?c?.(U)??null:null,J=C??re;return H={...q.length>0?{revisionsOverride:q}:{},...J?{linkOverride:J}:{},fieldAtom:{formField:Y}},H},Z=bp(P,{pageContext:t,themeFonts:d,documentProperties:u,bodyPageFields:f});if(Z){let re=X(),J=Z.pageField?{...re,fieldAtom:{formField:P.formField,pageField:Z.pageField}}:re;y(Z.text,Z.props,Z.style,true,v,z,J);}P=null,L=null;},G=()=>{if(!P)return;let v=!P.resultLink&&P.linkSpec?c?.(P.linkSpec)??null:null,z=C=>v&&!C.link?{...C,link:v}:C;if(P.atomic){m=P.atomStart;for(let C of P.buffered)p.push({...z(C),start:m,end:m+(C.end-C.start)}),m+=C.end-C.start;P.cachedText.length>0&&P.buffered.length===0&&(y(P.cachedText,P.props,P.style,false,m,m+P.cachedText.length,v?{linkOverride:v}:void 0),m+=P.cachedText.length);}else {for(let C of P.buffered)p.push(z(C));m=P.bufferOffset;}P=null,L=null;},ee=(v,z,C)=>{let U=(Z,re,J,se)=>{let be=xt(T),fe=C.hidden||!tn(T,i)||be;if(re.hidden||fe){if(be&&l&&ur(l,J,se),!re.hidden)return;y("\uFFFC",z,C,true,J,se);return}y("\uFFFC",z,C,true,J,se,{inlineDrawing:Object.freeze({drawingNodeId:Z,ownerPartName:s.ownerPartName,projection:re,resource:s.resourceOf(re)})});};if(v.kind==="drawing"){let Z=m;m+=1;let re=m;if(!s)return;let J=s.projectionForAtom?.(v.id)??(v.kind==="drawing"?s.project(v):null);if(!J||J.kind!=="inline"){y("\uFFFC",z,C,true,Z,re);return}U(v.id,J,Z,re);return}if(ab$1(v)){let Z=m;m+=1;let re=m;if(!s)return;let J=s.projectionForAtom?.(v.id)??null;if(!J||J.kind!=="inline"){y("\uFFFC",z,C,true,Z,re);return}U(v.id,J,Z,re);return}if(Pp(v)){let Z=Sd(v,a),re=m,J=re+1;if(m=J,C.hidden||!Z||Z.text.length===0&&!Z.measureText)return;let se=Z.scopeId&&Z.nav?{scopeId:Z.scopeId,direction:Z.nav}:void 0;y(Z.text.length>0?Z.text:Z.measureText??"",z,C,true,re,J,{...Z.measureText!==void 0?{measureText:Z.measureText}:{},...se?{noteNav:se}:{}});return}let q=xp(v);if(q){C.hidden||y(" ",z,C,false,m,m,{positionalTab:q});return}if(qr(v)){let Z=Jr(v);if(!Z||C.hidden||!tn(T,i))return;let re=yd(z,Z,d);y(Z.text,re.props,re.style,true,m,m);return}let Y=na(v);if(Y.length===0)return;let H=xt(T);C.hidden||!tn(T,i)||v.kind==="deletedText"&&!H||y(Y,z,C,false,m,m+Y.length,{...v.kind==="hardBreak"?{breakKind:Yb$1(v)}:{}}),H&&l&&ur(l,m,m+Y.length),m+=Y.length;},R=(v,z)=>{if(v.kind!=="run")return;let C=Si(v,n,r),U=Fe(C,d),q=()=>{P&&(P.capturedResultStyle||(P.props=C,P.style=U,P.capturedResultStyle=true),P.capturedResultRevisions||(P.resultRevisions=T,P.capturedResultRevisions=true,!P.resultLink&&g&&(P.resultLink=g)));};for(let Y of v.children){if(!mt(F)){if(G(),Uo(B),O.reset(),Y.kind==="runProperties"||In(Y,"begin")||In(Y,"separate")||In(Y,"end")||cr(Y)||I.has(Y.id)&&L===null)continue;ee(Y,C,U);continue}if(Y.kind!=="runProperties"){if(In(Y,"begin")){let H=x.has(Y.id);qo(B),B.nesting===1&&(G(),O.reset(),L=H?Y.id:null,P={kind:null,symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,formData:pc$1(Y),atomic:H,editableResult:k.has(Y.id),atomStart:m,props:C,style:U,capturedResultStyle:false,cachedText:"",sawResultContent:false,buffered:[],bufferOffset:m,resultRevisions:T,capturedResultRevisions:T.length>0,formField:oc$1(Y),...g?{resultLink:g}:{}},H&&(m+=1));continue}if(cr(Y)){Jo(B,Y,F,z+1);continue}if(In(Y,"separate")){let H=B.nesting===1&&B.phase==="instruction",X=B.nesting,Z=Qo(B);if(H&&P){P.kind=Z;let re=fi(B);!P.kind&&!re.overflow&&!B.nestingOverflow&&xd(P,re.instruction),P.props=C,P.style=U;}else P?.atomic&&B.phase==="result"&&!B.nestingOverflow&&O.onSeparate(t?Z:null,X);continue}if(In(Y,"end")){let H=B.nesting===1;if(H&&P?.atomic&&B.phase==="instruction"){let Z=fi(B);!Z.overflow&&!B.nestingOverflow&&xd(P,Z.instruction);}let X=O.onEnd(B.nesting,t);X!==null&&P?.atomic&&(P.cachedText+=X),ea(B),H&&(P?.atomic?D():G());continue}if(!(qf(B)&&P?.atomic)){if(P&&Jf(B)){if(qr(Y)){if(P.atomic){if(tn(T,i)&&(P.sawResultContent=true),O.active){O.noteResult(!U.hidden&&tn(T,i));continue}if(!U.hidden&&tn(T,i)){let se=Jr(Y);se?.unicode&&(q(),P.cachedText+=se.text);}continue}let re=Jr(Y);if(!re||U.hidden||!tn(T,i))continue;let J=yd(C,re,d);P.buffered.push({text:re.text,props:J.props,style:J.style,start:m,end:m,projected:true,...T.length>0?{revisions:T}:{},...g?{link:g}:{},fieldAtom:{formField:P.formField}});continue}let H=na(Y);if(H.length===0)continue;let X=xt(T),Z=!tn(T,i)||Y.kind==="deletedText"&&!X;if(P.atomic&&!Z&&(P.sawResultContent=true),X&&l&&(P.atomic?ur(l,P.atomStart,P.atomStart+1):ur(l,m,m+H.length)),Z){P.atomic&&O.active&&O.noteResult(false),P.atomic||(m+=H.length,P.bufferOffset=m);continue}if(P.atomic){if(O.active){if(O.noteResult(!U.hidden),U.hidden)continue;q();continue}if(U.hidden)continue;q(),P.cachedText+=H;continue}if(U.hidden){m+=H.length,P.bufferOffset=m;continue}P.capturedResultStyle||(P.props=C,P.style=U,P.capturedResultStyle=true),P.buffered.push({text:H,props:C,style:U,start:m,end:m+H.length,...T.length>0?{revisions:T}:{},...g?{link:g}:{},fieldAtom:{formField:P.formField}}),m+=H.length,P.bufferOffset=m;continue}I.has(Y.id)&&L===null&&x.size>0,ee(Y,C,U);}}}};if(!mt(F))return p;let M=Wa(),_=(v,z)=>{let C=m;if(m+=1,v.kind==="textValue"||(xt(T)&&l&&ur(l,C,C+1),!tn(T,i)))return;let U=hp({simple:v,depth:z,pageContext:t,budget:F,revisions:T,displayMode:i,inheritedRunProperties:n,cascadeRuns:r,themeFonts:d,currentLink:g,projectFieldLink:c,documentProperties:u,bodyPageFields:f});U&&y(U.text,U.props,U.style,true,C,C+1,{fieldAtom:{formField:false,...U.pageField?{pageField:U.pageField}:{}},...U.link?{linkOverride:U.link}:{}});},A=(v,z,C,U)=>{if(ic$1(v)){_(v,z);return}if(v.kind==="run"){R(v,z);return}if(Lb$1(v)){if(U>=Kb$1||z>Dt)return;for(let X of Ob$1(v))A(X,z+1,C,U+1);return}if(z>Dt||z>=Qr)return;let q=v.kind!=="textValue"&&"localName"in v?Va(C,v):C;if(v.kind==="hyperlink"){let X=g;g=o?.(v)??void 0;for(let Z of v.children)A(Z,z+1,q,U);g=X;return}if(!Oi(v))return;let Y=Ti(v);if(!Y||!mt(F))return;let H=T;T=ki(H,Y);for(let X of v.children)A(X,z+1,q,U);T=H;};for(let v of e.children)A(v,1,M,0);return G(),p}function ES(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 NS(e){return e.map(ES).join(";")}var Rp=new WeakMap,vp=1<<18;function Tp(e){if(e.kind==="textValue")return `t:${e.value}`;let n=e.kind==="paragraph"||e.kind==="table";if(n){let r=Rp.get(e);if(r!==void 0)return r}let t=AS(e);return n&&t.length<=vp&&Rp.set(e,t),t}function AS(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(Tp(t));return `(${n.join("|")})`}var Ip=new WeakMap;function pr(e){let n=Math.round(e.width*1e3),t=e.drawingToken??"",r=e.exclusionToken??"",o=NS(e.properties),a=Ip.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,Tp(e.paragraph)].join("\0");return i.length<=vp&&Ip.set(e.paragraph,{producer:e.producer,width:n,drawingToken:t,exclusionToken:r,propertiesToken:o,key:i}),i}var kp=new WeakMap;function Op(e,n){kp.set(e,n);}function Cp(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=kp.get(a);if(i)for(let l of i)o.add(l);}n||e.retain(o);}var DS=8,_S=8;function HS(e={}){let n=Math.max(1,e.maxEntries??4096),t=n*8,r=new Map,o=0,a=0,i=0,l=0,s=0;return {get(d){let c=r.get(d);if(c===void 0){l+=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]),s+=1;}},retentionPassDue(){return a+=1,a%DS===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>_S&&(r.delete(c),s+=1);},clear(){r.clear();},get stats(){return {hits:i,misses:l,evictions:s,size:r.size}}}}var Bp=21600;function je(e){return Number.isFinite(e)?e:0}function ia(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 zS(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 ia(t)}function Pd(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 ia(r)}function jS(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 Mp(e,n){return no(e,n)}function wd(e,n,t){return Mp(no(e,n),t)}function WS(e,n){let t=[],r=Math.min(e.length,sn);if(r<2)return Object.freeze([]);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r],l=a.y,s=i.y;if(l===s)continue;let d=Math.min(l,s),c=Math.max(l,s);if(n<d||n>c||n===c&&s>l||n===d&&s<l)continue;let u=(n-l)/(s-l),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&t.push({x:f,delta:s>l?1:-1});}return t.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(t)}function GS(e,n){let t=[],r=Math.min(e.length,sn);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 l=Math.min(a.x,i.x),s=Math.max(a.x,i.x);s>l&&t.push(Object.freeze({start:l,end:s}));}return ia(t)}function Lp(e,n,t){let r=XS(WS(e,n),t),o=GS(e,n);return ia([...r,...o])}function XS(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,l=e[a+1].x;l>i&&t.push(Object.freeze({start:i,end:l}));}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 $S(e,n){return Object.freeze({top:je(e.top)+je(n.top),right:je(e.right)+je(n.right),bottom:je(e.bottom)+je(n.bottom),left:je(e.left)+je(n.left)})}function VS(e,n,t,r,o,a){let i=n.x-e.x,l=n.y-e.y,s=r.x-t.x,d=r.y-t.y,c=i*d-l*s;if(Math.abs(c)<1e-12)return null;let f=((t.x-e.x)*l-(t.y-e.y)*i)/c,p=((t.x-e.x)*d-(t.y-e.y)*s)/c;if(f<-1e-9||f>1+1e-9||p<-1e-9||p>1+1e-9)return null;let m=e.y+f*l;return !Number.isFinite(m)||m<o-1e-6||m>a+1e-6?null:m}function YS(e,n,t,r){let o=[],a=Math.min(e.length,sn),i=Math.min(n.length,sn);if(a<2||i<2)return Object.freeze([]);let l=sn*sn,s=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(s>=l)return Object.freeze(o);s+=1;let p=n[f],m=n[(f+1)%i],g=VS(c,u,p,m,t,r);g!==null&&o.push(g);}}return Object.freeze(o)}function KS(e,n,t){let r=new Set;r.add(n),r.add(t);for(let o of e){let a=Math.min(o.length,sn);for(let i=0;i<a;i+=1){let l=o[i].y;Number.isFinite(l)&&l>=n-1e-6&&l<=t+1e-6&&r.add(l);}for(let i=0;i<a;i+=1){let l=o[i],s=o[(i+1)%a],d=l.y,c=s.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 YS(e[0],e[1],n,t))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function US(e,n,t,r){let o=Lp(e,t,r);return n&&n.length>=3&&(o=zS(o,Lp(n,t,"nonzero"))),o}function Fp(e,n,t,r,o=null){let a=je(t.top),i=je(t.bottom),l=je(t.left),s=je(t.right),d=n-i,c=n+a,u=KS(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 h=u[g+1];return h<=m+1e-6?[m]:[m,h,(m+h)/2]}):[d];for(let m of p){let g=US(e,o,m,r);for(let h of g)f.push(Object.freeze({start:h.start-l,end:h.end+s}));}return ia(f)}function Ep(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 ZS(e){let n=Math.max(0,je(e.extentWidthPt)),t=Math.max(0,je(e.extentHeightPt)),r=Mi(e.transform,n,t),o=Math.min(e.polygonEmu.length,sn);if(o<3)return Ep({x:e.anchorX,y:e.anchorY,width:n,height:t});let a=r.width/Bp,i=r.height/Bp,l=[];for(let s=0;s<o;s+=1){let d=e.polygonEmu[s];l.push(Object.freeze({x:je(d.x)*a,y:je(d.y)*i}));}return Fi({points:Object.freeze(l),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 qS(e,n){let t=n.effectInsets??Li,r=n.wrapDistances??Li,o=je(n.contentLeft),a=je(n.contentRight);if(n.mode==="topAndBottom"){let c=Mp(no(n.contentBounds,t),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):Pd([{start:o,end:a}],o,a)}if(n.mode==="square"){let c=wd(n.contentBounds,t,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):Pd([{start:c.x,end:c.x+c.width}],o,a)}let i=n.polygon&&n.polygon.length>=3?n.polygon:Ep(n.contentBounds),l=n.mode==="through"?"evenodd":"nonzero",s=$S(r,t),d=Fp(i,e,s,l,n.clipPolygon);return Pd(d,o,a)}function JS(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 QS(e,n,t,r,o){if(t==="bothSides"||n.length===0)return e;let a=JS(n);if(!a)return e;if(t==="left")return Object.freeze(e.filter(s=>s.end<=a.start+1e-4));if(t==="right")return Object.freeze(e.filter(s=>s.start>=a.end-1e-4));let i=Math.max(0,a.start-r),l=Math.max(0,o-a.end);return i===l?Object.freeze(e.filter(s=>s.start>=a.end-1e-4)):i>l?Object.freeze(e.filter(s=>s.end<=a.start+1e-4)):Object.freeze(e.filter(s=>s.start>=a.end-1e-4))}function Np(e,n){let t=qS(e,n),r=jS(t,n.contentLeft,n.contentRight);return QS(r,t,n.textSide,n.contentLeft,n.contentRight)}function eP(e,n,t,r){return t.length<3?false:Fp(t,n,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function Rd(e,n,t){let r=t.effectInsets??Li,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 eP(e,n,t.clipPolygon,r);let a=no(t.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Ap(e){let n=Object.freeze({top:je(e.wrapDistancesEmu.top/tt),right:je(e.wrapDistancesEmu.right/tt),bottom:je(e.wrapDistancesEmu.bottom/tt),left:je(e.wrapDistancesEmu.left/tt)}),t=e.mode==="tight"||e.mode==="through"?ZS({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 vn=1e5,sn=E.maxPolygonPoints,Li=Object.freeze({top:0,right:0,bottom:0,left:0}),nP=32,tP=.1,rP=new Set(["rect","ellipse","roundRect"]);function pe(e){return Number.isFinite(e)?e:0}function Ln(e,n,t){return Number.isFinite(e)?Math.min(t,Math.max(n,e)):n}function Dp(e,n){let t=e+n;return Number.isFinite(t)?t:0}function _p(e,n,t){let r=Ln(e,0,t),o=Ln(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 oP(e){let n=_p(Ln(e.left,0,vn),Ln(e.right,0,vn),vn),t=_p(Ln(e.top,0,vn),Ln(e.bottom,0,vn),vn);return Object.freeze({left:n.left,top:t.left,right:n.right,bottom:t.right})}function aP(e){let n=oP({left:e.left*vn,top:e.top*vn,right:e.right*vn,bottom:e.bottom*vn});return Object.freeze({left:n.left/vn,top:n.top/vn,right:n.right/vn,bottom:n.bottom/vn})}function iP(e){let n=t=>{if(!Number.isFinite(t))return 0;let r=t/tt;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 no(e,n){let t=pe(n.left),r=pe(n.right),o=pe(n.top),a=pe(n.bottom);return Object.freeze({x:e.x-t,y:e.y-o,width:Math.max(0,Dp(e.width,t+r)),height:Math.max(0,Dp(e.height,o+a))})}function lP(e,n,t){let r=e*Ln(t.left,0,1),o=n*Ln(t.top,0,1),a=e*(1-Ln(t.right,0,1)),i=n*(1-Ln(t.bottom,0,1));if(a<=r||i<=o){let l=e/2,s=n/2;return Object.freeze({left:l,top:s,right:l,bottom:s})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function Mi(e,n,t){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?pe(Xt(r)??n):Math.max(0,pe(n)),l=o>0?pe(Xt(o)??t):Math.max(0,pe(t));return Object.freeze({offsetX:pe(Xt(a.x)??0),offsetY:pe(Xt(a.y)??0),width:i,height:l})}function sP(e,n,t,r){let o=lP(n,t,r),a=o.right-o.left,i=o.bottom-o.top,l=n>0?n:1,s=t>0?t:1,d=[],c=Math.min(e.length,sn);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+Ln(f.x/l,0,1)*a,m=i<=0?o.top:o.top+Ln(f.y/s,0,1)*i;d.push(Object.freeze({x:pe(p),y:pe(m)}));}return Object.freeze(d)}function Hp(e,n,t){let r=e.x-n.x,o=e.y-n.y;t.flipHorizontal&&(r=-r),t.flipVertical&&(o=-o);let a=pe(t.rotationDegrees)*Math.PI/180,i=Math.cos(a),l=Math.sin(a),s=r*i-o*l,d=r*l+o*i;return Object.freeze({x:pe(s+n.x),y:pe(d+n.y)})}function zp(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,sn);for(let i=1;i<a;i+=1){let l=e[i];!Number.isFinite(l.x)||!Number.isFinite(l.y)||(n=Math.min(n,l.x),t=Math.max(t,l.x),r=Math.min(r,l.y),o=Math.max(o,l.y));}return Object.freeze({x:n,y:r,width:Math.max(0,t-n),height:Math.max(0,o-r)})}function Id(e){let n=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),t=la(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let l of t)r.push(Hp(Object.freeze({x:l.x+e.offsetX,y:l.y+e.offsetY}),n,e.transform));let o=zp(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,pe(e.layoutWidth))/a,scaleY:Math.max(0,pe(e.layoutHeight))/i,anchorX:pe(e.anchorX),anchorY:pe(e.anchorY)})}function dP(e,n){return Object.freeze({x:pe(n.anchorX+(e.x-n.bboxX)*n.scaleX),y:pe(n.anchorY+(e.y-n.bboxY)*n.scaleY)})}function Fi(e){let n=e.mapping??Id({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=sP(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(t.length>0?t.length:e.points.length,sn),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 l=0;l<r;l+=1){let s=o[l],d=Object.freeze({x:pe(s.x+e.offsetX),y:pe(s.y+e.offsetY)});i.push(dP(Hp(d,a,e.transform),n));}return Object.freeze(i)}function la(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 cP(e,n,t){if(!e||!rP.has(e))return null;if(n<=0||t<=0)return la(0,0,Math.max(0,n),Math.max(0,t));if(e==="rect")return la(0,0,n,t);if(e==="ellipse"){let l=[],s=n/2,d=t/2,c=n/2,u=t/2,f=Math.min(nP,sn);for(let p=0;p<f;p+=1){let m=p/f*Math.PI*2;l.push(Object.freeze({x:s+c*Math.cos(m),y:d+u*Math.sin(m)}));}return Object.freeze(l)}let r=Math.min(n,t)*tP,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 ro(e){return Object.freeze({x:pe(e.x),y:pe(e.y)})}function uP(e,n){if(e.length===0)return Object.freeze([]);let t=n.x+n.width,r=n.y+n.height,o=(i,l,s)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,sn);for(let u=0;u<c;u+=1){let f=ro(i[u]),p=ro(i[(u+1)%c]),m=l(f),g=l(p);if(m&&g?d.push(p):m&&!g?d.push(ro(s(f,p))):!m&&g&&(d.push(ro(s(f,p))),d.push(p)),d.length>=sn)break}return Object.freeze(d.slice(0,sn))},a=e.slice(0,sn).map(ro);return a=[...o(a,i=>i.x>=n.x,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(n.x-i.x)/s:0;return Object.freeze({x:n.x,y:pe(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.x<=t,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(t-i.x)/s:0;return Object.freeze({x:t,y:pe(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.y>=n.y,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(n.y-i.y)/s:0;return Object.freeze({x:pe(i.x+d*(l.x-i.x)),y:n.y})})],a=[...o(a,i=>i.y<=r,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(r-i.y)/s:0;return Object.freeze({x:pe(i.x+d*(l.x-i.x)),y:r})})],Object.freeze(a)}function fP(e){let n=zp(e);return Object.freeze({x:n.x,y:n.y,width:n.width,height:n.height})}function Ei(e,n){let t=pP(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=uP(a,n);return i.length>=3?Object.freeze(i.map(ro)):Object.freeze([])};return Object.freeze({...e,paintBounds:t,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function pP(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,pe(e.extentWidth)),t=Math.max(0,pe(e.extentHeight)),r=pe(e.anchorX),o=pe(e.anchorY),a=aP(e.crop),i=iP(e.effectExtentEmu),l=Mi(e.transform,n,t),s=Object.freeze({x:r,y:o,width:n,height:t}),d={sourceWidth:l.width,sourceHeight:l.height,offsetX:l.offsetX,offsetY:l.offsetY,crop:a,transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:r,anchorY:o},c=Id(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=Fi({points:la(0,0,l.width,l.height),...d,crop:u,mapping:c}),p=cP(e.presetGeometry,l.width,l.height),m="none",g=p;g||(m=e.presetGeometry?"unsupported-preset":"none",g=la(0,0,l.width,l.height));let h=Fi({points:g,...d,crop:u,mapping:c}),b=fP(h.length>=3?h:f),x=no(b,i);return Object.freeze({contentBounds:s,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:h.length>=3?h:f,clipFallback:m,effectInsets:i})}function oo(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 gP(e){let{transform:n,contentWidth:t,contentHeight:r}=e;if(t<=0||r<=0)return null;let o=Mi(n,t,r),a=o.width,i=o.height,l=Id({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:n,layoutWidth:t,layoutHeight:r,anchorX:0,anchorY:0}),s=pe(n.rotationDegrees),d=Math.abs(s%360)>1e-4,c=n.flipHorizontal?-1:1,u=n.flipVertical?-1:1,f=l.scaleX,p=l.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 b=s*Math.PI/180,x=Math.cos(b),k=Math.sin(b),I=o.offsetX+a/2,B=o.offsetY+i/2,F=f*x*c,P=-f*k*u,L=p*k*c,O=p*x*u,T=f*(I-x*c*(a/2)+k*u*(i/2)-l.bboxX),y=p*(B-k*c*(a/2)-x*u*(i/2)-l.bboxY);return Object.freeze({a:pe(F*m),b:pe(L*m),c:pe(P*g),d:pe(O*g),e:pe(T),f:pe(y)})}function XT(e){let n=gP(e);if(n)return `matrix(${to(n.a)}, ${to(n.b)}, ${to(n.c)}, ${to(n.d)}, ${to(n.e)}, ${to(n.f)})`}function to(e){return Number.isFinite(e)?String(e):"0"}var hP=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"}),yP=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),bP=Object.freeze({left:0,top:0,right:0,bottom:0});function Gp(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=hP[o]??"graphic";break}t===null&&(t="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:n?.crop??bP,transform:n?.transform??yP,placeholderGraphicKind:n?null:t,vectorShape:e.vectorShape})}var tt=12700;function rn(e){return e/tt}function Xt(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*tt*72)return null;let n=e/tt;return Number.isFinite(n)?n:null}function St(e){let n=rn(e.inlineDistancesEmu.left),t=rn(e.inlineDistancesEmu.right),r=rn(e.inlineDistancesEmu.top),o=rn(e.inlineDistancesEmu.bottom),a=rn(e.effectExtentEmu.left),i=rn(e.effectExtentEmu.right),l=rn(e.effectExtentEmu.top),s=rn(e.effectExtentEmu.bottom),d=rn(e.extentEmu.cx),c=rn(e.extentEmu.cy);return Object.freeze({distL:n,distR:t,distT:r,distB:o,effectL:a,effectR:i,effectT:l,effectB:s,width:d,height:c,totalWidth:n+a+d+i+t,lineContribution:r+l+c+s+o})}function Xp(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 Ni(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 Ai(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:Ni(e.geometry,n,t)})}function vd(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:Ni(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 Td(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 Di(e,n){let t=Td(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=Ni(e.geometry,o,a);return Object.freeze({...e,paintBounds:t,hitBounds:r,geometry:Ei(i,n)})}var jp=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),Wp=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function rt(e){return e.onPageParityRead?.(),e.pageNumber%2===1}function $p(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 Vp(e,n){if($p(e,n)){let s=n.cellBox;if(!s)return null;let{x:d,width:c}=s;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 rt(n)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return rt(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,l=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:l,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 rt(n)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return rt(n)?{left:r,right:r,center:r}:{left:t,right:t,center:t};default:return null}}function Yp(e,n){if($p(e,n)){let s=n.cellBox;if(!s)return null;let{y:d,height:c}=s;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 rt(n)?{top:d,bottom:d+c,center:d+c/2}:{top:d+c,bottom:d+c,center:d+c};case "outsideMargin":return rt(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,l=n.contentHeight;switch(e){case "page":return {top:t,bottom:a,center:(t+a)/2};case "margin":return {top:i,bottom:l,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 rt(n)?{top:i,bottom:i,center:i}:{top:l,bottom:l,center:l};case "outsideMargin":return rt(n)?{top:a,bottom:a,center:a}:{top:t,bottom:t,center:t};default:return null}}function Kp(e){return e===null?0:Xt(e)}function xP(e,n,t){let r=rt(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 SP(e,n,t){let r=rt(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 PP(e,n,t,r,o){let a=Vp(e,o);if(!a)return null;let i=Kp(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 l=xP(n,r,o);if(l!==null)return l+i}return a.left+i}function wP(e,n,t,r,o){let a=Yp(e,o);if(!a)return null;let i=Kp(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 l=SP(n,r,o);if(l!==null)return l+i}return a.top+i}function sa(e){let n=e.contentBandHeight;return Object.freeze({x:-e.marginLeft,y:-e.contentInsetTop,width:e.pageWidth,height:n+e.contentInsetTop+e.contentInsetBottom})}function kd(e,n){let t=St(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=Xt(r.simplePosition.xEmu),h=Xt(r.simplePosition.yEmu);return Object.freeze(g===null||h===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:h-n.contentInsetTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let l=r.horizontal.relativeFrom,s=r.vertical.relativeFrom,d=Vp(l,n),c=Yp(s,n),u=d?.left??0,f=c?.top??0;if(!jp.has(l)||!Wp.has(s))return Object.freeze({x:0,y:0,horizontalFrame:jp.has(l)?l:a,verticalFrame:Wp.has(s)?s:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=PP(l,r.horizontal.align,r.horizontal.offsetEmu,t.width,n),m=wP(s,r.vertical.align,r.vertical.offsetEmu,t.height,n);return Object.freeze(p===null||m===null?{x:0,y:0,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:p,y:m,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function RP(e){let n=e.input.projection,t=n.anchor,r=St(n),o=oo({projection:n,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?Td(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}:{},paintBounds:a,hitBounds:i,geometry:e.clipRegion?Ei(o,e.clipRegion):o,resource:e.input.resource,accessibility:bb$1(n),...Gp(n)})}function Mn(e,n){if(e.kind!=="paragraph")return [];let t=[],r=o=>{if(o.kind==="drawing"){let a=n.projectionForAtom?.(o.id)??n.project(o);a?.kind==="anchored"&&t.push({atomId:o.id,projection:a});return}if(ab$1(o)){let a=n.projectionForAtom?.(o.id)??null;a?.kind==="anchored"&&t.push({atomId:o.id,projection:a});return}if("children"in o)for(let a of o.children)r(a);};for(let o of e.children)r(o);return Object.freeze(t)}function zn(e){let n=new Map;if(e.kind!=="paragraph")return n;let t=0,r=o=>{if(o.kind==="drawing"||ab$1(o)){n.set(o.id,t),t+=1;return}if(o.kind==="textValue"){t+=o.value.length;return}if("children"in o)for(let a of o.children)r(a);};for(let o of e.children){if(o.kind==="run"){for(let a of o.children)r(a);continue}if(o.kind==="hyperlink"){for(let a of o.children)if(a.kind==="run")for(let i of a.children)r(i);}}return n}function IP(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 l=n-o.range.start;return o.box.x+nt(o.text.slice(0,l),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+nt(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+nt(r.text,r.style,t):r.box.x+r.box.width:e.box.x}function vP(e,n){let t=e.range.start;for(let r of e.spans)r.range.end<=n&&(t=r.range.end);return t}function Od(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:Ni(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 ao(e){let n=Mn(e.paragraph,e.drawingLayout);if(n.length===0)return [];let t=zn(e.paragraph),r=[];for(let o of n){let a=o.projection;if(a.hidden)continue;let i=t.get(o.atomId);if(i===void 0||e.fragmentRange&&(i<e.fragmentRange.start||i>=e.fragmentRange.end))continue;let l=e.lines.find(h=>i>=h.range.start&&i<h.range.end);if(!l)continue;let s=a.anchor?.layoutInCell??true,c=a.position?.horizontal.relativeFrom==="character"?vP(l,i):i,u=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:l.box,anchorCharacterX:IP(l,c,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:s}),f=kd(a,u),m=s&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0?e.cellBox:sa(e.frameBase),g=RP({input:Object.freeze({drawingNodeId:o.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:a,resource:e.drawingLayout.resourceOf(a)}),anchorParagraphId:e.paragraphId,start:c,resolved:f,clipRegion:m,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(o.atomId)}:{},...a.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(a)}:{}});r.push(g);}return Object.freeze(r)}function Up(e){let n=St(e.input.projection),t=e.slotX+n.distL+n.effectL,r=oo({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=Td(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:Ei(r,o),resource:e.input.resource,accessibility:bb$1(e.input.projection),...Gp(e.input.projection)})}var TP=256,Ld=8,mr=8,io=class extends Error{name="DrawingExclusionConvergenceError";constructor(n="drawing exclusion reflow did not converge"){super(n);}};function kP(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 l=n.columnLefts[i],s=l+n.columnWidths[i];if(r>=l-.001&&r<s+.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 l=i*(a+o),s=l+a;if(r>=l-.001&&r<s+.001)return i}return t-1}function Bd(e){return e.behindDocument?"behind":"inFront"}function Zp(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function OP(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 CP(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function Md(e){let n=OP(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 Ap({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"?CP(e.projection.wrap):t.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Fd(e){if(e.mode==="topAndBottom"||e.mode==="square")return wd(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 BP(e){if(e.drawing.behindDocument||!Zp(e.drawing.wrap))return null;let n=e.yOverride??e.drawing.y,t=Md({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:Bd(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:n,verticalBand:Fd(t),input:t}):null}function qp(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 LP(e,n){let t=Bd(e),r=Bd(n);return t!==r?t==="behind"?-1:1:e.relativeHeight!==n.relativeHeight?e.relativeHeight-n.relativeHeight:qp(e,n)}function Jp(e){return Object.freeze([...e].sort(LP))}function Cd(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 Ed(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 Qp(e,n){let t=n.maxAttempts??TP,r=[...e].sort(qp),o=[],a=[],i=[];for(let l of r){if(l.allowOverlap){o.push(l);continue}let s=l,d=0;for(;d<t&&o.some(g=>Cd(g.paintBounds,s.paintBounds));){let p=o.find(g=>Cd(g.paintBounds,s.paintBounds)),m=p.paintBounds.y+p.paintBounds.height-s.paintBounds.y+.001;s=Ed(s,m),d+=1;}let c=o.some(f=>Cd(f.paintBounds,s.paintBounds)),u=s.paintBounds.y+s.paintBounds.height>n.pageBottom+.001;if(c||u){a.push(s),i.push(s.drawingNodeId);continue}o.push(s);}return Object.freeze({drawings:Object.freeze(o),deferred:Object.freeze(a),deferredNodeIds:Object.freeze(i)})}function lo(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 l=Np(e,a.input),s=[];for(let d of o)for(let c of l){let u=Math.max(d.start,c.start),f=Math.min(d.end,c.end);f>u+1e-6&&s.push(Object.freeze({start:u,end:f}));}if(o=s,o.length===0)break}return Object.freeze(o)}function em(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 MP(e,n){for(let t of n)if(t.end>e+1e-6)return t;return null}function Nd(e,n){let t=MP(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 FP(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 Ad(e,n){return Object.freeze({...e,layoutFallback:n})}function nm(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({...FP(i,-n,-t),contentLeft:r?.left,contentRight:r?.right??i.contentRight-n})})}))}function tm(e,n,t){return Object.freeze(e.filter(r=>{let o=t(r.anchorParagraphId);return o===void 0?r.sourceOrder<=n:o<=n}))}function rm(e){let n=Mn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=zn(e.paragraph),r=Math.max(1,e.contentRight-e.contentLeft),o=[];for(let a of n){if(a.projection.anchor?.behindDocument||!Zp(a.projection.wrap)||a.projection.wrap==="topAndBottom")continue;let i=t.get(a.atomId);if(i===void 0)continue;let l=e.anchorLineTopByModelStart.get(i);if(l===void 0)continue;let s=Object.freeze({x:e.contentLeft,y:l,width:r,height:14}),d=e.anchorCellBox!=null,c=kd(a.projection,{pageNumber:1,pageWidth:e.contentRight+e.contentLeft+r,pageHeight:792,marginLeft:e.contentLeft,marginRight:0,marginBottom:0,contentInsetTop:0,contentInsetBottom:0,contentWidth:r,contentHeight:648,contentBandHeight:648,paragraphBox:s,anchorLineBox:s,anchorCharacterX:e.contentLeft,columnBox:s,cellBox:d?e.anchorCellBox:null,layoutInCell:d,ownerPartName:e.drawingLayout.ownerPartName,storyKind:"body"}),u=e.paragraphStartY+l,f=St(a.projection),p=oo({projection:a.projection,anchorX:c.x,anchorY:u,extentWidth:f.width,extentHeight:f.height}),m=Md({projection:a.projection,geometry:p,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:c.x,anchorY:u});m&&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:0,y:u,verticalBand:Fd(m),input:m}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}function _i(e){let n=Mn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=zn(e.paragraph),r=[];for(let o of n){if(o.projection.anchor?.behindDocument||o.projection.wrap!=="topAndBottom")continue;let a=t.get(o.atomId);if(a===void 0)continue;let i=e.anchorLineTopByModelStart.get(a);if(i===void 0)continue;let l=e.paragraphStartY+i,s=St(o.projection),d=oo({projection:o.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:s.width,extentHeight:s.height}),c=Md({projection:o.projection,geometry:d,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.contentLeft,anchorY:l});c&&r.push(Object.freeze({drawingNodeId:o.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:a,sourceOrder:e.sourceOrderOf?.(o.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:o.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:o.projection.anchor?.relativeHeight??0,allowOverlap:o.projection.anchor?.allowOverlap??true,columnIndex:e.columnIndex??0,y:l,verticalBand:Fd(c),input:c}));}return r.sort((o,a)=>o.sourceOrder-a.sourceOrder),Object.freeze(r)}var EP=8;function NP(e,n,t,r){return e<r&&n>t}function Pt(e,n,t){if(n<=0||t.length===0)return 0;let r=0;for(let o=0;o<EP;o+=1){let a=e+r,i=a+n,l=a,s=false;for(let c of t){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;NP(a,i,u,f)&&(s=true,l=Math.max(l,f));}if(!s)break;let d=l-e;if(d<=r+.001)break;r=d;}return r}function AP(e){return e.map(n=>`${n.start.toFixed(3)}-${n.end.toFixed(3)}`).join(",")}function DP(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 ot(e){return e.length===0?"":e.map(n=>{let t=n.verticalBand,r=n.y+n.input.contentBounds.height/2,o=lo(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),DP(n.input),AP(o)].join("|")}).join(`
8
- `)}function Dd(e,n,t,r,o,a){let i=[];for(let l of e){let s=n.projectionForAtom?.(l.drawingNodeId);if(!s)continue;let d=l.sourceOrder??o?.(l.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?kP(l,a):0,u=BP({drawing:l,projection:s,sourceOrder:d,contentLeft:t,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((l,s)=>l.sourceOrder-s.sourceOrder),Object.freeze(i)}function da(e,n,t,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:t}),i=new Map;for(let l of e){let s=l.anchoredDrawings??[],d=Dd(s,n,0,t,r,a);d.length>0&&i.set(l.index,d);}return i}function Hi(e,n){if(e.size!==n.size)return false;for(let[t,r]of e){let o=n.get(t);if(!o||ot(r)!==ot(o))return false}return true}function zi(e){return e.size===0?"":[...e.entries()].sort(([n],[t])=>n-t).map(([n,t])=>`${n}:${ot(t)}`).join(`
9
- `)}var _P=.001;function Tn(e){return Ur(e)}var Wi=new Set(["-","\u2010","\u2013","\u2014"]);function om(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===" "||Wi.has(r)&&t>0&&e[t-1]!==" "&&t+1<e.length&&e[t+1]!==" "&&!Wi.has(e[t+1]))&&n.push(t+1);}return n[n.length-1]!==e.length&&n.push(e.length),n}function HP(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 l=o.text[i];if(l===`
10
- `||l===Xb$1)return false;if(l!==" "&&l!==" ")return true}}return false}function zP(e,n,t,r){let o=0,a=0,i=false;for(let l=n;l<e.length;l+=1){let s=e[l],d=l===n?t:0;for(let c=d;c<s.text.length;){let u=s.text[c];if(u===" "||u===`
11
- `||u===Xb$1)return {width:o,decimalOffset:i?a:o};let f=c+1,p=s.text.slice(c,f),m=r.measure(Wt(p,s.style),s.style);!i&&u==="."?i=true:i||(a+=m),o+=m,c=f;}}return {width:o,decimalOffset:i?a:o}}function jP(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}:{}}}function am(e,n,t,r=0){return (t.length>0?Pt(e,n.height,t):n.exclusionSkipBefore??0)+Math.max(0,n.height-n.trailingSpacing)+r}function WP(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}:{}})}var ji=31680;function ca(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let n=Number(e);return Number.isFinite(n)?n>ji?ji:n<-ji?-ji:n:null}function ua(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=ca(o),l=ca(a);i!==null&&(n=i/20),l!==null&&(t=l/20);}return {left:n,right:t}}function im(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 GP(e){return e.endsWith(" ")}function XP(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(nt(e.text.slice(0,o),e.style,n));return Object.freeze(r)}function so(e,n){return e.map(t=>t.caretEdges?t:{...t,caretEdges:XP(t,n)})}function Gi(e,n,t,r,o,a,i){if(e.length===0)return e;if(o==="left")return so(e,n);let l=e[e.length-1],s=l.text.replace(/\s+$/,""),d=s===l.text?0:l.box.width-nt(s,l.style,n),c=i??l.box.x-t+l.box.width-d,u=r-c;if(u<=0)return so(e,n);if(o==="both"){if(a)return so(e,n);let p=[];for(let b=1;b<e.length;b+=1)GP(e[b-1].text)&&p.push(b);if(p.length===0)return so(e,n);let m=u/p.length,g=new Set(p),h=0;return so(e.map((b,x)=>(g.has(x)&&(h+=m),h===0?b:{...b,box:{...b.box,x:b.box.x+h}})),n)}let f=o==="center"?u/2:u;return so(e.map(p=>({...p,box:{...p.box,x:p.box.x+f}})),n)}function Xi(e,n){return n===0||e.length===0?e:e.map(t=>Ai(t,n,0))}function $i(e,n,t,r,o,a,i,l=[],s=Xr,d,c,u){let f=i!==null&&a?a.get(i):void 0;if(f)return f;let p=u?.lineSpacing??Wr,m=u?.firstLineOffset??0,g=[],h=Bi(e,l,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??pn,g,u?.inlineDrawingLayout,u?.themeFonts,u?.projectFieldLink,u?.documentProperties,u?.bodyPageFields??false),b=Math.max(0,u?.startOffset??0),x=h.flatMap(E=>{if(E.end<=b)return [];if(E.start>=b)return [E];let S=b-E.start;return [{...E,text:E.projected?E.text:E.text.slice(S),start:b}]});if(x.length===0&&u?.suppressEmptyPlaceholderLine)return [];let k=E=>({...E.revisions===void 0?{}:{revisions:E.revisions},...E.fieldAtom===void 0?{}:{fieldAtom:E.fieldAtom}}),I=u?.markRunProperties??l,B=I.length===0?et:Fe(I,u?.themeFonts),F=t+r,P=u?.contentLeft??t,L=u?.contentRight??F,O=u?.contentOriginX??0,T=[],y={spans:[],start:b,end:b,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},D=false,G=new Map,ee=(()=>{let E=new Set;if(!u?.inlineDrawingLayout)return E;let S=zn(e);for(let W of Mn(e,u.inlineDrawingLayout)){if(W.projection.wrap!=="topAndBottom")continue;let $=S.get(W.atomId);$!==void 0&&E.add($);}return E})(),R=(()=>{let E=new Set;if(!u?.inlineDrawingLayout)return E;let S=zn(e);for(let W of Mn(e,u.inlineDrawingLayout)){if(W.projection.anchor?.behindDocument||W.projection.wrap==="topAndBottom"||W.projection.wrap==="inline"||W.projection.wrap==="behind"||W.projection.wrap==="inFront")continue;let $=S.get(W.atomId);$!==void 0&&E.add($);}return E})(),M=[...(u?.pageExclusionZones??[]).filter(E=>E.anchorParagraphId===n).map(E=>E.anchorModelStart),...ee,...R],_=(()=>{let E=new Map;if(M.length===0)return E;let S=0,W=0,$=0,K=()=>$===0?m:0,j=()=>Math.max(1,r-K()),Pe=ce=>{S=ce,W=0,$+=1;};for(let ce of x){if(ce.inlineDrawing){let we=St(ce.inlineDrawing.projection).totalWidth;W>0&&W+we>j()&&Pe(ce.start),M.includes(ce.start)&&E.set(ce.start,S),W+=we;continue}if(ce.text===`
12
- `||ce.text===Xb$1){Pe(ce.end);continue}let ze=0;for(let we of om(ce.text)){let on=ce.text.slice(ze,we);if(on.length===0)continue;let dn=ce.style,an=o.measure(on,dn),cn=ce.start+ze;W>0&&W+an>j()&&Pe(cn),M.includes(cn)&&E.set(cn,S),M.includes(ce.start)&&E.set(ce.start,S),W+=an,ze=we;}}for(let ce of M)E.has(ce)||E.set(ce,S);return E})();for(let E of R){let S=_.get(E);S!==void 0&&G.set(E,S);}let A=E=>{if(E.anchorParagraphId!==n)return true;let S=_.get(E.anchorModelStart);return S!==void 0&&y.start>=S||y.end>=E.anchorModelStart},v=()=>{let E=u?.pageExclusionZones?.filter($=>!(!A($)||$.anchorParagraphId===n&&($.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],S=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&G.size>0?rm({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:P,contentRight:L,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:G,anchorCellBox:u.anchorCellBox}):Object.freeze([]),W=u?.inlineDrawingLayout&&G.size>0?_i({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:P,contentRight:L,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:G}):Object.freeze([]);return Object.freeze([...E,...S,...W])},z=()=>T.length===0?m:0,C=()=>O+t+z(),U=()=>Math.max(1,r-z()),q=()=>T.reduce((E,S)=>E+S.height+(S.exclusionSkipBefore??0),0),Y=()=>(u?.paragraphStartY??0)+q(),H=E=>{ee.has(E)&&G.set(E,q());},X=()=>{if(D)return;let E=v();if(E.length===0||y.spans.length>0||y.drawings.length>0)return;let S=o.lineMetrics(B),W=Pt(Y(),y.height>0?y.height:S.height,E);W>.001&&(D=true,y.exclusionSkipBefore=W);},Z=()=>Y()+(y.exclusionSkipBefore??0)+.001,re=()=>{let E=v();if(E.length===0)return true;X();let S=lo(Z(),E,P,L),W=C()+y.width,$=Nd(W,S);return $?($.x>W+.001&&(y.width=$.x-C()),true):false},J=()=>{let E=U(),S=v();if(S.length===0)return E;if(X(),!re())return 0;let W=lo(Z(),S,P,L),$=C()+y.width,K=em($,W);return K<=.001?0:Math.min(E,y.width+K)},se=()=>Math.max(0,J()-y.width),be=()=>{let E=v();if(E.length===0||!E.some(j=>j.anchorParagraphId!==n||y.end>j.anchorModelStart))return false;let W=lo(Z(),E,P,L),$=C()+y.width,K=false;for(let j of W){if(!K){$>=j.start-1e-6&&$<j.end-1e-6&&(K=true);continue}if(j.end-j.start>.001)return y.width=j.start-C(),true}return false},fe=E=>{if(M.length===0||E<Math.min(...M))return;let S=v().filter(Pe=>Pe.anchorParagraphId===n&&E>=Pe.anchorModelStart);if(S.length===0)return;X();let W=lo(Z(),S,P,L),$=C()+y.width,K=-1;for(let Pe=0;Pe<W.length;Pe+=1){let ce=W[Pe];if($>=ce.start-.001&&$<ce.end-.001){K=Pe;break}}if(K>=0)return;let j=Nd($,W);j&&j.x>$+.001&&(y.width=j.x-C());},de=E=>{v().filter(W=>W.input.mode==="topAndBottom"&&W.anchorParagraphId===n&&E>=W.anchorModelStart).length!==0&&((y.spans.length>0||y.drawings.length>0)&&Ue(),X());},Ie=(E,S=0)=>S>64?se()>=E:(X(),re()?E<=se()+.001?true:y.spans.length>0||y.drawings.length>0?be()&&E<=se()+.001?true:(Ue(),Ie(E,S+1)):be()?Ie(E,S+1):true:y.spans.length>0||y.drawings.length>0?(Ue(),Ie(E,S+1)):true),Me=(E,S)=>g.filter(W=>W.start<S&&W.end>E).map(W=>({start:Math.max(W.start,E),end:Math.min(W.end,S)})),Ce=-1,Qe=0,yn=0,We="",Nn=(E,S)=>{let W=o.lineMetrics(E),$=Xp(W.baseline,y.height||W.height,S);return y.height===0?(y.height=$.lineHeight,y.baseline=$.baseline):($.lineHeight>y.height&&(y.height=$.lineHeight),y.baseline=Math.max(y.baseline,$.baseline)),{extentTopY:$.extentTopY}},$n=()=>{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 E=vd(y.drawings,y.baseline);y.drawings.splice(0,y.drawings.length,...E),y.baseline=Math.max(y.baseline,...y.drawings.map(S=>S.y+S.height));},Ke=()=>{if(y.drawings.length===0)return;let E=vd(y.drawings,y.baseline);y.drawings.splice(0,y.drawings.length,...E);},bn=E=>{let S=0;for(let W of y.spans)S=Math.max(S,o.lineMetrics(W.style).height);return S>0?S:E},_e=()=>{if(y.drawings.length===0)return;let E=Math.max(0,...y.drawings.map(S=>S.y+S.height+S.distB));y.height=Math.max(y.height,E);},On=()=>{$n(),_e();},qt=()=>{if(!(y.spans.length<2))for(let E=1;E<y.spans.length;E+=1){let S=y.spans[E-1],W=y.spans[E],$=W.box.x-(S.box.x+S.box.width);$<=.001||y.drawings.some(j=>j.start>=S.range.end&&j.start<W.range.start)||(y.spans[E]={...W,wrapAdvanceBefore:$});}},Ue=E=>{let S=o.lineMetrics(B),W=y.baseline;y.height===0?(y.height=S.height,y.baseline=S.baseline,W=S.baseline):E?.includeParagraphMark&&(y.height=Math.max(y.height,S.height)),On();let $=y.height,K=p.rule==="auto"&&y.drawings.length>0,j=K?bn(S.height):$,Pe=Vs(p,j,y.baseline);K||(y.baseline=Pe.baseline),y.leading=Math.max(0,y.baseline-W),y.height=Pe.height,Ke(),p.rule!=="exact"&&_e(),y.trailingSpacing=y.drawings.length===0&&p.rule!=="exact"?Math.max(0,Pe.height-$):0,(()=>{let we=v();if(we.length===0)return;let on=Pt(Y(),y.height,we);on>.001?y.exclusionSkipBefore=on:delete y.exclusionSkipBefore;})(),qt();let ze=Me(y.start,y.end);ze.length>0&&(y.deletedRanges=ze),T.push(y),Ce=-1,Qe=0,D=false,y={spans:[],drawings:[],start:y.end,end:y.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},X();},He=false;for(let E=0;E<x.length;E+=1){let S=x[E];if(S.breakKind==="column"){let K=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:C()+y.width,y:0,width:0,height:K.height},...S.link?{link:S.link}:{},...k(S)}),y.height=Math.max(y.height,K.height),y.baseline=Math.max(y.baseline,K.baseline),y.end=S.end,Ue(),T[T.length-1].columnBreakAfter=true,He=true;continue}if(S.projected&&!S.inlineDrawing&&S.text==="\uFFFC"){H(S.start),y.end=S.end;continue}if(S.inlineDrawing){H(S.start);let K=St(S.inlineDrawing.projection),j=K.totalWidth;if((y.spans.length>0||y.drawings.length>0)&&y.width+j>J()&&Ue(),!Ie(j))continue;let{extentTopY:ce}=Nn(S.style,K),ze=C()+y.width;y.drawings.push(Up({input:S.inlineDrawing,paragraphId:n,start:S.start,slotX:ze,y:ce,baseline:y.baseline,contentLeft:P,contentRight:L})),y.width+=j,y.end=S.end,Ce=-1,We="";continue}if(S.text===Xb$1){let K=o.lineMetrics(S.style);y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:Xb$1,props:S.props,style:S.style,box:{x:C()+y.width,y:0,width:0,height:K.height},...S.link?{link:S.link}:{},...k(S)}),y.height=Math.max(y.height,K.height),y.baseline=Math.max(y.baseline,K.baseline),y.end=S.end,Ue(),T[T.length-1].pageBreakAfter=true,He=false;continue}if(S.text===`
13
- `){let K=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:C()+y.width,y:0,width:0,height:K.height},...S.link?{link:S.link}:{},...k(S)}),y.height=Math.max(y.height,K.height),y.baseline=Math.max(y.baseline,K.baseline),y.end=S.end,Ue(),He=true;continue}He=false,de(S.start),M.length>0&&S.start>=Math.min(...M)&&fe(S.start);let W=o.lineMetrics(S.style),$=0;for(let K of om(S.text)){let j=S.text.slice($,K);if(j.length===0)continue;let Pe=!!S.projected||!!S.positionalTab||S.end-S.start!==S.text.length,ce=Pe?{paragraphId:n,start:S.start,end:S.end}:{paragraphId:n,start:S.start+$,end:S.start+K};if(j===" "){(y.spans.length>0||y.drawings.length>0)&&y.width>=J()&&HP(x,E,K)&&Ue();let en=C()+y.width,Ge=zP(x,E,K,o),Ee=S.positionalTab?jP(S.positionalTab,t,F,u?.marginExtent):null,xe=Ee===null?$r(s,en,F):Ee.positionPt>en?Ee:{...$r(s,en,F),...Ee.leader?{leader:Ee.leader}:{}},Ot=td(xe.alignment,en,xe.positionPt,Ge.width,Ge.decimalOffset);y.spans.push({range:ce,text:" ",props:S.props,style:S.style,box:{x:en,y:0,width:Ot,height:W.height},...xe.leader?{tabLeader:xe.leader,tabLeaderAdvancePt:o.measure(Js.get(xe.leader)??".",S.style)}:{},...S.link?{link:S.link}:{},...xe.leader?{tabLeader:xe.leader}:{},...Pe&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...k(S)}),y.width+=Ot,y.height=Math.max(y.height,W.height),y.baseline=Math.max(y.baseline,W.baseline),y.end=Pe?S.end:S.start+K,We=" ",$=K;continue}let ze=S.measureText??j,we=o.measure(Wt(ze,S.style),S.style),on=$>0||We===""||/[\s\u00a0]$/.test(We)||/^[\s\u00a0]/.test(j)||Wi.has(We[We.length-1])&&!Wi.has(j[0]);if(on&&(Ce=y.spans.length,Qe=y.width,yn=y.end),fe(S.start+$),y.width+we>J()+_P&&(y.spans.length>0||y.drawings.length>0))if(on||Ce<=0){if(!(be()&&y.width+we<=J()+.001)){if(Ue(),!Ie(we))continue}}else {let en=y.spans.splice(Ce);y.width=Qe,y.end=yn,y.height=0,y.baseline=0;for(let Ge of y.spans){let Ee=o.lineMetrics(Ge.style);y.height=Math.max(y.height,Ee.height),y.baseline=Math.max(y.baseline,Ee.baseline);}Ue();for(let Ge of en){let Ee=o.lineMetrics(Ge.style);y.spans.push({...Ge,box:{...Ge.box,x:C()+y.width}}),y.width+=Ge.box.width,y.height=Math.max(y.height,Ee.height),y.baseline=Math.max(y.baseline,Ee.baseline),y.end=Ge.range.end;}Ce=0,Qe=0;}else if(y.spans.length===0&&y.drawings.length===0&&we>J()+.001&&!Ie(we))continue;let dn=j,an=S.start+$,cn=we;if(!Pe&&S.measureText===void 0)for(;y.spans.length===0&&dn.length>1&&cn>J();){let en=1,Ge=dn.length-1,Ee=1;for(;en<=Ge;){let at=en+Ge>>1;o.measure(Wt(dn.slice(0,at),S.style),S.style)<=J()?(Ee=at,en=at+1):Ge=at-1;}let xe=dn.slice(0,Ee),Ot=o.measure(Wt(xe,S.style),S.style);y.spans.push({range:{paragraphId:n,start:an,end:an+Ee},text:xe,props:S.props,style:S.style,box:{x:C()+y.width,y:0,width:Ot,height:W.height},...S.link?{link:S.link}:{},...S.noteNav?{noteNav:S.noteNav}:{},...k(S)}),y.width+=Ot,y.height=Math.max(y.height,W.height),y.baseline=Math.max(y.baseline,W.baseline),y.end=an+Ee,Ue(),dn=dn.slice(Ee),an+=Ee,cn=o.measure(Wt(dn,S.style),S.style);}y.spans.push({range:Pe?ce:{paragraphId:n,start:an,end:S.start+K},text:dn,props:S.props,style:S.style,box:{x:C()+y.width,y:0,width:cn,height:W.height},...S.link?{link:S.link}:{},...Pe&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...k(S)}),y.width+=cn,y.height=Math.max(y.height,W.height),y.baseline=Math.max(y.baseline,W.baseline),y.end=Pe?S.end:S.start+K,We=j,$=K;}}return (y.spans.length>0||y.drawings.length>0||T.length===0||He)&&Ue({includeParagraphMark:true}),i!==null&&a&&a.set(i,T.map(WP)),T}var Yi=32,sm=4096,$P=128,VP=/[\u0000-\u001F\u007F-\u009F]/,YP={major:null,minor:null};function gr(e){return e.kind!=="textValue"}function fa(e,n){return e.attributes.find(t=>t.localName===n)?.value}function pa(e,n){for(let t of e.children)if(gr(t)&&t.localName===n)return t}function co(e){return !(e===void 0||e.length===0||e.length>$P||VP.test(e)||S(e))}function KP(e){return e==="1"||e==="true"||e==="on"}function Vi(e){return e.map(n=>n.attributes?{n:n.localName,a:n.attributes}:{n:n.localName})}function ga(e){if(e){for(let n of e.children)if(gr(n)&&(n.kind==="runProperties"||n.localName==="rPr"))return n}}function Ki(e){if(e){for(let n of e.children)if(gr(n)&&(n.kind==="paragraphProperties"||n.localName==="pPr"))return n}}var lm=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function uo(e){return e.some(n=>lm.has(n.localName))?e.filter(n=>!lm.has(n.localName)):e}function UP(e){let n=pa(e,"docDefaults");if(!n)return {run:[],paragraph:[],paragraphNode:void 0};let t=pa(n,"rPrDefault"),r=pa(n,"pPrDefault"),o=ga(t),a=Ki(r);return {run:uo(Tn(o)),paragraph:uo(Tn(a)),paragraphNode:a}}function ZP(e){let n=fa(e,"styleId");if(!co(n))return null;let t=fa(e,"type")??"",r=(()=>{let d=pa(e,"basedOn");return d?fa(d,"val"):void 0})(),o=co(r)?r:null,a=Ki(e),i=ga(e),l=new Map,s=0;for(let d of e.children){if(d.kind==="textValue"||d.localName!=="tblStylePr")continue;if(s>=qP)break;s+=1;let c=fa(d,"type");c&&!l.has(c)&&l.set(c,d);}return {styleId:n,type:t,basedOn:o,isDefault:KP(fa(e,"default")),paragraphProperties:uo(Tn(a)),runProperties:uo(Tn(i)),paragraphPropertiesNode:a,tablePropertiesNode:pa(e,"tblPr"),conditionalTableFormats:l}}var qP=32,ma=Object.freeze({tablePropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function dm(e,n){if(!n||!co(n))return ma;let t=zd(e,n,"table");if(t.length===0)return ma;let r=[],o=[],a=[],i=[],l=new Map;for(let s of t){s.tablePropertiesNode&&r.push(s.tablePropertiesNode),s.paragraphPropertiesNode&&o.push(s.paragraphPropertiesNode),a.push(...s.paragraphProperties),i.push(...s.runProperties);for(let[d,c]of s.conditionalTableFormats)l.set(d,c);}return {tablePropertyNodes:r,paragraphPropertyNodes:o,paragraphProperties:a,runProperties:i,conditional:l}}var _d=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function cm(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 l=Ki(i);l&&(t.push(l),r.push(...uo(Tn(l))));let s=ga(i);s&&o.push(...uo(Tn(s)));}return t.length===0&&r.length===0&&o.length===0?_d:{paragraphProperties:r,paragraphPropertyNodes:t,runProperties:o}}function JP(e,n=YP){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=UP(e),o=null,a=null,i=0;for(let s of e.children){if(!gr(s)||s.localName!=="style")continue;if(i>=sm)break;i+=1;let d=ZP(s);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:Vi(r.run),dP:Vi(r.paragraph),defP:o,defC:a,theme:n,styles:[...t.values()].map(s=>({id:s.styleId,type:s.type,basedOn:s.basedOn,p:Vi(s.paragraphProperties),r:Vi(s.runProperties)}))}),docDefaultsRun:r.run,docDefaultsParagraph:r.paragraph,docDefaultsParagraphNode:r.paragraphNode,defaultParagraphStyleId:o,defaultCharacterStyleId:a,themeFonts:n,styles:t}}function Hd(e,n){let t=null;for(let r of e){if(r.localName!==n)continue;let o=r.attributes?.val;t=co(o)?o:null;}return t}function zd(e,n,t){let r=e.styles.get(n);if(!r||r.type!==t)return [];let o=[],a=new Set,i=n,l=0;for(;i!==null&&l<Yi&&!(a.has(i)||!co(i));){a.add(i);let s=e.styles.get(i);if(!s)break;o.push(s),i=s.basedOn,l+=1;}return o.reverse()}function fo(e,n,t){let r=Tn(n),o=Hd(r,"pStyle")??e.defaultParagraphStyleId,a=o?zd(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...t?.paragraphProperties??[],...a.flatMap(p=>p.paragraphProperties)],l=[...i,...r],s=[];e.docDefaultsParagraphNode&&s.push(e.docDefaultsParagraphNode),t&&s.push(...t.paragraphPropertyNodes);for(let p of a)p.paragraphPropertiesNode&&s.push(p.paragraphPropertiesNode);n&&s.push(n);let d=ga(n&&gr(n)?n:void 0),c=Tn(d),u=[...e.docDefaultsRun,...t?.runProperties??[],...a.flatMap(p=>p.runProperties)],f=c.length===0?u:[...u,...c];return {paragraphProperties:l,inheritedParagraphProperties:i,paragraphPropertyNodes:s,runProperties:u,markRunProperties:f,styleId:o??null}}function um(e){let n;for(let t of e){if(!t||t.kind==="textValue")continue;let r=false;for(let o of t.children)if(gr(o)&&o.localName==="pBdr"){r=true;break}r&&(n=pt(t).bottom);}return n}function wt(e,n,t){let r=[];if(t){let a=Hd(n,"rStyle")??t.defaultCharacterStyleId;a&&(r=zd(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 ha(e,n,t,r,o,a=false){let i=Ki(e),l=t?fo(t,i,o):null,s=l?[...l.paragraphProperties]:Tn(i),d=Tn(ga(i&&gr(i)?i:void 0)),c=l?l.runProperties:[],u=l?l.markRunProperties:d,f=ua(s),p=0,m=0;if(r)p=r.indent.hanging,m=r.indent.firstLine;else for(let b of s){if(b.localName!=="ind")continue;let x=ca(b.attributes?.hanging),k=ca(b.attributes?.firstLine);(b.attributes?.hanging!==void 0||b.attributes?.firstLine!==void 0)&&(p=x!==null?Math.max(0,x)/20:0,m=k!==null?k/20: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},h=l?ed(l.paragraphPropertyNodes):nd(i);return {props:s,indent:g,available:Math.max(1,n-g.left-g.right),alignment:im(s),spacing:Xs(s,{inList:r!==void 0,inTableCell:a}),lineSpacing:$s(s),contextualSpacing:Ys(s),styleId:l?l.styleId:Hd(s,"pStyle")??null,bottomBorder:l?um(l.paragraphPropertyNodes):pt(i).bottom,borders:l?Xo(l.paragraphPropertyNodes):pt(i),shading:qs(s),inheritedRunProperties:c,markRunProperties:u,tabStops:h,tabStopsCacheToken:sr(h),...r?{listItem:r}:{}}}var fm=new WeakMap;function QP(e){let n=fm.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 fm.set(e,r),r}function pm(e,n){return !n||!QP(n)?pt(e):Xo(fo(n,e).paragraphPropertyNodes)}var e0=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function jd(e){let n=e?.val;return n!=="0"&&n!=="false"&&n!=="off"}function mm(e){let n=false,t=false,r=true;for(let o of e)switch(o.localName){case "keepNext":n=jd(o.attributes);break;case "keepLines":t=jd(o.attributes);break;case "widowControl":r=jd(o.attributes);break;}return !n&&!t&&r?e0:{keepNext:n,keepLines:t,widowControl:r}}function gm(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 hm(e,n,t,r){let o=0,a=t;for(let i=n;i-n<8;i+=1){let l=e[i];if(!l||l.kind!=="paragraph"||!l.spacing||!l.keeps)return null;o+=Math.max(l.spacing.before,a)-a;let s=r(i);if(!l.keeps.keepNext||i+1>=e.length)return o+=s[0]??0,l.keeps.widowControl&&s.length>1&&(o+=s[1]),o;for(let d of s)o+=d;o+=l.spacing.after,a=l.spacing.after;}return null}function ym(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 bm(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}var n0=Qr;function jn(e,n){if(e.kind!=="textValue"){for(let t of e.children)if(t.kind!=="textValue"&&t.namespaceUri===ma$1&&t.localName===n)return t}}function xm(e){if(e.kind==="textValue")return false;let n=jn(e,"paragraphProperties")??jn(e,"pPr");if(!n)return false;let t=jn(n,"runProperties")??jn(n,"rPr");return t===void 0?false:jn(t,"del")!==void 0||jn(t,"moveFrom")!==void 0}function Sm(e,n){if(e.kind==="textValue"||n>n0)return true;let t=(r,o)=>{for(let a of r){if(a.kind==="textValue")continue;if(a.kind==="run"){for(let l of a.children){if(l.kind==="text"){for(let s of l.children)if(s.kind==="textValue"&&s.value.length>0)return false;continue}if(l.kind!=="runProperties")return false}continue}if(Lb$1(a)){if(o>=Kb$1)continue;let l=Nb$1(a);if(l&&!t(l,o+1))return false;continue}if((a.kind==="hyperlink"||a.kind==="revisionInsert"||a.kind==="revisionMoveTo")&&!Sm(a,o+1))return false}return true};return t(e.children,n)}function Pm(e,n){if(n==="all-markup"||e.kind==="textValue")return false;let t=jn(e,"paragraphProperties")??jn(e,"pPr");if(!t)return false;let r=jn(t,"runProperties")??jn(t,"rPr");return r===void 0?false:(n==="proposed"?["del","moveFrom"]:["ins","moveTo"]).some(a=>jn(r,a)!==void 0)}function Wd(e,n="proposed"){return e.kind!=="paragraph"||n!=="proposed"||!xm(e)?false:Sm(e,0)}function t0(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 r0(e,n){return !(e.kind==="paragraph"&&Wd(e,n))}var Tm=new WeakMap;function Ui(e){return Tm.get(e)??null}function km(e,n){let t=n.children.filter(a=>wm(a)),r=e.flatMap(a=>a.children.filter(i=>!wm(i))),o={...n,children:[...t,...r]};return Tm.set(o,{merged:o,members:e}),o}function wm(e){return e.kind!=="textValue"&&(e.kind==="paragraphProperties"||e.localName==="pPr")}function o0(e,n){if(n==="all-markup")return e.map(i=>i.block);let t=[],r=[],o=null,a=()=>{t.push(...Rm(r)),r=[],o=null;};for(let{block:i,parentKey:l}of e){if(r.length>0&&l!==o&&a(),i.kind!=="paragraph"){a(),t.push(i);continue}let s=Pm(i,n);if((s||r.length>0)&&!i0(i,n)){a(),t.push(i);continue}if(s){r.push(i),o=l;continue}if(r.length===0){t.push(i);continue}let d=[...r,i];r=[],o=null,t.push(km(d,i));}return t.push(...Rm(r)),t}function Rm(e){if(e.length<2)return e;let n=e[e.length-1];return [km(e,n)]}function ya(e,n){return o0(a0(e),n).filter(r=>r0(r,n))}function a0(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 Im=new WeakMap;function i0(e,n){let t=Im.get(e),r=t?.get(n);if(r!==void 0)return r;let o=l0(e,n);return t?t.set(n,o):Im.set(e,new Map([[n,o]])),o}function l0(e,n){if(!s0(e))return false;let t=Bi(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<=Sd$1(e).length}function s0(e){let n=0,t=false,r=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===ma$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 vm=He(16);function Rt(e,n="all-markup"){let t=vm.get(e),r=t?.[n];if(r)return r;let o=t0(e),a=o?ya(o.children,n):[];return t?t[n]=a:vm.set(e,{[n]:a}),a}function Zi(e,n="all-markup"){return e.kind!=="note"?[]:ya(e.children,n)}function Om(e,n="all-markup"){return e.kind==="textValue"?[]:ya(e.children,n)}var d0={state:"none"},Cm=(e,n)=>n.state==="omitted"?e:n;function qi(e,n,t={}){return e.state==="omitted"?n:e.state==="none"?d0:e}function Gd(e,n){let t=Cm;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 Xd(e,n){let t=Cm;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 Ji(e=1048576){let n=e|0;return {intervalsRemaining:n>0?n:0}}function Bm(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]=c0(e[i],o,t,r);}return a}function c0(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,l=o[0].x,s=[],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>l&&i&&(!r||r.intervalsRemaining>0)){let u=s[s.length-1];u&&u.end===l&&u.cellIndex===i.cellIndex&&u.cell===i.cell?s[s.length-1]={start:u.start,end:c.x,cell:u.cell,cellIndex:u.cellIndex}:(s.push({start:l,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(),l=c.x;}return s}function u0(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 $d(e,n,t,r){r&&(r.columnLookups+=1);let o=e[n];if(!o||t<0)return;let a=u0(o,t)-1;if(a<0)return;let i=o[a];if(!(t>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var Em=256,$e={state:"omitted"},ol={state:"none"},Nm={top:$e,left:$e,bottom:$e,right:$e,insideH:$e,insideV:$e},Am={top:$e,left:$e,bottom:$e,right:$e},Lm={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},p0=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 po(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Vd(e,n){return e.attributes.find(t=>t.localName===n)?.value}function m0(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function g0(e){if(e===null)return .5;let n=e/8;return !Number.isFinite(n)||n<=0?.5:n>Go?Go:n}function al(e){if(!e)return $e;let n=Vd(e,"val");if(!n)return $e;if(n==="nil"||n==="none")return ol;let t=p0.get(n)??"single",r=Vd(e,"color"),o=r===void 0||r==="auto"?null:di(r)??null;return {state:"edge",style:t,color:o,widthPt:g0(m0(Vd(e,"sz")))}}function Dm(e,n){if(!e)return Am;let t={top:$e,left:$e,bottom:$e,right:$e};for(let r of n){let o=r==="left"?"start":r==="right"?"end":void 0,a=po(e,r)??(o?po(e,o):void 0);t[r]=al(a);}return t}function il(e){let n=e&&po(e,"tblBorders");return n?{...Dm(n,["top","left","bottom","right"]),insideH:al(po(n,"insideH")),insideV:al(po(n,"insideV"))}:Nm}function ll(e){return Dm(e&&po(e,"tcBorders"),["top","left","bottom","right"])}function Yd(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function Mm(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 _m(e,n,t=true){if(e.state==="omitted")return n.state==="omitted"?$e:n;if(n.state==="omitted")return e;if(e.state==="none")return n.state==="none"?ol:n;if(n.state==="none")return e;let r=Yd(e),o=Yd(n);if(r>o)return e;if(o>r)return n;let a=Lm[e.style],i=Lm[n.style];if(a!==i)return a>i?e:n;let l=Mm(e.color),s=Mm(n.color);return l<s?e:s<l?n:t?e:n}function Qi(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 y0(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 el(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&&y0(t.edge,o.edge)?t={...t,gridEnd:o.gridEnd}:(n.push(t),t={...o});}return n.push(t),n}function nl(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 Fm(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 b0(e){if(!(!e||e.style!=="double"))return zr(e.widthPt)}function tl(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function x0(e,n){return n?e==="outer"?n.insetPt:n.insetPt+n.strokePt+n.gapPt:0}function S0(e,n,t){return t?e==="outer"?n-t.insetPt:n-t.insetPt-t.strokePt-t.gapPt:n}function P0(e,n){return n?e==="outer"?n.insetPt+n.strokePt:n.insetPt+n.extentPt:0}function w0(e,n,t){return t?e==="outer"?n-t.insetPt-t.strokePt:n-t.insetPt-t.extentPt:n}function $t(e,n){e.length>=Em||!(n.width>0)||!(n.height>0)||e.push(n);}function R0(e,n,t,r,o,a,i,l,s,d,c){let u=zr(t.widthPt),{strokePt:f,gapPt:p,extentPt:m,insetPt:g}=u,h=Math.abs(r)<1e-6,b=Math.abs(o-a)<1e-6,x=Math.abs(r)<1e-6,k=Math.abs(o-i)<1e-6;if(n==="top"||n==="bottom"){let F=n==="top"?g:i-g-f,P=n==="top"?g+f+p:i-g-m;for(let L of ["outer","inner"]){let O=r,T=o;h&&(O=x0(L,l)),b&&(T=S0(L,a,s)),$t(e,{side:n,role:L,color:t.color,cssStyle:"solid",x:O,y:L==="outer"?F:P,width:T-O,height:f});}return}let I=n==="left"?g:a-g-f,B=n==="left"?g+f+p:a-g-m;for(let F of ["outer","inner"]){let P=r,L=o;x&&(P=P0(F,d)),k&&(L=w0(F,i,c)),$t(e,{side:n,role:F,color:t.color,cssStyle:"solid",x:F==="outer"?I:B,y:P,width:f,height:L-P});}}function I0(e,n,t,r,o,a,i){let l=t.widthPt,s=Math.max(1,l),d=l*3+s*2;if(n==="top"||n==="bottom"){let u=n==="top"?0:i-d;for(let f=0;f<3;f+=1)$t(e,{side:n,role:f===0?"outer":f===1?"middle":"inner",color:t.color,cssStyle:"solid",x:r,y:u+f*(l+s),width:o-r,height:l});return}let c=n==="left"?0:a-d;for(let u=0;u<3;u+=1)$t(e,{side:n,role:u===0?"outer":u===1?"middle":"inner",color:t.color,cssStyle:"solid",x:c+u*(l+s),y:r,width:l,height:o-r});}function v0(e,n,t,r,o,a,i){let l=t.widthPt;n==="top"?$t(e,{side:n,role:"edge",color:t.color,cssStyle:tl(t.style),x:r,y:0,width:o-r,height:l}):n==="bottom"?$t(e,{side:n,role:"edge",color:t.color,cssStyle:tl(t.style),x:r,y:i-l,width:o-r,height:l}):n==="left"?$t(e,{side:n,role:"edge",color:t.color,cssStyle:tl(t.style),x:0,y:r,width:l,height:o-r}):$t(e,{side:n,role:"edge",color:t.color,cssStyle:tl(t.style),x:a-l,y:r,width:l,height:o-r});}function rl(e,n){if(e.length===0)return;let t=e[0];return b0(t.edge)}function T0(e,n,t,r,o,a,i,l,s,d){let c=(D,G,ee)=>{let R=[];for(let M of G){if(!M.edge)continue;let _,A;ee?(_=Fm(i,l,M.gridStart),A=Fm(i,l,M.gridEnd)):(_=s[M.gridStart-d]??0,A=s[M.gridEnd-d]??a),R.push({side:D,gridStart:M.gridStart,gridEnd:M.gridEnd,startPt:_,endPt:A,edge:M.edge});}return R},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],h=rl(n),b=rl(r),x=rl(e),k=rl(t),I=(D,G)=>D.length===1&&Math.abs(D[0].startPt)<1e-6&&Math.abs(D[0].endPt-G)<1e-6,B=I(u,o),F=I(f,a),P=I(p,o),L=I(m,a),O=[],T=(D,G,ee)=>{for(let R of G){let{edge:M,startPt:_,endPt:A}=R;M.style==="double"?R0(O,D,M,_,A,o,a,D==="top"||D==="bottom"?h:void 0,D==="top"||D==="bottom"?b:void 0,D==="left"||D==="right"?x:void 0,D==="left"||D==="right"?k:void 0):M.style==="triple"?I0(O,D,M,_,A,o,a):ee||v0(O,D,M,_,A,o,a);}};T("top",u,B),T("left",f,F),T("bottom",p,P),T("right",m,L);let y={};return B&&u[0]&&(y.top=u[0].edge),F&&f[0]&&(y.left=f[0].edge),P&&p[0]&&(y.bottom=p[0].edge),L&&m[0]&&(y.right=m[0].edge),g.length>0&&(y.edgeSegments=g),O.length>0&&(y.strokes=O),y}function Kd(e,n,t,r,o,a){let i=e.length,l=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let s=Bm(e,t,o,a),d=(u,f,p)=>qi(u.borders[f],h0(n,f,p),{}),c=(u,f,p,m)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?ol:_m(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){l[u][p]={};continue}let g=m.mergeRowSpan??1,h=u+g-1,b=u===0,x=h===i-1,k=m.gridColumn===0,I=m.gridColumn+m.gridSpan-1,B=I>=t-1,F=[];if(b)for(let _=m.gridColumn;_<=I;_+=1)F.push({gridStart:_,gridEnd:_+1,edge:Qi(d(m,"top",false))});let P=[];if(k)for(let _=u;_<=h;_+=1)P.push({gridStart:_,gridEnd:_+1,edge:Qi(d(m,"left",false))});let L=[];for(let _=m.gridColumn;_<=I;_+=1){let A;if(x)A=d(m,"bottom",false);else {let v=$d(s,h+1,_,o);v?.cell.vMergeContinue?A=$e:A=c(m.borders.bottom,v?v.cell.borders.top:$e,d(m,"bottom",true),v?d(v.cell,"top",true):n.insideH);}L.push({gridStart:_,gridEnd:_+1,edge:Qi(A)});}let O=[];for(let _=u;_<=h;_+=1){let A;if(B)A=d(m,"right",false);else {let v=$d(s,_,I+1,o);A=c(m.borders.right,v?v.cell.borders.left:$e,d(m,"right",true),v?d(v.cell,"left",true):n.insideV);}O.push({gridStart:_,gridEnd:_+1,edge:Qi(A)});}let T=el(F),y=el(P),D=el(L),G=el(O);if(!r){let _={},A=nl(T,m.gridColumn,I+1),v=nl(y,u,h+1),z=nl(D,m.gridColumn,I+1),C=nl(G,u,h+1);A&&(_.top=A),v&&(_.left=v),z&&(_.bottom=z),C&&(_.right=C);let U=[],q=(Y,H)=>{for(let X of H)X.edge&&U.push({side:Y,gridStart:X.gridStart,gridEnd:X.gridEnd,startPt:X.gridStart,endPt:X.gridEnd,edge:X.edge});};q("top",T),q("left",y),q("bottom",D),q("right",G),U.length>0&&(_.edgeSegments=U),l[u][p]=_;continue}let ee=r.cellBoxes[u][p],R=[0],M=0;for(let _=u;_<=h;_+=1){let A=r.rowBands[_];M+=A.height,R.push(M);}R.length>1&&(R[R.length-1]=ee.height),l[u][p]=T0(T,y,D,G,ee.width,ee.height,r.columnWidthsPt,m.gridColumn,R,u);}}return l}function hr(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var Ud=Nm,Zd=Am;var zm=31680/20,Wn=Object.freeze({type:"auto",value:0}),k0=100,O0=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function C0(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Jd(e,n){return e.attributes.find(t=>t.localName===n)?.value}function jm(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])*O0[t[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function yr(e){if(!e)return Wn;let n=Jd(e,"type");if(n!==void 0&&n!=="pct"&&n!=="dxa")return n==="nil"?{type:"nil",value:0}:Wn;let t=Jd(e,"w");if(t===void 0)return Wn;let r=jm(t);if(!r)return Wn;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?Wn:{type:"pct",value:Math.min(a,k0)}}return !Number.isFinite(r.pt)||r.pt<=0?Wn:{type:"dxa",value:Math.min(r.pt,zm)}}function ba(e,n){if(!e)return;let t=yr(e);if(t.type==="dxa")return Math.min(t.value,n)}function Wm(e){let n=C0(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 B0(e){let n=[];for(let t of e){let r=Jd(t,"w"),o=r===void 0?null:jm(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){n.push(void 0);continue}n.push(o.pt>zm?void 0:o.pt);}return n}var qd=1,Hm=.001;function L0(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,l)=>i.span-l.span);for(let i of a){let l=Math.min(i.start+i.span,t);if(l<=i.start)continue;let s=i.preferred.type==="pct"?r*i.preferred.value/100:i.preferred.value;if(!Number.isFinite(s)||s<=0)continue;if(l-i.start===1){let f=o[i.start];o[i.start]=f===void 0?s:Math.max(f,s);continue}let d=[],c=s;for(let f=i.start;f<l;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 Gm(e){let{columnCount:n,tableWidth:t}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:qd,a=t.type==="dxa"?t.value:t.type==="pct"?o*t.value/100:0,i=B0(e.gridCols),l=L0(i,e.claims,n,a),s=0,d=0;for(let b of l)b===void 0?d+=1:s+=b;let c=[];if(d>0){let b=s>0?s/Math.max(n-d,1):o/n,x=Math.max(o-s,0)/d,k=Math.max(Math.min(x,b),qd);for(let I of l)c.push(I??k);}else for(let b of l)c.push(b);let u=c.reduce((b,x)=>b+x,0);if(!Number.isFinite(u)||u<=0)return new Array(n).fill(o/n);let f=n*qd,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+Hm&&!g||Math.abs(u-m)<=Hm)return c;let h=m/u;return c.map(b=>b*h)}var cl=16,Sa=3,dl=31680/20,rg=31680/20,Xm=1023,M0=256,$m=31680/20;function Vm(e){let n=e&&me(e,"jc");if(!n)return;let t=Ae(n,"val");if(t==="center")return "center";if(t==="right"||t==="end")return "right";if(t==="left"||t==="start")return "left"}var Ym=31680/20,og={top:Sa,right:Sa,bottom:Sa,left:Sa};function me(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Ae(e,n){return e.attributes.find(t=>t.localName===n)?.value}function F0(e){let n=e&&me(e,"gridSpan"),t=n&&Ae(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 Km(e,n){let t=e&&me(e,n),r=t&&Ae(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 E0(e){let n=e&&me(e,"vMerge");return n?Ae(n,"val")!=="restart":false}function N0(e){let n=e&&me(e,"vAlign"),t=n&&Ae(n,"val");return t==="center"?"center":t==="bottom"?"bottom":"top"}function Um(e){return Zs(e&&me(e,"shd"))}function Zm(e,n){let t=e&&me(e,n);if(!t)return false;let r=Ae(t,"val");return r===void 0||r!=="0"&&r!=="false"&&r!=="off"}var xa=Object.freeze({rule:"auto"});function A0(e){let n=e&&me(e,"trHeight");if(!n)return xa;let t=Ae(n,"hRule"),r=t==="auto"||t==="exact"||t==="atLeast"?t:void 0;if(r==="auto")return xa;let o=Ae(n,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return xa;let a=Number(o);if(!Number.isFinite(a)||a<=0)return xa;let i=Math.min(a/20,rg);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:xa}function sl(e){if(!e)return;let n=Ae(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>dl?dl:r}function Qd(e){if(!e)return {};let n=sl(me(e,"top")),t=sl(me(e,"left")??me(e,"start")),r=sl(me(e,"bottom")),o=sl(me(e,"right")??me(e,"end"));return {...n===void 0?{}:{top:n},...t===void 0?{}:{left:t},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function ec(e,n){return {top:n.top??e.top,right:n.right??e.right,bottom:n.bottom??e.bottom,left:n.left??e.left}}function Pa(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 qm(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function Jm(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(-Ym,Math.min(Ym,t))}function Qm(e){let n=e&&me(e,"tblpPr");if(!n)return;let t=Ae(n,"tblpXSpec"),r=t==="left"||t==="center"||t==="right"||t==="inside"||t==="outside"?t:void 0,o=Ae(n,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:qm(Ae(n,"horzAnchor"))??"text",vertAnchor:qm(Ae(n,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:Jm(Ae(n,"tblpX"))??0,...a?{ySpec:a}:{},yPt:Jm(Ae(n,"tblpY"))??0}}function ag(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 D0=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function It(e,n){let t=Ae(e,n);if(t!==void 0)return t!=="0"&&t!=="false"&&t!=="off"}function _0(e){let n=e&&me(e,"tblLook");if(!n)return D0;let t=Ae(n,"val"),r=t&&/^[0-9A-Fa-f]{1,4}$/.test(t)?Number.parseInt(t,16):0;return {firstRow:It(n,"firstRow")??(r&32)!==0,lastRow:It(n,"lastRow")??(r&64)!==0,firstColumn:It(n,"firstColumn")??(r&128)!==0,lastColumn:It(n,"lastColumn")??(r&256)!==0,rowBanding:It(n,"noHBand")===void 0?(r&512)===0:!It(n,"noHBand"),columnBanding:It(n,"noVBand")===void 0?(r&1024)===0:!It(n,"noVBand")}}var nc=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],eg=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function ng(e,n){let t=e&&me(e,"cnfStyle");if(!t)return;let r=Ae(t,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<nc.length;o+=1)r[o]==="1"&&n.add(nc[o]);for(let o=0;o<eg.length;o+=1)It(t,eg[o])===true&&n.add(nc[o]);}var H0=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function z0(e){let n=new Set;ng(e.rowProperties,n),ng(e.cellProperties,n);let{look:t,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:l}=e,s=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>=l;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&&!s&&!d){let g=r-(t.firstRow?1:0);n.add(g%2===0?"band1Horz":"band2Horz");}c&&n.add("firstCol"),u&&n.add("lastCol"),s&&n.add("firstRow"),d&&n.add("lastRow"),s&&c&&n.add("nwCell"),s&&u&&n.add("neCell"),d&&c&&n.add("swCell"),d&&u&&n.add("seCell");let m=[];for(let g of H0)n.has(g)&&m.push(g);return m}var tg=new WeakMap;function mo(e,n,t,r,o="all-markup"){let a=tg.get(e);if(a&&a.contentWidthPt===n&&a.depth===t&&a.styleCascade===r&&a.displayMode===o)return a.structure;let i=j0(e,n,t,r,o);return tg.set(e,{contentWidthPt:n,depth:t,styleCascade:r,displayMode:o,structure:i}),i}function j0(e,n,t,r,o){if(t>=cl||e.kind!=="table")return null;let a=me(e,"tblPr"),i=a&&me(a,"tblStyle")?Ae(me(a,"tblStyle"),"val"):void 0,l=r?dm(r,i):ma,s=_0(a),d=og,c=Ud;for(let z of l.tablePropertyNodes)d=ec(d,Qd(me(z,"tblCellMar"))),c=Gd(c,il(z));let u=ec(d,Qd(a&&me(a,"tblCellMar"))),f=Gd(c,a?il(a):Ud),p=new Map,m=z=>{if(l===ma)return _d;let C=z.join("|"),U=p.get(C);if(U)return U;let q=cm(l,z);return p.size<M0&&p.set(C,q),q},g=[],h=[],b=1;for(let z of me$1(e.children)){if(z.kind!=="tableRow")continue;let C=me(z,"trPr"),U=[],q=[],Y=[],H=Math.min(Km(C,"gridBefore"),Xm);H>0&&h.push({start:0,span:H,preferred:yr(C&&me(C,"wBefore"))});let X=H,Z=me$1(z.children);for(let se of Z){if(se.kind!=="tableCell")continue;let be=me(se,"tcPr"),fe=Math.min(X,Xm),de=Math.min(F0(be),1024-fe),Ie=yr(be&&me(be,"tcW"));U.push(fe),q.push(de),Y.push(Ie),h.push({start:fe,span:de,preferred:Ie}),X=fe+de;}let re=Km(C,"gridAfter"),J=Math.min(X+re,1024);re>0&&X<1024&&h.push({start:X,span:Math.min(re,1024-X),preferred:yr(C&&me(C,"wAfter"))}),J>b&&(b=J),g.push({node:z,cells:Z,properties:C,starts:U,spans:q,preferred:Y,gridColumns:J});}let x=Wm(e),k=x.length>0?x.length:b,I=g.length,B=[];for(let z=0;z<g.length;z+=1){let C=g[z],U=C.node,q=C.properties,Y=0,H=[];for(let be of C.cells){if(be.kind!=="tableCell")continue;let fe=me(be,"tcPr"),de=C.starts[Y],Ie=C.spans[Y],Me=C.preferred[Y]??Wn,Ce=z0({look:s,rowIndex:z,rowCount:I,gridColumn:de,gridSpan:Ie,columnCount:k,rowProperties:q,cellProperties:fe});Y+=1;let Qe,yn=Zd;for(let Ke of Ce){let bn=l.conditional.get(Ke);if(!bn)continue;let _e=me(bn,"tcPr");Qe=Um(_e)??Qe,yn=Xd(yn,ll(_e));}let We=Um(fe)??Qe,Nn=ec(u,Qd(fe&&me(fe,"tcMar"))),$n=ya(be.children,o);H.push({id:be.id,gridSpan:Ie,gridColumn:de,...x[de]?.id?{gridColumnId:x[de].id}:{},vMergeContinue:E0(fe),vAlign:N0(fe),margins:Nn,borders:Xd(yn,fe?ll(fe):Zd),...We===void 0?{}:{shading:We},preferredWidth:Me,styleFormatting:m(Ce),blocks:$n});}let X=q?me(q,"ins")??me(q,"del"):void 0,Z=X?X.localName==="ins"?"insert":"delete":void 0,re=X&&Ae(X,"id"),J=X&&Ae(X,"author"),se=X&&Ae(X,"date");B.push({id:U.id,...Z?{revisionKind:Z}:{},...re!==void 0?{revisionId:re}:{},...J!==void 0?{revisionAuthor:J}:{},...se!==void 0?{revisionDate:se}:{},isHeader:Zm(q,"tblHeader"),cantSplit:Zm(q,"cantSplit"),height:A0(q),cells:H});}let F=Wn,P,L,O,T,y;for(let z of l.tablePropertyNodes){let C=me(z,"tblW");C&&(F=yr(C));let U=me(z,"tblLayout");U&&(P=Ae(U,"type")==="fixed"),L=ba(me(z,"tblInd"),$m)??L,O=Vm(z)??O,T=ba(me(z,"tblCellSpacing"),dl)??T,y=Qm(z)??y;}let D=a&&me(a,"tblW"),G=D?yr(D):F,ee=a&&me(a,"tblLayout"),R=ee?Ae(ee,"type")==="fixed":P??false,M=ba(a&&me(a,"tblInd"),$m)??L??0,_=Vm(a)??O??"left",A=t===0?Qm(a)??y:void 0,v=ba(a&&me(a,"tblCellSpacing"),dl)??T??0;return {columnWidthsPt:Gm({gridCols:x,claims:h,columnCount:k,contentWidthPt:n,tableWidth:G,layoutFixed:R}),rows:B,tableWidth:G,layoutFixed:R,indentPt:M,alignment:_,...A?{float:A}:{},cellSpacingPt:v,tableBorders:f,defaultMargins:u}}function ul(e){let n=[],t=0;for(let r of e.members){let o=Sd$1(r).length;n.push({paragraphId:r.id,base:t,length:o}),t+=o;}return {members:n,total:t}}function tc(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 ig(e,n){let t=tc(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 W0(e,n){return {...e,range:ig(e.range,n)}}function fl(e,n){return e.map(t=>{let r=t.spans.map(u=>W0(u,n)),o=r[0],a=t.drawings?.map(u=>{let f=tc(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):[],l=o?(a??[]).filter(u=>u.paragraphId===o.range.paragraphId):[],s=o?{paragraphId:o.range.paragraphId,start:Math.min(o.range.start,...l.map(u=>u.start)),end:Math.max(i[i.length-1].range.end,...l.map(u=>u.start+1))}:ig(t.range,n),d=a,c=t.deletedRanges?.map(u=>({deleted:u,member:tc(n,u.start)})).filter(({member:u})=>u?.paragraphId===s.paragraphId).map(({deleted:u,member:f})=>({start:u.start-(f?.base??0),end:u.end-(f?.base??0)}));return {...t,range:s,spans:r,...d?{drawings:d}:{},...c?{deletedRanges:c}:{}}})}var oc=512,sg=9,Gn=31680/20,G0=8,X0=128;function wa(e,n){return e.kind!=="textValue"&&e.namespaceUri===ma$1&&e.localName===n}function Ve(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function kn(e,n){for(let t of e.children)if(wa(t,n))return t}function vt(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function $0(e){let n=e/20;return !Number.isFinite(n)||n<=0?0:n>Gn?Gn:n}function rc(e){let n=e/20;return Number.isFinite(n)?n>Gn?Gn:n<-Gn?-Gn:n:0}function V0(e){let n={left:0,right:0,hanging:0,firstLine:0};if(!e)return n;let t=kn(e,"ind");if(!t)return n;let r=vt(Ve(t,"left")??Ve(t,"start"),true),o=vt(Ve(t,"right")??Ve(t,"end"),true),a=vt(Ve(t,"hanging")),i=vt(Ve(t,"firstLine"),true);return {left:r===null?0:rc(r),right:o===null?0:rc(o),hanging:a===null?0:$0(a),firstLine:i===null?0:rc(i),stated:{left:r!==null,right:o!==null,firstLineOffset:a!==null||i!==null}}}function Y0(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function K0(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function U0(e,n){let t=kn(e,n);if(!t)return false;let r=Ve(t,"val");return r!=="0"&&r!=="false"&&r!=="off"}function lg(e,n){let t=kn(e,n);if(!t)return;let r=Ve(t,"val");if(!(r===void 0||r.length===0||r.length>X0))return r}function Z0(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 dg(e){let n=vt(Ve(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=kn(e,"start"),r=1;if(t){let b=vt(Ve(t,"val"));b!==null&&b>=0&&(r=Math.min(b,9999));}let o=kn(e,"numFmt"),a=(o?Ve(o,"val"):void 0)??"decimal",i=kn(e,"lvlText"),l=i?Ve(i,"val")??"":"",s=kn(e,"lvlJc"),d=K0(s?Ve(s,"val"):void 0),c=kn(e,"suff"),u=Y0(c?Ve(c,"val"):void 0),f=kn(e,"lvlRestart"),p;if(f){let b=vt(Ve(f,"val"));b!==null&&b>=0&&b<=9&&(p=b);}let m=kn(e,"pPr"),g=kn(e,"rPr"),h=g?Ur(g):[];return {ilvl:n,start:r,numFmt:a.length>64?"decimal":a,lvlText:l.length>64?l.slice(0,64):l,lvlJc:d,suff:u,indent:V0(m),...p!==void 0?{lvlRestart:p}:{},isLgl:U0(e,"isLgl"),runProperties:h,vanish:Z0(h,"vanish")}}function q0(e){let n=Ve(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(!wa(a,"lvl"))continue;if(t.size>=9)break;let i=dg(a);i&&!t.has(i.ilvl)&&t.set(i.ilvl,i);}let r=lg(e,"numStyleLink"),o=lg(e,"styleLink");return {abstractNumId:n,levels:t,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function J0(e){let n=vt(Ve(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=kn(e,"startOverride"),r;if(t){let i=vt(Ve(t,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=kn(e,"lvl"),a=o?dg(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 Q0(e){let n=Ve(e,"numId");if(n===void 0||n.length===0||n.length>64)return null;let t=kn(e,"abstractNumId"),r=t?Ve(t,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!wa(a,"lvlOverride"))continue;if(o.size>=sg)break;let i=J0(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:n,abstractNumId:r,overrides:o}}function ew(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(wa(a,"abstractNum")){if(r>=oc)continue;r+=1;let i=q0(a);i&&!n.has(i.abstractNumId)&&n.set(i.abstractNumId,i);continue}if(wa(a,"num")){if(o>=oc)continue;o+=1;let i=Q0(a);i&&!t.has(i.numId)&&t.set(i.numId,i);}}return {abstractNums:n,nums:t}}function nw(e,n,t){let r=new Set([n.abstractNumId]),o=n;for(let a=0;a<G0;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let l=t(i);if(l===void 0)return null;let s=e.nums.get(l);if(!s)return null;let d=e.abstractNums.get(s.abstractNumId);if(!d||r.has(d.abstractNumId))return null;r.add(d.abstractNumId),o=d;}return null}function cg(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=nw(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 go(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 ac=Object.freeze({abstractNums:new Map,nums:new Map});function tw(e,n){let t=e.nums.get(n),r=[];for(let o=0;o<=8;o+=1){let a=go(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 rw(e,n,t){let r=[];for(let o=0;o<=8;o+=1){let a=go(e,n,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...t]}}function ow(e,n){if(n===0)return null;if(n===void 0)return e-1;let t=n-1;return t>=e?null:t}function ic(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 l=t.get(a);l||(l=[false,false,false,false,false,false,false,false,false],t.set(a,l));let s=r.get(a);return s||(s=tw(e,a),r.set(a,s)),{counters:i,initialized:l,starts:s}};return {advance(a,i){if(i<0||i>8||a.length===0||a.length>64)return null;let l=go(e,a,i);if(!l)return null;let{abstractNumId:s,level:d}=l,{counters:c,initialized:u,starts:f}=o(a),{formats:p}=rw(e,a,f);for(let I=i+1;I<=8;I+=1){let B=go(e,a,I);if(!B)continue;let F=ow(I,B.level.lvlRestart);F!==null&&i<=F&&(u[I]=false);}let m=f[i]??d.start;u[i]?c[i]+=1:(c[i]=m,u[i]=true);let g=c.slice(),h=u.slice(),b=g.map((I,B)=>h[B]?I:f[B]??1),x=d.isLgl?p.map(I=>I==="bullet"||I==="none"?I:"decimal"):p,k=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:ud(d.lvlText,b,x);return {abstractNumId:s,numId:a,ilvl:i,level:d,counters:g,markerText:k}}}}function sc(e){return e.kind!=="textValue"}function ug(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function pl(e,n){for(let t of e.children)if(sc(t)&&t.localName===n)return t}function dc(e){let n=null;for(let t of e){if(!sc(t))continue;let r=pl(t,"numPr");if(!r)continue;let o=pl(r,"ilvl"),a=pl(r,"numId"),i=a?ug(a,"val"):void 0,l=o?ug(o,"val"):"0";if(!i||i==="0"){n=null;continue}if(i.length>64){n=null;continue}let s=/^\d{1,2}$/.test(l??"")?Number(l):0;if(s<0||s>8){n=null;continue}n={numId:i,ilvl:s};}return n}function aw(e,n){let t=new Set,r=e.styles.get(n);for(let o=0;r!==void 0&&o<Yi;o+=1){if(t.has(r.styleId))return;t.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?dc([a]):null;if(i)return i.numId;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}var lc=new WeakMap;function cc(e,n){if(!n)return e;let t=lc.get(e);if(t&&t.styleCascade===n)return t.linked;let r=cg(e,a=>aw(n,a)),o={styleCascade:n,linked:r};return lc.set(e,o),lc.set(r,o),r}function fg(e){return Number.isFinite(e)?e>Gn?Gn:e<-Gn?-Gn:e:0}function pg(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)?fg(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?fg(Number(o)/20):0});}return n}function mg(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.left!==void 0||n.attributes?.start!==void 0))}function gg(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.right!==void 0||n.attributes?.end!==void 0))}function Sg(e,n,t=[]){let r=e.stated??{left:false,right:false,firstLineOffset:false},o=ua(n),a=ua(t),i={hanging:e.hanging,firstLine:e.firstLine},l=mg(t)?a.left:r.left?e.left:mg(n)?o.left:e.left,s=gg(t)?a.right:r.right?e.right:gg(n)?o.right:e.right,d=pg(t)??(r.firstLineOffset?i:pg(n)??i);return {left:l,right:s,...d}}function uc(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 l of me$1(i.children))if(l.kind==="tableRow")for(let s of me$1(l.children)){if(s.kind!=="tableCell")continue;let d=Pb$1(s.children);r(d,a+1);}}}};return r(e,0),t}var hg=new WeakMap;function Pg(e,n){let t=hg.get(e);if(t&&t.styleCascade===n)return t;let r=e.children.find(s=>s.kind==="paragraphProperties"),o=n?fo(n,r):null,a=o?o.paragraphPropertyNodes:r?[r]:[],i=r&&sc(r)?pl(r,"rPr"):void 0,l={styleCascade:n,numPr:dc(a),inheritedParagraphProperties:o?.inheritedParagraphProperties??[],directProps:Tn(r),inheritedMarkProps:o?o.markRunProperties:Tn(i),perLevel:new WeakMap};return hg.set(e,l),l}function wg(e,n,t,r){let o=new Map;if(n.nums.size===0)return o;let a=cc(n,t),i=ic(a);for(let l of uc(e)){let s=Pg(l,t),d=s.numPr;if(!d)continue;let c=i.advance(d.numId,d.ilvl);if(!c)continue;let u=s.perLevel.get(c.level);if(!u){let h=Sg(c.level.indent,s.inheritedParagraphProperties,s.directProps),b=wt(s.inheritedMarkProps,c.level.runProperties,t);u={indent:h,markerStyle:Fe(b,t?.themeFonts)},s.perLevel.set(c.level,u);}let{indent:f,markerStyle:p}=u,m=Zr(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].join("|");o.set(l.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 yg=new WeakMap;function fc(e,n){if(e.listItems===void 0){let o=yg.get(n);if(o&&o.rawIndex===e.numberingIndex&&o.styleCascade===e.styleCascade&&o.isFontAvailable===e.isFontAvailable)return {...e,numberingIndex:o.linkedIndex,...o.listItems?{listItems:o.listItems}:{}}}let t=cc(e.numberingIndex??ac,e.styleCascade),r=e.listItems??(t.nums.size>0?lw(n,e.numberingIndex,t,e.styleCascade,e.isFontAvailable):void 0);return e.listItems===void 0&&yg.set(n,{rawIndex:e.numberingIndex,styleCascade:e.styleCascade,isFontAvailable:e.isFontAvailable,linkedIndex:t,listItems:r}),{...e,numberingIndex:t,...r?{listItems:r}:{}}}var bg=new WeakMap;function iw(e,n){let t=bg.get(e);if(t&&t.styleCascade===n)return t.numbered;let r=uc([e]).filter(o=>Pg(o,n).numPr!==null);return bg.set(e,{styleCascade:n,numbered:r}),r}var xg=new WeakMap;function lw(e,n,t,r,o){let a=e[0],i=[];for(let d of e){let c=iw(d,r);for(let u of c)i.push(u);}let l=a?xg.get(a):void 0;if(l&&l.rawIndex===n&&l.styleCascade===r&&l.isFontAvailable===o&&l.numbered.length===i.length&&l.numbered.every((d,c)=>d===i[c]))return l.listItems;let s=wg(e,t,r,o);return a&&xg.set(a,{rawIndex:n,styleCascade:r,isFontAvailable:o,numbered:i,listItems:s}),s}function ml(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),l=Math.max(i,o-a),s=Math.max(a,n),d=l;return e.markerAlign==="right"?d=o-n:e.markerAlign==="center"&&(d=l+(s-n)/2),d<i&&(d=i),{x:d,y:t,width:Math.max(n,0),height:r}}function sw(e,n,t=Xr,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=n.measure(e.markerText,e.markerStyle),a=ml(e,o,0,0);if(!a)return 0;let i=e.indent.left,l=a.x+a.width;return e.suffix==="nothing"?l-i:e.suffix==="space"?l+n.measure(" ",e.markerStyle)-i:l<=i?0:$r(t,l,r).positionPt-i}function gl(e,n,t,r,o){return e?sw(e,t,r,o===void 0?void 0:n.left+o):n.hanging>0?-n.hanging:n.firstLine}function hl(e,n,t,r=0){if(!e||!e.markerText||!t)return;let o=n.measure(e.markerText,e.markerStyle),a=ml(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 Rg=new WeakMap,Ig=new WeakMap,vg=new WeakMap;function dw(e){let n=vg.get(e);if(n)return n;let t=new Set,r=[];for(let o of Je(e)){for(let a of o.lines)for(let i of mn(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 vg.set(e,r),r}function Tt(e){let n=Rg.get(e);if(n)return n;let t=new Set,r=[];for(let o of e.pages)for(let a of dw(o))t.has(a)||(t.add(a),r.push(a));return Rg.set(e,r),r}function ho(e){let n=Ig.get(e);if(n)return n;let t=new Map;for(let[r,o]of Tt(e).entries())t.set(o,r);return Ig.set(e,t),t}var Tg=new WeakMap;function mn(e){let n=Tg.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)?cw(e):[t];return Tg.set(e,o),o}function cw(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 kt(e,n){return mn(e).find(t=>t.paragraphId===n)??null}function yo(e,n,t,r){let o=ho(e),a=o.get(n.paragraphId)??-1,i=o.get(t.paragraphId)??-1,l=o.get(r.paragraphId)??-1;if(a<i||a>l)return null;let s=a===i?Math.max(n.start,t.offset):n.start,d=a===l?Math.min(n.end,r.offset):n.end;return d>s?{start:s,end:d}:null}function TO(e,n){for(let t of e.pages)for(let r of Je(t)){let o=Vt(r).indexOf(n);if(o>0)return Vt(r).slice(0,o).reverse()}return []}var kg=new WeakMap;function Vt(e){let n=kg.get(e);if(n)return n;let t=[];for(let r of e.lines??[])for(let o of mn(r))t.includes(o.paragraphId)||t.push(o.paragraphId);return t.includes(e.paragraphId)||t.push(e.paragraphId),kg.set(e,t),t}function uw(e,n){let t=Vt(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=kt(a,n);i&&(r=Math.min(r,i.start),o=Math.max(o,i.end));}return o>=r?{start:r,end:o}:null}function pc(e,n,t){let r=uw(e,n);return r!==null&&t>=r.start&&t<r.end}function kO(e,n){for(let t of e.pages)for(let r of Je(t))if(r.paragraphId===n)return r;for(let t of e.pages)for(let r of Je(t))if(Vt(r).includes(n))return r;return null}var bc=8,Og=new WeakMap;function bl(e){let n=Og.get(e);if(n)return n;let t=[],r=new Map,o=new Map,a=new Map,i=new Map,l=new Map,s=(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 h=l.get(g);h&&i.set(m,h);}else l.set(g,{row:p,cell:m});}s(m.blocks,u||p.isHeaderRepeat);}}}};for(let c of e.pages)t.push(c.box.y),s(c.fragments,false);let d={pageTops:t,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return Og.set(e,d),d}function va(e,n){let t=bl(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 fw(e,n){let t=e.pages[va(e,n.y)];if(!t)return false;for(let r of [t.header,t.footer])if(r&&Sl(r.box,n))return true;return false}function hc(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||!Ra(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 xl(e,n,t,r={}){let o=e.pages[n];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??bc,measurer:r.measurer},i=Cg(e,o.index,t),l=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),s=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=hc(l,t,a.pageIndex);if(d)return {...d,contentControlId:i};let c=yl(o.fragments,t,a,null);if(c?.onGlyphs)return {...c,contentControlId:i};let u=hc(s,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=yl(m.fragments,t,{...a,pageIndex:m.index},null);if(g)return {...g,contentControlId:Cg(e,m.index,t)}}return null}function EO(e,n,t,r,o={}){let a=e.pages[n];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??bc,measurer:o.measurer};return yl(t,r,i,null)}function pw(e,n,t={}){let r=e.pages[va(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=hc(o.anchoredDrawings,a,r.index);if(i)return i}return xl(e,r.index,{x:n.x-r.contentBox.x,y:n.y-r.contentBox.y},t)}function Sl(e,n){return n.x>=e.x&&n.x<e.x+e.width&&n.y>=e.y&&n.y<e.y+e.height}function Pl(e,n,t){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===n&&Sl(i.box,t)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function Cg(e,n,t){return Pl(e,n,t)?.id??null}function yc(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 mw(e,n,t){return e.kind!=="table"||Math.max(e.box.y-n.y,0,n.y-(e.box.y+e.box.height))>0?yc(e.box,n,t):0}function yl(e,n,t,r){if(e.length===0)return null;let o=null;for(let i of e){if(!Sl(i.box,n))continue;o=i;let l=Bg(i,n,t,r);if(l)return l;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:mw(i,n,t.verticalWeight)})).sort((i,l)=>i.score-l.score);for(let{block:i}of a){let l=Bg(i,n,t,r);if(l)return l}return null}function Bg(e,n,t,r){return e.kind==="paragraph"?gw(e,n,t,r,Sl(e.box,n)):Rw(e,n,t)}function gw(e,n,t,r,o){let a=hw(e.lines,n.y);if(!a)return null;let i=Sw(a,n.x,n.y,t),l=bw(a,n.x),s=Math.min(Math.max(i.offset,l.start),l.end),d={paragraphId:l.paragraphId,offset:s},c=Ta(a,s,t.measurer,l);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?yw(i.drawing):null}}function hw(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 yw(e){return Object.freeze({drawingNodeId:e.drawingNodeId,paragraphId:e.paragraphId,start:e.start})}function bw(e,n){let t=mn(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 xw(e,n,t){for(let r of t??e.drawings??[])if(r.start===n||r.start+1===n)return r;return null}function Ra(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:Rd(n.x,n.y,e.geometry)}function Sw(e,n,t,r){let o=e.spans;for(let s of e.drawings??[])if(Ra(s,{x:n,y:t}))return {offset:s.start,x:s.hitBounds.x,withinSpan:true,drawing:s};if(o.length===0&&(e.drawings?.length??0)>0){let s=e.drawings[0];if(n<=s.advanceStart)return {offset:e.range.start,x:s.advanceStart,withinSpan:false,drawing:s};let d=e.drawings[e.drawings.length-1];if(n>=d.advanceEnd)return mc(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:Ra(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],l=i.box.x+i.box.width;if(n>=l)return mc(e,l,r);for(let s of o)if(n>=s.box.x&&n<s.box.x+s.box.width)return Pw(s,n,r);for(let s=0;s<o.length;s+=1){let d=o[s];for(let c of e.drawings??[]){if(n>=c.advanceStart&&n<c.advanceEnd){let u=Ra(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(Ra(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[s-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[s-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 mc(e,l,r)}function mc(e,n,t){let r=Ag(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,l=t.measurer?Ia(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+l,withinSpan:false}}return {offset:r,x:n,withinSpan:false}}function Ag(e,n){let t=n.range.end;if(t>n.range.start&&gc(n,t-1)===Xb$1)return t-1;if(bl(e).lastLineIdOfParagraph.get(n.range.paragraphId)===n.id)return t;let r=t;for(r>n.range.start&&gc(n,r-1)===`
15
- `&&(r-=1);r>n.range.start&&gc(n,r-1)===" ";)r-=1;return r}function gc(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 Lg=new WeakMap,Mg=new WeakMap;function Fg(e){let n=Es(),t=Lg.get(e);if(t&&t.epoch===n)return t.boundaries;let r=[0];for(let o of Hn(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),Lg.set(e,{epoch:n,boundaries:r}),r}function Ia(e,n,t){let r=e.caretEdges;if(r&&n>=0&&n<r.length)return r[n];let o=Mg.get(t);o||(o=new WeakMap,Mg.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 l=n<=0?0:nt(e.text.slice(0,n),e.style,t);return a.set(n,l),l}function xc(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function wl(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||xc(e)?e.box.x+e.box.width*(o/r):e.box.x+Ia(e,o,t)}function Ta(e,n,t,r){let o=xw(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&&xc(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 l=wl(i,n,t),s=t?.lineMetrics(i.style);return !s||s.height<=0?{x:l,y:e.box.y,height:e.box.height}:{x:l,y:e.box.y+e.baseline-s.baseline-gd(i.style),height:s.height}}function Pw(e,n,t){let r=n-e.box.x,o=e.range.end-e.range.start;if(o<=0||xc(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=Fg(e),h=g[0],b=Number.POSITIVE_INFINITY;for(let x of g){let k=Math.abs(x-m);k<b&&(b=k,h=x);}return {offset:e.range.start+h,x:e.box.x+e.box.width*(h/o),withinSpan:true}}let a=Fg(e),i=1,l=a.length-1;for(;i<l;){let p=i+l>>1;Ia(e,a[p],t.measurer)<r?i=p+1:l=p;}let s=a[i],d=a[i-1],c=Ia(e,s,t.measurer),u=Ia(e,d,t.measurer),f=r-u<=c-r;return {offset:e.range.start+(f?d:s),x:e.box.x+(f?u:c),withinSpan:true}}function Eg(e,n,t,r){if(e.length===0)return null;for(let i of e){let l=t(i);if(n>=l&&n<l+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let l=t(i),s=n<l?l-n:n-(l+r(i));s<a&&(a=s,o=i);}return o}function ww(e,n,t,r){return {tableId:n.tableId,rowId:t.id,cellId:r.id,rowIndex:bl(e).rowIndexById.get(t.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function Rw(e,n,t,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],l=Eg(a,n.y,d=>d.box.y,d=>d.box.height);if(l){let d=Eg(l.cells,n.x,c=>c.box.x,c=>c.box.width);d&&i.push(Iw(t,l,d));}let s=[];for(let d of a)for(let c of d.cells)c.blocks.length!==0&&(i.some(u=>u.cell===c)||s.push({entry:{row:d,cell:c},score:yc(c.box,n,t.verticalWeight)}));s.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...s.map(u=>u.entry)]){let u=ww(t.layout,e,d,c),f=yl(c.blocks,n,t,u);if(f)return f}return null}function Iw(e,n,t){return t.blocks.length>0?{row:n,cell:t}:bl(e.layout).mergeOriginOf.get(t)??{row:n,cell:t}}function Dg(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 vw(e,n,t){for(let r of n.lines)for(let o of r.drawings??[])if(o.drawingNodeId===t)return Dg(e,o);return null}function _g(e,n,t){if(n.kind==="paragraph")return vw(e,n,t);for(let r of n.rows)for(let o of r.cells)for(let a of o.blocks){let i=_g(e,a,t);if(i)return i}return null}function Ng(e,n,t){for(let r of n){let o=_g(e,r,t);if(o)return o}return null}function Tw(e,n){for(let t of e.pages){for(let o of t.anchoredDrawings??[])if(o.drawingNodeId===n)return Dg(t.index,o);let r=Ng(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 l=i.paintBounds;return l.width<=0||l.height<=0?null:Object.freeze({pageIndex:t.index,x:o.box.x+l.x-t.contentBox.x,y:o.box.y+l.y-t.contentBox.y,width:l.width,height:l.height,record:i})}let a=Ng(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 kw(e){let n=[0],t=0;for(let r of e)t+=r,n.push(t);return n}function Ow(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??kw(n),rows:e.rows.map(o=>Ow(o,r))}}var Hg=new WeakMap,bo=4,Sc=6,zg=14,Cw={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function jg(e,n,t,r,o){for(let a of e){if(a.kind!=="table")continue;let i=a.nestingDepth??r;for(let l of a.rows){o({pageIndex:n,table:a,row:l,rowOrdinal:l.rowIndex,nestingDepth:i,editable:!l.isHeaderRepeat,pageContentBox:t});for(let s of l.cells)jg(s.blocks,n,t,i+1,o);}}}function DO(e){let n=Hg.get(e);if(n)return n;let t=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o];jg(a.fragments,o,a.contentBox,0,i=>{t.push(i);});}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(t)});return Hg.set(e,r),r}function _O(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 HO(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 zO(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=ka(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 ka(e,n){for(let t of e.cells)if(t.gridColumn===n)return t.gridColumnId??null;return null}function Bw(e,n,t,r,o){let a=e.pages[n.pageIndex];if(!a)return null;let i=t-a.contentBox.x-o,l=r-a.contentBox.y,s=n.table,d=i-s.box.x,c=l-s.box.y;return d<-bo||c<-zg||d>s.box.width+bo||c>s.box.height+Sc?null:{x:d,y:c}}function Lw(e,n,t,r,o){if(n.row.isHeaderRepeat)return null;let a=n.table,i=n.row.box.y-a.box.y+n.row.box.height;if(!a.columnEdges.slice(1).some(d=>Math.abs(t-d)<=bo)&&t>=0&&t<=a.box.width&&Math.abs(r-i)<=bo)return {kind:"rowDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeY:i};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 d=1;d<a.columnEdges.length-1;d+=1){let c=a.columnEdges[d];if(Math.abs(t-c)>bo)continue;let u=ka(n.row,d-1),f=ka(n.row,d);if(!u||!f)continue;let p=o.pages[n.pageIndex];return {kind:"columnDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,leftGridColumnId:u,rightGridColumnId:f,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:c,sheetY:p.contentBox.y+a.box.y+r}}let s=a.columnEdges.at(-1);if(Math.abs(t-s)<=bo){let d=a.columnEdges.length-2,c=ka(n.row,d);if(!c)return null;let u=o.pages[n.pageIndex];return {kind:"rightEdge",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,gridColumnId:c,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:s,sheetY:u.contentBox.y+a.box.y+r}}return null}function jO(e,n,t,r,o=0,a){let i=a??va(r,t),l=i>=0?o:0,s=null,d=-1,c=-1,u=f=>{if(!f)return;let p=Cw[f.kind];f.nestingDepth<d||f.nestingDepth===d&&p<=c||(d=f.nestingDepth,c=p,s=f);};for(let f of e.occurrences){if(i>=0&&f.pageIndex!==i)continue;let p=Bw(r,f,n,t,l);if(!p||(u(Lw(e,f,p.x,p.y,r)??{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<=Sc&&Math.abs(p.y-(m+f.row.box.height/2))<=f.row.box.height/2+Sc&&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 h=f.table.columnEdges[g],b=f.table.columnEdges[g+1],x=(h+b)/2;if(Math.abs(p.x-x)>(b-h)/2+2||p.y>zg)continue;let k=ka(f.row,g);if(k){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:k,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return s}var Wg=1048576;function Pc(e=Wg){let n=e|0;return {cellsRemaining:n>0?n:0}}function wc(e,n,t,r){let o=new Map,a=new Map,i=r?.pageFragment===true,l=new Set,s=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}s&&p.isHeaderRepeat!==true&&(s=false,f(),l?.clear());let m=new Set,g=false;for(let h of p.cells){if(t){if(t.cellsRemaining<=0){g=true;break}t.cellsRemaining-=1;}let b=Math.max(0,Math.min(h.gridColumn|0,1023));if(m.add(b),h.vMergeContinue){let x=a.get(b);x?x.span+=1:l&&!l.has(b)&&(a.set(b,{id:h.id,span:1}));}else c(b),a.set(b,{id:h.id,span:1});l?.add(b);}if(g){f();break}for(let h of [...a.keys()])m.has(h)||c(h);}return f(),o}function Xg(e,n,t,r){let o=new Map,a=0,i=l=>{let s=mo(l,n,0,t,r);if(s)for(let d of s.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 l of e)l.kind==="paragraph"&&l.paragraph?o.set(l.paragraph.id,a++):l.kind==="table"&&l.table&&i(l.table);return o}var vl=4096,Gg=1,Fn=class extends Error{code;constructor(n,t){super(t),this.name="TablePaginationError",this.code=n;}};function Rc(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0}))}function $g(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function Vg(e,n,t,r,o){let a=$g(o);if(!(e.length===0||!a||!o.inlineDrawingLayout||!o.anchorFrameBase||!o.pageContentClip))for(let i of e){let l=null,s=null,d=i.lines;for(let u of n){for(let f of u.blocks)if(f.kind==="paragraph"&&f.paragraphId===i.paragraphId){l=f.box,d=f.lines,s=u.box;break}if(l)break}if(!l)continue;let c=s??Object.freeze({x:i.cellOriginX,y:t,width:i.cellContentWidth,height:r});a(ao({paragraph:i.paragraph,paragraphId:i.paragraphId,paragraphBox:l,lines:d,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(l)??l,cellBox:c,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{}}));}}function Mw(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(l=>l.kind==="paragraph"&&l.id===o.paragraphId);!a||a.kind!=="paragraph"||Mn(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,ao({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}:{}}));}}function Fw(e,n){let t=$g(e),r=e.deferAnchoredDrawings;return !t&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:t,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{n.push(i);}},flushDeferred:(i,l,s)=>{if(n.length!==0){if(t&&!e.anchorDeferOnly)Vg(n,i,l,s,e);else if(r)for(let d of n)r(d);n.length=0;}}}}function Il(e,n,t){let r=0;for(let o=n;o<t&&o<e.length;o+=1)r+=e[o];return r}function Ic(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:Ic(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=>Ai(o,0,n))}:{}}))})}function Ew(e,n,t,r,o,a,i){let l=e.id,s=o.listItems?.get(l),{props:d,indent:c,available:u,alignment:f,spacing:p,lineSpacing:m,bottomBorder:g,borders:h,shading:b,inheritedRunProperties:x,markRunProperties:k,tabStops:I,tabStopsCacheToken:B}=ha(e,t,o.styleCascade,s,i?.tableCellStyle,true),F=Ko(I,o.defaultTabStopPt),P=F===I?B:sr(F),L=gl(s,c,o.measurer,F,u),O=o.pageExclusionZones?.()??Object.freeze([]),T=o.paragraphOrderIndex?.(l)??Number.MAX_SAFE_INTEGER,y=o.paragraphOrderIndex?tm(O,T,$=>o.paragraphOrderIndex?.($)):O,D=nm(y,n,0,{left:0,right:c.left+u+c.right}),G=ot(D),ee=G?`${r.toFixed(3)}|${G}`:"",R=pr({paragraph:e,properties:[...d,...x,...k,{localName:"tabStops",attributes:{token:P}},...s?[{localName:"list",attributes:{token:s.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?.(R);let M=$i(e,l,c.left,u,o.measurer,o.cache,o.cache?R:null,x,F,o.pageContext,o.styleCascade?($,K)=>wt($,K,o.styleCascade):void 0,{lineSpacing:m,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)}),...D.length>0?{pageExclusionZones:D}:{},...o.styleCascade?{themeFonts:o.styleCascade.themeFonts}:{},markRunProperties:k}),_=i?.lineStart??0,A=i?.fragmentIndex??0,v=i?.maxBottom??Number.POSITIVE_INFINITY,z=i?.includeAfter??true,C=i?.includeBottomBorder??true,U=_===0?Gr(p.before,a):0,q=n+c.left,Y=_===0?At(h.top):0,H=[],X=r+U+Y,Z=_,re=false;for(let $=_;$<M.length;$+=1){let K=M[$],j=$===M.length-1,Pe=j&&C&&g?At(g):0,ce=j&&z?p.after:0,ze=D.length>0?Pt(X,K.height,D):K.exclusionSkipBefore??0;if(X+ze+K.height+Pe+ce>v+.001)break;X+=ze;let on=n+c.left+($===0?L:0),dn=Math.max(1,u-($===0?L:0)),an=K.spans.map(xe=>({...xe,range:{...xe.range,paragraphId:l},box:{...xe.box,x:xe.box.x+n,y:X}})),cn=Gi(an,o.measurer,on,dn,f,j,f==="center"||f==="right"?K.width:void 0),en=an.length>0&&cn.length>0?cn[0].box.x-an[0].box.x:f!=="left"&&f!=="both"?(()=>{let xe=dn-K.width;return xe<=0?0:f==="center"?xe/2:xe})():0,Ge=Object.freeze({x:n,y:r,width:t,height:Math.max(0,v-r)}),Ee=Xi(K.drawings.map(xe=>Di(Object.freeze({...xe,paragraphId:l,x:n+xe.x,advanceStart:n+xe.advanceStart,advanceEnd:n+xe.advanceEnd,y:X+xe.y,paintBounds:Object.freeze({...xe.paintBounds,x:n+xe.paintBounds.x,y:X+xe.paintBounds.y}),hitBounds:Object.freeze({...xe.hitBounds,x:n+xe.hitBounds.x,y:X+xe.hitBounds.y})}),Ge)),en);H.push({id:o.nextLineId(l,K.start,$),range:{paragraphId:l,start:K.start,end:K.end},spans:cn,...Ee.length>0?{drawings:Ee}:{},box:{x:n+c.left,y:X,width:u,height:K.height},contentX:cn[0]?.box.x??on+en,baseline:K.baseline,leading:K.leading,trailingSpacing:K.trailingSpacing,...K.deletedRanges?{deletedRanges:K.deletedRanges}:{}}),X+=K.height,Z=$+1,re=true;}if(!re)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:_,complete:false,fitted:false};let J=Z>=M.length,se=H[0].box.y,be=X,fe=[],de,Ie=se,Me=be,Ce=h.left?Rn(h.left):0,Qe=h.right?Rn(h.right):0,yn=h.left?q-h.left.spacePt-Ce:q,We=h.right?q+u+h.right.spacePt+Qe:q+u,Nn=Math.max(We-yn,0);if(Y>0&&h.top){let $=Rn(h.top),K=se-h.top.spacePt-$;fe.push({side:"top",edge:h.top,box:{x:yn,y:K,width:Nn,height:$}}),Ie=K;}if(J&&C&&g){let $=Rn(g),K=be+g.spacePt,j={x:yn,y:K,width:Nn,height:$};de={edge:g,box:j},fe.push({side:"bottom",edge:g,box:j}),Me=K+$;}let $n=Math.max(Me-Ie,0);if(h.left&&fe.push({side:"left",edge:h.left,box:{x:q-h.left.spacePt-Ce,y:Ie,width:Ce,height:$n}}),h.right&&fe.push({side:"right",edge:h.right,box:{x:q+u+h.right.spacePt,y:Ie,width:Qe,height:$n}}),h.bar){let $=Rn(h.bar);fe.push({side:"bar",edge:h.bar,box:{x:q-h.bar.spacePt-$,y:se,width:$,height:Math.max(be-se,0)}});}let Ke=J&&z?p.after:0,bn=Me+Ke,_e=b===void 0?void 0:h.left||h.right?{x:yn,y:Ie,width:Nn,height:Math.max(Me-Ie,0)}:Vo(H,q,u),On=J&&o.displayMode==="all-markup",qt=On?eo(e):[],Ue=On?aa(e):null,He=_===0?hl(s,o.measurer,H[0]?{y:H[0].box.y,height:H[0].box.height}:void 0,n):void 0,E=Ui(e),S=E?fl(H,ul(E)):H,W={kind:"paragraph",id:`${l}#f${A}`,paragraphId:l,fragmentIndex:A,range:{paragraphId:l,start:S[0].range.start,end:S[S.length-1].range.end},props:d,spacing:{before:U,after:Ke},indent:c,...de?{bottomBorder:de}:{},...fe.length>0?{borders:fe}:{},...b===void 0?{}:{shading:b},..._e===void 0?{}:{shadingBox:_e},...He?{marker:He}:{},...Ci(qt,Ue),lines:S,box:{x:q,y:r,width:u,height:bn-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let $=Object.freeze({x:n,y:r,width:t,height:Math.max(0,v-r)}),K=W.box,j={paragraph:e,paragraphId:l,paragraphBox:K,lines:S};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...j,cellOriginX:n,cellContentWidth:t}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(ao({paragraph:e,paragraphId:l,paragraphBox:K,lines:S,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(K)??K,cellBox:$,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{}}));}return {fragment:W,bottom:bn,spaceAfter:Ke,nextLineIndex:Z,complete:J,fitted:true}}function br(e,n,t,r,o,a){let i=Yg(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 Yg(e,n,t,r,o,a,i,l,s){let d=[],c=r,u=l.previousSpaceAfter,f=l.blockIndex,p=l.lineIndex,m=l.paragraphFragmentIndex,g=false,h=false;for(;f<e.length;){let b=e[f];if(b.kind==="table"){p!==0&&(p=0),u=0;let k=Dw(b,n,t,c,a+1,i);if(!k){f+=1;continue}if(k.bottom>o+.001){h=!g;break}d.push(k.fragment),c=k.bottom,g=true,f+=1,p=0;continue}if(b.kind!=="paragraph"){f+=1,p=0;continue}let x=Ew(b,n,Math.max(1,t-n),c,i,u,{lineStart:p,fragmentIndex:m,maxBottom:o,includeAfter:true,includeBottomBorder:true,...s?{tableCellStyle:s}:{}});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:h}}function Kg(e,n){return {top:e.top+hr(n.top),right:e.right+hr(n.right),bottom:e.bottom+hr(n.bottom),left:e.left+hr(n.left)}}function Nw(e,n,t){return {top:n?{state:"none"}:e.top,left:e.left,bottom:t?{state:"none"}:e.bottom,right:e.right}}function Ug(e,n,t){return !n&&!t?e:{...e,cells:e.cells.map(r=>({...r,borders:Nw(r.borders,n,t)}))}}function Oa(e,n,t,r,o,a,i,l=0){let s=vc(e,n,t,r,Number.POSITIVE_INFINITY,o,false,a,i,Rc(e),l);return {record:s.record,bottom:s.bottom}}function vc(e,n,t,r,o,a,i,l,s,d,c=0){let u=Il(n,0,n.length),f=Number.isFinite(c)&&c>0?c/2:0,p=s.measurer.lineMetrics(et).height,m=e.height,g=m.rule==="exact"?m.valuePt:void 0,h=m.rule==="atLeast"?m.valuePt:void 0,b=[],{rowDeps:x,flushDeferred:k}=Fw(s,b),I=a&&s.pageOccurrenceKey?{...x,nextLineId:(R,M,_)=>x.nextLineId(R,M,_,s.pageOccurrenceKey())}:x,B=g===void 0?o:Math.min(o,r+Math.max(0,g)),F=[],P=false,L=false,O=r;for(let R=0;R<e.cells.length;R+=1){let M=e.cells[R],_=d[R]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0},A=M.gridSpan,v=M.gridColumn,z=t+Il(n,0,v),C=Il(n,v,Math.min(v+A,n.length))||u,U=Math.min(f,Math.max((C-Gg)/2,0)),q=z+U,Y=Math.max(C-2*U,Gg),H=Kg(M.margins,M.borders),X=i?hr(M.borders.top):H.top,Z=r+X,re=B-H.bottom,J=[],se=Z,be=_,fe=true,de=false,Ie=false;if(!M.vMergeContinue)if(re<Z+.001)fe=_.blockIndex>=M.blocks.length;else {let Ce=Yg(M.blocks,q+H.left,q+Y-H.right,Z,re,l,I,_,M.styleFormatting);J=Ce.blocks,se=Ce.bottom,be=Ce.cursor,fe=Ce.complete,de=Ce.fitted,Ie=Ce.nestedSplitBlocked,de&&(P=true),Ie&&(L=true);}let Me=Math.min(B,de?se+H.bottom:r+X+p+H.bottom);Me>O&&(O=Me),F.push({cell:M,x:q,width:Y,gridColumn:v,blocks:J,contentTop:Z,contentBottom:se,insets:{...H,top:X},nextCursor:be,complete:M.vMergeContinue?true:fe,fitted:de,nestedSplitBlocked:Ie});}O=Math.min(B,Math.max(O,r));for(let R of F){let M=R.fitted?R.contentBottom+R.insets.bottom:r+R.insets.top+p+R.insets.bottom;M>O&&M<=B+.001&&(O=M);}O=Math.min(B,O);let T=false;if(g!==void 0){let R=r+g;R<=o+.001?(O=R,T=true):O=Math.min(o,O);}else if(h!==void 0){let R=r+h;F.every(_=>_.complete)&&R<=o+.001&&R>O&&(O=R);}O=Math.min(o,O);let y=Math.max(0,O-r),D=F.map(R=>{let M=R.blocks,_=T?true:R.complete;if(!R.cell.vMergeContinue&&_&&R.cell.vAlign!=="top"&&M.length>0){let A=R.contentBottom-R.contentTop,v=y-R.insets.top-R.insets.bottom-A;if(v>0){let z=R.cell.vAlign==="center"?v/2:v;M=Ic(M,z);}}return {id:R.cell.id,gridColumn:R.gridColumn,...R.cell.gridColumnId?{gridColumnId:R.cell.gridColumnId}:{},gridSpan:R.cell.gridSpan,vMergeContinue:R.cell.vMergeContinue,...R.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...R.cell.shading===void 0?{}:{shading:R.cell.shading},blocks:M,box:{x:R.x,y:r,width:R.width,height:y}}}),G=T||F.every(R=>R.complete)?null:F.map(R=>R.nextCursor),ee=T||F.every(R=>R.complete);return k(D,r,y),{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:D,box:{x:t,y:r,width:u,height:y}},bottom:O,remainder:ee?null:G,fitted:P||e.cells.every(R=>R.vMergeContinue)||T,nestedSplitBlocked:L}}function Aw(e){return {...e,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function Tc(e,n,t,r,o,a=0){let i=0,l={...Aw(o),pageExclusionZones:void 0,nextLineId:()=>`probe-${i++}`};return Oa(e,n,t,0,false,r,l,a).record.box.height}function kc(e,n,t,r,o,a,i,l){if(e.length===0)return [];let s=new Map;for(let h of t)for(let b of h.cells)s.set(b.id,b);let d=wc(e,a,o,{pageFragment:true}),c=e.map((h,b)=>({...h,cells:h.cells.map(x=>{let k=d.get(x.id);if(x.vMergeContinue&&k===void 0)return {...x,paintInert:true,rowSpan:1,borders:{},blocks:[]};let I=x.vMergeContinue,B=k??1,F=x.box.height;if(B>1){let T=e[b+B-1];F=T.box.y+T.box.height-x.box.y;}let P=s.get(x.id),L=x.blocks;if(P&&P.vAlign!=="top"&&L.length>0){let T=Kg(P.margins,P.borders),y=Number.POSITIVE_INFINITY,D=Number.NEGATIVE_INFINITY;for(let G of L)y=Math.min(y,G.box.y),D=Math.max(D,G.box.y+G.box.height);if(Number.isFinite(y)&&Number.isFinite(D)){let G=F-T.top-T.bottom-(D-y),R=x.box.y+T.top+(G>0?P.vAlign==="center"?G/2:G:0)-y;if(Math.abs(R)>.001){L=Ic(L,R);for(let M of L)M.kind==="paragraph"&&i?.(M.paragraphId,R);}}}let O=Object.freeze({x:x.box.x,y:x.box.y,width:x.box.width,height:F});return P&&l&&(B>1||P.vAlign!=="top"&&L.length>0)&&Mw(L,P.blocks,O,l),{...x,...I?{vMergeContinue:false,paintInert:false}:{},rowSpan:B,blocks:L,box:{...x.box,height:F}}})})),u=c.map(h=>h.cells.map(b=>{let x=s.get(b.id);return {gridColumn:b.gridColumn,gridSpan:b.gridSpan,vMergeContinue:b.vMergeContinue,borders:x?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:b.rowSpan??1}})),f=n.columnWidthsPt.length,p=n.tableBorders,m={columnWidthsPt:n.columnWidthsPt,rowBands:c.map(h=>({y:h.box.y,height:h.box.height})),cellBoxes:c.map(h=>h.cells.map(b=>({width:b.box.width,height:b.box.height})))},g=Kd(u,p,f,m,void 0,r);return c.map((h,b)=>({...h,cells:h.cells.map((x,k)=>{let I=g[b][k];return x.paintInert||x.vMergeContinue?{...x,borders:{},paintInert:true}:{...x,borders:I}})}))}function Dw(e,n,t,r,o,a){if(o>=cl)return null;let i=Math.max(1,t-n),l=mo(e,i,o,a.styleCascade,a.displayMode);if(!l||l.rows.length===0)return null;let s=[],d={...a,publishAnchoredDrawings:void 0,collectAnchoredDrawings:void 0,anchorDeferOnly:true,deferAnchoredDrawings:h=>{s.push(h);}},c=n+Pa(l,i),u=[],f=r;for(let h of l.rows){let b=Oa(h,l.columnWidthsPt,c,f,false,o,d,l.cellSpacingPt);u.push(b.record),f=b.bottom;}let p=kc(u,l,l.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let h of s)for(let b of p)if(b.cells.some(k=>k.blocks.some(I=>I.kind==="paragraph"&&I.paragraphId===h.paragraphId))){Vg([h],b.cells,b.box.y,b.box.height,a);break}let m=Il(l.columnWidthsPt,0,l.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}},l.columnWidthsPt,o,g),bottom:f}}function Zg(e){let n=e.picture;return n?.embeddedRelationshipId?`embed:${e.ownerPartName}:${n.embeddedRelationshipId}`:n?.linkedRelationshipId?`link:${e.ownerPartName}:${n.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}var qg=new WeakMap,Oc=new Map,_w=16,Hw=32;function Qg(e,n){let t=qg.get(e);if(t)return t;let r;if(e.kind==="drawing"||ab$1(e))r={atoms:new Map([[e.id,e]]),visited:1,deepest:0};else if(!("children"in e)||e.children.length===0)r={atoms:Oc,visited:1,deepest:0};else if((n<2||e.children.length>=_w)&&n<Hw){let o=null,a=1,i=0;for(let l of e.children){let s=Qg(l,n+1);if(a+=s.visited,s.deepest+1>i&&(i=s.deepest+1),s.atoms.size>0){o||(o=new Map);for(let[d,c]of s.atoms)o.set(d,c);}}r={atoms:o??Oc,visited:a,deepest:i};}else {let o=new Map,a=0,i=0,l=[{node:e,depth:0}];for(;l.length>0;){let s=l.pop();if(a+=1,a>_a)break;s.depth>i&&(i=s.depth);let d=s.node;if(d.kind==="drawing"||ab$1(d)){o.set(d.id,d);continue}if("children"in d)for(let c=d.children.length-1;c>=0;c-=1)l.push({node:d.children[c],depth:s.depth+1});}r={atoms:o.size>0?o:Oc,visited:a,deepest:i};}return qg.set(e,r),r}function Jg(e){let n=Qg(e.root,0);return n.visited>_a||n.deepest>Ya.maxDrawingDepth?null:n.atoms}function Cc(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 Tl(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 zw=1;function Bc(e,n){if(e.kind==="drawing"||ab$1(e)){n.push(e.id);return}if("children"in e)for(let t of e.children)Bc(t,n);}function jw(e){if(e.kind!=="paragraph")return [];let n=[];for(let t of e.children)Bc(t,n);return Object.freeze(n)}function Ww(e){let{ownerPartName:n,part:t,pkg:r,lookup:o,onResourceSettled:a,rememberReadyHandle:i,forgetReadyHandle:l}=e,s=false,d=0,c=new Map,u=new Set,f=new Map,p=new WeakMap,m=new WeakMap,g=0,h=$a(r,n),b=eb$1(t,{resolveRelationship:h}),x=Jg(t),k=(O,T)=>{if(s||u.has(T))return;u.add(T);let y=d;o.resolveForProjection(O).then(D=>{s||y!==d||(c.set(T,D),D.kind==="ready"&&i(D.validatedHandle),g+=1,f.set(T,g),a(n));}).catch(()=>{s||y!==d||(c.set(T,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(T,g),a(n));}).finally(()=>{u.delete(T);});},I=O=>{let T=Zg(O),y=c.get(T);if(y)return y;let D=O.picture?.linkedRelationshipId;if(D){let ee=o.resolveLinked(n,D);return c.set(T,ee),g+=1,f.set(T,g),ee}let G=Object.freeze({kind:"pending",resourceKey:T});return c.set(T,G),g+=1,f.set(T,g),k(O,T),G},B=O=>b.get(O)??null,F=Object.freeze({ownerPartName:n,projectionForAtom:B,project:O=>B(O.id),resourceOf:I}),P=O=>{let T=m.get(O);if(T)return T;let y=jw(O),D=null,G=(R,M)=>{if(!(M>=zw))for(let _ of R){let A=b.get(_)?.textboxStory;if(!A)continue;let v=[];if(Bc(A.content,v),v.length!==0){D||(D=[...y]);for(let z of v)D.push(z);G(v,M+1);}}};G(y,0);let ee=D??y;return m.set(O,ee),ee};return {context:F,cacheTokenForPart:()=>`${n}|${g}|${d}|${b.size}`,drawingTokenForParagraph:O=>{let T=p.get(O);if(T?.resourceEpoch===g)return T.token;let y=P(O);if(y.length===0)return p.set(O,{resourceEpoch:g,token:""}),"";let G=y.map(ee=>{let R=b.get(ee);if(!R)return `${ee}:refused`;let M=I(R);return [ee,Cc(R),Tl(M),String(f.get(Zg(R))??0)].join("|")}).sort().join(";");return p.set(O,{resourceEpoch:g,token:G}),G},isCompatibleWith:(O,T)=>{if(O===t)return true;let y=Jg(O);if(x&&y&&x.size===y.size){let G=true;for(let[ee,R]of x)if(y.get(ee)!==R){G=false;break}if(G)return true}let D=eb$1(O,{resolveRelationship:$a(T,n)});if(D.size!==b.size)return false;for(let[G,ee]of b){let R=D.get(G);if(!R||Cc(R)!==Cc(ee))return false}return true},dispose:()=>{s=true,d+=1;for(let O of c.values())O.kind==="ready"&&l(O.validatedHandle);c.clear(),u.clear(),f.clear();}}}function gC(e){let n=e.session.packageRevision(),t=e.session.currentPackage(),r=e.resourceLookup??rb$1(t,{decodePort:e.decodePort}),o=new Map,a=new Map,i=0,l=new WeakMap,s=new Map,d=new Map,c=g=>{s.set(g.resourceKey,g);let h=gb$1(g);h&&d.set(g.resourceKey,h);},u=g=>{s.delete(g.resourceKey);let h=d.get(g.resourceKey);h&&(hb$1(h),d.delete(g.resourceKey));},f=(g,h)=>{let x=h.currentPackage().parts.get(g)??a.get(g);if(x)return x;if(g===h.part().name)return h.part();throw new Error(`Missing inline drawing part ${g}`)},p=(g,h)=>{let b=o.get(g);if(b)return b;let x=f(g,h);a.set(g,x);let k=Ww({ownerPartName:g,part:x,pkg:h.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:c,forgetReadyHandle:u});return o.set(g,k),i+=1,l.set(k,i),k},m=g=>{let h=g.currentPackage();if(h.partBytes===t.partBytes&&h.relationships===t.relationships&&h.contentTypes===t.contentTypes){for(let[x,k]of o){let I=h.parts.get(x)??(x===g.part().name?g.part():void 0);if(I&&k.isCompatibleWith(I,h)){a.set(x,I);continue}k.dispose(),o.delete(x),a.delete(x);}n=g.packageRevision(),t=h;return}for(let x of o.values())x.dispose();o.clear(),a.clear();for(let x of d.values())hb$1(x);d.clear(),s.clear(),e.resourceLookup||r.dispose(),n=g.packageRevision(),t=h,r=e.resourceLookup??rb$1(h,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return p(e.session.part().name,e.session).context},contextForPart(g){return p(g,e.session).context},cacheTokenForPart(g){let h=p(g,e.session);return `${l.get(h)??0}|${h.cacheTokenForPart()}`},drawingTokenForParagraph(g,h){return p(h,e.session).drawingTokenForParagraph(g)},mintValidatedBytes(g,h){let b=s.get(g.resourceKey);return !b||b.contentId!==g.contentId?null:fb$1(g,h)},sync(g){g.packageRevision()!==n&&m(g);},dispose(){for(let g of o.values())g.dispose();o.clear(),a.clear();for(let g of d.values())hb$1(g);d.clear(),s.clear(),e.resourceLookup||r.dispose();}})}function eh(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(";")}function Gw(e){let n=t=>{if(t.kind==="textValue"||dc$1(t)||bc$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 oh(e,n){for(let t of n.resultParagraphIds){let r=Fa$1(e,t);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&Gw(r))return true}return false}var nh=new WeakMap,th=new WeakMap,rh=new WeakMap;function Lc(e){let n=nh.get(e);if(n)return n;let t=new Set;for(let r of Ac$1(e))t.add(r.beginParagraphId),t.add(r.endParagraphId);return nh.set(e,t),t}function Mc(e){let n=th.get(e);if(n)return n;let t=new Set;for(let r of Ac$1(e))oh(e,r)||t.add(r.beginParagraphId);return th.set(e,t),t}function Fc(e){let n=rh.get(e);if(n)return n;let t=new Set;for(let r of Ac$1(e))if(!oh(e,r))for(let o of r.resultParagraphIds)t.add(o);return rh.set(e,t),t}var Xw=4,ah=256;function $w(e){return `txbx-${e}`}function kl(e,n){let t=e.textboxStory;if(!t)return null;let r=rn(e.extentEmu.cx),o=rn(e.extentEmu.cy),a=rn(t.insetsEmu.left),i=rn(t.insetsEmu.right),l=rn(t.insetsEmu.top),s=rn(t.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-l-s),u=rn(t.strokeWidthEmu),f={fillHex:t.fillHex,strokeHex:t.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((n.depth??0)>=Xw)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:l},...f,fallbackReason:"textbox-nesting-limit"};let m=Om(t.content,n.displayMode),g=$w(e.drawingNodeId),h=0,b=br(m,0,d,0,0,{measurer:n.measurer,cache:n.cache,producer:`${n.producer}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${g}-line-${h++}`,styleCascade:n.styleCascade,...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}:{}}),x=b.blocks,k=b.bottom,I;if(x.length>ah){x=x.slice(0,ah);let P=x[x.length-1];k=P?P.box.y+P.box.height:0,I="textbox-fragment-limit";}if(k>c+.001){let P=x.filter(L=>L.box.y<c-.001);P.length<x.length&&(x=P,I=I??"textbox-height-clip");}let B=Math.max(0,c-k),F=t.verticalAnchor==="center"?B/2:t.verticalAnchor==="bottom"?B:0;return {fragments:x,flowHeight:k,contentOffset:{x:a,y:l+F},...f,...I?{fallbackReason:I}:{}}}var Vw=128,ih=new WeakMap;function Yw(e){let n=ih.get(e);if(n!==void 0)return n;let t=y(xa$1(e));return ih.set(e,t),t}function Kw(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 Uw(e,n,t,r,o,a,i,l=Vw,s,d=pn,c,u,f,p,m){let g=sd(e.root),h=Kw(l),b=Rt(e,d),x=Yw(e),k,I=B=>{let F=Ht(g)||c?B:void 0,P=F?.pageNumber??p?.pageNumber??1,L=pd(F,g)+(c?`|pn:${P}`:"");if(L===""){if(k)return k}else {let R=h.get(L);if(R)return R}let O=0,T=[],y=()=>{let R=F?.pageNumber??p?.pageNumber??1,M=p?.pageWidth??n,_=p?.pageHeight??Math.max(1,n),A=p?.marginLeft??0,v=p?.marginRight??0,z=p?.marginTop??0,C=p?.marginBottom??0,U=Math.max(1,_-z-C);return Object.freeze({pageNumber:R,pageWidth:M,pageHeight:_,marginLeft:A,marginRight:v,marginBottom:C,contentInsetTop:z,contentInsetBottom:C,contentWidth:n,contentHeight:U,contentBandHeight:U,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},D=Object.freeze([]),G;if(c){let R=false;for(let M=0;M<mr;M+=1){T.splice(0,T.length),O=0,G=br(b,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+L+(d===pn?"":`|rev:${d}`),nextLineId:()=>`hf-${e.name}-line-${O++}`,styleCascade:a,pageContext:F,...s!==void 0?{defaultTabStopPt:s}:{},displayMode:d,...m?{documentProperties:m}:{},inlineDrawingLayout:c,anchorFrameBase:y,pageContentClip:()=>sa(y()),layoutTextboxStoryFor:A=>kl(A,{measurer:t,producer:r+L+(d===pn?"":`|rev:${d}`),cache:o,styleCascade:a,...F?{pageContext:F}:{},...s!==void 0?{defaultTabStopPt:s}:{},displayMode:d,...m?{documentProperties:m}:{},inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{}}),collectAnchoredDrawings:A=>{T.push(...A);},columnBoxForParagraph:A=>Object.freeze({x:0,y:A.y,width:n,height:A.height}),pageExclusionZones:()=>D,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{}});let _=Dd(T,c,0,n);if(_.length===0){R=true,D=_;break}if(M>0&&ot(D)===ot(_)){R=true,D=_;break}D=_;}if(!R)throw new io(`header/footer exclusion reflow did not converge within ${mr} passes`)}else G=br(b,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+L+(d===pn?"":`|rev:${d}`),nextLineId:()=>`hf-${e.name}-line-${O++}`,styleCascade:a,pageContext:F,...s!==void 0?{defaultTabStopPt:s}:{},displayMode:d,...m?{documentProperties:m}:{}});let ee={partName:e.name,contentKey:x,fragments:G.blocks,flowHeight:G.bottom,pageFieldNeeds:g,...T.length>0?{anchoredDrawings:Object.freeze([...T])}:{},withPageContext:R=>!Ht(g)&&!ee.anchoredDrawings?.length?k??ee:I(R)};return L===""?k=ee:h.set(L,ee),ee};return I(i)}function Ca(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 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)}))}},l=a(e.header),s=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),...l?{header:l}:{},...s?{footer:s}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}function Zw(e){let n=[],t=r=>{if(r.kind==="table"){for(let o of r.rows)for(let a of o.cells)for(let i of a.blocks)t(i);return}for(let o of r.lines)for(let a of o.drawings??[])n.push(Tl(a.resource));};for(let r of e.anchoredDrawings??[])n.push(Tl(r.resource));for(let r of e.fragments)t(r);return n.length===0?"":`!${n.join("!")}`}function lh(e,n,t){if(!e)return "";let r=(o,a)=>[...a].map(([i,l])=>`${o}${i}=${l.flowHeight}@${l.contentKey}${Zw(l)}`).sort().join(",");return `|hf:${n},${t},${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};`+r("h",e.headers)+";"+r("f",e.footers)}function sh(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 qw="http://schemas.openxmlformats.org/wordprocessingml/2006/main",Jw="http://schemas.microsoft.com/office/word/2010/wordml",Qw="http://schemas.microsoft.com/office/word/2012/wordml";function eR(e){if(e.kind!=="textValue"){for(let n of e.attributes)if(n.localName==="val"&&n.namespaceUri===qw)return n.value}}function Ba(e){for(let n of e.children)if(n.kind!=="textValue"&&(n.kind==="contentControlProperties"||n.localName==="sdtPr"))return n}function xo(e,n){if(e){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}}function Yt(e,n){let t=xo(e,n);return t?eR(t):void 0}function Ol(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function Ec(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===Jw)return "checkbox";if(r==="repeatingSection"&&o===Qw)return "repeatingSection"}return "richText"}function dh(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 Bl(e){let n=ch.get(e);if(n!==void 0)return n;let t=nR(e);return ch.set(e,t),t}var ch=new WeakMap,uh=new WeakMap;function nR(e){let n=(t,r)=>{if(t.kind==="textValue")return "";if(r===0&&(t.kind==="paragraph"||t.kind==="table")){let a=uh.get(t);if(a!==void 0)return a}let o;if(Lb$1(t)){if(r>=Kb$1)return "";let a=Ba(t),i=[t.id,Yt(a,"alias")??"",Yt(a,"tag")??"",Ol(Yt(a,"lock")),Ec(a),xo(a,"showingPlcHdr")?"1":"0",xo(a,"dataBinding")?"1":"0"].join(":"),l=Ob$1(t).map(s=>n(s,r+1)).filter(s=>s.length>0);o=[i,...l].join("|");}else o=t.children.map(a=>n(a,r)).filter(a=>a.length>0).join("|");return r===0&&(t.kind==="paragraph"||t.kind==="table")&&uh.set(t,o),o};return n(e.root,0)}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 fh=new WeakMap;function tR(e){let n=fh.get(e);if(n!==void 0)return n;let t=rR(e),r=new Set,o=new Set;for(let i of t){for(let l of i.blockIds)r.add(l);i.paragraphId!==void 0&&o.add(i.paragraphId);}let a={controls:t,neededBlockIds:r,neededParagraphIds:o,neededToken:`${[...r].sort().join(",")};${[...o].sort().join(",")}`};return fh.set(e,a),a}function rR(e){let n=[],t=(i,l)=>{for(let s of i){if(s.kind==="paragraph"||s.kind==="table"){l.push(s.id);continue}if(Lb$1(s)){t(Ob$1(s),l);continue}(s.kind==="tableRow"||s.kind==="tableCell")&&t(s.children,l);}},r=(i,l,s,d,c)=>{let u=s;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=Ba(f),m=Ol(Yt(p,"lock")),g=[...c,m],h=u,b=r(Ob$1(f),l,u,d+1,g);n.push({control:f,nestingDepth:d,lockStack:g,level:"inline",paragraphId:l,range:{start:h,end:b},blockIds:[]}),u=b;continue}if(f.kind==="hyperlink"){u=r(f.children,l,u,d,c);continue}u+=Cl(f);}return u},o=(i,l,s)=>{for(let d of i){if(d.kind==="textValue")continue;if(d.kind==="paragraph"){r(d.children,d.id,0,l,s);continue}if(d.kind==="table"){for(let h of d.children)h.kind==="tableRow"&&o([h],l,s);continue}if(d.kind==="tableRow"){for(let h of d.children)h.kind==="tableCell"?o(h.children,l,s):Lb$1(h)&&o([h],l,s);continue}if(!Lb$1(d)||l>=Kb$1)continue;let c=Ba(d),u=Ol(Yt(c,"lock")),f=[...s,u],p=dh(d),m=Ob$1(d);if(p==="inline"){o(m,l+1,f);continue}let g=[];t(m,g),n.push({control:d,nestingDepth:l,lockStack:f,level:p,blockIds:g}),o(m,l+1,f);}},a=e.root.children.find(i=>i.kind==="body");if(a&&a.kind!=="textValue")for(let i of a.children){if(i.kind==="textValue")continue;let l=ph.get(i);if(l!==void 0){for(let d of l)n.push(d);continue}let s=n.length;o([i],0,[]),ph.set(i,Object.freeze(n.slice(s)));}return n}var ph=new WeakMap,Nc=1<<20,mh=new WeakMap,gh=null,hh=0;function oR(e){return e!==gh&&(gh=e,hh+=1),hh}function aR(e,n,t,r){let o=mh.get(e);if(o!==void 0&&o.neededStamp===t)return o;let a=[],i=[],l=e.index*Nc,s=(c,u)=>{if(u.kind==="paragraph"){n.neededBlockIds.has(u.paragraphId)&&(a.push({pageIndex:c,blockId:u.paragraphId,box:u.box}));let f=n.neededParagraphIds.has(u.paragraphId);for(let p of u.lines){let m=l;if(l=Math.min(l+1,e.index*Nc+Nc-1),!f)continue;let g=Math.max(0,p.box.height-p.leading-(p.trailingSpacing??0));for(let h of p.spans)i.push({pageIndex:c,paragraphId:h.range.paragraphId,start:h.range.start,end:h.range.end,line:m,box:{x:h.box.x,y:h.box.y+p.leading,width:h.box.width,height:g}});}return}n.neededBlockIds.has(u.tableId)&&(a.push({pageIndex:c,blockId:u.tableId,box:u.box}));for(let f of u.rows)if(!f.isHeaderRepeat)for(let p of f.cells)for(let m of p.blocks)s(c,m);};for(let c of e.fragments)s(e.index,c);let d={neededStamp:t,blocks:a,spans:i};return mh.set(e,d),d}function iR(e,n,t){let r=oR(n.neededToken),o=new Map,a=new Map;for(let i of e.pages){let l=aR(i,n,r);for(let s of l.blocks){let d=o.get(s.blockId);d?d.push(s):o.set(s.blockId,[s]);}for(let s of l.spans){let d=a.get(s.paragraphId);d?d.push(s):a.set(s.paragraphId,[s]);}}return {blocksById:o,spansByParagraph:a}}function lR(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 l=r.get(i.pageIndex);l?l.push(i.box):r.set(i.pageIndex,[i.box]);}}return [...r.entries()].sort(([a],[i])=>a-i).flatMap(([a,i])=>{let l=ai(i);return l?[{pageIndex:a,box:l}]:[]})}function sR(e,n,t,r){let o=t.spansByParagraph.get(e)??[],a=new Map,i=0,l=o.length;for(;i<l;){let s=i+(l-i>>1);(n.start===n.end?o[s].end<n.start:o[s].end<=n.start)?i=s+1:l=s;}for(let s=i;s<o.length;s+=1){let d=o[s];if(d.end<=n.start)continue;if(d.start>=n.end)break;let c=a.get(d.line);c?c.boxes.push(d.box):a.set(d.line,{pageIndex:d.pageIndex,boxes:[d.box]});}if(a.size===0&&n.start===n.end)for(let s=i;s<o.length;s+=1){let d=o[s];if(d.start>n.start)break;if(n.start>d.end)continue;let c=d.start===d.end?d.box.x:d.box.x+d.box.width*(n.start-d.start)/Math.max(1,d.end-d.start);return [{pageIndex:d.pageIndex,box:{x:c,y:d.box.y,width:0,height:d.box.height}}]}return [...a.entries()].sort(([s],[d])=>s-d).flatMap(([,s])=>{let d=ai(s.boxes);return d?[{pageIndex:s.pageIndex,box:d}]:[]})}function dR(e,n,t){let r=Ba(e.control),o=Yt(r,"alias"),a=Yt(r,"tag"),i=e.lockStack[e.lockStack.length-1]??"unlocked",l=e.level==="inline"&&e.paragraphId&&e.range?sR(e.paragraphId,e.range,n):lR(e.blockIds,n);return {id:e.control.id,...o!==void 0?{alias:o}:{},...a!==void 0?{tag:a}:{},controlType:Ec(r),lock:i,effectiveLock:js(e.lockStack),placeholder:xo(r,"showingPlcHdr")!==void 0,bound:xo(r,"dataBinding")!==void 0,nestingDepth:e.nestingDepth,level:e.level,fragments:l}}function cR(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 uR(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&&cR(e.fragments,n.fragments)}function So(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(!uR(e[t],n[t]))return false;return true}function Ac(e,n){return {revision:e.revision,pages:e.pages,...n.contentControls!==void 0?{contentControls:n.contentControls}:{},...n.controlContextToken!==void 0?{controlContextToken:n.controlContextToken}:{}}}var yh=new WeakMap;function Dc(e,n,t=Bl(n),r){if(t===""){let u=e.pages.some(p=>p.contentControls!==void 0&&p.contentControls.length>0);if(!u&&e.controlContextToken===t&&So(e.contentControls,[]))return e;let f=u?e.pages.map(p=>p.contentControls!==void 0&&p.contentControls.length>0?{...p,contentControls:[]}:p):e.pages;return {revision:e.revision,pages:f,contentControls:[],controlContextToken:t}}let o=tR(n),a=iR(e,o),i=o.controls.map(u=>dR(u,a)),l=new Map;for(let u of i)for(let f of u.fragments){let p=l.get(f.pageIndex),m={...u,fragments:[f]};p?p.push(m):l.set(f.pageIndex,[m]);}if(e.controlContextToken===t&&So(e.contentControls,i)&&e.pages.every(u=>So(u.contentControls,l.get(u.index)??[])))return e;let s=false,d=e.pages.map(u=>{let f=l.get(u.index)??[];if(So(u.contentControls,f)||f.length===0&&!u.contentControls)return u;s=true;let p=yh.get(u);if(p&&So(p.controls,f))return p.wrapped;let m={...u,contentControls:f};return yh.set(u,{controls:f,wrapped:m}),m}),c=s?d:e.pages;return c===e.pages&&e.controlContextToken===t&&So(e.contentControls,i)?e:{revision:e.revision,pages:c,contentControls:i,controlContextToken:t}}var Ll=4096,Kt=20,Xn=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 _c(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 xr(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 Sh(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 Ye=(e,n)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes??[])if(t.localName===n)return t.value}},Sr=(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 bh(e,n,t){let r=Ye(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 fR(e){if(!e)return 1;let n=Ye(e,"num");return !n||!/^\d{1,7}$/.test(n)?1:Math.max(1,Math.min(12,Number(n)))}function pR(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:_c(Ye(o,"w"),1,31680),gapTwips:a===n-1?0:Sh(Ye(o,"space"),t)});}return r}function mR(e){let n=e?Sr(e,"type"):void 0,t=n?Ye(n,"val"):void 0;return t==="continuous"||t==="evenPage"||t==="oddPage"||t==="nextColumn"?t:"nextPage"}var gR=new Set(["hyphen","period","colon","emDash","enDash"]);function Ph(e){let n=Sr(e,"pgNumType");if(!n||n.kind==="textValue")return;let t={},r=Ye(n,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let l=Number(r);Number.isFinite(l)&&l>=0&&l<=9999&&(t.start=l);}let o=Ye(n,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(t.fmt=o);let a=Ye(n,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let l=Number(a);Number.isFinite(l)&&l>=0&&l<=9&&(t.chapStyle=l);}let i=Ye(n,"chapSep");return i!==void 0&&gR.has(i)&&(t.chapSep=i),t}function Ml(e){if(!e)return Xn;let n=Sr(e,"pgSz"),t=Sr(e,"pgMar"),r=Sr(e,"cols"),o=Xn,a=n?Ye(n,"orient"):void 0,i=n?_c(Ye(n,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,l=n?_c(Ye(n,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,s=Ph(e),d=fR(r),c=r?Sh(Ye(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?bh(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:l},margins:{topTwips:t?xr(Ye(t,"top"),1440):o.margins.topTwips,rightTwips:t?xr(Ye(t,"right"),1440):o.margins.rightTwips,bottomTwips:t?xr(Ye(t,"bottom"),1440):o.margins.bottomTwips,leftTwips:t?xr(Ye(t,"left"),1440):o.margins.leftTwips,headerTwips:t?xr(Ye(t,"header"),720):o.margins.headerTwips,footerTwips:t?xr(Ye(t,"footer"),720):o.margins.footerTwips,gutterTwips:t?xr(Ye(t,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?bh(r,"sep",false):false,definitions:u?[]:pR(r,d,c)},landscape:a==="landscape"||i>l,titlePage:ta$1(e,"titlePg"),breakType:mR(e),...s!==void 0?{pageNumbering:s}:{}}}function hR(e){let n=t=>{if(t.kind!=="textValue"){if(t.kind==="body")return Sr(t,"sectPr");for(let r of t.children??[]){let o=n(r);if(o)return o}}};return n(e.root)}function Fl(e){let n=e.children.find(r=>r.kind==="paragraphProperties");if(!n)return;let t=Sr(n,"sectPr");return t&&t.kind!=="textValue"?t:void 0}function yR(e){let n=wh(e);return n[n.length-1]?.properties??Xn}function wh(e,n="all-markup"){return Rh(e,n).sections}function Rh(e,n="all-markup"){return Hc(e,Rt(e,n))}var xh=He(16);function Hc(e,n){let t=xh.get(n);if(t&&t.part===e)return t.result;let r=bR(e,n);return xh.set(n,{part:e,result:r}),r}function bR(e,n){let t=[],r=0,o=false;for(let i=0;i<n.length;i+=1){let l=n[i];if(l.kind!=="paragraph")continue;let s=Fl(l);if(s){if(t.length>=Ll){o=true;continue}t.push({index:t.length,properties:Ml(s),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=hR(e);if(r<n.length||t.length===0){if(t.length>=Ll){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:Ml(a),blockStart:r,blockEndExclusive:n.length});}else if(a){if(t.length>=Ll)return {sections:t,truncated:true};t.push({index:t.length,properties:Ml(a),blockStart:r,blockEndExclusive:n.length});}return {sections:t,truncated:o}}function Pr(e){let n=e.pageSize.widthTwips/Kt,t=e.pageSize.heightTwips/Kt,r=(e.margins.leftTwips+e.margins.gutterTwips)/Kt,o=e.margins.rightTwips/Kt,a=e.margins.topTwips/Kt,i=e.margins.bottomTwips/Kt;return n-r-o<=0||t-a-i<=0?jo:{width:n,height:t,margin:{top:a,right:o,bottom:i,left:r},headerDistance:Math.max(0,e.margins.headerTwips)/Kt,footerDistance:Math.max(0,e.margins.footerTwips)/Kt}}function zc(e,n){let t=Math.max(1,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,l;if(a){i=o.map(p=>Math.max(1,p.widthTwips/20)),l=o.slice(0,-1).map(p=>Math.max(0,p.gapTwips/20));let c=l.reduce((p,m)=>p+m,0),u=Math.max(r*1,t-c),f=i.reduce((p,m)=>p+m,0);if(f>u){let p=u/f;i=i.map(m=>Math.max(1,m*p));}}else {let c=Math.max(0,e.gapTwips/20),u=Math.min(c,Math.max(0,(t-r*1)/(r-1||1)));l=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(1,(t-l.reduce((p,m)=>p+m,0))/r);i=Array.from({length:r},()=>f);}let s=[],d=0;for(let c=0;c<r;c+=1)s.push(d),d+=i[c]+(l[c]??0);return {count:r,widths:i,gaps:l,lefts:s,separator:e.separator===true&&r>1}}function xR(e,n,t){return La(e,n,()=>t)}function La(e,n,t){let r=[],o=null,a=-1,i=-1;for(let l of n){let s=t(l.sectionIndex);if(l.customMarkFollows){r.push({noteId:l.noteId,mark:null});continue}o===null?(o=s.numStart,a=l.sectionIndex,i=l.pageIndex??-1):s.numRestart==="eachSect"&&l.sectionIndex!==a?(o=s.numStart,a=l.sectionIndex):s.numRestart==="eachPage"&&l.pageIndex!==void 0&&l.pageIndex!==i?(o=s.numStart,i=l.pageIndex):s.numRestart==="eachSect"?a=l.sectionIndex:s.numRestart==="eachPage"&&l.pageIndex!==void 0&&(i=l.pageIndex);let d=o;o+=1,r.push({noteId:l.noteId,mark:ht(s.numFmt,d),displayNumber:d});}return r}function Ih(e){let n=new Map;for(let t of e)n.set(t.noteId,t.mark);return n}var Po=xd$1,Ma=512,jc=6,SR=1/3;function vh(e,n){return `note-${e}-${n}`}function PR(e){if(!e)return [];let n=[];for(let t of zd$1(e.root)){if(n.length>=Po)break;qd$1(t)&&n.push(t);}return n}function Th(e,n){if(e){for(let t of zd$1(e.root))if(pd$1(t)===n)return t}}function Wc(e,n,t){let r=nd$1(e),o=od$1(e);if(!r||o===null)return null;let a=ed$1(r,o),i=Zi(e),l=vh(r,o),s=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(i,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|${a}`,nextLineId:()=>`${l}-line-${s++}`,styleCascade:t.styleCascade,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}:{}}:{}}),m=p.blocks,g=p.bottom,h;if(m.length>Ma){m=m.slice(0,Ma);let b=m[m.length-1];g=b?b.box.y+b.box.height:0,h="note-fragment-limit";}if(g>c){let b=[],x=0;for(let k of m){let I=k.box.y+k.box.height;if(I>c+.001&&b.length>0)break;b.push(k),x=I;}m=b,g=x,h=h??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:pd$1(e),fragments:m,flowHeight:g,...h?{fallbackReason:h}:{}}}function El(e,n,t,r){if(!e)return null;let o=Ad$1(e.root,n);return o?Wc(o,t,{...r,ownerPartName:e.name}):null}function kh(e,n){return "single"}function Oh(e){let n=Zi(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(pt(r)).length>0||!wR(t))return false}return true}function wR(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="paragraphProperties"){if(n.kind==="run"){if(!RR(n))return false;continue}return false}return true}function RR(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="runProperties"&&!(ld$1(n)||md$1(n)||kd$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 Fa(e,n,t,r,o,a){let i=kh(),l=Th(e,n);if(l){if(Oh(l))return {kind:n,fragments:[],flowHeight:jc,synthetic:false,ruleStyle:i};let s=Wc(l,t,{...r,...e?{ownerPartName:e.name}:{}});if(s&&s.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return s.flowHeight>d+.001?{kind:n,fragments:[],flowHeight:jc,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:n,fragments:s.fragments,flowHeight:s.flowHeight,synthetic:false}}}return {kind:n,fragments:[],flowHeight:jc,synthetic:true,ruleStyle:i}}function Ch(e,n){let t=Math.max(1,e*SR);return {x:0,y:Math.max(0,(n-.75)/2),width:t,height:.75}}function Nl(e,n,t,r){if(e.ruleStyle!==void 0||e.synthetic){let o=Ch(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 Xc=8,_h=4096,Hh=256,zh=14,$c=12;function IR(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 Al(e){return `${e.pos},${e.numFmt},${e.numStart},${e.numRestart}`}function vR(e){return e.drawingsForPart!==void 0&&e.drawingLayoutEpoch===void 0?null:[e.producer,e.defaultTabStopPt??"",e.drawingLayoutEpoch??"",Al(e.documentFootnoteProps),Al(e.documentEndnoteProps),e.footnotePropsBySection.map(Al).join(";"),e.endnotePropsBySection.map(Al).join(";")].join("\0")}var Bh=new WeakMap;function TR(e,n,t){if(!e)return {memo:null,allHits:n,reused:false};let r=vR(t);if(r===null)return e.notes=null,{memo:null,allHits:n,reused:false};let o=IR(n),a=e.notes;if(a&&a.hitsFingerprint===o){let l=Bh.get(a);if(a.inputFingerprint===r&&l&&l.footnotesPart===t.footnotesPart&&l.endnotesPart===t.endnotesPart&&l.measurer===t.measurer&&l.cache===t.cache&&l.styleCascade===t.styleCascade)return {memo:a,allHits:a.allHits,reused:true}}let i={hitsFingerprint:o,inputFingerprint:r,allHits:n,provisionalMarks:qc(n,t),finalMarks:null,pageAttach:new WeakMap,pageReserve:new WeakMap};return Bh.set(i,{footnotesPart:t.footnotesPart,endnotesPart:t.endnotesPart,measurer:t.measurer,cache:t.cache,styleCascade:t.styleCascade}),e.notes=i,{memo:i,allHits:n,reused:false}}function kR(e,n){return n>=e.range.start&&n<e.range.end}var Lh=new WeakMap;function jh(e){let n=Lh.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 l of i.cells)r(l.blocks);}};return r(e),Lh.set(e,t),t}function Yc(e){let n=new Map;for(let t of e){let r=n.get(t.paragraphId);r?r.push(t):n.set(t.paragraphId,[t]);}return n}function _l(e,n,t){let r=jh(e.fragments);if(!t)return n.filter(i=>r.some(l=>pc(l,i.paragraphId,i.atomOffset)));let o=[],a=new Set;for(let i of r)for(let l of Vt(i)){let s=t.get(l);if(s)for(let d of s)a.has(d)||pc(i,l,d.atomOffset)&&(a.add(d),o.push(d));}return o}function Wh(){let e=new Map;return {get(n,t,r,o,a,i,l){let d=`${n?.name??"none"}\0${o}\0${t}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=Fa(n,t,r,i,o,a);return e.set(d,u),u.fallbackReason&&l.push(u.fallbackReason),u}}}function OR(e,n){let t=[];for(let r of e){if(t.length>=Po)break;t.push({...r,sectionIndex:n.get(r.paragraphId)??0});}return t}function wo(e,n){return e.footnotePropsBySection[n]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function Kc(e,n){return e.endnotePropsBySection[n]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function Gh(e,n){return {measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,defaultTabStopPt:e.defaultTabStopPt,projectLink:e.projectLink,projectFieldLink:e.projectFieldLink,documentProperties:e.documentProperties,noteMarks:n,drawingsForPart:e.drawingsForPart}}function CR(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 Mh(e,n){return n===0?[...e]:e.map(t=>t.kind==="paragraph"?CR(t,n):{...t,box:{...t.box,y:t.box.y+n}})}function BR(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,l=a.box.y+a.box.height,s=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,l-i)},...s&&s.length>0?{borders:s}:{borders:void 0},bottomBorder:void 0,...e.shadingBox?{shadingBox:{...e.shadingBox,height:Math.max(0,l-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 LR(e){let n=0;for(let t of e)n=Math.max(n,t.box.y+t.box.height);return n}function Hl(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<Ma;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=BR(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,b=f.lines[0]?.box.height??f.box.height;if(r.length===0&&n>=g-.001&&b>g+.001){t?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let x=e.fragments.slice(a),k=x[0]?.box.y??0;return {head:[],headHeight:0,tail:Mh(x,-k),tailHeight:Math.max(0,e.flowHeight-k)}}a=u,i=null;}break}a=u;break}let l=[...i?[i]:[],...e.fragments.slice(a)];if(l.length===0)return {head:r,headHeight:o,tail:[],tailHeight:0};let s=l[0]?.box.y??0,d=Mh(l,-s),c=LR(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}function MR(e,n){let t="FootnoteReference";if(!n)return {...et,verticalAlign:"superscript"};let r=wt([],[{localName:"rStyle",attributes:{val:t}}],n);return Fe(r,n.themeFonts)}function FR(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=wo(n,c);if(u.numRestart==="eachPage"){i=true;for(let p=0;p<$c;p+=1){let m=ht(u.numFmt,u.numStart+p);m.length>0&&o.add(m);}}let f=Kc(n,c);if(f.numRestart==="eachPage"){i=true;for(let p=0;p<$c;p+=1){let m=ht(f.numFmt,f.numStart+p);m.length>0&&o.add(m);}}}if(!i||o.size===0)return;let l=MR("footnote",n.styleCascade),s,d=-1;for(let c of o){let u=n.measurer.measure(c,l);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(s?.length??0))&&(s=c,d=u);}return s}function Xh(e,n,t){let r=La("footnote",e,l=>wo(t,l)),o=La("endnote",n,l=>Kc(t,l)),a=new Map;for(let l of r)a.set(fr("footnote",l.noteId),l.mark);for(let l of o)a.set(fr("endnote",l.noteId),l.mark);let i=FR(a,t,e,n);return {marks:a,...i?{reservedMarkText:i}:{}}}function zl(e){let n=0;for(let t of e.fragments)n=Math.max(n,t.box.y+t.box.height);return n}function Vc(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 ER(e,n){if(n.marks.size===0)return e;let t=false,r=e.pages.map(o=>{if(!NR(o.fragments))return o;let a=$h(o.fragments,n);return a===o.fragments?o:(t=true,{...o,fragments:a})});return t?{revision:e.revision,pages:r}:e}var Fh=new WeakMap;function NR(e){let n=Fh.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 l of i.spans)if(l.projected&&l.noteNav?.direction==="to-note"){t=true;return}continue}for(let i of a.rows)for(let l of i.cells)r(l.blocks);}};return r(e),Fh.set(e,t),t}function $h(e,n){let t=false,r=e.map(o=>{if(o.kind==="paragraph"){let l=AR(o,n);return l!==o&&(t=true),l}let a=false,i=o.rows.map(l=>{let s=false,d=l.cells.map(c=>{let u=$h(c.blocks,n);return u===c.blocks?c:(s=true,{...c,blocks:u})});return s?(a=true,{...l,cells:d}):l});return a?(t=true,{...o,rows:i}):o});return t?r:e}function AR(e,n){let t=false,r=e.lines.map(o=>{let a=DR(o,n);return a!==o&&(t=true),a});return t?{...e,lines:r}:e}function DR(e,n){let t=false,r=e.spans.map(o=>{let a=_R(o,n);return a!==o&&(t=true),a});return t?{...e,spans:r}:e}function _R(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 HR(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function Vh(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function zR(e){for(let n=e.length-1;n>=0;n-=1)if(Vh(e[n]))return n;return Math.max(0,e.length-1)}function Uc(e,n,t,r,o,a,i,l){let s=new Map(a),d=n.filter(R=>R.noteKind==="footnote"),c=e.contentBox.width,u=Gh(t,r),f=[],p=0,m=_h,g=a.size>0?"continuationSeparator":"separator",h=Math.max(0,e.contentBox.height),b=l?.separatorCache?l.separatorCache.get(t.footnotesPart,g,c,"footnote",h,u,i):(()=>{let R=Fa(t.footnotesPart,g,c,u,"footnote",h);return R.fallbackReason&&i.push(R.fallbackReason),R})(),x=Math.max(0,e.contentBox.height-zl(e)-b.flowHeight),k=Math.max(0,e.contentBox.height-zh-b.flowHeight),I=l?.reserveColumnBudget?k:x,F={fullContentHeight:Math.max(0,e.contentBox.height-b.flowHeight),reasons:i};for(let[R,M]of a){let _=R.match(/^(footnote|endnote):(-?\d+)$/);if(!_||_[1]!=="footnote")continue;let A=Number(_[2]),v=Math.max(0,I-p);if(M.height<=v+.001)f.push({noteKind:"footnote",noteId:A,scopeId:R,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:M.height},fragments:M.fragments}),p+=M.height,s.delete(R);else {let z=Hl({fragments:M.fragments,flowHeight:M.height},v,F);z.head.length>0&&(f.push({noteKind:"footnote",noteId:A,scopeId:R,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:z.headHeight},fragments:z.head}),p+=z.headHeight),z.tail.length>0?s.set(R,{fragments:z.tail,height:z.tailHeight,mark:null}):s.delete(R);}}for(let R of d){if(f.length>=Po){i.push("note-count-limit");break}let M=El(t.footnotesPart,R.noteId,c,u);if(!M){i.push("missing-note-body");continue}let _=r.marks.get(fr("footnote",R.noteId))??null,A=Math.max(0,I-p);if(m-=M.fragments.length,m<0){i.push("note-area-fragment-limit");break}if(M.flowHeight<=A+.001)f.push({noteKind:"footnote",noteId:R.noteId,scopeId:M.scopeId,mark:R.customMarkFollows?null:_,box:{x:e.contentBox.x,y:0,width:c,height:M.flowHeight},fragments:M.fragments}),p+=M.flowHeight;else {let v=Hl(M,A,F);v.head.length>0&&(f.push({noteKind:"footnote",noteId:R.noteId,scopeId:M.scopeId,mark:R.customMarkFollows?null:_,box:{x:e.contentBox.x,y:0,width:c,height:v.headHeight},fragments:v.head}),p+=v.headHeight),v.tail.length>0&&s.set(M.scopeId,{fragments:v.tail,height:v.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:s};let P=b.flowHeight,L=P+p,O=zl(e),T;o==="beneathText"?T=e.contentBox.y+O:(T=e.contentBox.y+e.contentBox.height-L,T=Math.max(T,e.contentBox.y+O));let y=T+P,D=f.map(R=>{let M={...R,box:{...R.box,y}};return y+=R.box.height,M}),G=Nl(b,e.contentBox.x,c,T);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:T,width:c,height:L},separator:{kind:g,box:G,fragments:b.fragments,synthetic:b.synthetic,...b.ruleStyle!==void 0?{ruleStyle:b.ruleStyle}:{}},notes:D},nextCarry:s}}function Yh(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 Zc(e,n){let t=new Set;for(let r of jh(e.fragments))t.add(n.get(r.paragraphId)??0);return [...t].sort((r,o)=>r-o)}function Kh(e,n,t){for(let r=e.length-1;r>=0;r-=1)if(Zc(e[r],t).includes(n))return r;return Math.max(0,e.length-1)}function jR(e,n,t){let r=Kh(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=Zc(a,t);if(i.length!==0&&!i.includes(n))return o}return e.length}function WR(e){return e.map((n,t)=>n.index===t&&n.id===`page-${t}`?n:{...n,id:`page-${t}`,index:t})}function GR(e){let n=WR(e);return [...zt({revision:0,pages:n}).pages]}function XR(e,n,t,r,o,a,i,l){let s=new Map(a),d=[];if(n.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};let c=e.contentBox.width,u=Gh(t,r),f=l?.separatorKind??"separator",p=A=>A==="footnote"?t.footnotesPart:t.endnotesPart,m=t.endnotesPart??t.footnotesPart,g=Math.max(0,e.contentBox.height),h=l?.separatorCache?l.separatorCache.get(m,f,c,"endnote",g,u,i):(()=>{let A=Fa(m,f,c,u,"endnote",g);return A.fallbackReason&&i.push(A.fallbackReason),A})(),b=h.flowHeight,x=zl(e),k=e.endnotes?Math.max(x,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):x,I=HR(e),B=Math.max(0,I-k-b),P={fullContentHeight:Math.max(0,I-b),reasons:i},L=[],O=0,T=_h;for(let[A,v]of a){let z=A.match(/^(footnote|endnote):(-?\d+)$/);if(!z)continue;let C=z[1],U=Number(z[2]),q=Math.max(0,B-O);if(v.height<=q+.001)L.push({noteKind:C,noteId:U,scopeId:A,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:v.height},fragments:v.fragments}),O+=v.height,s.delete(A);else {let Y=Hl({fragments:v.fragments,flowHeight:v.height},q,P);Y.head.length>0&&(L.push({noteKind:C,noteId:U,scopeId:A,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:Y.headHeight},fragments:Y.head}),O+=Y.headHeight),Y.tail.length>0?s.set(A,{fragments:Y.tail,height:Y.tailHeight,mark:null}):s.delete(A);}}for(let A=0;A<n.length;A+=1){let v=n[A];if(L.length>=Po){i.push("note-count-limit"),d.push(...n.slice(A));break}let z=p(v.noteKind),C=El(z,v.noteId,c,u);if(!C){i.push("missing-note-body");continue}let U=r.marks.get(fr(v.noteKind,v.noteId))??null,q=Math.max(0,B-O);if(T-=C.fragments.length,T<0){i.push("note-area-fragment-limit"),d.push(...n.slice(A));break}if(C.flowHeight<=q+.001)L.push({noteKind:v.noteKind,noteId:v.noteId,scopeId:C.scopeId,mark:v.customMarkFollows?null:U,box:{x:e.contentBox.x,y:0,width:c,height:C.flowHeight},fragments:C.fragments}),O+=C.flowHeight;else {let Y=Hl(C,q,P);Y.head.length>0&&(L.push({noteKind:v.noteKind,noteId:v.noteId,scopeId:C.scopeId,mark:v.customMarkFollows?null:U,box:{x:e.contentBox.x,y:0,width:c,height:Y.headHeight},fragments:Y.head}),O+=Y.headHeight),Y.tail.length>0&&s.set(C.scopeId,{fragments:Y.tail,height:Y.tailHeight,mark:null}),d.push(...n.slice(A+1));break}}if(L.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};if(L.length===0)return {area:void 0,nextCarry:s,remainingRefs:d};let y=e.contentBox.y+k,D=y+b,G=L.map(A=>{let v={...A,box:{...A.box,y:D}};return D+=A.box.height,v}),ee=Nl(h,e.contentBox.x,c,y),R=b+O,M=Math.max(0,I-k),_=Math.min(R,M);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y,width:c,height:_},separator:{kind:f,box:ee,fragments:h.fragments,synthetic:h.synthetic,...h.ruleStyle!==void 0?{ruleStyle:h.ruleStyle}:{}},notes:G},nextCarry:s,remainingRefs:d}}function $R(e,n,t,r,o,a,i){let l=e,s=n;for(;s.size>0&&a.remaining>0;){let d=l[l.length-1],c=Yh(d,d.index+1,"footnote-drain"),u=Uc(c,[],t,r,"pageBottom",s,o,{separatorCache:i}),f=u.area?.notes.length??0;if(s=u.nextCarry,f===0){o.push("note-overflow-stalled"),u.area&&(l=[...l,{...c,footnotes:u.area}],a.remaining-=1);break}l=[...l,{...c,footnotes:u.area}],a.remaining-=1;}return s.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:l,carry:s}}function VR(e,n,t,r="endnote-overflow"){let o=Yh(t,n,r);return {pages:[...e.slice(0,n),o,...e.slice(n)],pageIndex:n}}function Eh(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,l=r-n,s=[...e];for(let d=n;d<r;d+=1){let c=s[d];s[d]={...c,pageFieldSource:{pageNumber:a+(d-n),sectionPageCount:l,...i?{format:i}:{}}};}return s}function Nh(e,n,t,r,o,a,i,l,s){if(t.length===0||e.length===0)return e;let d=[...e],c=[...t],u=new Map,f=n,p=0,m="separator",g=s?.stopBeforeIndex??Number.POSITIVE_INFINITY,h=s?.sectionStartIndex??n,b=s?.stopBeforeIndex!==void 0,x=s?.separatorCache;for(;c.length>0||u.size>0;){if(f>=d.length||f>=g){if(l.remaining<=0){i.push("note-overflow-page-limit");break}let F=d[Math.min(Math.max(f,1),d.length)-1]??d[d.length-1],P=Math.min(f,g,d.length),L=VR(d,P,F,"endnote-overflow");d=L.pages,f=L.pageIndex,b&&(g=P+1),p+=1,l.remaining-=1;}let k=d[f];if(!Vh(k)){f+=1;continue}let I=XR(k,c,r,o,a,u,i,{separatorKind:m,...x?{separatorCache:x}:{}});u=I.nextCarry,c=I.remainingRefs;let B=I.area?.notes.length??0;if(I.area){let F=d[f];d[f]={...F,endnotes:F.endnotes?{...I.area,notes:[...F.endnotes.notes,...I.area.notes],box:{...I.area.box,y:F.endnotes.box.y,height:F.endnotes.box.height+I.area.box.height}}:I.area};}else {if(u.size===0&&c.length===0)break;if(!I.area&&u.size===0&&c.length>0){f+=1,m="separator";continue}}if(B===0&&(u.size>0||c.length>0)&&k.fragments.length===0&&k.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")),b?d=Eh(d,h,Math.min(g,d.length)):p>0&&(d=Eh(d,h,d.length)),d}function Uh(e,n,t,r,o){let a=o??null,i=new Map,l=[],s=new Map,d=Yc(n),c=Wh();for(let f of e.pages){let p=Vc(f),g=_l(p,n,d).filter(L=>L.noteKind==="footnote"),h=g[0]?.sectionIndex??0,b=wo(t,h);if(b.pos==="sectEnd"||b.pos==="docEnd")continue;if(a&&s.size===0){let L=a.pageReserve.get(f);if(L&&L.allHits===n&&L.marks===r){for(let O of L.reasons)l.push(O);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-zh),k=s.size===0,I=l.length,{area:B,nextCarry:F}=Uc(p,g,t,r,b.pos,s,l,{reserveColumnBudget:true,separatorCache:c});s=F;let P=Math.min(B?.box.height??0,x);if(a&&k&&s.size===0&&a.pageReserve.set(f,{allHits:n,marks:r,reserve:P>0?P:0,reasons:l.slice(I)}),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(zl(Vc(f))+p>f.contentBox.height+.5){u=false;break}}return {reserves:i,stable:u,reasons:l}}function Zh(e,n,t,r){let o=r?.memo??null,a=[...r?.fallbackReasons??[]],i=r?.paragraphSectionIndex??new Map,l={remaining:Hh},s=Yc(n),d=Wh(),c=[],u=[];for(let I of e.pages)for(let B of _l(I,n,s)){let F={noteId:B.noteId,sectionIndex:B.sectionIndex,pageIndex:I.index,customMarkFollows:B.customMarkFollows};B.noteKind==="footnote"?c.push(F):u.push(F);}let f=o?[...c,...u].map(I=>`${I.noteId}|${I.sectionIndex}|${I.pageIndex??""}|${I.customMarkFollows?1:0}`).join(";"):"",p;o&&o.finalMarks&&o.finalMarks.sitesFingerprint===f?p=o.finalMarks.marks:(p=Xh(c,u,t),o&&(o.finalMarks={sitesFingerprint:f,marks:p}));let m=new Map,g=new Map,h=[],b=e.pages.map(I=>{let B=_l(I,n,s),F=B.filter(R=>R.noteKind==="footnote"),P=B.filter(R=>R.noteKind==="endnote");for(let R of P)if(Kc(t,R.sectionIndex).pos==="sectEnd"){let _=g.get(R.sectionIndex)??[];_.push(R),g.set(R.sectionIndex,_);}else h.push(R);for(let R of F){let M=wo(t,R.sectionIndex);if(M.pos==="sectEnd"){let _=g.get(R.sectionIndex)??[];_.push(R),g.set(R.sectionIndex,_);}else M.pos==="docEnd"&&h.push(R);}if(o&&m.size===0){let R=o.pageAttach.get(I);if(R&&R.allHits===n&&R.marks===p){for(let M of R.reasons)a.push(M);return R.attached}}let L=Vc(I),O=F[0]?.sectionIndex??0,T=wo(t,O),y,D=m.size===0,G=a.length;if(T.pos==="pageBottom"||T.pos==="beneathText"){let R=F.filter(_=>{let A=wo(t,_.sectionIndex).pos;return A==="pageBottom"||A==="beneathText"}),M=Uc(L,R,t,p,T.pos,m,a,{separatorCache:d});y=M.area,m=M.nextCarry;}let ee=y?{...L,footnotes:y}:L;return o&&D&&m.size===0&&o.pageAttach.set(I,{allHits:n,marks:p,attached:ee,reserve:0,reasons:a.slice(G)}),ee}),x=b.length;if(m.size>0){let I=$R(b,m,t,p,a,l,d);b=I.pages,m=I.carry;}if(g.size>0&&b.length>0){let I=[...g.keys()].sort((B,F)=>B-F);for(let B of I){let F=g.get(B),P=Kh(b,B,i),L=jR(b,B,i),O=P;for(let T=0;T<=P;T+=1)if(Zc(b[T],i).includes(B)){O=T;break}b=Nh(b,P,F,t,p,"sectEnd",a,l,{stopBeforeIndex:L,sectionStartIndex:O,separatorCache:d});}}return h.length>0&&b.length>0&&(b=Nh(b,zR(b),h,t,p,"docEnd",a,l,{separatorCache:d})),b.length!==x&&(b=GR(b)),{layout:ER({revision:e.revision,pages:b},p),fallbackReasons:a,noteMarks:p}}function YR(e){return Zd$1(e).map(n=>({noteKind:n.noteKind,noteId:n.noteId,paragraphId:n.paragraphId,atomOffset:n.atomOffset,customMarkFollows:n.customMarkFollows}))}function KR(e,n,t){let r=new Map,o=Rt(e,t);for(let a=0;a<n.length;a+=1){let i=n[a];for(let l=i.blockStart;l<i.blockEndExclusive;l+=1){let s=o[l];if(s){if(s.kind==="paragraph"){r.set(s.id,a);continue}for(let d of UR(s))r.set(d,a);}}}return r}var Ah=new WeakMap;function UR(e){let n=Ah.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),Ah.set(e,t),t}function wr(e){let n=new Map;for(let[t,r]of e)r>0&&n.set(t,r);return n}function Gc(e,n){let t=wr(e),r=wr(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 Dh(e,n){let t=wr(e);for(let[r,o]of n)o<=0||t.set(r,Math.max(t.get(r)??0,o));return t}function Dl(e){return [...wr(e)].map(([n,t])=>`${n}=${t}`).sort().join(",")}function qh(e,n,t,r,o){let a=YR(e),i=KR(e,n,t.displayMode??pn),l=OR(a,i),s=TR(t.session,l,r),d=s.memo,c=s.allHits,u=d?.provisionalMarks??qc(c,r),f=t.session?.notePageBottomReserves,p=f?wr(f):new Map,m=[],g=o({...t,noteMarks:u,pageBottomReserves:p}),h=new Set([Dl(p)]);for(let x=0;x<Xc;x+=1){let k=Uh(g,c,r,u,d);if(m=[...k.reasons],k.stable&&Gc(k.reserves,p))break;let I=k.stable?wr(k.reserves):Dh(p,k.reserves);if(Gc(I,p)){m.push("note-reflow-exhausted");break}let B=Dl(I);if(h.has(B)){I=Dh(p,k.reserves);let F=Dl(I);if(Gc(I,p)||h.has(F)){m.push("note-reflow-exhausted");break}}p=I,h.add(Dl(p)),g=o({...t,noteMarks:u,pageBottomReserves:p}),x===Xc-1&&m.push("note-reflow-exhausted");}let b=Zh(g,c,r,{fallbackReasons:m,paragraphSectionIndex:i,memo:d});return t.session&&(t.session.previous=b.layout,t.session.notePageBottomReserves=wr(p)),b.layout}function qc(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 Xh(t,r,n)}function Jh(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 ZR={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",lines:"hashed",box:"hashed"},qR={kind:"covered",id:"hashed",tableId:"hashed",fragmentIndex:"hashed",nestingDepth:"hashed",columnEdges:"hashed",rows:"hashed",box:"hashed"};function ny(e){return Object.keys(e).filter(n=>e[n]==="hashed")}var JR=ny(ZR),QR=ny(qR),Qh=new WeakMap;function ey(e){let n=Qh.get(e);if(n!==void 0)return n;let t=e.kind==="table"?JSON.stringify(QR.map(r=>e[r])):JSON.stringify(JR.map(r=>e[r]));return Qh.set(e,t),t}function ty(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&&ey(r)!==ey(o))return false}return true}function Jc(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 ry=Object.freeze([]),oy=new Map;function ay(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 jl(){return {previous:null,checkpoints:[],keys:[],context:"",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 iy(e,n){return [...e].map(([t,r])=>`${t}=${r.flowHeight}`).sort().join(",")}function sy(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${iy(e.headers)};f:${iy(e.footers)}`:""}function Wl(e,n,t){if(e.sectionFurniture)return e.sectionFurniture[n];if(n===t-1)return e.furniture}function eI(e,n){return e.map((t,r)=>{let o=Pr(t.properties),a=Wl(n,r,e.length),i=t.properties.pageNumbering,l=i?`pn:${i.start??""},${i.fmt??""},${i.chapStyle??""},${i.chapSep??""}`:"pn:",s=t.properties.columns,d=`cols:${s.count},${s.gapTwips},${s.equalWidth===false?0:1},${s.separator?1:0};${(s.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,sy(a),l,d].join(":")}).join("|")}function nI(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},()=>jl()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1};return e.multi=o,o}function tI(e){return e!=="continuous"}function rI(e,n){return e.width===n.width&&e.height===n.height}function oI(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 ly(e,n,t){e.previous=n,e.startLineCounter=0,e.endLineCounter=t,e.keys=[],e.checkpoints=[],e.context="";}function dy(e,n,t,r,o){let{session:a,...i}=r,l=eI(n,r),s=nI(a,l,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,h=0,b=0,x=0,k=0,I=0,B=true,F=null,P="",L=1;for(let y=0;y<n.length;y+=1){let D=n[y],G=e.slice(D.blockStart,D.blockEndExclusive),ee=Pr(D.properties),R=Wl(r,y,n.length),M=u.length,_=m,A=s?.spans[y],v=sy(R);if(G.length===0&&!tI(D.properties.breakType)){p.push({startIndex:M,pageCount:0,sheetY:_,remappedPages:[]});continue}let z=y>0&&D.properties.breakType==="continuous"&&u.length>0&&B&&F!==null&&rI(F,ee)&&P===v,C=s?.sections[y],U=D.properties.columns.count>1&&n[y+1]?.properties.breakType==="continuous",q=o(G,t,{...i,retainKeys:d,geometry:ee,furniture:R,sectionColumns:D.properties.columns,...U?{balanceColumns:U}:{},lineCounterStart:g,pageIndexStart:z?M-1:M,...z?{flowStartY:k,spaceBeforeCarry:I}:{},...C?{session:C}:{}});g=q.lineCounter,k=q.endCursorY,I=q.endSpaceAfter,B=q.endsOpenPage,F=ee,P=v,C?(h+=C.stats.placed,b+=C.stats.total):(h+=G.length,b+=G.length);let Y=C!==void 0&&C.stats.placed===0&&C.stats.reusedPages===q.pages.length&&A!==void 0&&A.pageCount===q.pages.length,H=A!==void 0&&A.startIndex===M&&A.sheetY===_&&A.remappedPages.length===q.pages.length,X=D.properties.pageNumbering,Z=X?.start!==void 0?X.start:L,re=X?.fmt,J;if(z){let se=u.length-1,be=u[se],fe=oI(be,q.pages[0]);if(fe!==be){u[se]=fe;let Me=f.lastIndexOf(be);Me!==-1&&(f[Me]=fe);}let de=[];for(let Me of q.pages.slice(1)){let Ce=Ca(Me,u.length+de.length,m);de.push(Ce),m=Ce.box.y+Ce.box.height+24;}let Ie=de.length+1;J=Kr(de,Z+1,Ie,re);for(let Me of J)u.push(Me),f.push(Me);L=Z+Ie;}else if(Y&&H){J=A.remappedPages,x+=J.length;for(let se of J)u.push(se),f.push(se),m=se.box.y+se.box.height+24;L=Z+J.length;}else {let se=[];for(let be of q.pages){let fe=Ca(be,u.length+se.length,m);se.push(fe),m=fe.box.y+fe.box.height+24;}J=Kr(se,Z,se.length,re);for(let be of J)u.push(be),f.push(be);L=Z+J.length;}p.push({startIndex:M,pageCount:J.length,sheetY:_,remappedPages:J});}if(u.length===0){let y=Pr(n[0]?.properties??Xn),D=o([],t,{...i,retainKeys:d,geometry:y,sectionColumns:n[0]?.properties.columns??Xn.columns});c();let G=zt({revision:t,pages:D.pages});return s&&(s.spans=[],s.previousRemapped=D.pages,s.previousFinalized=G,s.previousPageCount=G.pages.length),a&&(ly(a,G,g),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),G}let O=zt({revision:t,pages:u}),T=O;if(s?.previousFinalized&&s.previousPageCount===O.pages.length&&s.previousRemapped.length===f.length){let y=s.previousFinalized.pages,D=s.previousRemapped,G=O.pages.map((ee,R)=>f[R]===D[R]&&y[R]?y[R]:ee);T={revision:t,pages:G};}return s&&(s.spans=p,s.previousRemapped=f,s.previousFinalized=T,s.previousPageCount=T.pages.length),a&&(ly(a,T,g),a.stats={placed:h,total:b||1,reusedPages:x,fullPasses:a.stats.fullPasses+(h===b&&x===0?1:0)}),c(),T}function Gl(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 aI=2;function iI(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 cy=new WeakMap,uy=new WeakMap;function lI(e,n,t){let r=t.displayMode??pn,o=Rt(e,r),a=Hc(e,o).sections,i=Bl(e),l={...t,producer:`${t.producer??"unversioned-measurer"}|cc:${i}`,tocFieldChromeParagraphIds:t.tocFieldChromeParagraphIds??Lc(e),emptyTocPlaceholderParagraphIds:t.emptyTocPlaceholderParagraphIds??Mc(e),emptyTocSuppressedResultParagraphIds:t.emptyTocSuppressedResultParagraphIds??Fc(e)},s=t.drawingSourceOrder;!s&&t.inlineDrawingLayout&&(s=uy.get(t.inlineDrawingLayout),s||(s=(()=>{let p=new Map;return db$1(e).forEach((m,g)=>{p.set(m.drawingNodeId,g);}),p})(),uy.set(t.inlineDrawingLayout,s)));let d=fc(s?{...l,drawingSourceOrder:s}:l,o),c=p=>{if(a.length>1)return dy(o,a,n,p,Ro);let m=a[0],g=p.geometry??(m?Pr(m.properties):jo),h=Wl(p,0,a.length)??p.furniture,b=Ro(o,n,{...p,geometry:g,furniture:h,sectionColumns:m?.properties.columns??Xn.columns}),x=m?.properties.pageNumbering,k=Ac({revision:b.layout.revision,pages:Kr(b.pages,x?.start??1,b.pages.length,x?.fmt)},b.layout),I=zt(k);return p.session&&(p.session.multi=null,p.session.previous=I),I},u=p=>{let m=Dc(p,e,i);return t.session&&(t.session.previous=m),m};if(!t.notes)return u(c(d));let f=Jh(t.notes,t);return u(qh(e,a,d,f,c))}function fy(e,n,t,r){let o=`line:${e}:${t}:${n}`;return r===void 0?o:`${o}:occ:${r}`}function Rr(e,n$1,t){let r=t.geometry,o=r.width-r.margin.left-r.margin.right,a=zc(t.sectionColumns??Xn.columns,o);if(t.inlineDrawingLayout&&t.drawingExclusionPass===void 0&&!t.drawingExclusionConverged){let w=Q=>t.drawingSourceOrder?.get(Q),V=Object.freeze({columnCount:a.count,columnGapPt:a.gaps[0]??0,contentWidth:o,columnLefts:a.lefts,columnWidths:a.widths}),N=new Map,ae=null,te=false,ge=new Set,ue=t.session?.previous?.pages;if(ue){N=da(ue,t.inlineDrawingLayout,o,w,V),ae=Ro(e,n$1,{...t,drawingExclusionPass:0,drawingExclusionZonesByPage:N});let Q=da(ae.pages,t.inlineDrawingLayout,o,w,V);if(Hi(N,Q))return ae;N=new Map(Q),ge.add(zi(Q));}for(let Q=0;Q<mr;Q+=1){ae=Ro(e,n$1,{...t,session:void 0,drawingExclusionPass:Q,drawingExclusionZonesByPage:N});let he=da(ae.pages,t.inlineDrawingLayout,o,w,V);if(he.size===0){te=true,N=he;break}let Se=zi(he);if(ge.has(Se)){te=true,N=he;break}if(ge.add(Se),Q>0&&Hi(N,he)){te=true,N=he;break}N=new Map(he);}if(!te)for(let Q=0;Q<aI&&!te;Q+=1){ae=Ro(e,n$1,{...t,session:void 0,drawingExclusionPass:mr+Q,drawingExclusionZonesByPage:N});let he=da(ae.pages,t.inlineDrawingLayout,o,w,V),Se=zi(he);if(Hi(N,he)||ge.has(Se)){te=true,N=he;break}ge.add(Se),N=new Map(he);}if(!te)throw new io(`wrap exclusion reflow did not converge within ${mr} passes`);return Ro(e,n$1,{...t,drawingExclusionConverged:true,drawingExclusionZonesByPage:N})}let i=t.measurer,l=t.cache,s=t.styleCascade,d=t.listItems,c=t.defaultTabStopPt,u=t.displayMode??pn,f=u==="all-markup",p=t.tocFieldChromeParagraphIds,m=t.emptyTocPlaceholderParagraphIds,g=t.emptyTocSuppressedResultParagraphIds,h=(t.producer??"unversioned-measurer")+(s?`|sc:${s.cacheToken}`:"")+(t.noteMarks?`|nm:${wp(t.noteMarks)}`:"")+(c!==void 0?`|dts:${c}`:"")+(u===pn?"":`|rev:${u}`),b=a.widths[0],x=t.furniture,k=r.headerDistance??36,I=r.footerDistance??36,B=w=>{let V=0;for(let N of w?.values()??[])V=Math.max(V,N.flowHeight);return V},F=r.height*.4,P=Math.min(F,Math.max(r.margin.top,x?k+B(x.headers):0)),L=Math.min(F,Math.max(r.margin.bottom,x?I+B(x.footers):0)),O=r.height-P-L,T=t.pageBottomReserves,y=t.session,D=t.lineCounterStart??0,G=lh(x,k,I),ee=t.flowStartY??0,R=t.spaceBeforeCarry??0,M=t.pageIndexStart??0,_=T?`|nr:${[...T].map(([w,V])=>`${w}=${V}`).join(",")}`:"",A=t.columnRegionBottom,v=`|cols:${a.widths.join(",")};${a.gaps.join(",")};${a.separator?1:0}${A!==void 0?`;bal:${A}`:""}`,z=`${h}|${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|fs:${ee},${R}${G}${_}${v}`,C=M&1,U=false,q=null,Y=()=>{U=true;},H=[],X=()=>{let w=Math.max(1,O-(T?.get(H.length)??0));return A!==void 0&&H.length===0?Math.max(1,Math.min(w,A)):w},Z=(w,V)=>{let N=w.kind==="paragraph"?t.drawingTokenForParagraph?.(w)??t.drawingLayoutToken??"":w.kind==="table"&&t.drawingTokenForParagraph?eh(w,t.drawingTokenForParagraph):"",ae=w.kind==="table"?iI(w,d):d?.get(w.id)?.cacheToken??"",te=cy.get(w);if(te&&te.contentWidth===V&&te.producer===h&&te.drawingToken===N&&te.listToken===ae)return te.entry;let ge;if(w.kind==="table")ge={kind:"table",table:w,key:pr({paragraph:w,properties:[],width:V,producer:h,...N?{drawingToken:N}:{}})};else {let ue=d?.get(w.id),Q=ha(w,V,s,ue),{props:he,indent:Se,available:ye,alignment:Re,spacing:ke,lineSpacing:ve,contextualSpacing:nn,styleId:ie,shading:De,inheritedRunProperties:Oe,markRunProperties:Ne}=Q,it=pm(w.children.find(Qt=>Qt.kind==="paragraphProperties"),s),Xe=Ks(it),lt=Ko(Q.tabStops,c),xn=lt===Q.tabStops?Q.tabStopsCacheToken:sr(lt);ge={kind:"paragraph",paragraph:w,props:he,indent:Se,available:ye,alignment:Re,spacing:ke,lineSpacing:ve,contextualSpacing:nn,styleId:ie,borders:it,borderGroupKey:Xe===""?"":`${Xe}@${Se.left},${Se.left+ye}`,shading:De,inheritedRunProperties:Oe,markRunProperties:Ne,tabStops:lt,keeps:mm(he),...ue?{listItem:ue}:{},key:pr({paragraph:w,properties:[...he,...Oe,...Ne,{localName:"tabStops",attributes:{token:xn}},...ue?[{localName:"list",attributes:{token:ue.cacheToken}}]:[]],width:ye,producer:h,...N?{drawingToken:N}:{}})};}return cy.set(w,{contentWidth:V,producer:h,drawingToken:N,listToken:ae,entry:ge}),ge},re=t.drawingTokenForParagraph===void 0&&t.drawingLayoutToken===void 0?t.drawingLayoutEpoch??"":t.drawingLayoutEpoch??null,J=y?.prepass,se=J!=null&&re!==null&&J.drawingEpoch===re&&J.producer===h&&J.contentWidth===b&&J.styleCascade===s&&J.listItems===d&&J.bodies.length===e.length&&J.bodies.every((w,V)=>w===e[V]),be=se?J:fe();function fe(){let w=e.map(te=>Z(te,b)),V=w.map(te=>te.key),N=w.map(te=>te.kind==="paragraph"&&te.keeps.keepNext),ae=w.map(te=>te.kind==="paragraph"?d?.get(te.paragraph.id)?.markerText:void 0);return {bodies:e,producer:h,contentWidth:b,styleCascade:s,listItems:d,drawingEpoch:re??"",prepared:w,keys:V,paragraphDocumentOrder:Xg(w,b,s,u),keepsNext:N,markerTexts:ae,flowKeys:ym(bm(V,te=>N[te]),te=>ae[te])}}y&&re!==null&&!se&&(y.prepass=be);let{prepared:de,keys:Ie,paragraphDocumentOrder:Me,keepsNext:Ce,flowKeys:Qe}=be,yn=()=>{t.retainKeys!==false&&(t.retainKeys===void 0&&l&&!(l.retentionPassDue?.()??true)||Cp(l,t.retainKeys,Ie,de.flatMap(w=>w.kind==="table"?[w.table]:[])));},We=y?.previous??null,Nn=We!==null&&y!==void 0&&y.context===z&&(!y.parityDependent||y.startPageParity===C),$n=a.count===1&&Nn,Ke=0;if(Nn){let w=Math.min(Qe.length,y.keys.length);for(;Ke<w&&Qe[Ke]===y.keys[Ke];)Ke+=1;}let bn=0;if($n){let w=Math.min(Qe.length,y.keys.length)-Ke;for(;bn<w&&Qe[Qe.length-1-bn]===y.keys[y.keys.length-1-bn];)bn+=1;}if(Nn&&Ke===de.length&&de.length===y.keys.length){let w=Ac({revision:n$1,pages:We.pages},We),V=D+(y.endLineCounter-y.startLineCounter);return y.previous=w,y.startLineCounter=D,y.endLineCounter=V,y.startPageParity=C,y.stats={placed:0,total:de.length,reusedPages:We.pages.length,fullPasses:y.stats.fullPasses},yn(),{layout:w,pages:w.pages,lineCounter:V,endCursorY:y.endCursorY,endSpaceAfter:y.endSpaceAfter,endsOpenPage:y.endsOpenPage}}let _e=[],On=0,qt=0,Ue=()=>a.lefts[On],He=()=>a.widths[On],E=()=>({text:{left:Ue(),width:He()},margin:{left:0,width:o},page:{left:-r.margin.left,width:r.width}}),S=()=>_e.length>qt,W=[],$=[],K=new Map,j=ee,Pe=ee,ce=0,ze=D,we=R,on=[],dn=()=>({pageCount:H.length,pageFragments:[..._e],pendingAnchoredDrawings:[...W],deferredAnchoredDrawings:$.length>0?[...$]:ry,anchorPageDeferCounts:K.size>0?new Map(K):oy,cursorY:j,lineCounter:ze,previousSpaceAfter:we,flowColumnIndex:ce}),an=0,cn=0,en=0,Ge=ee===0;if($n&&Ke>0&&Ke<y.checkpoints.length){let w=y.checkpoints[Ke];H.push(...We.pages.slice(0,w.pageCount)),_e=[...w.pageFragments],W=[...w.pendingAnchoredDrawings],$=[...w.deferredAnchoredDrawings],K.clear();for(let[V,N]of w.anchorPageDeferCounts)K.set(V,N);j=w.cursorY,ce=w.flowColumnIndex,On=w.flowColumnIndex,ze=w.lineCounter,we=w.previousSpaceAfter,an=Ke,Ge=false,en=H.length,on.push(...y.checkpoints.slice(0,Ke));}let Ee=w=>({x:0,y:w*(r.height+24),width:r.width,height:r.height}),xe=w=>x?.titlePage&&w===0?"first":x?.evenAndOddHeaders&&(M+w+1)%2===0?"even":"default",Ot=(w,V,N)=>{if(!x)return;let ae=xe(V),te=(w==="header"?x.headers:x.footers).get(ae);if(!te)return;let ge=ke=>{let ve=w==="header"?N.y+k:N.y+r.height-I-ke.flowHeight;return {kind:w,variant:ae,partName:ke.partName,...ke.rId?{rId:ke.rId}:{},box:{x:N.x+r.margin.left,y:ve,width:o,height:ke.flowHeight},fragments:ke.fragments,...ke.anchoredDrawings?{anchoredDrawings:ke.anchoredDrawings}:{}}},ue=M+V+1,Q={pageNumber:ue,pageCount:Math.max(ue,H.length+1),sectionPageCount:V+1},he=te.pageFieldNeeds,ye=Ht(he)||(te.anchoredDrawings?.length??0)>0?te.withPageContext(Q):te,Re=ge(ye);return Ht(he)?{...Re,pageFieldProjector:ke=>ge(te.withPageContext(ke))}:Re},at=a.count,Jt=Ue,Kl=w=>Object.freeze({x:a.lefts[ce]??0,y:w.y,width:a.widths[ce]??b,height:w.height}),Ul=()=>Object.freeze({pageNumber:M+H.length+1,onPageParityRead:Y,pageWidth:r.width,pageHeight:r.height,marginLeft:r.margin.left,marginRight:r.margin.right,marginBottom:r.margin.bottom,contentInsetTop:P,contentInsetBottom:L,contentWidth:b,contentHeight:X(),contentBandHeight:O,ownerPartName:t.inlineDrawingLayout?.ownerPartName??n,storyKind:"body"}),iu=()=>sa(Ul()),Zl=w=>t.drawingSourceOrder?.get(w),Da=w=>{if(w.length===0)return;for(let N of w)W.some(ae=>ae.drawingNodeId===N.drawingNodeId)||W.push(N.sourceOrder===void 0&&Zl(N.drawingNodeId)!==void 0?Object.freeze({...N,sourceOrder:Zl(N.drawingNodeId)}):N);if(!t.inlineDrawingLayout)return;let V=Qp(W,{pageBottom:X()});if(W.splice(0,W.length,...V.drawings),V.deferred.length>0)for(let N of V.deferred){let ae=(K.get(N.drawingNodeId)??0)+1;K.set(N.drawingNodeId,ae),ae>=Ld?W.push(Ad(N,"page-defer-exhausted")):$.push(N);}},lu=()=>{if($.length===0)return;let w=$.map(V=>Ed(V,j-V.y));$=[],Da(w);},vr=()=>{let w=H.length,V=Ee(w),N=Ot("header",w,V),ae=Ot("footer",w,V),{usedBottom:te,hasBodyPageFields:ge}=md(_e,Pe);H.push({id:`page-${w}`,index:w,box:V,contentBox:{x:V.x+r.margin.left,y:V.y+P,width:o,height:O},fragments:_e,hasBodyPageFields:ge,...a.separator?{columnSeparators:a.gaps.map((ue,Q)=>({x:a.lefts[Q]+a.widths[Q]+ue/2-.375,y:Pe,width:.75,height:Math.max(0,te-Pe)}))}:{},...W.length>0?{anchoredDrawings:Jp(W)}:{},...N?{header:N}:{},...ae?{footer:ae}:{}}),_e=[],W=[],j=0,On=0,ce=0,Pe=0,qt=0;},Xy=(w,V)=>{if(w.kind!=="paragraph"||w.listItem!==void 0||w.shading!==void 0)return false;let{top:N,bottom:ae,left:te,right:ge,between:ue}=w.borders;if(N??ae??te??ge??ue)return false;let Q=t.inlineDrawingLayout;return Q&&Mn(w.paragraph,Q).length>0?false:V.every(he=>he.drawings.length===0&&!he.pageBreakAfter&&!he.columnBreakAfter&&he.spans.every(Se=>Se.text.length===0))},vo=()=>{if(On+1<a.count){On+=1,ce=On,j=Pe,we=0,qt=_e.length;return}vr(),lu();},su=w=>kl(w,{measurer:i,producer:h,cache:l,styleCascade:s,...c!==void 0?{defaultTabStopPt:c}:{},...u?{displayMode:u}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},inlineDrawingLayout:t.inlineDrawingLayout,drawingTokenForParagraph:t.drawingTokenForParagraph}),Ct={measurer:i,cache:l,producer:h,onCellBreakKey:w=>{q?.push(w);},nextLineId:(w,V,N,ae)=>(ze+=1,fy(w,V,N,ae)),pageOccurrenceKey:()=>String(H.length),styleCascade:s,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:Ul,pageContentClip:iu,layoutTextboxStoryFor:su,publishAnchoredDrawings:Da,collectAnchoredDrawings:Da,columnBoxForParagraph:Kl,pageExclusionZones:()=>t.drawingExclusionZonesByPage?.get(H.length)??Object.freeze([]),paragraphOrderIndex:w=>Me.get(w),onAnchorShift:(w,V)=>Od(W,w,V),onAnchorRepublish:(w,V)=>{for(let N=W.length-1;N>=0;N-=1)W[N].anchorParagraphId===w&&W.splice(N,1);W.push(...V);}}:{},borderOwnershipBudget:Ji(),vMergeResolveBudget:Pc(),displayMode:u},ql=w=>gl(d?.get(w.paragraph.id)??w.listItem,w.indent,i,w.tabStops,w.available),Jl=(w,V,N=0)=>{let ae=w.paragraph.id,ge=!(m?.has(ae)??false)&&((p?.has(ae)??false)||(g?.has(ae)??false)),ue=w.available,Q=Jt(),Se=(t.drawingExclusionZonesByPage?.get(H.length)??Object.freeze([])).filter(nn=>{let ie=Me.get(w.paragraph.id),De=Me.get(nn.anchorParagraphId);if(ie!==void 0&&De!==void 0){if(De>ie)return false}else {let Oe=de.findIndex(Ne=>Ne.kind==="paragraph"&&Ne.paragraph.id===nn.anchorParagraphId);if(Oe<0||Oe>V)return false}return !(at>1&&nn.columnIndex!==ce)}),ye=ot(Se),Re=t.drawingTokenForParagraph?.(w.paragraph)??t.drawingLayoutToken??(t.inlineDrawingLayout?"drawing":void 0),ke=l&&!ge?ye||Re?pr({paragraph:w.paragraph,properties:w.props,width:ue,producer:h,...Re?{drawingToken:Re}:{},...ye?{exclusionToken:`${ce}|${j.toFixed(3)}|${ye}`}:{},...N>0?{startOffset:N}:{}}):N===0?w.key:`${w.key}|from:${N}`:null,ve=at>1;return $i(w.paragraph,ae,w.indent.left,ue,i,l,ke,w.inheritedRunProperties,w.tabStops,void 0,s?(nn,ie)=>wt(nn,ie,s):void 0,{lineSpacing:w.lineSpacing,firstLineOffset:N===0?ql(w):0,startOffset:N,marginExtent:{left:0,right:w.indent.left+ue+w.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:ve?Q:0,contentRight:ve?Q+He():w.indent.left+ue+w.indent.right,paragraphStartY:j,...Se.length>0?{pageExclusionZones:Se}:{},...ge?{suppressEmptyPlaceholderLine:true}:{},...s?{themeFonts:s.themeFonts}:{},markRunProperties:w.markRunProperties})},du=(w,V)=>(t.drawingExclusionZonesByPage?.get(H.length)??Object.freeze([])).filter(ae=>{let te=Me.get(w.paragraph.id),ge=Me.get(ae.anchorParagraphId);if(te!==void 0&&ge!==void 0){if(ge>te)return false}else {let ue=de.findIndex(Q=>Q.kind==="paragraph"&&Q.paragraph.id===ae.anchorParagraphId);if(ue<0||ue>V)return false}return !(at>1&&ae.columnIndex!==ce||ae.anchorParagraphId===w.paragraph.id&&ae.input.mode==="topAndBottom")}),cu=(w,V,N,ae,te,ge,ue)=>{let Q=du(w,V);if(!t.inlineDrawingLayout||ae<=te)return Q;let he=zn(w.paragraph),Se=new Map,ye=0;for(let ie=te;ie<ae;ie+=1){let De=N[ie];for(let Ne of he.values())Ne>=De.start&&Ne<De.end&&Se.set(Ne,ye);let Oe=ue.get(ie)??N[ie].exclusionSkipBefore??0;ye+=Oe+N[ie].height;}if(Se.size===0)return Q;let Re=at>1,ke=w.available,ve=Jt(),nn=_i({paragraph:w.paragraph,paragraphId:w.paragraph.id,drawingLayout:t.inlineDrawingLayout,contentLeft:Re?ve:0,contentRight:Re?ve+He():w.indent.left+ke+w.indent.right,paragraphStartY:ge,anchorLineTopByModelStart:Se,columnIndex:ce});return Object.freeze([...Q,...nn])},$y=(w,V,N,ae,te,ge,ue,Q)=>{if(t.inlineDrawingLayout){let Re=[...zn(w.paragraph).values()];if(Re.length>0){let ke=Math.min(...Re);if(ue.end<=ke||Re.some(ve=>ve>=ue.start&&ve<ue.end)&&ue.end<=ke+1)return 0}}let he=cu(w,V,N,ae,te,ge,Q),Se=he.length>0?Pt(j,ue.height,he):0,ye=ue.exclusionSkipBefore??0;return Se>.001?Se:ye},Vy=w=>{let V=He(),N=mo(w,V,0,s,u);if(!N||N.rows.length===0)return;let ae=N.columnWidthsPt.reduce((ie,De)=>ie+De,0),te=()=>N.float?ag(N.float,ae,E()):Ue()+Pa(N,He()),ge=te();N.float&&N.float.vertAnchor==="text"&&!N.float.ySpec&&(j=Math.max(0,Math.min(j+N.float.yPt,X())));let ue=[];for(let ie of N.rows)if(ie.isHeader)ue.push(ie);else break;let Q=0,he=j,Se=[],ye=new Map,Re=[],ke=()=>{if(Se.length===0)return;let ie=kc(Se,N,Re,Ct.borderOwnershipBudget,Ct.vMergeResolveBudget,void 0,(Oe,Ne)=>{Od(W,Oe,Ne);},Ct),De=ie[ie.length-1];_e.push(Rl({kind:"table",id:`${w.id}#f${Q}`,tableId:w.id,fragmentIndex:Q,rows:ie,box:{x:ge,y:he,width:N.columnWidthsPt.reduce((Oe,Ne)=>Oe+Ne,0),height:De.box.y+De.box.height-he}},N.columnWidthsPt,0,ye)),Q+=1,Se=[],Re=[];},ve=ie=>{if(ue.length===0)return;let De=0;for(let Oe of ue)De+=Tc(Oe,N.columnWidthsPt,ge,0,Ct,N.cellSpacingPt);if(De>X()+.001)throw new Fn("table-row-overheight",`Table header group (${ue.length} row(s)) is taller than the page content box`);j+De>X()+.001&&j>0&&(ke(),vo(),ge=te(),he=j);for(let Oe of ue){let Ne=Oa(Oe,N.columnWidthsPt,ge,j,ie,0,Ct,N.cellSpacingPt);if(Ne.bottom>X()+.001)throw new Fn("table-row-overheight",`Table header row ${Oe.id} overflowed the page content box`);Se.push(Ne.record),Re.push(Oe),j=Ne.bottom;}},nn=ie=>{ke(),vo(),ge=te(),he=j,ve(true);};ve(false);for(let ie of N.rows.slice(ue.length)){let De=Tc(ie,N.columnWidthsPt,ge,0,Ct,N.cellSpacingPt),Oe=Rc(ie),Ne=false,it=0,Xe=false;for(De<=X()+.001&&j+De>X()+.001&&j>0&&(nn(),Xe=true);;){if(it+=1,it>vl)throw new Fn("table-row-fragment-limit",`Table row ${ie.id} exceeded ${vl} page fragments`);let lt=X()-j;if(lt<=.001&&j>0){if(Xe)throw new Fn("table-row-overheight",`Table row ${ie.id} cannot fit after repeated header rows`);nn(),Xe=true;continue}if(!Ne&&De<=lt+.001){let st=Oa(ie,N.columnWidthsPt,ge,j,false,0,Ct,N.cellSpacingPt);if(st.bottom>X()+.001)throw new Fn("table-row-overheight",`Table row ${ie.id} overflowed the page content box after placement`);Se.push(st.record),Re.push(ie),j=st.bottom;break}if(ie.cantSplit||ie.height.rule==="exact"){if(j>0&&!Xe){nn(),Xe=true;continue}throw new Fn("table-row-overheight",ie.height.rule==="exact"?`Table row ${ie.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${ie.id} has w:cantSplit and is taller than the available page content`)}let xn=vc(ie,N.columnWidthsPt,ge,j,X(),false,Ne,0,Ct,Oe,N.cellSpacingPt);if(!xn.fitted&&j>0&&!Xe){nn(),Xe=true;continue}if(!xn.fitted)throw new Fn(xn.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",xn.nestedSplitBlocked?`Table row ${ie.id} contains a nested table taller than the page content box`:`Table row ${ie.id} has content that cannot fit a page content box`);if(xn.bottom>X()+.001)throw new Fn("table-row-overheight",`Table row ${ie.id} overflowed the page content box`);let Qt=xn.remainder!==null,Tr=Ug(ie,Ne,Qt);if(Se.push(xn.record),Re.push(Tr),j=xn.bottom,!Qt)break;Oe=xn.remainder,Ne=true,Xe=false,nn();}}ke();},Bt=false,Ql=de.length,es=0;for(let w=an;w<de.length;w+=1){let V=Z(e[w],He());if(on[w]=dn(),$n&&bn>0&&w>=de.length-bn){let oe=y.checkpoints[w+(y.keys.length-de.length)];if(oe&&oe.cursorY===j&&oe.previousSpaceAfter===we&&oe.flowColumnIndex===ce&&ty(oe.pageFragments,_e)&&Jc(oe.pendingAnchoredDrawings,W)&&Jc(oe.deferredAnchoredDrawings,$)&&ay(oe.anchorPageDeferCounts,K)){let le=H.length-oe.pageCount;if(sh({delta:le,titlePage:x?.titlePage===true,evenAndOddHeaders:x?.evenAndOddHeaders===true,parityDependent:y.parityDependent,usedPageParity:U,markPageCount:oe.pageCount,hasNoteReserves:T!==void 0,hasExclusionZones:(t.drawingExclusionZonesByPage?.size??0)>0})){let Cn=le===0?We.pages.slice(oe.pageCount):We.pages.slice(oe.pageCount).map((gn,Vn)=>Ca(gn,H.length+Vn,Ee(H.length+Vn).y));H.push(...Cn),en+=Cn.length,Bt=true,Ql=w,es=le,ze+=y.endLineCounter-oe.lineCounter;break}}}if(cn+=1,V.kind==="table"){we=0,q=[];try{Vy(V.table),Op(V.table,q);}finally{q=null;}continue}let{paragraph:N,props:ae,spacing:te,contextualSpacing:ge,styleId:ue,borders:Q,shading:he,keeps:Se}=V,{indent:ye,alignment:Re,markRunProperties:ke}=V,ve=V.available,nn=w>0?de[w-1]:void 0,ie=de[w+1],De=oe=>oe?.kind==="paragraph"&&oe.styleId===ue&&ue!==null,Oe=ge?{before:De(nn)?0:te.before,after:De(ie)?0:te.after}:te,Ne=d?.get(N.id)??V.listItem,it=ql(V),Xe=N.id,lt=V.borderGroupKey,xn=oe=>lt!==""&&oe?.kind==="paragraph"&&oe.borderGroupKey===lt,Qt=xn(nn),Tr=xn(ie),st=Qt?void 0:Q.top,kr=Tr?Q.between:Q.bottom,er=At(st),yu=At(kr);Gs(ae)&&(_e.length>0||H.length===0)&&(vr(),we=0);let Ze=Jl(V,w);if(Ze.length===0)continue;let Ky=Fl(N)!==void 0&&Xy(V,Ze),bu=()=>Ky&&A===void 0&&On+1>=a.count,ns=oe=>{let le=Z(N,He());le.kind==="paragraph"&&(ye=le.indent,Re=le.alignment,ve=le.available,ke=le.markRunProperties,it=oe===0?ql(le):0,Ze=[...Jl(le,w,oe)]);};{let oe=Gr(Oe.before,we),le=ke.length===0?et:Fe(ke,s?.themeFonts),un=Ze.length<=1?yu+Oe.after:0,Cn=j+oe+er,gn=cu(V,w,Ze,0,0,Cn,new Map),Vn=Ze[0]?am(Cn,Ze[0],gn,un):i.lineMetrics(le).height+un,Mt=oe+er+Vn;if(Se.keepNext&&!Ce[w-1]){let qe=hm(de,w,we,dt=>{let Yn=de[dt];return Yn?.kind==="paragraph"?Jl(Yn,dt).map(An=>An.height):[]});qe!==null&&qe+er<=X()&&(Mt=Math.max(Mt,qe+er));}j+Mt>X()&&j>0&&!bu()&&(vo(),we=0,ns(0));}let Uy=j===0&&!S(),ts=Us(Oe.before,we,Uy,Ge);ts>0&&(j+=ts),er>0&&(j+=er),Ge=false;let nr=0,Be=[],xu=Ze[0]?.start??0,Or=ts,tr=er,rs=false,To=j,Su=0,_a=new Map;we=0;let Pu=t.inlineDrawingLayout!==void 0&&Mn(V.paragraph,t.inlineDrawingLayout).length>0,wu=false,os=null,Zy=eo(V.paragraph),Ru=Ui(V.paragraph),Iu=Ru?ul(Ru):null,qy=()=>{let oe=Be[0];if(!oe)return 0;let le=Su;if(le<=.001)return 0;let un=Pt(To,oe.box.height,du(V,w));return Math.max(0,le-un)},Ha=oe=>{if(Be.length===0)return;let le=Ue(),un=Jt(),Cn=Be[0].box.y,gn=Cn-Or-tr,Vn=Be[Be.length-1].box.y+Be[Be.length-1].box.height,Mt=oe?Oe.after:0,qe=[],dt,Yn=Cn,An=Vn,Ft=Q.left?Rn(Q.left):0,Oo=Q.right?Rn(Q.right):0,Cr=Q.left?le+ye.left-Q.left.spacePt-Ft:le+ye.left,is=Q.right?le+ye.left+ve+Q.right.spacePt+Oo:le+ye.left+ve,Br=Math.max(is-Cr,0);if(tr>0&&st){let ln=Rn(st),Kn=Cn-st.spacePt-ln;qe.push({side:"top",edge:st,box:{x:Cr,y:Kn,width:Br,height:ln}}),Yn=Kn;}if(oe&&kr){let ln=Rn(kr),Kn=Vn+kr.spacePt,Et={x:Cr,y:Kn,width:Br,height:ln};qe.push({side:Tr?"between":"bottom",edge:kr,box:Et}),Tr||(dt={edge:kr,box:Et}),An=Kn+ln;}oe&&(j=Math.max(j,An+Mt));let Lr=Math.max(An+Mt-gn,0),Te=Qt&&nr===0?gn:Yn,ct=Tr&&oe?gn+Lr:An,Mr=Math.max(ct-Te,0);if(Q.left&&qe.push({side:"left",edge:Q.left,box:{x:le+ye.left-Q.left.spacePt-Ft,y:Te,width:Ft,height:Mr}}),Q.right&&qe.push({side:"right",edge:Q.right,box:{x:le+ye.left+ve+Q.right.spacePt,y:Te,width:Oo,height:Mr}}),Q.bar){let ln=Rn(Q.bar);qe.push({side:"bar",edge:Q.bar,box:{x:le+ye.left-Q.bar.spacePt-ln,y:Cn,width:ln,height:Math.max(Vn-Cn,0)}});}let Fr=Iu?fl(Be,Iu):null,Er=nr===0?hl(Ne,i,Be[0]?{y:Be[0].box.y,height:Be[0].box.height}:void 0):void 0,za=Er?{...Er,box:{...Er.box,x:Er.box.x+le}}:void 0;if(_e.push({kind:"paragraph",id:`${Xe}#f${nr}`,paragraphId:Xe,fragmentIndex:nr,range:Fr?Fr[Fr.length-1].range:{paragraphId:Xe,start:xu,end:Be[Be.length-1].range.end},props:ae,spacing:{before:Or,after:Mt},indent:ye,...dt?{bottomBorder:dt}:{},...qe.length>0?{borders:qe}:{},...he===void 0?{}:{shading:he,shadingBox:Q.left||Q.right?{x:Cr,y:Yn,width:Br,height:Math.max(An-Yn,0)}:Vo(Be,le+ye.left,ve)},...za?{marker:za}:{},...oe&&f?Ci(Zy,aa(V.paragraph)):{},lines:Fr??Be,box:{x:un+ye.left,y:gn,width:ve,height:Lr}}),t.inlineDrawingLayout&&Pu&&!wu){wu=true;let ln=[...zn(V.paragraph).values()],Kn=ln.length>0&&ln.every(Bn=>Be.some(rr=>Bn>=rr.range.start&&Bn<rr.range.end)),Et,ja,ls;if(Kn){let Bn=gn-qy();Et=Be,ja={x:un+ye.left,y:Bn,width:ve,height:Lr},ls=Kl({x:un+ye.left,y:Bn,height:Lr});}else {let Bn=os??{columnX:un,columnWidth:He(),startY:gn},rr=Bn.startY;Et=Ze.map((Dn,Jy)=>{let Qy={id:`anchor-line-${Jy}`,range:{paragraphId:Xe,start:Dn.start,end:Dn.end},box:{x:Bn.columnX+ye.left,y:rr,width:ve,height:Dn.height},contentX:Dn.spans.length>0?Dn.spans[0].box.x+Bn.columnX:Bn.columnX+ye.left,baseline:Dn.baseline,leading:Dn.leading,trailingSpacing:Dn.trailingSpacing,spans:Dn.spans.map(ss=>({...ss,box:{...ss.box,x:ss.box.x+Bn.columnX,y:rr}}))};return rr+=Dn.height+(Dn.exclusionSkipBefore??0),Qy});let vu=Bn.startY;ja={x:Bn.columnX+ye.left,y:vu,width:ve,height:Math.max(rr-vu,Be[0]?.box.height??0)},ls=Kl(ja);}Da(ao({paragraph:V.paragraph,paragraphId:Xe,paragraphBox:ja,lines:Et,drawingLayout:t.inlineDrawingLayout,frameBase:Ul(),columnBox:ls,cellBox:null,pageClip:iu(),measurer:i,sourceOrderOf:Zl,layoutTextboxStory:su}));}nr+=1,xu=Be[Be.length-1].range.end,Be=[],Or=0,tr=0;},Lt=0,as=0,ko=Ze.length+8;for(let oe=0;oe<Ze.length;oe+=1){let le=Ze[oe],un=oe===Ze.length-1,Cn=un?yu+Oe.after:0;oe===Lt&&(To=j,Pu&&os===null&&nr===0&&(os=Object.freeze({columnX:Jt(),columnWidth:He(),startY:To})));let gn=$y(V,w,Ze,oe,Lt,To,le,_a),Vn=gn+Math.max(0,le.height-le.trailingSpacing)+Cn;if(j+Vn>X()&&!bu()&&(Be.length>0||_e.length>0||H.length>0)){let Te=!S(),ct=as<ko?gm(oe,Lt,Ze.length,Se,Te):oe,Mr=ct<oe;for(let ln=oe;ln>ct;ln-=1){Be.pop();let Kn=Ze[ln-1],Et=_a.get(ln-1)??Kn.exclusionSkipBefore??0;_a.delete(ln-1),j-=Kn.height+Et,ze-=1;}let Fr=Mr&&Be.length===0&&nr===0,Er=Ze[ct].start,za=He();if(Ha(false),vo(),Or=0,Fr?j=tr:tr=0,He()!==za){ns(Er),ko=Math.max(ko,Ze.length+8),Lt=0,Mr&&(as+=1),oe=-1;continue}if(Lt=ct,To=j,Mr){as+=1,oe=ct-1;continue}}let qe=Jt();_a.set(oe,gn),j+=gn;let dt=qe+ye.left+(oe===0?it:0),Yn=Math.max(1,ve-(oe===0?it:0)),An=le.spans.map(Te=>({...Te,range:{...Te.range,paragraphId:Xe},box:{...Te.box,x:Te.box.x+qe,y:j}})),Ft=Gi(An,i,dt,Yn,Re,un,Re==="center"||Re==="right"?le.width:void 0),Oo=An.length>0&&Ft.length>0?Ft[0].box.x-An[0].box.x:Re!=="left"&&Re!=="both"?(()=>{let Te=Yn-le.width;return Te<=0?0:Re==="center"?Te/2:Te})():0,Cr=Object.freeze({x:0,y:0,width:b,height:X()}),is=le.drawings.map(Te=>{let ct=Object.freeze({...Te,paragraphId:Xe,x:qe+Te.x,y:j+Te.y,advanceStart:Te.advanceStart+qe,advanceEnd:Te.advanceEnd+qe,paintBounds:Object.freeze({...Te.paintBounds,x:qe+Te.paintBounds.x,y:j+Te.paintBounds.y}),hitBounds:Object.freeze({...Te.hitBounds,x:qe+Te.hitBounds.x,y:j+Te.hitBounds.y})});return Di(ct,Cr)}),Br=Xi(is,Oo),Lr={id:fy(N.id,le.start,oe),range:{paragraphId:Xe,start:le.start,end:le.end},spans:Ft,box:{x:Jt()+ye.left,y:j,width:ve,height:le.height},contentX:Ft[0]?.box.x??dt+Oo,baseline:le.baseline,leading:le.leading,trailingSpacing:le.trailingSpacing,...le.deletedRanges?{deletedRanges:le.deletedRanges}:{},...Br.length>0?{drawings:Br}:{}};if(ze+=1,Be.length===0&&(Su=gn),Be.push(Lr),j+=le.height,le.columnBreakAfter){let Te=He();if(Ha(un),vo(),Or=0,tr=0,rs=true,!un&&He()!==Te){ns(le.end),ko=Math.max(ko,Ze.length+8),Lt=0,oe=-1;continue}Lt=oe+1;}else le.pageBreakAfter&&(Ha(un),vr(),Or=0,tr=0,rs=true,Lt=oe+1);}Ha(true),we=rs?0:Oe.after;}Bt||(on[de.length]=dn());let uu=Bt&&y?y.endCursorY:j,fu=Bt&&y?y.endSpaceAfter:we,pu=!Bt&&(_e.length>0||H.length===0),mu=Bt&&y?y.endsOpenPage:pu;pu&&vr();let gu=0,Yy=Ld*4+8;for(;(W.length>0||$.length>0)&&gu<Yy;)gu+=1,W.length===0&&lu(),vr();$.length>0&&(W.push(...$.map(w=>Ad(w,"page-defer-exhausted"))),$=[],vr()),yn();let hu={revision:n$1,pages:H};if(y){y.previous=hu,y.checkpoints=Bt?[...on.slice(0,Ql),...y.checkpoints.slice(Ql+(y.keys.length-de.length)).map(V=>es===0?V:{...V,pageCount:V.pageCount+es})]:on,y.keys=Qe,y.context=z;let w=U||x?.evenAndOddHeaders===true;y.parityDependent=an===0&&!Bt?w:y.parityDependent||w,y.startPageParity=C,y.startLineCounter=D,y.endLineCounter=ze,y.endCursorY=uu,y.endSpaceAfter=fu,y.endsOpenPage=mu,y.stats={placed:cn,total:de.length,reusedPages:en,fullPasses:y.stats.fullPasses+(an===0?1:0)};}return {layout:hu,pages:H,lineCounter:ze,endCursorY:uu,endSpaceAfter:fu,endsOpenPage:mu}}function py(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 sI=.25,dI=20;function Ro(e,n,t){let r=zc(t.sectionColumns??Xn.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),Rr(e,n,t);let o=t.session,a=t.flowStartY??0,{session:i,...l}=t,s=h=>{let b=h.pages[0],x=b?Math.max(...py(b,r,a)):h.endCursorY;return o&&(o.endCursorY=x),{...h,endCursorY:x}};if(o&&o.balanceLimit!==null){let h=o.balanceLimit,b=Rr(e,n,{...t,columnRegionBottom:h});if(o.stats.placed===0&&o.stats.reusedPages===b.pages.length)return o.balanceLimit=h,s(b)}let d=Rr(e,n,l);if(d.pages.length!==1||!d.endsOpenPage)return o&&(o.balanceLimit=null),Rr(e,n,t);let c=py(d.pages[0],r,a),u=c.reduce((h,b)=>h+Math.max(0,b-a),0);if(u<=0)return o&&(o.balanceLimit=null),Rr(e,n,t);let f=a+u/r.count,p=Math.max(...c)+.01,m=h=>{try{let b=Rr(e,n,{...l,columnRegionBottom:h});return b.pages.length===1&&b.endsOpenPage}catch{return false}};for(let h=0;h<dI&&p-f>sI;h+=1){let b=(f+p)/2;m(b)?p=b:f=b;}let g=Rr(e,n,{...t,columnRegionBottom:p});return o&&(o.balanceLimit=p),s(g)}var yy="Calibri, Carlito, Helvetica, Arial, sans-serif",pL=new Map([["calibri","Carlito"]]),cI=65536,uI=256;function my(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 gy(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 hy=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function by(e=null){return e!=null&&typeof e.measureText=="function"}function xy(e={}){let n=e.scale??1;if(!(n>0)||!Number.isFinite(n))return null;let t=e.fallbackFamily??yy,r=e.context??null;if(!by(r))return null;let o=r,a=gy(my(e.maxWidthEntries,cI)),i=gy(my(e.maxMetricsEntries,uI)),l=e.fontAlias,s=c=>{let u=c.fontFamily&&hy.test(c.fontFamily)?c.fontFamily:null,f=u?l?.(u):void 0,p=f&&hy.test(f)?f:null,m=u?p?`"${p}", "${u}", ${t}`:`"${u}", ${t}`:t,g=c.bold?"bold":"normal",h=c.italic?"italic":"normal",b=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75)*n;return `${h} ${g} ${b}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=s(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=s(c),p=i.get(f);if(p)return p;let m=u*1.15,g=u*.8;o.font=f;let h=o.measureText("Hxg"),b=h.fontBoundingBoxAscent,x=h.fontBoundingBoxDescent;if(typeof b=="number"&&Number.isFinite(b)&&b>0&&(g=b/n,typeof x=="number"&&Number.isFinite(x)&&x>=0)){let I=(b+x)/n;I>0&&(m=I);}m>0||(m=u*1.15);let k={height:m,baseline:g};return i.set(f,k),k}}}function fI(e=1,n={}){let t=xy({...n,scale:n.scale??e});return t?{measurer:t,producer:n.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:Gl(),producer:"fixed-measurer"}}function pI(e){return e.box}function Sy(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)Sy(o,n);}function mI(e){let n=new Map,t=(o,a,i)=>{if(!(o.kind==="textValue"||i>fe*4)){for(let l of o.children)if(l.kind!=="textValue"){if(l.kind==="paragraph"){for(let s of r)n.get(s)?.push(l.id);t(l,l.id,i+1);continue}if(l.kind==="contentControl"){n.set(l.id,[]),r.push(l.id);let s=pe$1(l);s&&t(s,a,i+1),r.pop();let d=n.get(l.id);d&&d.length===0&&a!==null&&d.push(a);continue}t(l,a,i+1);}}},r=[];return t(e,null,0),n}function gI(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 hI(e,n){let t=te(e.root);if(t.length===0)return yI;let r=new Map;n.pages.forEach((i,l)=>{(d=>{for(let c of d){let u=new Set;Sy(c,u);for(let f of u){let p=r.get(f)??[];p.push({pageIndex:l,box:pI(c)}),r.set(f,p);}}})(i.fragments);});let o=mI(e.root),a=[];for(let i of t){let l=re(i.node),s=[...i.ancestors.map(f=>re(f).lock),l.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?gI(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:l.type,level:se(i.node),depth:i.depth,lock:l.lock,effectiveLock:we(s),showingPlaceholder:l.showingPlaceholder,temporary:l.temporary,...l.tag===void 0?{}:{tag:l.tag},...l.alias===void 0?{}:{alias:l.alias},...l.id===void 0?{}:{id:l.id},...l.dataBinding===void 0?{}:{dataBinding:l.dataBinding},paragraphIds:d,fragments:u});}return a}var yI=Object.freeze([]);var Py=e=>e.verticalAlign==="baseline"?1:.75;function eu(e){let n=Math.round(e.fontSizePt*2);return Math.max(1,n)}function bI(e){let{shaper:n,resolveFont:t,fallback:r,shapingLibrary:o,unicodeDataVersion:a,fixedPointScale:i=1e3,script:l="Latn",language:s="en"}=e,d=new WeakMap,c=new WeakMap,u=new WeakMap,f=g=>{let h=u.get(g);if(h!==void 0)return h;let b=t(g);return u.set(g,b),b},p=(g,h)=>{let b=d.get(g);b||(b=new Map,d.set(g,b));let x=b.get(h);return x||(x=new Map,b.set(h,x)),x},m=(g,h,b)=>n.shape({text:g,fontSizeHalfPoints:eu(b),bidiLevel:0,environment:ar({font:h,variationAxes:{},shapingLibrary:o,unicodeDataVersion:a,normalization:"none",script:l,language:s,direction:"ltr",features:{},fallbackOrder:[],fixedPointScale:i,roundingMode:"halfToEven"})});return {measure(g,h){if(g.length===0)return 0;let b=f(h);if(!b)return r.measure(g,h);let x=p(b,eu(h)),k=x.get(g);if(k===void 0){let I=0;try{for(let B of m(g,b,h).glyphs)I+=B.advanceX;}catch{return r.measure(g,h)}k=I/i,x.set(g,k);}return k*Py(h)*(h.horizontalScalePercent/100)+g.length*h.characterSpacingPt},lineMetrics(g){let h=f(g);if(!h)return r.lineMetrics(g);let b=Py(g),x=c.get(h);x||(x=new Map,c.set(h,x));let k=eu(g),I=x.get(k);if(I)return b===1?I:{height:I.height*b,baseline:I.baseline*b};let B,F=true;try{let P=m(" ",h,g),L=P.metrics.ascent/i,O=P.metrics.descent/i,T=L+O;T>0?B={height:T,baseline:L}:(B=r.lineMetrics(g),F=!1);}catch{B=r.lineMetrics(g),F=false;}return F?(x.set(k,B),b===1?B:{height:B.height*b,baseline:B.baseline*b}):B}}}function xI(e){let{layout:n,viewport:t}=e,r=new Set;if(!t){for(let s of n.pages)r.add(s.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=t.top+t.height,i=-1,l=-1;for(let s of n.pages){let d=s.box.y;d+s.box.height>=t.top&&d<=a&&(i===-1&&(i=s.index),l=s.index);}if(i===-1){let s=SI(n,t.top);s!==null&&(i=s,l=s);}if(i!==-1){let s=Math.max(0,i-o),d=Math.min(n.pages.length-1,l+o);for(let c=s;c<=d;c+=1)r.add(c);}for(let s of e.pinnedPages??[])s>=0&&s<n.pages.length&&r.add(s);return r}function SI(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 wy=["text-local","paragraph-local","flow-structural","global"];function Ry(e,n){return wy.indexOf(n)>wy.indexOf(e)?n:e}function PI(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function wI(e){let{run:n,currentRevision:t,publish:r,schedule:o}=e,a=null,i=null,l=null,s=0,d=0;function c(h){let b=e.runCooperatively;if(!b)return n(h);let x=b(h);l=x;try{for(;;){let k=x.step();if(k)return k;if(t()!==h.revision)return x.cancel(),d+=1,null;if(l!==x)return null}}finally{l===x&&(l=null);}}function u(h){let b=p(t());b.impact=Ry(b.impact,h.impact),b.structural=b.structural||h.structural;for(let x of h.paragraphIds)b.paragraphIds.add(x);for(let x of h.created)b.created.add(x);for(let x of h.deleted)b.deleted.add(x);for(let x of h.dependencyKeys)b.dependencyKeys.add(x);}let f=h=>({impact:h.impact,paragraphIds:h.paragraphIds,created:h.created,deleted:h.deleted,dependencyKeys:h.dependencyKeys,structural:h.structural,revision:h.revision});function p(h){return a||(a=PI(h)),a.revision=Math.max(a.revision,h),a}function m(){!o||i||(i=o(()=>{i=null,g();}));}function g(){i&&(i(),i=null),l&&(l.cancel(),l=null,d+=1);let h=a;if(!h)return false;a=null;let b=f(h),x=c(b);return !x||x.revision!==t()?(s+=1,u(b),m(),false):(r(x,b),true)}return {notify(h){let b=p(t());b.impact=Ry(b.impact,h.impact);for(let x of h.dirty)b.paragraphIds.add(x);for(let x of h.created)b.created.add(x),b.paragraphIds.add(x);for(let x of h.deleted)b.deleted.add(x),b.paragraphIds.add(x);for(let x of h.dependencyKeys)b.dependencyKeys.add(x);for(let x of h.splitJoin)b.structural=true,"split"in x?(b.paragraphIds.add(x.split.from),b.paragraphIds.add(x.split.tail)):(b.paragraphIds.add(x.join.kept),b.paragraphIds.add(x.join.removed));(h.impact==="flow-structural"||h.impact==="global")&&(b.structural=true),m();},invalidateAll(h,b){let x=p(h);x.impact="flow-structural",x.structural=true,b&&x.dependencyKeys.add(b),m();},flush:g,pending:()=>a?f(a):null,cancel(){i?.(),i=null,l?.cancel(),l=null,a=null;},get staleDiscards(){return s},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 wl(i,n,t)}return a}function Iy(e,n){let t=nu(e,n);if(!t)return [];let r=[];for(let o of e.pages)for(let a of Je(o))for(let i of a.lines)for(let l of mn(i)){let s=yo(e,l,t.from,t.to);if(!s)continue;let d=Ir(i,s.start,void 0,l),c=Ir(i,s.end,void 0,l);r.push({pageIndex:o.index,x:Math.min(d,c),y:i.box.y,width:Math.abs(c-d),height:i.box.height});}return r}function vy(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 Je(o))for(let i of a.lines)for(let l of mn(i))for(let s of n){let d=yo(e,l,s.from,s.to);if(!d)continue;let c=Ir(i,d.start,void 0,l),u=Ir(i,d.end,void 0,l),f=r.get(s.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(s.key,f);}return r}function tu(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 Xl=class{#n=new WeakMap;#l=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 s=this.#l.get(n);s||(s=new WeakMap,this.#l.set(n,s)),a=s.get(r)??new Map,s.has(r)||s.set(r,a);}let i=a.get(t);if(i)return i;let l=o();return a.set(t,l),l}};function Ty(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 ky(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 Ea(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 ru(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 Oy(e,n,t){let r=t.index.get(e.paragraphId)?.get(e.offset),o=r===void 0?Ea(t.stops,e):t.stops[r];if(!o)return null;let a=o.lineId,i=t.stops.filter(l=>l.lineId===a);return (n===-1?i[0]:i[i.length-1])?.position??null}function Cy(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=ru(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 l=t[r+n];if(!l)return {position:e,desiredX:null};let s=o(l).stops,d=n===-1?s[s.length-1]:s[0];return d?{position:d.position,desiredX:null}:null}function By(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 Ly(e,n,t,r,o,a){let i=a(e.paragraphId),l=i.index.get(e.paragraphId)?.get(e.offset),s=l===void 0?Ea(i.stops,e):i.stops[l];if(!s)return null;let d=t??s.x,c=Ty(i.stops),u=c.indexOf(s.lineId),f=c[u+n];if(f){let m=ky(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]),h=Ty(g.stops),b=n===-1?h[h.length-1]:h[0];if(!b)continue;let x=ky(g.stops,b,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 My=new WeakMap,Fy=new WeakMap;function En(e){let n=My.get(e);if(n)return n;let t=new Map;for(let r of e.pages)for(let[o,a]of RI(r)){let i=t.get(o);i?i.push(...a):t.set(o,[...a]);}return My.set(e,t),t}function RI(e){let n=Fy.get(e);if(n)return n;let t=new Map,r=(a,i)=>{for(let l of mn(a)){let s={line:a,pageIndex:i},d=t.get(l.paragraphId);d?d.push(s):t.set(l.paragraphId,[s]);}},o=(a,i)=>{let l=s=>{for(let d of s){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)l(u.blocks);}};l(a);};for(let a of Je(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 Fy.set(e,t),t}function ML(e,n,t){let r=En(e).get(n);if(r&&r.length>0){let o=oi(e,n,t,r.map(a=>a.line));if(o)return o}return oi(e,n,t)}var Ey=new WeakMap;function ou(e,n){let t=Ey.get(e);t||(t=new Map,Ey.set(e,t));let r=t.get(n);if(r)return r;let o=[];for(let{line:i}of En(e).get(n)??[])if(i.range.paragraphId===n)for(let l of i.deletedRanges??[])o.push({start:l.start,end:l.end});o.sort((i,l)=>i.start-l.start);let a=[];for(let i of o){let l=a[a.length-1];l&&i.start<=l.end?l.end=Math.max(l.end,i.end):a.push(i);}return t.set(n,a),a}function Ny(e,n){for(let t of e)if(n>t.start&&n<t.end)return true;return false}function Ay(e,n){for(let t of ou(e,n.paragraphId))if(n.offset>t.start&&n.offset<t.end)return {paragraphId:n.paragraphId,offset:t.end};return n}var II=/[\p{L}\p{N}_'\u2019]/u;function Na(e,n,t){let r=a=>{let i=e[a];return i!==void 0&&II.test(i)},o=Math.max(0,Math.min(n,e.length));if(t===-1){for(;o>0&&!r(o-1);)o-=1;for(;o>0&&r(o-1);)o-=1;return o}for(;o<e.length&&!r(o);)o+=1;for(;o<e.length&&r(o);)o+=1;return o}function vI(e,n,t){let r=En(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 TI(e,n,t){for(let{line:r}of En(e).get(n)??[])if(r.range.start===t&&r.drawings?.some(o=>o.start===t))return r;return null}function kI(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 _y(e){let n=e.spans[e.spans.length-1]?.text;return n===`
16
- `||n===Xb$1}function Vl(e,n,t,r,o,a,i){for(let l of mn(t))i!==void 0&&l.paragraphId!==i||OI(e,n,t,l,r,o,a);}function OI(e,n,t,r,o,a,i){let l=mn(t).length>1,s=ou(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&&!l&&_y(t)&&vI(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}kI(t,c,r)||Ny(s,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 Hy(e,n,t,r,o){for(let a of n){if(a.kind==="paragraph"){for(let i of a.lines)Vl(r,e,i,t,a.range.start,o);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let l of i.cells)Hy(e,l.blocks,t,r,o);}}var CI=new Xl;function zy(e,n){let t=[];for(let r of e.pages)for(let o of Je(r))for(let a of o.lines)Vl(t,e,a,r.index,o.range.start,n);return t}function BI(e,n,t){let o=(En(e).get(n.paragraphId)??[]).find(({line:i})=>{let l=kt(i,n.paragraphId);return l!==null&&n.offset>=l.start&&n.offset<=l.end});if(!o||mn(o.line).length<2)return null;let a=[];return Vl(a,e,o.line,o.pageIndex,0,t),tu(a)}function $l(e,n,t){return CI.get(e,n,t,()=>{let r=[];for(let{line:o,pageIndex:a}of En(e).get(n)??[])Vl(r,e,o,a,0,t,n);return tu(r)})}function LI(e,n,t,r){if(!e.pages[n])return [];let o=[];return Hy(e,t,n,o,r),o}function MI(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function jy(e,n,t){let r=MI(t),o=En(e).get(n.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?o:[...o].sort((s,d)=>{let c=s.pageIndex===a?0:1,u=d.pageIndex===a?0:1;return c-u}),l=null;for(let{line:s,pageIndex:d}of i){let c=kt(s,n.paragraphId);if(!c||n.offset<c.start||n.offset>c.end)continue;if(n.offset===c.end&&n.offset>c.start&&mn(s).length===1&&_y(s)){l??={line:s,pageIndex:d};continue}if(n.offset===c.end&&n.offset>c.start&&TI(e,n.paragraphId,n.offset))continue;let u=Ta(s,n.offset,r.measurer,c);return {position:n,x:u.x,y:u.y,height:u.height,lineId:s.id,pageIndex:d}}if(l){let s=Ta(l.line,n.offset,r.measurer,kt(l.line,n.paragraphId));return {position:n,x:s.x,y:s.y,height:s.height,lineId:l.line.id,pageIndex:l.pageIndex}}return null}function FI(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return xl(e,t,n)?.caret??null}function EI(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return Pl(e,t,n)}function NI(e){return zs(e)}function nu(e,n){if(n.anchor.paragraphId===n.head.paragraphId)return n.anchor.offset<=n.head.offset?{from:n.anchor,to:n.head}:{from:n.head,to:n.anchor};let t=Tt(e),r=t.indexOf(n.anchor.paragraphId),o=t.indexOf(n.head.paragraphId);return r===-1||o===-1?null:r<o||r===o&&n.anchor.offset<=n.head.offset?{from:n.anchor,to:n.head}:{from:n.head,to:n.anchor}}function Io(e,n){let t=[],r=new Set;for(let{line:a}of En(e).get(n)??[]){let i=kt(a,n);if(i){for(let l of i.spans){if(l.range.end===l.range.start)continue;let s=`${l.range.start}:${l.range.end}`;if(r.has(s))continue;r.add(s);let d=l.range.end-l.range.start,c=l.text.length===d?l.text:l.text.slice(0,d).padEnd(d," ");t.push({start:l.range.start,text:c});}for(let l of i.drawings){let s=l.start,d=s+1,c=`${s}:${d}`;r.has(c)||(r.add(c),t.push({start:s,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 Dy(e,n,t,r){let o=Tt(e),a=ho(e).get(n.paragraphId);return a===void 0?null:Cy(n,t,o,a,i=>$l(e,i,r))}function AI(e,n,t,r=null,o={}){if(!o.stops&&(t==="left"||t==="right"))return Dy(e,n,t==="left"?-1:1,o.measurer);if(!o.stops&&(t==="wordLeft"||t==="wordRight")){let s=t==="wordLeft"?-1:1,d=Na(Io(e,n.paragraphId),n.offset,s);return d===n.offset?Dy(e,n,s,o.measurer):{position:{paragraphId:n.paragraphId,offset:d},desiredX:null}}if(!o.stops&&(t==="lineStart"||t==="lineEnd")){let s=Oy(n,t==="lineStart"?-1:1,BI(e,n,o.measurer)??$l(e,n.paragraphId,o.measurer));return s?{position:s,desiredX:null}:null}if(!o.stops&&(t==="documentStart"||t==="documentEnd")){let s=By(t==="documentStart"?-1:1,Tt(e),d=>$l(e,d,o.measurer));return s?{position:s,desiredX:null}:null}if(!o.stops&&(t==="up"||t==="down")){let s=ho(e).get(n.paragraphId);return s===void 0?null:Ly(n,t==="up"?-1:1,r,Tt(e),s,d=>$l(e,d,o.measurer))}let a=o.stops?[...o.stops]:zy(e,o.measurer);if(a.length===0)return null;let i=a.findIndex(s=>s.position.paragraphId===n.paragraphId&&s.position.offset===n.offset);if(i===-1){if(t==="left"||t==="right"){let d=ru(a,n,t==="left"?-1:1)??Ea(a,n);return d?{position:d.position,desiredX:null}:null}let s=Ea(a,n);if(!s)return null;i=a.indexOf(s);}let l=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===l.lineId)[0].position,desiredX:null};case "lineEnd":{let s=a.filter(d=>d.lineId===l.lineId);return {position:s[s.length-1].position,desiredX:null}}case "wordLeft":case "wordRight":{let s=Io(e,n.paragraphId),d=t==="wordLeft"?-1:1,c=Na(s,n.offset,d);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 s=r??l.x,d=l.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:s};let u=c[0],f=Number.POSITIVE_INFINITY;for(let p of c){let m=Math.abs(p.y-l.y)*1e3+Math.abs(p.x-s);m<f&&(f=m,u=p);}return {position:u.position,desiredX:s}}case "up":case "down":{let s=r??l.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(l.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:s};let p=a.filter(g=>g.lineId===d[f]),m=p[0];for(let g of p)Math.abs(g.x-s)<Math.abs(m.x-s)&&(m=g);return {position:m.position,desiredX:s}}default:return null}}function DI(e,n){return jy(e,n)}function _I(e,n){let t=nu(e,n);if(!t)return [];if(t.from.paragraphId===t.to.paragraphId&&t.from.offset===t.to.offset)return HI(e,t.from);let r=[];if(t.from.paragraphId===t.to.paragraphId){for(let{line:d}of En(e).get(t.from.paragraphId)??[]){let c=kt(d,t.from.paragraphId);if(!c)continue;let u=yo(e,c,t.from,t.to);if(u)for(let f of c.spans)f.range.end>u.start&&f.range.start<u.end&&r.push(f);}return r}let o=Tt(e),a=ho(e),i=En(e),l=a.get(t.from.paragraphId)??-1,s=a.get(t.to.paragraphId)??-1;if(l===-1||s===-1)return [];for(let d=l;d<=s;d+=1)for(let{line:c}of i.get(o[d])??[]){let u=kt(c,o[d]);if(!u)continue;let f=yo(e,u,t.from,t.to);if(f)for(let p of u.spans)p.range.end>f.start&&p.range.start<f.end&&r.push(p);}return r}function HI(e,n){let t=null;for(let{line:r}of En(e).get(n.paragraphId)??[])for(let o of kt(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 Wy=new WeakMap;function Zt(e){let n=Wy.get(e);if(n)return n;let t=new Map,r=new Map,o=new Map,a=(l,s)=>{for(let d of l){if(d.kind==="paragraph")continue;let c=d.tableId,u=o.get(c);u||(u=new Map,o.set(c,u),t.set(c,[]),r.set(c,new Map));for(let f of d.rows){let p=u.get(f.id);p===void 0&&(p=u.size,u.set(f.id,p),r.get(c).set(p,f.cells));for(let m of f.cells)t.get(c).push({pageIndex:s,tableId:c,row:f,cell:m,rowIndex:p,isHeaderRepeat:f.isHeaderRepeat}),a(m.blocks,s);}}};for(let l of e.pages)a(l.fragments,l.index);let i=new Map;for(let[l,s]of t)i.set(l,{placed:s,rows:r.get(l)??new Map});return Wy.set(e,i),i}function Gy(e){let n=0;for(let t of e.rows.values())for(let r of t)n=Math.max(n,Ut(r).to+1);return n}var Ut=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function zI(e,n,t){if(n.tableId!==t.tableId)return null;let r=Zt(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(Ut(n).from,Ut(t).from),l=Math.max(Ut(n).to,Ut(t).to),s=p=>{let{from:m,to:g}=Ut(p);return g>=i&&m<=l},d=p=>(r.rows.get(p)??[]).some(m=>m.vMergeContinue&&s(m)),c=r.rows.size+Gy(r)+2;for(let p=0;!(p>c);p+=1){let m=false;for(let[g,h]of r.rows)if(!(g<o||g>a))for(let b of h){if(!s(b))continue;let{from:x,to:k}=Ut(b);x<i&&(i=x,m=true),k>l&&(l=k,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}=Ut(p.cell);g<i||m>l||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:l},text:jI(e,n.tableId,u)}}function Yl(e,n){let t=new Set(n),r=[],o=new Set;for(let a of Zt(e).values())for(let i of a.placed)if(!(i.isHeaderRepeat||!t.has(i.cell.id)))for(let l of i.cell.blocks)Aa(l,r,o);return r}function Aa(e,n,t){if(e.kind==="paragraph"){for(let r of Vt(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)Aa(a,n,t);}function jI(e,n,t){let r=Yl(e,t),o=r[0],a=r[r.length-1];return !o||!a?WI(e,n):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:Io(e,a).length}}}function WI(e,n){let t=Zt(e).get(n);for(let o of t?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let l of o.cell.blocks)Aa(l,a,new Set);let i=a[0];if(i){let l={paragraphId:i,offset:0};return {anchor:l,head:l}}}for(let o of e.pages)for(let a of Je(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function GI(e,n){let t=new Set(Yl(e,n)),r=[],o=new Set;for(let a of e.pages)for(let i of Je(a))if(t.has(i.paragraphId))for(let l of i.lines)for(let s of l.spans){let d=`${s.range.paragraphId}:${s.range.start}:${s.range.end}`;o.has(d)||(o.add(d),r.push(s));}return r}function XI(e,n){let t=new Set(n),r=[];for(let o of Zt(e).values())for(let a of o.placed)t.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x,y:a.cell.box.y,width:a.cell.box.width,height:a.cell.box.height});return r}function $I(e,n){let t=Zt(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 l=Yl(e,[i.cell.id]).map(d=>Io(e,d)).join(`
17
- `),s=o.get(i.rowIndex);s?s.set(i.cell.gridColumn,l):o.set(i.rowIndex,new Map([[i.cell.gridColumn,l]]));}return [...o.keys()].sort((i,l)=>i-l).map(i=>{let l=o.get(i),s=[];for(let d=n.columns.from;d<=n.columns.to;d+=1)s.push(l.get(d)??"");return s.join(" ")}).join(`
18
- `)}function au(e,n){let t=null,r=-1;for(let[o,a]of Zt(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let l=[];for(let d of i.cell.blocks)Aa(d,l,new Set);if(!l.includes(n))continue;let s=o.length;s<=r||(r=s,t={tableId:o,rows:a.rows.size,columns:Gy(a),rowIndex:i.rowIndex,columnIndex:i.cell.gridColumn});}return t}function QL(e,n,t){if(t){let a=au(e,n);if(!a||a.tableId!==t.tableId)return null;let i=t.cellIds[0];if(!i)return null;let l=Zt(e).get(t.tableId);if(!l)return null;for(let s of l.placed)if(s.cell.id===i)return {tableId:t.tableId,rowId:s.row.id,cellId:i,cellIds:t.cellIds,gridColumnIndex:s.cell.gridColumn,isHeaderRepeat:s.isHeaderRepeat};return null}let r=au(e,n);if(!r)return null;let o=Zt(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let l of a.cell.blocks)Aa(l,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{ii as $,Wt as $a,ic as $b,El as $c,ti as A,Cx as Aa,wt as Ab,zO as Ac,Iy as Ad,ix as B,Bx as Ba,ha as Bb,jO as Bc,vy as Bd,lx as C,Lx as Ca,xm as Cb,vl as Cc,ML as Cd,sx as D,Mx as Da,Wd as Db,Fn as Dc,Ay as Dd,Ds as E,Js as Ea,Rt as Eb,gC as Ec,Na as Ed,Of as F,Xr as Fa,Zi as Fb,Lc as Fc,zy as Fd,Cf as G,ed as Ga,qi as Gb,Mc as Gc,LI as Gd,Bf as H,nd as Ha,Em as Hb,Fc as Hc,jy as Hd,Lf as I,Ko as Ia,al as Ib,Uw as Ic,FI as Id,Mf as J,Dx as Ja,il as Jb,Ll as Jc,EI as Jd,Ff as K,$r as Ka,ll as Kb,Xn as Kc,NI as Kd,fx as L,td as La,Yd as Lb,Ph as Lc,Io as Ld,px as M,sr as Ma,_m as Mb,Ml as Mc,AI as Md,Hr as N,jx as Na,Kd as Nb,Fl as Nc,DI as Nd,mx as O,Wx as Oa,hr as Ob,yR as Oc,_I as Od,Hs as P,gt as Pa,Wn as Pb,wh as Pc,zI as Pd,jo as Q,_t as Qa,cl as Qb,Rh as Qc,Yl as Qd,Je as R,Qf as Ra,Sa as Rb,Pr as Rc,GI as Rd,Nf as S,dd as Sa,rg as Sb,xR as Sc,XI as Sd,Af as T,ep as Ta,og as Tb,La as Tc,$I as Td,av as U,cd as Ua,Pa as Ub,Ih as Uc,au as Ud,bx as V,np as Va,mo as Vb,Po as Vc,QL as Vd,oi as W,ht as Wa,oc as Wb,Ma as Wc,zs as X,ud as Xa,sg as Xb,vh as Xc,ai as Y,fd as Ya,ew as Yb,PR as Yc,js as Z,et as Za,go as Zb,Th as Zc,Df as _,Fe as _a,ac as _b,Wc as _c,Zn as a,zr as aa,nt as ab,dc as ac,kh as ad,ar as b,Gs as ba,fS as bb,cc as bc,Oh as bd,yf as c,zf as ca,gd as cb,Sg as cc,Fa as cd,ks as d,Go as da,pn as db,uc as dc,Ch as dd,qa as e,jf as ea,tn as eb,wg as ec,Nl as ed,tb as f,Wf as fa,eo as fb,fc,Xc as fd,Do as g,Wr as ga,aa as gb,ml as gc,Hh as gd,rb as h,Gf as ha,bd as hb,Tt as hc,$c as hd,ob as i,dv as ia,gp as ib,mn as ic,kR as id,Le as j,Xs as ja,RS as jb,TO as jc,Yc as jd,Fb as k,$s as ka,IS as kb,Vt as kc,_l as kd,xf as l,Vs as la,xt as lb,kO as lc,Uh as ld,Kb as m,Ys as ma,fr as mb,bc as mc,Zh as md,Ja as n,pt as na,Sd as nb,va as nc,qc as nd,Zb as o,Xo as oa,pr as ob,fw as oc,jl as od,qb as p,Rn as pa,HS as pb,xl as pc,Gl as pd,Jb as q,At as qa,XT as qb,EO as qc,lI as qd,Ms as r,kx as ra,Bd as rb,pw as rc,yy as rd,Es as s,Ks as sa,ji as sb,Pl as sc,pL as sd,Hn as t,Gr as ta,im as tb,Ag as tc,by as td,nx as u,Us as ua,Yi as ub,wl as uc,xy as ud,tx as v,di as va,sm as vb,Ta as vc,fI as vd,rx as w,$o as wa,co as wb,Tw as wc,hI as wd,ni as x,Zs as xa,JP as xb,DO as xc,bI as xd,ax as y,qs as ya,fo as yb,_O as yc,xI as yd,Ns as z,Vo as za,um as zb,HO as zc,wI as zd};