@docx-editor.dev/core 2.26.0 → 2.27.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 (106) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +14 -10
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +8 -8
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-2GK7YQB2.cjs +2 -0
  8. package/dist/chunk-4KZ6L5YF.cjs +15 -0
  9. package/dist/chunk-55AT3MOU.cjs +25 -0
  10. package/dist/chunk-6ZQMII6V.js +1 -0
  11. package/dist/chunk-7IGCWG4H.js +2 -0
  12. package/dist/chunk-7MYITTAH.js +5 -0
  13. package/dist/chunk-AVKVRU7Z.cjs +5 -0
  14. package/dist/{chunk-7RJSH72J.cjs → chunk-CWRBFNK5.cjs} +5 -5
  15. package/dist/chunk-DGPA3TST.cjs +27 -0
  16. package/dist/{chunk-6SEIXJTX.js → chunk-DNXVNQEO.js} +1 -1
  17. package/dist/chunk-FQN4KSFL.cjs +7 -0
  18. package/dist/{chunk-ELQFXMJ5.cjs → chunk-GVUOWHTO.cjs} +1 -1
  19. package/dist/chunk-GWQJ5774.js +5 -0
  20. package/dist/{chunk-5BIASAN3.js → chunk-HAQ72KD7.js} +1 -1
  21. package/dist/{chunk-TKR2MXX4.cjs → chunk-HO5XFO32.cjs} +1 -1
  22. package/dist/{chunk-LWCI65EL.js → chunk-IGR23DV2.js} +1 -1
  23. package/dist/{chunk-EEAV3WIN.js → chunk-JSIX2EOH.js} +1 -1
  24. package/dist/{chunk-CYT3OQFZ.cjs → chunk-K246T47S.cjs} +1 -1
  25. package/dist/chunk-KAXOGCGA.js +1 -0
  26. package/dist/{chunk-AGKIHLWQ.cjs → chunk-LZLTN5A3.cjs} +1 -1
  27. package/dist/chunk-NBCVVZOM.cjs +1 -0
  28. package/dist/{chunk-AJCCS53D.js → chunk-O5INAWZQ.js} +1 -1
  29. package/dist/{chunk-LZDI4P6I.cjs → chunk-OHAXVTWG.cjs} +1 -1
  30. package/dist/chunk-S74GRBNE.js +7 -0
  31. package/dist/chunk-UBLUVNZR.js +27 -0
  32. package/dist/chunk-UMRSBLO7.js +15 -0
  33. package/dist/chunk-VIPMGGUT.js +25 -0
  34. package/dist/chunk-WG4KMSX2.cjs +2 -0
  35. package/dist/chunk-WRLKVNNR.cjs +1 -0
  36. package/dist/chunk-ZU7IVN6G.js +2 -0
  37. package/dist/collaboration/replication.cjs +1 -1
  38. package/dist/collaboration/replication.d.ts +14 -5
  39. package/dist/collaboration/replication.js +1 -1
  40. package/dist/collaboration.d.ts +3 -3
  41. package/dist/contracts/document.d.ts +2 -2
  42. package/dist/contracts/editor.d.ts +8 -8
  43. package/dist/contracts/modules.cjs +1 -1
  44. package/dist/contracts/modules.d.ts +20 -31
  45. package/dist/contracts/modules.js +1 -1
  46. package/dist/contracts/types.d.ts +1 -1
  47. package/dist/{custom-node-writes-Cy9imOjA.d.ts → custom-node-writes-Vzpq9I8_.d.ts} +2 -2
  48. package/dist/{document-protection-Bp19Ad4I.d.ts → document-protection-9zpIHWTE.d.ts} +1 -1
  49. package/dist/{editor-DYUlyKmb.d.ts → editor-B3OBYNrF.d.ts} +29 -34
  50. package/dist/editor.cjs +1 -1
  51. package/dist/editor.css +2 -2
  52. package/dist/editor.d.ts +28 -27
  53. package/dist/editor.js +1 -1
  54. package/dist/export.cjs +2 -2
  55. package/dist/export.d.ts +26 -14
  56. package/dist/export.js +1 -1
  57. package/dist/{font-resolver-u_nE0PI1.d.ts → font-resolver-DN0xNOf_.d.ts} +1 -1
  58. package/dist/{headless-document-view-R9bzzepb.d.ts → headless-document-view-ICYqNkQ1.d.ts} +2 -2
  59. package/dist/{image-resources-DfagDguq.d.ts → image-resources-BDFxcu7W.d.ts} +1 -1
  60. package/dist/{index-Docw8Dcb.d.ts → index-CkQVRJtJ.d.ts} +53 -21
  61. package/dist/index.cjs +1 -1
  62. package/dist/index.d.ts +18 -17
  63. package/dist/index.js +1 -1
  64. package/dist/{layout-shaping-DWitwY73.d.ts → layout-shaping-BvZD_VKP.d.ts} +1 -1
  65. package/dist/layout.cjs +1 -1
  66. package/dist/layout.d.ts +32 -196
  67. package/dist/layout.js +1 -1
  68. package/dist/{note-properties-CmfvOJsi.d.ts → note-properties-CkAk7g-n.d.ts} +1 -1
  69. package/dist/{omml-equation-CZ6IG2ja.d.ts → omml-equation-DuczgG5o.d.ts} +1 -1
  70. package/dist/output.cjs +1 -1
  71. package/dist/output.d.ts +8 -7
  72. package/dist/output.js +1 -1
  73. package/dist/{protocol-DniKeDb8.d.ts → protocol-aKYr8r3u.d.ts} +6 -5
  74. package/dist/{review-paragraph-order-Dc8Q6tfM.d.ts → review-paragraph-order-Ddj5d6rp.d.ts} +1 -1
  75. package/dist/{revision-projection-DfWxdBqA.d.ts → revision-projection-CSNFudZY.d.ts} +74 -3
  76. package/dist/{semantic-cell-selection-Dy_BmmpL.d.ts → semantic-cell-selection-DoqYCz_F.d.ts} +4 -4
  77. package/dist/{semantic-interaction-CvFAj0GR.d.ts → semantic-interaction-G0bjmmmk.d.ts} +1 -1
  78. package/dist/{semantic-paint-Bk9wIXdZ.d.ts → semantic-paint-CsMzF8-O.d.ts} +57 -5
  79. package/dist/semantic-record-queries-1du6lQqS.d.ts +177 -0
  80. package/dist/{semantic-records-COqi8pjP.d.ts → semantic-records-B9OolWGN.d.ts} +15 -5
  81. package/dist/store.cjs +1 -1
  82. package/dist/store.d.ts +22 -17
  83. package/dist/store.js +1 -1
  84. package/dist/{tree-package-fragment-YPyYC1aD.d.ts → tree-package-fragment-DYZIk1rY.d.ts} +3 -3
  85. package/dist/{tree-session-contract-AeY2v0x9.d.ts → tree-session-contract-DQVJOOkv.d.ts} +5 -5
  86. package/dist/{types-barrel-BO73JqHG.d.ts → types-barrel-BFKR8Pzp.d.ts} +134 -110
  87. package/package.json +3 -3
  88. package/dist/chunk-2BK4G4ZN.js +0 -2
  89. package/dist/chunk-2SJX44PC.cjs +0 -2
  90. package/dist/chunk-73PG6L2X.js +0 -1
  91. package/dist/chunk-AN6WM4X4.js +0 -2
  92. package/dist/chunk-ANZ44KQT.cjs +0 -12
  93. package/dist/chunk-DDGGSBAN.js +0 -12
  94. package/dist/chunk-EYK4K2J6.js +0 -1
  95. package/dist/chunk-JNTETUNZ.cjs +0 -1
  96. package/dist/chunk-L6V3IJ3S.js +0 -5
  97. package/dist/chunk-NS22DVWT.cjs +0 -2
  98. package/dist/chunk-QIE3YTU4.cjs +0 -2
  99. package/dist/chunk-QVBFPAGO.js +0 -5
  100. package/dist/chunk-RCCOLZEQ.js +0 -2
  101. package/dist/chunk-SUN62YU6.cjs +0 -5
  102. package/dist/chunk-TKQH7BNE.cjs +0 -1
  103. package/dist/chunk-UJL2GDIM.cjs +0 -25
  104. package/dist/chunk-WQTADNHK.cjs +0 -27
  105. package/dist/chunk-XSHXBJ2J.js +0 -25
  106. package/dist/chunk-YXZEBTDF.js +0 -27
