@docx-editor.dev/core 2.16.0 → 2.16.1

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 (90) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +6 -6
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +10 -10
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-3XTHXWEB.js +20 -0
  8. package/dist/chunk-7QG5FJ4X.js +1 -0
  9. package/dist/chunk-B2HDVIGY.cjs +2 -0
  10. package/dist/chunk-BML3CNUT.js +2 -0
  11. package/dist/chunk-DD7ETSGW.cjs +20 -0
  12. package/dist/chunk-FRRMJK2G.js +5 -0
  13. package/dist/{chunk-FAD7DH6Q.cjs → chunk-G5GLQ4SX.cjs} +1 -1
  14. package/dist/chunk-JP253KIZ.cjs +2 -0
  15. package/dist/chunk-JROG4U3Z.cjs +21 -0
  16. package/dist/chunk-L7MVY3DW.js +2 -0
  17. package/dist/{chunk-DYPT6YDY.js → chunk-MBXGQN6J.js} +1 -1
  18. package/dist/{chunk-QVJO5FUR.js → chunk-MDMM3XVQ.js} +6 -6
  19. package/dist/{chunk-4MIFIUEV.cjs → chunk-NO7U62I2.cjs} +1 -1
  20. package/dist/{chunk-WGHVIB6B.cjs → chunk-NPZX5O23.cjs} +1 -1
  21. package/dist/chunk-OISZDVXT.cjs +5 -0
  22. package/dist/{chunk-YRTRPSSA.cjs → chunk-PRNYSOQL.cjs} +1 -1
  23. package/dist/chunk-RXPOTTQQ.js +21 -0
  24. package/dist/{chunk-TDHR2QLH.cjs → chunk-TDMGSCCL.cjs} +1 -1
  25. package/dist/{chunk-BPSGGVP5.cjs → chunk-UIB2MDE3.cjs} +1 -1
  26. package/dist/{chunk-I4ENGOOZ.js → chunk-UXAWPVH6.js} +1 -1
  27. package/dist/{chunk-AEIAYDCG.js → chunk-VYQTZIYH.js} +1 -1
  28. package/dist/chunk-W7GY2IJC.js +2 -0
  29. package/dist/{chunk-YKDRBDI2.js → chunk-XXLS6O6B.js} +1 -1
  30. package/dist/{chunk-GHNTGVKG.cjs → chunk-ZFBNCHRP.cjs} +6 -6
  31. package/dist/collaboration/replication.cjs +1 -1
  32. package/dist/collaboration/replication.d.ts +4 -4
  33. package/dist/collaboration/replication.js +1 -1
  34. package/dist/collaboration.d.ts +4 -4
  35. package/dist/contracts/editor.d.ts +7 -7
  36. package/dist/contracts/modules.d.ts +8 -8
  37. package/dist/{custom-node-writes-4WOL8JB_.d.ts → custom-node-writes-ClTkWM7s.d.ts} +2 -2
  38. package/dist/{editor-PDx0fqSo.d.ts → editor-BlerWPyk.d.ts} +21 -3
  39. package/dist/editor.cjs +1 -1
  40. package/dist/editor.css +1 -1
  41. package/dist/editor.d.ts +26 -26
  42. package/dist/editor.js +1 -1
  43. package/dist/export.cjs +1 -1
  44. package/dist/export.d.ts +11 -11
  45. package/dist/export.js +1 -1
  46. package/dist/{font-resolver-CdqOugwZ.d.ts → font-resolver-DtADJcLL.d.ts} +1 -1
  47. package/dist/{headless-document-view-C9ONlGtf.d.ts → headless-document-view-BDSeMGoK.d.ts} +2 -2
  48. package/dist/{hf-references-BZVHctVD.d.ts → hf-references-kSSFMq9X.d.ts} +1 -1
  49. package/dist/{index-BVb4a6O3.d.ts → index-D51bUVBE.d.ts} +96 -15
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.d.ts +18 -18
  52. package/dist/index.js +1 -1
  53. package/dist/{layout-shaping-D_U5z-Qh.d.ts → layout-shaping-rTElghj2.d.ts} +1 -1
  54. package/dist/layout.cjs +1 -1
  55. package/dist/layout.d.ts +21 -19
  56. package/dist/layout.js +1 -1
  57. package/dist/{note-properties-BosjbkGC.d.ts → note-properties-D5_fXW9K.d.ts} +1 -1
  58. package/dist/{omml-equation-oLlbPpVy.d.ts → omml-equation-C9AJfWy5.d.ts} +1 -1
  59. package/dist/output.cjs +1 -1
  60. package/dist/output.d.ts +6 -6
  61. package/dist/output.js +1 -1
  62. package/dist/{protocol-CUsqt13U.d.ts → protocol-K-Djpjjw.d.ts} +2 -2
  63. package/dist/{review-items-kC-YI70C.d.ts → review-items-CiliAz8H.d.ts} +11 -1
  64. package/dist/review-paragraph-order-BlSnyg9a.d.ts +79 -0
  65. package/dist/{revision-projection-CN_DiOl_.d.ts → revision-projection-JiDclAFU.d.ts} +1 -1
  66. package/dist/{semantic-cell-selection-BMrXDniV.d.ts → semantic-cell-selection-C-VsxNee.d.ts} +4 -4
  67. package/dist/{semantic-interaction-NGeYzYCN.d.ts → semantic-interaction-2vPh96Ey.d.ts} +1 -1
  68. package/dist/{semantic-paint-CM8F-8pH.d.ts → semantic-paint-BEjYcsPK.d.ts} +4 -2
  69. package/dist/{semantic-records-BreR44Ki.d.ts → semantic-records-Bc-MGXbM.d.ts} +9 -3
  70. package/dist/store.cjs +1 -1
  71. package/dist/store.d.ts +99 -15
  72. package/dist/store.js +1 -1
  73. package/dist/{tree-op-types-C5rZzoAz.d.ts → tree-op-types-C71G7rIv.d.ts} +6 -2
  74. package/dist/{tree-package-fragment-DDQHk8sv.d.ts → tree-package-fragment-DRJkmfTW.d.ts} +3 -3
  75. package/dist/{tree-session-contract-dKgbKH9A.d.ts → tree-session-contract-Cp5W25RC.d.ts} +7 -7
  76. package/dist/{tree-store-DU192chS.d.ts → tree-store-BRfhZceK.d.ts} +1 -1
  77. package/package.json +2 -2
  78. package/dist/chunk-66DTF4TD.cjs +0 -2
  79. package/dist/chunk-67U2OZS7.cjs +0 -2
  80. package/dist/chunk-6EGMDUL7.js +0 -21
  81. package/dist/chunk-ABXCIZVW.js +0 -2
  82. package/dist/chunk-CMV2MTDE.js +0 -5
  83. package/dist/chunk-EWV5JMJY.cjs +0 -21
  84. package/dist/chunk-GQVKCK33.js +0 -2
  85. package/dist/chunk-IZHDCQUC.js +0 -20
  86. package/dist/chunk-KEXMDQ2Z.js +0 -1
  87. package/dist/chunk-KQEUFAAG.cjs +0 -20
  88. package/dist/chunk-SIUUTE5M.js +0 -2
  89. package/dist/chunk-XKQTITOJ.cjs +0 -5
  90. package/dist/review-reads-DdvADsmp.d.ts +0 -161
package/dist/export.js CHANGED
@@ -1,2 +1,2 @@
1
- import {b,k,c as c$1,d,r as r$1,h,o,l,q}from'./chunk-DYPT6YDY.js';import {qb,y,Ib,md,ae,ld,B,D,C,c,I as I$1,z,x,F,nb,ge,r,w as w$1,fa,R,Te as Te$1,Se,Ve as Ve$1,g,a,d as d$2,be,Ee,Zd,bd,b as b$2,Fa,Vd,h as h$1,Va,dd,Ya,_a,Xa,cd,$a,Za,ab,Wa,Da,Ga,Ca,xa,Na,Ye,jf,af,cf,bf,uc}from'./chunk-6EGMDUL7.js';import'./chunk-RIYSCEFQ.js';import {d as d$1,b as b$1,a as a$1}from'./chunk-AEIAYDCG.js';import'./chunk-VP7SDFCM.js';import {I}from'./chunk-ABXCIZVW.js';import {P,Q,Aa,Ga as Ga$1,Ha,La,va}from'./chunk-GQVKCK33.js';import {yb,If,Jf,hd,gd,da,E,Rd,la,je as je$1,ma,Od,ih,Se as Se$1,Va as Va$1,fb,W,Ua,Ta,jb,ib,Sa,ig,kh}from'./chunk-QVJO5FUR.js';var mn=new WeakMap,ar=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function ir(e){let t=mn.get(e.root);if(t)return t;let n=new Set,r=[{node:e.root,scope:Va$1(),depth:0,mcSelected:false}],o=0;for(;r.length;){let{node:i,scope:s,depth:u,mcSelected:f}=r.pop();if(++o>fb||u>W){n.add("scan-limit");break}if(i.kind==="textValue")continue;if(o+r.length+i.children.length>fb){n.add("scan-limit");break}let l=Ua(s,i),d=Ta(i)?i:void 0;if(d){if(jb(d,l).drawing)continue;let c=ib(d,l);c.refused&&n.add("scan-limit"),c.branch&&r.push({node:c.branch,scope:l,depth:u+1,mcSelected:true});continue}if(!(!f&&Sa(i))){if(i.namespaceUri==="urn:schemas-microsoft-com:vml"&&i.localName==="textbox"){n.add("legacy-textbox");continue}i.namespaceUri==="urn:schemas-microsoft-com:vml"&&ar.has(i.localName)&&!i.children.some(c=>c.kind!=="textValue"&&c.namespaceUri==="urn:schemas-microsoft-com:vml"&&c.localName==="textbox")&&n.add("legacy-drawing");for(let c of i.children)r.push({node:c,scope:l,depth:u+1,mcSelected:f});}}let a=Object.freeze([...n]);return mn.set(e.root,a),a}function yn(e){let t=new Set([e.part()]);for(let n of e.headerFooterPartsBySection())for(let r of [n.headers,n.footers])for(let o of r.values())t.add(o);for(let n of ["footnote","endnote"]){let r=If(e.currentPackage(),n);r&&t.add(r);}return Object.freeze([...t].flatMap(n=>ir(n).map(r=>Object.freeze({code:r,partName:n.name}))))}var sr=Object.freeze({}),cr=Object.freeze([]);function dr(e){let t=Object.keys(e);if(t.length===0)return sr;let n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=o);}return Object.freeze(n)}function lr(e){let t=new Map(Se$1(e.part())),n=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(!n.has(i)){n.add(i);for(let[s,u]of Se$1(i))t.has(s)||t.set(s,u);}let r=e.currentPackage();for(let o of ["footnote","endnote"]){let a=If(r,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of Se$1(a))t.has(i)||t.set(i,s);}}return t}function ur(e,t){let n=jf(e,t);if(!n)return null;let r=e.pages[n.pageIndex];if(!r)return null;let o=af(r),a=cf(e,t.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function pr(e,t){let n=[];for(let r of t.values()){let o=ur(e,r);o&&n.push(o);}return n.length===0?cr:Object.freeze(n)}function gn(e,t){return {documentMetadata:dr(e.documentProperties()),destinations:pr(t,lr(e))}}function fr(e,t){let n=e.destinations;if(n){for(let r of n)if(r.anchor.name===t)return r}}function Oe(e={}){return Object.freeze({async decode(t,n,r){let o=yb(t,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>r.maxDimension||o.pixelHeight>r.maxDimension||o.pixelWidth>r.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 mr=65536;function bn(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function yr(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function gr(e,t,n){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===n:true}function hr(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let n=null;return Ca(e,r=>{if(n||!gr(t,r.story,r.noteScopeId))return;let o=r.story==="header"||r.story==="footer"?a=>xa(a,r.origin,{x:e.box.x,y:e.box.y}):void 0;Ga(r.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(u=>u.drawingNodeId);yr(s,t.textboxPath)&&(n=bn(e,i.storyOrigin));},r.origin,o);}),n}function xr(e,t){if(t.story==="textbox")return hr(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?bf(e,e.header.box):{x:0,y:0};case "footer":return e.footer?bf(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let r=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return r?bf(e,r.box):{x:0,y:0}}case "note-separator":{let n=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes;return n?.separator?bf(e,n.separator.box):{x:0,y:0}}default:return {x:0,y:0}}}function Rn(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function En(e,t){let n=af(e);return Object.freeze({x:n.x+t.x,y:n.y+t.y,width:t.width,height:t.height})}function br(e,t){let n=jf(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!n||n.pageIndex!==t.pageIndex)return;let r=e.pages[n.pageIndex];if(!r)return;let o=xr(r,t),a=Object.freeze([Rn({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>En(r,i)))})}function Rr(e,t,n){let r=n.filter(i=>i.pageIndex===t.pageIndex);if(r.length===0)return wn(t)?br(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(r.map(i=>Rn(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>En(o,i)))})}function wn(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function xn(e,t){return `${e}\0${t}`}function Er(e,t,n){let r=Math.max(e.start,t.offset),o=Math.min(e.end,n.offset);return o>r?{start:r,end:o}:null}function wr(e,t){let n=new Map,r=new Map,o=new Set,a=0;let i=(s,u)=>{if(a>=mr)return false;a+=1;let f=xn(s.pageIndex,u),l=r.get(f);return l?l.push(s):r.set(f,[s]),true};for(let[s,u]of t.entries())for(let[f,l]of u.occurrences.entries()){if(wn(l)||l.source.start.paragraphId!==l.source.end.paragraphId)continue;o.add(l.pageIndex);let d=`${s}\0${f}`,c={paragraphId:l.source.start.paragraphId,offset:l.source.start.offset},m={paragraphId:l.source.end.paragraphId,offset:l.source.end.offset},y=c.offset<=m.offset?{from:c,to:m}:{from:m,to:c};i({key:d,from:y.from,to:y.to,pageIndex:l.pageIndex},y.from.paragraphId);}if(r.size===0)return n;for(let s of e.pages)o.has(s.index)&&Ca(s,u=>{let f=u.story==="header"||u.story==="footer"?l=>xa(l,u.origin,{x:s.box.x,y:s.box.y}):void 0;Ga(u.host,(l,d)=>{let c=bn(s,d.storyOrigin);for(let m of l.lines)for(let y of Na(m)){let p=r.get(xn(s.index,y.paragraphId));if(p)for(let x of p){let h=Er(y,x.from,x.to);if(!h)continue;let b=Ye(m,h.start,void 0,y),E=Ye(m,h.end,void 0,y),P=n.get(x.key)??[];P.push({pageIndex:s.index,x:Math.min(b,E)+c.x,y:m.box.y+c.y,width:Math.abs(E-b),height:m.box.height}),n.set(x.key,P);}}},u.origin,f);});return n}function Fn(e,t){let n=false;for(let o of t)if(o.occurrences.length!==0){n=true;break}if(!n)return t;let r=wr(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,u)=>{let f=`${a}\0${u}`,l=Rr(e,s,r.get(f)??[]);return l?{...s,geometry:l}:s});return {...o,occurrences:Object.freeze(i)}})}function Fr(e){let t=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:r,depth:o}=n.pop();if(!(r.kind==="textValue"||o>64)){r.kind==="paragraph"&&!t.has(r.id)&&t.set(r.id,t.size);for(let a=r.children.length-1;a>=0;a-=1)n.push({node:r.children[a],depth:o+1});}}return t}function Sn(){let e=new Map,t=r=>{let o=e.get(r.root);if(o)return o;let a=Fr(r);return e.set(r.root,a),a},n={retainRevisionItems:false,revisionSites:kh,locations:va,commentAnchors:ig,deepOrder:t};return Object.freeze({collectReviewItems:r=>La(r,n),deepParagraphOrderOfPart:t})}function Sr(e,t){if(t)return true;let n=e.map(r=>r.root);for(;n.length>0;){let r=n.pop();if(ih(r))return true;if(r.kind!=="textValue")for(let o of r.children)n.push(o);}return false}function vr(e,t){let n=[],r=new Set([t.name]),o=a=>{!a||r.has(a.name)||(r.add(a.name),n.push(a));};for(let a of Od(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(If(e,"footnote")),o(If(e,"endnote")),n}function Or(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return If(e,"footnote")?.name??null;case "endnote":return If(e,"endnote")?.name??null;case "note-separator":return If(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function Pr(e,t){let n=new Map;for(let r of e){let o=t.get(r.partName),a=o?.get(r.start.paragraphId),i=o?.get(r.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),u=Math.max(a,i),f=n.get(r.partName);n.set(r.partName,{lower:Math.min(f?.lower??s,s),upper:Math.max(f?.upper??u,u)});}return n}function Ir(e,t,n,r,o){let a=new Map(n.map(d=>[d.name,o(d)])),i=Pr(r,a),s=new Map,u=new Map,f=(d,c,m,y,p,x,h)=>{let b=a.get(d)?.get(p),E=i.get(d);if(b===void 0||!E||b<E.lower||b>E.upper)return;let P=s.get(d)??new Map;s.set(d,P);let q=u.get(d)??new Map;u.set(d,q);let z=JSON.stringify([c.story,c.noteScopeId,c.noteAreaKind]),ne=m==="textbox"?JSON.stringify([z,"textbox",y]):z,$=P.get(p)??[],G=`${p}\0${c.page.index}\0${ne}`,B=q.get(G);B||(B={pageIndex:c.page.index,story:m,rootStory:c.story,textboxPath:y,noteScopeId:c.noteScopeId,noteAreaKind:c.noteAreaKind,laneKey:ne,intervals:[],intervalKeys:new Set},q.set(G,B),$.push(B),P.set(p,$));let R=`${x}\0${h}`;B.intervalKeys?.has(R)||(B.intervalKeys?.add(R),B.intervals.push({start:x,end:h}));};Da(e,d=>{let c=Or(t,d);!c||!i.has(c)||Ga(d.host,(m,y)=>{let p=y.textboxDepth>0?"textbox":d.story,x=y.textboxPath.map(b=>b.drawingNodeId),h=[];for(let b of m.lines){for(let E of b.spans)h.push(E.range);for(let E of b.drawings??[])h.push({paragraphId:E.paragraphId,start:E.start,end:E.start+1});}h.length===0&&h.push({paragraphId:m.range.paragraphId,start:m.range.start,end:m.range.end});for(let{paragraphId:b,start:E,end:P}of h)f(c,d,p,x,b,E,P);});}),Fa(e,d=>{let c=d.drawing.ownerPartName;i.has(c)&&f(c,d.root,d.story,d.textboxPath.map(m=>m.drawingNodeId),d.drawing.paragraphId,d.drawing.start,d.drawing.start+1);});for(let d of s.values())for(let c of d.values())for(let m of c){m.intervals.sort((p,x)=>p.start-x.start||p.end-x.end);let y=[];for(let p of m.intervals){let x=y.at(-1);x&&p.start<=x.end?x.end=Math.max(x.end,p.end):y.push({...p});}m.intervals.splice(0,m.intervals.length,...y),m.intervalKeys=void 0;}let l=new Map;for(let[d,c]of s){let m=a.get(d);if(!m)continue;let y=[];for(let[p,x]of c){let h=m.get(p);h!==void 0&&y.push({paragraphId:p,position:h,laneKeys:new Set(x.map(({laneKey:b})=>b))});}y.sort((p,x)=>p.position-x.position),l.set(d,y);}return {byPart:s,orderByPart:a,visibleByPart:l}}function vn(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>>1;e[o].position<t?n=o+1:r=o;}return n}function Ar(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=t.orderByPart.get(e.partName),r=t.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!r||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),u=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:d})=>d)??[]),f=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:d})=>d)??[]),l=new Set([...u].filter(d=>f.has(d)));return l.size===0?[e.start.paragraphId,e.end.paragraphId]:r.slice(vn(r,i),vn(r,s+1)).filter(d=>[...d.laneKeys].some(c=>l.has(c))).map(d=>d.paragraphId)}function Dr(e,t,n,r){return r?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,n)};return a.end>a.start?[a]:[]})}function Lr(e,t){let n=Number.NEGATIVE_INFINITY;for(let r of e)for(let o of r.intervals)n=Math.max(n,o.end);return t!==n?new Set:new Set(e.filter(r=>r.intervals.some(o=>o.end===n)))}function On(e,t,n){let r=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let u of Ar(i,t)){let f=t.byPart.get(i.partName)?.get(u)??[],d=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,c=u===i.start.paragraphId?i.start.offset:0,m=u===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,y=d?Lr(f,c):new Set;for(let p of f){let x=Dr(p,c,m,d);d&&x.length===0&&y.has(p)&&(x=[{start:c,end:c}]);for(let h of x){let b=`${p.pageIndex}\0${p.story}\0${p.noteScopeId??""}\0${p.noteAreaKind??""}\0${p.textboxPath.join("\0")}\0${i.partName}\0${u}\0${h.start}\0${h.end}\0${s??""}`;o.has(b)||(o.add(b),r.push({pageIndex:p.pageIndex,physicalPageNumber:p.pageIndex+1,story:p.story,rootStory:p.rootStory,textboxPath:p.textboxPath,noteScopeId:p.noteScopeId,noteAreaKind:p.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:u,offset:h.start},end:{paragraphId:u,offset:h.end}}}));}}}}return r}function In(e,t){let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,r=Math.imul(r^a+o,2246822507)>>>0,r^=r>>>13;}return `${e}_${t.length.toString(36)}_${n.toString(36)}_${r.toString(36)}`}function Pn(e,t,n=In){let r=new Map;for(let a of t){let i=n(e,a),s=r.get(i)??new Set;s.add(a),r.set(i,s);}let o=new Map;for(let[a,i]of r){let s=[...i].sort();for(let[u,f]of s.entries())o.set(f,s.length===1?a:`${a}_${u.toString(36)}`);}return o}function Tr(e){let t=new Set,n=new Set;for(let r of e){if(r.kind==="comment"){t.add(r.id),r.parentId!==void 0&&t.add(r.parentId),r.parentRevisionId!==void 0&&n.add(r.parentRevisionId);for(let o of r.replyIds)t.add(o);}if(r.kind==="revision"){n.add(r.id),r.pairedWith!==void 0&&n.add(r.pairedWith);for(let o of r.replyIds)t.add(o);}}return {comment:Pn("comment",t),revision:Pn("change",n)}}function V(e,t,n){return e.get(n)??In(t,n)}function Mr(e,t,n){return e.kind==="revision"?{kind:"tracked-change",id:V(n.revision,"change",e.id),change:e.revisionKind,...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:e.text,replacedText:e.replacedText,nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:V(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(r=>V(n.comment,"comment",r)),occurrences:t?On(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:V(n.comment,"comment",e.id),author:e.comment.author,initials:Ha(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:Ga$1(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:V(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:V(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(r=>V(n.comment,"comment",r)),orphaned:e.orphaned,occurrences:t&&e.range?On([e.range],t):[]}}function An(e,t){let n=t.parts.get(t.mainDocumentPart);if(!n)return [];let r=vr(t,n),o=[n,...r],a=t.parts.get(P(t,n.name));if(!Sr(o,a))return [];let i=Sn(),s=i.collectReviewItems({storyPart:n,furnitureParts:r,commentsPart:a,commentsExtendedPart:t.parts.get(Q(t,n.name))});if(s.length===0)return [];let u=s.flatMap(d=>Aa(d)),f=u.length>0?Ir(e,t,o,u,i.deepParagraphOrderOfPart):null,l=Tr(s);return s.map(d=>Mr(d,f,l)).filter(d=>d!==null)}var kr=new Set(["part","validatedHandle"]);function Dn(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function J(e,t,n,r,o){if(!(r!==void 0&&kr.has(r))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)J(a,t,n,void 0,o);Object.freeze(e);return}if(!Dn(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");J(i.value,t,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function Ln(e){if(!Dn(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let r of e.pages)if(!(r===null||typeof r!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(r,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),J(i,new Set,s,o),t.add(i);}let n=(r,o)=>{let a=new Set;for(let i of r){let s=new Set;s.add(e),J(i,a,s,void 0,o);}Object.freeze(r);};for(let r of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(r==="pages"&&Array.isArray(o.value)){n(o.value,t);continue}if(r==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),J(o.value,new Set,a,r);}return Object.freeze(e),e}var Nr=Object.freeze([]),w=class extends Error{constructor(n,r,o){super(r,o);this.code=n;this.name="ExportResourceError";}code};function Br(e){try{return e instanceof w}catch{return false}}function Cr(e){try{return e instanceof Vd}catch{return false}}function _r(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function jr(e){if(Br(e))return e;let t=Cr(e),n=_r(e),r=n?`: ${n}`:"",o=new w(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${r}`:`Export layout failed${r}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function zr(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 Tn(e){if(e==="all-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, proposed, or original")}var Ur=50,Pe=64;function Vr(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Hr(e){let t=false;return Fa(e,({drawing:n})=>{Vr(n.resource)&&(t=true);}),t}function Mn(e){return !ArrayBuffer.isView(e)}function Ie(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};let n=Tn(t.displayMode??qb),r=Mn(e),o=Mn(e)?{ok:true,view:e}:I(e);if(!o.ok)return o;let a=o.view,i=t.reuseAcrossRevisions??r,s=zr(t.resourceTimeoutMs),u=t.measurer??y(),f=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),l$1=Ib({retainAcrossPasses:i}),d=0,c=new Set,m=()=>{d+=1;for(let R of c)R();c.clear();},y$1=md({session:a,decodePort:t.imageDecodePort??Oe(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:m}),p={view:a,measurer:u,paragraphCache:l$1,sessions:new Map,completed:new Map,inFlight:new Map,styles:ld(a),fieldLinks:new Map,links:ae(a),drawingBundle:y$1,furniture:new Map},x=new AbortController,h=t.signal,b=false,E=()=>b?new w("aborted","Export resource settlement was aborted"):new w("disposed","Export session has been disposed"),P=()=>{b=true,q();};function q(){let R=p;if(R){p=null,h?.removeEventListener("abort",P),x.abort(h?.reason),R.drawingBundle.dispose(),R.paragraphCache.clear();for(let F of R.completed.values())nb(F.internal),ge(F.internal);for(let F of R.fieldLinks.values())F.registry.clear();R.fieldLinks.clear(),R.completed.clear(),R.inFlight.clear(),R.furniture.clear(),R.sessions.clear(),m();}}h?.addEventListener("abort",P,{once:true}),h?.aborted&&P();let z=()=>{if(!p)throw E();if(x.signal.aborted)throw new w("aborted","Export resource settlement was aborted")},ne=(R,F,D,g)=>d!==R||p?.view.packageRevision()!==F||p?.view.currentPackage()!==D?Promise.resolve():(z(),new Promise((U,I)=>{let L=false,C,T=k=>{L||(L=true,C!==void 0&&clearTimeout(C),c.delete(M),x.signal.removeEventListener("abort",W),k?I(k):U());},M=()=>T(),W=()=>T(new w("aborted","Export resource settlement was aborted")),K=()=>{if(p?.view.packageRevision()!==F||p?.view.currentPackage()!==D){T();return}let k=g-Date.now();if(k<=0){T(new w("timedOut",`Image resources did not settle within ${s}ms`));return}C=setTimeout(K,Math.min(Ur,k));};if(c.add(M),x.signal.addEventListener("abort",W,{once:true}),d!==R||p?.view.packageRevision()!==F||p?.view.currentPackage()!==D){T();return}K();})),$=async(R,F=0,D=Date.now()+s)=>{if(z(),Date.now()>=D)throw new w("timedOut",`Export layout did not stabilize within ${s}ms`);let g=p,U=D,I=g.view.packageRevision(),L=g.view.currentPackage(),C=g.completed.get(R);if(C&&C.revision===I&&C.pkg===L)return C.published;let T=()=>{if(g.view.packageRevision()===I&&g.view.currentPackage()===L)return null;if(F>=Pe-1)throw new w("nonConvergent","Document revision did not stabilize during export layout");return $(R,F+1,U)},M=g.fieldLinks.get(R);if(!M||M.revision!==I||M.pkg!==L){let O=M?.registry??be();O.clear(),M={revision:I,pkg:L,registry:O},g.fieldLinks.set(R,M),g.furniture.delete(R);}let W=M.registry,K=g.sessions.get(R)??Ee();g.sessions.set(R,K);let k=g.furniture.get(R);k||(k=Zd({view:g.view,measurer:g.measurer,producer:f,cache:g.paragraphCache,styleCascade:g.styles.styleCascade,numberingIndex:g.styles.numberingIndex,defaultTabStopPt:g.styles.defaultTabStopPt,compatibilityMode:g.styles.compatibilityMode,displayMode:R,revisionAuthorFilter:void 0,inlineDrawingLayoutForPart:O=>g.drawingBundle.contextForPart(O),drawingLayoutTokenForPart:O=>g.drawingBundle.cacheTokenForPart(O),drawingTokenForParagraphForPart:(O,ye)=>g.drawingBundle.drawingTokenForParagraph(ye,O),linkProjectors:g.links,projectFieldLink:O=>W.project(O)}),g.furniture.set(R,k));for(let O=0;O<Pe;O+=1){let ye=d;g.drawingBundle.sync(g.view);let He=T();if(He)return He;let _=l({view:g.view,revision:g.view.packageRevision(),measurer:g.measurer,cache:g.paragraphCache,session:K,producer:f,styleCascade:g.styles.styleCascade,defaultTabStopPt:g.styles.defaultTabStopPt,numberingIndex:g.styles.numberingIndex,furniture:k,compatibilityMode:g.styles.compatibilityMode,linkProjectors:g.links,projectFieldLink:v=>W.project(v),inlineDrawingLayout:g.drawingBundle.bodyContext,inlineDrawingLayoutForPart:v=>g.drawingBundle.contextForPart(v),drawingTokenForParagraph:v=>g.drawingBundle.drawingTokenForParagraph(v,g.view.part().name),drawingTokenForParagraphForPart:(v,re)=>g.drawingBundle.drawingTokenForParagraph(re,v),drawingLayoutEpoch:g.drawingBundle.cacheTokenForPart(g.view.part().name),drawingLayoutEpochForPart:v=>g.drawingBundle.cacheTokenForPart(v),displayMode:R,revisionAuthorFilter:void 0});if(!Hr(_)){let v=T();if(v)return v;i||(nb(_),ge(_),g.paragraphCache.clear(),g.sessions.delete(R),g.furniture.delete(R));let re=An(_,L),nr=re.length===0?Nr:Object.freeze(Fn(_,re)),rr=gn(g.view,_),or={..._,...rr,contentWarnings:yn(g.view),reviewArtifacts:nr},Ge=Ln(or);return g.completed.set(R,{revision:I,pkg:L,internal:_,published:Ge}),Ge}let qe=ye;for(;g.drawingBundle.pendingResourceCount()>0;){await ne(qe,I,L,U),qe=d,z();let v=T();if(v)return v}z();let $e=T();if($e)return $e}throw new w("nonConvergent",`Image resources did not reach quiescence after ${Pe} layout passes`)},G=R=>{let F;try{F=Tn(R);}catch(I){return Promise.reject(I)}if(!p)return Promise.reject(E());let D=p,g=D.inFlight.get(F);if(g)return g;let U=$(F).catch(I=>{throw jr(I)}).finally(()=>D.inFlight.delete(F));return D.inFlight.set(F,U),U};return {ok:true,session:{layout:()=>G(n),layoutFor:G,validatedImageBytes(R){let F=p;return !F||R.resource.kind!=="ready"?null:F.drawingBundle.mintValidatedBytes(R.resource.validatedHandle,R.resource.contentId)?.slice()??null},dispose:q}}}var Ae=b$2;function De(e){return typeof e.admittedFontFace=="function"}var qr=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function pe(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function Le(e){let t=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:pe(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:t?Object.freeze({requested:pe(t.requested),resolved:pe(t.resolved),...t.lineMetrics?{lineMetrics:Object.freeze({...t.lineMetrics})}:{}}):null})}function $r(e){return Object.freeze({...Le(e),bytes:h$1(e)})}function Gr(e,t){if(!e)return null;try{let n=e(t);return !n||n instanceof d$2?null:$r(n)}catch{return null}}function kn(e){return t=>{if(e.status()!=="active")throw e.unavailable();return Gr(e.resolve(),t)}}function Wr(e){return Object.freeze(e.slice(0,Ae).map(t=>Object.freeze({request:pe(t.request),partName:t.partName,reason:t.reason})))}function Te(e,t,n,r,o=[]){let a=new Map;for(let s of [...e,t]){let u=s.toLowerCase();a.has(u)||a.set(u,s);}let i=[...a.values()].map(s=>{let u=[];for(let f of qr){let l=r?.({family:s,...f});!l||l instanceof d$2||u.push(Object.freeze({...f,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}return Object.freeze({family:s,coverage:u.length===4?"complete":u.length>0?"partial":"none",faces:Object.freeze(u)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:t,families:Object.freeze(i),originFailures:Object.freeze([...n]),droppedEmbeddedFonts:Wr(o)})}function Me(e,t){if(t.onFontResolution){try{let n=t.onFontResolution(e);Promise.resolve(n).catch(r=>{console.warn("[fonts] font-resolution diagnostics callback failed",r);});}catch(n){console.warn("[fonts] font-resolution diagnostics callback failed",n);}return}for(let n of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",n);for(let n of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",n);}function ke(e,t){if(t.fontPolicy!=="strict"||e.originFailures.length===0&&e.families.every(r=>r.coverage==="complete"))return;let n=e.families.filter(r=>r.coverage!=="complete").map(r=>r.family).join(", ");throw new w("layoutFailed",`Strict font policy refused export${n?`; incomplete families: ${n}`:"; a font origin failed"}`)}function fe(){return new Map}function Ne(e,t,n,r){if(n.trim().length===0)return null;let o={family:n,weight:r.bold?700:400,style:r.italic?"italic":"normal"},a=g(o),i=t.get(a);if(!i){try{i=e.fonts.resolve(o);}catch{return null}t.set(a,i);}return i instanceof d$2?null:i}function Nn(e,t,n){let r=n.fontFamily??e.defaultFont.family;return Ne(e,t,r,n)}function Be(e){return typeof e.shapeLaidOutText=="function"}function Ce(e){let t=fe(),n=new WeakMap;return r=>{let o=fa(r.style,r.fontSlot),a=R(r.text,o);if(a.length===0)return null;let i=o.fontFamily??e.defaultFont.family,s=Ne(e,t,i,o);if(!s)return null;try{if(o.smallCaps&&!Te$1(e.shaper,e.environment,s,o,n))return null;let u=Se(e.shaper,e.environment,s,o,a);return Object.freeze({run:u,font:Le(s),fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Bn(e){return t=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(t)??null}}var ee=new Map,me=new WeakMap,_e=0,te,je=32,Cn=c;function _n(){if(te)return te;let e=(async()=>(await r(),w$1(z)))();return te=e,e.catch(()=>{te===e&&(te=void 0);}),e}function jn(e){let t=fe();return Ve$1(e,{resolveFont(n){return Nn(e,t,n)},fallback:y()})}async function zn(e,t){if(!B(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let n=await _n(),r=await I$1(e,n,z,t);return Object.freeze({createMeasurer:()=>jn(r),resolveFont:o=>r.fonts.resolve(o),shapeLaidOutText:Ce(r),producer:["node-export-session",e.fingerprint,r.operation.shapingHash,`producer:${r.operation.producerVersion}`,`fallback:${x}`].join("|"),extensionFingerprint:e.fingerprint})}function Kr(e,t){if(!B(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=me.get(e);if(n)return n;let r=D(e),o=ee.get(r);if(!o){if(ee.size>=je)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${je} process-wide configurations`));o=(async()=>{let u=C(e).sources.reduce((l,d)=>l+(d.availability==="forbidden"?0:d.bytes.byteLength),0);if(_e+u>Cn)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Cn} process-wide`);_e+=u;let f;try{let l=await _n();f=await I$1(e,l,z,t);}catch(l){throw _e-=u,l}return Object.freeze({createMeasurer:()=>jn(f),shapeLaidOutText:Ce(f),shapingHash:f.operation.shapingHash,producerVersion:f.operation.producerVersion})})(),ee.set(r,o),o.catch(()=>{ee.get(r)===o&&ee.delete(r);});}let a=e.fingerprint,i=o.then(s=>Object.freeze({createMeasurer:s.createMeasurer,shapeLaidOutText:s.shapeLaidOutText,producer:["node-export",a,s.shapingHash,`producer:${s.producerVersion}`,`fallback:${x}`].join("|"),extensionFingerprint:a}));return me.set(e,i),i.catch(()=>{me.get(e)===i&&me.delete(e);}),i}var Xr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function Yr(e){let t=e.currentPackage(),n=(t.relationships.get(t.mainDocumentPart)??[]).find(o=>o.type===Xr),r;if(n){let o=E(n);o.mode==="Internal"&&o.target.ok&&(r=t.parts.get(o.target.partName));}return r??=t.parts.get("/word/fontTable.xml"),Rd(t,r)}function Un(e,t){let n=Yr(e);if(n.length!==0)return h(r=>{let o$1=new Set((r.resolvedFaces??[]).map(i=>g(i))),a$1=o(n,{maxFontBytes:a,aggregateBudget:Qr(r),shadowedRequests:o$1});if(t)for(let i of a$1.dropped){if(t.dropped.length>=Ae)break;t.dropped.push(i);}return {sources:a$1.sources}})}function Qr(e){let t=e.committedSourceBytes;return t===void 0||!Number.isSafeInteger(t)||t<=0?c:Math.max(0,c-t)}function Zr(e){return De(e)&&Be(e)}var N=0,Vn=Symbol("font-resolution-timeout");function Jr(e){let t=0,n=false;return e?.(N),{reserve:o=>{if(n)throw new Error("Document font-byte lease is already released");if(N+o>c)throw new w("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${o} bytes with ${N} bytes already active`);N+=o,t+=o,e?.(N);let a=false;return ()=>{a||n||(a=true,N-=o,t-=o,e?.(N));}},release:()=>{n||(n=true,N-=t,t=0,e?.(N));}}}function Ue(e,t){return e.attributes.find(n=>n.localName===t)?.value}function eo(e,t){return e.attributes.find(n=>n.localName===t&&(n.namespaceUri===da||n.namespaceUri===""))?.value}async function to(e,t){if(t.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(t.signal?.aborted)return {ok:false,reason:"aborted"};let n=I(e);if(!n.ok)return n;let{fonts:r,fontResolutionTimeoutMs:o,fontPolicy:a,onFontResolution:i,...s}=t,u=Array.isArray(r)?r:[r],f,l;try{l=await no(n.view,u,{signal:t.signal,timeoutMs:o??t.resourceTimeoutMs,fontPolicy:a,onFontResolution:b=>(f=b,i?.(b))});}catch(b){if(b instanceof w&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!f)throw l?.dispose(),new w("layoutFailed","Document font resolution completed without publishing its evidence");let d;try{d=Ie(n.view,{...s,reuseAcrossRevisions:!1,...l?{measurer:l.createMeasurer(),producer:t.producer??l.producer}:t.producer?{producer:t.producer}:{}});}catch(b){throw l?.dispose(),b}if(!d.ok)return l?.dispose(),d;let c=d.session,m=l,y="active",p=()=>y==="aborted"?new w("aborted","Export resource settlement was aborted"):new w("disposed","Export session has been disposed"),x=b=>{if(y==="active"){y=b,t.signal?.removeEventListener("abort",h);try{c.dispose();}finally{m?.dispose(),m=void 0;}}},h=()=>x("aborted");return t.signal?.addEventListener("abort",h,{once:true}),t.signal?.aborted&&h(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>y==="active"?c.layout():Promise.reject(p()),layoutFor:b=>y==="active"?c.layoutFor(b):Promise.reject(p()),validatedImageBytes:b=>y==="active"?c.validatedImageBytes(b):null,admittedFontFace:kn({status:()=>y,unavailable:p,resolve:()=>m?.resolveFont}),shapeLaidOutText:Bn({status:()=>y,unavailable:p,shaping:()=>m}),dispose:()=>x("disposed")})}}async function no(e,t,n={}){let r=ro(n.timeoutMs),o=new AbortController,a=()=>o.abort(n.signal?.reason);n.signal?.addEventListener("abort",a,{once:true}),n.signal?.aborted&&a();let i=setTimeout(()=>o.abort(Vn),r);try{ze(o.signal);let s=(async()=>{let u=Jr(n.onActiveFontBytesChange),f=!1;try{let l=ao(e).slice(0,b),d$1=[],c={dropped:[]},m=Un(e,c),y=m?[...t,m]:t,p=await k(y,{families:l,defaultFamily:c$1.family,signal:o.signal},{onOriginFailure:E=>d$1.push(E),reserveOwnedBytes:u.reserve});ze(o.signal);let x=d(p??{});if(x.sources.length===0){let E=Te(l,x.defaultFont.family,d$1,void 0,c.dropped);Me(E,n),ke(E,n);return}let h=await zn(F(x));ze(o.signal);let b$1=Te(l,x.defaultFont.family,d$1,h.resolveFont,c.dropped);return Me(b$1,n),ke(b$1,n),f=!0,Object.freeze({...h,dispose:u.release})}finally{f||u.release();}})();return await Promise.race([s,oo(o.signal)])}finally{clearTimeout(i),n.signal?.removeEventListener("abort",a);}}function ro(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function oo(e){return new Promise((t,n)=>{let r=()=>{n(Hn(e));};e.aborted?r():e.addEventListener("abort",r,{once:true});})}function Hn(e){let t=e.reason===Vn;return new w(t?"timedOut":"aborted",t?"Font resolution timed out":"Font resolution was aborted",t?void 0:{cause:e.reason})}function ze(e){if(e.aborted)throw Hn(e)}function ao(e){let t=[e.part().root],n=[],r=[],o=new Set([e.part().name]),a=(l,d)=>{!d||o.has(d.name)||(o.add(d.name),l.push(d.root));};for(let l of e.headerFooterPartsBySection()){for(let d of l.headers.values())a(n,d);for(let d of l.footers.values())a(n,d);}for(let l of ["footnote","endnote"])r.push(...io(e,l));let i=e.documentThemeFonts(),s={major:i.major,minor:i.minor,majorEastAsia:i.majorEastAsia??null,minorEastAsia:i.minorEastAsia??null},u=new Map,f=(l,d)=>{let c=d$1(l,e.stylesRoot(),s,co(l,d)),m=r$1(l,e.numberingRoot(),e.stylesRoot(),s);for(let y of [...c.direct,...po(l),...m,...c.inherited]){let p=y.toLowerCase();u.has(p)||u.set(p,y);}};return f(t,"body"),f(n,"furniture"),f(r,"note"),[...u.values()]}function io(e,t){let n=If(e.currentPackage(),t);if(!n)return [];let r=new Set(Jf(e.part()).filter(a=>a.noteKind===t).map(a=>a.noteId)),o=[];for(let a of n.root.children){if(a.kind==="textValue")continue;let i=hd(a),s=gd(a);(i==="separator"||i==="continuationSeparator"||s!==null&&r.has(s))&&o.push(a);}return o}var so="http://schemas.openxmlformats.org/officeDocument/2006/math";function co(e,t){let n=new Set;for(let r of e){let o=[],a=[{node:r,context:t}];for(;a.length>0;){let{node:i,context:s}=a.pop();i.namespaceUri===da&&i.localName==="p"&&o.push({paragraph:i,context:s});let u=i.namespaceUri===da&&i.localName==="txbxContent"&&(s==="body"||s==="note")?"detached":s;for(let f=i.children.length-1;f>=0;f-=1){let l=i.children[f];l.kind!=="textValue"&&a.push({node:l,context:u});}}for(let i of o)lo(i.paragraph,n,i.context);}return n}function lo(e,t,n){let r=Va(),o=null,a=null,i="",s=false,u=false,f=false,l=0,d=[];for(let c=e.children.length-1;c>=0;c-=1){let m=e.children[c];m.kind!=="textValue"&&d.push({node:m,runId:null,visibility:H,containerDepth:0});}for(;d.length>0;){let{node:c,runId:m,visibility:y,containerDepth:p}=d.pop();if(p>=la||c.namespaceUri===da&&c.localName==="p")continue;let x=c.namespaceUri===da&&c.localName==="r"?c.id:m;if(c.namespaceUri===da&&c.localName==="fldSimple"){let h=Ue(c,"instr")??"";dd(h,{allowPageFields:n==="body"||n==="furniture",allowRefFields:n==="body"||n==="note",allowPageRef:n==="body",allowAutonum:n==="body"||n==="note"})&&uo(c)!==H&&t.add(c.id);}if(c.namespaceUri===da&&c.localName==="fldChar"){let h=Ue(c,"fldCharType");if(h==="begin")Ya(r),r.nesting===1&&(o=x,a=null,i="",s=false,u=false,f=je$1(c),l=0);else if(h==="separate"){let b=r.nesting===1;if(_a(r),b){let E=Xa(r);i=E.instruction,s=E.overflow||r.nestingOverflow,a=x,u=true;}}else if(h==="end"){if(r.nesting===1){if(r.phase==="instruction"){let E=Xa(r);i=E.instruction,s=E.overflow||r.nestingOverflow;}if(!s&&cd(i,{hasSeparate:u,hasLegacyFormData:f,allowPageFields:n==="body"||n==="furniture",allowRefFields:n==="body"||n==="note",allowPageRef:n==="body",allowAutonum:n==="body"||n==="note"})&&l!==H){let E=a??o;E&&t.add(E);}}$a(r);}continue}if(c.namespaceUri===da&&(c.localName==="instrText"||c.localName==="delInstrText")){Za(r,Kn(c),c.localName==="delInstrText");continue}r.nesting>0&&ab(r)&&c.namespaceUri===da&&qn(c)&&(l|=y);for(let h=c.children.length-1;h>=0;h-=1){let b=c.children[h];b.kind!=="textValue"&&d.push({node:b,runId:x,visibility:y&Wn(c),containerDepth:ma(c,p)});}}Wa(r);}function qn(e){return e.localName==="t"||e.localName==="delText"?Kn(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var Ve=1,$n=2,Gn=4,H=Ve|$n|Gn;function uo(e){let t=[];for(let r of e.children)r.kind!=="textValue"&&t.push({node:r,visibility:H});let n=0;for(;t.length>0;){let{node:r,visibility:o}=t.pop();if(!(r.namespaceUri===da&&r.localName==="p")){if(r.namespaceUri===da&&qn(r)&&(n|=o,n===H))return n;for(let a of r.children)a.kind!=="textValue"&&t.push({node:a,visibility:o&Wn(r)});}}return n}function Wn(e){return e.namespaceUri!==da?H:e.localName==="ins"||e.localName==="moveTo"?Ve|$n:e.localName==="del"||e.localName==="moveFrom"?Ve|Gn:H}function po(e){let t=new Map,n=r=>{let o=a$1(r??void 0);if(o===null)return;let a=o.toLowerCase();t.has(a)||t.set(a,o);};for(let r of e){let o=[r];for(;o.length>0;){let a=o.pop();if(a.namespaceUri===so&&n(uc),a.namespaceUri===da&&a.localName==="sym"&&n(b$1(eo(a,"font"))),a.namespaceUri===da&&a.localName==="fldSimple"){let i=Ue(a,"instr");n(bd(i??"")?.font??null);}if(a.namespaceUri===da&&a.localName==="p")for(let i of q(a))n(i);for(let i=a.children.length-1;i>=0;i-=1){let s=a.children[i];s.kind!=="textValue"&&o.push(s);}}}return [...t.values()]}function Kn(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let r=n.pop();if(r.kind==="textValue")t+=r.value;else for(let o=r.children.length-1;o>=0;o-=1)n.push(r.children[o]);}return t}var Qn="FILE_TOO_LARGE",Xn=8;function fo(e){return typeof e=="object"&&e!==null}function Zn(e){if(!(!fo(e)||typeof e.code!="string"))return e.code}function Jn(e){return e===""||e.toLowerCase()==="localhost"}function mo(e){try{let t=decodeURIComponent(e);return t.includes("\0")?null:t}catch{return null}}function er(e){let t=mo(e);if(t===null)return null;let n=[];for(let r of t.split(/[/\\]/))if(!(r===""||r===".")){if(r===".."){if(n.length===0)return null;n.pop();continue}n.push(r);}return `/${n.join("/")}`}function tr(e){let t=er(e);return t===null?null:t.endsWith("/")?t:`${t}/`}function yo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function go(e){let t;try{t=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(t.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(t.username!==""||t.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!Jn(t.host))throw new TypeError("trustedRoot must be a local file: URL");let n=tr(t.pathname);if(n===null||yo(n))throw new TypeError("trustedRoot must be a directory inside the filesystem");let r=new URL("file:///");return r.pathname=n,r}function ho(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function xo(e){let t=ho(e);if(t.length===0)throw new TypeError("trustedRoot must name at least one directory");if(t.length>Xn)throw new TypeError(`trustedRoot must not exceed ${Xn} directories`);return t.map(go)}function bo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function Ro(e,t){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Jn(e.host))return null;let n=er(e.pathname);if(n===null)return null;for(let r of t){let o=tr(r.pathname);if(o===null||!n.startsWith(o)||n.length<=o.length)continue;let a=new URL("file:///");return a.pathname=n,a}return null}function Eo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function wo(e,t,n){let r=n.relative(n.resolve(e),n.resolve(t));return r!==""&&!r.startsWith("..")&&!n.isAbsolute(r)}function Yn(e,t,n){return e.some(r=>wo(r,t,n))}async function Fo(e,t){let n=[];for(let r of e)try{n.push(await t(r));}catch(o){if(Zn(o)==="ENOENT")continue;throw o}return n}function So(e){return async(t,{signal:n,maxBytes:r})=>{if(n?.aborted)throw n.reason;let[{open:o,realpath:a},{constants:i},{fileURLToPath:s},u]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),f=e.map(y=>u.resolve(s(y.href))),l=u.resolve(s(typeof t=="string"?t:t.href));if(!Yn(f,l,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let d=typeof i.O_NOFOLLOW=="number"?i.O_RDONLY|i.O_NOFOLLOW:"r",c=await o(l,d),m=()=>{c.close();};n?.addEventListener("abort",m,{once:true});try{if(n?.aborted)throw n.reason;let y=await a(l);if(!Yn(await Fo(f,a),y,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let p=(await c.stat()).size;if(!Number.isSafeInteger(p)||p<0||p>r)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Qn});let x=new Uint8Array(p),h=0;for(;h<x.byteLength;){if(n?.aborted)throw n.reason;let{bytesRead:b}=await c.read(x,h,x.byteLength-h,h);if(b===0)break;h+=b;}if(n?.aborted)throw n.reason;return h===x.byteLength?x:x.slice(0,h)}catch(y){throw n?.aborted?n.reason:y}finally{n?.removeEventListener("abort",m),await c.close().catch(()=>{});}}}function vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let t=xo(e.trustedRoot),n=bo(e.maxBytes),r=e.read??So(t),o=e.networkFetch??fetch;return(async(a,i)=>{let s=i?.signal;if(s?.aborted)throw s.reason;let u=Eo(a);if(u.protocol!=="file:")return o(u,i);let f=Ro(u,t);if(!f)return new Response(null,{status:404});let l=s?new AbortController:void 0,d=()=>l?.abort(s?.reason);s?.addEventListener("abort",d,{once:true});let c;try{if(c=await r(f,{maxBytes:n,...l?{signal:l.signal}:{}}),s?.aborted)throw s.reason;if(c.byteLength>n)return new Response(null,{status:413})}catch(m){if(s?.aborted)throw s.reason;if(l?.signal.aborted)throw l.signal.reason??m;if(m instanceof DOMException&&m.name==="AbortError"||m instanceof Error&&m.name==="AbortError")throw m;let y=Zn(m);if(y===Qn)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw m}finally{s?.removeEventListener("abort",d);}return new Response(c,{status:200})})}
1
+ import {b,k,c as c$1,d,r as r$1,h,o,l,q}from'./chunk-MBXGQN6J.js';import {qb,y,Ib,md,ae,ld,B,D,C,c,I as I$1,z,x,F,nb,ge,r,w as w$1,fa,R,Te as Te$1,Se,Ve as Ve$1,g,a,d as d$2,be,Ee,Zd,bd,b as b$2,Fa,Vd,h as h$1,Va,dd,Ya,_a,Xa,cd,$a,Za,ab,Wa,Da,Ga,Ca,xa,Na,Ye,jf,af,cf,bf,uc}from'./chunk-RXPOTTQQ.js';import'./chunk-RIYSCEFQ.js';import {d as d$1,b as b$1,a as a$1}from'./chunk-VYQTZIYH.js';import'./chunk-VP7SDFCM.js';import {I}from'./chunk-BML3CNUT.js';import {P,Q,ya,ua,va,La,Fa as Fa$1}from'./chunk-W7GY2IJC.js';import {yb,Jf,Kf,hd,gd,da,E,Rd,la,je as je$1,ma,Od,lh,Te as Te$2,Va as Va$1,fb,W,Ua,Ta,jb,ib,Sa,kg,nh}from'./chunk-MDMM3XVQ.js';var mn=new WeakMap,ar=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function ir(e){let t=mn.get(e.root);if(t)return t;let n=new Set,r=[{node:e.root,scope:Va$1(),depth:0,mcSelected:false}],o=0;for(;r.length;){let{node:i,scope:s,depth:u,mcSelected:f}=r.pop();if(++o>fb||u>W){n.add("scan-limit");break}if(i.kind==="textValue")continue;if(o+r.length+i.children.length>fb){n.add("scan-limit");break}let l=Ua(s,i),d=Ta(i)?i:void 0;if(d){if(jb(d,l).drawing)continue;let c=ib(d,l);c.refused&&n.add("scan-limit"),c.branch&&r.push({node:c.branch,scope:l,depth:u+1,mcSelected:true});continue}if(!(!f&&Sa(i))){if(i.namespaceUri==="urn:schemas-microsoft-com:vml"&&i.localName==="textbox"){n.add("legacy-textbox");continue}i.namespaceUri==="urn:schemas-microsoft-com:vml"&&ar.has(i.localName)&&!i.children.some(c=>c.kind!=="textValue"&&c.namespaceUri==="urn:schemas-microsoft-com:vml"&&c.localName==="textbox")&&n.add("legacy-drawing");for(let c of i.children)r.push({node:c,scope:l,depth:u+1,mcSelected:f});}}let a=Object.freeze([...n]);return mn.set(e.root,a),a}function yn(e){let t=new Set([e.part()]);for(let n of e.headerFooterPartsBySection())for(let r of [n.headers,n.footers])for(let o of r.values())t.add(o);for(let n of ["footnote","endnote"]){let r=Jf(e.currentPackage(),n);r&&t.add(r);}return Object.freeze([...t].flatMap(n=>ir(n).map(r=>Object.freeze({code:r,partName:n.name}))))}var sr=Object.freeze({}),cr=Object.freeze([]);function dr(e){let t=Object.keys(e);if(t.length===0)return sr;let n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=o);}return Object.freeze(n)}function lr(e){let t=new Map(Te$2(e.part())),n=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(!n.has(i)){n.add(i);for(let[s,u]of Te$2(i))t.has(s)||t.set(s,u);}let r=e.currentPackage();for(let o of ["footnote","endnote"]){let a=Jf(r,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of Te$2(a))t.has(i)||t.set(i,s);}}return t}function ur(e,t){let n=jf(e,t);if(!n)return null;let r=e.pages[n.pageIndex];if(!r)return null;let o=af(r),a=cf(e,t.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function pr(e,t){let n=[];for(let r of t.values()){let o=ur(e,r);o&&n.push(o);}return n.length===0?cr:Object.freeze(n)}function gn(e,t){return {documentMetadata:dr(e.documentProperties()),destinations:pr(t,lr(e))}}function fr(e,t){let n=e.destinations;if(n){for(let r of n)if(r.anchor.name===t)return r}}function Oe(e={}){return Object.freeze({async decode(t,n,r){let o=yb(t,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>r.maxDimension||o.pixelHeight>r.maxDimension||o.pixelWidth>r.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 mr=65536;function bn(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function yr(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function gr(e,t,n){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===n:true}function hr(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let n=null;return Ca(e,r=>{if(n||!gr(t,r.story,r.noteScopeId))return;let o=r.story==="header"||r.story==="footer"?a=>xa(a,r.origin,{x:e.box.x,y:e.box.y}):void 0;Ga(r.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(u=>u.drawingNodeId);yr(s,t.textboxPath)&&(n=bn(e,i.storyOrigin));},r.origin,o);}),n}function xr(e,t){if(t.story==="textbox")return hr(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?bf(e,e.header.box):{x:0,y:0};case "footer":return e.footer?bf(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let r=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return r?bf(e,r.box):{x:0,y:0}}case "note-separator":{let n=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes;return n?.separator?bf(e,n.separator.box):{x:0,y:0}}default:return {x:0,y:0}}}function Rn(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function En(e,t){let n=af(e);return Object.freeze({x:n.x+t.x,y:n.y+t.y,width:t.width,height:t.height})}function br(e,t){let n=jf(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!n||n.pageIndex!==t.pageIndex)return;let r=e.pages[n.pageIndex];if(!r)return;let o=xr(r,t),a=Object.freeze([Rn({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>En(r,i)))})}function Rr(e,t,n){let r=n.filter(i=>i.pageIndex===t.pageIndex);if(r.length===0)return wn(t)?br(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(r.map(i=>Rn(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>En(o,i)))})}function wn(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function xn(e,t){return `${e}\0${t}`}function Er(e,t,n){let r=Math.max(e.start,t.offset),o=Math.min(e.end,n.offset);return o>r?{start:r,end:o}:null}function wr(e,t){let n=new Map,r=new Map,o=new Set,a=0;let i=(s,u)=>{if(a>=mr)return false;a+=1;let f=xn(s.pageIndex,u),l=r.get(f);return l?l.push(s):r.set(f,[s]),true};for(let[s,u]of t.entries())for(let[f,l]of u.occurrences.entries()){if(wn(l)||l.source.start.paragraphId!==l.source.end.paragraphId)continue;o.add(l.pageIndex);let d=`${s}\0${f}`,c={paragraphId:l.source.start.paragraphId,offset:l.source.start.offset},m={paragraphId:l.source.end.paragraphId,offset:l.source.end.offset},y=c.offset<=m.offset?{from:c,to:m}:{from:m,to:c};i({key:d,from:y.from,to:y.to,pageIndex:l.pageIndex},y.from.paragraphId);}if(r.size===0)return n;for(let s of e.pages)o.has(s.index)&&Ca(s,u=>{let f=u.story==="header"||u.story==="footer"?l=>xa(l,u.origin,{x:s.box.x,y:s.box.y}):void 0;Ga(u.host,(l,d)=>{let c=bn(s,d.storyOrigin);for(let m of l.lines)for(let y of Na(m)){let p=r.get(xn(s.index,y.paragraphId));if(p)for(let x of p){let h=Er(y,x.from,x.to);if(!h)continue;let b=Ye(m,h.start,void 0,y),E=Ye(m,h.end,void 0,y),P=n.get(x.key)??[];P.push({pageIndex:s.index,x:Math.min(b,E)+c.x,y:m.box.y+c.y,width:Math.abs(E-b),height:m.box.height}),n.set(x.key,P);}}},u.origin,f);});return n}function Fn(e,t){let n=false;for(let o of t)if(o.occurrences.length!==0){n=true;break}if(!n)return t;let r=wr(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,u)=>{let f=`${a}\0${u}`,l=Rr(e,s,r.get(f)??[]);return l?{...s,geometry:l}:s});return {...o,occurrences:Object.freeze(i)}})}function Fr(e){let t=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:r,depth:o}=n.pop();if(!(r.kind==="textValue"||o>64)){r.kind==="paragraph"&&!t.has(r.id)&&t.set(r.id,t.size);for(let a=r.children.length-1;a>=0;a-=1)n.push({node:r.children[a],depth:o+1});}}return t}function Sn(){let e=new Map,t=r=>{let o=e.get(r.root);if(o)return o;let a=Fr(r);return e.set(r.root,a),a},n={retainRevisionItems:false,revisionSites:nh,locations:Fa$1,commentAnchors:kg,deepOrder:t};return Object.freeze({collectReviewItems:r=>La(r,n),deepParagraphOrderOfPart:t})}function Sr(e,t){if(t)return true;let n=e.map(r=>r.root);for(;n.length>0;){let r=n.pop();if(lh(r))return true;if(r.kind!=="textValue")for(let o of r.children)n.push(o);}return false}function vr(e,t){let n=[],r=new Set([t.name]),o=a=>{!a||r.has(a.name)||(r.add(a.name),n.push(a));};for(let a of Od(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(Jf(e,"footnote")),o(Jf(e,"endnote")),n}function Or(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return Jf(e,"footnote")?.name??null;case "endnote":return Jf(e,"endnote")?.name??null;case "note-separator":return Jf(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function Pr(e,t){let n=new Map;for(let r of e){let o=t.get(r.partName),a=o?.get(r.start.paragraphId),i=o?.get(r.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),u=Math.max(a,i),f=n.get(r.partName);n.set(r.partName,{lower:Math.min(f?.lower??s,s),upper:Math.max(f?.upper??u,u)});}return n}function Ir(e,t,n,r,o){let a=new Map(n.map(d=>[d.name,o(d)])),i=Pr(r,a),s=new Map,u=new Map,f=(d,c,m,y,p,x,h)=>{let b=a.get(d)?.get(p),E=i.get(d);if(b===void 0||!E||b<E.lower||b>E.upper)return;let P=s.get(d)??new Map;s.set(d,P);let q=u.get(d)??new Map;u.set(d,q);let z=JSON.stringify([c.story,c.noteScopeId,c.noteAreaKind]),ne=m==="textbox"?JSON.stringify([z,"textbox",y]):z,$=P.get(p)??[],G=`${p}\0${c.page.index}\0${ne}`,B=q.get(G);B||(B={pageIndex:c.page.index,story:m,rootStory:c.story,textboxPath:y,noteScopeId:c.noteScopeId,noteAreaKind:c.noteAreaKind,laneKey:ne,intervals:[],intervalKeys:new Set},q.set(G,B),$.push(B),P.set(p,$));let R=`${x}\0${h}`;B.intervalKeys?.has(R)||(B.intervalKeys?.add(R),B.intervals.push({start:x,end:h}));};Da(e,d=>{let c=Or(t,d);!c||!i.has(c)||Ga(d.host,(m,y)=>{let p=y.textboxDepth>0?"textbox":d.story,x=y.textboxPath.map(b=>b.drawingNodeId),h=[];for(let b of m.lines){for(let E of b.spans)h.push(E.range);for(let E of b.drawings??[])h.push({paragraphId:E.paragraphId,start:E.start,end:E.start+1});}h.length===0&&h.push({paragraphId:m.range.paragraphId,start:m.range.start,end:m.range.end});for(let{paragraphId:b,start:E,end:P}of h)f(c,d,p,x,b,E,P);});}),Fa(e,d=>{let c=d.drawing.ownerPartName;i.has(c)&&f(c,d.root,d.story,d.textboxPath.map(m=>m.drawingNodeId),d.drawing.paragraphId,d.drawing.start,d.drawing.start+1);});for(let d of s.values())for(let c of d.values())for(let m of c){m.intervals.sort((p,x)=>p.start-x.start||p.end-x.end);let y=[];for(let p of m.intervals){let x=y.at(-1);x&&p.start<=x.end?x.end=Math.max(x.end,p.end):y.push({...p});}m.intervals.splice(0,m.intervals.length,...y),m.intervalKeys=void 0;}let l=new Map;for(let[d,c]of s){let m=a.get(d);if(!m)continue;let y=[];for(let[p,x]of c){let h=m.get(p);h!==void 0&&y.push({paragraphId:p,position:h,laneKeys:new Set(x.map(({laneKey:b})=>b))});}y.sort((p,x)=>p.position-x.position),l.set(d,y);}return {byPart:s,orderByPart:a,visibleByPart:l}}function vn(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>>1;e[o].position<t?n=o+1:r=o;}return n}function Ar(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=t.orderByPart.get(e.partName),r=t.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!r||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),u=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:d})=>d)??[]),f=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:d})=>d)??[]),l=new Set([...u].filter(d=>f.has(d)));return l.size===0?[e.start.paragraphId,e.end.paragraphId]:r.slice(vn(r,i),vn(r,s+1)).filter(d=>[...d.laneKeys].some(c=>l.has(c))).map(d=>d.paragraphId)}function Dr(e,t,n,r){return r?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,n)};return a.end>a.start?[a]:[]})}function Lr(e,t){let n=Number.NEGATIVE_INFINITY;for(let r of e)for(let o of r.intervals)n=Math.max(n,o.end);return t!==n?new Set:new Set(e.filter(r=>r.intervals.some(o=>o.end===n)))}function On(e,t,n){let r=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let u of Ar(i,t)){let f=t.byPart.get(i.partName)?.get(u)??[],d=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,c=u===i.start.paragraphId?i.start.offset:0,m=u===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,y=d?Lr(f,c):new Set;for(let p of f){let x=Dr(p,c,m,d);d&&x.length===0&&y.has(p)&&(x=[{start:c,end:c}]);for(let h of x){let b=`${p.pageIndex}\0${p.story}\0${p.noteScopeId??""}\0${p.noteAreaKind??""}\0${p.textboxPath.join("\0")}\0${i.partName}\0${u}\0${h.start}\0${h.end}\0${s??""}`;o.has(b)||(o.add(b),r.push({pageIndex:p.pageIndex,physicalPageNumber:p.pageIndex+1,story:p.story,rootStory:p.rootStory,textboxPath:p.textboxPath,noteScopeId:p.noteScopeId,noteAreaKind:p.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:u,offset:h.start},end:{paragraphId:u,offset:h.end}}}));}}}}return r}function In(e,t){let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,r=Math.imul(r^a+o,2246822507)>>>0,r^=r>>>13;}return `${e}_${t.length.toString(36)}_${n.toString(36)}_${r.toString(36)}`}function Pn(e,t,n=In){let r=new Map;for(let a of t){let i=n(e,a),s=r.get(i)??new Set;s.add(a),r.set(i,s);}let o=new Map;for(let[a,i]of r){let s=[...i].sort();for(let[u,f]of s.entries())o.set(f,s.length===1?a:`${a}_${u.toString(36)}`);}return o}function Tr(e){let t=new Set,n=new Set;for(let r of e){if(r.kind==="comment"){t.add(r.id),r.parentId!==void 0&&t.add(r.parentId),r.parentRevisionId!==void 0&&n.add(r.parentRevisionId);for(let o of r.replyIds)t.add(o);}if(r.kind==="revision"){n.add(r.id),r.pairedWith!==void 0&&n.add(r.pairedWith);for(let o of r.replyIds)t.add(o);}}return {comment:Pn("comment",t),revision:Pn("change",n)}}function V(e,t,n){return e.get(n)??In(t,n)}function Mr(e,t,n){return e.kind==="revision"?{kind:"tracked-change",id:V(n.revision,"change",e.id),change:e.revisionKind,...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:e.text,replacedText:e.replacedText,nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:V(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(r=>V(n.comment,"comment",r)),occurrences:t?On(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:V(n.comment,"comment",e.id),author:e.comment.author,initials:va(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:ua(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:V(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:V(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(r=>V(n.comment,"comment",r)),orphaned:e.orphaned,occurrences:t&&e.range?On([e.range],t):[]}}function An(e,t){let n=t.parts.get(t.mainDocumentPart);if(!n)return [];let r=vr(t,n),o=[n,...r],a=t.parts.get(P(t,n.name));if(!Sr(o,a))return [];let i=Sn(),s=i.collectReviewItems({storyPart:n,furnitureParts:r,commentsPart:a,commentsExtendedPart:t.parts.get(Q(t,n.name))});if(s.length===0)return [];let u=s.flatMap(d=>ya(d)),f=u.length>0?Ir(e,t,o,u,i.deepParagraphOrderOfPart):null,l=Tr(s);return s.map(d=>Mr(d,f,l)).filter(d=>d!==null)}var kr=new Set(["part","validatedHandle"]);function Dn(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function J(e,t,n,r,o){if(!(r!==void 0&&kr.has(r))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)J(a,t,n,void 0,o);Object.freeze(e);return}if(!Dn(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");J(i.value,t,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function Ln(e){if(!Dn(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let r of e.pages)if(!(r===null||typeof r!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(r,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),J(i,new Set,s,o),t.add(i);}let n=(r,o)=>{let a=new Set;for(let i of r){let s=new Set;s.add(e),J(i,a,s,void 0,o);}Object.freeze(r);};for(let r of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(r==="pages"&&Array.isArray(o.value)){n(o.value,t);continue}if(r==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),J(o.value,new Set,a,r);}return Object.freeze(e),e}var Nr=Object.freeze([]),w=class extends Error{constructor(n,r,o){super(r,o);this.code=n;this.name="ExportResourceError";}code};function Br(e){try{return e instanceof w}catch{return false}}function Cr(e){try{return e instanceof Vd}catch{return false}}function _r(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function jr(e){if(Br(e))return e;let t=Cr(e),n=_r(e),r=n?`: ${n}`:"",o=new w(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${r}`:`Export layout failed${r}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function zr(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 Tn(e){if(e==="all-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, proposed, or original")}var Ur=50,Pe=64;function Vr(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Hr(e){let t=false;return Fa(e,({drawing:n})=>{Vr(n.resource)&&(t=true);}),t}function Mn(e){return !ArrayBuffer.isView(e)}function Ie(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};let n=Tn(t.displayMode??qb),r=Mn(e),o=Mn(e)?{ok:true,view:e}:I(e);if(!o.ok)return o;let a=o.view,i=t.reuseAcrossRevisions??r,s=zr(t.resourceTimeoutMs),u=t.measurer??y(),f=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),l$1=Ib({retainAcrossPasses:i}),d=0,c=new Set,m=()=>{d+=1;for(let R of c)R();c.clear();},y$1=md({session:a,decodePort:t.imageDecodePort??Oe(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:m}),p={view:a,measurer:u,paragraphCache:l$1,sessions:new Map,completed:new Map,inFlight:new Map,styles:ld(a),fieldLinks:new Map,links:ae(a),drawingBundle:y$1,furniture:new Map},x=new AbortController,h=t.signal,b=false,E=()=>b?new w("aborted","Export resource settlement was aborted"):new w("disposed","Export session has been disposed"),P=()=>{b=true,q();};function q(){let R=p;if(R){p=null,h?.removeEventListener("abort",P),x.abort(h?.reason),R.drawingBundle.dispose(),R.paragraphCache.clear();for(let F of R.completed.values())nb(F.internal),ge(F.internal);for(let F of R.fieldLinks.values())F.registry.clear();R.fieldLinks.clear(),R.completed.clear(),R.inFlight.clear(),R.furniture.clear(),R.sessions.clear(),m();}}h?.addEventListener("abort",P,{once:true}),h?.aborted&&P();let z=()=>{if(!p)throw E();if(x.signal.aborted)throw new w("aborted","Export resource settlement was aborted")},ne=(R,F,D,g)=>d!==R||p?.view.packageRevision()!==F||p?.view.currentPackage()!==D?Promise.resolve():(z(),new Promise((U,I)=>{let L=false,C,T=k=>{L||(L=true,C!==void 0&&clearTimeout(C),c.delete(M),x.signal.removeEventListener("abort",W),k?I(k):U());},M=()=>T(),W=()=>T(new w("aborted","Export resource settlement was aborted")),K=()=>{if(p?.view.packageRevision()!==F||p?.view.currentPackage()!==D){T();return}let k=g-Date.now();if(k<=0){T(new w("timedOut",`Image resources did not settle within ${s}ms`));return}C=setTimeout(K,Math.min(Ur,k));};if(c.add(M),x.signal.addEventListener("abort",W,{once:true}),d!==R||p?.view.packageRevision()!==F||p?.view.currentPackage()!==D){T();return}K();})),$=async(R,F=0,D=Date.now()+s)=>{if(z(),Date.now()>=D)throw new w("timedOut",`Export layout did not stabilize within ${s}ms`);let g=p,U=D,I=g.view.packageRevision(),L=g.view.currentPackage(),C=g.completed.get(R);if(C&&C.revision===I&&C.pkg===L)return C.published;let T=()=>{if(g.view.packageRevision()===I&&g.view.currentPackage()===L)return null;if(F>=Pe-1)throw new w("nonConvergent","Document revision did not stabilize during export layout");return $(R,F+1,U)},M=g.fieldLinks.get(R);if(!M||M.revision!==I||M.pkg!==L){let O=M?.registry??be();O.clear(),M={revision:I,pkg:L,registry:O},g.fieldLinks.set(R,M),g.furniture.delete(R);}let W=M.registry,K=g.sessions.get(R)??Ee();g.sessions.set(R,K);let k=g.furniture.get(R);k||(k=Zd({view:g.view,measurer:g.measurer,producer:f,cache:g.paragraphCache,styleCascade:g.styles.styleCascade,numberingIndex:g.styles.numberingIndex,defaultTabStopPt:g.styles.defaultTabStopPt,compatibilityMode:g.styles.compatibilityMode,displayMode:R,revisionAuthorFilter:void 0,inlineDrawingLayoutForPart:O=>g.drawingBundle.contextForPart(O),drawingLayoutTokenForPart:O=>g.drawingBundle.cacheTokenForPart(O),drawingTokenForParagraphForPart:(O,ye)=>g.drawingBundle.drawingTokenForParagraph(ye,O),linkProjectors:g.links,projectFieldLink:O=>W.project(O)}),g.furniture.set(R,k));for(let O=0;O<Pe;O+=1){let ye=d;g.drawingBundle.sync(g.view);let He=T();if(He)return He;let _=l({view:g.view,revision:g.view.packageRevision(),measurer:g.measurer,cache:g.paragraphCache,session:K,producer:f,styleCascade:g.styles.styleCascade,defaultTabStopPt:g.styles.defaultTabStopPt,numberingIndex:g.styles.numberingIndex,furniture:k,compatibilityMode:g.styles.compatibilityMode,linkProjectors:g.links,projectFieldLink:v=>W.project(v),inlineDrawingLayout:g.drawingBundle.bodyContext,inlineDrawingLayoutForPart:v=>g.drawingBundle.contextForPart(v),drawingTokenForParagraph:v=>g.drawingBundle.drawingTokenForParagraph(v,g.view.part().name),drawingTokenForParagraphForPart:(v,re)=>g.drawingBundle.drawingTokenForParagraph(re,v),drawingLayoutEpoch:g.drawingBundle.cacheTokenForPart(g.view.part().name),drawingLayoutEpochForPart:v=>g.drawingBundle.cacheTokenForPart(v),displayMode:R,revisionAuthorFilter:void 0});if(!Hr(_)){let v=T();if(v)return v;i||(nb(_),ge(_),g.paragraphCache.clear(),g.sessions.delete(R),g.furniture.delete(R));let re=An(_,L),nr=re.length===0?Nr:Object.freeze(Fn(_,re)),rr=gn(g.view,_),or={..._,...rr,contentWarnings:yn(g.view),reviewArtifacts:nr},Ge=Ln(or);return g.completed.set(R,{revision:I,pkg:L,internal:_,published:Ge}),Ge}let qe=ye;for(;g.drawingBundle.pendingResourceCount()>0;){await ne(qe,I,L,U),qe=d,z();let v=T();if(v)return v}z();let $e=T();if($e)return $e}throw new w("nonConvergent",`Image resources did not reach quiescence after ${Pe} layout passes`)},G=R=>{let F;try{F=Tn(R);}catch(I){return Promise.reject(I)}if(!p)return Promise.reject(E());let D=p,g=D.inFlight.get(F);if(g)return g;let U=$(F).catch(I=>{throw jr(I)}).finally(()=>D.inFlight.delete(F));return D.inFlight.set(F,U),U};return {ok:true,session:{layout:()=>G(n),layoutFor:G,validatedImageBytes(R){let F=p;return !F||R.resource.kind!=="ready"?null:F.drawingBundle.mintValidatedBytes(R.resource.validatedHandle,R.resource.contentId)?.slice()??null},dispose:q}}}var Ae=b$2;function De(e){return typeof e.admittedFontFace=="function"}var qr=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function pe(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function Le(e){let t=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:pe(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:t?Object.freeze({requested:pe(t.requested),resolved:pe(t.resolved),...t.lineMetrics?{lineMetrics:Object.freeze({...t.lineMetrics})}:{}}):null})}function $r(e){return Object.freeze({...Le(e),bytes:h$1(e)})}function Gr(e,t){if(!e)return null;try{let n=e(t);return !n||n instanceof d$2?null:$r(n)}catch{return null}}function kn(e){return t=>{if(e.status()!=="active")throw e.unavailable();return Gr(e.resolve(),t)}}function Wr(e){return Object.freeze(e.slice(0,Ae).map(t=>Object.freeze({request:pe(t.request),partName:t.partName,reason:t.reason})))}function Te(e,t,n,r,o=[]){let a=new Map;for(let s of [...e,t]){let u=s.toLowerCase();a.has(u)||a.set(u,s);}let i=[...a.values()].map(s=>{let u=[];for(let f of qr){let l=r?.({family:s,...f});!l||l instanceof d$2||u.push(Object.freeze({...f,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}return Object.freeze({family:s,coverage:u.length===4?"complete":u.length>0?"partial":"none",faces:Object.freeze(u)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:t,families:Object.freeze(i),originFailures:Object.freeze([...n]),droppedEmbeddedFonts:Wr(o)})}function Me(e,t){if(t.onFontResolution){try{let n=t.onFontResolution(e);Promise.resolve(n).catch(r=>{console.warn("[fonts] font-resolution diagnostics callback failed",r);});}catch(n){console.warn("[fonts] font-resolution diagnostics callback failed",n);}return}for(let n of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",n);for(let n of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",n);}function ke(e,t){if(t.fontPolicy!=="strict"||e.originFailures.length===0&&e.families.every(r=>r.coverage==="complete"))return;let n=e.families.filter(r=>r.coverage!=="complete").map(r=>r.family).join(", ");throw new w("layoutFailed",`Strict font policy refused export${n?`; incomplete families: ${n}`:"; a font origin failed"}`)}function fe(){return new Map}function Ne(e,t,n,r){if(n.trim().length===0)return null;let o={family:n,weight:r.bold?700:400,style:r.italic?"italic":"normal"},a=g(o),i=t.get(a);if(!i){try{i=e.fonts.resolve(o);}catch{return null}t.set(a,i);}return i instanceof d$2?null:i}function Nn(e,t,n){let r=n.fontFamily??e.defaultFont.family;return Ne(e,t,r,n)}function Be(e){return typeof e.shapeLaidOutText=="function"}function Ce(e){let t=fe(),n=new WeakMap;return r=>{let o=fa(r.style,r.fontSlot),a=R(r.text,o);if(a.length===0)return null;let i=o.fontFamily??e.defaultFont.family,s=Ne(e,t,i,o);if(!s)return null;try{if(o.smallCaps&&!Te$1(e.shaper,e.environment,s,o,n))return null;let u=Se(e.shaper,e.environment,s,o,a);return Object.freeze({run:u,font:Le(s),fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Bn(e){return t=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(t)??null}}var ee=new Map,me=new WeakMap,_e=0,te,je=32,Cn=c;function _n(){if(te)return te;let e=(async()=>(await r(),w$1(z)))();return te=e,e.catch(()=>{te===e&&(te=void 0);}),e}function jn(e){let t=fe();return Ve$1(e,{resolveFont(n){return Nn(e,t,n)},fallback:y()})}async function zn(e,t){if(!B(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let n=await _n(),r=await I$1(e,n,z,t);return Object.freeze({createMeasurer:()=>jn(r),resolveFont:o=>r.fonts.resolve(o),shapeLaidOutText:Ce(r),producer:["node-export-session",e.fingerprint,r.operation.shapingHash,`producer:${r.operation.producerVersion}`,`fallback:${x}`].join("|"),extensionFingerprint:e.fingerprint})}function Kr(e,t){if(!B(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=me.get(e);if(n)return n;let r=D(e),o=ee.get(r);if(!o){if(ee.size>=je)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${je} process-wide configurations`));o=(async()=>{let u=C(e).sources.reduce((l,d)=>l+(d.availability==="forbidden"?0:d.bytes.byteLength),0);if(_e+u>Cn)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Cn} process-wide`);_e+=u;let f;try{let l=await _n();f=await I$1(e,l,z,t);}catch(l){throw _e-=u,l}return Object.freeze({createMeasurer:()=>jn(f),shapeLaidOutText:Ce(f),shapingHash:f.operation.shapingHash,producerVersion:f.operation.producerVersion})})(),ee.set(r,o),o.catch(()=>{ee.get(r)===o&&ee.delete(r);});}let a=e.fingerprint,i=o.then(s=>Object.freeze({createMeasurer:s.createMeasurer,shapeLaidOutText:s.shapeLaidOutText,producer:["node-export",a,s.shapingHash,`producer:${s.producerVersion}`,`fallback:${x}`].join("|"),extensionFingerprint:a}));return me.set(e,i),i.catch(()=>{me.get(e)===i&&me.delete(e);}),i}var Xr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function Yr(e){let t=e.currentPackage(),n=(t.relationships.get(t.mainDocumentPart)??[]).find(o=>o.type===Xr),r;if(n){let o=E(n);o.mode==="Internal"&&o.target.ok&&(r=t.parts.get(o.target.partName));}return r??=t.parts.get("/word/fontTable.xml"),Rd(t,r)}function Un(e,t){let n=Yr(e);if(n.length!==0)return h(r=>{let o$1=new Set((r.resolvedFaces??[]).map(i=>g(i))),a$1=o(n,{maxFontBytes:a,aggregateBudget:Qr(r),shadowedRequests:o$1});if(t)for(let i of a$1.dropped){if(t.dropped.length>=Ae)break;t.dropped.push(i);}return {sources:a$1.sources}})}function Qr(e){let t=e.committedSourceBytes;return t===void 0||!Number.isSafeInteger(t)||t<=0?c:Math.max(0,c-t)}function Zr(e){return De(e)&&Be(e)}var N=0,Vn=Symbol("font-resolution-timeout");function Jr(e){let t=0,n=false;return e?.(N),{reserve:o=>{if(n)throw new Error("Document font-byte lease is already released");if(N+o>c)throw new w("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${o} bytes with ${N} bytes already active`);N+=o,t+=o,e?.(N);let a=false;return ()=>{a||n||(a=true,N-=o,t-=o,e?.(N));}},release:()=>{n||(n=true,N-=t,t=0,e?.(N));}}}function Ue(e,t){return e.attributes.find(n=>n.localName===t)?.value}function eo(e,t){return e.attributes.find(n=>n.localName===t&&(n.namespaceUri===da||n.namespaceUri===""))?.value}async function to(e,t){if(t.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(t.signal?.aborted)return {ok:false,reason:"aborted"};let n=I(e);if(!n.ok)return n;let{fonts:r,fontResolutionTimeoutMs:o,fontPolicy:a,onFontResolution:i,...s}=t,u=Array.isArray(r)?r:[r],f,l;try{l=await no(n.view,u,{signal:t.signal,timeoutMs:o??t.resourceTimeoutMs,fontPolicy:a,onFontResolution:b=>(f=b,i?.(b))});}catch(b){if(b instanceof w&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!f)throw l?.dispose(),new w("layoutFailed","Document font resolution completed without publishing its evidence");let d;try{d=Ie(n.view,{...s,reuseAcrossRevisions:!1,...l?{measurer:l.createMeasurer(),producer:t.producer??l.producer}:t.producer?{producer:t.producer}:{}});}catch(b){throw l?.dispose(),b}if(!d.ok)return l?.dispose(),d;let c=d.session,m=l,y="active",p=()=>y==="aborted"?new w("aborted","Export resource settlement was aborted"):new w("disposed","Export session has been disposed"),x=b=>{if(y==="active"){y=b,t.signal?.removeEventListener("abort",h);try{c.dispose();}finally{m?.dispose(),m=void 0;}}},h=()=>x("aborted");return t.signal?.addEventListener("abort",h,{once:true}),t.signal?.aborted&&h(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>y==="active"?c.layout():Promise.reject(p()),layoutFor:b=>y==="active"?c.layoutFor(b):Promise.reject(p()),validatedImageBytes:b=>y==="active"?c.validatedImageBytes(b):null,admittedFontFace:kn({status:()=>y,unavailable:p,resolve:()=>m?.resolveFont}),shapeLaidOutText:Bn({status:()=>y,unavailable:p,shaping:()=>m}),dispose:()=>x("disposed")})}}async function no(e,t,n={}){let r=ro(n.timeoutMs),o=new AbortController,a=()=>o.abort(n.signal?.reason);n.signal?.addEventListener("abort",a,{once:true}),n.signal?.aborted&&a();let i=setTimeout(()=>o.abort(Vn),r);try{ze(o.signal);let s=(async()=>{let u=Jr(n.onActiveFontBytesChange),f=!1;try{let l=ao(e).slice(0,b),d$1=[],c={dropped:[]},m=Un(e,c),y=m?[...t,m]:t,p=await k(y,{families:l,defaultFamily:c$1.family,signal:o.signal},{onOriginFailure:E=>d$1.push(E),reserveOwnedBytes:u.reserve});ze(o.signal);let x=d(p??{});if(x.sources.length===0){let E=Te(l,x.defaultFont.family,d$1,void 0,c.dropped);Me(E,n),ke(E,n);return}let h=await zn(F(x));ze(o.signal);let b$1=Te(l,x.defaultFont.family,d$1,h.resolveFont,c.dropped);return Me(b$1,n),ke(b$1,n),f=!0,Object.freeze({...h,dispose:u.release})}finally{f||u.release();}})();return await Promise.race([s,oo(o.signal)])}finally{clearTimeout(i),n.signal?.removeEventListener("abort",a);}}function ro(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function oo(e){return new Promise((t,n)=>{let r=()=>{n(Hn(e));};e.aborted?r():e.addEventListener("abort",r,{once:true});})}function Hn(e){let t=e.reason===Vn;return new w(t?"timedOut":"aborted",t?"Font resolution timed out":"Font resolution was aborted",t?void 0:{cause:e.reason})}function ze(e){if(e.aborted)throw Hn(e)}function ao(e){let t=[e.part().root],n=[],r=[],o=new Set([e.part().name]),a=(l,d)=>{!d||o.has(d.name)||(o.add(d.name),l.push(d.root));};for(let l of e.headerFooterPartsBySection()){for(let d of l.headers.values())a(n,d);for(let d of l.footers.values())a(n,d);}for(let l of ["footnote","endnote"])r.push(...io(e,l));let i=e.documentThemeFonts(),s={major:i.major,minor:i.minor,majorEastAsia:i.majorEastAsia??null,minorEastAsia:i.minorEastAsia??null},u=new Map,f=(l,d)=>{let c=d$1(l,e.stylesRoot(),s,co(l,d)),m=r$1(l,e.numberingRoot(),e.stylesRoot(),s);for(let y of [...c.direct,...po(l),...m,...c.inherited]){let p=y.toLowerCase();u.has(p)||u.set(p,y);}};return f(t,"body"),f(n,"furniture"),f(r,"note"),[...u.values()]}function io(e,t){let n=Jf(e.currentPackage(),t);if(!n)return [];let r=new Set(Kf(e.part()).filter(a=>a.noteKind===t).map(a=>a.noteId)),o=[];for(let a of n.root.children){if(a.kind==="textValue")continue;let i=hd(a),s=gd(a);(i==="separator"||i==="continuationSeparator"||s!==null&&r.has(s))&&o.push(a);}return o}var so="http://schemas.openxmlformats.org/officeDocument/2006/math";function co(e,t){let n=new Set;for(let r of e){let o=[],a=[{node:r,context:t}];for(;a.length>0;){let{node:i,context:s}=a.pop();i.namespaceUri===da&&i.localName==="p"&&o.push({paragraph:i,context:s});let u=i.namespaceUri===da&&i.localName==="txbxContent"&&(s==="body"||s==="note")?"detached":s;for(let f=i.children.length-1;f>=0;f-=1){let l=i.children[f];l.kind!=="textValue"&&a.push({node:l,context:u});}}for(let i of o)lo(i.paragraph,n,i.context);}return n}function lo(e,t,n){let r=Va(),o=null,a=null,i="",s=false,u=false,f=false,l=0,d=[];for(let c=e.children.length-1;c>=0;c-=1){let m=e.children[c];m.kind!=="textValue"&&d.push({node:m,runId:null,visibility:H,containerDepth:0});}for(;d.length>0;){let{node:c,runId:m,visibility:y,containerDepth:p}=d.pop();if(p>=la||c.namespaceUri===da&&c.localName==="p")continue;let x=c.namespaceUri===da&&c.localName==="r"?c.id:m;if(c.namespaceUri===da&&c.localName==="fldSimple"){let h=Ue(c,"instr")??"";dd(h,{allowPageFields:n==="body"||n==="furniture",allowRefFields:n==="body"||n==="note",allowPageRef:n==="body",allowAutonum:n==="body"||n==="note"})&&uo(c)!==H&&t.add(c.id);}if(c.namespaceUri===da&&c.localName==="fldChar"){let h=Ue(c,"fldCharType");if(h==="begin")Ya(r),r.nesting===1&&(o=x,a=null,i="",s=false,u=false,f=je$1(c),l=0);else if(h==="separate"){let b=r.nesting===1;if(_a(r),b){let E=Xa(r);i=E.instruction,s=E.overflow||r.nestingOverflow,a=x,u=true;}}else if(h==="end"){if(r.nesting===1){if(r.phase==="instruction"){let E=Xa(r);i=E.instruction,s=E.overflow||r.nestingOverflow;}if(!s&&cd(i,{hasSeparate:u,hasLegacyFormData:f,allowPageFields:n==="body"||n==="furniture",allowRefFields:n==="body"||n==="note",allowPageRef:n==="body",allowAutonum:n==="body"||n==="note"})&&l!==H){let E=a??o;E&&t.add(E);}}$a(r);}continue}if(c.namespaceUri===da&&(c.localName==="instrText"||c.localName==="delInstrText")){Za(r,Kn(c),c.localName==="delInstrText");continue}r.nesting>0&&ab(r)&&c.namespaceUri===da&&qn(c)&&(l|=y);for(let h=c.children.length-1;h>=0;h-=1){let b=c.children[h];b.kind!=="textValue"&&d.push({node:b,runId:x,visibility:y&Wn(c),containerDepth:ma(c,p)});}}Wa(r);}function qn(e){return e.localName==="t"||e.localName==="delText"?Kn(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var Ve=1,$n=2,Gn=4,H=Ve|$n|Gn;function uo(e){let t=[];for(let r of e.children)r.kind!=="textValue"&&t.push({node:r,visibility:H});let n=0;for(;t.length>0;){let{node:r,visibility:o}=t.pop();if(!(r.namespaceUri===da&&r.localName==="p")){if(r.namespaceUri===da&&qn(r)&&(n|=o,n===H))return n;for(let a of r.children)a.kind!=="textValue"&&t.push({node:a,visibility:o&Wn(r)});}}return n}function Wn(e){return e.namespaceUri!==da?H:e.localName==="ins"||e.localName==="moveTo"?Ve|$n:e.localName==="del"||e.localName==="moveFrom"?Ve|Gn:H}function po(e){let t=new Map,n=r=>{let o=a$1(r??void 0);if(o===null)return;let a=o.toLowerCase();t.has(a)||t.set(a,o);};for(let r of e){let o=[r];for(;o.length>0;){let a=o.pop();if(a.namespaceUri===so&&n(uc),a.namespaceUri===da&&a.localName==="sym"&&n(b$1(eo(a,"font"))),a.namespaceUri===da&&a.localName==="fldSimple"){let i=Ue(a,"instr");n(bd(i??"")?.font??null);}if(a.namespaceUri===da&&a.localName==="p")for(let i of q(a))n(i);for(let i=a.children.length-1;i>=0;i-=1){let s=a.children[i];s.kind!=="textValue"&&o.push(s);}}}return [...t.values()]}function Kn(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let r=n.pop();if(r.kind==="textValue")t+=r.value;else for(let o=r.children.length-1;o>=0;o-=1)n.push(r.children[o]);}return t}var Qn="FILE_TOO_LARGE",Xn=8;function fo(e){return typeof e=="object"&&e!==null}function Zn(e){if(!(!fo(e)||typeof e.code!="string"))return e.code}function Jn(e){return e===""||e.toLowerCase()==="localhost"}function mo(e){try{let t=decodeURIComponent(e);return t.includes("\0")?null:t}catch{return null}}function er(e){let t=mo(e);if(t===null)return null;let n=[];for(let r of t.split(/[/\\]/))if(!(r===""||r===".")){if(r===".."){if(n.length===0)return null;n.pop();continue}n.push(r);}return `/${n.join("/")}`}function tr(e){let t=er(e);return t===null?null:t.endsWith("/")?t:`${t}/`}function yo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function go(e){let t;try{t=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(t.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(t.username!==""||t.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!Jn(t.host))throw new TypeError("trustedRoot must be a local file: URL");let n=tr(t.pathname);if(n===null||yo(n))throw new TypeError("trustedRoot must be a directory inside the filesystem");let r=new URL("file:///");return r.pathname=n,r}function ho(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function xo(e){let t=ho(e);if(t.length===0)throw new TypeError("trustedRoot must name at least one directory");if(t.length>Xn)throw new TypeError(`trustedRoot must not exceed ${Xn} directories`);return t.map(go)}function bo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function Ro(e,t){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Jn(e.host))return null;let n=er(e.pathname);if(n===null)return null;for(let r of t){let o=tr(r.pathname);if(o===null||!n.startsWith(o)||n.length<=o.length)continue;let a=new URL("file:///");return a.pathname=n,a}return null}function Eo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function wo(e,t,n){let r=n.relative(n.resolve(e),n.resolve(t));return r!==""&&!r.startsWith("..")&&!n.isAbsolute(r)}function Yn(e,t,n){return e.some(r=>wo(r,t,n))}async function Fo(e,t){let n=[];for(let r of e)try{n.push(await t(r));}catch(o){if(Zn(o)==="ENOENT")continue;throw o}return n}function So(e){return async(t,{signal:n,maxBytes:r})=>{if(n?.aborted)throw n.reason;let[{open:o,realpath:a},{constants:i},{fileURLToPath:s},u]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),f=e.map(y=>u.resolve(s(y.href))),l=u.resolve(s(typeof t=="string"?t:t.href));if(!Yn(f,l,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let d=typeof i.O_NOFOLLOW=="number"?i.O_RDONLY|i.O_NOFOLLOW:"r",c=await o(l,d),m=()=>{c.close();};n?.addEventListener("abort",m,{once:true});try{if(n?.aborted)throw n.reason;let y=await a(l);if(!Yn(await Fo(f,a),y,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let p=(await c.stat()).size;if(!Number.isSafeInteger(p)||p<0||p>r)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Qn});let x=new Uint8Array(p),h=0;for(;h<x.byteLength;){if(n?.aborted)throw n.reason;let{bytesRead:b}=await c.read(x,h,x.byteLength-h,h);if(b===0)break;h+=b;}if(n?.aborted)throw n.reason;return h===x.byteLength?x:x.slice(0,h)}catch(y){throw n?.aborted?n.reason:y}finally{n?.removeEventListener("abort",m),await c.close().catch(()=>{});}}}function vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let t=xo(e.trustedRoot),n=bo(e.maxBytes),r=e.read??So(t),o=e.networkFetch??fetch;return(async(a,i)=>{let s=i?.signal;if(s?.aborted)throw s.reason;let u=Eo(a);if(u.protocol!=="file:")return o(u,i);let f=Ro(u,t);if(!f)return new Response(null,{status:404});let l=s?new AbortController:void 0,d=()=>l?.abort(s?.reason);s?.addEventListener("abort",d,{once:true});let c;try{if(c=await r(f,{maxBytes:n,...l?{signal:l.signal}:{}}),s?.aborted)throw s.reason;if(c.byteLength>n)return new Response(null,{status:413})}catch(m){if(s?.aborted)throw s.reason;if(l?.signal.aborted)throw l.signal.reason??m;if(m instanceof DOMException&&m.name==="AbortError"||m instanceof Error&&m.name==="AbortError")throw m;let y=Zn(m);if(y===Qn)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw m}finally{s?.removeEventListener("abort",d);}return new Response(c,{status:200})})}
2
2
  export{w as ExportResourceError,je as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,Kr as acquireSharedExportShaping,Oe as createNodeImageDecodePort,vo as createPackagedFileFetch,fr as exportDestinationNamed,De as hasExportAdmittedFont,Be as hasExportLaidOutText,Zr as hasFontBackedExportCapabilities,Ie as openDocumentForExport,to as openFontBackedDocumentForExport};
@@ -1,4 +1,4 @@
1
- import { F as FontSource, a as FontSourceSubstitution, b as FontFaceRequest, c as FontConfiguration } from './editor-PDx0fqSo.js';
1
+ import { F as FontSource, a as FontSourceSubstitution, b as FontFaceRequest, c as FontConfiguration } from './editor-BlerWPyk.js';
2
2
 
3
3
  /**
4
4
  * A partial font configuration one origin contributes: sources, substitutions, or both.
@@ -1,5 +1,5 @@
1
- import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-BZVHctVD.js';
2
- import { b as OoxmlPackage, O as OoxmlPart, c as OoxmlElement, g as OoxmlPackageRejection } from './tree-op-types-C5rZzoAz.js';
1
+ import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-kSSFMq9X.js';
2
+ import { b as OoxmlPackage, O as OoxmlPart, c as OoxmlElement, g as OoxmlPackageRejection } from './tree-op-types-C71G7rIv.js';
3
3
 
4
4
  /** The package with a hyperlink relationship guaranteed present, and that relationship's id. */
5
5
  interface EnsuredHyperlinkRelationship {
@@ -1,4 +1,4 @@
1
- import { O as OoxmlPart, a as OoxmlNode, c as OoxmlElement, b as OoxmlPackage } from './tree-op-types-C5rZzoAz.js';
1
+ import { O as OoxmlPart, a as OoxmlNode, c as OoxmlElement, b as OoxmlPackage } from './tree-op-types-C71G7rIv.js';
2
2
 
3
3
  /** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
4
4
  type HeaderFooterVariant = 'default' | 'first' | 'even';
@@ -1,19 +1,19 @@
1
- import { T as TreeDocOp, E as ImageDecodePort, v as DrawingPositionInput, Y as DrawingTransform, F as DrawingTreeDocOp, y as SupportedImageMime } from './tree-op-types-C5rZzoAz.js';
1
+ import { T as TreeDocOp, E as ImageDecodePort, v as DrawingPositionInput, Y as DrawingTransform, F as DrawingTreeDocOp, y as SupportedImageMime } from './tree-op-types-C71G7rIv.js';
2
2
  import { Unsubscribe, ExecResult, ParagraphTabStop, IndentFormatting, ParagraphFlags, ParagraphDisagreements, SelectionPin } from './contracts/types.js';
3
- import { g as ReviewRevisionKind } from './review-items-kC-YI70C.js';
3
+ import { g as ReviewRevisionKind } from './review-items-CiliAz8H.js';
4
4
  import { EditorModule, ReviewModuleContribution } from './contracts/modules.js';
5
- import { D as DocumentSource, c as FontConfiguration, Z as ZoomMode, E as EditorFontError, n as Editor, e as EditorCommand, C as CanResult, S as SelectedImageState, o as FormatPainterSurfaceState, h as TrackedChangePredicate, T as TrackedChangeFilterMode, b as FontFaceRequest, F as FontSource, I as ImageContext, p as TableBorderEdgeTarget, q as TableBorderSpec, r as TableBorderStyle, t as TableContext } from './editor-PDx0fqSo.js';
6
- import { R as RevisionDisplayMode } from './revision-projection-CN_DiOl_.js';
7
- import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-NGeYzYCN.js';
8
- import { e as FontConfigurationFragment, g as FontResolver } from './font-resolver-CdqOugwZ.js';
5
+ import { D as DocumentSource, c as FontConfiguration, Z as ZoomMode, E as EditorFontError, n as Editor, e as EditorCommand, C as CanResult, S as SelectedImageState, o as FormatPainterSurfaceState, h as TrackedChangePredicate, T as TrackedChangeFilterMode, b as FontFaceRequest, F as FontSource, I as ImageContext, p as TableBorderEdgeTarget, q as TableBorderSpec, r as TableBorderStyle, t as TableContext } from './editor-BlerWPyk.js';
6
+ import { R as RevisionDisplayMode } from './revision-projection-JiDclAFU.js';
7
+ import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-2vPh96Ey.js';
8
+ import { e as FontConfigurationFragment, g as FontResolver } from './font-resolver-DtADJcLL.js';
9
9
  import { EditorCollaborationSession, CollaborationRemoteSelection, CollaborationModuleContribution } from './collaboration.js';
10
- import { c as RevisionStyles, R as ReviewAuthorInfo, b as RevisionAuthorStyle, F as FieldShadingMode, d as DrawingPaintStrings } from './semantic-paint-CM8F-8pH.js';
11
- import { b as ResolvedFootnoteProperties, R as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-BosjbkGC.js';
12
- import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-BreR44Ki.js';
13
- import { B as BookmarkIndex } from './custom-node-writes-4WOL8JB_.js';
14
- import { I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, b as ImageIntentResult } from './tree-package-fragment-DDQHk8sv.js';
15
- import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-BMrXDniV.js';
16
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-dKgbKH9A.js';
10
+ import { c as RevisionStyles, R as ReviewAuthorInfo, b as RevisionAuthorStyle, F as FieldShadingMode, d as DrawingPaintStrings } from './semantic-paint-BEjYcsPK.js';
11
+ import { b as ResolvedFootnoteProperties, R as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-D5_fXW9K.js';
12
+ import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-Bc-MGXbM.js';
13
+ import { B as BookmarkIndex } from './custom-node-writes-ClTkWM7s.js';
14
+ import { I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, b as ImageIntentResult } from './tree-package-fragment-DRJkmfTW.js';
15
+ import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-C-VsxNee.js';
16
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-Cp5W25RC.js';
17
17
  import { C as CollaborationStatus } from './failure-BnGjoXf0.js';
18
18
  import { V as ViewScope } from './editor-scope-DZJT4ukT.js';
19
19
  import './contracts/document.js';
@@ -1131,6 +1131,9 @@ interface PaginatedSurfaceOptions {
1131
1131
  * without remeasuring a single line.
1132
1132
  */
1133
1133
  readonly fieldShading?: FieldShadingMode;
1134
+ /** Show paragraph-end furniture without changing document content. */
1135
+ readonly showParagraphMarks?: boolean;
1136
+ readonly onToggleParagraphMarks?: () => void;
1134
1137
  /**
1135
1138
  * How tracked changes are coloured: by AUTHOR (the default), by kind, or by author with
1136
1139
  * host-pinned colours. A paint-level option like {@link fieldShading}: it changes no
@@ -1811,6 +1814,8 @@ interface PaginatedSurface {
1811
1814
  * remeasuring a line, and the caret, selection and undo history stay where they are.
1812
1815
  */
1813
1816
  setRevisionStyles(colors: RevisionStyles | undefined): void;
1817
+ /** Toggle paragraph-end furniture without layout or document changes. */
1818
+ setShowParagraphMarks(show: boolean): void;
1814
1819
  /**
1815
1820
  * Hand remote-caret label content to the host, or take it back with `null`.
1816
1821
  *
@@ -1851,6 +1856,8 @@ interface PaginatedSurface {
1851
1856
  * would mean another to a script that assumed the resolved result.
1852
1857
  */
1853
1858
  revisionDisplayMode(): RevisionDisplayMode;
1859
+ /** Change the review display without accepting, rejecting, or changing author filters. */
1860
+ setRevisionDisplayMode(mode: RevisionDisplayMode): void;
1854
1861
  /**
1855
1862
  * Where a replacement for `[start, end)` of a paragraph lands, or null when the edit would
1856
1863
  * not be tracked.
@@ -1933,7 +1940,9 @@ interface PaginatedSurface {
1933
1940
  * evidence, so a host saw the wrong twin active for one frame and then a correction. Omit it
1934
1941
  * to pin against the live selection, which is what a header or note scope has already set.
1935
1942
  */
1936
- activateReview(key: string, selection?: SemanticSelection): void;
1943
+ activateReview(key: string, selection?: SemanticSelection, options?: {
1944
+ readonly allowExcluded?: boolean;
1945
+ }): void;
1937
1946
  /**
1938
1947
  * The key {@link activateReview} pinned, or null once its selection is no longer live.
1939
1948
  *
@@ -2582,6 +2591,78 @@ declare const CHROME_GROUPS: readonly [{
2582
2591
  readonly id: "review";
2583
2592
  readonly labelKey: "formattingBar.commentsAndChanges";
2584
2593
  readonly controls: readonly [{
2594
+ readonly id: "allMarkup";
2595
+ readonly shape: "icon";
2596
+ readonly labelKey: "review.allMarkup";
2597
+ readonly defaultToolbar: false;
2598
+ readonly paths: readonly string[];
2599
+ readonly state: {
2600
+ readonly kind: "command";
2601
+ };
2602
+ }, {
2603
+ readonly id: "noMarkup";
2604
+ readonly shape: "icon";
2605
+ readonly labelKey: "review.noMarkup";
2606
+ readonly defaultToolbar: false;
2607
+ readonly paths: readonly string[];
2608
+ readonly state: {
2609
+ readonly kind: "command";
2610
+ };
2611
+ }, {
2612
+ readonly id: "original";
2613
+ readonly shape: "icon";
2614
+ readonly labelKey: "review.original";
2615
+ readonly defaultToolbar: false;
2616
+ readonly paths: readonly string[];
2617
+ readonly state: {
2618
+ readonly kind: "command";
2619
+ };
2620
+ }, {
2621
+ readonly id: "previousChange";
2622
+ readonly shape: "icon";
2623
+ readonly labelKey: "review.previousChange";
2624
+ readonly defaultToolbar: false;
2625
+ readonly paths: readonly string[];
2626
+ readonly state: {
2627
+ readonly kind: "command";
2628
+ };
2629
+ }, {
2630
+ readonly id: "nextChange";
2631
+ readonly shape: "icon";
2632
+ readonly labelKey: "review.nextChange";
2633
+ readonly defaultToolbar: false;
2634
+ readonly paths: readonly string[];
2635
+ readonly state: {
2636
+ readonly kind: "command";
2637
+ };
2638
+ }, {
2639
+ readonly id: "acceptAllChanges";
2640
+ readonly shape: "icon";
2641
+ readonly labelKey: "review.acceptAllChanges";
2642
+ readonly defaultToolbar: false;
2643
+ readonly paths: readonly string[];
2644
+ readonly state: {
2645
+ readonly kind: "command";
2646
+ };
2647
+ }, {
2648
+ readonly id: "rejectAllChanges";
2649
+ readonly shape: "icon";
2650
+ readonly labelKey: "review.rejectAllChanges";
2651
+ readonly defaultToolbar: false;
2652
+ readonly paths: readonly string[];
2653
+ readonly state: {
2654
+ readonly kind: "command";
2655
+ };
2656
+ }, {
2657
+ readonly id: "paragraphMarks";
2658
+ readonly shape: "icon";
2659
+ readonly labelKey: "formattingBar.paragraphMarks";
2660
+ readonly defaultToolbar: false;
2661
+ readonly paths: readonly string[];
2662
+ readonly state: {
2663
+ readonly kind: "command";
2664
+ };
2665
+ }, {
2585
2666
  readonly id: "comments";
2586
2667
  readonly shape: "icon";
2587
2668
  readonly labelKey: "formattingBar.commentsAndChanges";
@@ -2860,7 +2941,7 @@ type ChromeGroupId = 'history' | 'zoom' | 'styles' | 'font' | 'text' | 'script'
2860
2941
  *
2861
2942
  * @public
2862
2943
  */
2863
- type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.comments' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'file.open' | 'file.save' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc';
2944
+ type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.comments' | 'review.paragraphMarks' | 'review.allMarkup' | 'review.noMarkup' | 'review.original' | 'review.previousChange' | 'review.nextChange' | 'review.acceptAllChanges' | 'review.rejectAllChanges' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'file.open' | 'file.save' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc';
2864
2945
  /**
2865
2946
  * Every control id in the chrome, as a literal union. Unique WITHIN a group, not
2866
2947
  * globally (`image.insert` / `table.insert`) — key consumers on {@link ChromeSlotId}.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkKQEUFAAG_cjs=require('./chunk-KQEUFAAG.cjs');require('./chunk-ZKWRCLT2.cjs'),require('./chunk-66DTF4TD.cjs');var chunkFAD7DH6Q_cjs=require('./chunk-FAD7DH6Q.cjs');require('./chunk-EWV5JMJY.cjs'),require('./chunk-TDHR2QLH.cjs'),require('./chunk-XKQTITOJ.cjs'),require('./chunk-YRTRPSSA.cjs'),require('./chunk-FGBADUSK.cjs'),require('./chunk-WGHVIB6B.cjs'),require('./chunk-4MIFIUEV.cjs'),require('./chunk-67U2OZS7.cjs'),require('./chunk-BTQKU64Q.cjs'),require('./chunk-BPSGGVP5.cjs'),require('./chunk-GHNTGVKG.cjs'),require('./chunk-OHJQ7GPZ.cjs');Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.ua}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.ya}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.d}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.za}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.ha}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.ja}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.La}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.i}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.h}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.pa}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkKQEUFAAG_cjs.la}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkFAD7DH6Q_cjs.g}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkFAD7DH6Q_cjs.f}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkFAD7DH6Q_cjs.c}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkFAD7DH6Q_cjs.d}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkFAD7DH6Q_cjs.j}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkFAD7DH6Q_cjs.h}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkFAD7DH6Q_cjs.i}});
1
+ 'use strict';var chunkDD7ETSGW_cjs=require('./chunk-DD7ETSGW.cjs');require('./chunk-ZKWRCLT2.cjs'),require('./chunk-B2HDVIGY.cjs');var chunkG5GLQ4SX_cjs=require('./chunk-G5GLQ4SX.cjs');require('./chunk-JROG4U3Z.cjs'),require('./chunk-TDMGSCCL.cjs'),require('./chunk-OISZDVXT.cjs'),require('./chunk-PRNYSOQL.cjs'),require('./chunk-FGBADUSK.cjs'),require('./chunk-NPZX5O23.cjs'),require('./chunk-NO7U62I2.cjs'),require('./chunk-JP253KIZ.cjs'),require('./chunk-BTQKU64Q.cjs'),require('./chunk-UIB2MDE3.cjs'),require('./chunk-ZFBNCHRP.cjs'),require('./chunk-OHJQ7GPZ.cjs');Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.ua}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.ya}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.d}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.za}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.ha}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.ja}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.La}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.i}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.h}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.pa}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.la}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.g}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.f}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.c}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.d}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.j}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.h}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.i}});
package/dist/index.d.ts CHANGED
@@ -1,27 +1,27 @@
1
- export { z as DrawingHorizontalReferenceFrame, D as DrawingKind, w as DrawingLocks, v as DrawingPositionInput, A as DrawingVerticalReferenceFrame, x as ImageResourceState, u as ImageWrapTarget, P as PreservedImageMime, t as RenderableImageMime, R as RevisionAddress, y as SupportedImageMime, V as ValidatedImageBytesHandle, B as VectorImageMime } from './tree-op-types-C5rZzoAz.js';
1
+ export { z as DrawingHorizontalReferenceFrame, D as DrawingKind, w as DrawingLocks, v as DrawingPositionInput, A as DrawingVerticalReferenceFrame, x as ImageResourceState, u as ImageWrapTarget, P as PreservedImageMime, t as RenderableImageMime, R as RevisionAddress, y as SupportedImageMime, V as ValidatedImageBytesHandle, B as VectorImageMime } from './tree-op-types-C71G7rIv.js';
2
2
  export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, InsertableContentControlType, NumberingRef, PageMargins, Paragraph, ParagraphDisagreements, ParagraphFlags, ParagraphFormatCommand, ParagraphTabStop, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './contracts/types.js';
3
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from './review-items-kC-YI70C.js';
3
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from './review-items-CiliAz8H.js';
4
4
  export { CollectReviewItems, EditorModule, ReviewModuleContribution } from './contracts/modules.js';
5
- export { A as AuthoredNoteNumbering, C as CanResult, u as DocumentChange, w as DocumentEditingMode, x as DocumentHandle, D as DocumentSource, n as Editor, e as EditorCommand, y as EditorCommandShape, z as EditorCommands, B as EditorError, G as EditorEvents, E as EditorFontError, H as EditorFontErrorCode, J as EditorFormatPainterCommands, K as EditorHeaderFooterCommands, L as EditorNoteCommands, M as EditorPosition, N as EditorQueries, O as EditorQuery, P as EditorQueryResults, Q as EditorSelection, d as EditorSnapshot, c as FontConfiguration, b as FontFaceRequest, F as FontSource, a as FontSourceSubstitution, R as FormatPainterLevel, U as FormatPainterMode, o as FormatPainterSurfaceState, V as FurnitureVariant, W as HeaderFooterSlotArgs, X as HeaderFooterState, Y as HyperlinkInfo, I as ImageContext, f as ImageCropPercent, _ as NoteKind, $ as NotePropertiesSide, a0 as NotePropertiesState, a1 as PageSetup, a2 as ResolvedNoteNumbering, a3 as ReviewActivationOptions, a4 as ReviewCommentPlacement, a5 as ReviewCustomPlacement, a6 as ReviewItemPlacement, a7 as ReviewItemPlacementBase, a8 as ReviewItemQuery, a9 as ReviewRevisionPlacement, S as SelectedImageState, p as TableBorderEdgeTarget, q as TableBorderSpec, r as TableBorderStyle, aa as TableBorderTarget, ab as TableCellVerticalAlignment, ac as TableColumnDividerResizeTarget, ad as TableColumnOccurrenceTarget, t as TableContext, ae as TableRightEdgeResizeTarget, af as TableRowOccurrenceTarget, ag as TextMatch, T as TrackedChangeFilterMode, h as TrackedChangePredicate, ah as ZoomFitTarget, Z as ZoomMode } from './editor-PDx0fqSo.js';
6
- export { R as RevisionDisplayMode } from './revision-projection-CN_DiOl_.js';
7
- export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-NGeYzYCN.js';
8
- export { C as ComposeFontOriginsOptions, b as FONT_RESOLVER_BRAND, c as FONT_RESOLVER_MARK_KEY, d as FontConfigurationBase, e as FontConfigurationFragment, a as FontOrigin, F as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, i as MarkedFontResolver, W as WORD_DEFAULT_FONT, j as composeFontConfiguration, k as composeFontOrigins, l as defineFontResolver, m as isFontResolver } from './font-resolver-CdqOugwZ.js';
9
- export { C as CHROME_GROUPS, b as CHROME_MENUS, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromeSlotId, q as DocxEditorConfig, D as DocxEditorInstance, v as FontLoadFailure, w as FontLoadFailureReason, x as FontMeasurementState, y as FontUrlSource, H as HyperlinkActivation, z as HyperlinkChromeHandlers, N as LoadFontsRequest, Q as LoadFontsResult, a2 as SurfaceHyperlink, aj as ToolbarCommandState, al as blankDocumentBytes, ap as chromeMenuSlots, at as commandForSlot, au as commandForSlotValue, az as createDocxEditor, aA as createFontSource, aN as loadFonts, aW as runToolbarCommand, b3 as toolbarCommandState } from './index-BVb4a6O3.js';
5
+ export { A as AuthoredNoteNumbering, C as CanResult, u as DocumentChange, w as DocumentEditingMode, x as DocumentHandle, D as DocumentSource, n as Editor, e as EditorCommand, y as EditorCommandShape, z as EditorCommands, B as EditorError, G as EditorEvents, E as EditorFontError, H as EditorFontErrorCode, J as EditorFormatPainterCommands, K as EditorHeaderFooterCommands, L as EditorNoteCommands, M as EditorPosition, N as EditorQueries, O as EditorQuery, P as EditorQueryResults, Q as EditorSelection, d as EditorSnapshot, c as FontConfiguration, b as FontFaceRequest, F as FontSource, a as FontSourceSubstitution, R as FormatPainterLevel, U as FormatPainterMode, o as FormatPainterSurfaceState, V as FurnitureVariant, W as HeaderFooterSlotArgs, X as HeaderFooterState, Y as HyperlinkInfo, I as ImageContext, f as ImageCropPercent, _ as NoteKind, $ as NotePropertiesSide, a0 as NotePropertiesState, a1 as PageSetup, a2 as ResolvedNoteNumbering, a3 as ReviewActivationOptions, a4 as ReviewCommentPlacement, a5 as ReviewCustomPlacement, a6 as ReviewItemPlacement, a7 as ReviewItemPlacementBase, a8 as ReviewItemQuery, a9 as ReviewRevisionPlacement, S as SelectedImageState, p as TableBorderEdgeTarget, q as TableBorderSpec, r as TableBorderStyle, aa as TableBorderTarget, ab as TableCellVerticalAlignment, ac as TableColumnDividerResizeTarget, ad as TableColumnOccurrenceTarget, t as TableContext, ae as TableRightEdgeResizeTarget, af as TableRowOccurrenceTarget, ag as TextMatch, T as TrackedChangeFilterMode, h as TrackedChangePredicate, ah as ZoomFitTarget, Z as ZoomMode } from './editor-BlerWPyk.js';
6
+ export { R as RevisionDisplayMode } from './revision-projection-JiDclAFU.js';
7
+ export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-2vPh96Ey.js';
8
+ export { C as ComposeFontOriginsOptions, b as FONT_RESOLVER_BRAND, c as FONT_RESOLVER_MARK_KEY, d as FontConfigurationBase, e as FontConfigurationFragment, a as FontOrigin, F as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, i as MarkedFontResolver, W as WORD_DEFAULT_FONT, j as composeFontConfiguration, k as composeFontOrigins, l as defineFontResolver, m as isFontResolver } from './font-resolver-DtADJcLL.js';
9
+ export { C as CHROME_GROUPS, b as CHROME_MENUS, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromeSlotId, q as DocxEditorConfig, D as DocxEditorInstance, v as FontLoadFailure, w as FontLoadFailureReason, x as FontMeasurementState, y as FontUrlSource, H as HyperlinkActivation, z as HyperlinkChromeHandlers, N as LoadFontsRequest, Q as LoadFontsResult, a2 as SurfaceHyperlink, aj as ToolbarCommandState, al as blankDocumentBytes, ap as chromeMenuSlots, at as commandForSlot, au as commandForSlotValue, az as createDocxEditor, aA as createFontSource, aN as loadFonts, aW as runToolbarCommand, b3 as toolbarCommandState } from './index-D51bUVBE.js';
10
10
  export { ApplyResult, ContentControlSummary, DocEdit, DocEdits, DocQueries, DocQuery, DocQueryResults, ParagraphSummary } from './contracts/document.js';
11
11
  export { E as EditorScope, V as ViewScope } from './editor-scope-DZJT4ukT.js';
12
12
  export { InteractionAffinity, InteractionOutcome, InteractionOutcomeCode, SemanticIdentity, SemanticTarget } from './contracts/interaction.js';
13
13
  import './collaboration.js';
14
- import './tree-package-fragment-DDQHk8sv.js';
15
- import './hf-references-BZVHctVD.js';
16
- import './tree-store-DU192chS.js';
14
+ import './tree-package-fragment-DRJkmfTW.js';
15
+ import './hf-references-kSSFMq9X.js';
16
+ import './tree-store-BRfhZceK.js';
17
17
  import './collaboration/replication.js';
18
18
  import './failure-BnGjoXf0.js';
19
- import './semantic-records-BreR44Ki.js';
20
- import './omml-equation-oLlbPpVy.js';
21
- import './semantic-paint-CM8F-8pH.js';
22
- import './note-properties-BosjbkGC.js';
23
- import './custom-node-writes-4WOL8JB_.js';
24
- import './semantic-cell-selection-BMrXDniV.js';
25
- import './tree-session-contract-dKgbKH9A.js';
26
- import './headless-document-view-C9ONlGtf.js';
19
+ import './semantic-records-Bc-MGXbM.js';
20
+ import './omml-equation-C9AJfWy5.js';
21
+ import './semantic-paint-BEjYcsPK.js';
22
+ import './note-properties-D5_fXW9K.js';
23
+ import './custom-node-writes-ClTkWM7s.js';
24
+ import './semantic-cell-selection-C-VsxNee.js';
25
+ import './tree-session-contract-Cp5W25RC.js';
26
+ import './headless-document-view-BDSeMGoK.js';
27
27
  import 'prosemirror-model';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{ua as CHROME_GROUPS,ya as CHROME_MENUS,d as blankDocumentBytes,za as chromeMenuSlots,ha as commandForSlot,ja as commandForSlotValue,La as createDocxEditor,i as createFontSource,h as loadFonts,pa as runToolbarCommand,la as toolbarCommandState}from'./chunk-IZHDCQUC.js';import'./chunk-D5EHDHYV.js';import'./chunk-SIUUTE5M.js';export{g as FONT_RESOLVER_BRAND,f as FONT_RESOLVER_MARK_KEY,c as WORD_DEFAULT_FONT,d as composeFontConfiguration,j as composeFontOrigins,h as defineFontResolver,i as isFontResolver}from'./chunk-DYPT6YDY.js';import'./chunk-6EGMDUL7.js';import'./chunk-RIYSCEFQ.js';import'./chunk-KEXMDQ2Z.js';import'./chunk-CMV2MTDE.js';import'./chunk-AEIAYDCG.js';import'./chunk-VP7SDFCM.js';import'./chunk-ABXCIZVW.js';import'./chunk-I4ENGOOZ.js';import'./chunk-GQVKCK33.js';import'./chunk-6JIJOZDW.js';import'./chunk-YKDRBDI2.js';import'./chunk-QVJO5FUR.js';import'./chunk-GOEBQ26R.js';
1
+ export{ua as CHROME_GROUPS,ya as CHROME_MENUS,d as blankDocumentBytes,za as chromeMenuSlots,ha as commandForSlot,ja as commandForSlotValue,La as createDocxEditor,i as createFontSource,h as loadFonts,pa as runToolbarCommand,la as toolbarCommandState}from'./chunk-3XTHXWEB.js';import'./chunk-D5EHDHYV.js';import'./chunk-L7MVY3DW.js';export{g as FONT_RESOLVER_BRAND,f as FONT_RESOLVER_MARK_KEY,c as WORD_DEFAULT_FONT,d as composeFontConfiguration,j as composeFontOrigins,h as defineFontResolver,i as isFontResolver}from'./chunk-MBXGQN6J.js';import'./chunk-RXPOTTQQ.js';import'./chunk-RIYSCEFQ.js';import'./chunk-7QG5FJ4X.js';import'./chunk-FRRMJK2G.js';import'./chunk-VYQTZIYH.js';import'./chunk-VP7SDFCM.js';import'./chunk-BML3CNUT.js';import'./chunk-UXAWPVH6.js';import'./chunk-W7GY2IJC.js';import'./chunk-6JIJOZDW.js';import'./chunk-XXLS6O6B.js';import'./chunk-MDMM3XVQ.js';import'./chunk-GOEBQ26R.js';
@@ -1,4 +1,4 @@
1
- import { d as ShapingEnvironmentInput, e as TextShaper, R as ResolvedRunStyle, f as ResolvedFont, T as TextMeasurer, F as FontResourceSnapshot, V as VersionedShapingLibrary, N as NormalizationPolicy, g as FixedPointRoundingMode, h as FontRequest } from './semantic-records-BreR44Ki.js';
1
+ import { d as ShapingEnvironmentInput, e as TextShaper, R as ResolvedRunStyle, f as ResolvedFont, T as TextMeasurer, F as FontResourceSnapshot, V as VersionedShapingLibrary, N as NormalizationPolicy, g as FixedPointRoundingMode, h as FontRequest } from './semantic-records-Bc-MGXbM.js';
2
2
 
3
3
  /** Immutable per-operation environment. Configuration, extension, shaping, and producer changes are
4
4
  * coarse gates; resource changes are compared through CacheProvenance.resourceDependencies. */