@@ -1,3 +1,3 @@
1
- import {f,c,d,e}from'./chunk-RIYSCEFQ.js';import {hf,n,l,j as j$1,k as k$1,p,i,o,s,g,f as f$1,ja,na as na$1,Pa as Pa$1,za,eb,db,ca as ca$1,ea as ea$1,ad,_c,wc,qc,Wc,Ra,A,z,Jd,Id,Ma,ua as ua$1,Kd,r,a as a$1,b,e as e$1,c as c$1,m,Ca,Ia,Bc,yc,Yc,Vc,qb,$c,va as va$1,h,da as da$1,ta as ta$1}from'./chunk-XSHXBJ2J.js';import {va}from'./chunk-L6V3IJ3S.js';import {a,yi,Mb,Kb,Pb,Lb,Ig,Bi,Ai,zi,yb,Ib}from'./chunk-DDGGSBAN.js';var jn=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let d=i*2n;(d>t||d===t&&(n==="halfAwayFromZero"||n==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let c=r?-a:a,s=Number(c);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},Ye=(e,t,n$1,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(n$1)||n$1<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");if(e===0||n$1===0)return n(0);let o=e*n$1;if(Number.isSafeInteger(o)){let a=Math.abs(o),i=a%t,c=(a-i)/t;return r!=="towardZero"&&(i>t-i||i===t-i&&(r==="halfAwayFromZero"||r==="halfToEven"&&c%2!==0))&&(c+=1),n(c===0?0:o<0?-c:c)}return n(jn(BigInt(e)*BigInt(n$1),BigInt(t),r))},Ut=(e,t,n,r)=>{if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("font size must be a positive integer number of half points");if(t>Math.floor(Number.MAX_SAFE_INTEGER/n))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=t*n,a=e*2;return i=>Ye(i,a,o,r)},Wt=(e,t,n)=>{let r=t*n,o=e*2;return a=>a*r/o};var Yn=4096,Kt=e=>typeof e=="number"?String(e):JSON.stringify(e)??typeof e,ve=class{constructor(t){this.onRestart=t;}onRestart;#e=new Map;keyOf(t,n){let r$1=r(n),o=this.#e.get(r$1);o===void 0&&(this.#e.size>=Yn&&(this.#e.clear(),this.onRestart()),o=this.#e.size,this.#e.set(r$1,o));let a=`${o}\0${Kt(t.fontSizeHalfPoints)}\0${Kt(t.bidiLevel)}\0`,i=t.context;return !i||i.before===""&&i.after===""?`${a}-${t.text}`:`${a}c${i.before.length},${i.after.length}\0${i.before}${i.after}${t.text}`}clear(){this.#e.clear();}};var q=Object.freeze({name:"HarfBuzz",version:"14.4.0"}),se=null,ae=null;function qe(){return se?Promise.resolve():ae||(ae=import('./dist-PKZR6RSH.js').then(e=>{let t=e.versionString();if(t!==q.version)throw new I("shapingLibraryMismatch",{diagnostic:f(q.version,t)});se=e;}).catch(e$1=>{throw ae=null,e$1 instanceof I?e$1:c(e$1)?new I("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new I("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),ae)}function $n(){return se!==null}function qn(){if(!se)throw new I("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return se}var I=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(t,n={}){super(`HarfBuzz shaping failed (${t})`,{cause:n.cause}),this.code=t,this.limit=n.limit,this.actual=n.actual,this.diagnostic=n.diagnostic;}},Zn=16*1024*1024,Jn=1e6,Qn=1e6,er=1e6,tr=4,nr=512,rr=1024*1024,or=16*1024*1024,ar=32*1024*1024,ir=64*1024*1024,sr=64*1024*1024,cr=1e6,lr=1e6,dr=1e6,ur=64,pr=4096,fr=4*1024*1024,yr=64*1024*1024,mr=64*1024*1024,hr=256*1024*1024,gr=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Vt=["cmap","head","hhea","hmtx","maxp"],Sr=(e,t)=>e[t]<<8|e[t+1],br=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,xr=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?br(e,12+t*4):0,Rr=(e,t)=>{let n=xr(e,t),r=Sr(e,n+4),o=new Set;for(let a=0;a<r;a+=1){let i=n+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},Cr=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),Fr=(e,t)=>{let n=l(e,t);if(!n.valid)return n;let r=Rr(e,t);for(let o of Vt)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},Ze=Fr,k=(e,t,n)=>{if(!Number.isSafeInteger(e)||e<=0||e>n)throw new RangeError(`${t} must be a positive safe integer no greater than ${n}`);return e},vr=(e,t,n$1)=>{if(t.length===0)return [];let r=[],o=0;for(;o<t.length;){let a=t[o].cluster,i=o+1,c=t[o].advanceX;for(;i<t.length&&t[i].cluster===a;)c+=t[i].advanceX,i+=1;let s=n(c);r.push({textStart:a,textEnd:n$1==="rtl"?t[o-1]?.cluster??e.length:t[i]?.cluster??e.length,glyphStart:o,glyphEnd:i,advance:s,caretEdges:Object.freeze([n(0),s]),fontSpan:0}),o=i;}return r},N=64,G=8,U=8,Xt=32,Je=N+2*G,Er=N+G+U,Lr=N+G+2*U,Ir=N+G+U,jt=N+8*G,Yt=N+8*U+G,Or=N+6*U+G,Tr=N+3*U+2*G,Br=N+3*U,ce=e=>N+e.length*Uint16Array.BYTES_PER_ELEMENT,Qe=e=>Ir+ce(e),ie=e=>Xt+e*G,wr=(e,t)=>Je+ce(e)+Er+Qe(t),Ar=e=>jt+ce(e)+ie(e.length)+e.length*Yt,Pr=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return jt+ce(e.text)+ie(e.glyphs.length)+e.glyphs.length*Yt+ie(e.clusters.length)+e.clusters.length*Or+e.clusters.reduce((n,r)=>n+ie(r.caretEdges.length),0)+ie(e.fontSpans.length)+e.fontSpans.length*Tr+(e.exactAdvancesX===void 0?0:Xt+e.exactAdvancesX.length*U)+Br+[...t].reduce((n,r)=>n+Qe(r.path),0)},_r=(e,t)=>Je+ce(e)+Lr+t,$e=class{#e;#p;#f;#y;#m;#R;#h;#l=0;#C;#g;#S;#c;#b;#d;#t;#o=new Map;#i=new Map;#s=new Map;#n=new Map;#F=new ve(()=>{this.#n.clear(),this.#r=0,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0}));});#a=0;#r=0;#x=0;#u;constructor(t,n){this.#e=t,this.#p=k(n.maxFontBytes??Zn,"maximum font bytes",sr),this.#f=k(n.maxInputUtf16??Jn,"maximum input UTF-16 code units",cr),this.#y=k(n.maxCodepoints??Qn,"maximum input code points",lr),this.#m=k(n.maxGlyphs??er,"maximum shaped glyphs",dr),this.#h=k(n.maxCachedFontBytes??64*1024*1024,"maximum cached font bytes",64*1024*1024),this.#R=k(n.maxCachedFaces??tr,"maximum cached faces",ur),this.#C=k(n.maxCachedShapes??nr,"maximum cached shape results",pr),this.#g=k(n.maxOutlineBytes??rr,"maximum outline bytes",fr),this.#S=k(n.maxCachedOutlineBytes??or,"maximum cached outline bytes",yr),this.#c=k(n.maxShapedRunBytes??ar,"maximum shaped run bytes",mr),this.#b=k(n.maxCachedShapeBytes??ir,"maximum cached shape bytes",hr),this.#d=n.instrumentation?.onFaceCacheEvent,this.#t=n.instrumentation,this.#u=new this.#e.Buffer;}dispose(){this.#o.clear(),this.#l=0,this.#i.clear(),this.#s.clear(),this.#n.clear(),this.#F.clear(),this.#a=0,this.#r=0,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#u=void 0;}#E(t,n){let r=this.#o.get(t.identity);if(r)return this.#o.delete(t.identity),this.#o.set(t.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:t.identity})),r;let o=j$1(t);for(let l of Vt)if(!o.has(l))throw new I("malformedFont",{diagnostic:`missing required ${l} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(Cr(n)),i=new this.#e.Face(a,t.faceIndex),c=new this.#e.Font(i),s=c.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new I("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});c.setScale(i.upem,i.upem);let d={identity:t.identity,blob:a,face:i,font:c,unitsPerEm:i.upem,byteLength:n.byteLength};if(n.byteLength<=this.#h){for(;this.#o.size>=this.#R||this.#l+n.byteLength>this.#h;){let l=this.#o.keys().next().value;if(l===void 0)break;this.#l-=this.#o.get(l).byteLength,this.#o.delete(l),this.#d?.(Object.freeze({kind:"evicted",identity:l}));}this.#o.set(t.identity,d),this.#l+=n.byteLength;}return this.#d?.(Object.freeze({kind:"created",identity:t.identity})),d}#L(t,n){let r=this.#i.get(t.identity)?.get(n);if(r)return this.#s.delete(r),this.#s.set(r,void 0),this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#a})),r.outline;this.#t?.onOutlinePathCall?.();let o=t.font.glyphToPath(n),a=Qe(o);if(a>this.#g)throw new I("outlineOverLimit",{limit:this.#g,actual:a});let i=Object.freeze({path:o,unitsPerEm:t.unitsPerEm}),c=wr(t.identity,o)+3*Je+2*U;if(c>this.#S)return this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#a})),i;for(;this.#a+c>this.#S;){let l=this.#s.keys().next().value;if(l===void 0)break;this.#s.delete(l);let f=this.#i.get(l.identity);f.delete(l.glyphId),f.size===0&&this.#i.delete(l.identity),this.#a-=l.bytes,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#a}));}let s=this.#i.get(t.identity);s||this.#i.set(t.identity,s=new Map);let d={outline:i,bytes:c,identity:t.identity,glyphId:n};return s.set(n,d),this.#s.set(d,void 0),this.#a+=c,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#a})),i}#v(t){if(t.length>this.#f)throw new I("textOverLimit",{limit:this.#f,actual:t.length});let n=0;for(let r=0;r<t.length;){let o=t.codePointAt(r);if(r+=o>65535?2:1,n+=1,n>this.#y)throw new I("codepointsOverLimit",{limit:this.#y,actual:n})}}shape(t){if(!this.#u)throw new I("disposed");if(k$1(t.environment.font),t.environment.font.byteLength>this.#p)throw new I("fontOverLimit",{limit:this.#p,actual:t.environment.font.byteLength});this.#v(t.text);let n$1=Ar(t.text);if(n$1>this.#c)throw new I("shapedRunOverLimit",{limit:this.#c,actual:n$1});let r=p(t.environment),o$1=this.#F.keyOf(t,r),a=this.#n.get(o$1);if(a)return this.#x-a.stamp>=Math.max(1,this.#n.size>>1)&&(this.#n.delete(o$1),this.#n.set(o$1,a),a.stamp=++this.#x),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==q.name||r.shapingLibrary.version!==q.version)throw new I("shapingLibraryMismatch");if(r.normalization!=="none")throw new I("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r.direction==="rtl"))throw new I("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new I("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new I("unsupportedFallback");let i$1=i(r.font),c=j$1(r.font);if([...gr].some(y=>c.has(y))&&!c.has("glyf")&&!c.has("CFF "))throw new I("unsupportedColorFont");let s$1=t.text;this.#v(s$1);let d=t.context?.before??"",l=t.context?.after??"",f=o,h=Math.max(String(d).length,String(l).length);if(typeof d!="string"||typeof l!="string"||h>f)throw new I("textOverLimit",{limit:f,actual:h});try{let y=this.#E(r.font,i$1),{face:b,font:x}=y,m=this.#u;m.reset(),d||l?m.addText(d+s$1+l,d.length,s$1.length):m.addText(s$1),m.setDirection(r.direction==="rtl"?this.#e.Direction.RTL:this.#e.Direction.LTR),m.setScript(r.script),m.setLanguage(r.language),m.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let g=Object.entries(r.features).map(([B,H])=>new this.#e.Feature(B,H));this.#t?.onShapeCall?.(),this.#e.shape(x,m,g);let S=m.getLength();if(S>this.#m)throw new I("glyphOverLimit",{limit:this.#m,actual:S});let C=m.getGlyphInfos(),v=m.getGlyphPositions(),F=Ut(b.upem,t.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),T=Wt(b.upem,t.fontSizeHalfPoints,r.fixedPointScale),p=[],u=n(0),R=n(0),E=new Map,L=C.map((B,H)=>{let te=v[H];p.push(T(te?.xAdvance??0));let ut=F(te?.xAdvance??0),pt=F(te?.yAdvance??0),Xn={id:B.codepoint,cluster:B.cluster-d.length,originX:u,originY:R,advanceX:ut,advanceY:pt,offsetX:F(te?.xOffset??0),offsetY:F(te?.yOffset??0),outline:E.get(B.codepoint)??(()=>{let ft=this.#L(y,B.codepoint);return E.set(B.codepoint,ft),ft})()};return u=n(u+ut),R=n(R+pt),Xn}),O=x.hExtents(),A=s({text:s$1,direction:r.direction,bidiLevel:t.bidiLevel,glyphs:L,exactAdvancesX:p,clusters:vr(s$1,L,r.direction),fontSpans:L.length===0?[]:[{glyphStart:0,glyphEnd:L.length,font:r.font,fallbackIndex:null}],metrics:{ascent:F(O.ascender),descent:F(-O.descender),lineGap:F(O.lineGap)}},r),w=Pr(A);if(w>this.#c)throw new I("shapedRunOverLimit",{limit:this.#c,actual:w});let M=_r(o$1,w);if(M>this.#b)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),A;for(;this.#n.size>=this.#C||this.#r+M>this.#b;){let B=this.#n.keys().next().value;if(B===void 0)break;let H=this.#n.get(B);this.#n.delete(B),this.#r-=H.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o$1,{run:A,bytes:M,stamp:++this.#x}),this.#r+=M,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),A}catch(y){throw y instanceof I?y:new I("malformedFont",{diagnostic:y instanceof Error?y.message:"HarfBuzz shaping failed"})}}},et=(e={})=>new $e(qn(),e);var tt=Object.freeze({maxFontBytes:16*1024*1024,maxInputUtf16:1e6,maxCodepoints:1e6,maxGlyphs:1e6,maxCachedFaces:32,maxCachedFontBytes:64*1024*1024,maxCachedShapes:512,maxOutlineBytes:1024*1024,maxCachedOutlineBytes:16*1024*1024,maxShapedRunBytes:32*1024*1024,maxCachedShapeBytes:64*1024*1024}),Ea=Object.freeze({...tt,maxCachedShapes:4096});function $t(e){let t={maxFontBytes:e.maxFontBytes,maxInputUtf16:e.maxInputUtf16,maxCodepoints:e.maxCodepoints,maxGlyphs:e.maxGlyphs,maxOutlineBytes:e.maxOutlineBytes,maxShapedRunBytes:e.maxShapedRunBytes},n=["docx-editor-layout-harfbuzz-execution-policy",1,Object.entries(t).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>Object.freeze([r,o]))];return `layout-shaper-policy:sha256:${a(new TextEncoder().encode(JSON.stringify(n)))}`}var Mr=Object.freeze({}),qt=b,kr="16.0.0",zr="none",Nr=1e3,Dr="halfToEven",Qt="cluster-edges-only",Hr="Latn",Gr=new Uint8Array(0);var W=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function Ur(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a=e.substitutions,i=e.defaultFont,c=e.language;if(!Number.isSafeInteger(r)||r<=0||r>a$1)throw new W(`Font byte ceiling must not exceed the engine hard maximum of ${a$1}`);let s=o.length,d=a?.length??0;if(s===0||s>b)throw new W(`Font source count must be between 1 and ${b}`);if(d>qt)throw new W(`Font substitution count must not exceed ${qt}`);let l=0,f=[];for(let b=0;b<s;b+=1){let x=o[b],m=x.request,g$1=x.availability,S=x.id,C=x.hash,v=x.faceIndex,F=g$1==="forbidden",T=F?Gr:x.bytes;if(!F){if(typeof S!="string"||S.length===0)throw new TypeError("Resolved font id must not be empty");let p;try{p=e$1(T);}catch{throw new W(`Font source ${S} must provide genuine bytes`)}if(p>r)throw new W(`Font source ${S} exceeds the per-font byte ceiling`);if(l+=p,l>c$1)throw new W(`Font sources exceed the aggregate byte ceiling of ${c$1}`)}f.push(t&&g(x)!==void 0?x:Object.freeze({request:Object.freeze({family:m.family,weight:m.weight,style:m.style}),id:S,bytes:T,hash:C,faceIndex:v,...g$1?{availability:g$1}:{}}));}let h;if(a){h=[];for(let b=0;b<d;b+=1){let x=a[b],m=x.from,g=x.to,S=x.lineMetrics;h.push(Object.freeze({from:Object.freeze({family:m.family,weight:m.weight,style:m.style}),to:Object.freeze({family:g.family,weight:g.weight,style:g.style}),...S?{lineMetrics:Object.freeze({heightEm:S.heightEm,baselineEm:S.baselineEm})}:{}}));}}let y={epoch:n,maxFontBytes:r,sources:Object.freeze(f),substitutions:h?Object.freeze(h):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:c};return Object.freeze(y)}function Zt(e,t){let n=e.map((o,a)=>({value:o,index:a,key:h(t(o))})),r=new Set;for(let o of n){if(r.has(o.key))return e;r.add(o.key);}return n.sort((o,a)=>o.key<a.key?-1:o.key>a.key?1:o.index-a.index).map(({value:o})=>o)}function Wr(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function Jt(e,t){let n=s=>({family:s.family,weight:s.weight,style:s.style}),r=t?e.sources:Zt(e.sources,s=>s.request),o=e.substitutions??[],a=t?o:Zt(o,s=>s.from),i={sources:r.map(s=>{let d=s.availability??"available",l={request:n(s.request),availability:d};if(d==="forbidden")return {...l,...t?{id:s.id,faceIndex:s.faceIndex,declaredHash:s.hash}:{}};let f=g(s);if(f==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...l,...t?{id:s.id}:{},faceIndex:s.faceIndex,declaredHash:s.hash,actualHash:f,byteLength:s.bytes.byteLength}}),substitutions:a.map(s=>({from:n(s.from),to:n(s.to),lineMetrics:s.lineMetrics?{heightEm:s.lineMetrics.heightEm,baselineEm:s.lineMetrics.baselineEm}:null})),defaultFont:Wr(e.defaultFont,t),language:e.language||"en"},c={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?c:{},...i}}var Kr=Symbol("prepared-layout-font-configuration"),Ee=new WeakMap;function Vr(e){return Ee.has(e)}function Xr(e){let t=Ee.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function wa(e){let t=Ee.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function nt(e,t){return en(e,t,false)}function Aa(e,t){return en(e,t,true)}function en(e,t,n){let r=Ur(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(f=>n&&g(f)!==void 0?f:f$1(f,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a$1=new TextEncoder,i=Jt(o,true),c=a$1.encode(JSON.stringify(i)),s=Jt(o,false),d=a$1.encode(JSON.stringify(s)),l=Object.freeze({[Kr]:true,fingerprint:`font-config:${a(c)}`});return Ee.set(l,{configuration:o,sharedShapingFingerprint:`shared-font-config:${a(d)}`}),l}function jr(e){return nt(e).fingerprint}function Yr(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:$t(t),ligatureCaretPolicy:Qt,fallback:da$1}));return `shaping:${a(n)}`}async function tn(e,t,n,r,o=false){let i=Vr(e)?e:nt(e,t),c=Xr(i),{epoch:s,maxFontBytes:d,sources:l,substitutions:f,defaultFont:h}=c,y=c.language||"en",b=i.fingerprint,x=m({epoch:s,maxFontBytes:d,resources:l,substitutions:f,validateFont:Ze,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await qe();let m$1=Object.freeze({script:Hr,variationAxes:Object.freeze({}),shapingLibrary:q,unicodeDataVersion:kr,normalization:zr,language:y,features:Mr,...o?{documentLigatures:true}:{},fixedPointScale:Nr,roundingMode:Dr});return Object.freeze({fonts:x,shaper:n??et(r),defaultFont:h,environment:m$1,ligatureCaretPolicy:Qt,operation:Object.freeze({resourceEpoch:x.epoch,configEpoch:s,extensionFingerprint:b,shapingHash:Yr(m$1,r),producerVersion:1})})}async function $r(e,t){return tn(e,t,void 0,tt)}async function Pa(e,t,n,r,o=false){return tn(e,r,t,n,o)}function qr(e){e.shaper.dispose?.();}function rt(e){let t=new Set([0,e.text.length]);for(let r of ja(e.text))t.add(r.utf16From),t.add(r.utf16To);let n=new Set([0,e.text.length]);for(let r of e.clusters)n.add(r.textStart),n.add(r.textEnd);return [...t].filter(r=>n.has(r)).sort((r,o)=>r-o)}function Le(e,t){return rt(e).includes(t)}function Zr(e,t){return Le(e,t)}function Jr(e,t,n){return n>=t&&Le(e,t)&&Le(e,n)}function Qr(e){let t=ja(e.text);return rt(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var at="und";function an(){return typeof Intl.Segmenter=="function"}function eo(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${at})`);return e}function sn(){let e=new(eo())(at,{granularity:"word"});return {segment(t){let n=[];for(let r of e.segment(t)){let o=r.index,a=o+r.segment.length;n.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return n}}}var to=/^[\p{L}\p{N}']$/u,no=/^\s$/u;function nn(e){return to.test(e)}function rn(e){return no.test(e)}function ot(e,t,n,r){let o=e[t],a=e[n-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function cn(e){let t=ja(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(rn(o.text)){let a=r+1;for(;a<t.length&&rn(t[a].text);)a+=1;n.push(ot(t,r,a,false)),r=a;continue}if(nn(o.text)){let a=r+1;for(;a<t.length&&nn(t[a].text);)a+=1;n.push(ot(t,r,a,true)),r=a;continue}n.push(ot(t,r,r+1,false)),r+=1;}return n}function ln(){return {segment:cn}}function dn(e={}){let t=e.isIntlAvailable??an,n=e.createIntlBoundary??sn,r=e.createFallbackBoundary??ln;if(!t())return r();try{return n()}catch{return r()}}var on;function un(){return on??=dn(),on}function ro(e,t=un()){return t.segment(e)}function oo(e,t){return t.map(n=>({graphemeFrom:na$1(e,n.utf16From),graphemeTo:na$1(e,n.utf16To),wordLike:n.wordLike}))}var pn={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},ct=Object.keys(pn),fn=ct.filter(e=>pn[e]==="coarse-gate"),Ie=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},J=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},ao={resourceEpoch:Ie,configEpoch:Ie,extensionFingerprint:J,shapingHash:J,producerVersion:Ie},io=(e,t)=>{ao[t](e[t],t);},Q=e=>{for(let t of ct)io(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},so=(e,t)=>{let n=Q(e),r=Q(t),o=ct.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},it=e=>{let t=e.map(({key:n,fingerprint:r})=>(J(n,"resource dependency key"),J(r,"resource dependency fingerprint"),Object.freeze({key:n,fingerprint:r}))).sort((n,r)=>n.key<r.key?-1:n.key>r.key?1:0);for(let n=1;n<t.length;n+=1)if(t[n-1].key===t[n].key)throw new TypeError(`Duplicate resource dependency: ${t[n].key}`);return Object.freeze(t)},co=e=>(Ie(e.revision,"revision"),J(e.dependencyFingerprint,"dependencyFingerprint"),J(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:it(e.resourceDependencies),...Q(e)})),lo=(e,t)=>{let n=it(e),r=it(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[a],c=r[a];if(i?.key!==c?.key||i?.fingerprint!==c?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??c.key}}return null};function uo(e,t){if(e.dependencyFingerprint!==t.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==t.inputFingerprint)return {hit:false,reason:"input-changed"};let n=lo(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of fn)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var st=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=uo(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:co(r)});}evictEpoch(t){let n=Q(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;fn.some(c=>i[c]!==n[c])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=Q(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>n.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function yn(e){return e.projected===true?null:e.range}function fo(e,t,n){let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:c}=e,s=o==="header"||o==="footer"?d=>ta$1(d,e.origin,{x:r.box.x,y:r.box.y}):void 0;Ca(a,(d,l)=>{let{textboxDepth:f,textboxOwner:h,textboxPath:y,storyOrigin:b}=l,x=f===0?o:"textbox";for(let m of d.lines){let g=[...Ia(m)].sort((S,C)=>(t.get(S.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(C.paragraphId)??Number.MAX_SAFE_INTEGER));for(let S of g)for(let C of S.spans)n({page:r,story:x,rootStory:o,root:e,storyOrigin:b,absoluteBox:Object.freeze({x:b.x+C.box.x,y:b.y+C.box.y,width:C.box.width,height:C.box.height}),noteScopeId:i,noteAreaKind:c,textboxDepth:f,textboxOwner:h,textboxPath:y,paragraph:d,paragraphId:S.paragraphId,line:m,span:C,sourceRange:yn(C)});}},e.origin,s);}function yo(e,t){let n=new Map(Pa$1(e).map((r,o)=>[r,o]));za(e,r=>fo(r,n,t));}var ho=1,mn=4,j=Object.freeze({top:0,right:0,bottom:0,left:0}),hn=new WeakMap;function go(e,t){let n=So(e);return n===j?t:eb(t,n)}function So(e){let t=e.vectorShape;if(!t)return j;let{cx:n,cy:r}=t.extentEmu;if(!(n>=0)||!(r>=0)||n===0&&r===0)return j;let o=hn.get(t);if(o||(o=bo(t),hn.set(t,o)),o===j)return j;let a=e.paintBounds,i=e.geometry.contentBounds;if(!(a.width>0||i.width<=0)||!(a.height>0||i.height<=0))return j;let c=n>0?i.width/n:i.height/r,s=r>0?i.height/r:i.width/n,d=(f,h,y)=>{if(y<-1e-3)return 0;let b=f*h-Math.max(0,y);return Number.isFinite(b)&&b>0?b:0},l={left:d(o.left,c,i.x-a.x),top:d(o.top,s,i.y-a.y),right:d(o.right,c,a.x+a.width-(i.x+i.width)),bottom:d(o.bottom,s,a.y+a.height-(i.y+i.height))};return l.left||l.top||l.right||l.bottom?Object.freeze(l):j}function bo(e){let{cx:t,cy:n}=e.extentEmu,r=0,o=0,a=t,i=n,c=(l,f)=>{r=Math.min(r,l),a=Math.max(a,l),o=Math.min(o,f),i=Math.max(i,f);},s=ho,d=l=>l.x>=-s&&l.x<=t+s&&l.y>=-s&&l.y<=n+s;for(let l of e.components){if(l.strokeHex===null||l.strokeInset===true)continue;let f=Math.max(1,db(l.strokeWidthEmu))/2;l.subpathsEmu.forEach((h,y)=>{let b=l.subpathsClosed?.[y]!==false,x=xo(h,b),m=b&&x.length>2?x.length:x.length-1,g=[];for(let C=0;C<m;C+=1){let v=x[C],F=x[(C+1)%x.length],T=Math.hypot(F.x-v.x,F.y-v.y),p={x:-(F.y-v.y)/T,y:(F.x-v.x)/T};if(g.push(p),!!Ro(v,F,-s,t+s,-s,n+s))for(let u=0;u<2;u+=1){let R=K[u],E=v.x+(F.x-v.x)*R,L=v.y+(F.y-v.y)*R;c(E+p.x*f,L+p.y*f),c(E-p.x*f,L-p.y*f);}}let S=b&&x.length>2?g.length:g.length-1;for(let C=0;C<S;C+=1){let v=x[(C+1)%x.length];if(!d(v))continue;let F=g[C],T=g[(C+1)%g.length],p=1+F.x*T.x+F.y*T.y;if(p<2/(mn*mn))continue;let u=F.y*-T.x- -F.x*T.y;if(u===0)continue;let R=u>0?-1:1;c(v.x+R*(F.x+T.x)*f/p,v.y+R*(F.y+T.y)*f/p);}});for(let h of l.arrowheadsEmu??[])if(!(!h[0]||!d(h[0])))for(let y of h)c(y.x,y.y);}return r>=0&&o>=0&&a<=t&&i<=n?j:Object.freeze({left:-r,top:-o,right:a-t,bottom:i-n})}function xo(e,t){let n=[];for(let a of e){let i=n[n.length-1];(!i||i.x!==a.x||i.y!==a.y)&&n.push(a);}let r=n[0],o=n[n.length-1];return t&&n.length>1&&r.x===o.x&&r.y===o.y&&n.pop(),n}var K=new Float64Array(2);function Ro(e,t,n,r,o,a){let i=t.x-e.x,c=t.y-e.y;return K[0]=0,K[1]=1,Oe(-i,e.x-n)&&Oe(i,r-e.x)&&Oe(-c,e.y-o)&&Oe(c,a-e.y)}function Oe(e,t){if(e===0)return t>=0;let n=t/e;return e<0?K[0]=Math.max(K[0],n):K[1]=Math.min(K[1],n),K[0]<=K[1]}function D(e){return (e.kerningEnabled??e.kerningMinPt>0)&&e.kerningMinPt>0&&e.fontSizePt>=e.kerningMinPt}var xn="Calibri, Carlito, Helvetica, Arial, sans-serif",Qa=new Map([["calibri","Carlito"]]),Co=65536,Fo=256;function gn(e,t){return e===void 0?Math.max(1,Math.floor(t)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function Sn(e){let t=new Map,n=0;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>e;){let a=t.keys().next();if(a.done)break;t.delete(a.value),n+=1;}},get size(){return t.size},get evictions(){return n}}}var bn=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function Rn(e=null){return e!=null&&typeof e.measureText=="function"}function Cn(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??xn,r=e.context??null;if(!Rn(r))return null;let o=r,a=Sn(gn(e.maxWidthEntries,Co)),i=Sn(gn(e.maxMetricsEntries,Fo)),c=e.fontAlias,s=l=>{let f=l.fontFamily&&bn.test(l.fontFamily)?l.fontFamily:null,h=f?c?.(f):void 0,y=h&&bn.test(h)?h:null,b=f?y?`"${y}", "${f}", ${n}`:`"${f}", ${n}`:n,x=l.bold?"bold":"normal",m=l.italic?"italic":"normal",g=l.smallCaps?"small-caps":"normal",S=l.fontSizePt*ca$1(l)*t;return `${m} ${g} ${x} ${S}px ${b}`},d=(l,f,h)=>l/t*(h.horizontalScalePercent/100)+f.length*h.characterSpacingPt;return {measure(l,f){if(l.length===0)return 0;let h=s(f),y=`${h}\0${D(f)}\0${l}`,b=a.get(y);if(b!==void 0)return d(b,l,f);o.font=h,"fontKerning"in o&&(o.fontKerning=D(f)?"normal":"none");let x=o.measureText(l).width;return a.set(y,x),d(x,l,f)},inkBounds(l,f){if(!l||l.length>2||f.shaping?.direction==="rtl"||ja(l).length!==1)return;o.font=s(f),"fontKerning"in o&&(o.fontKerning=D(f)?"normal":"none");let h=o.textAlign,y=o.direction,b;try{h!==void 0&&(o.textAlign="left"),y!==void 0&&(o.direction="ltr"),b=o.measureText(l);}finally{h!==void 0&&(o.textAlign=h),y!==void 0&&(o.direction=y);}let x=b.actualBoundingBoxLeft,m=b.actualBoundingBoxRight;if(x===void 0||m===void 0||!Number.isFinite(x)||!Number.isFinite(m))return;let g=f.horizontalScalePercent/(100*t);return {left:-x*g,right:m*g}},lineMetrics(l){let f=l.fontSizePt*ca$1(l),h=s(l),y=i.get(h);if(y)return y;let b=f*1.15,x=f*.8;o.font=h,"fontKerning"in o&&(o.fontKerning=D(l)?"normal":"none");let m=o.measureText("Hxg"),g=m.fontBoundingBoxAscent,S=m.fontBoundingBoxDescent;if(typeof g=="number"&&Number.isFinite(g)&&g>0&&(x=g/t,typeof S=="number"&&Number.isFinite(S)&&S>=0)){let v=(g+S)/t;v>0&&(b=Math.max(v,b));}b>0||(b=f*1.15);let C={height:b,baseline:x};return i.set(h,C),C}}}function vo(e=1,t={}){let n=Cn({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:ea$1(),producer:"fixed-measurer"}}function Eo(e){let t;return n=>{t===void 0&&(t=ad(e.pages)?.hosts??null);let r=t?.get(n);return r?_c(r.pageNumber,r.format):null}}function Fn(e,t){let n=Bc(e,t.displayMode??Ra),r=yc({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:Ig(t.package,"footnote"),endnotesPart:Ig(t.package,"endnote")}:void 0,a=Yc(n,r,o,t.package?Vc(t.package,e,n):void 0,t.displayMode??Ra);return {blocks:n,notes:o,context:a}}function vn(e,t,n,r,o){for(let a of t){if(r.length>=yi)return;if(n.tokenForParagraph(a.id)!==""&&Bi(e,a.id)===null)for(let i of Ai(a)){if(r.length>=yi)return;if(!i.rewritable)continue;let c=qb(i.instruction);if(c===null)continue;let s=n.liveValueOf(i.fieldNodeId,c);if(s===null&&o&&n.pageRefProjectionOf){let d=n.pageRefProjectionOf(i.fieldNodeId,c);if(d){let l=o(d.targetParagraphId);l!==null&&l.length>0&&$c(d.calibration,d.cached,l,Number.NaN)&&(s=l);}}s===null||s===i.cachedText||s.length>zi||s.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:s});}}}function Lo(e,t){let{blocks:n,context:r}=Fn(e,t);if(r===null)return null;let o=[];return vn(e,wc(qc(n)),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function di(e,t){let{notes:n,context:r}=Fn(e,t);if(r===null||n===void 0)return [];let o=[],a=[{noteKind:"footnote",notesPart:n.footnotesPart},{noteKind:"endnote",notesPart:n.endnotesPart}];for(let{noteKind:i,notesPart:c}of a){if(!c)continue;let s=[];for(let d of Wc(c,t.displayMode??Ra)){if(s.length>=yi)break;vn(c,wc(qc(d)),r,s);}s.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:s}});}return o}function Io(e){return e.box}function En(e,t){if(e.kind==="paragraph"){t.add(e.paragraphId);return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)En(o,t);}function Oo(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>yb*4)){for(let c of o.children)if(c.kind!=="textValue"){if(c.kind==="paragraph"){for(let s of r)t.get(s)?.push(c.id);n(c,c.id,i+1);continue}if(c.kind==="contentControl"){t.set(c.id,[]),r.push(c.id);let s=Ib(c);s&&n(s,a,i+1),r.pop();let d=t.get(c.id);d&&d.length===0&&a!==null&&d.push(a);continue}n(c,a,i+1);}}},r=[];return n(e,null,0),t}function To(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return {x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function Bo(e,t){let n=Mb(e.root);if(n.length===0)return wo;let r=new Map;t.pages.forEach((i,c)=>{(d=>{for(let l of d){let f=new Set;En(l,f);for(let h of f){let y=r.get(h)??[];y.push({pageIndex:c,box:Io(l)}),r.set(h,y);}}})(i.fragments);});let o=Oo(e.root),a=[];for(let i of n){let c=Kb(i.node),s=[...i.ancestors.map(h=>Kb(h).lock),c.lock],d=o.get(i.node.id)??[],l=new Map;for(let h of d)for(let y of r.get(h)??[]){let b=l.get(y.pageIndex);l.set(y.pageIndex,b?To(b,y.box):y.box);}let f=[...l.entries()].sort((h,y)=>h[0]-y[0]).map(([h,y])=>({pageIndex:h,...y}));a.push({controlId:i.node.id,type:c.type,level:Lb(i.node),depth:i.depth,lock:c.lock,effectiveLock:Pb(s),showingPlaceholder:c.showingPlaceholder,temporary:c.temporary,...c.tag===void 0?{}:{tag:c.tag},...c.alias===void 0?{}:{alias:c.alias},...c.id===void 0?{}:{id:c.id},...c.dataBinding===void 0?{}:{dataBinding:c.dataBinding},paragraphIds:d,fragments:f});}return a}var wo=Object.freeze([]);function In(e,t,n){let r=e.lines?.find(o=>{let a=o.spans;if(!a)return n<o.range.end;let i=a.filter(c=>c.range.paragraphId===t);return i.length===a.length?n<o.range.end:i.length>0&&n<i[i.length-1].range.end});return r?r.box.y:e.fragmentY}function Uo(e,t){let n=new Map;for(let r of e.pages)for(let[o,a]of Wo(r,t))n.has(o)||n.set(o,a);return n}var Ln=new WeakMap;function Wo(e,t){let n=Ln.get(t);n||(n=new WeakMap,Ln.set(t,n));let r=n.get(e);if(r)return r;let o=new Map;for(let a of t(e)){let i=new Set([a.paragraphId]);for(let c of a.lines??[])for(let s of c.spans??[])i.add(s.range.paragraphId);for(let c of i)o.has(c)||o.set(c,{pageIndex:e.index,contentY:e.contentBox.y,fragmentY:a.box.y,...a.lines?{lines:a.lines}:{}});}return n.set(e,o),o}function Ko(e,t){let n=va(e);if(!n)return null;let r=t.get(n.start.paragraphId);return r?{pageIndex:r.pageIndex,y:r.contentY+In(r,n.start.paragraphId,n.start.offset)}:null}var On=new WeakMap;function Vo(e){let t=On.get(e);if(t!==void 0)return t;let n=i(e),r=new DataView(n.buffer,n.byteOffset,n.byteLength),o=false,a=r.getUint32(0)===1953784678?r.getUint32(12+e.faceIndex*4):0,i$1=r.getUint16(a+4);for(let c=0;c<i$1;c++){let s=a+12+c*16;if(r.getUint32(s)!==1330851634)continue;let d=r.getUint32(s+8),l=r.getUint32(s+12);l>=86&&d<=n.byteLength-l&&r.getUint16(d)>=1&&(o=(r.getUint32(d+78)&1966080)!==0);break}return On.set(e,o),o}function Tn(e,t,n,r,o){if(r>o||Math.abs(n.height-t)>o||!Vo(e))return n;let a=t*.3;return {height:n.height+a,baseline:n.baseline+a/2}}var Xo="abcdefghijklmnopqrstuvwxyz";function Z(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function V(e,t,n,r,o){let a=r.shaping?.context;return e.shape({text:o,fontSizeHalfPoints:Z(r),bidiLevel:r.shaping?.direction==="rtl"?1:0,environment:jo(t,n,r),...a?{context:a}:{}})}var Bn=new WeakMap;function jo(e,t,n){if(!Object.isFrozen(e)||!Object.isFrozen(e.features)||!Object.isFrozen(e.variationAxes)||!Object.isFrozen(e.shapingLibrary))return wn(e,t,n);let r=n.shaping?.direction??"ltr",o=n.shaping?.script,a=`${r}|${o??""}|${D(n)?1:0}|${e.documentLigatures?A(n):""}|${n.smallCaps?1:0}`,i=Bn.get(e);i||Bn.set(e,i=new WeakMap);let c=i.get(t);c||i.set(t,c=new Map);let s=c.get(a);return s||c.set(a,s=wn(e,t,n)),s}function wn(e,t,n){return p({...e,font:t,direction:n.shaping?.direction??"ltr",script:n.shaping?.script==="Zyyy"?e.script:n.shaping?.script??e.script,features:{...e.features,kern:D(n)?1:0,...e.documentLigatures?z(n):{},...n.smallCaps?{smcp:1}:{}},fallbackOrder:[]})}function Te(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let c of Xo){let s=V(e,t,n,{...r,smallCaps:!0},c),d=V(e,t,n,{...r,smallCaps:!1},c);if(!(s.glyphs.length!==d.glyphs.length||s.glyphs.some((f,h)=>f.id!==d.glyphs[h]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}function An(e,t,n,r,o){let a=new WeakMap;return (i,c)=>{let s=ca$1(c),d=a.get(i);d||(d=new Map,a.set(i,d));let l=Z(c),f=d.get(l);if(f)return s===1?f:{height:f.height*s,baseline:f.baseline*s};let h,y=true,b=i.substitution?.lineMetrics;if(b){let x=l/2;h={height:b.heightEm*x,baseline:b.baselineEm*x};}else try{let x=V(e,t,i,c,""),m=x.metrics.ascent/t.fixedPointScale,g=x.metrics.descent/t.fixedPointScale,S=l/2,C=m+g,v=S*r,F=C>v?v/C:1,T=C*F,p=Math.min(Math.max(0,x.metrics.lineGap/t.fixedPointScale),T*o),u=T+p;u>0?h=Tn(i,S,{height:u,baseline:m*F+p},p,2/t.fixedPointScale):(h=n.lineMetrics(c),y=!1);}catch{h=n.lineMetrics(c),y=false;}return y?(d.set(l,h),s===1?h:{height:h.height*s,baseline:h.baseline*s}):h}}var lt=new WeakMap;function Yo(e){let t=lt.get(e);if(t!==void 0)return t??void 0;let n=e.path;if(!n.startsWith("M")||n.length>1e6||/[^MLQCZ0-9eE+.,\s-]/u.test(n))return;let r=1/0,o=-1/0,a=n.matchAll(/([MLQCZ])([^MLQCZ]*)/gu);for(let c of a){let s=c[1]==="Z"?0:c[1]==="C"?6:c[1]==="Q"?4:2,d=c[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(d.length!==s||d.some(l=>!Number.isFinite(l))){lt.set(e,null);return}for(let l=0;l<d.length;l+=2)r=Math.min(r,d[l]),o=Math.max(o,d[l]);}let i=Number.isFinite(r)&&Number.isFinite(o)?{left:r,right:o}:void 0;return lt.set(e,i??null),i}function Pn(e,t,n,r){if(e.clusters.length!==1||e.glyphs.length===0)return;let o=1/0,a=-1/0;for(let c of e.glyphs){if(c.id===0)return;let s=Yo(c.outline),d=c.outline.unitsPerEm;if(!s||!(d>0))return;let l=(c.originX+c.offsetX)/n;o=Math.min(o,l+s.left*t*(c.drawScale??1)/d),a=Math.max(a,l+s.right*t*(c.drawScale??1)/d);}let i={left:o*r,right:a*r};return Number.isFinite(i.left)&&Number.isFinite(i.right)?i:void 0}function $o(e,t,n){if(t<12)return null;if(e.getUint32(0)!==1953784678)return 0;let o=12+(Number.isSafeInteger(n)&&n>0?n:0)*4;if(o+4>t)return null;let a=e.getUint32(o);return a+12<=t?a:null}function _n(e,t,n,r,o){let a=e.getUint16(n+4);if(a>4096||n+12+a*16>t)return null;for(let i=0;i<a;i+=1){let c=n+12+i*16;if(e.getUint32(c)!==r)continue;let s=e.getUint32(c+8),d=e.getUint32(c+12);return d<o||s+d>t?null:s}return null}function Mn(e,t){let n=e.byteLength,r=new DataView(e.buffer,e.byteOffset,n),o=$o(r,n,t);if(o===null)return null;let a=_n(r,n,o,1751474532,54);if(a===null)return null;let i=r.getUint16(a+18);if(i<=0)return null;let c=_n(r,n,o,1330851634,30);if(c===null)return null;let s=r.getInt16(c+26)/i,d=r.getInt16(c+28)/i;return !(s>0)||s>1||!(Math.abs(d)<=1)?null:{offsetEm:d,thicknessEm:s}}var qo=.5,Zo=4,kn=4096;function zn(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o,fallback:a}=e,i=t??{shapingLibrary:n.shapingLibrary,unicodeDataVersion:n.unicodeDataVersion,script:n?.script??"Latn",fixedPointScale:n?.fixedPointScale??1e3,normalization:n?.normalization??"none",features:n?.features??{},roundingMode:n?.roundingMode??"halfToEven",language:n?.language??"en",variationAxes:{}},c=new WeakMap,s=new WeakMap,d=An(r,i,a,Zo,qo),l=new WeakMap,f=new WeakMap,h=new Array(kn),y=0,b=(p,u,R)=>{let E=h[y];E&&E.cache.delete(E.text),p.set(u,R),h[y]={cache:p,text:u},y=(y+1)%kn;},x=p=>{let u=l.get(p);if(u!==void 0)return u;let R=o(p);return l.set(p,R),R},m=(p,u,R)=>{let E=R?s:c,L=E.get(p);L||(L=new Map,E.set(p,L));let O=L.get(u);return O||(O=new Map,L.set(u,O)),O},g=new WeakMap,S=p=>{if(!p.shaping?.wordSpacingPt)return p;let u=g.get(p);return u||(u={...p,shaping:{...p.shaping,wordSpacingPt:void 0}},g.set(p,u)),u},C=(p,u)=>u.shaping?.wordSpacingPt?Kd(p)*u.shaping.wordSpacingPt:0,v=(p,u)=>a.measure(p,S(u))+C(p,u),F=(p,u)=>{let R=Math.max(0,a.measure(p,S(u))),E=a.caretAdvances?.(p,S(u))??Id(p,R);if(!E||E.length!==p.length+1)return Id(p,v(p,u));let L=Math.max(0,v(p,u)),O=0,A=0;return E.map((w,M)=>{if(M===0)return 0;p[M-1]===" "&&A++;let B=w+A*(u.shaping?.wordSpacingPt??0);return O=Math.max(O,Math.min(L,Number.isFinite(B)?B:O)),M===p.length?L:O})},T=new WeakMap;return {hasResolvedFont(p){return x(p)!==null},strikeoutMetrics(p){let u=x(p);if(!u)return;let R=T.get(u);if(R===void 0&&(R=Mn(u.bytes,u.faceIndex),T.set(u,R)),!R)return;let E=Z(p)/2*ca$1(p);return {offsetPt:R.offsetEm*E,thicknessPt:R.thicknessEm*E}},measure(p,u){if(p.length===0)return 0;let R=x(u);if(!R)return v(p,u);let E=m(R,Z(u),u.smallCaps),L=u.shaping?.context,O=u.shaping?`1:${JSON.stringify(L?[u.shaping.script,u.shaping.direction,p,L.before,L.after]:[u.shaping.script,u.shaping.direction,p])}`:`0:${p}`,A$1=`${D(u)?1:0}:${A(u)}:${O}`,w=E.get(A$1);if(w===void 0){let M=0;try{if(u.smallCaps&&!Te(r,i,R,u,f))return v(p,u);let B=V(r,i,R,u,p);if(B.glyphs.some(H=>H.id===0))return v(p,u);for(let H of B.glyphs)M+=H.advanceX;}catch{return v(p,u)}w=M/i.fixedPointScale,b(E,A$1,w);}return w*ca$1(u)*(u.horizontalScalePercent/100)+p.length*u.characterSpacingPt+C(p,u)},inkBounds(p,u){if(!p||p.length>2||u.shaping?.direction==="rtl"||ja(p).length!==1)return;let R=x(u);if(!R)return a.inkBounds?.(p,u);try{if(u.smallCaps&&!Te(r,i,R,u,f))return a.inkBounds?.(p,u);let E=V(r,i,R,u,p);return Pn(E,Z(u)/2,i.fixedPointScale,ca$1(u)*u.horizontalScalePercent/100)}catch{return}},caretAdvances(p,u){let R=x(u);if(!R)return F(p,u);try{if(u.smallCaps&&!Te(r,i,R,u,f))return F(p,u);let E=V(r,i,R,u,p);return E.glyphs.some(L=>L.id===0)?F(p,u):Jd(p,E,ca$1(u)*(u.horizontalScalePercent/100)/i.fixedPointScale,u.characterSpacingPt,u.shaping?.wordSpacingPt??0)??Id(p,E.glyphs.reduce((L,O)=>L+O.advanceX,0)*ca$1(u)*(u.horizontalScalePercent/100)/i.fixedPointScale+p.length*u.characterSpacingPt+C(p,u))}catch{return F(p,u)}},lineMetrics(p,u){let R=x(p);if(!R)return a.lineMetrics(p,u);if(!u||/^[\t\n\r\f ]*$/.test(u))return d(R,p);try{let E=V(r,i,R,p,u),L=0,O=0;for(let A of E.fontSpans){let w=d(A.font,p);L=Math.max(L,w.baseline),O=Math.max(O,w.height-w.baseline);}if(L+O>0)return {height:L+O,baseline:L}}catch{}return d(R,p)}}}function Jo(e,t){return zn({...t,shaper:e.shaper,environment:e.environment})}function Qo(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let s of t.pages)r.add(s.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,c=-1;for(let s of t.pages){let d=s.box.y;d+s.box.height>=n.top&&d<=a&&(i===-1&&(i=s.index),c=s.index);}if(i===-1){let s=ea(t,n.top);s!==null&&(i=s,c=s);}if(i!==-1){let s=Math.max(0,i-o),d=Math.min(t.pages.length-1,c+o);for(let l=s;l<=d;l+=1)r.add(l);}for(let s of e.pinnedPages??[])s>=0&&s<t.pages.length&&r.add(s);return r}function ea(e,t){let n=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=t<o.box.y?o.box.y-t:t>o.box.y+o.box.height?t-(o.box.y+o.box.height):0;a<r&&(r=a,n=o.index);}return n}var Nn=["text-local","paragraph-local","flow-structural","global"];function Dn(e,t){return Nn.indexOf(t)>Nn.indexOf(e)?t:e}function ta(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function na(e){let{run:t,currentRevision:n,publish:r,schedule:o}=e,a=null,i=null,c=null,s=0,d=0;function l(m){let g=e.runCooperatively;if(!g)return t(m);let S=g(m);c=S;try{for(;;){let C=S.step();if(C)return C;if(n()!==m.revision)return S.cancel(),d+=1,null;if(c!==S)return null}}finally{c===S&&(c=null);}}function f(m){let g=y(n());g.impact=Dn(g.impact,m.impact),g.structural=g.structural||m.structural;for(let S of m.paragraphIds)g.paragraphIds.add(S);for(let S of m.created)g.created.add(S);for(let S of m.deleted)g.deleted.add(S);for(let S of m.dependencyKeys)g.dependencyKeys.add(S);}let h=m=>({impact:m.impact,paragraphIds:m.paragraphIds,created:m.created,deleted:m.deleted,dependencyKeys:m.dependencyKeys,structural:m.structural,revision:m.revision});function y(m){return a||(a=ta(m)),a.revision=Math.max(a.revision,m),a}function b(){!o||i||(i=o(()=>{i=null,x();}));}function x(){i&&(i(),i=null),c&&(c.cancel(),c=null,d+=1);let m=a;if(!m)return false;a=null;let g=h(m),S=l(g);return !S||S.revision!==n()?(s+=1,f(g),b(),false):(r(S,g),true)}return {notify(m){let g=y(n());g.impact=Dn(g.impact,m.impact);for(let S of m.dirty)g.paragraphIds.add(S);for(let S of m.created)g.created.add(S),g.paragraphIds.add(S);for(let S of m.deleted)g.deleted.add(S),g.paragraphIds.add(S);for(let S of m.dependencyKeys)g.dependencyKeys.add(S);for(let S of m.splitJoin)g.structural=true,"split"in S?(g.paragraphIds.add(S.split.from),g.paragraphIds.add(S.split.tail)):(g.paragraphIds.add(S.join.kept),g.paragraphIds.add(S.join.removed));(m.impact==="flow-structural"||m.impact==="global")&&(g.structural=true),b();},invalidateAll(m,g){let S=y(m);S.impact="flow-structural",S.structural=true,g&&S.dependencyKeys.add(g),b();},flush:x,pending:()=>a?h(a):null,cancel(){i?.(),i=null,c?.cancel(),c=null,a=null;},get staleDiscards(){return s},get cancelledRuns(){return d}}}var Hn=new WeakMap;function X(e){let t=Hn.get(e);if(t)return t;let n=new Map,r=new Map,o=new Map,a=new Map,i=(s,d,l,f)=>{for(let h of s){if(h.kind==="paragraph")continue;let y=h.tableId;a.set(y,Math.max(a.get(y)??0,(h.columnEdges?.length??1)-1));let b=o.get(y);b||(b=new Map,o.set(y,b),n.set(y,[]),r.set(y,new Map));for(let x of h.rows){let m=b.get(x.id);m===void 0&&(m=b.size,b.set(x.id,m),r.get(y).set(m,x.cells));for(let g of x.cells)n.get(y).push({pageIndex:d,tableId:y,row:x,cell:g,rowIndex:m,isHeaderRepeat:x.isHeaderRepeat,offsetX:l,offsetY:f}),i(g.blocks,d,l,f);}}};for(let s of e.pages){i(s.fragments,s.index,0,0);for(let d of [s.header,s.footer])d&&i(d.fragments,s.index,d.box.x-s.contentBox.x,d.box.y-s.contentBox.y);for(let d of [s.footnotes,s.endnotes])if(d)for(let l of d.notes)i(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);}let c=new Map;for(let[s,d]of n)c.set(s,{placed:d,rows:r.get(s)??new Map,columnCount:a.get(s)??0});return Hn.set(e,c),c}function Kn(e){let t=e.columnCount;for(let n of e.rows.values())for(let r of n)t=Math.max(t,Y(r).to+1);return t}var Y=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function ra(e,t,n){if(t.tableId!==n.tableId)return null;let r=X(e).get(t.tableId);if(!r)return null;let o=Math.min(t.rowIndex,n.rowIndex),a=Math.max(t.rowIndex,n.rowIndex),i=Math.min(Y(t).from,Y(n).from),c=Math.max(Y(t).to,Y(n).to),s=y=>{let{from:b,to:x}=Y(y);return x>=i&&b<=c},d=y=>(r.rows.get(y)??[]).some(b=>b.vMergeContinue&&s(b)),l=r.rows.size+Kn(r)+2;for(let y=0;!(y>l);y+=1){let b=false;for(let[x,m]of r.rows)if(!(x<o||x>a))for(let g of m){if(!s(g))continue;let{from:S,to:C}=Y(g);S<i&&(i=S,b=true),C>c&&(c=C,b=true);}for(;o>0&&d(o);)o-=1,b=true;for(;d(a+1);)a+=1,b=true;if(!b)break}let f=[],h=new Set;for(let y of r.placed){if(y.isHeaderRepeat||y.rowIndex<o||y.rowIndex>a)continue;let{from:b,to:x}=Y(y.cell);x<i||b>c||h.has(y.cell.id)||(h.add(y.cell.id),f.push(y.cell.id));}return f.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:f,rows:{from:o,to:a},columns:{from:i,to:c},text:oa(e,t.tableId,f)}}function ji(e,t){return Vn(e,t,true)}function Be(e,t){return Vn(e,t,false)}function Vn(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of X(e).values())for(let c of i.placed)if(!(c.isHeaderRepeat||!r.has(c.cell.id)))for(let s of c.cell.blocks)n&&s.kind!=="paragraph"||ee(s,o,a);return o}function ee(e,t,n){if(e.kind==="paragraph"){for(let r of Ma(e))n.has(r)||(n.add(r),t.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)ee(a,t,n);}function oa(e,t,n){let r=Be(e,n),o=r[0],a=r[r.length-1];return !o||!a?aa(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:hf(e,a).length}}}function aa(e,t){let n=X(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let c of o.cell.blocks)ee(c,a,new Set);let i=a[0];if(i){let c={paragraphId:i,offset:0};return {anchor:c,head:c}}}for(let o of e.pages)for(let a of ua$1(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function ia(e){let t=[...ua$1(e)];for(let n of [e.header,e.footer])n&&t.push(...va$1(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...va$1(r.fragments));return t}function sa(e,t){let n=new Set(Be(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of ia(a))if(n.has(i.paragraphId))for(let c of i.lines)for(let s of c.spans){let d=`${s.range.paragraphId}:${s.range.start}:${s.range.end}`;o.has(d)||(o.add(d),r.push(s));}return r}function ca(e,t){let n=new Set(t),r=[];for(let o of X(e).values())for(let a of o.placed)n.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function la(e,t,n=hf){let r=X(e).get(t.tableId);if(!r)return "";let o=new Set(t.cellIds),a=r.placed.some(s=>s.cell.logicalGridColumn!==void 0),i=new Map,c=new Set;for(let s of r.placed){if(s.isHeaderRepeat||!o.has(s.cell.id)||c.has(s.cell.id))continue;c.add(s.cell.id);let d=Be(e,[s.cell.id]).map(h=>n(e,h)).join(`
1
+ import {f,c,d,e}from'./chunk-RIYSCEFQ.js';import {nf,n,l,j as j$1,k as k$1,p,i,o,s,g,f as f$1,ka,oa as oa$1,Qa as Qa$1,Aa as Aa$1,kb,jb,da as da$1,fa,gd,ed,Cc,wc,ad,Xa,B,A,Pd,Od,Na,va as va$1,Qd,r,a as a$1,b,e as e$1,c as c$1,m,Da,Ja,Hc,Ec,cd,$c,Hb,fd,wa as wa$1,h,ea as ea$1,ua as ua$1}from'./chunk-VIPMGGUT.js';import {va}from'./chunk-GWQJ5774.js';import {a,Di,Mb,Kb,Pb,Lb,Lg,Gi,Fi,Ei,yb,Ib}from'./chunk-UMRSBLO7.js';var jn=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let d=i*2n;(d>t||d===t&&(n==="halfAwayFromZero"||n==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let c=r?-a:a,s=Number(c);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},Ye=(e,t,n$1,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(n$1)||n$1<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");if(e===0||n$1===0)return n(0);let o=e*n$1;if(Number.isSafeInteger(o)){let a=Math.abs(o),i=a%t,c=(a-i)/t;return r!=="towardZero"&&(i>t-i||i===t-i&&(r==="halfAwayFromZero"||r==="halfToEven"&&c%2!==0))&&(c+=1),n(c===0?0:o<0?-c:c)}return n(jn(BigInt(e)*BigInt(n$1),BigInt(t),r))},Ut=(e,t,n,r)=>{if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("font size must be a positive integer number of half points");if(t>Math.floor(Number.MAX_SAFE_INTEGER/n))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=t*n,a=e*2;return i=>Ye(i,a,o,r)},Wt=(e,t,n)=>{let r=t*n,o=e*2;return a=>a*r/o};var Yn=4096,Kt=e=>typeof e=="number"?String(e):JSON.stringify(e)??typeof e,ve=class{constructor(t){this.onRestart=t;}onRestart;#e=new Map;keyOf(t,n){let r$1=r(n),o=this.#e.get(r$1);o===void 0&&(this.#e.size>=Yn&&(this.#e.clear(),this.onRestart()),o=this.#e.size,this.#e.set(r$1,o));let a=`${o}\0${Kt(t.fontSizeHalfPoints)}\0${Kt(t.bidiLevel)}\0`,i=t.context;return !i||i.before===""&&i.after===""?`${a}-${t.text}`:`${a}c${i.before.length},${i.after.length}\0${i.before}${i.after}${t.text}`}clear(){this.#e.clear();}};var q=Object.freeze({name:"HarfBuzz",version:"14.4.0"}),se=null,ae=null;function qe(){return se?Promise.resolve():ae||(ae=import('./dist-PKZR6RSH.js').then(e=>{let t=e.versionString();if(t!==q.version)throw new I("shapingLibraryMismatch",{diagnostic:f(q.version,t)});se=e;}).catch(e$1=>{throw ae=null,e$1 instanceof I?e$1:c(e$1)?new I("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new I("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),ae)}function $n(){return se!==null}function qn(){if(!se)throw new I("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return se}var I=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(t,n={}){super(`HarfBuzz shaping failed (${t})`,{cause:n.cause}),this.code=t,this.limit=n.limit,this.actual=n.actual,this.diagnostic=n.diagnostic;}},Zn=16*1024*1024,Jn=1e6,Qn=1e6,er=1e6,tr=4,nr=512,rr=1024*1024,or=16*1024*1024,ar=32*1024*1024,ir=64*1024*1024,sr=64*1024*1024,cr=1e6,lr=1e6,dr=1e6,ur=64,pr=4096,fr=4*1024*1024,yr=64*1024*1024,mr=64*1024*1024,hr=256*1024*1024,gr=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Vt=["cmap","head","hhea","hmtx","maxp"],Sr=(e,t)=>e[t]<<8|e[t+1],br=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,xr=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?br(e,12+t*4):0,Rr=(e,t)=>{let n=xr(e,t),r=Sr(e,n+4),o=new Set;for(let a=0;a<r;a+=1){let i=n+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},Cr=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),Fr=(e,t)=>{let n=l(e,t);if(!n.valid)return n;let r=Rr(e,t);for(let o of Vt)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},Ze=Fr,k=(e,t,n)=>{if(!Number.isSafeInteger(e)||e<=0||e>n)throw new RangeError(`${t} must be a positive safe integer no greater than ${n}`);return e},vr=(e,t,n$1)=>{if(t.length===0)return [];let r=[],o=0;for(;o<t.length;){let a=t[o].cluster,i=o+1,c=t[o].advanceX;for(;i<t.length&&t[i].cluster===a;)c+=t[i].advanceX,i+=1;let s=n(c);r.push({textStart:a,textEnd:n$1==="rtl"?t[o-1]?.cluster??e.length:t[i]?.cluster??e.length,glyphStart:o,glyphEnd:i,advance:s,caretEdges:Object.freeze([n(0),s]),fontSpan:0}),o=i;}return r},N=64,G=8,U=8,Xt=32,Je=N+2*G,Er=N+G+U,Lr=N+G+2*U,Ir=N+G+U,jt=N+8*G,Yt=N+8*U+G,Or=N+6*U+G,Tr=N+3*U+2*G,Br=N+3*U,ce=e=>N+e.length*Uint16Array.BYTES_PER_ELEMENT,Qe=e=>Ir+ce(e),ie=e=>Xt+e*G,wr=(e,t)=>Je+ce(e)+Er+Qe(t),Ar=e=>jt+ce(e)+ie(e.length)+e.length*Yt,Pr=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return jt+ce(e.text)+ie(e.glyphs.length)+e.glyphs.length*Yt+ie(e.clusters.length)+e.clusters.length*Or+e.clusters.reduce((n,r)=>n+ie(r.caretEdges.length),0)+ie(e.fontSpans.length)+e.fontSpans.length*Tr+(e.exactAdvancesX===void 0?0:Xt+e.exactAdvancesX.length*U)+Br+[...t].reduce((n,r)=>n+Qe(r.path),0)},_r=(e,t)=>Je+ce(e)+Lr+t,$e=class{#e;#p;#f;#y;#m;#R;#h;#l=0;#C;#g;#S;#c;#b;#d;#t;#o=new Map;#i=new Map;#s=new Map;#n=new Map;#F=new ve(()=>{this.#n.clear(),this.#r=0,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0}));});#a=0;#r=0;#x=0;#u;constructor(t,n){this.#e=t,this.#p=k(n.maxFontBytes??Zn,"maximum font bytes",sr),this.#f=k(n.maxInputUtf16??Jn,"maximum input UTF-16 code units",cr),this.#y=k(n.maxCodepoints??Qn,"maximum input code points",lr),this.#m=k(n.maxGlyphs??er,"maximum shaped glyphs",dr),this.#h=k(n.maxCachedFontBytes??64*1024*1024,"maximum cached font bytes",64*1024*1024),this.#R=k(n.maxCachedFaces??tr,"maximum cached faces",ur),this.#C=k(n.maxCachedShapes??nr,"maximum cached shape results",pr),this.#g=k(n.maxOutlineBytes??rr,"maximum outline bytes",fr),this.#S=k(n.maxCachedOutlineBytes??or,"maximum cached outline bytes",yr),this.#c=k(n.maxShapedRunBytes??ar,"maximum shaped run bytes",mr),this.#b=k(n.maxCachedShapeBytes??ir,"maximum cached shape bytes",hr),this.#d=n.instrumentation?.onFaceCacheEvent,this.#t=n.instrumentation,this.#u=new this.#e.Buffer;}dispose(){this.#o.clear(),this.#l=0,this.#i.clear(),this.#s.clear(),this.#n.clear(),this.#F.clear(),this.#a=0,this.#r=0,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#u=void 0;}#E(t,n){let r=this.#o.get(t.identity);if(r)return this.#o.delete(t.identity),this.#o.set(t.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:t.identity})),r;let o=j$1(t);for(let l of Vt)if(!o.has(l))throw new I("malformedFont",{diagnostic:`missing required ${l} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(Cr(n)),i=new this.#e.Face(a,t.faceIndex),c=new this.#e.Font(i),s=c.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new I("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});c.setScale(i.upem,i.upem);let d={identity:t.identity,blob:a,face:i,font:c,unitsPerEm:i.upem,byteLength:n.byteLength};if(n.byteLength<=this.#h){for(;this.#o.size>=this.#R||this.#l+n.byteLength>this.#h;){let l=this.#o.keys().next().value;if(l===void 0)break;this.#l-=this.#o.get(l).byteLength,this.#o.delete(l),this.#d?.(Object.freeze({kind:"evicted",identity:l}));}this.#o.set(t.identity,d),this.#l+=n.byteLength;}return this.#d?.(Object.freeze({kind:"created",identity:t.identity})),d}#L(t,n){let r=this.#i.get(t.identity)?.get(n);if(r)return this.#s.delete(r),this.#s.set(r,void 0),this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#a})),r.outline;this.#t?.onOutlinePathCall?.();let o=t.font.glyphToPath(n),a=Qe(o);if(a>this.#g)throw new I("outlineOverLimit",{limit:this.#g,actual:a});let i=Object.freeze({path:o,unitsPerEm:t.unitsPerEm}),c=wr(t.identity,o)+3*Je+2*U;if(c>this.#S)return this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#a})),i;for(;this.#a+c>this.#S;){let l=this.#s.keys().next().value;if(l===void 0)break;this.#s.delete(l);let f=this.#i.get(l.identity);f.delete(l.glyphId),f.size===0&&this.#i.delete(l.identity),this.#a-=l.bytes,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#a}));}let s=this.#i.get(t.identity);s||this.#i.set(t.identity,s=new Map);let d={outline:i,bytes:c,identity:t.identity,glyphId:n};return s.set(n,d),this.#s.set(d,void 0),this.#a+=c,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#a})),i}#v(t){if(t.length>this.#f)throw new I("textOverLimit",{limit:this.#f,actual:t.length});let n=0;for(let r=0;r<t.length;){let o=t.codePointAt(r);if(r+=o>65535?2:1,n+=1,n>this.#y)throw new I("codepointsOverLimit",{limit:this.#y,actual:n})}}shape(t){if(!this.#u)throw new I("disposed");if(k$1(t.environment.font),t.environment.font.byteLength>this.#p)throw new I("fontOverLimit",{limit:this.#p,actual:t.environment.font.byteLength});this.#v(t.text);let n$1=Ar(t.text);if(n$1>this.#c)throw new I("shapedRunOverLimit",{limit:this.#c,actual:n$1});let r=p(t.environment),o$1=this.#F.keyOf(t,r),a=this.#n.get(o$1);if(a)return this.#x-a.stamp>=Math.max(1,this.#n.size>>1)&&(this.#n.delete(o$1),this.#n.set(o$1,a),a.stamp=++this.#x),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==q.name||r.shapingLibrary.version!==q.version)throw new I("shapingLibraryMismatch");if(r.normalization!=="none")throw new I("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r.direction==="rtl"))throw new I("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new I("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new I("unsupportedFallback");let i$1=i(r.font),c=j$1(r.font);if([...gr].some(y=>c.has(y))&&!c.has("glyf")&&!c.has("CFF "))throw new I("unsupportedColorFont");let s$1=t.text;this.#v(s$1);let d=t.context?.before??"",l=t.context?.after??"",f=o,h=Math.max(String(d).length,String(l).length);if(typeof d!="string"||typeof l!="string"||h>f)throw new I("textOverLimit",{limit:f,actual:h});try{let y=this.#E(r.font,i$1),{face:b,font:x}=y,m=this.#u;m.reset(),d||l?m.addText(d+s$1+l,d.length,s$1.length):m.addText(s$1),m.setDirection(r.direction==="rtl"?this.#e.Direction.RTL:this.#e.Direction.LTR),m.setScript(r.script),m.setLanguage(r.language),m.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let g=Object.entries(r.features).map(([B,H])=>new this.#e.Feature(B,H));this.#t?.onShapeCall?.(),this.#e.shape(x,m,g);let S=m.getLength();if(S>this.#m)throw new I("glyphOverLimit",{limit:this.#m,actual:S});let C=m.getGlyphInfos(),v=m.getGlyphPositions(),F=Ut(b.upem,t.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),T=Wt(b.upem,t.fontSizeHalfPoints,r.fixedPointScale),p=[],u=n(0),R=n(0),E=new Map,L=C.map((B,H)=>{let te=v[H];p.push(T(te?.xAdvance??0));let ut=F(te?.xAdvance??0),pt=F(te?.yAdvance??0),Xn={id:B.codepoint,cluster:B.cluster-d.length,originX:u,originY:R,advanceX:ut,advanceY:pt,offsetX:F(te?.xOffset??0),offsetY:F(te?.yOffset??0),outline:E.get(B.codepoint)??(()=>{let ft=this.#L(y,B.codepoint);return E.set(B.codepoint,ft),ft})()};return u=n(u+ut),R=n(R+pt),Xn}),O=x.hExtents(),A=s({text:s$1,direction:r.direction,bidiLevel:t.bidiLevel,glyphs:L,exactAdvancesX:p,clusters:vr(s$1,L,r.direction),fontSpans:L.length===0?[]:[{glyphStart:0,glyphEnd:L.length,font:r.font,fallbackIndex:null}],metrics:{ascent:F(O.ascender),descent:F(-O.descender),lineGap:F(O.lineGap)}},r),w=Pr(A);if(w>this.#c)throw new I("shapedRunOverLimit",{limit:this.#c,actual:w});let M=_r(o$1,w);if(M>this.#b)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),A;for(;this.#n.size>=this.#C||this.#r+M>this.#b;){let B=this.#n.keys().next().value;if(B===void 0)break;let H=this.#n.get(B);this.#n.delete(B),this.#r-=H.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o$1,{run:A,bytes:M,stamp:++this.#x}),this.#r+=M,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),A}catch(y){throw y instanceof I?y:new I("malformedFont",{diagnostic:y instanceof Error?y.message:"HarfBuzz shaping failed"})}}},et=(e={})=>new $e(qn(),e);var tt=Object.freeze({maxFontBytes:16*1024*1024,maxInputUtf16:1e6,maxCodepoints:1e6,maxGlyphs:1e6,maxCachedFaces:32,maxCachedFontBytes:64*1024*1024,maxCachedShapes:512,maxOutlineBytes:1024*1024,maxCachedOutlineBytes:16*1024*1024,maxShapedRunBytes:32*1024*1024,maxCachedShapeBytes:64*1024*1024}),Ea=Object.freeze({...tt,maxCachedShapes:4096});function $t(e){let t={maxFontBytes:e.maxFontBytes,maxInputUtf16:e.maxInputUtf16,maxCodepoints:e.maxCodepoints,maxGlyphs:e.maxGlyphs,maxOutlineBytes:e.maxOutlineBytes,maxShapedRunBytes:e.maxShapedRunBytes},n=["docx-editor-layout-harfbuzz-execution-policy",1,Object.entries(t).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>Object.freeze([r,o]))];return `layout-shaper-policy:sha256:${a(new TextEncoder().encode(JSON.stringify(n)))}`}var Mr=Object.freeze({}),qt=b,kr="16.0.0",zr="none",Nr=1e3,Dr="halfToEven",Qt="cluster-edges-only",Hr="Latn",Gr=new Uint8Array(0);var W=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function Ur(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a=e.substitutions,i=e.defaultFont,c=e.language;if(!Number.isSafeInteger(r)||r<=0||r>a$1)throw new W(`Font byte ceiling must not exceed the engine hard maximum of ${a$1}`);let s=o.length,d=a?.length??0;if(s===0||s>b)throw new W(`Font source count must be between 1 and ${b}`);if(d>qt)throw new W(`Font substitution count must not exceed ${qt}`);let l=0,f=[];for(let b=0;b<s;b+=1){let x=o[b],m=x.request,g$1=x.availability,S=x.id,C=x.hash,v=x.faceIndex,F=g$1==="forbidden",T=F?Gr:x.bytes;if(!F){if(typeof S!="string"||S.length===0)throw new TypeError("Resolved font id must not be empty");let p;try{p=e$1(T);}catch{throw new W(`Font source ${S} must provide genuine bytes`)}if(p>r)throw new W(`Font source ${S} exceeds the per-font byte ceiling`);if(l+=p,l>c$1)throw new W(`Font sources exceed the aggregate byte ceiling of ${c$1}`)}f.push(t&&g(x)!==void 0?x:Object.freeze({request:Object.freeze({family:m.family,weight:m.weight,style:m.style}),id:S,bytes:T,hash:C,faceIndex:v,...g$1?{availability:g$1}:{}}));}let h;if(a){h=[];for(let b=0;b<d;b+=1){let x=a[b],m=x.from,g=x.to,S=x.lineMetrics;h.push(Object.freeze({from:Object.freeze({family:m.family,weight:m.weight,style:m.style}),to:Object.freeze({family:g.family,weight:g.weight,style:g.style}),...S?{lineMetrics:Object.freeze({heightEm:S.heightEm,baselineEm:S.baselineEm})}:{}}));}}let y={epoch:n,maxFontBytes:r,sources:Object.freeze(f),substitutions:h?Object.freeze(h):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:c};return Object.freeze(y)}function Zt(e,t){let n=e.map((o,a)=>({value:o,index:a,key:h(t(o))})),r=new Set;for(let o of n){if(r.has(o.key))return e;r.add(o.key);}return n.sort((o,a)=>o.key<a.key?-1:o.key>a.key?1:o.index-a.index).map(({value:o})=>o)}function Wr(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function Jt(e,t){let n=s=>({family:s.family,weight:s.weight,style:s.style}),r=t?e.sources:Zt(e.sources,s=>s.request),o=e.substitutions??[],a=t?o:Zt(o,s=>s.from),i={sources:r.map(s=>{let d=s.availability??"available",l={request:n(s.request),availability:d};if(d==="forbidden")return {...l,...t?{id:s.id,faceIndex:s.faceIndex,declaredHash:s.hash}:{}};let f=g(s);if(f==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...l,...t?{id:s.id}:{},faceIndex:s.faceIndex,declaredHash:s.hash,actualHash:f,byteLength:s.bytes.byteLength}}),substitutions:a.map(s=>({from:n(s.from),to:n(s.to),lineMetrics:s.lineMetrics?{heightEm:s.lineMetrics.heightEm,baselineEm:s.lineMetrics.baselineEm}:null})),defaultFont:Wr(e.defaultFont,t),language:e.language||"en"},c={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?c:{},...i}}var Kr=Symbol("prepared-layout-font-configuration"),Ee=new WeakMap;function Vr(e){return Ee.has(e)}function Xr(e){let t=Ee.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function wa(e){let t=Ee.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function nt(e,t){return en(e,t,false)}function Aa(e,t){return en(e,t,true)}function en(e,t,n){let r=Ur(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(f=>n&&g(f)!==void 0?f:f$1(f,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a$1=new TextEncoder,i=Jt(o,true),c=a$1.encode(JSON.stringify(i)),s=Jt(o,false),d=a$1.encode(JSON.stringify(s)),l=Object.freeze({[Kr]:true,fingerprint:`font-config:${a(c)}`});return Ee.set(l,{configuration:o,sharedShapingFingerprint:`shared-font-config:${a(d)}`}),l}function jr(e){return nt(e).fingerprint}function Yr(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:$t(t),ligatureCaretPolicy:Qt,fallback:ea$1}));return `shaping:${a(n)}`}async function tn(e,t,n,r,o=false){let i=Vr(e)?e:nt(e,t),c=Xr(i),{epoch:s,maxFontBytes:d,sources:l,substitutions:f,defaultFont:h}=c,y=c.language||"en",b=i.fingerprint,x=m({epoch:s,maxFontBytes:d,resources:l,substitutions:f,validateFont:Ze,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await qe();let m$1=Object.freeze({script:Hr,variationAxes:Object.freeze({}),shapingLibrary:q,unicodeDataVersion:kr,normalization:zr,language:y,features:Mr,...o?{documentLigatures:true}:{},fixedPointScale:Nr,roundingMode:Dr});return Object.freeze({fonts:x,shaper:n??et(r),defaultFont:h,environment:m$1,ligatureCaretPolicy:Qt,operation:Object.freeze({resourceEpoch:x.epoch,configEpoch:s,extensionFingerprint:b,shapingHash:Yr(m$1,r),producerVersion:1})})}async function $r(e,t){return tn(e,t,void 0,tt)}async function Pa(e,t,n,r,o=false){return tn(e,r,t,n,o)}function qr(e){e.shaper.dispose?.();}function rt(e){let t=new Set([0,e.text.length]);for(let r of ka(e.text))t.add(r.utf16From),t.add(r.utf16To);let n=new Set([0,e.text.length]);for(let r of e.clusters)n.add(r.textStart),n.add(r.textEnd);return [...t].filter(r=>n.has(r)).sort((r,o)=>r-o)}function Le(e,t){return rt(e).includes(t)}function Zr(e,t){return Le(e,t)}function Jr(e,t,n){return n>=t&&Le(e,t)&&Le(e,n)}function Qr(e){let t=ka(e.text);return rt(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var at="und";function an(){return typeof Intl.Segmenter=="function"}function eo(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${at})`);return e}function sn(){let e=new(eo())(at,{granularity:"word"});return {segment(t){let n=[];for(let r of e.segment(t)){let o=r.index,a=o+r.segment.length;n.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return n}}}var to=/^[\p{L}\p{N}']$/u,no=/^\s$/u;function nn(e){return to.test(e)}function rn(e){return no.test(e)}function ot(e,t,n,r){let o=e[t],a=e[n-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function cn(e){let t=ka(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(rn(o.text)){let a=r+1;for(;a<t.length&&rn(t[a].text);)a+=1;n.push(ot(t,r,a,false)),r=a;continue}if(nn(o.text)){let a=r+1;for(;a<t.length&&nn(t[a].text);)a+=1;n.push(ot(t,r,a,true)),r=a;continue}n.push(ot(t,r,r+1,false)),r+=1;}return n}function ln(){return {segment:cn}}function dn(e={}){let t=e.isIntlAvailable??an,n=e.createIntlBoundary??sn,r=e.createFallbackBoundary??ln;if(!t())return r();try{return n()}catch{return r()}}var on;function un(){return on??=dn(),on}function ro(e,t=un()){return t.segment(e)}function oo(e,t){return t.map(n=>({graphemeFrom:oa$1(e,n.utf16From),graphemeTo:oa$1(e,n.utf16To),wordLike:n.wordLike}))}var pn={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},ct=Object.keys(pn),fn=ct.filter(e=>pn[e]==="coarse-gate"),Ie=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},J=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},ao={resourceEpoch:Ie,configEpoch:Ie,extensionFingerprint:J,shapingHash:J,producerVersion:Ie},io=(e,t)=>{ao[t](e[t],t);},Q=e=>{for(let t of ct)io(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},so=(e,t)=>{let n=Q(e),r=Q(t),o=ct.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},it=e=>{let t=e.map(({key:n,fingerprint:r})=>(J(n,"resource dependency key"),J(r,"resource dependency fingerprint"),Object.freeze({key:n,fingerprint:r}))).sort((n,r)=>n.key<r.key?-1:n.key>r.key?1:0);for(let n=1;n<t.length;n+=1)if(t[n-1].key===t[n].key)throw new TypeError(`Duplicate resource dependency: ${t[n].key}`);return Object.freeze(t)},co=e=>(Ie(e.revision,"revision"),J(e.dependencyFingerprint,"dependencyFingerprint"),J(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:it(e.resourceDependencies),...Q(e)})),lo=(e,t)=>{let n=it(e),r=it(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[a],c=r[a];if(i?.key!==c?.key||i?.fingerprint!==c?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??c.key}}return null};function uo(e,t){if(e.dependencyFingerprint!==t.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==t.inputFingerprint)return {hit:false,reason:"input-changed"};let n=lo(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of fn)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var st=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=uo(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:co(r)});}evictEpoch(t){let n=Q(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;fn.some(c=>i[c]!==n[c])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=Q(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>n.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function yn(e){return e.projected===true?null:e.range}function fo(e,t,n){let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:c}=e,s=o==="header"||o==="footer"?d=>ua$1(d,e.origin,{x:r.box.x,y:r.box.y}):void 0;Da(a,(d,l)=>{let{textboxDepth:f,textboxOwner:h,textboxPath:y,storyOrigin:b}=l,x=f===0?o:"textbox";for(let m of d.lines){let g=[...Ja(m)].sort((S,C)=>(t.get(S.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(C.paragraphId)??Number.MAX_SAFE_INTEGER));for(let S of g)for(let C of S.spans)n({page:r,story:x,rootStory:o,root:e,storyOrigin:b,absoluteBox:Object.freeze({x:b.x+C.box.x,y:b.y+C.box.y,width:C.box.width,height:C.box.height}),noteScopeId:i,noteAreaKind:c,textboxDepth:f,textboxOwner:h,textboxPath:y,paragraph:d,paragraphId:S.paragraphId,line:m,span:C,sourceRange:yn(C)});}},e.origin,s);}function yo(e,t){let n=new Map(Qa$1(e).map((r,o)=>[r,o]));Aa$1(e,r=>fo(r,n,t));}var ho=1,mn=4,j=Object.freeze({top:0,right:0,bottom:0,left:0}),hn=new WeakMap;function go(e,t){let n=So(e);return n===j?t:kb(t,n)}function So(e){let t=e.vectorShape;if(!t)return j;let{cx:n,cy:r}=t.extentEmu;if(!(n>=0)||!(r>=0)||n===0&&r===0)return j;let o=hn.get(t);if(o||(o=bo(t),hn.set(t,o)),o===j)return j;let a=e.paintBounds,i=e.geometry.contentBounds;if(!(a.width>0||i.width<=0)||!(a.height>0||i.height<=0))return j;let c=n>0?i.width/n:i.height/r,s=r>0?i.height/r:i.width/n,d=(f,h,y)=>{if(y<-1e-3)return 0;let b=f*h-Math.max(0,y);return Number.isFinite(b)&&b>0?b:0},l={left:d(o.left,c,i.x-a.x),top:d(o.top,s,i.y-a.y),right:d(o.right,c,a.x+a.width-(i.x+i.width)),bottom:d(o.bottom,s,a.y+a.height-(i.y+i.height))};return l.left||l.top||l.right||l.bottom?Object.freeze(l):j}function bo(e){let{cx:t,cy:n}=e.extentEmu,r=0,o=0,a=t,i=n,c=(l,f)=>{r=Math.min(r,l),a=Math.max(a,l),o=Math.min(o,f),i=Math.max(i,f);},s=ho,d=l=>l.x>=-s&&l.x<=t+s&&l.y>=-s&&l.y<=n+s;for(let l of e.components){if(l.strokeHex===null||l.strokeInset===true)continue;let f=Math.max(1,jb(l.strokeWidthEmu))/2;l.subpathsEmu.forEach((h,y)=>{let b=l.subpathsClosed?.[y]!==false,x=xo(h,b),m=b&&x.length>2?x.length:x.length-1,g=[];for(let C=0;C<m;C+=1){let v=x[C],F=x[(C+1)%x.length],T=Math.hypot(F.x-v.x,F.y-v.y),p={x:-(F.y-v.y)/T,y:(F.x-v.x)/T};if(g.push(p),!!Ro(v,F,-s,t+s,-s,n+s))for(let u=0;u<2;u+=1){let R=K[u],E=v.x+(F.x-v.x)*R,L=v.y+(F.y-v.y)*R;c(E+p.x*f,L+p.y*f),c(E-p.x*f,L-p.y*f);}}let S=b&&x.length>2?g.length:g.length-1;for(let C=0;C<S;C+=1){let v=x[(C+1)%x.length];if(!d(v))continue;let F=g[C],T=g[(C+1)%g.length],p=1+F.x*T.x+F.y*T.y;if(p<2/(mn*mn))continue;let u=F.y*-T.x- -F.x*T.y;if(u===0)continue;let R=u>0?-1:1;c(v.x+R*(F.x+T.x)*f/p,v.y+R*(F.y+T.y)*f/p);}});for(let h of l.arrowheadsEmu??[])if(!(!h[0]||!d(h[0])))for(let y of h)c(y.x,y.y);}return r>=0&&o>=0&&a<=t&&i<=n?j:Object.freeze({left:-r,top:-o,right:a-t,bottom:i-n})}function xo(e,t){let n=[];for(let a of e){let i=n[n.length-1];(!i||i.x!==a.x||i.y!==a.y)&&n.push(a);}let r=n[0],o=n[n.length-1];return t&&n.length>1&&r.x===o.x&&r.y===o.y&&n.pop(),n}var K=new Float64Array(2);function Ro(e,t,n,r,o,a){let i=t.x-e.x,c=t.y-e.y;return K[0]=0,K[1]=1,Oe(-i,e.x-n)&&Oe(i,r-e.x)&&Oe(-c,e.y-o)&&Oe(c,a-e.y)}function Oe(e,t){if(e===0)return t>=0;let n=t/e;return e<0?K[0]=Math.max(K[0],n):K[1]=Math.min(K[1],n),K[0]<=K[1]}function D(e){return (e.kerningEnabled??e.kerningMinPt>0)&&e.kerningMinPt>0&&e.fontSizePt>=e.kerningMinPt}var xn="Calibri, Carlito, Helvetica, Arial, sans-serif",Qa=new Map([["calibri","Carlito"]]),Co=65536,Fo=256;function gn(e,t){return e===void 0?Math.max(1,Math.floor(t)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function Sn(e){let t=new Map,n=0;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>e;){let a=t.keys().next();if(a.done)break;t.delete(a.value),n+=1;}},get size(){return t.size},get evictions(){return n}}}var bn=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function Rn(e=null){return e!=null&&typeof e.measureText=="function"}function Cn(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??xn,r=e.context??null;if(!Rn(r))return null;let o=r,a=Sn(gn(e.maxWidthEntries,Co)),i=Sn(gn(e.maxMetricsEntries,Fo)),c=e.fontAlias,s=l=>{let f=l.fontFamily&&bn.test(l.fontFamily)?l.fontFamily:null,h=f?c?.(f):void 0,y=h&&bn.test(h)?h:null,b=f?y?`"${y}", "${f}", ${n}`:`"${f}", ${n}`:n,x=l.bold?"bold":"normal",m=l.italic?"italic":"normal",g=l.smallCaps?"small-caps":"normal",S=l.fontSizePt*da$1(l)*t;return `${m} ${g} ${x} ${S}px ${b}`},d=(l,f,h)=>l/t*(h.horizontalScalePercent/100)+f.length*h.characterSpacingPt;return {measure(l,f){if(l.length===0)return 0;let h=s(f),y=`${h}\0${D(f)}\0${l}`,b=a.get(y);if(b!==void 0)return d(b,l,f);o.font=h,"fontKerning"in o&&(o.fontKerning=D(f)?"normal":"none");let x=o.measureText(l).width;return a.set(y,x),d(x,l,f)},inkBounds(l,f){if(!l||l.length>2||f.shaping?.direction==="rtl"||ka(l).length!==1)return;o.font=s(f),"fontKerning"in o&&(o.fontKerning=D(f)?"normal":"none");let h=o.textAlign,y=o.direction,b;try{h!==void 0&&(o.textAlign="left"),y!==void 0&&(o.direction="ltr"),b=o.measureText(l);}finally{h!==void 0&&(o.textAlign=h),y!==void 0&&(o.direction=y);}let x=b.actualBoundingBoxLeft,m=b.actualBoundingBoxRight;if(x===void 0||m===void 0||!Number.isFinite(x)||!Number.isFinite(m))return;let g=f.horizontalScalePercent/(100*t);return {left:-x*g,right:m*g}},lineMetrics(l){let f=l.fontSizePt*da$1(l),h=s(l),y=i.get(h);if(y)return y;let b=f*1.15,x=f*.8;o.font=h,"fontKerning"in o&&(o.fontKerning=D(l)?"normal":"none");let m=o.measureText("Hxg"),g=m.fontBoundingBoxAscent,S=m.fontBoundingBoxDescent;if(typeof g=="number"&&Number.isFinite(g)&&g>0&&(x=g/t,typeof S=="number"&&Number.isFinite(S)&&S>=0)){let v=(g+S)/t;v>0&&(b=Math.max(v,b));}b>0||(b=f*1.15);let C={height:b,baseline:x};return i.set(h,C),C}}}function vo(e=1,t={}){let n=Cn({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:fa(),producer:"fixed-measurer"}}function Eo(e){let t;return n=>{t===void 0&&(t=gd(e.pages)?.hosts??null);let r=t?.get(n);return r?ed(r.pageNumber,r.format):null}}function Fn(e,t){let n=Hc(e,t.displayMode??Xa),r=Ec({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:Lg(t.package,"footnote"),endnotesPart:Lg(t.package,"endnote")}:void 0,a=cd(n,r,o,t.package?$c(t.package,e,n):void 0,t.displayMode??Xa);return {blocks:n,notes:o,context:a}}function vn(e,t,n,r,o){for(let a of t){if(r.length>=Di)return;if(n.tokenForParagraph(a.id)!==""&&Gi(e,a.id)===null)for(let i of Fi(a)){if(r.length>=Di)return;if(!i.rewritable)continue;let c=Hb(i.instruction);if(c===null)continue;let s=n.liveValueOf(i.fieldNodeId,c);if(s===null&&o&&n.pageRefProjectionOf){let d=n.pageRefProjectionOf(i.fieldNodeId,c);if(d){let l=o(d.targetParagraphId);l!==null&&l.length>0&&fd(d.calibration,d.cached,l,Number.NaN)&&(s=l);}}s===null||s===i.cachedText||s.length>Ei||s.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:s});}}}function Lo(e,t){let{blocks:n,context:r}=Fn(e,t);if(r===null)return null;let o=[];return vn(e,Cc(wc(n)),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function di(e,t){let{notes:n,context:r}=Fn(e,t);if(r===null||n===void 0)return [];let o=[],a=[{noteKind:"footnote",notesPart:n.footnotesPart},{noteKind:"endnote",notesPart:n.endnotesPart}];for(let{noteKind:i,notesPart:c}of a){if(!c)continue;let s=[];for(let d of ad(c,t.displayMode??Xa)){if(s.length>=Di)break;vn(c,Cc(wc(d)),r,s);}s.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:s}});}return o}function Io(e){return e.box}function En(e,t){if(e.kind==="paragraph"){t.add(e.paragraphId);return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)En(o,t);}function Oo(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>yb*4)){for(let c of o.children)if(c.kind!=="textValue"){if(c.kind==="paragraph"){for(let s of r)t.get(s)?.push(c.id);n(c,c.id,i+1);continue}if(c.kind==="contentControl"){t.set(c.id,[]),r.push(c.id);let s=Ib(c);s&&n(s,a,i+1),r.pop();let d=t.get(c.id);d&&d.length===0&&a!==null&&d.push(a);continue}n(c,a,i+1);}}},r=[];return n(e,null,0),t}function To(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return {x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function Bo(e,t){let n=Mb(e.root);if(n.length===0)return wo;let r=new Map;t.pages.forEach((i,c)=>{(d=>{for(let l of d){let f=new Set;En(l,f);for(let h of f){let y=r.get(h)??[];y.push({pageIndex:c,box:Io(l)}),r.set(h,y);}}})(i.fragments);});let o=Oo(e.root),a=[];for(let i of n){let c=Kb(i.node),s=[...i.ancestors.map(h=>Kb(h).lock),c.lock],d=o.get(i.node.id)??[],l=new Map;for(let h of d)for(let y of r.get(h)??[]){let b=l.get(y.pageIndex);l.set(y.pageIndex,b?To(b,y.box):y.box);}let f=[...l.entries()].sort((h,y)=>h[0]-y[0]).map(([h,y])=>({pageIndex:h,...y}));a.push({controlId:i.node.id,type:c.type,level:Lb(i.node),depth:i.depth,lock:c.lock,effectiveLock:Pb(s),showingPlaceholder:c.showingPlaceholder,temporary:c.temporary,...c.tag===void 0?{}:{tag:c.tag},...c.alias===void 0?{}:{alias:c.alias},...c.id===void 0?{}:{id:c.id},...c.dataBinding===void 0?{}:{dataBinding:c.dataBinding},paragraphIds:d,fragments:f});}return a}var wo=Object.freeze([]);function In(e,t,n){let r=e.lines?.find(o=>{let a=o.spans;if(!a)return n<o.range.end;let i=a.filter(c=>c.range.paragraphId===t);return i.length===a.length?n<o.range.end:i.length>0&&n<i[i.length-1].range.end});return r?r.box.y:e.fragmentY}function Uo(e,t){let n=new Map;for(let r of e.pages)for(let[o,a]of Wo(r,t))n.has(o)||n.set(o,a);return n}var Ln=new WeakMap;function Wo(e,t){let n=Ln.get(t);n||(n=new WeakMap,Ln.set(t,n));let r=n.get(e);if(r)return r;let o=new Map;for(let a of t(e)){let i=new Set([a.paragraphId]);for(let c of a.lines??[])for(let s of c.spans??[])i.add(s.range.paragraphId);for(let c of i)o.has(c)||o.set(c,{pageIndex:e.index,contentY:e.contentBox.y,fragmentY:a.box.y,...a.lines?{lines:a.lines}:{}});}return n.set(e,o),o}function Ko(e,t){let n=va(e);if(!n)return null;let r=t.get(n.start.paragraphId);return r?{pageIndex:r.pageIndex,y:r.contentY+In(r,n.start.paragraphId,n.start.offset)}:null}var On=new WeakMap;function Vo(e){let t=On.get(e);if(t!==void 0)return t;let n=i(e),r=new DataView(n.buffer,n.byteOffset,n.byteLength),o=false,a=r.getUint32(0)===1953784678?r.getUint32(12+e.faceIndex*4):0,i$1=r.getUint16(a+4);for(let c=0;c<i$1;c++){let s=a+12+c*16;if(r.getUint32(s)!==1330851634)continue;let d=r.getUint32(s+8),l=r.getUint32(s+12);l>=86&&d<=n.byteLength-l&&r.getUint16(d)>=1&&(o=(r.getUint32(d+78)&1966080)!==0);break}return On.set(e,o),o}function Tn(e,t,n,r,o){if(r>o||Math.abs(n.height-t)>o||!Vo(e))return n;let a=t*.3;return {height:n.height+a,baseline:n.baseline+a/2}}var Xo="abcdefghijklmnopqrstuvwxyz";function Z(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function V(e,t,n,r,o){let a=r.shaping?.context;return e.shape({text:o,fontSizeHalfPoints:Z(r),bidiLevel:r.shaping?.direction==="rtl"?1:0,environment:jo(t,n,r),...a?{context:a}:{}})}var Bn=new WeakMap;function jo(e,t,n){if(!Object.isFrozen(e)||!Object.isFrozen(e.features)||!Object.isFrozen(e.variationAxes)||!Object.isFrozen(e.shapingLibrary))return wn(e,t,n);let r=n.shaping?.direction??"ltr",o=n.shaping?.script,a=`${r}|${o??""}|${D(n)?1:0}|${e.documentLigatures?B(n):""}|${n.smallCaps?1:0}`,i=Bn.get(e);i||Bn.set(e,i=new WeakMap);let c=i.get(t);c||i.set(t,c=new Map);let s=c.get(a);return s||c.set(a,s=wn(e,t,n)),s}function wn(e,t,n){return p({...e,font:t,direction:n.shaping?.direction??"ltr",script:n.shaping?.script==="Zyyy"?e.script:n.shaping?.script??e.script,features:{...e.features,kern:D(n)?1:0,...e.documentLigatures?A(n):{},...n.smallCaps?{smcp:1}:{}},fallbackOrder:[]})}function Te(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let c of Xo){let s=V(e,t,n,{...r,smallCaps:!0},c),d=V(e,t,n,{...r,smallCaps:!1},c);if(!(s.glyphs.length!==d.glyphs.length||s.glyphs.some((f,h)=>f.id!==d.glyphs[h]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}function An(e,t,n,r,o){let a=new WeakMap;return (i,c)=>{let s=da$1(c),d=a.get(i);d||(d=new Map,a.set(i,d));let l=Z(c),f=d.get(l);if(f)return s===1?f:{height:f.height*s,baseline:f.baseline*s};let h,y=true,b=i.substitution?.lineMetrics;if(b){let x=l/2;h={height:b.heightEm*x,baseline:b.baselineEm*x};}else try{let x=V(e,t,i,c,""),m=x.metrics.ascent/t.fixedPointScale,g=x.metrics.descent/t.fixedPointScale,S=l/2,C=m+g,v=S*r,F=C>v?v/C:1,T=C*F,p=Math.min(Math.max(0,x.metrics.lineGap/t.fixedPointScale),T*o),u=T+p;u>0?h=Tn(i,S,{height:u,baseline:m*F+p},p,2/t.fixedPointScale):(h=n.lineMetrics(c),y=!1);}catch{h=n.lineMetrics(c),y=false;}return y?(d.set(l,h),s===1?h:{height:h.height*s,baseline:h.baseline*s}):h}}var lt=new WeakMap;function Yo(e){let t=lt.get(e);if(t!==void 0)return t??void 0;let n=e.path;if(!n.startsWith("M")||n.length>1e6||/[^MLQCZ0-9eE+.,\s-]/u.test(n))return;let r=1/0,o=-1/0,a=n.matchAll(/([MLQCZ])([^MLQCZ]*)/gu);for(let c of a){let s=c[1]==="Z"?0:c[1]==="C"?6:c[1]==="Q"?4:2,d=c[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(d.length!==s||d.some(l=>!Number.isFinite(l))){lt.set(e,null);return}for(let l=0;l<d.length;l+=2)r=Math.min(r,d[l]),o=Math.max(o,d[l]);}let i=Number.isFinite(r)&&Number.isFinite(o)?{left:r,right:o}:void 0;return lt.set(e,i??null),i}function Pn(e,t,n,r){if(e.clusters.length!==1||e.glyphs.length===0)return;let o=1/0,a=-1/0;for(let c of e.glyphs){if(c.id===0)return;let s=Yo(c.outline),d=c.outline.unitsPerEm;if(!s||!(d>0))return;let l=(c.originX+c.offsetX)/n;o=Math.min(o,l+s.left*t*(c.drawScale??1)/d),a=Math.max(a,l+s.right*t*(c.drawScale??1)/d);}let i={left:o*r,right:a*r};return Number.isFinite(i.left)&&Number.isFinite(i.right)?i:void 0}function $o(e,t,n){if(t<12)return null;if(e.getUint32(0)!==1953784678)return 0;let o=12+(Number.isSafeInteger(n)&&n>0?n:0)*4;if(o+4>t)return null;let a=e.getUint32(o);return a+12<=t?a:null}function _n(e,t,n,r,o){let a=e.getUint16(n+4);if(a>4096||n+12+a*16>t)return null;for(let i=0;i<a;i+=1){let c=n+12+i*16;if(e.getUint32(c)!==r)continue;let s=e.getUint32(c+8),d=e.getUint32(c+12);return d<o||s+d>t?null:s}return null}function Mn(e,t){let n=e.byteLength,r=new DataView(e.buffer,e.byteOffset,n),o=$o(r,n,t);if(o===null)return null;let a=_n(r,n,o,1751474532,54);if(a===null)return null;let i=r.getUint16(a+18);if(i<=0)return null;let c=_n(r,n,o,1330851634,30);if(c===null)return null;let s=r.getInt16(c+26)/i,d=r.getInt16(c+28)/i;return !(s>0)||s>1||!(Math.abs(d)<=1)?null:{offsetEm:d,thicknessEm:s}}var qo=.5,Zo=4,kn=4096;function zn(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o,fallback:a}=e,i=t??{shapingLibrary:n.shapingLibrary,unicodeDataVersion:n.unicodeDataVersion,script:n?.script??"Latn",fixedPointScale:n?.fixedPointScale??1e3,normalization:n?.normalization??"none",features:n?.features??{},roundingMode:n?.roundingMode??"halfToEven",language:n?.language??"en",variationAxes:{}},c=new WeakMap,s=new WeakMap,d=An(r,i,a,Zo,qo),l=new WeakMap,f=new WeakMap,h=new Array(kn),y=0,b=(p,u,R)=>{let E=h[y];E&&E.cache.delete(E.text),p.set(u,R),h[y]={cache:p,text:u},y=(y+1)%kn;},x=p=>{let u=l.get(p);if(u!==void 0)return u;let R=o(p);return l.set(p,R),R},m=(p,u,R)=>{let E=R?s:c,L=E.get(p);L||(L=new Map,E.set(p,L));let O=L.get(u);return O||(O=new Map,L.set(u,O)),O},g=new WeakMap,S=p=>{if(!p.shaping?.wordSpacingPt)return p;let u=g.get(p);return u||(u={...p,shaping:{...p.shaping,wordSpacingPt:void 0}},g.set(p,u)),u},C=(p,u)=>u.shaping?.wordSpacingPt?Qd(p)*u.shaping.wordSpacingPt:0,v=(p,u)=>a.measure(p,S(u))+C(p,u),F=(p,u)=>{let R=Math.max(0,a.measure(p,S(u))),E=a.caretAdvances?.(p,S(u))??Od(p,R);if(!E||E.length!==p.length+1)return Od(p,v(p,u));let L=Math.max(0,v(p,u)),O=0,A=0;return E.map((w,M)=>{if(M===0)return 0;p[M-1]===" "&&A++;let B=w+A*(u.shaping?.wordSpacingPt??0);return O=Math.max(O,Math.min(L,Number.isFinite(B)?B:O)),M===p.length?L:O})},T=new WeakMap;return {hasResolvedFont(p){return x(p)!==null},strikeoutMetrics(p){let u=x(p);if(!u)return;let R=T.get(u);if(R===void 0&&(R=Mn(u.bytes,u.faceIndex),T.set(u,R)),!R)return;let E=Z(p)/2*da$1(p);return {offsetPt:R.offsetEm*E,thicknessPt:R.thicknessEm*E}},measure(p,u){if(p.length===0)return 0;let R=x(u);if(!R)return v(p,u);let E=m(R,Z(u),u.smallCaps),L=u.shaping?.context,O=u.shaping?`1:${JSON.stringify(L?[u.shaping.script,u.shaping.direction,p,L.before,L.after]:[u.shaping.script,u.shaping.direction,p])}`:`0:${p}`,A=`${D(u)?1:0}:${B(u)}:${O}`,w=E.get(A);if(w===void 0){let M=0;try{if(u.smallCaps&&!Te(r,i,R,u,f))return v(p,u);let B=V(r,i,R,u,p);if(B.glyphs.some(H=>H.id===0))return v(p,u);for(let H of B.glyphs)M+=H.advanceX;}catch{return v(p,u)}w=M/i.fixedPointScale,b(E,A,w);}return w*da$1(u)*(u.horizontalScalePercent/100)+p.length*u.characterSpacingPt+C(p,u)},inkBounds(p,u){if(!p||p.length>2||u.shaping?.direction==="rtl"||ka(p).length!==1)return;let R=x(u);if(!R)return a.inkBounds?.(p,u);try{if(u.smallCaps&&!Te(r,i,R,u,f))return a.inkBounds?.(p,u);let E=V(r,i,R,u,p);return Pn(E,Z(u)/2,i.fixedPointScale,da$1(u)*u.horizontalScalePercent/100)}catch{return}},caretAdvances(p,u){let R=x(u);if(!R)return F(p,u);try{if(u.smallCaps&&!Te(r,i,R,u,f))return F(p,u);let E=V(r,i,R,u,p);return E.glyphs.some(L=>L.id===0)?F(p,u):Pd(p,E,da$1(u)*(u.horizontalScalePercent/100)/i.fixedPointScale,u.characterSpacingPt,u.shaping?.wordSpacingPt??0)??Od(p,E.glyphs.reduce((L,O)=>L+O.advanceX,0)*da$1(u)*(u.horizontalScalePercent/100)/i.fixedPointScale+p.length*u.characterSpacingPt+C(p,u))}catch{return F(p,u)}},lineMetrics(p,u){let R=x(p);if(!R)return a.lineMetrics(p,u);if(!u||/^[\t\n\r\f ]*$/.test(u))return d(R,p);try{let E=V(r,i,R,p,u),L=0,O=0;for(let A of E.fontSpans){let w=d(A.font,p);L=Math.max(L,w.baseline),O=Math.max(O,w.height-w.baseline);}if(L+O>0)return {height:L+O,baseline:L}}catch{}return d(R,p)}}}function Jo(e,t){return zn({...t,shaper:e.shaper,environment:e.environment})}function Qo(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let s of t.pages)r.add(s.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,c=-1;for(let s of t.pages){let d=s.box.y;d+s.box.height>=n.top&&d<=a&&(i===-1&&(i=s.index),c=s.index);}if(i===-1){let s=ea(t,n.top);s!==null&&(i=s,c=s);}if(i!==-1){let s=Math.max(0,i-o),d=Math.min(t.pages.length-1,c+o);for(let l=s;l<=d;l+=1)r.add(l);}for(let s of e.pinnedPages??[])s>=0&&s<t.pages.length&&r.add(s);return r}function ea(e,t){let n=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=t<o.box.y?o.box.y-t:t>o.box.y+o.box.height?t-(o.box.y+o.box.height):0;a<r&&(r=a,n=o.index);}return n}var Nn=["text-local","paragraph-local","flow-structural","global"];function Dn(e,t){return Nn.indexOf(t)>Nn.indexOf(e)?t:e}function ta(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function na(e){let{run:t,currentRevision:n,publish:r,schedule:o}=e,a=null,i=null,c=null,s=0,d=0;function l(m){let g=e.runCooperatively;if(!g)return t(m);let S=g(m);c=S;try{for(;;){let C=S.step();if(C)return C;if(n()!==m.revision)return S.cancel(),d+=1,null;if(c!==S)return null}}finally{c===S&&(c=null);}}function f(m){let g=y(n());g.impact=Dn(g.impact,m.impact),g.structural=g.structural||m.structural;for(let S of m.paragraphIds)g.paragraphIds.add(S);for(let S of m.created)g.created.add(S);for(let S of m.deleted)g.deleted.add(S);for(let S of m.dependencyKeys)g.dependencyKeys.add(S);}let h=m=>({impact:m.impact,paragraphIds:m.paragraphIds,created:m.created,deleted:m.deleted,dependencyKeys:m.dependencyKeys,structural:m.structural,revision:m.revision});function y(m){return a||(a=ta(m)),a.revision=Math.max(a.revision,m),a}function b(){!o||i||(i=o(()=>{i=null,x();}));}function x(){i&&(i(),i=null),c&&(c.cancel(),c=null,d+=1);let m=a;if(!m)return false;a=null;let g=h(m),S=l(g);return !S||S.revision!==n()?(s+=1,f(g),b(),false):(r(S,g),true)}return {notify(m){let g=y(n());g.impact=Dn(g.impact,m.impact);for(let S of m.dirty)g.paragraphIds.add(S);for(let S of m.created)g.created.add(S),g.paragraphIds.add(S);for(let S of m.deleted)g.deleted.add(S),g.paragraphIds.add(S);for(let S of m.dependencyKeys)g.dependencyKeys.add(S);for(let S of m.splitJoin)g.structural=true,"split"in S?(g.paragraphIds.add(S.split.from),g.paragraphIds.add(S.split.tail)):(g.paragraphIds.add(S.join.kept),g.paragraphIds.add(S.join.removed));(m.impact==="flow-structural"||m.impact==="global")&&(g.structural=true),b();},invalidateAll(m,g){let S=y(m);S.impact="flow-structural",S.structural=true,g&&S.dependencyKeys.add(g),b();},flush:x,pending:()=>a?h(a):null,cancel(){i?.(),i=null,c?.cancel(),c=null,a=null;},get staleDiscards(){return s},get cancelledRuns(){return d}}}var Hn=new WeakMap;function X(e){let t=Hn.get(e);if(t)return t;let n=new Map,r=new Map,o=new Map,a=new Map,i=(s,d,l,f)=>{for(let h of s){if(h.kind==="paragraph")continue;let y=h.tableId;a.set(y,Math.max(a.get(y)??0,(h.columnEdges?.length??1)-1));let b=o.get(y);b||(b=new Map,o.set(y,b),n.set(y,[]),r.set(y,new Map));for(let x of h.rows){let m=b.get(x.id);m===void 0&&(m=b.size,b.set(x.id,m),r.get(y).set(m,x.cells));for(let g of x.cells)n.get(y).push({pageIndex:d,tableId:y,row:x,cell:g,rowIndex:m,isHeaderRepeat:x.isHeaderRepeat,offsetX:l,offsetY:f}),i(g.blocks,d,l,f);}}};for(let s of e.pages){i(s.fragments,s.index,0,0);for(let d of [s.header,s.footer])d&&i(d.fragments,s.index,d.box.x-s.contentBox.x,d.box.y-s.contentBox.y);for(let d of [s.footnotes,s.endnotes])if(d)for(let l of d.notes)i(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);}let c=new Map;for(let[s,d]of n)c.set(s,{placed:d,rows:r.get(s)??new Map,columnCount:a.get(s)??0});return Hn.set(e,c),c}function Kn(e){let t=e.columnCount;for(let n of e.rows.values())for(let r of n)t=Math.max(t,Y(r).to+1);return t}var Y=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function ra(e,t,n){if(t.tableId!==n.tableId)return null;let r=X(e).get(t.tableId);if(!r)return null;let o=Math.min(t.rowIndex,n.rowIndex),a=Math.max(t.rowIndex,n.rowIndex),i=Math.min(Y(t).from,Y(n).from),c=Math.max(Y(t).to,Y(n).to),s=y=>{let{from:b,to:x}=Y(y);return x>=i&&b<=c},d=y=>(r.rows.get(y)??[]).some(b=>b.vMergeContinue&&s(b)),l=r.rows.size+Kn(r)+2;for(let y=0;!(y>l);y+=1){let b=false;for(let[x,m]of r.rows)if(!(x<o||x>a))for(let g of m){if(!s(g))continue;let{from:S,to:C}=Y(g);S<i&&(i=S,b=true),C>c&&(c=C,b=true);}for(;o>0&&d(o);)o-=1,b=true;for(;d(a+1);)a+=1,b=true;if(!b)break}let f=[],h=new Set;for(let y of r.placed){if(y.isHeaderRepeat||y.rowIndex<o||y.rowIndex>a)continue;let{from:b,to:x}=Y(y.cell);x<i||b>c||h.has(y.cell.id)||(h.add(y.cell.id),f.push(y.cell.id));}return f.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:f,rows:{from:o,to:a},columns:{from:i,to:c},text:oa(e,t.tableId,f)}}function ji(e,t){return Vn(e,t,true)}function Be(e,t){return Vn(e,t,false)}function Vn(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of X(e).values())for(let c of i.placed)if(!(c.isHeaderRepeat||!r.has(c.cell.id)))for(let s of c.cell.blocks)n&&s.kind!=="paragraph"||ee(s,o,a);return o}function ee(e,t,n){if(e.kind==="paragraph"){for(let r of Na(e))n.has(r)||(n.add(r),t.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)ee(a,t,n);}function oa(e,t,n){let r=Be(e,n),o=r[0],a=r[r.length-1];return !o||!a?aa(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:nf(e,a).length}}}function aa(e,t){let n=X(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let c of o.cell.blocks)ee(c,a,new Set);let i=a[0];if(i){let c={paragraphId:i,offset:0};return {anchor:c,head:c}}}for(let o of e.pages)for(let a of va$1(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function ia(e){let t=[...va$1(e)];for(let n of [e.header,e.footer])n&&t.push(...wa$1(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...wa$1(r.fragments));return t}function sa(e,t){let n=new Set(Be(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of ia(a))if(n.has(i.paragraphId))for(let c of i.lines)for(let s of c.spans){let d=`${s.range.paragraphId}:${s.range.start}:${s.range.end}`;o.has(d)||(o.add(d),r.push(s));}return r}function ca(e,t){let n=new Set(t),r=[];for(let o of X(e).values())for(let a of o.placed)n.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function la(e,t,n=nf){let r=X(e).get(t.tableId);if(!r)return "";let o=new Set(t.cellIds),a=r.placed.some(s=>s.cell.logicalGridColumn!==void 0),i=new Map,c=new Set;for(let s of r.placed){if(s.isHeaderRepeat||!o.has(s.cell.id)||c.has(s.cell.id))continue;c.add(s.cell.id);let d=Be(e,[s.cell.id]).map(h=>n(e,h)).join(`
2
2
  `),l=i.get(s.rowIndex),f=s.cell.gridColumn+(a?Math.max(1,s.cell.gridSpan)-1:0);l?l.set(f,d):i.set(s.rowIndex,new Map([[f,d]]));}return [...i.keys()].sort((s,d)=>s-d).map(s=>{let d=i.get(s),l=[];for(let f=0;f<=t.columns.to-t.columns.from;f+=1){let h=a?t.columns.to-f:t.columns.from+f;l.push(d.get(h)??"");}return l.join(" ")}).join(`
3
3
  `)}function dt(e,t){return ua(e).get(t)??null}var Gn=new WeakMap;function da(e){let t=Gn.get(e);if(t)return t;let n=[];for(let r of e.blocks)ee(r,n,new Set);return Gn.set(e,n),n}var Un=new WeakMap;function ua(e){let t=Un.get(e);if(t)return t;let n=new Map;for(let[r,o]of X(e)){let a;for(let i of o.placed)if(!i.isHeaderRepeat)for(let c of da(i.cell)){let s=n.get(c);s&&s.tableId.length>=r.length||(a??=Kn(o),n.set(c,{tableId:r,rows:o.rows.size,columns:a,rowIndex:i.rowIndex,columnIndex:i.cell.logicalGridColumn??i.cell.gridColumn}));}}return Un.set(e,n),n}function Yi(e,t,n){if(n){let a=dt(e,t);if(!a||a.tableId!==n.tableId)return null;let i=n.cellIds[0];if(!i)return null;let c=X(e).get(n.tableId);if(!c)return null;for(let s of c.placed)if(s.cell.id===i)return {tableId:n.tableId,rowId:s.row.id,cellId:i,cellIds:n.cellIds,gridColumnIndex:s.cell.logicalGridColumn??s.cell.gridColumn,isHeaderRepeat:s.isHeaderRepeat};return null}let r=dt(e,t);if(!r)return null;let o=X(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let c of a.cell.blocks)ee(c,i,new Set);if(i.includes(t))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.logicalGridColumn??a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}var Wn=new WeakMap;function $i(e,t){let n=Wn.get(e);if(n)return n.get(t)??null;let r=new Map;for(let[o,a]of X(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let c=[];for(let d of i.cell.blocks)ee(d,c,new Set);let s={tableId:o,rowId:i.row.id,cellId:i.cell.id,rowIndex:i.rowIndex,gridColumn:i.cell.gridColumn,gridSpan:i.cell.gridSpan};for(let d of c){let l=r.get(d);l&&l.tableId.length>=o.length||r.set(d,s);}}return Wn.set(e,r),r.get(t)??null}function pa(e,t,n){if(![e,t,n].every(Number.isFinite)||t<=0||n<=0)return {offsetPt:0,count:0};let r=Math.ceil(e/n-1e-9)*n;if(!Number.isFinite(r))return {offsetPt:0,count:0};let o=Math.max(0,r-e);return {offsetPt:o,count:Math.min(8192,Math.max(0,Math.floor((t-o)/n+1e-9)))}}export{zn as $,cn as A,ln as B,dn as C,un as D,ro as E,oo as F,Q as G,so as H,st as I,yn as J,yo as K,go as L,D as M,xn as N,Qa as O,Rn as P,Cn as Q,vo as R,Eo as S,Lo as T,di as U,Bo as V,In as W,Uo as X,Ko as Y,V as Z,Te as _,Ye as a,Jo as aa,q as b,Qo as ba,qe as c,na as ca,$n as d,ra as da,I as e,ji as ea,Ze as f,Be as fa,et as g,sa as ga,Ea as h,ca as ha,W as i,la as ia,Vr as j,dt as ja,Xr as k,Yi as ka,wa as l,$i as la,nt as m,pa as ma,Aa as n,jr as o,$r as p,Pa as q,qr as r,rt as s,Le as t,Zr as u,Jr as v,Qr as w,at as x,an as y,sn as z};
@@ -1 +1 @@
1
- 'use strict';var chunkSUN62YU6_cjs=require('./chunk-SUN62YU6.cjs'),chunkANZ44KQT_cjs=require('./chunk-ANZ44KQT.cjs');function U(e){return e.kind!=="textValue"}function k(e,t){for(let l of e.children)if(U(l)&&l.localName===t)return l}function _(e,t){return e.attributes.find(l=>l.localName===t)?.value}function Y(e){let t=k(e,"pPr"),l=t?k(t,"outlineLvl"):void 0;if(l){let i=_(l,"val");return i!==void 0&&/^[0-8]$/.test(i)?Number(i):null}let n=k(e,"name"),o=n?/^heading\s+([1-9])$/i.exec(_(n,"val")?.trim()??""):null;return o?Number(o[1])-1:null}function h(e,t=0,l=e.length,n){let o=new Set,i=new Map,d=new Map,a=n?[n]:[];n&&o.add(n);for(let s=t;s<l;s+=1){let r=e[s].node;if(chunkANZ44KQT_cjs.Ye(r,"begin")){a.push(r.id);continue}if(chunkANZ44KQT_cjs.Ye(r,"separate")){let u=a[a.length-1];u&&(o.add(u),i.set(r.id,u));continue}if(chunkANZ44KQT_cjs.Ye(r,"end")){let u=a.pop();u&&(o.add(u),d.set(r.id,u));}}return {activeBegins:o,separateBegin:i,endBegin:d}}function b(e,t,l){if(chunkANZ44KQT_cjs.Ye(l,"begin"))return t.activeBegins.has(l.id)&&e.push({beginId:l.id,separated:false}),true;if(chunkANZ44KQT_cjs.Ye(l,"separate")){let n=t.separateBegin.get(l.id),o=e[e.length-1];return n&&o?.beginId===n&&(o.separated=true),true}if(chunkANZ44KQT_cjs.Ye(l,"end")){let n=t.endBegin.get(l.id),o=e[e.length-1];return n&&o?.beginId===n&&e.pop(),true}return false}function g(e){for(let t of e)if(!t.separated)return false;return true}function K(e,t){let l=[];chunkANZ44KQT_cjs.if(e,l,t);let n=h(l),o=[];return {consume:i=>b(o,n,i),visible:()=>g(o)}}var j=4096,L=chunkANZ44KQT_cjs.jf*16;function O(){return {out:[],runs:[],symbols:[],symbolDisplays:[],length:0}}function v(e,t,l,n){if(t.length===0||l===n)return;let o=e.runs[e.runs.length-1];if(o?.runId===t&&o.end===l){e.runs[e.runs.length-1]={runId:t,start:o.start,end:n};return}e.runs.push({runId:t,start:l,end:n});}function C(e,t,l,n){let o=chunkANZ44KQT_cjs.hf(t);if(o.length>n.left)return false;if(n.left-=o.length,o.length>0){let i=e.length;chunkANZ44KQT_cjs.Wa(t)&&(e.symbols.push(i),e.symbolDisplays.push(chunkSUN62YU6_cjs.Ga(t))),e.out.push(o),e.length+=o.length,v(e,l,i,e.length);}return true}function X(e,t){let l=e.length;t.text.length>0&&e.out.push(t.text),e.length+=t.text.length;for(let n of t.runs)v(e,n.runId,l+n.start,l+n.end);for(let n of t.symbols??[])e.symbols.push(l+n);for(let n of t.symbolDisplays??[])e.symbolDisplays.push(n);}function N(e){let t=e.out.join("");return e.symbols.length>0?{text:t,runs:e.runs,symbols:e.symbols,symbolDisplays:e.symbolDisplays}:{text:t,runs:e.runs}}var H=Object.freeze({text:"",runs:[]});function M(){return {text:chunkANZ44KQT_cjs.Te,runs:[]}}function $(e,t,l,n){let o=[];if(!chunkANZ44KQT_cjs.if(e,o,l))return null;let i=o.reverse(),d=O();for(;i.length>0;){let a=i.pop();if(!(t==="original"&&a.hiddenInOriginal)){if(chunkANZ44KQT_cjs.$e(a.node)){let s=[];if(!chunkANZ44KQT_cjs.if(a.node,s,l))return null;for(let r=s.length-1;r>=0;r-=1)i.push(s[r]);continue}if(!chunkANZ44KQT_cjs.Ze(a.node)&&!C(d,a.node,a.runId,n))return null}}return N(d)}function z(e,t,l,n,o){let i=O(),d=[],a=h(e);for(let s of e){let r=s.node;if(!b(d,a,r)&&!chunkANZ44KQT_cjs.Ze(r)&&g(d)&&!(t==="original"&&s.hiddenInOriginal)){if(chunkANZ44KQT_cjs.$e(r)){let u=o>=chunkANZ44KQT_cjs.kf?$(r,t,l,n):V(r,t,l,n,o+1);if(u===null)return null;X(i,u);continue}if(!C(i,r,s.runId,n))return null}}return N(i)}function V(e,t,l,n,o){let i=[];return chunkANZ44KQT_cjs.if(e,i,l)?z(i,t,l,n,o):null}function G(e,t,l){let n=t.node;return e.owned.has(n.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),n.id===e.endId?true:(n.id===e.span.node.id||b(e.states,e.markers,n)||e.overflow||chunkANZ44KQT_cjs.Ze(n)||chunkANZ44KQT_cjs.$e(n)||!e.owned.has(n.id)||!g(e.states)||l==="original"&&t.hiddenInOriginal||C(e.result,n,t.runId,e.chars)||(e.overflow=true),false)}function te(e,t,l="allMarkup"){let n=new Map,o=new Map,i=new Map;for(let r of t)r.kind==="complex"?o.set(r.node.id,r):i.set(r.node.id,r);let d=[];chunkANZ44KQT_cjs.if(e,d);let a=new Map;for(let r=0;r<d.length;r+=1)a.set(d[r].node.id,r);let s=null;for(let r=0;r<d.length;r+=1){let u=d[r],y=i.get(u.node.id);if(y)if(s!==null&&!g(s.states))n.set(y.node.id,H);else {let f={left:j},I={left:L},m=V(y.node,l,f,I,0);n.set(y.node.id,m??M());}if(s===null){let f=o.get(u.node.id);if(!f)continue;let I=new Set(f.removeNodeIds),m=-1;for(let S=f.removeNodeIds.length-1;S>=0;S-=1){let x=a.get(f.removeNodeIds[S]);if(!(x===void 0||x<=r)&&chunkANZ44KQT_cjs.Ye(d[x].node,"end")){m=x;break}}let w=d[m];if(!w){n.set(f.node.id,M());continue}s={span:f,owned:I,states:[{beginId:f.node.id,separated:false}],markers:h(d,r+1,m,f.node.id),endId:w.node.id,result:O(),chars:{left:L},nodesLeft:j,overflow:false};}G(s,u,l)&&(n.set(s.span.node.id,s.overflow?M():N(s.result)),s=null);}return s!==null&&n.set(s.span.node.id,M()),n}exports.a=K;exports.b=j;exports.c=te;exports.d=Y;
1
+ 'use strict';var chunkAVKVRU7Z_cjs=require('./chunk-AVKVRU7Z.cjs'),chunk4KZ6L5YF_cjs=require('./chunk-4KZ6L5YF.cjs');function U(e){return e.kind!=="textValue"}function k(e,t){for(let l of e.children)if(U(l)&&l.localName===t)return l}function _(e,t){return e.attributes.find(l=>l.localName===t)?.value}function Y(e){let t=k(e,"pPr"),l=t?k(t,"outlineLvl"):void 0;if(l){let i=_(l,"val");return i!==void 0&&/^[0-8]$/.test(i)?Number(i):null}let n=k(e,"name"),o=n?/^heading\s+([1-9])$/i.exec(_(n,"val")?.trim()??""):null;return o?Number(o[1])-1:null}function h(e,t=0,l=e.length,n){let o=new Set,i=new Map,d=new Map,a=n?[n]:[];n&&o.add(n);for(let s=t;s<l;s+=1){let r=e[s].node;if(chunk4KZ6L5YF_cjs._e(r,"begin")){a.push(r.id);continue}if(chunk4KZ6L5YF_cjs._e(r,"separate")){let u=a[a.length-1];u&&(o.add(u),i.set(r.id,u));continue}if(chunk4KZ6L5YF_cjs._e(r,"end")){let u=a.pop();u&&(o.add(u),d.set(r.id,u));}}return {activeBegins:o,separateBegin:i,endBegin:d}}function b(e,t,l){if(chunk4KZ6L5YF_cjs._e(l,"begin"))return t.activeBegins.has(l.id)&&e.push({beginId:l.id,separated:false}),true;if(chunk4KZ6L5YF_cjs._e(l,"separate")){let n=t.separateBegin.get(l.id),o=e[e.length-1];return n&&o?.beginId===n&&(o.separated=true),true}if(chunk4KZ6L5YF_cjs._e(l,"end")){let n=t.endBegin.get(l.id),o=e[e.length-1];return n&&o?.beginId===n&&e.pop(),true}return false}function g(e){for(let t of e)if(!t.separated)return false;return true}function K(e,t){let l=[];chunk4KZ6L5YF_cjs.kf(e,l,t);let n=h(l),o=[];return {consume:i=>b(o,n,i),visible:()=>g(o)}}var j=4096,L=chunk4KZ6L5YF_cjs.lf*16;function O(){return {out:[],runs:[],symbols:[],symbolDisplays:[],length:0}}function v(e,t,l,n){if(t.length===0||l===n)return;let o=e.runs[e.runs.length-1];if(o?.runId===t&&o.end===l){e.runs[e.runs.length-1]={runId:t,start:o.start,end:n};return}e.runs.push({runId:t,start:l,end:n});}function C(e,t,l,n){let o=chunk4KZ6L5YF_cjs.jf(t);if(o.length>n.left)return false;if(n.left-=o.length,o.length>0){let i=e.length;chunk4KZ6L5YF_cjs.Wa(t)&&(e.symbols.push(i),e.symbolDisplays.push(chunkAVKVRU7Z_cjs.Ga(t))),e.out.push(o),e.length+=o.length,v(e,l,i,e.length);}return true}function X(e,t){let l=e.length;t.text.length>0&&e.out.push(t.text),e.length+=t.text.length;for(let n of t.runs)v(e,n.runId,l+n.start,l+n.end);for(let n of t.symbols??[])e.symbols.push(l+n);for(let n of t.symbolDisplays??[])e.symbolDisplays.push(n);}function N(e){let t=e.out.join("");return e.symbols.length>0?{text:t,runs:e.runs,symbols:e.symbols,symbolDisplays:e.symbolDisplays}:{text:t,runs:e.runs}}var H=Object.freeze({text:"",runs:[]});function M(){return {text:chunk4KZ6L5YF_cjs.Ve,runs:[]}}function $(e,t,l,n){let o=[];if(!chunk4KZ6L5YF_cjs.kf(e,o,l))return null;let i=o.reverse(),d=O();for(;i.length>0;){let a=i.pop();if(!(t==="original"&&a.hiddenInOriginal)){if(chunk4KZ6L5YF_cjs.bf(a.node)){let s=[];if(!chunk4KZ6L5YF_cjs.kf(a.node,s,l))return null;for(let r=s.length-1;r>=0;r-=1)i.push(s[r]);continue}if(!chunk4KZ6L5YF_cjs.$e(a.node)&&!C(d,a.node,a.runId,n))return null}}return N(d)}function z(e,t,l,n,o){let i=O(),d=[],a=h(e);for(let s of e){let r=s.node;if(!b(d,a,r)&&!chunk4KZ6L5YF_cjs.$e(r)&&g(d)&&!(t==="original"&&s.hiddenInOriginal)){if(chunk4KZ6L5YF_cjs.bf(r)){let u=o>=chunk4KZ6L5YF_cjs.mf?$(r,t,l,n):V(r,t,l,n,o+1);if(u===null)return null;X(i,u);continue}if(!C(i,r,s.runId,n))return null}}return N(i)}function V(e,t,l,n,o){let i=[];return chunk4KZ6L5YF_cjs.kf(e,i,l)?z(i,t,l,n,o):null}function G(e,t,l){let n=t.node;return e.owned.has(n.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),n.id===e.endId?true:(n.id===e.span.node.id||b(e.states,e.markers,n)||e.overflow||chunk4KZ6L5YF_cjs.$e(n)||chunk4KZ6L5YF_cjs.bf(n)||!e.owned.has(n.id)||!g(e.states)||l==="original"&&t.hiddenInOriginal||C(e.result,n,t.runId,e.chars)||(e.overflow=true),false)}function te(e,t,l="allMarkup"){let n=new Map,o=new Map,i=new Map;for(let r of t)r.kind==="complex"?o.set(r.node.id,r):i.set(r.node.id,r);let d=[];chunk4KZ6L5YF_cjs.kf(e,d);let a=new Map;for(let r=0;r<d.length;r+=1)a.set(d[r].node.id,r);let s=null;for(let r=0;r<d.length;r+=1){let u=d[r],y=i.get(u.node.id);if(y)if(s!==null&&!g(s.states))n.set(y.node.id,H);else {let f={left:j},I={left:L},m=V(y.node,l,f,I,0);n.set(y.node.id,m??M());}if(s===null){let f=o.get(u.node.id);if(!f)continue;let I=new Set(f.removeNodeIds),m=-1;for(let S=f.removeNodeIds.length-1;S>=0;S-=1){let x=a.get(f.removeNodeIds[S]);if(!(x===void 0||x<=r)&&chunk4KZ6L5YF_cjs._e(d[x].node,"end")){m=x;break}}let w=d[m];if(!w){n.set(f.node.id,M());continue}s={span:f,owned:I,states:[{beginId:f.node.id,separated:false}],markers:h(d,r+1,m,f.node.id),endId:w.node.id,result:O(),chars:{left:L},nodesLeft:j,overflow:false};}G(s,u,l)&&(n.set(s.span.node.id,s.overflow?M():N(s.result)),s=null);}return s!==null&&n.set(s.span.node.id,M()),n}exports.a=K;exports.b=j;exports.c=te;exports.d=Y;
@@ -0,0 +1 @@
1
+ import {pe,Ue,Ta,Xa,fa,nb,ud,re,sd,hd,te,se,Te,oe,Ya,Wa,Ca,ke,Aa,Da,za,ua as ua$1,Ja as Ja$1,_e,Hc,Mb,jf,df,ff,Fc,ef}from'./chunk-VIPMGGUT.js';import {ab,ea,fa as fa$1,ua,Ha,Ja,Pa,La}from'./chunk-GWQJ5774.js';import {Vd,Lg,Oc,Re,dj,$a,Xf,Sa,ed,sd as sd$1,W,dd,cd,wd,vd,$c,bd,Jh,fj,Rf,fa as fa$2,sa}from'./chunk-UMRSBLO7.js';var _t=Object.freeze({}),Bt=Object.freeze([]);function Vt(e){let t=Object.keys(e);if(t.length===0)return _t;let r={};for(let n of t){let o=e[n];o!==void 0&&(r[n]=o);}return Object.freeze(r)}function Kt(e){let t=new Map(Xf(e.part())),r=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!r.has(i)){r.add(i);for(let[s,c]of Xf(i))t.has(s)||t.set(s,c);}let n=e.currentPackage();for(let o of ["footnote","endnote"]){let a=Lg(n,o);if(!(!a||r.has(a))){r.add(a);for(let[i,s]of Xf(a))t.has(i)||t.set(i,s);}}return t}function zt(e,t){let r=jf(e,t);if(!r)return null;let n=e.pages[r.pageIndex];if(!n)return null;let o=df(n),a=ff(e,t.paragraphId,r.pageIndex),i=Object.freeze({x:r.x+a.x,y:r.y+a.y,height:r.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:r.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function Ht(e,t){let r=[];for(let n of t.values()){let o=zt(e,n);o&&r.push(o);}return r.length===0?Bt:Object.freeze(r)}function lt(e,t){return {documentMetadata:Vt(e.documentProperties()),destinations:Ht(t,Kt(e))}}function Or(e,t){let r=e.destinations;if(r){for(let n of r)if(n.anchor.name===t)return n}}function pt(e={}){return Object.freeze({async decode(t,r,n){let o=Vd(t,r);if(!o)throw new Error(`Unsupported or malformed ${r} image`);if(o.pixelWidth>n.maxDimension||o.pixelHeight>n.maxDimension||o.pixelWidth>n.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},...e.convertPreserved?{convertPreserved:e.convertPreserved}:{}})}var mt=new WeakMap;function ft(e,t){let r=mt.get(e);r||(r=sd(e),mt.set(e,r));let n=r.styleCascade(),o=new Set;if(t===e.part())for(let c of Hc(t,void 0,void 0,n,r.numberingIndex()))for(let h of Mb(c)?.slice(0,-1)??[])o.add(h.paragraph.id);let a=c=>{if(c.kind==="textValue")return false;let h=c.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===fa$2&&d.localName==="pPr"),p=h?.kind!=="textValue"?h?.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===fa$2&&d.localName==="rPr"):void 0;return p!==void 0&&sa(p,"vanish")},i=0,s=(c,h)=>{if(++i>sd$1||h>W||c.kind==="textValue")return false;if(c.kind==="paragraph"&&!o.has(c.id)&&(Fc(c,n,false)||a(c))&&Rf(c).length>0)return true;for(let p of c.children){if(i>=sd$1)break;if(s(p,h+1))return true}return false};return s(t.root,0)}var yt=new WeakMap,Wt=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function $t(e,t){let r=yt.get(e.root);if(r&&r.stylesPart===t)return r.codes;let n=Sa(t),o=new Set,a=[{node:e.root,scope:ed(),depth:0,mcSelected:false,framed:false}],i=0;for(;a.length;){let{node:c,scope:h,depth:p,mcSelected:d,framed:y}=a.pop();if(++i>sd$1||p>W){o.add("scan-limit");break}if(c.kind==="textValue")continue;if(i+a.length+c.children.length>sd$1){o.add("scan-limit");break}let g=dd(h,c),w=y||n(c),l=cd(c)?c:void 0;if(l){if(wd(l,g).drawing)continue;let m=vd(l,g);m.refused&&o.add("scan-limit"),m.branch&&a.push({node:m.branch,scope:g,depth:p+1,mcSelected:true,framed:w});continue}if(!d&&$c(c)&&!(w&&c.localName==="object")){let m=bd(c,e.name)?.textboxStory?.content;m&&a.push({node:m,scope:g,depth:p+1,mcSelected:d,framed:w});continue}if(c.namespaceUri==="urn:schemas-microsoft-com:vml"&&c.localName==="textbox"){o.add("legacy-textbox");continue}c.namespaceUri==="urn:schemas-microsoft-com:vml"&&Wt.has(c.localName)&&!c.children.some(m=>m.kind!=="textValue"&&m.namespaceUri==="urn:schemas-microsoft-com:vml"&&m.localName==="textbox")&&o.add("legacy-drawing");for(let m of c.children)a.push({node:m,scope:g,depth:p+1,mcSelected:d,framed:w});}let s=Object.freeze([...o]);return yt.set(e.root,{stylesPart:t,codes:s}),s}function gt(e){let t=new Set([e.part()]);for(let r of e.headerFooterPartsBySection())for(let n of [r.headers,r.footers])for(let o of n.values())t.add(o);for(let r of ["footnote","endnote"]){let n=Lg(e.currentPackage(),r);n&&t.add(n);}return Object.freeze([...t].flatMap(r=>[...$t(r,Oc(e.currentPackage())),...ft(e,r)?["unsupported-style-separator"]:[]].map(n=>Object.freeze({code:n,partName:r.name}))))}function ht(e){let t=e.defaultTabStopPt?.(),r=e.view.part().name,n={view:e.view,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,compatibilityMode:e.compatibilityMode?.(),inlineDrawingLayoutForPart:e.inlineDrawingLayoutForPart,drawingTokenForParagraphForPart:e.drawingTokenForParagraphForPart,drawingLayoutEpochForPart:e.drawingLayoutEpochForPart,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},o=pe(n),a={view:e.view,revision:e.revision,measurer:e.measurer,cache:e.cache,session:e.session,producer:e.producer,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,furniture:e.furniture,compatibilityMode:e.compatibilityMode,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,inlineDrawingLayout:e.inlineDrawingLayout,drawingTokenForParagraph:e.drawingTokenForParagraph,drawingLayoutEpoch:e.drawingLayoutEpoch,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},i={measurer:a.measurer,cache:a.cache,session:a.session,producer:a.producer,styleCascade:a.styleCascade?.(),defaultTabStopPt:a.defaultTabStopPt,compatibilityMode:a.compatibilityMode?.(),numberingIndex:a.numberingIndex?.(),sectionFurniture:a.furniture.sectionFurniture(),furniture:a.furniture.furniture(),evenAndOddHeaders:a.view.headerFooterPartsBySection()[0]?.evenAndOddHeaders===true,projectLink:a.linkProjectors.projectLink,projectFieldLink:a.projectFieldLink,showFieldCodes:a.showFieldCodes,documentProperties:a.view.documentProperties(),inlineDrawingLayout:a.inlineDrawingLayout,drawingTokenForParagraph:a.drawingTokenForParagraph,drawingLayoutEpoch:a.drawingLayoutEpoch,projectionTokenForParagraph:s=>a.linkProjectors.tokenForParagraphForPart(r,s),projectionTokenForTable:s=>a.linkProjectors.tokenForTableForPart(r,s),projectionEpoch:a.linkProjectors.epochForPart(r),notes:o,displayMode:a.displayMode,revisionAuthorFilter:a.revisionAuthorFilter};return Ue(a.view.part(),a.revision,i)}var Ut=65536;function bt(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function Gt(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function Yt(e,t,r){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===r:true}function Xt(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let r=null;return za(e,n=>{if(r||!Yt(t,n.story,n.noteScopeId))return;let o=n.story==="header"||n.story==="footer"?a=>ua$1(a,n.origin,{x:e.box.x,y:e.box.y}):void 0;Da(n.host,(a,i)=>{if(r||i.textboxDepth===0)return;let s=i.textboxPath.map(c=>c.drawingNodeId);Gt(s,t.textboxPath)&&(r=bt(e,i.storyOrigin));},n.origin,o);}),r}function qt(e,t){if(t.story==="textbox")return Xt(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?ef(e,e.header.box):{x:0,y:0};case "footer":return e.footer?ef(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let n=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return n?ef(e,n.box):{x:0,y:0}}case "note-separator":{let r=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes,n=r?.separator?.box;return r?.continuationNotice&&Da(r.continuationNotice,o=>{o.paragraphId===t.source.start.paragraphId&&(n=r.continuationNotice.box);}),n?ef(e,n):{x:0,y:0}}default:return {x:0,y:0}}}function Pt(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function vt(e,t){let r=df(e);return Object.freeze({x:r.x+t.x,y:r.y+t.y,width:t.width,height:t.height})}function Jt(e,t){let r=jf(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!r||r.pageIndex!==t.pageIndex)return;let n=e.pages[r.pageIndex];if(!n)return;let o=qt(n,t),a=Object.freeze([Pt({x:r.x+o.x,y:r.y+o.y,width:0,height:r.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>vt(n,i)))})}function Qt(e,t,r){let n=r.filter(i=>i.pageIndex===t.pageIndex);if(n.length===0)return St(t)?Jt(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(n.map(i=>Pt(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>vt(o,i)))})}function St(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function xt(e,t){return `${e}\0${t}`}function Zt(e,t,r){let n=Math.max(e.start,t.offset),o=Math.min(e.end,r.offset);return o>n?{start:n,end:o}:null}function er(e,t){let r=new Map,n=new Map,o=new Set,a=0;let i=(s,c)=>{if(a>=Ut)return false;a+=1;let h=xt(s.pageIndex,c),p=n.get(h);return p?p.push(s):n.set(h,[s]),true};for(let[s,c]of t.entries())for(let[h,p]of c.occurrences.entries()){if(St(p)||p.source.start.paragraphId!==p.source.end.paragraphId)continue;o.add(p.pageIndex);let d=`${s}\0${h}`,y={paragraphId:p.source.start.paragraphId,offset:p.source.start.offset},g={paragraphId:p.source.end.paragraphId,offset:p.source.end.offset},w=y.offset<=g.offset?{from:y,to:g}:{from:g,to:y};i({key:d,from:w.from,to:w.to,pageIndex:p.pageIndex},w.from.paragraphId);}if(n.size===0)return r;for(let s of e.pages)o.has(s.index)&&za(s,c=>{let h=c.story==="header"||c.story==="footer"?p=>ua$1(p,c.origin,{x:s.box.x,y:s.box.y}):void 0;Da(c.host,(p,d)=>{let y=bt(s,d.storyOrigin);for(let g of p.lines)for(let w of Ja$1(g)){let l=n.get(xt(s.index,w.paragraphId));if(l)for(let m of l){let b=Zt(w,m.from,m.to);if(!b)continue;let x=_e(g,b.start,void 0,w),v=_e(g,b.end,void 0,w,b.end>b.start),I=r.get(m.key)??[];I.push({pageIndex:s.index,x:Math.min(x,v)+y.x,y:g.box.y+y.y,width:Math.abs(v-x),height:g.box.height}),r.set(m.key,I);}}},c.origin,h);});return r}function It(e,t){let r=false;for(let o of t)if(o.occurrences.length!==0){r=true;break}if(!r)return t;let n=er(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,c)=>{let h=`${a}\0${c}`,p=Qt(e,s,n.get(h)??[]);return p?{...s,geometry:p}:s});return {...o,occurrences:Object.freeze(i)}})}function tr(e){let t=new Map,r=[{node:e.root,depth:0}];for(;r.length>0;){let{node:n,depth:o}=r.pop();if(!(n.kind==="textValue"||o>64)){n.kind==="paragraph"&&!t.has(n.id)&&t.set(n.id,t.size);for(let a=n.children.length-1;a>=0;a-=1)r.push({node:n.children[a],depth:o+1});}}return t}function Rt(){let e=new Map,t=n=>{let o=e.get(n.root);if(o)return o;let a=tr(n);return e.set(n.root,a),a},r={retainRevisionItems:false,revisionSites:fj,locations:La,commentAnchors:Jh,deepOrder:t};return Object.freeze({collectReviewItems:n=>Pa(n,r),deepParagraphOrderOfPart:t})}function rr(e,t){if(t)return true;let r=e.map(n=>n.root);for(;r.length>0;){let n=r.pop();if(dj(n))return true;if(n.kind!=="textValue")for(let o of n.children)r.push(o);}return false}function nr(e,t){let r=[],n=new Set([t.name]),o=a=>{!a||n.has(a.name)||(n.add(a.name),r.push(a));};for(let a of Re(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(Lg(e,"footnote")),o(Lg(e,"endnote")),r}function or(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return Lg(e,"footnote")?.name??null;case "endnote":return Lg(e,"endnote")?.name??null;case "note-separator":return Lg(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function ar(e,t){let r=new Map;for(let n of e){let o=t.get(n.partName),a=o?.get(n.start.paragraphId),i=o?.get(n.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),c=Math.max(a,i),h=r.get(n.partName);r.set(n.partName,{lower:Math.min(h?.lower??s,s),upper:Math.max(h?.upper??c,c)});}return r}function ir(e,t,r,n,o){let a=new Map(r.map(d=>[d.name,o(d)])),i=ar(n,a),s=new Map,c=new Map,h=(d,y,g,w,l,m,b)=>{let x=a.get(d)?.get(l),v=i.get(d);if(x===void 0||!v||x<v.lower||x>v.upper)return;let I=s.get(d)??new Map;s.set(d,I);let V=c.get(d)??new Map;c.set(d,V);let W=JSON.stringify([y.story,y.noteScopeId,y.noteAreaKind]),K=g==="textbox"?JSON.stringify([W,"textbox",w]):W,$=I.get(l)??[],j=`${l}\0${y.page.index}\0${K}`,T=V.get(j);T||(T={pageIndex:y.page.index,story:g,rootStory:y.story,textboxPath:w,noteScopeId:y.noteScopeId,noteAreaKind:y.noteAreaKind,laneKey:K,intervals:[],intervalKeys:new Set},V.set(j,T),$.push(T),I.set(l,$));let U=`${m}\0${b}`;T.intervalKeys?.has(U)||(T.intervalKeys?.add(U),T.intervals.push({start:m,end:b}));};Aa(e,d=>{let y=or(t,d);!y||!i.has(y)||Da(d.host,(g,w)=>{let l=w.textboxDepth>0?"textbox":d.story,m=w.textboxPath.map(x=>x.drawingNodeId),b=[];for(let x of g.lines){for(let v of x.spans)b.push(v.range);for(let v of x.drawings??[])b.push({paragraphId:v.paragraphId,start:v.start,end:v.start+1});}b.length===0&&b.push({paragraphId:g.range.paragraphId,start:g.range.start,end:g.range.end});for(let{paragraphId:x,start:v,end:I}of b)h(y,d,l,m,x,v,I);});}),Ca(e,d=>{let y=d.drawing.ownerPartName;d.drawing.accessibility.hidden||!i.has(y)||h(y,d.root,d.story,d.textboxPath.map(g=>g.drawingNodeId),d.drawing.paragraphId,d.drawing.start,d.drawing.start+1);});for(let d of s.values())for(let y of d.values())for(let g of y){g.intervals.sort((l,m)=>l.start-m.start||l.end-m.end);let w=[];for(let l of g.intervals){let m=w.at(-1);m&&l.start<=m.end?m.end=Math.max(m.end,l.end):w.push({...l});}g.intervals.splice(0,g.intervals.length,...w),g.intervalKeys=void 0;}let p=new Map;for(let[d,y]of s){let g=a.get(d);if(!g)continue;let w=[];for(let[l,m]of y){let b=g.get(l);b!==void 0&&w.push({paragraphId:l,position:b,laneKeys:new Set(m.map(({laneKey:x})=>x))});}w.sort((l,m)=>l.position-m.position),p.set(d,w);}return {byPart:s,orderByPart:a,visibleByPart:p}}function Ot(e,t){let r=0,n=e.length;for(;r<n;){let o=r+n>>>1;e[o].position<t?r=o+1:n=o;}return r}function sr(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let r=t.orderByPart.get(e.partName),n=t.visibleByPart.get(e.partName),o=r?.get(e.start.paragraphId),a=r?.get(e.end.paragraphId);if(!r||!n||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),c=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:d})=>d)??[]),h=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:d})=>d)??[]),p=new Set([...c].filter(d=>h.has(d)));return p.size===0?[e.start.paragraphId,e.end.paragraphId]:n.slice(Ot(n,i),Ot(n,s+1)).filter(d=>[...d.laneKeys].some(y=>p.has(y))).map(d=>d.paragraphId)}function cr(e,t,r,n){return n?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,r)};return a.end>a.start?[a]:[]})}function dr(e,t){let r=Number.NEGATIVE_INFINITY;for(let n of e)for(let o of n.intervals)r=Math.max(r,o.end);return t!==r?new Set:new Set(e.filter(n=>n.intervals.some(o=>o.end===r)))}function kt(e,t,r){let n=[],o=new Set;for(let[a,i]of e.entries()){let s=r===void 0?void 0:r===null?"neutral":a<r?"replaced":"replacement";for(let c of sr(i,t)){let h=t.byPart.get(i.partName)?.get(c)??[],d=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,y=c===i.start.paragraphId?i.start.offset:0,g=c===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,w=d?dr(h,y):new Set;for(let l of h){let m=cr(l,y,g,d);d&&m.length===0&&w.has(l)&&(m=[{start:y,end:y}]);for(let b of m){let x=`${l.pageIndex}\0${l.story}\0${l.noteScopeId??""}\0${l.noteAreaKind??""}\0${l.textboxPath.join("\0")}\0${i.partName}\0${c}\0${b.start}\0${b.end}\0${s??""}`;o.has(x)||(o.add(x),n.push({pageIndex:l.pageIndex,physicalPageNumber:l.pageIndex+1,story:l.story,rootStory:l.rootStory,textboxPath:l.textboxPath,noteScopeId:l.noteScopeId,noteAreaKind:l.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:c,offset:b.start},end:{paragraphId:c,offset:b.end}}}));}}}}return n}function Dt(e,t){let r=2166136261,n=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);r=Math.imul(r^a,16777619)>>>0,n=Math.imul(n^a+o,2246822507)>>>0,n^=n>>>13;}return `${e}_${t.length.toString(36)}_${r.toString(36)}_${n.toString(36)}`}function Mt(e,t,r=Dt){let n=new Map;for(let a of t){let i=r(e,a),s=n.get(i)??new Set;s.add(a),n.set(i,s);}let o=new Map;for(let[a,i]of n){let s=[...i].sort();for(let[c,h]of s.entries())o.set(h,s.length===1?a:`${a}_${c.toString(36)}`);}return o}function ur(e){let t=new Set,r=new Set;for(let n of e){if(n.kind==="comment"){t.add(n.id),n.parentId!==void 0&&t.add(n.parentId),n.parentRevisionId!==void 0&&r.add(n.parentRevisionId);for(let o of n.replyIds)t.add(o);}if(n.kind==="revision"){r.add(n.id),n.pairedWith!==void 0&&r.add(n.pairedWith);for(let o of n.replyIds)t.add(o);}}return {comment:Mt("comment",t),revision:Mt("change",r)}}function B(e,t,r){return e.get(r)??Dt(t,r)}function lr(e,t,r){return e.kind==="revision"?{kind:"tracked-change",id:B(r.revision,"change",e.id),change:e.revisionKind,...e.structuralChanges?{structuralChanges:e.structuralChanges}:{},...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:$a(e.text),replacedText:$a(e.replacedText),nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:B(r.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(n=>B(r.comment,"comment",n)),occurrences:t?kt(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:B(r.comment,"comment",e.id),author:e.comment.author,initials:Ja(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:Ha(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:B(r.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:B(r.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(n=>B(r.comment,"comment",n)),orphaned:e.orphaned,occurrences:t&&e.range?kt([e.range],t):[]}}function Et(e,t){let r=t.parts.get(t.mainDocumentPart);if(!r)return [];let n=nr(t,r),o=[r,...n],a=t.parts.get(ea(t,r.name));if(!rr(o,a))return [];let i=Rt(),s=i.collectReviewItems({storyPart:r,furnitureParts:n,commentsPart:a,commentsExtendedPart:t.parts.get(fa$1(t,r.name))});if(s.length===0)return [];let c=s.flatMap(d=>ua(d)),h=c.length>0?ir(e,t,o,c,i.deepParagraphOrderOfPart):null,p=ur(s);return s.map(d=>lr(d,h,p)).filter(d=>d!==null)}var pr=new Set(["part","validatedHandle"]);function Lt(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function q(e,t,r,n,o){if(!(n!==void 0&&pr.has(n))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(r.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),r.add(e);try{if(Array.isArray(e)){for(let a of e)q(a,t,r,void 0,o);Object.freeze(e);return}if(!Lt(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");q(i.value,t,r,a,o);}}Object.freeze(e);}finally{r.delete(e);}}}}}function At(e){if(!Lt(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let n of e.pages)if(!(n===null||typeof n!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(n,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),q(i,new Set,s,o),t.add(i);}let r=(n,o)=>{let a=new Set;for(let i of n){let s=new Set;s.add(e),q(i,a,s,void 0,o);}Object.freeze(n);};for(let n of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,n);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(n==="pages"&&Array.isArray(o.value)){r(o.value,t);continue}if(n==="reviewArtifacts"&&Array.isArray(o.value)){r(o.value);continue}let a=new Set;a.add(e),q(o.value,new Set,a,n);}return Object.freeze(e),e}var mr=Object.freeze([]),k=class extends Error{constructor(r,n,o){super(n,o);this.code=r;this.name="ExportResourceError";}code};function fr(e){try{return e instanceof k}catch{return false}}function yr(e){try{return e instanceof ke}catch{return false}}function gr(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function hr(e){if(fr(e))return e;let t=yr(e),r=gr(e),n=r?`: ${r}`:"",o=new k(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${n}`:`Export layout failed${n}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function wr(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Ft(e){if(e==="all-markup"||e==="simple-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, simple-markup, proposed, or original")}var xr=50,ye=64;function br(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Pr(e){let t=false;return Ca(e,({drawing:r})=>{br(r.resource)&&(t=true);}),t}function Tt(e){return !ArrayBuffer.isView(e)}function Kn(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};if(t.revisionAuthorSlots!==void 0&&(!t.revisionAuthorSlots||typeof t.revisionAuthorSlots!="object"||Array.isArray(t.revisionAuthorSlots)))throw new TypeError("revisionAuthorSlots must map author names to nonnegative safe integers.");let r=t.revisionAuthorSlots===void 0?void 0:Object.freeze(Object.fromEntries(Object.entries(t.revisionAuthorSlots).map(([f,P])=>{if(!Number.isSafeInteger(P)||P<0)throw new TypeError("revisionAuthorSlots values must be nonnegative safe integers.");return [f,P]}))),n=t.revisionMarkup?Ta(t.revisionMarkup):void 0,o=n?{revisionMarkup:n,hiddenAuthors:new Set,cacheKey:JSON.stringify(n)}:void 0,a=Ft(t.displayMode??Xa),i=Tt(e),s=Tt(e)?{ok:true,view:e}:ab(e);if(!s.ok)return s;let c=s.view,h=t.reuseAcrossRevisions??i,p=wr(t.resourceTimeoutMs),d=t.measurer??fa(),y=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),g=nb({retainAcrossPasses:h}),w=0,l=new Set,m=()=>{w+=1;for(let f of l)f();l.clear();},b=ud({session:c,decodePort:t.imageDecodePort??pt(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:m}),x={view:c,measurer:d,paragraphCache:g,sessions:new Map,completed:new Map,inFlight:new Map,styles:sd(c),fieldLinks:new Map,links:re(c),drawingBundle:b,furniture:new Map},v=new AbortController,I=t.signal,V=false,W=()=>V?new k("aborted","Export resource settlement was aborted"):new k("disposed","Export session has been disposed"),K=()=>{V=true,$();};function $(){let f=x;if(f){x=null,I?.removeEventListener("abort",K),v.abort(I?.reason),f.drawingBundle.dispose(),f.paragraphCache.clear();for(let P of f.completed.values())hd(P.internal),te(P.internal);for(let P of f.fieldLinks.values())P.registry.clear();f.fieldLinks.clear(),f.completed.clear(),f.inFlight.clear(),f.furniture.clear(),f.sessions.clear(),m();}}I?.addEventListener("abort",K,{once:true}),I?.aborted&&K();let j=()=>{if(!x)throw W();if(v.signal.aborted)throw new k("aborted","Export resource settlement was aborted")},T=(f,P,D,u)=>w!==f||x?.view.packageRevision()!==P||x?.view.currentPackage()!==D?Promise.resolve():(j(),new Promise((_,O)=>{let M=false,C,E=A=>{M||(M=true,C!==void 0&&clearTimeout(C),l.delete(L),v.signal.removeEventListener("abort",G),A?O(A):_());},L=()=>E(),G=()=>E(new k("aborted","Export resource settlement was aborted")),Y=()=>{if(x?.view.packageRevision()!==P||x?.view.currentPackage()!==D){E();return}let A=u-Date.now();if(A<=0){E(new k("timedOut",`Image resources did not settle within ${p}ms`));return}C=setTimeout(Y,Math.min(xr,A));};if(l.add(L),v.signal.addEventListener("abort",G,{once:true}),w!==f||x?.view.packageRevision()!==P||x?.view.currentPackage()!==D){E();return}Y();})),U=async(f,P=0,D=Date.now()+p)=>{if(j(),Date.now()>=D)throw new k("timedOut",`Export layout did not stabilize within ${p}ms`);let u=x,_=D,O=u.view.packageRevision(),M=u.view.currentPackage(),C=u.completed.get(f);if(C&&C.revision===O&&C.pkg===M)return C.published;let E=()=>{if(u.view.packageRevision()===O&&u.view.currentPackage()===M)return null;if(P>=ye-1)throw new k("nonConvergent","Document revision did not stabilize during export layout");return U(f,P+1,_)},L=u.fieldLinks.get(f);if(!L||L.revision!==O||L.pkg!==M){let R=L?.registry??se();R.clear(),L={revision:O,pkg:M,registry:R},u.fieldLinks.set(f,L),u.furniture.delete(f);}let G=L.registry,Y=u.sessions.get(f)??Te();u.sessions.set(f,Y);let A=u.furniture.get(f);A||(A=oe({view:u.view,measurer:u.measurer,producer:y,cache:u.paragraphCache,styleCascade:u.styles.styleCascade,numberingIndex:u.styles.numberingIndex,defaultTabStopPt:u.styles.defaultTabStopPt,compatibilityMode:u.styles.compatibilityMode,displayMode:Wa(f),revisionAuthorFilter:f==="simple-markup"?Ya(o):o,showFieldCodes:false,inlineDrawingLayoutForPart:R=>u.drawingBundle.contextForPart(R),drawingLayoutTokenForPart:R=>u.drawingBundle.cacheTokenForPart(R),drawingTokenForParagraphForPart:(R,ae)=>u.drawingBundle.drawingTokenForParagraph(ae,R),linkProjectors:u.links,projectFieldLink:R=>G.project(R)}),u.furniture.set(f,A));for(let R=0;R<ye;R+=1){let ae=w;u.drawingBundle.sync(u.view);let he=E();if(he)return he;let N=ht({view:u.view,revision:u.view.packageRevision(),measurer:u.measurer,cache:u.paragraphCache,session:Y,producer:y,styleCascade:u.styles.styleCascade,defaultTabStopPt:u.styles.defaultTabStopPt,numberingIndex:u.styles.numberingIndex,furniture:A,compatibilityMode:u.styles.compatibilityMode,linkProjectors:u.links,projectFieldLink:S=>G.project(S),inlineDrawingLayout:u.drawingBundle.bodyContext,inlineDrawingLayoutForPart:S=>u.drawingBundle.contextForPart(S),drawingTokenForParagraph:S=>u.drawingBundle.drawingTokenForParagraph(S,u.view.part().name),drawingTokenForParagraphForPart:(S,J)=>u.drawingBundle.drawingTokenForParagraph(J,S),drawingLayoutEpoch:u.drawingBundle.cacheTokenForPart(u.view.part().name),drawingLayoutEpochForPart:S=>u.drawingBundle.cacheTokenForPart(S),displayMode:Wa(f),revisionAuthorFilter:f==="simple-markup"?Ya(o):o,showFieldCodes:false});if(!Pr(N)){let S=E();if(S)return S;h||(hd(N),te(N),u.paragraphCache.clear(),u.sessions.delete(f),u.furniture.delete(f));let J=Et(N,M),Ct=J.length===0?mr:Object.freeze(It(N,J)),Nt=lt(u.view,N),jt={...N,...Nt,reviewDisplayMode:f,...n?{revisionMarkup:n}:{},...r?{revisionAuthorSlots:r}:{},facingPages:[...M.parts.values()].some(Pe=>Pe.root.localName==="settings"&&Pe.root.children.some(Q=>Q.kind!=="textValue"&&(Q.localName==="mirrorMargins"||Q.localName==="evenAndOddHeaders")&&!Q.attributes.some(ve=>ve.localName==="val"&&["0","false","off"].includes(ve.value)))),contentWarnings:gt(u.view),reviewArtifacts:Ct},be=At(jt);return u.completed.set(f,{revision:O,pkg:M,internal:N,published:be}),be}let we=ae;for(;u.drawingBundle.pendingResourceCount()>0;){await T(we,O,M,_),we=w,j();let S=E();if(S)return S}j();let xe=E();if(xe)return xe}throw new k("nonConvergent",`Image resources did not reach quiescence after ${ye} layout passes`)},ge=f=>{let P;try{P=Ft(f);}catch(O){return Promise.reject(O)}if(!x)return Promise.reject(W());let D=x,u=D.inFlight.get(P);if(u)return u;let _=U(P).catch(O=>{throw hr(O)}).finally(()=>D.inFlight.delete(P));return D.inFlight.set(P,_),_};return {ok:true,session:{layout:()=>ge(a),layoutFor:ge,validatedImageBytes(f){let P=x;return !P||f.resource.kind!=="ready"?null:P.drawingBundle.mintValidatedBytes(f.resource.validatedHandle,f.resource.contentId)?.slice()??null},dispose:$}}}export{ht as a,Or as b,pt as c,k as d,Kn as e};
@@ -1 +1 @@
1
- 'use strict';var chunkSUN62YU6_cjs=require('./chunk-SUN62YU6.cjs'),chunkANZ44KQT_cjs=require('./chunk-ANZ44KQT.cjs');var z=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,J=128,Q=/[\u0000-\u001F\u007F-\u009F]/,G=16,nn=2,en=3276;function V(e){return e.kind!=="textValue"}function P(e,n){for(let t of e.children)if(V(t)&&t.localName===n)return t}function O(e,n){return e.attributes.find(t=>t.localName===n)?.value}function D(e){return e===void 0||e.length===0||e.length>J||Q.test(e)?null:e}function v(e,n){let t=chunkSUN62YU6_cjs._a(O(e,"asciiTheme"),n)??chunkSUN62YU6_cjs._a(O(e,"hAnsiTheme"),n);if(t!==null)return t;let l=O(e,"ascii")??O(e,"hAnsi");return l===void 0?null:z.test(l)?l:null}function C(e,n){let t=chunkSUN62YU6_cjs._a(O(e,"eastAsiaTheme"),n);if(t!==null)return t;let l=O(e,"eastAsia");return l===void 0?null:z.test(l)?l:null}function tn(e){return e!==void 0&&z.test(e)?e:null}function On(e){return tn(e)}function ln(e){return e!==void 0&&["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(n=>!!O(e,n))}function Y(e,n){if(!e)return {fontFamily:null,fontSizeHalfPoints:null,hasLatinFontReference:false};let t=P(e,"rFonts"),l=P(e,"sz"),i=l?O(l,"val"):void 0,r=i!==void 0&&/^\d{1,4}$/.test(i)?Number(i):null;return {fontFamily:t?v(t,n):null,hasLatinFontReference:ln(t),fontSizeHalfPoints:r!==null&&r>=nn&&r<=en?r:null}}function Sn(e,n){let t=new Map,l={fontFamily:null,fontSizeHalfPoints:null,hasLatinFontReference:false};if(e){let a=P(e,"docDefaults"),s=a?P(a,"rPrDefault"):void 0;l=Y(s?P(s,"rPr"):void 0,n);for(let u of e.children){if(!V(u)||u.localName!=="style")continue;let o=D(O(u,"styleId"));if(o===null||t.has(o))continue;let f=P(u,"basedOn");t.set(o,{basedOn:D(f?O(f,"val"):void 0),own:Y(P(u,"rPr"),n)});}}let i=new Map,r=a=>{let s=a??"",u=i.get(s);if(u)return u;let o=null,f=null,m=l.hasLatinFontReference,b=new Set,y=a;for(let I=0;y!==null&&I<G&&!b.has(y);I+=1){b.add(y);let E=t.get(y);if(!E)break;o??=E.own.fontFamily,m||=E.own.hasLatinFontReference,f??=E.own.fontSizeHalfPoints,y=E.basedOn;}let g={hasLatinFontReference:m,fontFamily:o??l.fontFamily,fontSizeHalfPoints:f??l.fontSizeHalfPoints};return i.set(s,g),g};return (a,s)=>{let u=r(a),o=s?.find(b=>b.localName==="rFonts"),f=o?chunkSUN62YU6_cjs._a(o.attributes?.asciiTheme,n)??chunkSUN62YU6_cjs._a(o.attributes?.hAnsiTheme,n):null,m=["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(b=>!!o?.attributes?.[b]);return {fontFamily:f??u.fontFamily??(!u.hasLatinFontReference&&!m?n.minor:null),fontSizeHalfPoints:u.fontSizeHalfPoints}}}var an=16,on=16,rn=32,sn=4096;function x(e){return e.kind!=="textValue"}function c(e,n){for(let t of e.children)if(x(t)&&t.localName===n)return t}function M(e,n){return e.attributes.find(t=>t.localName===n)?.value}function un(e){return e==="1"||e==="true"||e==="on"}function H(){return {families:new Map,styleIds:new Set,anyText:false,bareParagraph:false,bareRun:false,bareTable:false}}function _(e,n){for(let[t,l]of n.families)e.families.has(t)||e.families.set(t,l);for(let t of n.styleIds)e.styleIds.add(t);e.anyText||=n.anyText,e.bareParagraph||=n.bareParagraph,e.bareRun||=n.bareRun,e.bareTable||=n.bareTable;}function T(e,n){if(n===null)return;let t=n.toLowerCase();e.has(t)||e.set(t,n);}var fn=new Set(["tab","noBreakHyphen","softHyphen","footnoteRef","endnoteRef","footnoteReference","endnoteReference"]),dn=128;function cn(e){for(let n of e.attributes)if(n.localName==="font"&&!(n.namespaceUri!==chunkANZ44KQT_cjs.fa&&n.namespaceUri!==""))return n.value.length>0&&n.value.length<=dn;return false}function $(e,n){if(n?.has(e.id))return true;for(let t of e.children)if(!(!x(t)||t.namespaceUri!==chunkANZ44KQT_cjs.fa)){if(fn.has(t.localName))return true;if(t.localName==="sym"){if(!cn(t))return true;continue}if(!(t.localName!=="t"&&t.localName!=="delText")){for(let l of t.children)if(!x(l)&&l.value.length>0)return true}}return false}function mn(e){for(let n of e.children)if(!(!x(n)||n.namespaceUri!==chunkANZ44KQT_cjs.fa)&&!(n.localName!=="t"&&n.localName!=="delText")){for(let t of n.children)if(!x(t))for(let l of t.value){let i=l.codePointAt(0);if(i>=4352&&i<=4607||i>=11904&&i<=40959||i>=43360&&i<=43391||i>=44032&&i<=55295||i>=63744&&i<=64255||i>=65072&&i<=65103||i>=65280&&i<=65519||i>=131072&&i<=262143)return true}}return false}function K(e,n){let t=[e];for(;t.length>0;){let l=t.pop();if(x(l)){if(n?.has(l.id))return true;if(l.localName==="r"&&l.namespaceUri===chunkANZ44KQT_cjs.fa){if($(l,n))return true;continue}for(let i of l.children)t.push(i);}}return false}function yn(e,n,t,l){if(!$(e,l))return;n.anyText=true;let i=c(e,"rPr"),r=i?c(i,"rFonts"):void 0;r&&(T(n.families,v(r,t)),mn(e)&&T(n.families,C(r,t)));let a=i?c(i,"rStyle"):void 0,s=D(a?M(a,"val"):void 0);s!==null?n.styleIds.add(s):n.bareRun=true;}function gn(e,n,t){if(!t)return;n.anyText=true;let l=e.localName==="tbl",i=c(e,l?"tblPr":"pPr"),r=i?c(i,l?"tblStyle":"pStyle"):void 0,a=D(r?M(r,"val"):void 0);a!==null?n.styleIds.add(a):l?n.bareTable=true:n.bareParagraph=true;}function X(e){return (e.localName==="p"||e.localName==="tbl")&&e.namespaceUri===chunkANZ44KQT_cjs.fa}function U(e,n,t,l,i){e.namespaceUri===chunkANZ44KQT_cjs.fa&&(i?.has(e.id)&&e.localName==="fldSimple"&&(n.anyText=true,n.bareRun=true),e.localName==="r"?yn(e,n,t,i):X(e)&&gn(e,n,l));}var W=new WeakMap;function q(e,n,t){let l=W.get(e);if(l&&l.major===n.major&&l.minor===n.minor&&l.majorEastAsia===n.majorEastAsia&&l.minorEastAsia===n.minorEastAsia&&l.majorBidi===n.majorBidi&&l.minorBidi===n.minorBidi)return l.summary;let i=H();if(e.children.length>=on&&t<rn){for(let r of e.children)x(r)&&_(i,q(r,n,t+1));U(e,i,n,i.anyText);}else {let r=[e];for(;r.length>0;){let a=r.pop();if(!x(a))continue;let s=X(a)&&K(a);U(a,i,n,s);for(let u=a.children.length-1;u>=0;u-=1)r.push(a.children[u]);}}return W.set(e,{major:n.major,minor:n.minor,majorEastAsia:n.majorEastAsia,minorEastAsia:n.minorEastAsia,majorBidi:n.majorBidi,minorBidi:n.minorBidi,summary:i}),i}var xn={docDefaultFamilies:[],defaultParagraph:null,defaultCharacter:null,defaultTable:null,chainFamilies:()=>[]},Z=new WeakMap;function w(e,n){let t=c(e,"rPr"),l=t?c(t,"rFonts"):void 0;return l?v(l,n):null}function k(e,n){let t=c(e,"rPr"),l=t?c(t,"rFonts"):void 0;return l?C(l,n):null}function hn(e,n){let t=new Map,l=null,i=null,r=null,a=null,s=null,u=c(e,"docDefaults"),o=u?c(u,"rPrDefault"):void 0;o&&(l=w(o,n),i=k(o,n));let f=o?c(o,"rPr"):void 0,m=f?c(f,"rFonts"):void 0;m&&["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(d=>!!M(m,d))||(l??=n.minor);let y=0;for(let d of e.children){if(!x(d)||d.localName!=="style")continue;if(y>=sn)break;y+=1;let h=D(M(d,"styleId"));if(h===null)continue;let S=c(d,"basedOn"),F=[];for(let p of d.children){if(!x(p)||p.localName!=="tblStylePr")continue;let L=w(p,n);L!==null&&F.push(L);let R=k(p,n);R!==null&&F.push(R);}t.set(h,{basedOn:D(S?M(S,"val"):void 0),family:w(d,n),eastAsiaFamily:k(d,n),conditionalFamilies:F});let A=un(M(d,"default")),j=M(d,"type");j==="paragraph"?A?r=h:r===h&&(r=null):j==="character"?A?a=h:a===h&&(a=null):j==="table"&&(A?s=h:s===h&&(s=null));}let g=new Map,I=d=>{if(d===null)return [];let h=g.get(d);if(h)return h;let S=[],F=null,A=null,j=new Set,p=d;for(let L=0;p!==null&&L<an&&!j.has(p);L+=1){j.add(p);let R=t.get(p);if(!R)break;F??=R.family,A??=R.eastAsiaFamily,S.push(...R.conditionalFamilies),p=R.basedOn;}return F!==null&&S.unshift(F),A!==null&&S.unshift(A),g.set(d,S),S};return {docDefaultFamilies:[l,i].filter(d=>d!==null),defaultParagraph:r,defaultCharacter:a,defaultTable:s,chainFamilies:I}}function bn(e,n){if(!e)return {...xn,docDefaultFamilies:n.minor?[n.minor]:[]};let t=Z.get(e);if(t&&t.major===n.major&&t.minor===n.minor&&t.majorEastAsia===n.majorEastAsia&&t.minorEastAsia===n.minorEastAsia&&t.majorBidi===n.majorBidi&&t.minorBidi===n.minorBidi)return t.index;let l=hn(e,n);return Z.set(e,{major:n.major,minor:n.minor,majorEastAsia:n.majorEastAsia,minorEastAsia:n.minorEastAsia,majorBidi:n.majorBidi,minorBidi:n.minorBidi,index:l}),l}function En(e,n,t,l){let i=H(),r=new Map;for(let o of e){let f=H();for(let m of o.children){if(!x(m))continue;if(!l||l.size===0){_(f,q(m,t,0));continue}let b=H(),y=[m];for(;y.length>0;){let g=y.pop();if(!x(g))continue;let I=X(g)&&K(g,l);U(g,b,t,I,l);for(let E=g.children.length-1;E>=0;E-=1)y.push(g.children[E]);}_(f,b);}_(i,f);for(let m of f.families.values())T(r,m);}let a=bn(n,t),s=new Map;for(let o of i.styleIds)for(let f of a.chainFamilies(o))T(s,f);if(i.bareParagraph)for(let o of a.chainFamilies(a.defaultParagraph))T(s,o);if(i.bareRun)for(let o of a.chainFamilies(a.defaultCharacter))T(s,o);if(i.bareTable)for(let o of a.chainFamilies(a.defaultTable))T(s,o);if(i.anyText)for(let o of a.docDefaultFamilies)T(s,o);for(let o of r.keys())s.delete(o);let u=[...s.values()].sort((o,f)=>o<f?-1:o>f?1:0);return Object.freeze({direct:Object.freeze([...r.values()]),inherited:Object.freeze(u)})}function An(e,n,t){let l=En(e,n,t),i=[...l.direct,...l.inherited];return i.sort((r,a)=>r<a?-1:r>a?1:0),i}exports.a=tn;exports.b=On;exports.c=Sn;exports.d=En;exports.e=An;
1
+ 'use strict';var chunkAVKVRU7Z_cjs=require('./chunk-AVKVRU7Z.cjs'),chunk4KZ6L5YF_cjs=require('./chunk-4KZ6L5YF.cjs');var z=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,J=128,Q=/[\u0000-\u001F\u007F-\u009F]/,G=16,nn=2,en=3276;function V(e){return e.kind!=="textValue"}function P(e,n){for(let t of e.children)if(V(t)&&t.localName===n)return t}function O(e,n){return e.attributes.find(t=>t.localName===n)?.value}function D(e){return e===void 0||e.length===0||e.length>J||Q.test(e)?null:e}function v(e,n){let t=chunkAVKVRU7Z_cjs._a(O(e,"asciiTheme"),n)??chunkAVKVRU7Z_cjs._a(O(e,"hAnsiTheme"),n);if(t!==null)return t;let l=O(e,"ascii")??O(e,"hAnsi");return l===void 0?null:z.test(l)?l:null}function C(e,n){let t=chunkAVKVRU7Z_cjs._a(O(e,"eastAsiaTheme"),n);if(t!==null)return t;let l=O(e,"eastAsia");return l===void 0?null:z.test(l)?l:null}function tn(e){return e!==void 0&&z.test(e)?e:null}function On(e){return tn(e)}function ln(e){return e!==void 0&&["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(n=>!!O(e,n))}function Y(e,n){if(!e)return {fontFamily:null,fontSizeHalfPoints:null,hasLatinFontReference:false};let t=P(e,"rFonts"),l=P(e,"sz"),i=l?O(l,"val"):void 0,r=i!==void 0&&/^\d{1,4}$/.test(i)?Number(i):null;return {fontFamily:t?v(t,n):null,hasLatinFontReference:ln(t),fontSizeHalfPoints:r!==null&&r>=nn&&r<=en?r:null}}function Sn(e,n){let t=new Map,l={fontFamily:null,fontSizeHalfPoints:null,hasLatinFontReference:false};if(e){let a=P(e,"docDefaults"),s=a?P(a,"rPrDefault"):void 0;l=Y(s?P(s,"rPr"):void 0,n);for(let u of e.children){if(!V(u)||u.localName!=="style")continue;let o=D(O(u,"styleId"));if(o===null||t.has(o))continue;let f=P(u,"basedOn");t.set(o,{basedOn:D(f?O(f,"val"):void 0),own:Y(P(u,"rPr"),n)});}}let i=new Map,r=a=>{let s=a??"",u=i.get(s);if(u)return u;let o=null,f=null,m=l.hasLatinFontReference,b=new Set,y=a;for(let I=0;y!==null&&I<G&&!b.has(y);I+=1){b.add(y);let E=t.get(y);if(!E)break;o??=E.own.fontFamily,m||=E.own.hasLatinFontReference,f??=E.own.fontSizeHalfPoints,y=E.basedOn;}let g={hasLatinFontReference:m,fontFamily:o??l.fontFamily,fontSizeHalfPoints:f??l.fontSizeHalfPoints};return i.set(s,g),g};return (a,s)=>{let u=r(a),o=s?.find(b=>b.localName==="rFonts"),f=o?chunkAVKVRU7Z_cjs._a(o.attributes?.asciiTheme,n)??chunkAVKVRU7Z_cjs._a(o.attributes?.hAnsiTheme,n):null,m=["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(b=>!!o?.attributes?.[b]);return {fontFamily:f??u.fontFamily??(!u.hasLatinFontReference&&!m?n.minor:null),fontSizeHalfPoints:u.fontSizeHalfPoints}}}var an=16,on=16,rn=32,sn=4096;function x(e){return e.kind!=="textValue"}function c(e,n){for(let t of e.children)if(x(t)&&t.localName===n)return t}function M(e,n){return e.attributes.find(t=>t.localName===n)?.value}function un(e){return e==="1"||e==="true"||e==="on"}function H(){return {families:new Map,styleIds:new Set,anyText:false,bareParagraph:false,bareRun:false,bareTable:false}}function _(e,n){for(let[t,l]of n.families)e.families.has(t)||e.families.set(t,l);for(let t of n.styleIds)e.styleIds.add(t);e.anyText||=n.anyText,e.bareParagraph||=n.bareParagraph,e.bareRun||=n.bareRun,e.bareTable||=n.bareTable;}function T(e,n){if(n===null)return;let t=n.toLowerCase();e.has(t)||e.set(t,n);}var fn=new Set(["tab","noBreakHyphen","softHyphen","footnoteRef","endnoteRef","footnoteReference","endnoteReference"]),dn=128;function cn(e){for(let n of e.attributes)if(n.localName==="font"&&!(n.namespaceUri!==chunk4KZ6L5YF_cjs.fa&&n.namespaceUri!==""))return n.value.length>0&&n.value.length<=dn;return false}function $(e,n){if(n?.has(e.id))return true;for(let t of e.children)if(!(!x(t)||t.namespaceUri!==chunk4KZ6L5YF_cjs.fa)){if(fn.has(t.localName))return true;if(t.localName==="sym"){if(!cn(t))return true;continue}if(!(t.localName!=="t"&&t.localName!=="delText")){for(let l of t.children)if(!x(l)&&l.value.length>0)return true}}return false}function mn(e){for(let n of e.children)if(!(!x(n)||n.namespaceUri!==chunk4KZ6L5YF_cjs.fa)&&!(n.localName!=="t"&&n.localName!=="delText")){for(let t of n.children)if(!x(t))for(let l of t.value){let i=l.codePointAt(0);if(i>=4352&&i<=4607||i>=11904&&i<=40959||i>=43360&&i<=43391||i>=44032&&i<=55295||i>=63744&&i<=64255||i>=65072&&i<=65103||i>=65280&&i<=65519||i>=131072&&i<=262143)return true}}return false}function K(e,n){let t=[e];for(;t.length>0;){let l=t.pop();if(x(l)){if(n?.has(l.id))return true;if(l.localName==="r"&&l.namespaceUri===chunk4KZ6L5YF_cjs.fa){if($(l,n))return true;continue}for(let i of l.children)t.push(i);}}return false}function yn(e,n,t,l){if(!$(e,l))return;n.anyText=true;let i=c(e,"rPr"),r=i?c(i,"rFonts"):void 0;r&&(T(n.families,v(r,t)),mn(e)&&T(n.families,C(r,t)));let a=i?c(i,"rStyle"):void 0,s=D(a?M(a,"val"):void 0);s!==null?n.styleIds.add(s):n.bareRun=true;}function gn(e,n,t){if(!t)return;n.anyText=true;let l=e.localName==="tbl",i=c(e,l?"tblPr":"pPr"),r=i?c(i,l?"tblStyle":"pStyle"):void 0,a=D(r?M(r,"val"):void 0);a!==null?n.styleIds.add(a):l?n.bareTable=true:n.bareParagraph=true;}function X(e){return (e.localName==="p"||e.localName==="tbl")&&e.namespaceUri===chunk4KZ6L5YF_cjs.fa}function U(e,n,t,l,i){e.namespaceUri===chunk4KZ6L5YF_cjs.fa&&(i?.has(e.id)&&e.localName==="fldSimple"&&(n.anyText=true,n.bareRun=true),e.localName==="r"?yn(e,n,t,i):X(e)&&gn(e,n,l));}var W=new WeakMap;function q(e,n,t){let l=W.get(e);if(l&&l.major===n.major&&l.minor===n.minor&&l.majorEastAsia===n.majorEastAsia&&l.minorEastAsia===n.minorEastAsia&&l.majorBidi===n.majorBidi&&l.minorBidi===n.minorBidi)return l.summary;let i=H();if(e.children.length>=on&&t<rn){for(let r of e.children)x(r)&&_(i,q(r,n,t+1));U(e,i,n,i.anyText);}else {let r=[e];for(;r.length>0;){let a=r.pop();if(!x(a))continue;let s=X(a)&&K(a);U(a,i,n,s);for(let u=a.children.length-1;u>=0;u-=1)r.push(a.children[u]);}}return W.set(e,{major:n.major,minor:n.minor,majorEastAsia:n.majorEastAsia,minorEastAsia:n.minorEastAsia,majorBidi:n.majorBidi,minorBidi:n.minorBidi,summary:i}),i}var xn={docDefaultFamilies:[],defaultParagraph:null,defaultCharacter:null,defaultTable:null,chainFamilies:()=>[]},Z=new WeakMap;function w(e,n){let t=c(e,"rPr"),l=t?c(t,"rFonts"):void 0;return l?v(l,n):null}function k(e,n){let t=c(e,"rPr"),l=t?c(t,"rFonts"):void 0;return l?C(l,n):null}function hn(e,n){let t=new Map,l=null,i=null,r=null,a=null,s=null,u=c(e,"docDefaults"),o=u?c(u,"rPrDefault"):void 0;o&&(l=w(o,n),i=k(o,n));let f=o?c(o,"rPr"):void 0,m=f?c(f,"rFonts"):void 0;m&&["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(d=>!!M(m,d))||(l??=n.minor);let y=0;for(let d of e.children){if(!x(d)||d.localName!=="style")continue;if(y>=sn)break;y+=1;let h=D(M(d,"styleId"));if(h===null)continue;let S=c(d,"basedOn"),F=[];for(let p of d.children){if(!x(p)||p.localName!=="tblStylePr")continue;let L=w(p,n);L!==null&&F.push(L);let R=k(p,n);R!==null&&F.push(R);}t.set(h,{basedOn:D(S?M(S,"val"):void 0),family:w(d,n),eastAsiaFamily:k(d,n),conditionalFamilies:F});let A=un(M(d,"default")),j=M(d,"type");j==="paragraph"?A?r=h:r===h&&(r=null):j==="character"?A?a=h:a===h&&(a=null):j==="table"&&(A?s=h:s===h&&(s=null));}let g=new Map,I=d=>{if(d===null)return [];let h=g.get(d);if(h)return h;let S=[],F=null,A=null,j=new Set,p=d;for(let L=0;p!==null&&L<an&&!j.has(p);L+=1){j.add(p);let R=t.get(p);if(!R)break;F??=R.family,A??=R.eastAsiaFamily,S.push(...R.conditionalFamilies),p=R.basedOn;}return F!==null&&S.unshift(F),A!==null&&S.unshift(A),g.set(d,S),S};return {docDefaultFamilies:[l,i].filter(d=>d!==null),defaultParagraph:r,defaultCharacter:a,defaultTable:s,chainFamilies:I}}function bn(e,n){if(!e)return {...xn,docDefaultFamilies:n.minor?[n.minor]:[]};let t=Z.get(e);if(t&&t.major===n.major&&t.minor===n.minor&&t.majorEastAsia===n.majorEastAsia&&t.minorEastAsia===n.minorEastAsia&&t.majorBidi===n.majorBidi&&t.minorBidi===n.minorBidi)return t.index;let l=hn(e,n);return Z.set(e,{major:n.major,minor:n.minor,majorEastAsia:n.majorEastAsia,minorEastAsia:n.minorEastAsia,majorBidi:n.majorBidi,minorBidi:n.minorBidi,index:l}),l}function En(e,n,t,l){let i=H(),r=new Map;for(let o of e){let f=H();for(let m of o.children){if(!x(m))continue;if(!l||l.size===0){_(f,q(m,t,0));continue}let b=H(),y=[m];for(;y.length>0;){let g=y.pop();if(!x(g))continue;let I=X(g)&&K(g,l);U(g,b,t,I,l);for(let E=g.children.length-1;E>=0;E-=1)y.push(g.children[E]);}_(f,b);}_(i,f);for(let m of f.families.values())T(r,m);}let a=bn(n,t),s=new Map;for(let o of i.styleIds)for(let f of a.chainFamilies(o))T(s,f);if(i.bareParagraph)for(let o of a.chainFamilies(a.defaultParagraph))T(s,o);if(i.bareRun)for(let o of a.chainFamilies(a.defaultCharacter))T(s,o);if(i.bareTable)for(let o of a.chainFamilies(a.defaultTable))T(s,o);if(i.anyText)for(let o of a.docDefaultFamilies)T(s,o);for(let o of r.keys())s.delete(o);let u=[...s.values()].sort((o,f)=>o<f?-1:o>f?1:0);return Object.freeze({direct:Object.freeze([...r.values()]),inherited:Object.freeze(u)})}function An(e,n,t){let l=En(e,n,t),i=[...l.direct,...l.inherited];return i.sort((r,a)=>r<a?-1:r>a?1:0),i}exports.a=tn;exports.b=On;exports.c=Sn;exports.d=En;exports.e=An;
@@ -0,0 +1 @@
1
+ 'use strict';var l=Object.freeze({review:null,collaboration:null,customNodes:Object.freeze([]),customNodePayloadNamespaces:Object.freeze([]),customNodeDiagnostics:Object.freeze([])});function d(o){if(!o||o.length===0)return l;let t=null,i=null,n=[],r=new Set,a=[];for(let e of o){e.review&&t===null&&(t=e.review),e.collaboration&&i===null&&(i=e.collaboration),e.customNodes&&n.push(...e.customNodes);for(let s of e.customNodePayloadNamespaces??[])r.add(s);e.onCustomNodeDiagnostic&&a.push(e.onCustomNodeDiagnostic);}return {review:t,collaboration:i,customNodes:n,customNodePayloadNamespaces:[...r],customNodeDiagnostics:a}}exports.a=d;
@@ -1 +1 @@
1
- var s=Object.freeze({review:null,collaboration:null,customNodes:Object.freeze([]),customNodePayloadNamespaces:Object.freeze([]),customNodeDiagnostics:Object.freeze([])});function d(o){if(!o||o.length===0)return s;let t=null,i=null,n=[],r=new Set,l=[];for(let e of o){e.review&&t===null&&(t=e.review),e.collaboration&&i===null&&(i=e.collaboration),e.customNodes&&n.push(...e.customNodes);for(let a of e.customNodePayloadNamespaces??[])r.add(a);e.onCustomNodeDiagnostic&&l.push(e.onCustomNodeDiagnostic);}return {review:t,collaboration:i,customNodes:n,customNodePayloadNamespaces:[...r],customNodeDiagnostics:l}}export{d as a};
1
+ var l=Object.freeze({review:null,collaboration:null,customNodes:Object.freeze([]),customNodePayloadNamespaces:Object.freeze([]),customNodeDiagnostics:Object.freeze([])});function d(o){if(!o||o.length===0)return l;let t=null,i=null,n=[],r=new Set,a=[];for(let e of o){e.review&&t===null&&(t=e.review),e.collaboration&&i===null&&(i=e.collaboration),e.customNodes&&n.push(...e.customNodes);for(let s of e.customNodePayloadNamespaces??[])r.add(s);e.onCustomNodeDiagnostic&&a.push(e.onCustomNodeDiagnostic);}return {review:t,collaboration:i,customNodes:n,customNodePayloadNamespaces:[...r],customNodeDiagnostics:a}}export{d as a};
@@ -1 +1 @@
1
- 'use strict';var chunkUJL2GDIM_cjs=require('./chunk-UJL2GDIM.cjs'),chunkAGKIHLWQ_cjs=require('./chunk-AGKIHLWQ.cjs'),chunkANZ44KQT_cjs=require('./chunk-ANZ44KQT.cjs');var _e=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function $(e){let n=new Map;for(let t of e)if(Array.isArray(t)){for(let r of t.slice(0,2048)){if(typeof r!="string"||!_e.test(r))continue;let o=r.toLowerCase();if(n.has(o)||n.set(o,r),n.size===2048)break}if(n.size===2048)break}return Object.freeze([...n.values()])}function Ze(e){let n=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(n===void 0||Array.isArray(n)&&n.length===0)?void 0:e}var en=64,ee=Object.freeze({family:"Calibri",sizeHalfPoints:22}),nn=ee;function Ce(e,...n){let t=[e,...n],r=[],o=new Set;for(let a of t)for(let d of a.sources??[]){let c=chunkUJL2GDIM_cjs.h(d.request);o.has(c)||(o.add(c),r.push(d));}let i=[],s=new Set;for(let a of t)for(let d of a.substitutions??[]){let c=chunkUJL2GDIM_cjs.h(d.from);o.has(c)||s.has(c)||(s.add(c),i.push(d));}let u=$(t.map(a=>a.supportedFamilies));return Object.freeze({...u.length?{supportedFamilies:u}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??chunkUJL2GDIM_cjs.a,sources:Object.freeze(r),...i.length>0?{substitutions:Object.freeze(i)}:{},defaultFont:e.defaultFont??ee,...e.language!==void 0?{language:e.language}:{}})}var Me=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function ve(e){let n=e?.defaultFont?.family;return n!==void 0&&Me.test(n)?n:ee.family}var Be="docx-editor.dev/font-resolver",Ae=Symbol.for("docx-editor.dev/font-resolver");function ln(e){let n={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,Ae,n),Object.defineProperty(e,Be,n);}catch(t){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:t})}return e}function un(e){return typeof e=="function"&&e[Ae]===true}var te=class extends RangeError{constructor(t,r,o){super(`Font source ${t.family} (${r} bytes) exceeds the shaping byte ceiling (${o} bytes)`);this.request=t;}request},oe=class extends AggregateError{causes;constructor(n){let t=Object.freeze(n.slice(0,chunkUJL2GDIM_cjs.b*2));super(t,`Font origin rejected all ${t.length} face and substitution candidates`),this.causes=t;}},Y=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function Pe(e,n,t){let r=new Map(e.map(o=>[Y(o),o]));for(let[o,i]of n)r.set(o,i);for(let o of t)r.has(Y(o.to))&&r.set(Y(o.from),o.from);return [...r.values()]}async function cn(e,n,t={}){return Te(e,n,t)}async function dn(e,n,t={}){return Te(e,n,t)}async function Te(e,n,t){let r=t.maxExecutionFontBytes??chunkUJL2GDIM_cjs.a;if(!Number.isSafeInteger(r)||r<=0||r>chunkUJL2GDIM_cjs.a)throw new RangeError("Font execution byte ceiling is outside the supported range");let o=e.map(Le),i,s=[],u=[],a=new Map,d=new Set,c=0,f=[],y=new Set,b=[],T=n.resolvedFaces??[],N=n.defaultFamily;for(let x=0;x<e.length;x+=1){Ne(n.signal);let v=e[x],I=Pe(T,a,f),L;try{let F=o[x],E;if(F){let l=await ke(F,n.signal);if(!l.ok)throw l.cause;E=l.value;}else if(typeof v=="function"){let l=await ke(Promise.resolve(v(De(n,N,I,c))).then(m=>({ok:!0,value:m}),m=>({ok:!1,cause:m})),n.signal);if(!l.ok)throw l.cause;E=l.value;}else E=v;if(E==null)continue;if(typeof E=="function"){V(t,v,x,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}let k="failures"in E?E.failures:void 0,_=[];if(Array.isArray(k)){let l=Math.min(k.length,chunkUJL2GDIM_cjs.b);for(let m=0;m<l;m++)_.push(k[m]);k.length>l&&_.push(new Error("Additional font-origin failures were omitted"));}else k!==void 0&&_.push(k);let R;try{R=qe(E,d,c,y,i?"maxFontBytes"in i&&i.maxFontBytes!==void 0?i.maxFontBytes:chunkUJL2GDIM_cjs.a:void 0,t.reserveOwnedBytes,t.instrumentation,r);}catch(l){for(let m of new Set(_))V(t,v,x,m);throw l}L=R;for(let l of new Set([...R.dropped,..._]))V(t,v,x,l);let O=R.fragment;O.supportedFamilies&&s.push(O.supportedFamilies),b.push(..._);let U=(O.sources??[]).map(l=>(chunkUJL2GDIM_cjs.h(l.request),[Y(l.request),l.request])),g=[...O.substitutions??[]];!i&&"defaultFont"in O&&(N=ve(O)),i||(i=O);let p=new Set(R.sourceKeys);if(p.size>0){f=f.filter(l=>!p.has(chunkUJL2GDIM_cjs.h(l.from)));for(let l of p)y.delete(l);}u.push(...O.sources??[]);for(let l of R.sourceKeys)d.add(l);c+=R.ownedBytes;for(let[l,m]of U)a.set(l,m);for(let l of g)f.push(l),y.add(chunkUJL2GDIM_cjs.h(l.from));}catch(F){if(L?.releaseOwnedBytes?.(),n.signal?.aborted)throw n.signal.reason??F;if(F instanceof G)throw F.cause;V(t,v,x,F);continue}}if(!i)return;let{epoch:P,...D}=Ce({...i,supportedFamilies:$(s),sources:u,substitutions:f});return b.length===0?D:{...D,failures:Object.freeze(b)}}var G=class extends Error{constructor(t){super("Unable to reserve owned font bytes");this.cause=t;this.name="FontOwnershipReservationError";}cause},W=class extends RangeError{};async function ke(e,n){if(!n)return e;Ne(n);let t,r=new Promise((i,s)=>{t=s;}),o=()=>t?.(n.reason);n.addEventListener("abort",o,{once:true});try{return await Promise.race([e,r])}finally{n.removeEventListener("abort",o);}}function Le(e){if(e===null||typeof e!="object")return;let n;try{n=e.then;}catch(t){return Promise.resolve({ok:false,cause:t})}if(typeof n=="function")return Promise.resolve(e).then(t=>({ok:true,value:t}),t=>({ok:false,cause:t}))}function qe(e,n,t,r,o,i,s,u=chunkUJL2GDIM_cjs.a){let a=e.sources??[],d=e.substitutions??[],c="maxFontBytes"in e?e.maxFontBytes:void 0,f="defaultFont"in e?e.defaultFont:void 0,y="epoch"in e?e.epoch:void 0,b="language"in e?e.language:void 0;if(!Array.isArray(a)||!Array.isArray(d))throw new TypeError("Font origin sources and substitutions must be arrays");let T=a.length,N=d.length;if(T>chunkUJL2GDIM_cjs.b)throw new RangeError(`Font source count must not exceed ${chunkUJL2GDIM_cjs.b}`);if(N>chunkUJL2GDIM_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunkUJL2GDIM_cjs.b}`);let P=c??chunkUJL2GDIM_cjs.a;if(!Number.isSafeInteger(P)||P<=0||P>chunkUJL2GDIM_cjs.a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${chunkUJL2GDIM_cjs.a}`);let D=Math.min(o??P,u),x=0,v=[],I=new Set,L=[],F=[];for(let g=0;g<T;g+=1){let p=a[g];try{let l=ne(p.request),m=chunkUJL2GDIM_cjs.h(l);if(n.has(m)||I.has(m))continue;let A=p.availability,w=p.faceIndex,M=p.hash,Z=p.id;if(A!==void 0&&A!=="available"&&A!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(w)||w<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof M!="string"||M.length===0)throw new TypeError("Font source hash must be a non-empty string");let K;if(A!=="forbidden"){if(typeof Z!="string"||Z.length===0)throw new TypeError("Font source id must be a non-empty string");K=p.bytes;let q=chunkUJL2GDIM_cjs.e(K);if(q>D)throw q<=(o??P)?new te(l,q,u):new RangeError(`Font source ${l.family} (${q} bytes) exceeds the effective base byte ceiling (${D} bytes)`);if(n.has(m)||I.has(m))continue;if(t+x+q>chunkUJL2GDIM_cjs.c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${chunkUJL2GDIM_cjs.c}`);x+=q;}else K=new Uint8Array(0);if(n.has(m)||I.has(m))continue;if(n.size+I.size>=chunkUJL2GDIM_cjs.b)throw new W(`Font source count must not exceed ${chunkUJL2GDIM_cjs.b}`);I.add(m),v.push(m),L.push(Object.freeze({request:l,id:Z,bytes:K,hash:M,faceIndex:w,...A?{availability:A}:{}}));}catch(l){if(l instanceof W)throw l;F.push(l);}}let E=new Set,k=[];for(let g=0;g<N;g+=1){let p=d[g];try{let l=ne(p.from),m=ne(p.to);chunkUJL2GDIM_cjs.h(l),chunkUJL2GDIM_cjs.h(m);let A=p.lineMetrics,w=A?Object.freeze({heightEm:A.heightEm,baselineEm:A.baselineEm}):void 0;if(w&&(!Number.isFinite(w.heightEm)||!Number.isFinite(w.baselineEm)||w.heightEm<=0||w.heightEm>4||w.baselineEm<0||w.baselineEm>w.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let M=chunkUJL2GDIM_cjs.h(l);if(n.has(M)||I.has(M)||r.has(M)||E.has(M))continue;E.add(M),k.push(Object.freeze({from:l,to:m,...w?{lineMetrics:w}:{}}));}catch(l){F.push(l);}}if((T>0||N>0)&&L.length===0&&k.length===0&&F.length>0)throw F.length===1?F[0]:new oe(F);let _=r.size;for(let g of I)r.has(g)&&(_-=1);if(_+E.size>chunkUJL2GDIM_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunkUJL2GDIM_cjs.b}`);let R;if(f!==void 0){let g=f.family,p=f.sizeHalfPoints;if(chunkUJL2GDIM_cjs.h({family:g,weight:400,style:"normal"}),!Number.isSafeInteger(p)||p<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");R=Object.freeze({family:g,sizeHalfPoints:p});}if(y!==void 0&&(!Number.isSafeInteger(y)||y<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(b!==void 0&&typeof b!="string")throw new TypeError("Font shaping language must be a string");let O;if(x>0&&i)try{O=i(x);}catch(g){throw new G(g)}let U;try{U=L.map(g=>chunkUJL2GDIM_cjs.f(g,s));}catch(g){throw O?.(),g}return {fragment:Object.freeze({supportedFamilies:$([e.supportedFamilies]),sources:Object.freeze(U),substitutions:Object.freeze(k),...y!==void 0?{epoch:y}:{},...c!==void 0?{maxFontBytes:c}:{},...R?{defaultFont:R}:{},...b!==void 0?{language:b}:{}}),sourceKeys:Object.freeze(v),ownedBytes:x,dropped:Object.freeze(F),releaseOwnedBytes:O}}function ze(e){return !Number.isSafeInteger(e)||e<=0?0:e>chunkUJL2GDIM_cjs.c?chunkUJL2GDIM_cjs.c:e}function De(e,n,t,r){let{committedSourceBytes:o,...i}=e,s=ze(r);return {...i,defaultFamily:n,...t.length>0?{resolvedFaces:t}:{},...s>0?{committedSourceBytes:s}:{}}}function ne(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function Ne(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function V(e,n,t,r){let o;try{typeof n=="function"&&n.name.length>0&&(o=n.name);}catch{}let i=Object.freeze({originIndex:t,...o!==void 0?{originName:o}:{},cause:r});if(e.onOriginFailure)try{let u=e.onOriginFailure(i);Promise.resolve(u).catch(a=>{console.warn("[fonts] font-origin diagnostic callback failed",a);});return}catch(u){console.warn("[fonts] font-origin diagnostic callback failed",u);}let s="";try{r instanceof Error&&r.message.length>0&&(s=`: ${r.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${s}`,r);}function J(e){let n=new WeakMap;return (t,r)=>{let o=new Set;for(let i of t){let s=[{node:i,context:r,next:0}],u=a=>{s.pop();let d=s.at(-1)?.found??o;for(let c of a)d.add(c);};for(;s.length;){let a=s[s.length-1],d=n.get(a.node);if(d?.key===a.context.key){u(d.families);continue}if(!a.children){let y=e(a.node,a.context);a.children=y.children,a.found=new Set(y.families);}let c=a.children[a.next++];if(c){s.push({...c,next:0});continue}let f=[...a.found];f.length<=256?n.set(a.node,{key:a.context.key,families:f}):n.delete(a.node),u(f);}}return [...o]}}function Q(e,n){return e.children.flatMap(t=>t.kind==="textValue"?[]:[{node:t,context:n}])}function je(e,n){let{styles:t,theme:r,supplementalFamilies:o,depth:i}=n;if(e.kind==="table"){let a=chunkUJL2GDIM_cjs.Gd(e,468,i,t),d=[];for(let c of a?.rows??[])for(let f of c.cells){let y={...n,depth:i+1,cellStyle:f.styleFormatting,key:`${n.baseKey}|${i+1}|${JSON.stringify(f.styleFormatting)}`};for(let b of f.blocks)d.push({node:b,context:y});}return {children:d.reverse()}}let s=new Set;if(e.kind==="paragraph"){let a=e.children.find(c=>c.kind==="paragraphProperties"),d=chunkUJL2GDIM_cjs.hc(t,a,n.cellStyle).runProperties;for(let c of chunkUJL2GDIM_cjs.gd(e,d,void 0,(f,y)=>chunkUJL2GDIM_cjs.jc(f,y,t),void 0,void 0,"all-markup",void 0,void 0,r)){if(!c.text||c.fontSlot!=="eastAsia"&&!o.has(c.style.fontFamily??""))continue;let f=chunkAGKIHLWQ_cjs.a((c.fontSlot==="eastAsia"?c.style.fontFamilyEastAsia:c.style.fontFamily)??void 0);f&&s.add(f);}}let u=e.localName==="txbxContent"?{...n,cellStyle:void 0,key:`${n.baseKey}|${i}|undefined`}:n;return {families:[...s],children:Q(e,u).reverse()}}function $e(){let e=J(je),n,t;return (r,o,i)=>{if(!n||t!==o||n.theme!==i){let s=chunkUJL2GDIM_cjs.gc(o,i);t=o,n={key:`${s.cacheToken}|0|undefined`,baseKey:s.cacheToken,styles:s,theme:i,depth:0,supplementalFamilies:new Set([...Object.values(i.majorSupplemental??{}),...Object.values(i.minorSupplemental??{})])};}return e([...r].reverse(),n)}}function bn(e,n,t){return $e()(e,n,t)}function re(e,n){return e.attributes.find(t=>t.localName===n)?.value}var Ue=J((e,n)=>{let t=[];if(e.namespaceUri===chunkANZ44KQT_cjs.fa){if(e.localName==="fldSimple"){let r=chunkUJL2GDIM_cjs.Zc(re(e,"instr")??"")?.font;r&&t.push(r);}if(e.localName==="p")for(let r of Ke(e))t.push(r);}return {families:t,children:Q(e,n)}});function Nn(e){let n=new Map;for(let t of Ue(e,{key:""})){let r=chunkAGKIHLWQ_cjs.a(t);r!==null&&!n.has(r.toLowerCase())&&n.set(r.toLowerCase(),r);}return [...n.values()]}function Ke(e){let n=[],t=chunkUJL2GDIM_cjs.ib(),r=[];for(let o=e.children.length-1;o>=0;o-=1){let i=e.children[o];i.kind!=="textValue"&&r.push({node:i,containerDepth:0});}for(;r.length>0;){let{node:o,containerDepth:i}=r.pop();if(i>=chunkANZ44KQT_cjs.oa||o.namespaceUri===chunkANZ44KQT_cjs.fa&&o.localName==="p")continue;if(o.namespaceUri===chunkANZ44KQT_cjs.fa&&o.localName==="fldChar"){let u=re(o,"fldCharType");u==="begin"?chunkUJL2GDIM_cjs.lb(t):u==="separate"?(t.nesting===1&&Ie(t,n),chunkUJL2GDIM_cjs.nb(t)):u==="end"&&(t.nesting===1&&Ie(t,n),chunkUJL2GDIM_cjs.ob(t));continue}if(o.namespaceUri===chunkANZ44KQT_cjs.fa&&(o.localName==="instrText"||o.localName==="delInstrText")){chunkUJL2GDIM_cjs.mb(t,He(o),o.localName==="delInstrText");continue}if(o.namespaceUri===chunkANZ44KQT_cjs.fa&&o.localName==="fldSimple"){let u=chunkUJL2GDIM_cjs.Zc(re(o,"instr")??"");u?.font&&n.push(u.font);}let s=chunkANZ44KQT_cjs.pa(o,i);for(let u=o.children.length-1;u>=0;u-=1){let a=o.children[u];a.kind!=="textValue"&&r.push({node:a,containerDepth:s});}}return chunkUJL2GDIM_cjs.jb(t),n}function Ie(e,n){let t=chunkUJL2GDIM_cjs.kb(e);if(t.overflow)return;let r=chunkUJL2GDIM_cjs.Zc(t.instruction);r?.font&&n.push(r.font);}function He(e){let n="",t=[...e.children].reverse();for(;t.length>0&&n.length<=256;){let r=t.pop();if(r.kind==="textValue")n+=r.value;else for(let o=r.children.length-1;o>=0;o-=1)t.push(r.children[o]);}return n}var Xe=()=>true;function In(e,n,t,r){if(!n)return [];let o=chunkUJL2GDIM_cjs.jd(n),i=chunkUJL2GDIM_cjs.gc(t,r),s=new Map;for(let u of e)for(let a of Ve(u)){let d=chunkANZ44KQT_cjs.Jc(a.children),c=f=>{if(f)for(let y of f.values())for(let b of [y.markerStyle.fontFamily,y.markerStyle.fontFamilyEastAsia]){let T=chunkAGKIHLWQ_cjs.a(b??void 0);if(T===null)continue;let N=T.toLowerCase();s.has(N)||s.set(N,T);}};c(chunkUJL2GDIM_cjs.xc(d,o,i,Xe));for(let f of d){let y=chunkUJL2GDIM_cjs.ge(f);for(let b of y.contents)c(chunkUJL2GDIM_cjs.fe(b,o,i));}}return [...s.values()].sort((u,a)=>u.localeCompare(a))}function Ve(e){if(e.localName==="document"){for(let n of e.children)if(n.kind!=="textValue"&&n.localName==="body")return [n];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let n=[];for(let t of e.children)t.kind!=="textValue"&&(t.localName==="footnote"||t.localName==="endnote")&&n.push(t);return n}return [e]}var Ye={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function Bn(e,n){let t=[],r=[],o=0;for(let i of e){let s=i.bytes.byteLength;if(!Number.isSafeInteger(s)||s>n||s>chunkUJL2GDIM_cjs.a||s>chunkUJL2GDIM_cjs.c-o){r.push(i);continue}o+=s,t.push(i);}return {sources:t,dropped:r}}function Pn(e,n,t){let r=n.reduce((i,s)=>i+s.bytes.byteLength,0),o=new Set(n.filter(i=>i.request.family.trim().length>0).map(i=>chunkUJL2GDIM_cjs.h(i.request)));return Ge(e,{maxFontBytes:t,aggregateBudget:Math.max(0,chunkUJL2GDIM_cjs.c-r),shadowedRequests:o})}function Ge(e,n){let t=[],r=[],o=n.aggregateBudget,i=new Set;for(let s of e){let u=Ye[s.style],a=Object.freeze({family:s.family,weight:u.weight,style:u.style});if(s.family.trim().length===0){r.push({request:a,partName:s.partName,reason:"malformed"});continue}let d=chunkUJL2GDIM_cjs.h(a);if(!(n.shadowedRequests?.has(d)||i.has(d))){if(i.add(d),s.bytes.byteLength>n.maxFontBytes||s.bytes.byteLength>o){r.push({request:a,partName:s.partName,reason:"overLimit"});continue}o-=s.bytes.byteLength,t.push({request:a,id:`embedded:${s.partName}#${s.style}`,bytes:s.bytes,hash:chunkANZ44KQT_cjs.a(s.bytes),faceIndex:0});}}return {sources:t,dropped:r}}exports.a=$;exports.b=Ze;exports.c=en;exports.d=ee;exports.e=nn;exports.f=Ce;exports.g=ve;exports.h=Be;exports.i=Ae;exports.j=ln;exports.k=un;exports.l=te;exports.m=oe;exports.n=cn;exports.o=dn;exports.p=Bn;exports.q=Pn;exports.r=Ge;exports.s=J;exports.t=Q;exports.u=$e;exports.v=bn;exports.w=Nn;exports.x=Ke;exports.y=In;
1
+ 'use strict';var chunk55AT3MOU_cjs=require('./chunk-55AT3MOU.cjs'),chunkLZLTN5A3_cjs=require('./chunk-LZLTN5A3.cjs'),chunk4KZ6L5YF_cjs=require('./chunk-4KZ6L5YF.cjs');var _e=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function $(e){let n=new Map;for(let t of e)if(Array.isArray(t)){for(let r of t.slice(0,2048)){if(typeof r!="string"||!_e.test(r))continue;let o=r.toLowerCase();if(n.has(o)||n.set(o,r),n.size===2048)break}if(n.size===2048)break}return Object.freeze([...n.values()])}function Ze(e){let n=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(n===void 0||Array.isArray(n)&&n.length===0)?void 0:e}var en=64,ee=Object.freeze({family:"Calibri",sizeHalfPoints:22}),nn=ee;function Ce(e,...n){let t=[e,...n],r=[],o=new Set;for(let a of t)for(let d of a.sources??[]){let c=chunk55AT3MOU_cjs.h(d.request);o.has(c)||(o.add(c),r.push(d));}let i=[],s=new Set;for(let a of t)for(let d of a.substitutions??[]){let c=chunk55AT3MOU_cjs.h(d.from);o.has(c)||s.has(c)||(s.add(c),i.push(d));}let u=$(t.map(a=>a.supportedFamilies));return Object.freeze({...u.length?{supportedFamilies:u}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??chunk55AT3MOU_cjs.a,sources:Object.freeze(r),...i.length>0?{substitutions:Object.freeze(i)}:{},defaultFont:e.defaultFont??ee,...e.language!==void 0?{language:e.language}:{}})}var Me=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function ve(e){let n=e?.defaultFont?.family;return n!==void 0&&Me.test(n)?n:ee.family}var Be="docx-editor.dev/font-resolver",Ae=Symbol.for("docx-editor.dev/font-resolver");function ln(e){let n={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,Ae,n),Object.defineProperty(e,Be,n);}catch(t){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:t})}return e}function un(e){return typeof e=="function"&&e[Ae]===true}var te=class extends RangeError{constructor(t,r,o){super(`Font source ${t.family} (${r} bytes) exceeds the shaping byte ceiling (${o} bytes)`);this.request=t;}request},oe=class extends AggregateError{causes;constructor(n){let t=Object.freeze(n.slice(0,chunk55AT3MOU_cjs.b*2));super(t,`Font origin rejected all ${t.length} face and substitution candidates`),this.causes=t;}},Y=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function Pe(e,n,t){let r=new Map(e.map(o=>[Y(o),o]));for(let[o,i]of n)r.set(o,i);for(let o of t)r.has(Y(o.to))&&r.set(Y(o.from),o.from);return [...r.values()]}async function cn(e,n,t={}){return Te(e,n,t)}async function dn(e,n,t={}){return Te(e,n,t)}async function Te(e,n,t){let r=t.maxExecutionFontBytes??chunk55AT3MOU_cjs.a;if(!Number.isSafeInteger(r)||r<=0||r>chunk55AT3MOU_cjs.a)throw new RangeError("Font execution byte ceiling is outside the supported range");let o=e.map(Le),i,s=[],u=[],a=new Map,d=new Set,c=0,f=[],y=new Set,b=[],T=n.resolvedFaces??[],N=n.defaultFamily;for(let x=0;x<e.length;x+=1){Ne(n.signal);let v=e[x],I=Pe(T,a,f),L;try{let F=o[x],E;if(F){let l=await ke(F,n.signal);if(!l.ok)throw l.cause;E=l.value;}else if(typeof v=="function"){let l=await ke(Promise.resolve(v(De(n,N,I,c))).then(m=>({ok:!0,value:m}),m=>({ok:!1,cause:m})),n.signal);if(!l.ok)throw l.cause;E=l.value;}else E=v;if(E==null)continue;if(typeof E=="function"){V(t,v,x,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}let k="failures"in E?E.failures:void 0,_=[];if(Array.isArray(k)){let l=Math.min(k.length,chunk55AT3MOU_cjs.b);for(let m=0;m<l;m++)_.push(k[m]);k.length>l&&_.push(new Error("Additional font-origin failures were omitted"));}else k!==void 0&&_.push(k);let R;try{R=qe(E,d,c,y,i?"maxFontBytes"in i&&i.maxFontBytes!==void 0?i.maxFontBytes:chunk55AT3MOU_cjs.a:void 0,t.reserveOwnedBytes,t.instrumentation,r);}catch(l){for(let m of new Set(_))V(t,v,x,m);throw l}L=R;for(let l of new Set([...R.dropped,..._]))V(t,v,x,l);let O=R.fragment;O.supportedFamilies&&s.push(O.supportedFamilies),b.push(..._);let U=(O.sources??[]).map(l=>(chunk55AT3MOU_cjs.h(l.request),[Y(l.request),l.request])),g=[...O.substitutions??[]];!i&&"defaultFont"in O&&(N=ve(O)),i||(i=O);let p=new Set(R.sourceKeys);if(p.size>0){f=f.filter(l=>!p.has(chunk55AT3MOU_cjs.h(l.from)));for(let l of p)y.delete(l);}u.push(...O.sources??[]);for(let l of R.sourceKeys)d.add(l);c+=R.ownedBytes;for(let[l,m]of U)a.set(l,m);for(let l of g)f.push(l),y.add(chunk55AT3MOU_cjs.h(l.from));}catch(F){if(L?.releaseOwnedBytes?.(),n.signal?.aborted)throw n.signal.reason??F;if(F instanceof G)throw F.cause;V(t,v,x,F);continue}}if(!i)return;let{epoch:P,...D}=Ce({...i,supportedFamilies:$(s),sources:u,substitutions:f});return b.length===0?D:{...D,failures:Object.freeze(b)}}var G=class extends Error{constructor(t){super("Unable to reserve owned font bytes");this.cause=t;this.name="FontOwnershipReservationError";}cause},W=class extends RangeError{};async function ke(e,n){if(!n)return e;Ne(n);let t,r=new Promise((i,s)=>{t=s;}),o=()=>t?.(n.reason);n.addEventListener("abort",o,{once:true});try{return await Promise.race([e,r])}finally{n.removeEventListener("abort",o);}}function Le(e){if(e===null||typeof e!="object")return;let n;try{n=e.then;}catch(t){return Promise.resolve({ok:false,cause:t})}if(typeof n=="function")return Promise.resolve(e).then(t=>({ok:true,value:t}),t=>({ok:false,cause:t}))}function qe(e,n,t,r,o,i,s,u=chunk55AT3MOU_cjs.a){let a=e.sources??[],d=e.substitutions??[],c="maxFontBytes"in e?e.maxFontBytes:void 0,f="defaultFont"in e?e.defaultFont:void 0,y="epoch"in e?e.epoch:void 0,b="language"in e?e.language:void 0;if(!Array.isArray(a)||!Array.isArray(d))throw new TypeError("Font origin sources and substitutions must be arrays");let T=a.length,N=d.length;if(T>chunk55AT3MOU_cjs.b)throw new RangeError(`Font source count must not exceed ${chunk55AT3MOU_cjs.b}`);if(N>chunk55AT3MOU_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunk55AT3MOU_cjs.b}`);let P=c??chunk55AT3MOU_cjs.a;if(!Number.isSafeInteger(P)||P<=0||P>chunk55AT3MOU_cjs.a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${chunk55AT3MOU_cjs.a}`);let D=Math.min(o??P,u),x=0,v=[],I=new Set,L=[],F=[];for(let g=0;g<T;g+=1){let p=a[g];try{let l=ne(p.request),m=chunk55AT3MOU_cjs.h(l);if(n.has(m)||I.has(m))continue;let A=p.availability,w=p.faceIndex,M=p.hash,Z=p.id;if(A!==void 0&&A!=="available"&&A!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(w)||w<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof M!="string"||M.length===0)throw new TypeError("Font source hash must be a non-empty string");let K;if(A!=="forbidden"){if(typeof Z!="string"||Z.length===0)throw new TypeError("Font source id must be a non-empty string");K=p.bytes;let q=chunk55AT3MOU_cjs.e(K);if(q>D)throw q<=(o??P)?new te(l,q,u):new RangeError(`Font source ${l.family} (${q} bytes) exceeds the effective base byte ceiling (${D} bytes)`);if(n.has(m)||I.has(m))continue;if(t+x+q>chunk55AT3MOU_cjs.c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${chunk55AT3MOU_cjs.c}`);x+=q;}else K=new Uint8Array(0);if(n.has(m)||I.has(m))continue;if(n.size+I.size>=chunk55AT3MOU_cjs.b)throw new W(`Font source count must not exceed ${chunk55AT3MOU_cjs.b}`);I.add(m),v.push(m),L.push(Object.freeze({request:l,id:Z,bytes:K,hash:M,faceIndex:w,...A?{availability:A}:{}}));}catch(l){if(l instanceof W)throw l;F.push(l);}}let E=new Set,k=[];for(let g=0;g<N;g+=1){let p=d[g];try{let l=ne(p.from),m=ne(p.to);chunk55AT3MOU_cjs.h(l),chunk55AT3MOU_cjs.h(m);let A=p.lineMetrics,w=A?Object.freeze({heightEm:A.heightEm,baselineEm:A.baselineEm}):void 0;if(w&&(!Number.isFinite(w.heightEm)||!Number.isFinite(w.baselineEm)||w.heightEm<=0||w.heightEm>4||w.baselineEm<0||w.baselineEm>w.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let M=chunk55AT3MOU_cjs.h(l);if(n.has(M)||I.has(M)||r.has(M)||E.has(M))continue;E.add(M),k.push(Object.freeze({from:l,to:m,...w?{lineMetrics:w}:{}}));}catch(l){F.push(l);}}if((T>0||N>0)&&L.length===0&&k.length===0&&F.length>0)throw F.length===1?F[0]:new oe(F);let _=r.size;for(let g of I)r.has(g)&&(_-=1);if(_+E.size>chunk55AT3MOU_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunk55AT3MOU_cjs.b}`);let R;if(f!==void 0){let g=f.family,p=f.sizeHalfPoints;if(chunk55AT3MOU_cjs.h({family:g,weight:400,style:"normal"}),!Number.isSafeInteger(p)||p<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");R=Object.freeze({family:g,sizeHalfPoints:p});}if(y!==void 0&&(!Number.isSafeInteger(y)||y<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(b!==void 0&&typeof b!="string")throw new TypeError("Font shaping language must be a string");let O;if(x>0&&i)try{O=i(x);}catch(g){throw new G(g)}let U;try{U=L.map(g=>chunk55AT3MOU_cjs.f(g,s));}catch(g){throw O?.(),g}return {fragment:Object.freeze({supportedFamilies:$([e.supportedFamilies]),sources:Object.freeze(U),substitutions:Object.freeze(k),...y!==void 0?{epoch:y}:{},...c!==void 0?{maxFontBytes:c}:{},...R?{defaultFont:R}:{},...b!==void 0?{language:b}:{}}),sourceKeys:Object.freeze(v),ownedBytes:x,dropped:Object.freeze(F),releaseOwnedBytes:O}}function ze(e){return !Number.isSafeInteger(e)||e<=0?0:e>chunk55AT3MOU_cjs.c?chunk55AT3MOU_cjs.c:e}function De(e,n,t,r){let{committedSourceBytes:o,...i}=e,s=ze(r);return {...i,defaultFamily:n,...t.length>0?{resolvedFaces:t}:{},...s>0?{committedSourceBytes:s}:{}}}function ne(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function Ne(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function V(e,n,t,r){let o;try{typeof n=="function"&&n.name.length>0&&(o=n.name);}catch{}let i=Object.freeze({originIndex:t,...o!==void 0?{originName:o}:{},cause:r});if(e.onOriginFailure)try{let u=e.onOriginFailure(i);Promise.resolve(u).catch(a=>{console.warn("[fonts] font-origin diagnostic callback failed",a);});return}catch(u){console.warn("[fonts] font-origin diagnostic callback failed",u);}let s="";try{r instanceof Error&&r.message.length>0&&(s=`: ${r.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${s}`,r);}function J(e){let n=new WeakMap;return (t,r)=>{let o=new Set;for(let i of t){let s=[{node:i,context:r,next:0}],u=a=>{s.pop();let d=s.at(-1)?.found??o;for(let c of a)d.add(c);};for(;s.length;){let a=s[s.length-1],d=n.get(a.node);if(d?.key===a.context.key){u(d.families);continue}if(!a.children){let y=e(a.node,a.context);a.children=y.children,a.found=new Set(y.families);}let c=a.children[a.next++];if(c){s.push({...c,next:0});continue}let f=[...a.found];f.length<=256?n.set(a.node,{key:a.context.key,families:f}):n.delete(a.node),u(f);}}return [...o]}}function Q(e,n){return e.children.flatMap(t=>t.kind==="textValue"?[]:[{node:t,context:n}])}function je(e,n){let{styles:t,theme:r,supplementalFamilies:o,depth:i}=n;if(e.kind==="table"){let a=chunk55AT3MOU_cjs.Md(e,468,i,t),d=[];for(let c of a?.rows??[])for(let f of c.cells){let y={...n,depth:i+1,cellStyle:f.styleFormatting,key:`${n.baseKey}|${i+1}|${JSON.stringify(f.styleFormatting)}`};for(let b of f.blocks)d.push({node:b,context:y});}return {children:d.reverse()}}let s=new Set;if(e.kind==="paragraph"){let a=e.children.find(c=>c.kind==="paragraphProperties"),d=chunk55AT3MOU_cjs.nc(t,a,n.cellStyle).runProperties;for(let c of chunk55AT3MOU_cjs.md(e,d,void 0,(f,y)=>chunk55AT3MOU_cjs.pc(f,y,t),void 0,void 0,"all-markup",void 0,void 0,r)){if(!c.text||c.fontSlot!=="eastAsia"&&!o.has(c.style.fontFamily??""))continue;let f=chunkLZLTN5A3_cjs.a((c.fontSlot==="eastAsia"?c.style.fontFamilyEastAsia:c.style.fontFamily)??void 0);f&&s.add(f);}}let u=e.localName==="txbxContent"?{...n,cellStyle:void 0,key:`${n.baseKey}|${i}|undefined`}:n;return {families:[...s],children:Q(e,u).reverse()}}function $e(){let e=J(je),n,t;return (r,o,i)=>{if(!n||t!==o||n.theme!==i){let s=chunk55AT3MOU_cjs.mc(o,i);t=o,n={key:`${s.cacheToken}|0|undefined`,baseKey:s.cacheToken,styles:s,theme:i,depth:0,supplementalFamilies:new Set([...Object.values(i.majorSupplemental??{}),...Object.values(i.minorSupplemental??{})])};}return e([...r].reverse(),n)}}function bn(e,n,t){return $e()(e,n,t)}function re(e,n){return e.attributes.find(t=>t.localName===n)?.value}var Ue=J((e,n)=>{let t=[];if(e.namespaceUri===chunk4KZ6L5YF_cjs.fa){if(e.localName==="fldSimple"){let r=chunk55AT3MOU_cjs.dd(re(e,"instr")??"")?.font;r&&t.push(r);}if(e.localName==="p")for(let r of Ke(e))t.push(r);}return {families:t,children:Q(e,n)}});function Nn(e){let n=new Map;for(let t of Ue(e,{key:""})){let r=chunkLZLTN5A3_cjs.a(t);r!==null&&!n.has(r.toLowerCase())&&n.set(r.toLowerCase(),r);}return [...n.values()]}function Ke(e){let n=[],t=chunk55AT3MOU_cjs.zb(),r=[];for(let o=e.children.length-1;o>=0;o-=1){let i=e.children[o];i.kind!=="textValue"&&r.push({node:i,containerDepth:0});}for(;r.length>0;){let{node:o,containerDepth:i}=r.pop();if(i>=chunk4KZ6L5YF_cjs.oa||o.namespaceUri===chunk4KZ6L5YF_cjs.fa&&o.localName==="p")continue;if(o.namespaceUri===chunk4KZ6L5YF_cjs.fa&&o.localName==="fldChar"){let u=re(o,"fldCharType");u==="begin"?chunk55AT3MOU_cjs.Cb(t):u==="separate"?(t.nesting===1&&Ie(t,n),chunk55AT3MOU_cjs.Eb(t)):u==="end"&&(t.nesting===1&&Ie(t,n),chunk55AT3MOU_cjs.Fb(t));continue}if(o.namespaceUri===chunk4KZ6L5YF_cjs.fa&&(o.localName==="instrText"||o.localName==="delInstrText")){chunk55AT3MOU_cjs.Db(t,He(o),o.localName==="delInstrText");continue}if(o.namespaceUri===chunk4KZ6L5YF_cjs.fa&&o.localName==="fldSimple"){let u=chunk55AT3MOU_cjs.dd(re(o,"instr")??"");u?.font&&n.push(u.font);}let s=chunk4KZ6L5YF_cjs.pa(o,i);for(let u=o.children.length-1;u>=0;u-=1){let a=o.children[u];a.kind!=="textValue"&&r.push({node:a,containerDepth:s});}}return chunk55AT3MOU_cjs.Ab(t),n}function Ie(e,n){let t=chunk55AT3MOU_cjs.Bb(e);if(t.overflow)return;let r=chunk55AT3MOU_cjs.dd(t.instruction);r?.font&&n.push(r.font);}function He(e){let n="",t=[...e.children].reverse();for(;t.length>0&&n.length<=256;){let r=t.pop();if(r.kind==="textValue")n+=r.value;else for(let o=r.children.length-1;o>=0;o-=1)t.push(r.children[o]);}return n}var Xe=()=>true;function In(e,n,t,r){if(!n)return [];let o=chunk55AT3MOU_cjs.pd(n),i=chunk55AT3MOU_cjs.mc(t,r),s=new Map;for(let u of e)for(let a of Ve(u)){let d=chunk4KZ6L5YF_cjs.Jc(a.children),c=f=>{if(f)for(let y of f.values())for(let b of [y.markerStyle.fontFamily,y.markerStyle.fontFamilyEastAsia]){let T=chunkLZLTN5A3_cjs.a(b??void 0);if(T===null)continue;let N=T.toLowerCase();s.has(N)||s.set(N,T);}};c(chunk55AT3MOU_cjs.Dc(d,o,i,Xe));for(let f of d){let y=chunk55AT3MOU_cjs.me(f);for(let b of y.contents)c(chunk55AT3MOU_cjs.le(b,o,i));}}return [...s.values()].sort((u,a)=>u.localeCompare(a))}function Ve(e){if(e.localName==="document"){for(let n of e.children)if(n.kind!=="textValue"&&n.localName==="body")return [n];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let n=[];for(let t of e.children)t.kind!=="textValue"&&(t.localName==="footnote"||t.localName==="endnote")&&n.push(t);return n}return [e]}var Ye={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function Bn(e,n){let t=[],r=[],o=0;for(let i of e){let s=i.bytes.byteLength;if(!Number.isSafeInteger(s)||s>n||s>chunk55AT3MOU_cjs.a||s>chunk55AT3MOU_cjs.c-o){r.push(i);continue}o+=s,t.push(i);}return {sources:t,dropped:r}}function Pn(e,n,t){let r=n.reduce((i,s)=>i+s.bytes.byteLength,0),o=new Set(n.filter(i=>i.request.family.trim().length>0).map(i=>chunk55AT3MOU_cjs.h(i.request)));return Ge(e,{maxFontBytes:t,aggregateBudget:Math.max(0,chunk55AT3MOU_cjs.c-r),shadowedRequests:o})}function Ge(e,n){let t=[],r=[],o=n.aggregateBudget,i=new Set;for(let s of e){let u=Ye[s.style],a=Object.freeze({family:s.family,weight:u.weight,style:u.style});if(s.family.trim().length===0){r.push({request:a,partName:s.partName,reason:"malformed"});continue}let d=chunk55AT3MOU_cjs.h(a);if(!(n.shadowedRequests?.has(d)||i.has(d))){if(i.add(d),s.bytes.byteLength>n.maxFontBytes||s.bytes.byteLength>o){r.push({request:a,partName:s.partName,reason:"overLimit"});continue}o-=s.bytes.byteLength,t.push({request:a,id:`embedded:${s.partName}#${s.style}`,bytes:s.bytes,hash:chunk4KZ6L5YF_cjs.a(s.bytes),faceIndex:0});}}return {sources:t,dropped:r}}exports.a=$;exports.b=Ze;exports.c=en;exports.d=ee;exports.e=nn;exports.f=Ce;exports.g=ve;exports.h=Be;exports.i=Ae;exports.j=ln;exports.k=un;exports.l=te;exports.m=oe;exports.n=cn;exports.o=dn;exports.p=Bn;exports.q=Pn;exports.r=Ge;exports.s=J;exports.t=Q;exports.u=$e;exports.v=bn;exports.w=Nn;exports.x=Ke;exports.y=In;