@docx-editor.dev/core 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.cts +5 -6
  3. package/dist/automation.d.ts +5 -6
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.cts +11 -12
  7. package/dist/binding.d.ts +11 -12
  8. package/dist/binding.js +1 -1
  9. package/dist/chunk-2RDMWJPF.cjs +2 -0
  10. package/dist/chunk-5VC5HGJA.js +2 -0
  11. package/dist/chunk-A2JIBG75.js +1 -0
  12. package/dist/chunk-DKMKH77K.cjs +5 -0
  13. package/dist/chunk-DTQPINIM.js +15 -0
  14. package/dist/chunk-HHFMXG25.js +2 -0
  15. package/dist/chunk-IEXDXWTA.cjs +1 -0
  16. package/dist/chunk-IMMAG4QP.cjs +10 -0
  17. package/dist/chunk-KBCC66CI.js +5 -0
  18. package/dist/chunk-P5YSGSYC.cjs +15 -0
  19. package/dist/chunk-Q66ZJFRE.js +18 -0
  20. package/dist/chunk-TP4EHWEX.cjs +18 -0
  21. package/dist/chunk-VUJGPCPU.js +10 -0
  22. package/dist/chunk-XMHWBL3K.cjs +2 -0
  23. package/dist/contracts/editor.d.cts +9 -9
  24. package/dist/contracts/editor.d.ts +9 -9
  25. package/dist/contracts/interaction.d.cts +9 -9
  26. package/dist/contracts/interaction.d.ts +9 -9
  27. package/dist/contracts/modules.d.cts +5 -5
  28. package/dist/contracts/modules.d.ts +5 -5
  29. package/dist/{custom-node-writes-BdVl-LAC.d.ts → custom-node-writes-7ERv0f_X.d.cts} +9 -10
  30. package/dist/{custom-node-writes-Bu8JIqfA.d.cts → custom-node-writes-QyVZdTUA.d.ts} +9 -10
  31. package/dist/{editor-CWlj33GH.d.cts → editor-CojjwMmF.d.cts} +4 -4
  32. package/dist/{editor-D52SD4jG.d.ts → editor-PUlv5Pp7.d.ts} +4 -4
  33. package/dist/editor.cjs +1 -1
  34. package/dist/editor.css +124 -14
  35. package/dist/editor.d.cts +25 -25
  36. package/dist/editor.d.ts +25 -25
  37. package/dist/editor.js +1 -1
  38. package/dist/{hf-references-BdjsQNE_.d.ts → hf-references-Dvk6De4Q.d.cts} +1 -2
  39. package/dist/{hf-references-CgEOSw3i.d.cts → hf-references-z5Y4N1ab.d.ts} +1 -2
  40. package/dist/{image-resources-BveffuKp.d.cts → image-resources-DQOiwOuE.d.cts} +2 -2
  41. package/dist/{image-resources-D63k8w5f.d.ts → image-resources-eZqD_-vC.d.ts} +2 -2
  42. package/dist/{index-39yzaZO_.d.cts → index-DGPSeLI0.d.cts} +66 -13
  43. package/dist/{index-ZuqIj0b9.d.ts → index-oN-v8DQ5.d.ts} +66 -13
  44. package/dist/index.cjs +1 -1
  45. package/dist/index.d.cts +18 -18
  46. package/dist/index.d.ts +18 -18
  47. package/dist/index.js +1 -1
  48. package/dist/layout.cjs +1 -1
  49. package/dist/layout.d.cts +353 -272
  50. package/dist/layout.d.ts +353 -272
  51. package/dist/layout.js +1 -1
  52. package/dist/{note-nodes-BPSTVDMr.d.ts → note-nodes-BNCANoGN.d.ts} +1 -1
  53. package/dist/{note-nodes-C6DLxlvj.d.cts → note-nodes-DL-Au22P.d.cts} +1 -1
  54. package/dist/note-properties-CQlxjic_.d.cts +67 -0
  55. package/dist/note-properties-jvnw_DGG.d.ts +67 -0
  56. package/dist/omml-equation-BD-LsmWE.d.cts +84 -0
  57. package/dist/omml-equation-Dd3mBep-.d.ts +84 -0
  58. package/dist/{ooxml-tree-BU0e3DVi.d.cts → ooxml-package-CdEy9ufK.d.cts} +352 -1
  59. package/dist/{ooxml-tree-BU0e3DVi.d.ts → ooxml-package-CdEy9ufK.d.ts} +352 -1
  60. package/dist/output.cjs +1 -1
  61. package/dist/output.d.cts +8 -8
  62. package/dist/output.d.ts +8 -8
  63. package/dist/output.js +1 -1
  64. package/dist/{protocol-CD7slqvl.d.cts → protocol-C7ahrdUx.d.ts} +28 -4
  65. package/dist/{protocol-DsbfgBwA.d.ts → protocol-UuZOcOp7.d.cts} +28 -4
  66. package/dist/{review-support--I4ChuzF.d.ts → review-items-D5SPFtsO.d.ts} +49 -102
  67. package/dist/{review-support-CG7aVSPh.d.cts → review-items-DpsqTHio.d.cts} +49 -102
  68. package/dist/review-reads-B2Ji3fVU.d.ts +176 -0
  69. package/dist/review-reads-CP106AHp.d.cts +176 -0
  70. package/dist/{revision-projection-UKqvPa4-.d.ts → revision-projection-CILpvv4M.d.ts} +1 -1
  71. package/dist/{revision-projection-WzlQGBJx.d.cts → revision-projection-Cc4wz30g.d.cts} +1 -1
  72. package/dist/{semantic-cell-selection-I-uAmi0q.d.ts → semantic-cell-selection-BWhVAk5B.d.ts} +4 -4
  73. package/dist/{semantic-cell-selection-C45Gn4K-.d.cts → semantic-cell-selection-DJPjBWzf.d.cts} +4 -4
  74. package/dist/{semantic-interaction-DVUqu_47.d.cts → semantic-interaction-BjOcDB06.d.cts} +1 -1
  75. package/dist/{semantic-interaction-Bu_3IPaV.d.ts → semantic-interaction-Cca1-X_a.d.ts} +1 -1
  76. package/dist/{semantic-paint-BKiiDJol.d.ts → semantic-paint-CufpIQFw.d.ts} +7 -7
  77. package/dist/{semantic-paint-COQY0Lnq.d.cts → semantic-paint-Ur7pAINj.d.cts} +7 -7
  78. package/dist/{semantic-records-rAKWaD-1.d.cts → semantic-records-C3Z76KeN.d.cts} +59 -5
  79. package/dist/{semantic-records-DHcMZM2-.d.ts → semantic-records-Cc1MJrhM.d.ts} +59 -5
  80. package/dist/{shaped-measurer-Cw45Nu5R.d.ts → shaped-measurer-CYSK20E2.d.cts} +2 -4
  81. package/dist/{shaped-measurer-BRL__nm2.d.cts → shaped-measurer-CwlTPDJO.d.ts} +2 -4
  82. package/dist/store.cjs +1 -1
  83. package/dist/store.d.cts +78 -18
  84. package/dist/store.d.ts +78 -18
  85. package/dist/store.js +1 -1
  86. package/dist/{tree-op-types-A-SLSKzK.d.cts → tree-op-types-B0-sCtw-.d.cts} +27 -3
  87. package/dist/{tree-op-types-BbzrA-kg.d.ts → tree-op-types-XMVsJSpe.d.ts} +27 -3
  88. package/dist/{tree-session-C2NsEgfW.d.cts → tree-session-D945D43B.d.cts} +9 -18
  89. package/dist/{tree-session-DeNJa86l.d.ts → tree-session-DBJgmdmc.d.ts} +9 -18
  90. package/dist/{tree-store-CKswbQl3.d.ts → tree-store-C6vc8E_2.d.cts} +2 -3
  91. package/dist/{tree-store-Dob9Us6Y.d.cts → tree-store-ClA-qng4.d.ts} +2 -3
  92. package/package.json +2 -2
  93. package/dist/chunk-2WIXJ7CW.js +0 -10
  94. package/dist/chunk-42PRWWVE.js +0 -2
  95. package/dist/chunk-5XKD3VFP.js +0 -18
  96. package/dist/chunk-HCSWWXS2.cjs +0 -2
  97. package/dist/chunk-HTJLSGBH.cjs +0 -18
  98. package/dist/chunk-JEHWQPXS.cjs +0 -1
  99. package/dist/chunk-KCJLRAKT.js +0 -5
  100. package/dist/chunk-KTL3UMPK.js +0 -2
  101. package/dist/chunk-M6ZIVJUA.cjs +0 -2
  102. package/dist/chunk-NU57YOQE.js +0 -15
  103. package/dist/chunk-RUS2YBWU.cjs +0 -10
  104. package/dist/chunk-TJEWP7MX.cjs +0 -15
  105. package/dist/chunk-UGUPVZDY.cjs +0 -5
  106. package/dist/chunk-XJRMFS6O.js +0 -1
  107. package/dist/chunk-XN634HAC.js +0 -2
  108. package/dist/chunk-XRDTD4X3.cjs +0 -2
  109. package/dist/content-control-walk-CbTqHq6O.d.cts +0 -56
  110. package/dist/content-control-walk-D06GijR0.d.ts +0 -56
  111. package/dist/ooxml-package-CR5us6ad.d.cts +0 -354
  112. package/dist/ooxml-package-D_CtywTW.d.ts +0 -354
  113. package/dist/review-reads-B_pXe43J.d.ts +0 -432
  114. package/dist/review-reads-Bn7aZU4u.d.cts +0 -432
@@ -1 +1 @@
1
- 'use strict';var chunkJEHWQPXS_cjs=require('./chunk-JEHWQPXS.cjs'),chunkRUS2YBWU_cjs=require('./chunk-RUS2YBWU.cjs');var I=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),D=Object.freeze({kind:"body"});function L(a,r={}){let o=chunkRUS2YBWU_cjs.yb(a,r.limits??{});if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let n=o.package.parts.get(o.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-part",detail:o.package.mainDocumentPart};let e=new chunkRUS2YBWU_cjs.Mf(o.package,chunkRUS2YBWU_cjs.Uc(n));return {ok:true,host:chunkJEHWQPXS_cjs.g({port:M(e),capabilities:I})}}function j(a,r,o){let n=a.partFor(o);if(!n)return null;let e=chunkRUS2YBWU_cjs.Wc(a.currentPackage(),r,n.name);return e?(a.replacePackageShell(e.pkg),e.relationshipId):null}function M(a){let r=true;return {revision:()=>a.packageRevision,currentPackage:()=>r?a.currentPackage():null,apply(o,n=D){if(!r)return {ok:false,reason:"disposed"};let e=o(i=>j(a,i,n));if(e===null)return {ok:false,reason:"unsupported-target"};let t=a.transact(n,i=>{for(let u of e)i.apply(u);});return t.ok?{ok:true,changed:t.change!==null}:{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},applyLifecycle(o){if(!r)return {ok:false,reason:"disposed"};let n=a.applyLifecycleOp(o);return n.ok?{ok:true,changed:n.change!==null}:{ok:false,reason:n.detail?`${n.reason}: ${n.detail}`:n.reason}},applyCommentWrites(o,n){if(!r)return {ok:false,reason:"disposed"};if(o.length===0)return {ok:true,changed:false};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};if(e.store.graftPackage(()=>a.currentPackage()),o.every(u=>u.kind==="delete")){let u=false,l=false,x=e.store.transact(T=>{T.applyPackage(d=>{let m=d;for(let s of o){if(s.kind!=="delete")continue;let A={storyPartName:e.store.part.name,...s.noteId===void 0?{}:{noteId:s.noteId}},p=s.parentCommentId===void 0?chunkRUS2YBWU_cjs.Pe(m,s.commentId,A):chunkRUS2YBWU_cjs.Qe(m,s.commentId,s.parentCommentId,A);if(p===null)return u=true,d;l||=p!==m,m=p;}return m});});return u||!x.ok?{ok:false,reason:"comment-delete-refused"}:(l&&a.installPackageSnapshot(e.store.package),{ok:true,changed:l})}if(o.length!==1)return {ok:false,reason:"mixed-comment-writes"};let t=o[0],i=t.kind==="create"?chunkRUS2YBWU_cjs.Rf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date}}):t.kind==="reply"?chunkRUS2YBWU_cjs.Rf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date},replyToCommentId:t.parentCommentId}):t.kind==="resolve"?chunkRUS2YBWU_cjs.Sf(e.store,t.commentId,t.resolved):null;return i===null?{ok:false,reason:"unsupported-comment-write"}:i.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}},applyCustomNodeWrite(o,n){if(!r)return {ok:false,reason:"disposed"};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};e.store.graftPackage(()=>a.currentPackage());let t=chunkRUS2YBWU_cjs.Yf(e.store,o);return t.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:t.change!==null}):{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},save:()=>r?chunkRUS2YBWU_cjs.zb(a.currentPackage()):null,subscribe:o=>a.subscribe(()=>o()),dispose(){r=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkJEHWQPXS_cjs.c}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkJEHWQPXS_cjs.b}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkJEHWQPXS_cjs.d}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkJEHWQPXS_cjs.a}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkJEHWQPXS_cjs.f}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkJEHWQPXS_cjs.e}});exports.SERVER_AUTOMATION_CAPABILITIES=I;exports.createServerAutomationHost=L;
1
+ 'use strict';var chunkIEXDXWTA_cjs=require('./chunk-IEXDXWTA.cjs'),chunkIMMAG4QP_cjs=require('./chunk-IMMAG4QP.cjs');var I=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),j=Object.freeze({kind:"body"});function D(a,r={}){let o=chunkIMMAG4QP_cjs.ob(a,r.limits??{});if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let n=o.package.parts.get(o.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-part",detail:o.package.mainDocumentPart};let e=new chunkIMMAG4QP_cjs.Of(o.package,chunkIMMAG4QP_cjs.Wc(n));return {ok:true,host:chunkIEXDXWTA_cjs.g({port:M(e),capabilities:I})}}function L(a,r,o){let n=a.partFor(o);if(!n)return null;let e=chunkIMMAG4QP_cjs.Yc(a.currentPackage(),r,n.name);return e?(a.replacePackageShell(e.pkg),e.relationshipId):null}function M(a){let r=true;return {revision:()=>a.packageRevision,currentPackage:()=>r?a.currentPackage():null,apply(o,n=j){if(!r)return {ok:false,reason:"disposed"};let e=o(i=>L(a,i,n));if(e===null)return {ok:false,reason:"unsupported-target"};let t=a.transact(n,i=>{for(let u of e)i.apply(u);});return t.ok?{ok:true,changed:t.change!==null}:{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},applyLifecycle(o){if(!r)return {ok:false,reason:"disposed"};let n=a.applyLifecycleOp(o);return n.ok?{ok:true,changed:n.change!==null}:{ok:false,reason:n.detail?`${n.reason}: ${n.detail}`:n.reason}},applyCommentWrites(o,n){if(!r)return {ok:false,reason:"disposed"};if(o.length===0)return {ok:true,changed:false};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};if(e.store.graftPackage(()=>a.currentPackage()),o.every(u=>u.kind==="delete")){let u=false,l=false,x=e.store.transact(T=>{T.applyPackage(d=>{let m=d;for(let s of o){if(s.kind!=="delete")continue;let A={storyPartName:e.store.part.name,...s.noteId===void 0?{}:{noteId:s.noteId}},p=s.parentCommentId===void 0?chunkIMMAG4QP_cjs.Re(m,s.commentId,A):chunkIMMAG4QP_cjs.Se(m,s.commentId,s.parentCommentId,A);if(p===null)return u=true,d;l||=p!==m,m=p;}return m});});return u||!x.ok?{ok:false,reason:"comment-delete-refused"}:(l&&a.installPackageSnapshot(e.store.package),{ok:true,changed:l})}if(o.length!==1)return {ok:false,reason:"mixed-comment-writes"};let t=o[0],i=t.kind==="create"?chunkIMMAG4QP_cjs.Tf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date}}):t.kind==="reply"?chunkIMMAG4QP_cjs.Tf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date},replyToCommentId:t.parentCommentId}):t.kind==="resolve"?chunkIMMAG4QP_cjs.Uf(e.store,t.commentId,t.resolved):null;return i===null?{ok:false,reason:"unsupported-comment-write"}:i.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}},applyCustomNodeWrite(o,n){if(!r)return {ok:false,reason:"disposed"};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};e.store.graftPackage(()=>a.currentPackage());let t=chunkIMMAG4QP_cjs._f(e.store,o);return t.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:t.change!==null}):{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},save:()=>r?chunkIMMAG4QP_cjs.pb(a.currentPackage()):null,subscribe:o=>a.subscribe(()=>o()),dispose(){r=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkIEXDXWTA_cjs.c}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkIEXDXWTA_cjs.b}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkIEXDXWTA_cjs.d}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkIEXDXWTA_cjs.a}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkIEXDXWTA_cjs.f}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkIEXDXWTA_cjs.e}});exports.SERVER_AUTOMATION_CAPABILITIES=I;exports.createServerAutomationHost=D;
@@ -1,9 +1,8 @@
1
- import { A as AutomationCapabilities, a as AutomationHost } from './protocol-CD7slqvl.cjs';
2
- export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationUnsubscribe, L as AutomationValue, M as isAutomationCommand, N as isSolitaryAutomationCommand } from './protocol-CD7slqvl.cjs';
3
- import { H as HeaderFooterVariant } from './hf-references-CgEOSw3i.cjs';
4
- import { N as NoteKind } from './note-nodes-C6DLxlvj.cjs';
5
- import { a as OoxmlPackageLimits, b as OoxmlPackageRejection } from './ooxml-package-CR5us6ad.cjs';
6
- import './ooxml-tree-BU0e3DVi.cjs';
1
+ import { A as AutomationCapabilities, a as AutomationHost } from './protocol-UuZOcOp7.cjs';
2
+ export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationTextProjection, L as AutomationUnsubscribe, M as AutomationValue, N as isAutomationCommand, O as isSolitaryAutomationCommand } from './protocol-UuZOcOp7.cjs';
3
+ import { H as HeaderFooterVariant } from './hf-references-Dvk6De4Q.cjs';
4
+ import { N as NoteKind } from './note-nodes-DL-Au22P.cjs';
5
+ import { n as OoxmlPackageLimits, o as OoxmlPackageRejection } from './ooxml-package-CdEy9ufK.cjs';
7
6
 
8
7
  /** The variants a section can declare furniture for. */
9
8
  declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
@@ -1,9 +1,8 @@
1
- import { A as AutomationCapabilities, a as AutomationHost } from './protocol-DsbfgBwA.js';
2
- export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationUnsubscribe, L as AutomationValue, M as isAutomationCommand, N as isSolitaryAutomationCommand } from './protocol-DsbfgBwA.js';
3
- import { H as HeaderFooterVariant } from './hf-references-BdjsQNE_.js';
4
- import { N as NoteKind } from './note-nodes-BPSTVDMr.js';
5
- import { a as OoxmlPackageLimits, b as OoxmlPackageRejection } from './ooxml-package-D_CtywTW.js';
6
- import './ooxml-tree-BU0e3DVi.js';
1
+ import { A as AutomationCapabilities, a as AutomationHost } from './protocol-C7ahrdUx.js';
2
+ export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationTextProjection, L as AutomationUnsubscribe, M as AutomationValue, N as isAutomationCommand, O as isSolitaryAutomationCommand } from './protocol-C7ahrdUx.js';
3
+ import { H as HeaderFooterVariant } from './hf-references-z5Y4N1ab.js';
4
+ import { N as NoteKind } from './note-nodes-BNCANoGN.js';
5
+ import { n as OoxmlPackageLimits, o as OoxmlPackageRejection } from './ooxml-package-CdEy9ufK.js';
7
6
 
8
7
  /** The variants a section can declare furniture for. */
9
8
  declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
@@ -1 +1 @@
1
- import {g}from'./chunk-XJRMFS6O.js';export{c as AUTOMATION_COMMAND_OPERATIONS,b as AUTOMATION_QUERY_OPERATIONS,d as AUTOMATION_SOLITARY_OPERATIONS,a as HEADER_FOOTER_VARIANTS,f as isAutomationCommand,e as isSolitaryAutomationCommand}from'./chunk-XJRMFS6O.js';import {yb,Mf,Uc,zb,Yf,Pe,Qe,Rf,Sf,Wc}from'./chunk-2WIXJ7CW.js';var I=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),D=Object.freeze({kind:"body"});function L(a,r={}){let o=yb(a,r.limits??{});if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let n=o.package.parts.get(o.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-part",detail:o.package.mainDocumentPart};let e=new Mf(o.package,Uc(n));return {ok:true,host:g({port:M(e),capabilities:I})}}function j(a,r,o){let n=a.partFor(o);if(!n)return null;let e=Wc(a.currentPackage(),r,n.name);return e?(a.replacePackageShell(e.pkg),e.relationshipId):null}function M(a){let r=true;return {revision:()=>a.packageRevision,currentPackage:()=>r?a.currentPackage():null,apply(o,n=D){if(!r)return {ok:false,reason:"disposed"};let e=o(i=>j(a,i,n));if(e===null)return {ok:false,reason:"unsupported-target"};let t=a.transact(n,i=>{for(let u of e)i.apply(u);});return t.ok?{ok:true,changed:t.change!==null}:{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},applyLifecycle(o){if(!r)return {ok:false,reason:"disposed"};let n=a.applyLifecycleOp(o);return n.ok?{ok:true,changed:n.change!==null}:{ok:false,reason:n.detail?`${n.reason}: ${n.detail}`:n.reason}},applyCommentWrites(o,n){if(!r)return {ok:false,reason:"disposed"};if(o.length===0)return {ok:true,changed:false};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};if(e.store.graftPackage(()=>a.currentPackage()),o.every(u=>u.kind==="delete")){let u=false,l=false,x=e.store.transact(T=>{T.applyPackage(d=>{let m=d;for(let s of o){if(s.kind!=="delete")continue;let A={storyPartName:e.store.part.name,...s.noteId===void 0?{}:{noteId:s.noteId}},p=s.parentCommentId===void 0?Pe(m,s.commentId,A):Qe(m,s.commentId,s.parentCommentId,A);if(p===null)return u=true,d;l||=p!==m,m=p;}return m});});return u||!x.ok?{ok:false,reason:"comment-delete-refused"}:(l&&a.installPackageSnapshot(e.store.package),{ok:true,changed:l})}if(o.length!==1)return {ok:false,reason:"mixed-comment-writes"};let t=o[0],i=t.kind==="create"?Rf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date}}):t.kind==="reply"?Rf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date},replyToCommentId:t.parentCommentId}):t.kind==="resolve"?Sf(e.store,t.commentId,t.resolved):null;return i===null?{ok:false,reason:"unsupported-comment-write"}:i.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}},applyCustomNodeWrite(o,n){if(!r)return {ok:false,reason:"disposed"};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};e.store.graftPackage(()=>a.currentPackage());let t=Yf(e.store,o);return t.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:t.change!==null}):{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},save:()=>r?zb(a.currentPackage()):null,subscribe:o=>a.subscribe(()=>o()),dispose(){r=false;}}}export{I as SERVER_AUTOMATION_CAPABILITIES,L as createServerAutomationHost};
1
+ import {g}from'./chunk-A2JIBG75.js';export{c as AUTOMATION_COMMAND_OPERATIONS,b as AUTOMATION_QUERY_OPERATIONS,d as AUTOMATION_SOLITARY_OPERATIONS,a as HEADER_FOOTER_VARIANTS,f as isAutomationCommand,e as isSolitaryAutomationCommand}from'./chunk-A2JIBG75.js';import {ob,Of,Wc,pb,_f,Re,Se,Tf,Uf,Yc}from'./chunk-VUJGPCPU.js';var I=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),j=Object.freeze({kind:"body"});function D(a,r={}){let o=ob(a,r.limits??{});if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let n=o.package.parts.get(o.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-part",detail:o.package.mainDocumentPart};let e=new Of(o.package,Wc(n));return {ok:true,host:g({port:M(e),capabilities:I})}}function L(a,r,o){let n=a.partFor(o);if(!n)return null;let e=Yc(a.currentPackage(),r,n.name);return e?(a.replacePackageShell(e.pkg),e.relationshipId):null}function M(a){let r=true;return {revision:()=>a.packageRevision,currentPackage:()=>r?a.currentPackage():null,apply(o,n=j){if(!r)return {ok:false,reason:"disposed"};let e=o(i=>L(a,i,n));if(e===null)return {ok:false,reason:"unsupported-target"};let t=a.transact(n,i=>{for(let u of e)i.apply(u);});return t.ok?{ok:true,changed:t.change!==null}:{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},applyLifecycle(o){if(!r)return {ok:false,reason:"disposed"};let n=a.applyLifecycleOp(o);return n.ok?{ok:true,changed:n.change!==null}:{ok:false,reason:n.detail?`${n.reason}: ${n.detail}`:n.reason}},applyCommentWrites(o,n){if(!r)return {ok:false,reason:"disposed"};if(o.length===0)return {ok:true,changed:false};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};if(e.store.graftPackage(()=>a.currentPackage()),o.every(u=>u.kind==="delete")){let u=false,l=false,x=e.store.transact(T=>{T.applyPackage(d=>{let m=d;for(let s of o){if(s.kind!=="delete")continue;let A={storyPartName:e.store.part.name,...s.noteId===void 0?{}:{noteId:s.noteId}},p=s.parentCommentId===void 0?Re(m,s.commentId,A):Se(m,s.commentId,s.parentCommentId,A);if(p===null)return u=true,d;l||=p!==m,m=p;}return m});});return u||!x.ok?{ok:false,reason:"comment-delete-refused"}:(l&&a.installPackageSnapshot(e.store.package),{ok:true,changed:l})}if(o.length!==1)return {ok:false,reason:"mixed-comment-writes"};let t=o[0],i=t.kind==="create"?Tf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date}}):t.kind==="reply"?Tf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date},replyToCommentId:t.parentCommentId}):t.kind==="resolve"?Uf(e.store,t.commentId,t.resolved):null;return i===null?{ok:false,reason:"unsupported-comment-write"}:i.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}},applyCustomNodeWrite(o,n){if(!r)return {ok:false,reason:"disposed"};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};e.store.graftPackage(()=>a.currentPackage());let t=_f(e.store,o);return t.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:t.change!==null}):{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},save:()=>r?pb(a.currentPackage()):null,subscribe:o=>a.subscribe(()=>o()),dispose(){r=false;}}}export{I as SERVER_AUTOMATION_CAPABILITIES,D as createServerAutomationHost};
package/dist/binding.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkUGUPVZDY_cjs=require('./chunk-UGUPVZDY.cjs');require('./chunk-XRDTD4X3.cjs'),require('./chunk-HCSWWXS2.cjs'),require('./chunk-RUS2YBWU.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkUGUPVZDY_cjs.e}});
1
+ 'use strict';var chunkDKMKH77K_cjs=require('./chunk-DKMKH77K.cjs');require('./chunk-XMHWBL3K.cjs'),require('./chunk-IMMAG4QP.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkDKMKH77K_cjs.e}});
@@ -1,19 +1,18 @@
1
1
  import { Node, Schema } from 'prosemirror-model';
2
- import { O as OoxmlProperty } from './tree-op-types-A-SLSKzK.cjs';
3
- import { T as TreeDocxSession } from './tree-session-C2NsEgfW.cjs';
4
- export { D as DocumentStyleEntry, M as MapResult, O as OpenTreeSessionResult, P as PROJECTION_ORIGIN, a as TreeApplyResult, b as TreeBindingRejection, c as TreeDocxSessionView, d as TreeSessionRejection, e as bodyParagraphs, f as docToTreeOps, o as openTreeSession, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-C2NsEgfW.cjs';
5
- export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-Bu8JIqfA.cjs';
2
+ import { O as OoxmlProperty } from './tree-op-types-B0-sCtw-.cjs';
3
+ import { T as TreeDocxSession } from './tree-session-D945D43B.cjs';
4
+ export { D as DocumentStyleEntry, M as MapResult, O as OpenTreeSessionResult, P as PROJECTION_ORIGIN, a as TreeApplyResult, b as TreeBindingRejection, c as TreeDocxSessionView, d as TreeSessionRejection, e as bodyParagraphs, f as docToTreeOps, o as openTreeSession, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-D945D43B.cjs';
5
+ export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-7ERv0f_X.cjs';
6
6
  import { EditorView } from 'prosemirror-view';
7
7
  import './contracts/types.cjs';
8
- import './ooxml-tree-BU0e3DVi.cjs';
9
- import './image-resources-BveffuKp.cjs';
10
- import './ooxml-package-CR5us6ad.cjs';
11
- import './review-support-CG7aVSPh.cjs';
8
+ import './ooxml-package-CdEy9ufK.cjs';
9
+ import './image-resources-DQOiwOuE.cjs';
10
+ import './hf-references-Dvk6De4Q.cjs';
11
+ import './tree-store-C6vc8E_2.cjs';
12
+ import './review-items-DpsqTHio.cjs';
12
13
  import './contracts/modules.cjs';
13
- import './revision-projection-WzlQGBJx.cjs';
14
- import './hf-references-CgEOSw3i.cjs';
15
- import './tree-store-Dob9Us6Y.cjs';
16
- import './note-nodes-C6DLxlvj.cjs';
14
+ import './revision-projection-Cc4wz30g.cjs';
15
+ import './note-nodes-DL-Au22P.cjs';
17
16
 
18
17
  /** Attributes carried by a projected paragraph. */
19
18
  interface ParagraphAttrs {
package/dist/binding.d.ts CHANGED
@@ -1,19 +1,18 @@
1
1
  import { Node, Schema } from 'prosemirror-model';
2
- import { O as OoxmlProperty } from './tree-op-types-BbzrA-kg.js';
3
- import { T as TreeDocxSession } from './tree-session-DeNJa86l.js';
4
- export { D as DocumentStyleEntry, M as MapResult, O as OpenTreeSessionResult, P as PROJECTION_ORIGIN, a as TreeApplyResult, b as TreeBindingRejection, c as TreeDocxSessionView, d as TreeSessionRejection, e as bodyParagraphs, f as docToTreeOps, o as openTreeSession, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-DeNJa86l.js';
5
- export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-BdVl-LAC.js';
2
+ import { O as OoxmlProperty } from './tree-op-types-XMVsJSpe.js';
3
+ import { T as TreeDocxSession } from './tree-session-DBJgmdmc.js';
4
+ export { D as DocumentStyleEntry, M as MapResult, O as OpenTreeSessionResult, P as PROJECTION_ORIGIN, a as TreeApplyResult, b as TreeBindingRejection, c as TreeDocxSessionView, d as TreeSessionRejection, e as bodyParagraphs, f as docToTreeOps, o as openTreeSession, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-DBJgmdmc.js';
5
+ export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-QyVZdTUA.js';
6
6
  import { EditorView } from 'prosemirror-view';
7
7
  import './contracts/types.js';
8
- import './ooxml-tree-BU0e3DVi.js';
9
- import './image-resources-D63k8w5f.js';
10
- import './ooxml-package-D_CtywTW.js';
11
- import './review-support--I4ChuzF.js';
8
+ import './ooxml-package-CdEy9ufK.js';
9
+ import './image-resources-eZqD_-vC.js';
10
+ import './hf-references-z5Y4N1ab.js';
11
+ import './tree-store-ClA-qng4.js';
12
+ import './review-items-D5SPFtsO.js';
12
13
  import './contracts/modules.js';
13
- import './revision-projection-UKqvPa4-.js';
14
- import './hf-references-BdjsQNE_.js';
15
- import './tree-store-CKswbQl3.js';
16
- import './note-nodes-BPSTVDMr.js';
14
+ import './revision-projection-CILpvv4M.js';
15
+ import './note-nodes-BNCANoGN.js';
17
16
 
18
17
  /** Attributes carried by a projected paragraph. */
19
18
  interface ParagraphAttrs {
package/dist/binding.js CHANGED
@@ -1 +1 @@
1
- export{k as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,l as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-KCJLRAKT.js';import'./chunk-42PRWWVE.js';import'./chunk-XN634HAC.js';import'./chunk-2WIXJ7CW.js';
1
+ export{k as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,l as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-KBCC66CI.js';import'./chunk-5VC5HGJA.js';import'./chunk-VUJGPCPU.js';
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkTP4EHWEX_cjs=require('./chunk-TP4EHWEX.cjs');var M=8,fe={color:"painted",background:"painted",spanClassName:"painted",avatarUrl:"card-only"},ge=Object.keys(fe),lt=ge.filter(t=>fe[t]==="painted"),dt=new Set(["http","https","data","blob"]),ct=/^([a-zA-Z][a-zA-Z0-9+.-]*):/;function yt(t){let e=t.replace(/[\u0000-\u0020\u007f]/g,"");if(e.length===0)return;let n=ct.exec(e);if(n)return !dt.has(n[1].toLowerCase())||/^data:/i.test(e)&&!/^data:image\/(?!svg)/i.test(e)?void 0:e;let o=a=>e[a]==="/"||e[a]==="\\";return o(0)&&o(1)?void 0:e}function ut(t){if(typeof t=="string")return t.length>0?{color:t}:null;if(t===null||typeof t!="object")return null;let e={},n=Object.prototype.hasOwnProperty;for(let o of ge){if(!n.call(t,o))continue;let a=t[o];if(!(typeof a!="string"||a.length===0)){if(o==="avatarUrl"){let r=yt(a);r!==void 0&&(e.avatarUrl=r);continue}e[o]=a;}}return Object.keys(e).length>0?e:null}function _(t){return `var(--doc-review-author-${t%M})`}function xe(t){let e=new Map;if(t===void 0||t==="kind"||t==="author")return e;for(let[n,o]of Object.entries(t.authors)){let a=ut(o);a&&e.set(n,a);}return e}function En(t,e){let n=xe(e);return [...t].map(([o,a])=>{let r=n.get(o);return {author:o,slot:a,color:r?.color??_(a),...r?{style:r}:{}}})}var ht=128;function U(t,e,n=ht){let o=e.length<n?e.length:n,a=t;for(let r=0;r<o;r+=1)a=Math.imul(a^e.charCodeAt(r),16777619);return Math.imul(a^e.length,16777619)}function pt(t,e,n){let o=U(2166136261,n);for(let a of t.keys())o=U(o,a);for(let[a,r]of e){o=U(o,a);for(let i of lt)o=U(o,r[i]??"",1/0);}return `${t.size}.${e.size}.${(o>>>0).toString(36)}`}function be(t){return t===null?"kind":t.key}var V=new WeakMap;function me(t,e,n){if(t==="kind")return null;let o=V.get(e);if(o&&o.option===t&&o.authorSlots===n)return o.context;let a=xe(t),r=t===void 0||t==="author"?"author":t.others??"author";if(a.size===0&&r==="kind")return V.set(e,{option:t,authorSlots:n,context:null}),null;let i=n??gt(e),s=new Map;for(let[d,c]of a){if(!c.spanClassName)continue;let y=c.spanClassName.split(/\s+/).filter(u=>u.length>0);y.length>0&&s.set(d,y);}let l={authorSlots:i,styles:a,classTokens:s,others:r,key:pt(i,a,r)};return V.set(e,{option:t,authorSlots:n,context:l}),l}var he=new WeakMap;function ft(t){let e=he.get(t);if(e)return e;let n=[],o=new Set,a=r=>{r===""||o.has(r)||(o.add(r),n.push(r));};for(let r of chunkTP4EHWEX_cjs.Z(t)){for(let s of r.lines)for(let l of s.spans){let d=l.revisions;if(d!==void 0)for(let c=0;c<d.length;c+=1)a(d[c].author);for(let c of l.props){if(c.localName!=="rPrChange"&&c.localName!=="pPrChange")continue;let y=c.attributes?.author;a(y??"");break}}let i=r.markRevisions;if(i)for(let s=0;s<i.length;s+=1)a(i[s].author);}return he.set(t,n),n}var pe=new WeakMap;function gt(t){let e=pe.get(t);if(e)return e;let n=new Map,o=a=>{for(let r of ft(a))n.has(r)||n.set(r,n.size);};for(let a of t.pages){o(a.fragments),a.header&&o(a.header.fragments),a.footer&&o(a.footer.fragments);for(let r of [a.footnotes,a.endnotes])if(r){r.separator&&o(r.separator.fragments);for(let i of r.notes)o(i.fragments);}for(let r of [a.anchoredDrawings,a.header?.anchoredDrawings,a.footer?.anchoredDrawings])if(r)for(let i of r)i.textboxStory&&o(i.textboxStory.fragments);}return pe.set(t,n),n}function xt(t,e){let n=null;for(let o of e)o===""||t.has(o)||(n===null&&(n=new Map(t)),n.has(o)||n.set(o,n.size));return n??t}function Pn(){let t=new Map,e=0;return {resolve(n,o){let a=xt(n,o);for(let r of a.keys())t.has(r)||(t.set(r,e),e+=1);return new Map([...a.keys()].map(r=>[r,t.get(r)]).sort((r,i)=>r[1]-i[1]))}}}function ve(t,e,n){if(t===void 0||t.length===0)return null;let o=t[t.length-1],a=t.some(s=>s.kind==="delete"||s.kind==="moveFrom"),r=o.kind,i=r==="delete"||r==="moveFrom"?"line-through":r==="insert"||r==="moveTo"?"underline":null;return {attribution:o,line:a&&i==="underline"?"line-through":i,decorationStyle:r==="moveFrom"||r==="moveTo"?"double":r==="insert"?"dashed":"solid",color:a?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",authorColor:n?.get(o.author)?.color??_(e?.get(o.author)??0),deleted:a}}function Re(t,e,n,o,a,r){for(let i of [n.footnotes,n.endnotes])i&&e.append(bt(t,n,i,o,a,r));}function bt(t,e,n,o,a,r){let i=t.createElement("div");if(i.className="docx-notes",i.dataset.docxNotes=n.kind,i.dataset.docxNotesPlacement=n.placement,i.style.position="absolute",i.style.left=`${(n.box.x-e.box.x)*o.scale}px`,i.style.top=`${(n.box.y-e.box.y)*o.scale}px`,i.style.width=`${n.box.width*o.scale}px`,i.style.height=`${n.box.height*o.scale}px`,n.separator){let s=t.createElement("div");s.className="docx-note-separator",s.dataset.docxNoteSeparator=n.separator.kind,s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left=`${(n.separator.box.x-n.box.x)*o.scale}px`,s.style.top=`${(n.separator.box.y-n.box.y)*o.scale}px`,s.style.width=`${n.separator.box.width*o.scale}px`,s.style.height=`${Math.max(n.separator.box.height,.75)*o.scale}px`;let l=n.separator.ruleStyle;if(l||n.separator.synthetic||n.separator.fragments.length===0)mt(s,t,l??"single",o.scale);else for(let d of n.separator.fragments)s.append(d.kind==="table"?r(t,d,o):a(t,d,o));i.append(s);}for(let s of n.notes){let l=t.createElement("div");l.className="docx-note",l.dataset.docxNote=s.noteKind,l.dataset.docxNoteId=String(s.noteId),l.dataset.docxNoteScope=s.scopeId,s.mark!==null&&(l.dataset.docxNoteMark=s.mark),s.continuation&&(l.dataset.docxNoteContinuation=""),l.setAttribute("role","doc-footnote"),l.style.position="absolute",l.style.left=`${(s.box.x-n.box.x)*o.scale}px`,l.style.top=`${(s.box.y-n.box.y)*o.scale}px`,l.style.width=`${s.box.width*o.scale}px`,l.style.height=`${s.box.height*o.scale}px`;for(let d of s.fragments)l.append(d.kind==="table"?r(t,d,o):a(t,d,o));i.append(l);}return i}function mt(t,e,n,o){t.dataset.docxNoteRule=n;let a=Math.max(1,o*.75);if(n==="single"){t.style.borderTop=`${a}px solid currentColor`,t.style.opacity="0.85";return}t.style.opacity="0.85";let r=Math.max(1,o*1.25);for(let i of [0,a+r]){let s=e.createElement("div");s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top=`${i}px`,s.style.height="0",s.style.borderTop=`${a}px solid currentColor`,t.append(s);}}function K(t,e,n){return !!n.activeHeaderFooterRId&&!!t.rId&&n.activeHeaderFooterRId===t.rId&&(n.activeHeaderFooterPageIndex===void 0||n.activeHeaderFooterPageIndex===e)}function X(t,e,n){return n?t.kind==="footer"?Math.max(t.box.height,e.box.y+e.box.height-t.box.y):Math.max(t.box.height,e.contentBox.y-t.box.y):t.box.height}function Se(t,e){for(let{record:n,element:o,materialized:a}of t){if(!a)continue;let r=o.querySelector(":scope > .docx-page-content");r&&(e.activeHeaderFooterRId?r.setAttribute("contenteditable","false"):r.removeAttribute("contenteditable"));for(let i of o.querySelectorAll(":scope > .docx-hf:not(.docx-hf--placeholder)")){let s=vt(n,i);if(!s)continue;let l=K(s,n.index,e);Rt(i,n,s,l,e.scale);}for(let i of o.querySelectorAll(":scope > [data-docx-hf-front]")){let s=we(n,i.dataset.docxHfFront);ke(i,!!s&&K(s,n.index,e));}}}function vt(t,e){return we(t,e.dataset.docxHf)}function we(t,e){if(e==="header")return t.header;if(e==="footer")return t.footer}function Rt(t,e,n,o,a){o?(t.dataset.docxHfActive="",t.setAttribute("contenteditable","true")):(delete t.dataset.docxHfActive,t.setAttribute("contenteditable","false")),t.style.height=`${X(n,e,o)*a}px`,ke(t,o);}function ke(t,e){let n=t.querySelectorAll(t instanceof Element&&t.classList.contains("docx-drawing-layer")?":scope > *":":scope > .docx-drawing-layer > *");for(let o of n){o.style.pointerEvents=e?"auto":"none";for(let a of o.querySelectorAll(".docx-drawing"))a.style.pointerEvents=e?"auto":"none";}}var Ae=Object.freeze({"image/svg+xml":"SVG","image/tiff":"TIFF","image/x-emf":"EMF","image/x-wmf":"WMF",unknown:"Unknown"}),j=new WeakMap,Y=new WeakMap,St=256;function Le(t,e){let n=j.get(t);if(n)return n;let o=new Map,a=new Map;return n=Object.freeze({urlForReady(r,i){let s=o.get(r.resourceKey);if(s)return s;let l=e.create(r,i);return o.set(r.resourceKey,l),l},imageFor(r,i,s){let l=a.get(r);if(l&&l.resourceKey===i)return l.element;let d=s.createElement("img");return a.size<St&&a.set(r,{element:d,resourceKey:i,...l?.readyElement?{readyElement:l.readyElement}:{}}),d},imageForPending(r){return a.get(r)?.element??null},readyElementFor(r){return a.get(r)?.readyElement??null},rememberReadyElement(r,i){let s=a.get(r);s&&a.set(r,{...s,readyElement:i});},reconcile(r,i){for(let[s,l]of o)r.has(s)||(e.revoke(l),o.delete(s));for(let[s,l]of a)i.has(s)||(l.element.removeAttribute("src"),a.delete(s));},revokeAll(){for(let r of o.values())e.revoke(r);o.clear();for(let r of a.values())r.element.removeAttribute("src");a.clear();}}),j.set(t,n),n}function Z(t,e){return `${e.paintInstance??""}|${t.drawingNodeId}`}function Dn(t){j.get(t)?.revokeAll(),j.delete(t);}function E(t){return Number.isFinite(t)?String(t):"0"}function $e(t,e){if(t.length<3||e.width<=0||e.height<=0)return null;let n=[];for(let o of t){if(!Number.isFinite(o.x)||!Number.isFinite(o.y))return null;let a=(o.x-e.x)/e.width*100,r=(o.y-e.y)/e.height*100;n.push(`${E(a)}% ${E(r)}%`);}return `polygon(${n.join(", ")})`}function Te(t){let e=t.geometry.contentBounds;return chunkTP4EHWEX_cjs.zb({transform:t.transform,contentWidth:e.width,contentHeight:e.height})}function Me(t){let{effects:e}=t,n=[];if(e.grayscale&&n.push("grayscale(1)"),e.brightness!==0&&Number.isFinite(e.brightness)){let o=1+e.brightness/100;Number.isFinite(o)&&n.push(`brightness(${E(Math.max(0,o))})`);}if(e.contrast!==0&&Number.isFinite(e.contrast)){let o=1+e.contrast/100;Number.isFinite(o)&&n.push(`contrast(${E(Math.max(0,o))})`);}return n.length>0?n.join(" "):void 0}function He(t,e){let{crop:n}=t,o=Math.max(0,Math.min(1,n.left)),a=Math.max(0,Math.min(1,n.top)),r=Math.max(0,Math.min(1,n.right)),i=Math.max(0,Math.min(1,n.bottom)),s=Math.max(1e-4,1-o-r),l=Math.max(1e-4,1-a-i);return Object.freeze({width:`${E(1/s*100)}%`,height:`${E(1/l*100)}%`,left:`${E(-o/s*100)}%`,top:`${E(-a/l*100)}%`})}function wt(t,e){let{resource:n}=t;switch(n.kind){case "external":return e.externalResource;case "missing":return e.missingResource;case "pending":return e.pendingResource;case "unrenderable":switch(n.reason){case "unsupported-format":return e.unsupportedFormat(Ae[n.mime]??Ae.unknown);case "non-picture-graphic":return e.nonPictureGraphic(t.placeholderGraphicKind??"graphic");case "signature-mismatch":return e.contentMismatch;case "decode-failed":return e.decodeFailed;case "resource-limit":return e.resourceLimit;default:return e.invalidResource}default:return e.invalidResource}}function H(t,e,n){let{accessibility:o}=e;o.hidden||(t.setAttribute("role",n?"link":"img"),o.label?t.setAttribute("aria-label",o.label):n||t.setAttribute("aria-hidden","true"));}function N(t,e,n,o){let a=o?.x??0,r=o?.y??0;t.style.position="absolute",t.style.left=`${(e.x-a)*n}px`,t.style.top=`${(e.y-r)*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`,t.style.boxSizing="border-box",t.style.overflow="hidden",t.style.pointerEvents="auto";}function kt(t,e,n,o,a){let r=t.paintBounds,i=t.geometry.contentBounds,s=He(t);return [o,n.scale,a?.x??0,a?.y??0,r.x,r.y,r.width,r.height,i.x,i.y,i.width,i.height,$e(t.geometry.clipPolygon??[],r)??"",Me(t)??"",Te(t)??"",s.width,s.height,s.left,s.top,n.inertLinks?"":t.hyperlinkHref??"",t.accessibility.label??""].join("|")}function B(t,e,n,o){let a=t.createElement("div");a.className="docx-drawing docx-drawing-placeholder",a.dataset.drawingNodeId=e.drawingNodeId,N(a,e.paintBounds,n.scale,o);let r=t.createElement("div");r.className="docx-drawing-placeholder-card";let i=t.createElement("span");return i.className="docx-drawing-placeholder-label",i.textContent=wt(e,n.strings),r.append(i),a.append(r),e.hyperlinkHref&&!n.inertLinks?(a.dataset.docxDrawingLink=e.drawingNodeId,a.dataset.docxDrawingLinkKind="external",a.dataset.docxDrawingLinkHref=e.hyperlinkHref,a.setAttribute("tabindex","-1"),H(a,e,true)):H(a,e,false),a}function At(t,e,n,o,a,r){let i=e.resource;if(i.kind!=="ready")return B(t,e,n,r);let s=Z(e,n),l=a?.readyElementFor?.(s)??t.createElement("div"),d=kt(e,i,n,o,r);if(Y.get(l)===d)return l;l.className="docx-drawing docx-drawing-ready",l.style.cssText="",l.dataset.drawingNodeId=e.drawingNodeId,delete l.dataset.docxDrawingLink,delete l.dataset.docxDrawingLinkKind,delete l.dataset.docxDrawingLinkHref,l.removeAttribute("aria-hidden"),l.removeAttribute("aria-label"),l.removeAttribute("role"),l.removeAttribute("tabindex"),N(l,e.paintBounds,n.scale,r);let c=$e(e.geometry.clipPolygon??[],e.paintBounds);c&&(l.style.clipPath=c);let y=t.createElement("div");y.className="docx-drawing-image-frame",y.style.position="absolute";let u=e.geometry.contentBounds,p=e.paintBounds;y.style.left=`${(u.x-p.x)*n.scale}px`,y.style.top=`${(u.y-p.y)*n.scale}px`,y.style.width=`${u.width*n.scale}px`,y.style.height=`${u.height*n.scale}px`;let h=Me(e);h&&(y.style.filter=h);let g=t.createElement("div");g.className="docx-drawing-transform-stage",g.style.position="relative",g.style.width="100%",g.style.height="100%";let w=Te(e);w&&(g.style.transform=w,g.style.transformOrigin="0 0");let S=t.createElement("div");S.className="docx-drawing-crop-viewport",S.style.position="relative",S.style.width="100%",S.style.height="100%",S.style.overflow="hidden";let R=a?.imageFor?.(s,i.resourceKey,t)??t.createElement("img");R.className="docx-drawing-image",R.setAttribute("draggable","false"),R.getAttribute("src")!==o&&R.setAttribute("src",o),R.setAttribute("alt","");let P=He(e);return R.style.position="absolute",R.style.width=P.width,R.style.height=P.height,R.style.left=P.left,R.style.top=P.top,R.style.maxWidth="none",R.style.maxHeight="none",S.append(R),g.append(S),y.append(g),l.replaceChildren(y),e.hyperlinkHref&&!n.inertLinks?(l.dataset.docxDrawingLink=e.drawingNodeId,l.dataset.docxDrawingLinkKind="external",l.dataset.docxDrawingLinkHref=e.hyperlinkHref,l.setAttribute("tabindex","-1"),H(l,e,true)):H(l,e,false),a?.rememberReadyElement?.(s,l),Y.set(l,d),l}var Ee="http://www.w3.org/2000/svg";function Et(t,e,n,o){let a=e.vectorShape,r=t.createElement("div");r.className="docx-drawing docx-drawing-shape",r.dataset.drawingNodeId=e.drawingNodeId,N(r,e.paintBounds,n.scale,o);let i=e.geometry.contentBounds,s=e.paintBounds,l=t.createElement("div");l.className="docx-drawing-image-frame",l.style.position="absolute",l.style.left=`${(i.x-s.x)*n.scale}px`,l.style.top=`${(i.y-s.y)*n.scale}px`,l.style.width=`${i.width*n.scale}px`,l.style.height=`${i.height*n.scale}px`;let d=t.createElementNS(Ee,"svg");d.setAttribute("viewBox",`0 0 ${E(Math.max(1,a.extentEmu.cx))} ${E(Math.max(1,a.extentEmu.cy))}`),d.setAttribute("preserveAspectRatio","none"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.style.display="block";let c=t.createElementNS(Ee,"path"),y=a.subpathsEmu.map(u=>`M${u.map(p=>`${E(p.x)} ${E(p.y)}`).join("L")}Z`).join("");return c.setAttribute("d",y),c.setAttribute("fill",a.fillHex!==null?`#${a.fillHex}`:"none"),c.setAttribute("fill-rule","evenodd"),a.strokeHex!==null&&(c.setAttribute("stroke",`#${a.strokeHex}`),c.setAttribute("stroke-width",E(Math.max(1,a.strokeWidthEmu)))),d.append(c),l.append(d),r.append(l),e.hyperlinkHref&&!n.inertLinks?(r.dataset.docxDrawingLink=e.drawingNodeId,r.dataset.docxDrawingLinkKind="external",r.dataset.docxDrawingLinkHref=e.hyperlinkHref,r.setAttribute("tabindex","-1"),H(r,e,true)):H(r,e,false),r}function Pt(t,e,n,o,a){let r=o.scale,i=t.createElement("div");i.className="docx-drawing docx-drawing-textbox",i.dataset.drawingNodeId=e.drawingNodeId,i.setAttribute("contenteditable","false"),N(i,e.paintBounds,o.scale,a),i.style.overflow="hidden";let s=(e.x-e.paintBounds.x)*r,l=(e.y-e.paintBounds.y)*r;if(n.fillHex!==null||n.strokeHex!==null){let c=t.createElement("div");c.className="docx-drawing-textbox-box",c.style.position="absolute",c.style.left=`${s}px`,c.style.top=`${l}px`,c.style.width=`${e.width*r}px`,c.style.height=`${e.height*r}px`,c.style.boxSizing="border-box",n.fillHex!==null&&(c.style.backgroundColor=`#${n.fillHex}`),n.strokeHex!==null&&(c.style.border=`${Math.max(n.strokeWidthPt*r,.5)}px solid #${n.strokeHex}`),i.append(c);}let d=t.createElement("div");d.className="docx-drawing-textbox-content",d.style.position="absolute",d.style.left=`${s+n.contentOffset.x*r}px`,d.style.top=`${l+n.contentOffset.y*r}px`,d.style.width=`${n.contentWidth*r}px`,d.style.height=`${Math.max(0,n.contentHeight)*r}px`,d.style.overflow="hidden";for(let c of n.fragments)d.append(o.paintStoryFragment(t,c));for(let c of d.querySelectorAll("[data-paragraph-id]"))delete c.dataset.paragraphId;return i.append(d),H(i,e,false),i}function De(t,e,n,o,a){if(e.accessibility.hidden||e.paintBounds.width<=0||e.paintBounds.height<=0)return null;if(e.kind==="anchoredDrawing"&&e.textboxStory!==void 0&&n.paintStoryFragment!==void 0)return Pt(t,e,e.textboxStory,n,a);if(e.vectorShape&&e.vectorShape.subpathsEmu.length>0)return Et(t,e,n,a);let{resource:r}=e;if(r.kind==="ready"){if(!n.imageUrlPort||!o)return B(t,e,n,a);let i=o.urlForReady(r.validatedHandle,r.mime);return i?At(t,e,n,i,o,a):B(t,e,n,a)}if(r.kind==="pending"){let i=o?.readyElementFor?.(Z(e,n))??o?.imageForPending?.(Z(e,n))?.closest(".docx-drawing-ready");return i?(Y.delete(i),i.dataset.drawingNodeId=e.drawingNodeId,N(i,e.paintBounds,n.scale,a),i):B(t,e,n,a)}return B(t,e,n,a)}function Ie(t,e,n,o,a){let r=[];for(let i of e.drawings??[]){let s=De(t,i,n,o,a);s&&r.push(s);}return Object.freeze(r)}function Ce(t,e,n,o,a,r){let i=[];for(let s of e){if(chunkTP4EHWEX_cjs.Ab(s)!==n)continue;let l=De(t,s,o,a,r);l&&(l.dataset.drawingLayer=n,i.push(l));}return Object.freeze(i)}var Lt=16;function $t(t,e){let n=a=>{if(a.kind==="table"){for(let r of a.rows)for(let i of r.cells)for(let s of i.blocks)n(s);return}for(let r of a.lines)for(let i of r.drawings??[])e(i);},o=(a,r=0)=>{if(!(r>Lt)){for(let i of a.anchoredDrawings??[])e(i),i.textboxStory&&o(i.textboxStory,r+1);for(let i of a.fragments)n(i);}};o({fragments:t.fragments,...t.anchoredDrawings?{anchoredDrawings:t.anchoredDrawings}:{}});for(let a of [t.header,t.footer])a&&o(a);for(let a of [t.footnotes,t.endnotes])if(a){a.separator&&o(a.separator);for(let r of a.notes)o(r);}}var Pe=new WeakMap;function Fe(t){let e=Pe.get(t);if(e)return e;let n=[],o=[];$t(t,r=>{r.resource.kind==="ready"&&n.push(r.resource.resourceKey),o.push(`p${t.index}|${r.drawingNodeId}`);});let a=Object.freeze({resourceKeys:Object.freeze(n),elementKeys:Object.freeze(o)});return Pe.set(t,a),a}function Be(t){let e=new Set;for(let n of t.pages)for(let o of Fe(n).resourceKeys)e.add(o);return e}function Ne(t){let e=new Set;for(let n of t.pages)for(let o of Fe(n).elementKeys)e.add(o);return e}function Oe(t){return [t.missingResource,t.externalResource,t.invalidResource,t.contentMismatch,t.decodeFailed,t.resourceLimit,t.pendingResource,t.unsupportedFormat("probe"),t.nonPictureGraphic("probe")].join("\0")}var J=Object.freeze({unsupportedFormat:t=>`Unsupported image format (${t})`,nonPictureGraphic:t=>`Unsupported graphic (${t})`,missingResource:"Image missing",externalResource:"External image not loaded",invalidResource:"Invalid image",contentMismatch:"Image content does not match its type",decodeFailed:"Image could not be decoded",resourceLimit:"Image exceeds size limits",pendingResource:"Loading image"});function In(t){return Object.freeze({unsupportedFormat:e=>t("image.unsupportedFormat",{format:e}),nonPictureGraphic:e=>t("image.nonPictureGraphic",{kind:e}),missingResource:t("image.missingResource"),externalResource:t("image.externalResource"),invalidResource:t("image.invalidResource"),contentMismatch:t("image.contentMismatch"),decodeFailed:t("image.decodeFailed"),resourceLimit:t("image.resourceLimit"),pendingResource:t("image.pendingResource")})}function Tt(t,e,n){t.style.position="absolute",t.style.left=`${e.x*n}px`,t.style.top=`${e.y*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`;}function ze(t,e,n,o){let a=t.createElement("span");return a.className=e,a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.display="block",a.style.left=`${n.x*o}px`,a.style.top=`${n.y*o}px`,a.style.width=`${n.width*o}px`,a.style.height=`${n.height*o}px`,a.style.backgroundColor="currentColor",a.style.pointerEvents="none",a}function A(t,e,n,o,a=0,r=0,i=[]){let s=a+n.box.x,l=r+n.box.y,d=[...i,n.kind];switch(n.kind){case "text":case "fallback":{let c=t.createElement("span");c.className=["docx-equation-node",...d.map(y=>`docx-equation-${y}`)].join(" "),Tt(c,{x:s,y:l,width:n.box.width,height:n.box.height},o),c.textContent=n.text,c.style.display="block",c.style.fontSize=`${n.fontSizePt*o}px`,c.style.lineHeight=`${n.box.height*o}px`,c.style.whiteSpace="pre",e.append(c);break}case "row":for(let c of n.items)A(t,e,c,o,s,l,d);break;case "fraction":A(t,e,n.numerator,o,s,l,d),e.append(ze(t,"docx-equation-fraction-bar",{...n.bar,x:s+n.bar.x,y:l+n.bar.y},o)),A(t,e,n.denominator,o,s,l,d);break;case "radical":A(t,e,n.sign,o,s,l,d),n.degree&&A(t,e,n.degree,o,s,l,d),e.append(ze(t,"docx-equation-radical-bar",{...n.bar,x:s+n.bar.x,y:l+n.bar.y},o)),A(t,e,n.radicand,o,s,l,d);break;case "script":A(t,e,n.base,o,s,l,d),n.subscript&&A(t,e,n.subscript,o,s,l,d),n.superscript&&A(t,e,n.superscript,o,s,l,d);break;case "nary":A(t,e,n.operator,o,s,l,d),n.lowerLimit&&A(t,e,n.lowerLimit,o,s,l,d),n.upperLimit&&A(t,e,n.upperLimit,o,s,l,d),A(t,e,n.body,o,s,l,d);break}}function Ue(t,e,n,o){let a=n.geometry;e.className="layout-run docx-equation",e.dataset.docxEquation=n.sourceNodeId,e.setAttribute("contenteditable","false"),e.setAttribute("role","math"),n.fallbackText&&e.setAttribute("aria-label",n.fallbackText),e.style.position="relative",e.style.display="inline-block",e.style.width=`${a.box.width*o}px`,e.style.height=`${a.box.height*o}px`,e.style.lineHeight="0",e.style.pointerEvents="auto",e.style.userSelect="none",e.style.verticalAlign=`${-(a.box.height-a.baseline)*o}px`;let r=t.createDocumentFragment();A(t,r,a,o),e.append(r);}var Mt=/^[0-9A-Fa-f]{6}$/;function Ht(t){switch(t){case "dashed":return "dashed";case "dotted":return "dotted";case "double":case "triple":return "solid";default:return "solid"}}function _e(t){return t&&Mt.test(t)?t:"000000"}function Q(t,e){let n=t.createElement("div");return n.className=e,n.setAttribute("aria-hidden","true"),n.setAttribute("contenteditable","false"),n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.right="0",n.style.bottom="0",n.style.overflow="visible",n.style.pointerEvents="none",n.style.boxSizing="border-box",n}function G(t,e,n,o){if(!n)return;let a=`#${_e(n.color)}`,r=`${Math.max(0,n.widthPt*o)}px`;if(t.style[`border${e}Width`]=r,t.style[`border${e}Color`]=a,n.style==="double"||n.style==="triple"){t.style[`border${e}Style`]="none";return}t.style[`border${e}Style`]=Ht(n.style);}function ee(t,e,n,o,a){let r=t.createElement("div");r.className=a,r.dataset.edge=n.side,r.dataset.stroke=n.role,r.style.position="absolute",r.style.left=`${n.x*o}px`,r.style.top=`${n.y*o}px`,r.style.width=`${n.width*o}px`,r.style.height=`${n.height*o}px`,r.style.pointerEvents="none",r.style.backgroundColor=`#${_e(n.color)}`,n.cssStyle!=="solid"&&(r.dataset.cssStyle=n.cssStyle),e.append(r);}function Dt(t){let e=new Set;for(let n of t)e.add(`${n.side}\0${n.role}`);return e}function It(t,e,n,o){let a=Dt(n),r=u=>a.has(`${u}\0middle`),i=Q(t,"docx-table-border-double"),s=Q(t,"docx-table-border-triple"),l=Q(t,"docx-table-border-edge"),d=false,c=false,y=false;for(let u of n){if(u.role==="edge"){y=true,ee(t,l,u,o,"docx-table-border-edge-stroke");continue}if(r(u.side)){c=true,ee(t,s,u,o,"docx-table-border-triple-stroke");continue}(u.role==="outer"||u.role==="inner")&&(d=true,ee(t,i,u,o,"docx-table-border-double-stroke"));}d&&e.append(i),c&&e.append(s),y&&e.append(l);}function Ke(t,e,n,o){G(e,"Top",n?.top,o),G(e,"Right",n?.right,o),G(e,"Bottom",n?.bottom,o),G(e,"Left",n?.left,o),n?.strokes&&n.strokes.length>0&&It(t,e,n.strokes,o);}var te="when-selected",je=new WeakMap,Ge=0;function Ct(t){let e=je.get(t);return e||(Ge+=1,e=`alias${Ge}`,je.set(t,e)),e}function et(t){return {...t,drawingStrings:t.drawingStrings??J,urlRegistry:t.urlRegistry??null}}function Ft(t){let e={...t,inertLinks:true};return Object.freeze({scale:t.scale,strings:t.drawingStrings,...t.imageUrlPort?{imageUrlPort:t.imageUrlPort}:{},...t.inertLinks?{inertLinks:true}:{},...t.paintInstance?{paintInstance:t.paintInstance}:{},paintStoryFragment:(n,o)=>o.kind==="table"?C(n,o,e):I(n,o,e)})}function tt(t){return Object.freeze({ctx:Ft(t),urlRegistry:t.urlRegistry})}function We(t,e,n,o,a,r){q(t,e,chunkTP4EHWEX_cjs.$(n),o,a,r);}function q(t,e,n,o,a,r,i=true,s){if(n.length===0)return;let l=tt(o),d=t.createElement("div");d.className=r==="behind"?"docx-drawing-layer docx-drawing-layer-behind":"docx-drawing-layer docx-drawing-layer-front",d.style.position="absolute",d.style.inset="0",d.style.pointerEvents="none",s&&(d.dataset.docxHfFront=s);for(let c of Ce(t,n,r,l.ctx,l.urlRegistry,a)){if(c.style.pointerEvents=i?"auto":"none",!i)for(let y of c.querySelectorAll(".docx-drawing"))y.style.pointerEvents="none";d.append(c);}d.childElementCount>0&&e.append(d);}function nt(t){return t.horizontalFrame==="page"||t.verticalFrame==="page"}function ot(t,e,n){let o=e.paintBounds,a=e.horizontalFrame==="page"?n.x+(o.x-e.horizontalFrameOrigin):t.box.x+o.x,r=e.verticalFrame==="page"?n.y+(o.y-e.verticalFrameOrigin):t.box.y+o.y,i=a-o.x,s=r-o.y,l=d=>Object.freeze({x:d.x+i,y:d.y+s,width:d.width,height:d.height});return Object.freeze({...e,x:e.x+i,y:e.y+s,paintBounds:l(o),hitBounds:l(e.hitBounds),geometry:Object.freeze({...e.geometry,contentBounds:l(e.geometry.contentBounds),paintBounds:l(e.geometry.paintBounds),...e.geometry.clipPolygon?{clipPolygon:Object.freeze(e.geometry.clipPolygon.map(d=>Object.freeze({x:d.x+i,y:d.y+s})))}:{}})})}function Bt(t,e,n,o,a,r){let i=o.map(l=>ot(n,l,r)),s=t.createElement("div");s.className="docx-hf-behind-layer",s.dataset.docxHfBehind=n.kind,s.setAttribute("contenteditable","false"),s.style.position="absolute",s.style.inset="0",s.style.overflow="hidden",s.style.pointerEvents="none",q(t,s,i,a,r,"behind",false),s.childElementCount>0&&e.append(s);}function Nt(t,e,n,o,a,r,i,s=false){let l=o.filter(nt).map(d=>ot(n,d,r));q(t,e,l,a,r,i,s,n.kind);}var F=/^[0-9A-Fa-f]{6}$/,qe=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,Ot=new Map(Object.entries({single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"})),zt=new Map(Object.entries({black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"}));function Ut(t){return t.doubleStrike?"double":t.strike?"single":"none"}function _t(t){return t==="thick"||t.endsWith("Heavy")}function rt(t){if(!t.underline)return null;let e=t.underline.color&&F.test(t.underline.color)?t.underline.color:null;return {cssStyle:Ot.get(t.underline.variant)??"solid",color:e,heavy:_t(t.underline.variant)}}function at(t,e,n,o){t.textDecorationLine=e,t.textDecorationStyle=n,o.color&&(t.textDecorationColor=`#${o.color}`),o.heavy&&(t.textDecorationThickness=`max(${2*o.scale}px, 0.12em)`);}function Ve(t,e,n){e!=="none"&&at(t,"line-through",e==="double"?"double":"solid",{scale:n});}function Xe(t,e,n){at(t,"underline",e.cssStyle,{color:e.color,heavy:e.heavy,scale:n});}function Kt(t,e,n){let o=e.color?`#${e.color}`:"currentColor";t.borderBottomWidth=`${(e.heavy?2:1)*n}px`,t.borderBottomStyle=e.cssStyle==="wavy"?"solid":e.cssStyle,t.borderBottomColor=o;}function W(t,e,n){let o=t.style,a=n.scale,r=e.verticalAlign==="baseline"?1:.75;o.fontSize=`${e.fontSizePt*r*a}px`,e.bold&&(o.fontWeight="bold"),e.italic&&(o.fontStyle="italic");let i=e.fontFamily&&qe.test(e.fontFamily)?e.fontFamily:n.defaultFontFamily&&qe.test(n.defaultFontFamily)?n.defaultFontFamily:null;if(i){let d=n.fontAlias?.(i);o.fontFamily=d?`"${d}", "${i}", ${chunkTP4EHWEX_cjs.Gd}`:`"${i}", ${chunkTP4EHWEX_cjs.Gd}`;}e.color&&F.test(e.color)&&(o.color=`#${e.color}`);let s=e.highlight?zt.get(e.highlight):void 0;s?(o.backgroundColor=s,t.dataset.highlight=e.highlight??""):e.shading&&F.test(e.shading)&&(o.backgroundColor=`#${e.shading}`),e.caps&&(o.textTransform="uppercase"),e.smallCaps&&(o.fontVariant="small-caps");let l=chunkTP4EHWEX_cjs.kb(e);l!==0&&(o.position="relative",o.top=`${-l*a}px`),e.characterSpacingPt!==0&&(o.letterSpacing=`${e.characterSpacingPt*a}px`),e.horizontalScalePercent!==100&&(o.transformOrigin="left",o.transform=`scaleX(${e.horizontalScalePercent/100})`);}function it(t,e,n,o,a){let r=n===" "?null:rt(o),i=Ut(o),s=e;if(r&&i!=="none"){let l=t.createElement("span");l.dataset.docxDeco="underline",Xe(l.style,r,a);let d=t.createElement("span");d.dataset.docxDeco="strike",Ve(d.style,i,a),l.append(d),e.append(l),s=d;}else r?Xe(e.style,r,a):i!=="none"&&Ve(e.style,i,a);s.textContent=n;}function $(t,e,n,o){let a=t.createElement(e);return a.style.position="absolute",a.style.left=`${n.x*o}px`,a.style.top=`${n.y*o}px`,a.style.width=`${n.width*o}px`,a.style.height=`${n.height*o}px`,a}function jt(t,e,n){let o=e.fieldAtom;!o||(t.dataset.fieldAtom=o.formField?"form":"field",!(o.formField?n.shadeFormFields!==false:(n.fieldShading??te)!=="never"))||(t.classList.add("docx-field-atom"),(o.formField||(n.fieldShading??te)==="always")&&t.classList.add("docx-field-atom--shaded"));}function Ye(t,e,n){let o=chunkTP4EHWEX_cjs.sb(e.props),a=n.revisionStyles,r=ve(e.revisions,a?.authorSlots,a?.styles);if(!(!r&&!o)){if(r){let{attribution:i}=r;t.classList.add("docx-revision",`docx-revision-${i.kind}`),t.dataset.revisionKind=i.kind,t.dataset.revisionId=i.id,i.author!==""&&(t.dataset.reviewAuthor=i.author),i.date!==void 0&&(t.dataset.revisionDate=i.date);let s=a?.styles.get(i.author);if(a){t.dataset.reviewAuthorSlot=String((a.authorSlots.get(i.author)??0)%M);let c=a.classTokens.get(i.author);if(c)for(let y=0;y<c.length;y+=1)t.classList.add(c[y]);}let d=a!==void 0&&(s?.color!==void 0||a.others==="author")?r.authorColor:r.color;t.style.color=d,t.style.backgroundColor=s?.background??(r.deleted?"var(--doc-revision-deletion-wash)":"var(--doc-revision-insertion-wash)"),r.line&&(t.style.textDecorationLine=r.line,t.style.textDecorationStyle=r.decorationStyle,t.style.textDecorationColor=d);return}if(t.classList.add("docx-revision","docx-revision-format"),t.dataset.revisionKind="format",t.dataset.revisionId=o.id,o.author!==""&&(t.dataset.reviewAuthor=o.author),o.date!==void 0&&(t.dataset.revisionDate=o.date),a){let i=a.styles.get(o.author);t.dataset.reviewAuthorSlot=String((a.authorSlots.get(o.author)??0)%M);let s=a.classTokens.get(o.author);if(s)for(let l=0;l<s.length;l+=1)t.classList.add(s[l]);i?.color!==void 0&&(t.style.color=i.color),i?.background!==void 0&&(t.style.backgroundColor=i.background);}}}function Gt(t,e,n,o){let a=chunkTP4EHWEX_cjs.pb(e),r=t.createElement("span");r.className=`docx-revision-pmark docx-revision-pmark-${a.kind}`,r.setAttribute("aria-hidden","true"),r.contentEditable="false",r.dataset.revisionKind=a.kind,r.dataset.revisionId=a.id,a.author!==""&&(r.dataset.reviewAuthor=a.author),r.dataset.revisionIds=e.map(d=>d.id).join(" "),r.dataset.revisionKinds=e.map(d=>d.kind).join(" "),r.textContent="\xB6",r.style.position="absolute",r.style.pointerEvents="none",r.style.marginLeft=`${2*n}px`;let i=chunkTP4EHWEX_cjs.qb(a),s=o?.styles.get(a.author),l=o?(o.authorSlots.get(a.author)??0)%M:0;if(o){r.dataset.reviewAuthorSlot=String(l);let d=o.classTokens.get(a.author);if(d)for(let c=0;c<d.length;c+=1)r.classList.add(d[c]);}return r.style.color=s?.color??(o?.others==="author"?_(l):i?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)"),i&&(r.style.textDecorationLine="line-through"),r}function Wt(t,e,n){let o=[],a=e.lines[e.lines.length-1];for(let i of e.lines){let s=[...i.spans.flatMap(u=>u.revisions??[]),...i===a?e.markRevisions??[]:[]];if(s.length===0)continue;let l=s.some(u=>u.kind==="delete"||u.kind==="moveFrom"),d=i.box.y-e.box.y,c=d+i.box.height,y=o[o.length-1];if(y&&y.deleted===l&&d<=y.bottom+.5){y.bottom=Math.max(y.bottom,c);continue}o.push({top:d,bottom:c,deleted:l});}if(o.length===0)return null;let r=t.createElement("div");r.className="docx-change-bars",r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.inset="0",r.style.pointerEvents="none";for(let i of o){let s=t.createElement("div");s.className=`docx-change-bar docx-change-bar-${i.deleted?"deletion":"insertion"}`,s.style.position="absolute",s.style.top=`${i.top*n}px`,s.style.height=`${(i.bottom-i.top)*n}px`,s.style.left=`${(-e.box.x-qt)*n}px`,s.style.width=`${Vt*n}px`,s.style.pointerEvents="none",s.style.backgroundColor=i.deleted?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",r.append(s);}return r}var qt=7.5,Vt=1.5;function Xt(t,e,n,o,a){let r=t.createElement("span");if(e.equation)return r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end),W(r,e.style,n),Ue(t,r,e.equation,n.scale),Ye(r,e,n),r;if(r.className="layout-run layout-run-text",r.style.display="inline-block",r.style.verticalAlign="baseline",r.style.boxSizing="border-box",r.style.height=`${o*n.scale}px`,r.style.paddingTop=`${a*n.scale}px`,r.style.lineHeight=`${(o-a)*n.scale}px`,e.range.end>e.range.start?(r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end)):(r.setAttribute("aria-hidden","true"),r.contentEditable="false"),W(r,e.style,n),jt(r,e,n),Ye(r,e,n),(e.style.horizontalScalePercent!==100||e.text===" ")&&(r.style.width=`${e.box.width*n.scale}px`),e.text===" "){r.style.overflow="hidden",r.style.verticalAlign="top";let i=rt(e.style);i&&(r.dataset.docxTabUnderline="",Kt(r.style,i,n.scale));}return it(t,r,e.text,e.style,n.scale),e.projected&&(r.dataset.docxField="",r.setAttribute("contenteditable","false"),e.noteNav?(r.style.userSelect="none",e.noteNav.direction==="to-note"?(r.dataset.docxNoteRef="",r.dataset.docxNoteScope=e.noteNav.scopeId,e.text.length>0&&r.setAttribute("aria-description",e.text)):(r.dataset.docxNoteMarkBack="",r.dataset.docxNoteScope=e.noteNav.scopeId)):(r.style.pointerEvents="none",r.style.userSelect="none")),r}function Ze(t,e,n){let o=t.createElement("a");return o.className="docx-hyperlink",o.dataset.docxLink=e.id,o.dataset.docxLinkKind=e.kind,o.setAttribute("tabindex","-1"),!n.inertLinks&&e.href&&(o.setAttribute("href",e.href),e.kind==="external"&&o.setAttribute("rel","noopener noreferrer")),e.tooltip&&o.setAttribute("title",e.tooltip),o.style.display="inline-block",o.style.verticalAlign="baseline",o.style.textDecoration="none",o.style.color="inherit",o}function Yt(t,e,n){let o=n.scale,a=t.createElement("div");a.className="docx-line layout-line",a.dataset.lineId=e.id,a.dataset.paragraphId=e.range.paragraphId,a.style.position="absolute",a.style.top=`${e.box.y*o}px`,a.style.left=`${e.contentX*o}px`,a.style.height=`${e.box.height*o}px`,a.style.fontSize="0",a.style.whiteSpace="pre",a.style.overflow="visible";let r=e.leading??0,i=Math.min(Math.max(r,...e.spans.map(v=>v.box.height+r),e.spans.length===0?e.box.height-(e.trailingSpacing??0):0),e.box.height),s=Math.max(0,e.box.height-i);a.style.boxSizing="border-box",a.style.paddingBottom=`${s*o}px`,a.style.lineHeight=`${(e.box.height-s)*o}px`;let l=null,d=null,c=null,y=new Map;for(let[v,b]of chunkTP4EHWEX_cjs.uc(e).entries())y.set(b.paragraphId,v);let u=v=>y.get(v)??0,p=[...e.drawings??[]].sort((v,b)=>u(v.paragraphId)-u(b.paragraphId)||v.start-b.start),h=0,g=(v,b)=>{for(;h<p.length&&(u(p[h].paragraphId)<u(v)||u(p[h].paragraphId)===u(v)&&p[h].start<b);){let x=p[h],f=Math.max(0,x.advanceEnd-x.advanceStart),m=t.createElement("span");m.className="docx-inline-drawing-advance",m.dataset.docxMarker="",m.setAttribute("contenteditable","false"),m.setAttribute("aria-hidden","true"),m.style.display="inline-block",m.style.width=`${f*o}px`,m.style.height=`${x.baselineOffset*o}px`,m.style.lineHeight="0",m.style.pointerEvents="none",m.style.verticalAlign="baseline",a.append(m),h+=1,l=null,d=null;}},w=v=>{let b=v.wrapAdvanceBefore??0;if(b<=.001)return;let x=t.createElement("span");x.className="docx-wrap-advance",x.dataset.docxMarker="",x.setAttribute("contenteditable","false"),x.setAttribute("aria-hidden","true"),x.style.display="inline-block",x.style.width=`${b*o}px`,x.style.height="0",x.style.lineHeight="0",x.style.pointerEvents="none",x.style.verticalAlign="baseline",a.append(x),l=null,d=null;},S=0,R=false;for(let[v,b]of e.spans.entries()){g(b.range.paragraphId,b.range.start),w(b);let x=Math.min(b.box.height+r,e.box.height),f=Xt(t,b,n,x,r);S>0&&!R&&(f.style.marginLeft=`${S*o}px`);let m=e.spans[v+1],T=Zt(e,v+1,u);R=T>0&&m!==void 0&&Qt(b,m),R&&(f.style.wordSpacing=`${T*o}px`),S=T;let k=b.link;if(!k){l=null,d=null,c=null,a.append(f);continue}if(b.fieldAtom){l!==null&&d===k.id&&c===b.range.start||(l=Ze(t,k,n),d=k.id,c=b.range.start,a.append(l)),l.append(f);continue}(!l||d!==k.id||c!==null)&&(l=Ze(t,k,n),d=k.id,c=null,a.append(l)),l.append(f);}if(g(chunkTP4EHWEX_cjs.uc(e)[chunkTP4EHWEX_cjs.uc(e).length-1]?.paragraphId??e.range.paragraphId,Number.POSITIVE_INFINITY),e.spans.length===0){let v=t.createElement("br");v.style.lineHeight=`${e.box.height*o}px`,a.append(v);}let P=Object.freeze({x:e.contentX,y:e.box.y,width:e.box.width,height:e.box.height}),L=tt(et(n));if(e.drawings&&e.drawings.length>0)for(let v of Ie(t,e,L.ctx,L.urlRegistry,P))a.append(v);return a}function Zt(t,e,n){if(e<=0||e>=t.spans.length)return 0;let o=t.spans[e-1],a=t.spans[e],r=n(o.range.paragraphId),i=n(a.range.paragraphId);if(t.drawings?.some(d=>{let c=n(d.paragraphId),y=c>r||c===r&&d.start>=o.range.start,u=c<i||c===i&&d.start<a.range.start;return y&&u}))return 0;let l=a.box.x-(o.box.x+o.box.width)-(a.wrapAdvanceBefore??0);return l>.25?l:0}var Jt=/[\t\n\r \u00A0\u1361\u{10100}-\u{10102}\u{1039F}\u{1091F}]/u;function Qt(t,e){return !t.text.endsWith(" ")||t.style.horizontalScalePercent!==100||!en(t,e)||(e.wrapAdvanceBefore??0)>.001?false:!Jt.test(t.text.slice(0,-1))}function en(t,e){return !t.link&&!e.link?true:!t.link||!e.link||t.link.id!==e.link.id||!!t.fieldAtom!=!!e.fieldAtom?false:!t.fieldAtom||t.range.start===e.range.start}function I(t,e,n){let o=n.scale,a=$(t,"div",e.box,o);a.className="docx-paragraph-fragment layout-paragraph",a.dataset.paragraphId=e.paragraphId,a.dataset.fragmentIndex=String(e.fragmentIndex),n.readOnlyParagraphIds?.has(e.paragraphId)&&(a.classList.add("docx-generated-region"),a.dataset.docxReadOnly="",a.setAttribute("contenteditable","false"),a.setAttribute("aria-readonly","true")),n.emptyTocPlaceholderIds?.has(e.paragraphId)&&(a.classList.add("docx-toc-empty-placeholder"),a.dataset.docxTocEmpty=""),e.shading&&F.test(e.shading)&&e.shadingBox&&a.append(rn(t,e,o)),e.marker&&a.append(tn(t,e,n));for(let i of e.lines)for(let s of i.spans){if(!s.tabLeader)continue;let l=on(t,e,i,s,n);l&&a.append(l);}let r=Wt(t,e,o);if(r&&a.append(r),e.markRevisions&&e.markRevisions.length>0){let i=Gt(t,e.markRevisions,o,n.revisionStyles),s=e.lines[e.lines.length-1];if(s){let l=s.spans[s.spans.length-1];i.style.top=`${(s.box.y-e.box.y)*o}px`,i.style.left=`${((l?l.box.x+l.box.width:s.contentX)-e.box.x)*o}px`,a.append(i);}}for(let i of e.lines){let s=Yt(t,i,n);s.style.top=`${(i.box.y-e.box.y)*o}px`,s.style.left=`${(i.contentX-e.box.x)*o}px`,a.append(s);}if(e.borders)for(let i of e.borders)a.append(Je(t,e,i,o));else e.bottomBorder&&a.append(Je(t,e,{side:"bottom",edge:e.bottomBorder.edge,box:e.bottomBorder.box},o));return a}function tn(t,e,n){let o=e.marker,a=n.scale,r=e.lines[0]?.leading??0,i=$(t,"span",o.box,a);i.className="docx-list-marker",i.dataset.docxMarker="",i.setAttribute("contenteditable","false"),i.setAttribute("aria-hidden","true"),i.style.left=`${(o.box.x-e.box.x)*a}px`,i.style.top=`${(o.box.y-e.box.y)*a}px`,i.style.display="block",i.style.overflow="visible",i.style.whiteSpace="pre";let s=e.lines[0],l=s?Math.max(r,...s.spans.map(u=>u.box.height+r),s.spans.length===0?s.box.height-(s.trailingSpacing??0):0):o.box.height,d=Math.min(l,o.box.height),c=Math.max(0,o.box.height-d);i.style.fontSize="0",i.style.boxSizing="border-box",i.style.paddingBottom=`${c*a}px`,i.style.lineHeight=`${d*a}px`;let y=t.createElement("span");return y.style.display="inline-block",y.style.verticalAlign="baseline",y.style.boxSizing="border-box",y.style.height=`${d*a}px`,y.style.paddingTop=`${r*a}px`,y.style.lineHeight=`${(d-r)*a}px`,W(y,o.style,n),it(t,y,o.text,o.style,a),i.append(y),i}var nn=512;function on(t,e,n,o,a){let r=o.tabLeader?chunkTP4EHWEX_cjs.Ma.get(o.tabLeader):void 0;if(!r||o.box.width<=0)return null;let i=a.scale,s=t.createElement("div");s.className="docx-tab-leader",s.dataset.docxTabLeader="",s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left=`${(o.box.x-e.box.x)*i}px`,s.style.top=`${(n.box.y-e.box.y)*i}px`,s.style.width=`${o.box.width*i}px`,s.style.height=`${n.box.height*i}px`,s.style.overflow="hidden",s.style.whiteSpace="pre",s.style.pointerEvents="none",s.style.userSelect="none";let l=n.leading??0,d=Math.min(o.box.height+l,n.box.height),c=Math.max(0,n.box.height-d);s.style.fontSize="0",s.style.boxSizing="border-box",s.style.paddingBottom=`${c*i}px`,s.style.lineHeight=`${(n.box.height-c)*i}px`;let y=t.createElement("span");y.style.display="inline-block",y.style.verticalAlign="baseline",W(y,o.style,a),y.style.boxSizing="border-box",y.style.height=`${d*i}px`,y.style.paddingTop=`${l*i}px`,y.style.lineHeight=`${(d-l)*i}px`,o.tabLeader==="heavy"&&(y.style.fontWeight="bold");let u=o.tabLeaderAdvancePt&&o.tabLeaderAdvancePt>0?o.tabLeaderAdvancePt:Math.max(.5,o.style.fontSizePt*.2),p=Math.min(nn,Math.max(1,Math.floor(o.box.width/u)+2));return y.textContent=r.repeat(p),y.style.letterSpacing="0",s.append(y),s}function rn(t,e,n){let o=e.shadingBox,a=$(t,"div",o,n);return a.className="docx-paragraph-shading",a.setAttribute("aria-hidden","true"),a.style.left=`${(o.x-e.box.x)*n}px`,a.style.top=`${(o.y-e.box.y)*n}px`,a.style.backgroundColor=`#${e.shading}`,a}function Je(t,e,n,o){let a=$(t,"div",n.box,o);a.className=`docx-paragraph-border docx-paragraph-border-${n.side}`,a.setAttribute("aria-hidden","true");let r=(n.box.x-e.box.x)*o,i=(n.box.y-e.box.y)*o,s=n.side==="left"||n.side==="right"||n.side==="bar",l=(s?n.box.width:n.box.height)*o,c=an(n.edge.val)?l:Math.max(1,l);a.style.left=`${n.side==="right"?r-(c-l):r}px`,a.style.top=`${n.side==="bottom"?i-(c-l):i}px`,s?a.style.width=`${c}px`:a.style.height=`${c}px`;let y=n.edge.color&&F.test(n.edge.color)?n.edge.color:"000000";return a.style.backgroundColor=`#${y}`,sn(a,n.edge.val,y,s,c,o),a}function an(t){return t==="double"||t==="triple"||t==="doubleWave"||t.startsWith("thinThick")||t.startsWith("thickThin")}function sn(t,e,n,o,a,r){switch(e){case "dashed":case "dashSmallGap":case "dotDash":case "dotDotDash":case "dashDotStroked":{let i=Math.max(4,4*r);t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 60%, transparent 60%)`,t.style.backgroundSize=o?`100% ${i}px`:`${i}px 100%`;return}case "dotted":{let i=Math.max(3,3*r);t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 35%, transparent 35%)`,t.style.backgroundSize=o?`100% ${i}px`:`${i}px 100%`;return}case "double":case "doubleWave":case "triple":case "thinThickSmallGap":case "thickThinSmallGap":case "thinThickThinSmallGap":case "thinThickMediumGap":case "thickThinMediumGap":case "thinThickThinMediumGap":case "thinThickLargeGap":case "thickThinLargeGap":case "thinThickThinLargeGap":{let i=Math.max(1,a/3);t.style.backgroundColor="transparent",o?(t.style.borderLeft=`${i}px solid #${n}`,t.style.borderRight=`${i}px solid #${n}`):(t.style.borderTop=`${i}px solid #${n}`,t.style.borderBottom=`${i}px solid #${n}`),t.style.boxSizing="border-box";return}case "threeDEmboss":case "ridge":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,a)}px ridge #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "threeDEngrave":case "groove":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,a)}px groove #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "inset":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,a)}px inset #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "outset":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,a)}px outset #${n}`,o?t.style.width="0px":t.style.height="0px";return}default:return}}function ln(t,e,n,o){let a=o.scale,r=$(t,"div",e.box,a);if(r.className="docx-table-cell",r.style.left=`${(e.box.x-n.x)*a}px`,r.style.top=`${(e.box.y-n.y)*a}px`,r.style.boxSizing="border-box",r.style.overflow="visible",r.dataset.cellId=e.id,r.dataset.gridColumn=String(e.gridColumn),r.dataset.gridSpan=String(e.gridSpan),e.rowSpan&&e.rowSpan>1&&(r.dataset.rowSpan=String(e.rowSpan)),e.paintInert||e.vMergeContinue)return r.dataset.vMergeContinue="true",r.style.border="none",r.style.backgroundColor="transparent",r;r.style.border="none",Ke(t,r,e.borders,a),e.shading&&F.test(e.shading)&&(r.style.backgroundColor=`#${e.shading}`);for(let i of e.blocks){let s=i.kind==="table"?C(t,i,o):I(t,i,o);s.style.left=`${(i.box.x-e.box.x)*a}px`,s.style.top=`${(i.box.y-e.box.y)*a}px`,r.append(s);}return r}function C(t,e,n){let o=n.scale,a=$(t,"div",e.box,o);a.className="docx-table-fragment layout-table",a.dataset.tableId=e.tableId,a.dataset.fragmentIndex=String(e.fragmentIndex),a.style.overflow="visible";for(let r of e.rows){let i=$(t,"div",r.box,o);i.className="docx-table-row",r.revisionKind&&(i.classList.add("docx-table-row--revision",r.revisionKind==="insert"?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionKind=r.revisionKind,r.revisionId!==void 0&&(i.dataset.revisionId=r.revisionId),r.revisionAuthor!==void 0&&(i.dataset.reviewAuthor=r.revisionAuthor),r.revisionDate!==void 0&&(i.dataset.revisionDate=r.revisionDate)),i.dataset.rowId=r.id,r.isHeaderRepeat&&(i.dataset.headerRepeat="true"),i.style.left=`${(r.box.x-e.box.x)*o}px`,i.style.top=`${(r.box.y-e.box.y)*o}px`,i.style.overflow="visible";for(let s of r.cells)i.append(ln(t,s,r.box,n));a.append(i);}return a}function dn(t,e,n,o,a){let r={...n,paintInstance:`p${e.index}`},i=$(t,"div",e.box,r.scale);if(i.className="docx-page",i.style.fontFamily=chunkTP4EHWEX_cjs.Gd,i.dataset.pageIndex=String(e.index),r.ariaHidden&&(i.setAttribute("aria-hidden","true"),i.setAttribute("role","presentation")),i.dataset.materialized=String(o),!o)return i;let s=Object.freeze({x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height}),l=Object.freeze({x:-(e.contentBox.x-e.box.x),y:-(e.contentBox.y-e.box.y),width:e.box.width,height:e.box.height});We(t,i,e,r,l,"behind");for(let y of [e.header,e.footer])y?.anchoredDrawings?.length&&Bt(t,i,y,y.anchoredDrawings,r,{x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height});let d=t.createElement("div");d.className="docx-page-content",d.style.position="absolute",d.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,d.style.top=`${(e.contentBox.y-e.box.y)*r.scale}px`,d.style.width=`${e.contentBox.width*r.scale}px`,d.style.height=`${e.contentBox.height*r.scale}px`,r.activeHeaderFooterRId&&d.setAttribute("contenteditable","false");for(let y of e.columnSeparators??[]){let u=t.createElement("div");u.className="docx-column-separator",u.setAttribute("contenteditable","false"),u.style.position="absolute",u.style.left=`${y.x*r.scale}px`,u.style.top=`${y.y*r.scale}px`,u.style.width=`${y.width*r.scale}px`,u.style.height=`${y.height*r.scale}px`,u.style.backgroundColor="currentColor",u.style.pointerEvents="none",d.append(u);}let c=a?new Map:null;for(let y of e.fragments){let u=y.kind==="table"?C(t,y,r):I(t,y,r);c?.set(y,u),d.append(u);}a&&c&&(a.content=d,a.blocks=c),i.append(d),We(t,i,e,r,l,"inFront"),Re(t,i,e,r,I,C);for(let y of ["header","footer"]){if(e[y])continue;let u=t.createElement("div");u.className="docx-hf docx-hf--placeholder",u.dataset.docxHf=y,u.setAttribute("contenteditable","false");let p=y==="header"?e.contentBox.y-e.box.y:e.box.y+e.box.height-(e.contentBox.y+e.contentBox.height),h=Math.min(p,cn);if(h<=0)continue;let g=Math.max(0,Math.min(yn,p-h)),w=y==="header"?g:e.box.height-g-h;u.style.position="absolute",u.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,u.style.top=`${w*r.scale}px`,u.style.width=`${e.contentBox.width*r.scale}px`,u.style.height=`${h*r.scale}px`,i.append(u);}for(let y of [e.header,e.footer]){if(!y)continue;let u=y.anchoredDrawings??[],p=K(y,e.index,r),h=t.createElement("div");h.className="docx-hf",h.dataset.docxHf=y.kind,y.rId&&(h.dataset.docxRId=y.rId),p?(h.dataset.docxHfActive="",h.setAttribute("contenteditable","true")):h.setAttribute("contenteditable","false"),h.style.position="absolute",h.style.left=`${(y.box.x-e.box.x)*r.scale}px`,h.style.top=`${(y.box.y-e.box.y)*r.scale}px`,h.style.width=`${y.box.width*r.scale}px`;let g=X(y,e,p);h.style.height=`${g*r.scale}px`,h.style.overflow="visible";let w=(e.box.x-y.box.x)*r.scale,S=(e.box.y-y.box.y)*r.scale,R=w+e.box.width*r.scale,P=S+e.box.height*r.scale;h.style.clipPath=`polygon(${w}px ${S}px, ${R}px ${S}px, ${R}px ${P}px, ${w}px ${P}px)`;let L=Object.freeze({x:0,y:0,width:y.box.width,height:y.box.height}),v=u.filter(f=>!nt(f)),b={...r,inertLinks:true};for(let f of y.fragments)h.append(f.kind==="table"?C(t,f,b):I(t,f,b));q(t,h,v,et(r),L,"inFront",p),i.append(h);let x=t.createElement("div");x.className="docx-hf-edit-hint",x.dataset.docxHfHint=y.kind,x.setAttribute("contenteditable","false"),x.style.position="absolute",x.style.left=h.style.left,x.style.width=h.style.width,x.style.top=y.kind==="header"?`${(y.box.y+y.box.height-e.box.y)*r.scale}px`:`${(y.box.y-e.box.y)*r.scale}px`,y.kind==="footer"&&(x.style.transform="translateY(-100%)"),i.append(x),Nt(t,i,y,u,r,s,"inFront",p);}return pn(t,i,e,r),i}var cn=30,yn=36,un=16,hn=new Set(["dropdown","comboBox","date","checkbox"]);function pn(t,e,n,o){let a=o.contentControlChrome,r=a?.suppressedIds,i=(n.contentControls??[]).filter(u=>r?.has(u.id)!==true),s=[...i,...(a?.additionalBoundaries??[]).filter(u=>r?.has(u.id)!==true&&!i.some(p=>p.id===u.id))];if(s.length===0)return;let l=a?.showAll===true,d=a?.activeIds,c=a?.hoverIds,y=a?.tocControlIds;for(let u of s){let p=y?.has(u.id)===true,h=!p&&d?.has(u.id)===true,g=c?.has(u.id)===true;e.append(fn(t,n,u,o.scale,h,g,l||h||p&&g,a?.checkedIds?.has(u.id),p,a?.readOnly===true));}}function fn(t,e,n,o,a,r,i,s,l,d){let c=t.createElement("div");c.className="docx-content-control-chrome",c.dataset.docxContentControl=n.id,c.dataset.docxMarker="",c.dataset.controlType=n.controlType,c.dataset.lock=n.effectiveLock,n.bound&&(c.dataset.bound=""),n.placeholder&&(c.dataset.placeholder=""),l&&(c.dataset.docxToc=""),d&&(c.dataset.readOnly=""),a&&(c.dataset.active=""),r&&(c.dataset.hover=""),i&&(c.dataset.boundaryVisible=""),c.setAttribute("contenteditable","false"),c.setAttribute("role","group"),n.alias&&(c.dataset.alias=n.alias),n.tag&&(c.dataset.tag=n.tag),n.alias&&c.setAttribute("aria-label",n.alias),c.style.position="absolute",c.style.inset="0",c.style.pointerEvents="none",c.style.zIndex="2";let y=e.contentBox.x-e.box.x,u=e.contentBox.y-e.box.y;for(let h of n.fragments){if(h.pageIndex!==e.index)continue;let g=t.createElement("div");g.className="docx-content-control-boundary",g.dataset.docxMarker="",g.setAttribute("contenteditable","false"),g.setAttribute("aria-hidden","true"),g.style.position="absolute",g.style.left=`${(y+h.box.x)*o}px`,g.style.top=`${(u+h.box.y)*o}px`,g.style.width=`${Math.max(h.box.width,1)*o}px`,g.style.height=`${Math.max(h.box.height,1)*o}px`,g.style.pointerEvents="none",c.append(g);}let p=n.fragments.find(h=>h.pageIndex===e.index);if(p&&n.alias){let h=t.createElement("div");h.className="docx-content-control-label",h.dataset.docxMarker="",h.setAttribute("contenteditable","false"),h.setAttribute("aria-hidden","true"),h.textContent=n.alias,h.style.position="absolute",h.style.left=`${(y+p.box.x)*o}px`,h.style.top=`${Math.max(0,(u+p.box.y)*o-un)}px`,h.style.pointerEvents="none",c.append(h);}if(p&&hn.has(n.controlType)){let h=t.createElement("button");h.type="button",h.className="docx-content-control-widget",h.dataset.docxMarker="",h.dataset.docxCcWidget=n.controlType,h.dataset.docxCcId=n.id,h.setAttribute("contenteditable","false"),h.setAttribute("tabindex","-1"),n.controlType==="checkbox"?h.setAttribute("role","checkbox"):n.controlType==="dropdown"||n.controlType==="comboBox"?h.setAttribute("role","listbox"):n.controlType==="date"&&h.setAttribute("role","button"),n.alias&&(h.dataset.name=n.alias),n.alias&&h.setAttribute("aria-label",n.alias),n.controlType==="checkbox"&&(h.setAttribute("data-checked",s?"true":"false"),h.setAttribute("aria-checked",s?"true":"false"));let g=n.effectiveLock==="contentLocked"||n.effectiveLock==="sdtContentLocked";(d||g||n.bound)&&(h.disabled=true,h.dataset.disabledReason=d?"readOnly":n.bound?"bound":"locked",h.setAttribute("aria-disabled","true")),h.style.position="absolute",h.style.left=`${(y+p.box.x+p.box.width)*o-18}px`,h.style.top=`${(u+p.box.y)*o}px`,h.style.width="16px",h.style.height="16px",h.style.pointerEvents="auto",h.style.padding="0",h.style.margin="0",h.style.cursor=h.disabled?"not-allowed":"pointer",c.append(h);}return c}var ne=new WeakMap;function Xn(t){ne.delete(t);}function gn(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xn(t,e){let n=Object.keys(t);if(n.length!==Object.keys(e).length)return false;for(let o of n){let a=t[o],r=e[o];if(a!==r)return false}return true}function bn(t,e){if(t.length!==e.length)return false;for(let n=0;n<t.length;n+=1)if(t[n]!==e[n])return false;return true}function mn(t,e){if(t===e)return false;let n=new Set([...Object.keys(t),...Object.keys(e)]);for(let o of n){if(o==="fragments")continue;let a=t[o],r=e[o];if(a!==r&&!(Array.isArray(a)&&Array.isArray(r)&&bn(a,r))&&!(typeof a=="object"&&typeof r=="object"&&a!==null&&r!==null&&!Array.isArray(a)&&!Array.isArray(r)&&xn(a,r)))return false}return true}var Qe="docx-column-separator";function vn(t,e,n,o){let a=e.content,r=e.blocks;if(!a||!r||a.parentElement!==e.element)return null;let i={...o,paintInstance:`p${n.index}`},s=new Map,l=[];for(let u of n.fragments){let p=r.get(u)??(u.kind==="table"?C(t,u,i):I(t,u,i));s.set(u,p),l.push(p);}let d=new Set(l),c=a.firstChild;for(;c;){let u=c.nextSibling,p=c;!d.has(p)&&p.classList?.contains(Qe)!==true&&c.remove(),c=u;}let y=a.firstChild;for(;y&&y.classList?.contains(Qe);)y=y.nextSibling;for(let u of l){if(u===y){y=y.nextSibling;continue}a.insertBefore(u,y);}return {record:n,materialized:true,element:e.element,content:a,blocks:s}}function Rn(t,e,n,o){let a=t.element;return !t.materialized&&gn(t.record.box,e.box)&&a.style.left===`${e.box.x*n}px`&&a.style.top===`${e.box.y*n}px`&&a.style.width===`${e.box.width*n}px`&&a.style.height===`${e.box.height*n}px`&&a.getAttribute("aria-hidden")===(o?"true":null)}function Sn(t,e,n={}){wn(t,e,n);}function wn(t,e,n,o){let a=n.contentControlChrome,r=a?`${a.showAll===true?"1":"0"}:${a.activeIds?[...a.activeIds].sort().join(","):""}:${a.checkedIds?[...a.checkedIds].sort().join(","):""}:${a.tocControlIds?[...a.tocControlIds].sort().join(","):""}:${a.suppressedIds?[...a.suppressedIds].sort().join(","):""}:${a.readOnly===true?"ro":""}`:"",i=n.drawingStrings??J,s=n.imageUrlPort!==void 0?Le(t,n.imageUrlPort):null,l=a?.additionalBoundaries?a.additionalBoundaries.flatMap(f=>f.fragments.map(m=>`${f.id}:${m.pageIndex}:${m.box.x}:${m.box.y}:${m.box.width}:${m.box.height}`)).sort().join(","):"",d=n.readOnlyParagraphIds?[...n.readOnlyParagraphIds].sort().join(","):"",c=n.emptyTocPlaceholderIds?[...n.emptyTocPlaceholderIds].sort().join(","):"",y=a?.tocControlIds?[...a.tocControlIds].sort().join(","):"",u=me(n.revisionStyles,e,o),p={scale:n.scale??96/72,ariaHidden:n.ariaHidden??true,drawingStrings:i,urlRegistry:s,...n.fontAlias?{fontAlias:n.fontAlias}:{},...n.readOnlyParagraphIds?{readOnlyParagraphIds:n.readOnlyParagraphIds}:{},...n.emptyTocPlaceholderIds?{emptyTocPlaceholderIds:n.emptyTocPlaceholderIds}:{},...n.defaultFontFamily?{defaultFontFamily:n.defaultFontFamily}:{},...n.fieldShading?{fieldShading:n.fieldShading}:{},...n.shadeFormFields!==void 0?{shadeFormFields:n.shadeFormFields}:{},...u?{revisionStyles:u}:{},...n.imageUrlPort?{imageUrlPort:n.imageUrlPort}:{},...n.activeHeaderFooterRId?{activeHeaderFooterRId:n.activeHeaderFooterRId}:{},...n.activeHeaderFooterPageIndex!==void 0?{activeHeaderFooterPageIndex:n.activeHeaderFooterPageIndex}:{},...a?{contentControlChrome:a}:{}},h=t.ownerDocument,g=`${p.scale}|${p.ariaHidden}|${p.fontAlias?Ct(p.fontAlias):""}|${p.defaultFontFamily??""}|cc:${r}:${l}|toc:${y}|ro:${d}|tocEmpty:${c}|${n.imageUrlPort?"url":""}|${Oe(i)}|rev:${be(u)}`,w=ne.get(t),S=w?.parameters===g,R=S?new Map(w.pages.map(f=>[f.record,f])):null,P=w?new Map(w.pages.map(f=>[f.record.index,f])):null,L=e.pages.map(f=>{let m=n.materialize?.has(f.index)??true,T=R?.get(f);if(T&&T.materialized===m)return T;let k=P?.get(f.index);if(!m&&k&&Rn(k,f,p.scale,p.ariaHidden))return {record:f,materialized:false,element:k.element};if(S&&m&&k?.materialized&&mn(k.record,f)){let oe=vn(h,k,f,p);if(oe)return oe}let D={},st=dn(h,f,p,m,D);return {record:f,materialized:m,element:st,...D.content?{content:D.content}:{},...D.blocks?{blocks:D.blocks}:{}}});ne.set(t,{parameters:g,pages:L}),t.dataset.revision=String(e.revision),s&&s.reconcile(Be(e),Ne(e));let v=new Set(L.map(f=>f.element)),b=t.firstChild;for(;b;){let f=b.nextSibling;v.has(b)||b.remove(),b=f;}let x=t.firstChild;for(let f of L){if(f.element===x){x=x.nextSibling;continue}t.insertBefore(f.element,x);}Se(L,p);}function kn(t,e,n,o){let a=t.ownerDocument,r=o.scale,i=[];for(let s of n){let l=e.pages[s.pageIndex];if(!l)continue;let d=a.createElement("div");d.className=s.className??o.className??"docx-cell-selection-rect",d.style.position="absolute";let c=o.pageOffsetX?.get(s.pageIndex)??0;d.style.left=`${(l.contentBox.x+s.x+c)*r}px`,d.style.top=`${(l.contentBox.y+s.y)*r}px`,d.style.width=`${s.width*r}px`,d.style.height=`${s.height*r}px`,s.reviewAuthor&&(d.dataset.reviewAuthor=s.reviewAuthor.author,d.dataset.reviewAuthorSlot=String(s.reviewAuthor.slot%M),d.style.setProperty("--doc-review-author-current",s.reviewAuthor.color)),i.push(d);}t.replaceChildren(...i);}
2
+ exports.a=xe;exports.b=En;exports.c=gt;exports.d=Pn;exports.e=Dn;exports.f=J;exports.g=In;exports.h=te;exports.i=Xn;exports.j=Sn;exports.k=wn;exports.l=kn;
@@ -0,0 +1,2 @@
1
+ import {c,d,p,f,k as k$1,j as j$1,i,zc,Jc,va,ta,ya,ra,u,V as V$1,ve,te as te$1,wa,Aa,re as re$1,xa,qb,lf,ff,bf,Ze,wb,Ia,U as U$1,Qc,ca,w,la,na,Xb,jc,Hb,Jb,ma,ba,ga,fa}from'./chunk-VUJGPCPU.js';import {strFromU8,strToU8}from'fflate';var Ft=["extension","capability","command","query","schema","dependencyKey","runtimePort","result","origin"],Bt=/^[a-z0-9]+(?:-[a-z0-9]+)*(?:\.[a-z0-9]+(?:-[a-z0-9]+)*)+$/,Ut=/^@[a-z0-9.-]+\/[a-z0-9.-]+(?:#[a-z0-9]+(?:[/._-][a-z0-9]+)*)?$/;function it(e){return Bt.test(e)||Ut.test(e)}function J(e,t){if(!it(e))throw new Error(`invalid ${t??"registry"} id ${JSON.stringify(e)}: must be reverse-domain (dev.docx-editor.core.x) or package-owned (@scope/pkg#kind/name)`)}var Ht=/^(\d+)\.(\d+)\.(\d+)$/;function S(e){let t=Ht.exec(e);if(!t)throw new Error(`invalid semantic version: ${JSON.stringify(e)}`);return {major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3])}}function q(e,t){return e.major!==t.major?e.major<t.major?-1:1:e.minor!==t.minor?e.minor<t.minor?-1:1:e.patch!==t.patch?e.patch<t.patch?-1:1:0}function Q(e,t){let n=S(e),r=t.trim();if(r==="*")return true;if(r.startsWith("^")){let o=S(r.slice(1));return q(n,o)<0?false:o.major>0?n.major===o.major:o.minor>0?n.major===0&&n.minor===o.minor:n.major===0&&n.minor===0}if(r.includes(" ")){let o=r.split(/\s+/);if(o.length!==2)throw new Error(`unsupported version range: ${JSON.stringify(t)}`);let s=true;for(let a of o){let i=a.startsWith(">=")?">=":a.startsWith("<")?"<":null;if(!i)throw new Error(`unsupported version range: ${JSON.stringify(t)}`);let d=S(a.slice(i.length)),l=q(n,d);i===">="?s=s&&l>=0:s=s&&l<0;}return s}return q(n,S(r))===0}var h=class extends Error{constructor(n,r,o=[]){super(r);this.code=n;this.responsible=o;this.name="RegistryError";}code;responsible},Me=(e,t)=>`${e}:${t}`;function Vt(e,t={}){let n=new Map;for(let l of e){if(J(l.id,"extension"),at(l.version,l.id),n.has(l.id))throw new h("duplicate-extension",`duplicate extension id ${l.id}`,[l.id]);n.set(l.id,l);for(let c of l.contributions)J(c.id,c.kind),at(c.version,`${l.id} \u2192 ${c.id}`),c.replaces&&Kt(c.replaces.targetRange,`${l.id} \u2192 replaces ${c.replaces.targetId}`);}for(let l of e){for(let c of l.dependencies??[])if(!n.has(c))throw new h("missing-dependency",`${l.id} requires missing extension ${c}`,[l.id,c]);for(let c of l.conflicts??[])if(n.has(c)){let p=[l.id,c].sort();throw new h("conflict",`extensions ${p[0]} and ${p[1]} conflict`,p)}}Xt(n);let r=new Set(t.availablePorts??[]);for(let l of e)for(let c of l.contributions)c.kind==="runtimePort"&&r.add(c.id);for(let l of e)for(let c of l.requiredPorts??[])if(!r.has(c))throw new h("missing-port",`${l.id} requires unavailable port ${c}`,[l.id,c]);let o=new Map,s=new Map,a=new Map;for(let l of e)for(let c of l.contributions){let p=Me(c.kind,c.id);if(c.replaces){let u=Me(c.kind,c.replaces.targetId),m=a.get(u)??[];m.push({ext:l.id,c}),a.set(u,m);continue}if(s.has(p)){let u=[o.get(p),l.id].sort();throw new h("id-collision",`${c.kind} id ${c.id} registered by both ${u[0]} and ${u[1]}`,u)}s.set(p,c),o.set(p,l.id);}let i=new Map(s);for(let[l,c]of a){let p=s.get(l);if(!p){let f=c[0];throw new h("replacement-target-missing",`${f.ext} replaces missing target ${f.c.replaces.targetId}`,[f.ext,f.c.replaces.targetId])}let u=p.replaceable??{kind:"none"};for(let{ext:f,c:y}of c){if(!Q(p.version,y.replaces.targetRange))throw new h("replacement-version-mismatch",`${f} replaces ${y.replaces.targetId}@${p.version} outside range ${y.replaces.targetRange}`,[f,y.replaces.targetId]);if(u.kind==="none")throw new h("unauthorized-replacement",`${y.replaces.targetId} does not authorize replacement (attempted by ${f})`,[f,y.replaces.targetId])}let m=jt(p,c);i.set(l,m);}return {extensions:n,contributions:i,get:(l,c)=>i.get(Me(l,c))}}function jt(e,t){let n=e.replaceable??{kind:"none"};if(t.length===1)return t[0].c;if(n.kind==="priority"){let o=[...t].sort((i,d)=>(d.c.replaces.priority??0)-(i.c.replaces.priority??0)),s=o[0].c.replaces.priority??0,a=o.filter(i=>(i.c.replaces.priority??0)===s);if(a.length>1){let i=a.map(d=>d.ext).sort();throw new h("ambiguous-replacement",`multiple replacers of ${e.id} share top priority ${s}: ${i.join(", ")}`,i)}return o[0].c}let r=t.map(o=>o.ext).sort();throw new h("ambiguous-replacement",`multiple replacers of ${e.id}: ${r.join(", ")}`,r)}function Xt(e){let o=new Map,s=[],a=i=>{o.set(i,1),s.push(i);let d=[...e.get(i)?.dependencies??[]].sort();for(let l of d){let c=o.get(l)??0;if(c===1){let p=s.indexOf(l),u=[...s.slice(p),l];throw new h("dependency-cycle",`dependency cycle: ${u.join(" -> ")}`,u)}c===0&&a(l);}s.pop(),o.set(i,2);};for(let i of [...e.keys()].sort())(o.get(i)??0)===0&&a(i);}function at(e,t){try{S(e);}catch{throw new h("invalid-version",`invalid version ${JSON.stringify(e)} in ${t}`,[t])}}function Kt(e,t){try{Q("0.0.0",e);}catch{throw new h("invalid-version",`invalid version range ${JSON.stringify(e)} in ${t}`,[t])}}var T=class extends Error{constructor(t){super(t),this.name="BudgetError";}},U=class e{constructor(t,n){this.label=t;this.capacity=n;this.used=new p(`${t}.budget`,n);}label;capacity;used;children=new Set;activeReservations=0;cleanups=[];disposed=false;carveAmount=0;parent;get inUse(){return this.used.current}get available(){return this.used.remaining}get isDisposed(){return this.disposed}reserve(t){this.assertLive(),this.used.add(t),this.activeReservations+=1;let n=false,r=this;return {amount:t,get released(){return n},release(){n||(n=true,r.used.release(t),r.activeReservations-=1);}}}child(t,n){this.assertLive(),this.used.add(n);let r=new e(t,n);return r.parent=this,r.carveAmount=n,this.children.add(r),r}onRelease(t){this.assertLive(),this.cleanups.push(t);}dispose(){if(this.disposed)return;if(this.children.size>0)throw new T(`${this.label}: cannot release with ${this.children.size} child budget(s) outstanding`);if(this.activeReservations>0)throw new T(`${this.label}: cannot release with ${this.activeReservations} reservation(s) outstanding`);let t=[];for(let n=this.cleanups.length-1;n>=0;n--)try{this.cleanups[n]();}catch(r){t.push(r);}if(this.disposed=true,this.parent&&(this.parent.children.delete(this),this.parent.used.release(this.carveAmount),this.parent=void 0),t.length>0)throw new T(`${this.label}: ${t.length} cleanup error(s); first: ${String(t[0])}`)}assertLive(){if(this.disposed)throw new T(`${this.label}: budget already released`)}};var Z=class extends Error{constructor(n,r){super(r?`cancelled: ${r}`:"cancelled");this.derivedOnly=n;this.name="CancellationError";}derivedOnly},H=class{_cancelled=false;_phase="pre-publication";_reason;cancel(t){this._cancelled=true,t!==void 0&&(this._reason=t);}markPublished(){this._phase="post-publication";}get isCancelled(){return this._cancelled}get phase(){return this._phase}get isPublished(){return this._phase==="post-publication"}get derivedOnly(){return this._cancelled&&this._phase==="post-publication"}get token(){let t=this;return {get isCancelled(){return t._cancelled},get phase(){return t._phase},get derivedOnly(){return t.derivedOnly},checkpoint(){if(t._cancelled)throw new Z(t.derivedOnly,t._reason)}}}};var ee=class extends Error{constructor(n){super(`runtime port not available: ${n}`);this.portId=n;this.name="PortResolutionError";}portId},Le=class{ports=new Map;provide(t,n){return this.ports.set(t,n),this}has(t){return this.ports.has(t)}resolve(t){if(!this.ports.has(t))throw new ee(t);return this.ports.get(t)}missing(t){return t.filter(n=>!this.ports.has(n))}availablePorts(){return [...this.ports.keys()]}clock(){return this.resolve(f.clock)}identity(){return this.resolve(f.identity)}},Fe=class{constructor(t=0,n=1){this.step=n;this.t=t;}step;t;now(){let t=this.t;return this.t+=this.step,t}},Be=class{constructor(t="id"){this.prefix=t;}prefix;n=0;newId(){return this.n+=1,`${this.prefix}-${this.n}`}};function Gt(e){let t=k$1(e.limits),n=Object.freeze({...e.config??{}}),r=e.capacity??t.maxDecompressedBytes,o=e.id??"op",s={id:o,limits:t,config:n,ports:e.ports,budget:new U(`op:${o}`,r),cancellation:new H};return Object.freeze(s)}function zt(e){e.budget.dispose();}var He=Object.freeze({maxRecursionDepth:{unit:"depth",phase:"xml-parse"},maxElementCount:{unit:"count",phase:"xml-parse"},maxPartCount:{unit:"count",phase:"package-read"},maxDecompressedBytes:{unit:"bytes",phase:"package-read"},maxCompressedBytes:{unit:"bytes",phase:"package-read"},maxCompressionRatio:{unit:"ratio",phase:"package-read"},maxChunkBytes:{unit:"bytes",phase:"package-read"},maxPaginationPasses:{unit:"passes",phase:"layout"},maxQueueDepth:{unit:"count",phase:"output"}}),st=Object.keys(He);function Wt(e,t){return new p(`${He[t].phase}:${t}`,e[t])}var Ue=class{counter;current=0;peak=0;constructor(t){this.counter=new p("memory",t);}allocate(t){this.counter.add(t),this.current+=t,this.current>this.peak&&(this.peak=this.current);}free(t){this.counter.release(t),this.current=Math.max(0,this.current-t);}get currentBytes(){return this.current}get peakBytes(){return this.peak}reset(){this.counter.release(this.current),this.current=0;}};function Yt(){for(let e of st){let t=j$1[e],n=i[e];if(!Number.isFinite(t)||t<=0)throw new Error(`default ${e} must be finite > 0`);if(!Number.isFinite(n)||n<=0)throw new Error(`ceiling ${e} must be finite > 0`);if(t>n)throw new Error(`default ${e} exceeds ceiling`)}}function V(e,t=new Set){let n=new WeakSet,r=o=>{if(o===null)return "null";let s=typeof o;if(s==="boolean")return o?"true":"false";if(s==="number"){let a=o;if(!Number.isFinite(a))throw new Error(`non-finite number is not comparable: ${a}`);return Object.is(a,-0)?"0":String(a)}if(s==="string")return JSON.stringify(o);if(s==="bigint")return `${o.toString()}n`;if(Array.isArray(o))return `[${o.map(r).join(",")}]`;if(s==="object"){let a=o;if(n.has(a))throw new Error("cannot canonicalize a cyclic structure");n.add(a);let d=Object.keys(a).filter(l=>!t.has(l)).sort().map(l=>`${JSON.stringify(l)}:${r(a[l])}`).join(",");return n.delete(a),`{${d}}`}throw new Error(`unsupported value type in comparator input: ${s}`)};return r(e)}function Ve(e,t){let n=V(e,t),r=0xcbf29ce484222325n,o=0x100000001b3n,s=0xffffffffffffffffn;for(let a=0;a<n.length;a++)r^=BigInt(n.charCodeAt(a)),r=r*o&s;return r.toString(16).padStart(16,"0")}var R="dev.docx-editor.core.comparator",je={authoredState:{id:`${R}.authored-state`,mode:"canonical-exact",ephemera:["revision","provenance","producedAt","commitId"],note:"canonical normalized authored records; ephemera excluded"},anchor:{id:`${R}.anchor`,mode:"exact",ephemera:[],note:"internal anchor identity/affinity compares exactly"},yjsStateVector:{id:`${R}.yjs-state-vector`,mode:"sync-optimization-only",ephemera:[],note:"exchange optimization only; never proves update or delete-set coverage"},shapedRun:{id:`${R}.shaped-run`,mode:"exact",ephemera:[],note:"glyph ids, clusters, and fixed-point advances compare exactly"},paginationFingerprint:{id:`${R}.pagination-fingerprint`,mode:"exact",ephemera:[],note:"page/column boundaries, break causes, fixed-point geometry compare exactly"},semanticTree:{id:`${R}.semantic-tree`,mode:"exact",ephemera:[],note:"reading order, roles, headings, alt text compare exactly"},hitTest:{id:`${R}.hit-test`,mode:"exact",ephemera:[],note:"resolved hit target and cluster affinity compare exactly"},pdfSemantics:{id:`${R}.pdf-semantics`,mode:"canonical-exact",ephemera:["objectNumber","producer","creationDate","modDate","subsetTag"],note:"canonical semantic PDF objects; container ephemera excluded"},rasterCheckpoint:{id:`${R}.raster-checkpoint`,mode:"tolerance",ephemera:[],note:"documented unavoidable raster comparison; explicit tolerance only"},benchmarkEvidence:{id:`${R}.benchmark-evidence`,mode:"sync-optimization-only",ephemera:[],note:"diagnostic evidence, not an equivalence basis"}};function Xe(e,t,n,r={}){let o=je[e];switch(o.mode){case "sync-optimization-only":throw new Error(`${o.id} is not an equivalence basis (${o.note})`);case "tolerance":{if(r.epsilon===void 0)throw new Error(`${o.id} requires an explicit epsilon`);return {equal:lt(t,n,r.epsilon)}}case "exact":case "canonical-exact":{let s=o.mode==="canonical-exact"?new Set(o.ephemera):new Set,a=V(t,s),i=V(n,s);return a===i?{equal:true}:{equal:false,left:a,right:i}}}}function Ke(e,t){let n=je[e];if(n.mode==="tolerance"||n.mode==="sync-optimization-only")throw new Error(`${n.id} has no canonical fingerprint (${n.mode})`);let r=n.mode==="canonical-exact"?new Set(n.ephemera):void 0;return Ve(t,r)}function lt(e,t,n){return typeof e=="number"&&typeof t=="number"?Number.isFinite(e)&&Number.isFinite(t)&&Math.abs(e-t)<=n:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,o)=>lt(r,t[o],n)):false}var dt=new Set([...c,...d]),ct=/^[0-9a-f]{16}$/,Jt=/^[0-9a-f]*$/;function Ge(e){let t=[],n=o=>t.push(o);e.formatVersion!==1&&n(`unsupported formatVersion ${e.formatVersion}`),e.documentId||n("documentId is required"),e.source.kind==="docx"&&!/^[0-9a-f]{64}$/.test(e.source.sha256)&&n("docx source requires a 64-hex sha256");let r=-1;e.steps.forEach((o,s)=>{let a=`step[${s}]`;dt.has(o.origin)||n(`${a}: unknown origin ${o.origin}`),(!Number.isInteger(o.baseRevision)||o.baseRevision<0)&&n(`${a}: baseRevision must be a non-negative integer`),o.baseRevision<r&&n(`${a}: baseRevision regressed below ${r}`);let i=o.expect;i.outcome==="applied"?(i.committedRevision===void 0?n(`${a}: applied step needs committedRevision`):i.committedRevision<=o.baseRevision?n(`${a}: committedRevision ${i.committedRevision} must exceed baseRevision ${o.baseRevision}`):r=i.committedRevision,i.modelChange&&qt(i.modelChange,a,n)):(i.committedRevision!==void 0&&n(`${a}: ${i.outcome} step must not commit a revision`),i.authoredStateHash!==void 0&&n(`${a}: ${i.outcome} step must not change authored state`)),i.authoredStateHash!==void 0&&!ct.test(i.authoredStateHash)&&n(`${a}: authoredStateHash must be 16-hex`),i.outputHash!==void 0&&!ct.test(i.outputHash)&&n(`${a}: outputHash must be 16-hex`);});for(let o of [...e.snapshots??[],...e.updates??[]])o.documentId!==e.documentId&&n(`envelope documentId ${o.documentId} != ${e.documentId}`),Jt.test(o.bytesHex)||n("envelope bytesHex must be hex"),o.bytesHex.length!==o.byteLength*2&&n(`envelope byteLength ${o.byteLength} disagrees with ${o.bytesHex.length/2} decoded bytes`);return {valid:t.length===0,errors:t}}function qt(e,t,n){dt.has(e.origin)||n(`${t}: modelChange origin ${e.origin} unknown`),e.toRevision<=e.fromRevision&&n(`${t}: modelChange revision must advance`);}function Qt(e,t){let n=Ge(e);if(!n.valid)return {ok:false,mismatches:n.errors};let r=[];return t.init(e),e.steps.forEach((o,s)=>{let a=`step[${s}]`,i=t.applyStep(o),d=o.expect;if(i.outcome!==d.outcome){r.push(`${a}: outcome ${i.outcome} != expected ${d.outcome}`);return}if(d.outcome==="applied"&&(i.committedRevision!==d.committedRevision&&r.push(`${a}: revision ${i.committedRevision} != expected ${d.committedRevision}`),d.authoredStateHash!==void 0))if(i.authoredState===void 0)r.push(`${a}: store returned no authored state to hash`);else {Xe("authoredState",i.authoredState,i.authoredState).equal||r.push(`${a}: authored state is not self-consistent`);let c=pt(i.authoredState);c!==d.authoredStateHash&&r.push(`${a}: authoredStateHash ${c} != expected ${d.authoredStateHash}`);}}),{ok:r.length===0,mismatches:r}}function pt(e){return Ke("authoredState",e)}var Zt=new Map([["embedRegular","regular"],["embedBold","bold"],["embedItalic","italic"],["embedBoldItalic","boldItalic"]]),en=32;function ft(e,t){let n=t.replace(/[^0-9a-fA-F]/g,"");if(n.length!==32)return null;let r=new Uint8Array(16);for(let a=0;a<16;a+=1){let i=Number.parseInt(n.slice(a*2,a*2+2),16);if(Number.isNaN(i))return null;r[15-a]=i;}let o=new Uint8Array(e),s=Math.min(en,o.length);for(let a=0;a<s;a+=1)o[a]=o[a]^r[a%16];return o}var ze=(e,t)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes??[])if(n.localName===t)return n.value}},ut=e=>e.kind==="textValue"?[]:e.children??[],mt=e=>e.kind==="textValue"||!("localName"in e)?"":e.localName;function tn(e,t,n){for(let r of e.relationships.get(t)??[]){if(r.id!==n)continue;if(r.targetMode==="External")return null;let o=w(t,r.rawTarget);return o.ok?o.partName:null}return null}function nn(e,t,n={}){if(!t)return [];let r=n.maxFontBytes??16*1024*1024,o=n.maxFonts??64,s=[],a=new Map,i=d=>{if(!(s.length>=o)){if(mt(d)==="font"){let l=ze(d,"name");if(l&&l.length<=128)for(let c of ut(d)){if(s.length>=o)return;let p=Zt.get(mt(c));if(!p)continue;let u=ze(c,"id"),m=ze(c,"fontKey");if(!u||!m)continue;let f=tn(e,t.name,u);if(!f)continue;let y=e.partBytes.get(f);if(!y||y.length===0||y.length>r)continue;let g=a.get(f);if(g){s.push({family:l,style:p,bytes:g,partName:f});continue}let v=ft(y,m);v&&(a.set(f,v),s.push({family:l,style:p,bytes:v,partName:f}));}}for(let l of ut(d))i(l);}};return i(t.root),s}function yt(e){if(e.kind!=="textValue")for(let t of e.children){if(t.kind==="textValue")continue;if(t.kind==="hyperlink"){let r=Ia(t);if(r!==void 0&&r.length>0)return r}let n=yt(t);if(n!==void 0)return n}}function rn(e){let t="",n=false,r=o=>{if(!(n||o.kind==="textValue")){if(o.kind==="tab"||o.localName==="ptab"||o.localName==="tab"){n=true;return}if(o.kind==="text"||o.localName==="t"){for(let s of o.children)s.kind==="textValue"&&(t+=s.value);return}for(let s of o.children)r(s);}};return r(e),Jc(t)}function on(e,t,n,r){let o=n.filter(d=>{if(r.has(d.blockId))return false;let l=d.level+1;return l>=t.instruction.outlineStart&&l<=t.instruction.outlineEnd}),s=new Set(o.map(d=>d.blockId)),a=zc(e),i=new Map;for(let d of o){let l=Jc(d.text),c=i.get(l);c?c.push(d.blockId):i.set(l,[d.blockId]);}return t.resultParagraphIds.map(d=>{let l=va(e,d);if(!l||l.kind==="textValue")return null;let c=yt(l),p=c===void 0?void 0:a.get(c);if(p&&s.has(p.paragraphId)){let f=i.get(Jc(o.find(g=>g.blockId===p.paragraphId)?.text??"")),y=f?.indexOf(p.paragraphId)??-1;return f&&y>=0&&f.splice(y,1),p.paragraphId}let u=rn(l);if(u.length===0)return null;let m=i.get(u);return !m||m.length===0?null:m.shift()??null})}function C(e){return e.namespaceUri===ca?e.localName:`{${e.namespaceUri}}${e.localName}`}function I(e){let t=[];for(let n of e.attributes)t.push(n.namespaceUri===""||n.namespaceUri===ca?`${n.localName}=${n.value}`:`{${n.namespaceUri}}${n.localName}=${n.value}`);return t.sort(),t}function ht(e,t){let n=I(e),r=n.length>0?`${C(e)}(${n.join(",")})`:C(e);if(t>=U$1)return r;let o=[];for(let s of e.children){if(s.kind==="textValue"){s.value!==""&&o.push(`#${s.value}`);continue}o.push(ht(s,t+1));}return o.sort(),o.length>0?`${r}[${o.join(",")}]`:r}function gt(e){if(!e)return [];let t=[];for(let n of e.children)n.namespaceUri===ca&&t.push(ht(n,1));return t.sort(),t}function We(e){if(e.kind==="textValue")return e.value;if(e.kind==="tab")return " ";if(e.kind==="hardBreak")return Xb(e);if(e.kind==="drawing")return jc();if(e.kind==="runProperties"||e.kind==="paragraphProperties"||e.kind==="generic")return "";if(e.kind==="hyperlink"||Hb(e)){let n="",r=e.kind==="hyperlink"?e.children:Jb(e)??[];for(let o of r)n+=We(o);return n}let t="";for(let n of e.children)t+=We(n);return t}function x(e,t){let n=new Map(e);for(let r of t.namespaceBindings)n.set(r.prefix,r.namespaceUri);return n}function j(e,t){try{return ma(e,t)}catch(n){if(n instanceof ga&&n.reason==="undeclared-prefix")return `generic-refusal:undeclared-prefix:{${e.namespaceUri}}${e.localName}`;throw n}}function Ye(e,t,n=la){if(e.kind==="textValue")return;if(e.kind==="runProperties"||e.kind==="paragraphProperties"){let o=x(n,e),s=[];for(let a of e.children)a.namespaceUri!==ca&&s.push(j(a,o));s.sort(),t.push(...s);return}if(e.kind==="generic"){t.push(j(e,n));return}if(Hb(e)){t.push(na(e));return}if(e.kind==="bookmarkStart"||e.kind==="bookmarkEnd"){t.push(ma(e,n));return}if(e.kind==="drawing"){t.push(xt(e));return}if(ba(e.kind))return;let r=x(n,e);for(let o of e.children)Ye(o,t,r);}function an(e){return `hyperlink(${e.attributes.map(n=>`${n.namespaceUri}|${n.localName}=${n.value}`).sort().join(",")})`}function sn(e){for(let t of e.children)if(t.kind==="pictureBlipFill")for(let n of t.children){if(n.kind!=="pictureBlip")continue;let r=n.attributes.find(s=>s.localName==="embed"&&s.namespaceUri===fa)?.value,o=n.attributes.find(s=>s.localName==="link"&&s.namespaceUri===fa)?.value;if(r!==void 0)return `embed=${r}`;if(o!==void 0)return `link=${o}`}}function te(e,t,n){if(e.kind==="textValue")return `#${e.value}`;if(t>=U$1)return C(e);let r=x(n,e);if(e.kind==="generic")return j(e,r);let o=I(e),s=o.length>0?`${C(e)}(${o.join(",")})`:C(e),a=[];for(let i of e.children)i.kind!=="textValue"&&a.push(te(i,t+1,r));return a.sort(),a.length>0?`${s}[${a.join(",")}]`:s}function ln(e,t,n){let r=x(n,e),o=[];for(let s of e.children)if(s.kind!=="textValue"){if(s.kind==="pictureBlipFill"){let a=s.children,i=a.find(l=>l.kind==="pictureBlip"),d=a.filter(l=>l.kind!=="pictureBlip").map(l=>te(l,t+1,r));if(d.sort(),i&&i.kind==="pictureBlip"){let l=I(i),c=l.length>0?`pictureBlip(${l.join(",")})`:"pictureBlip";o.push(d.length>0?`${c}[${d.join(",")}]`:c);}else for(let l of a)o.push(te(l,t+1,r));continue}o.push(te(s,t+1,r));}return o.sort(),o}function Je(e,t,n){if(e.kind==="textValue")return `#${e.value}`;if(t>=U$1)return C(e);let r=x(n,e);if(e.kind==="drawingDocPr"){let i=I(e);return i.length>0?`docPr(${i.join(",")})`:"docPr"}if(e.kind==="picture"){let i=sn(e),d=ln(e,t+1,r),l=i===void 0?"picture":`picture(${i})`;return d.length>0?`${l}[${d.join(",")}]`:l}let o=I(e),s=o.length>0?`${C(e)}(${o.join(",")})`:C(e),a=[];for(let i of e.children){if(i.kind==="picture"){a.push(Je(i,t+1,r));continue}if(i.kind==="generic"){a.push(j(i,r));continue}i.kind!=="textValue"&&a.push(Je(i,t+1,r));}return a.length>0?`${s}[${a.join(",")}]`:s}function xt(e){let t=x(la,e),n=e.children.find(i=>i.kind==="inlineDrawing"||i.kind==="anchoredDrawing");if(!n||n.kind==="textValue")return `drawing(${I(e).join(",")})`;let r=x(t,n),o=I(n),s=o.length>0?`${n.kind}(${o.join(",")})`:n.kind,a=[];for(let i of n.children){if(i.kind==="generic"){a.push(j(i,r));continue}i.kind!=="textValue"&&a.push(Je(i,1,r));}return a.length>0?`drawing[${s};${a.join(";")}]`:`drawing[${s}]`}function cn(e,t,n){let r=e.children.find(c=>c.kind==="paragraphProperties"),o=[],s="",a=[],i=x(la,e),d=(c,p)=>{if(c.kind==="run"){let u=x(p,c),m=c.children.find(f=>f.kind==="runProperties");o.push(gt(m)),s+=We(c);for(let f of c.children)Ye(f,a,u);return}if(c.kind==="drawing"){a.push(xt(c));return}if(c.kind==="hyperlink"){a.push(an(c));let u=x(p,c);for(let m of c.children)d(m,u);return}if(c.kind==="contentControl"){a.push(na({...c,children:c.children.filter(m=>m.kind!=="contentControlContent")}));let u=x(p,c);for(let m of c.children){if(m.kind!=="contentControlContent")continue;let f=x(u,m);for(let y of m.children)d(y,f);}return}Ye(c,a,p);};for(let c of e.children)d(c,i);let l=Qc(e);return {ordinal:t,path:n,paraId:l===null?null:l.toUpperCase(),text:s,paragraphProperties:gt(r),runProperties:o,genericStructure:a}}function dn(e){if(e.localName==="hdr"||e.localName==="ftr"||e.kind==="body")return e;for(let t of e.children)if(t.kind!=="textValue"&&(t.kind==="body"||t.localName==="hdr"||t.localName==="ftr"))return t;return e}function Nt(e,t,n,r,o,s){if(s>U$1)return;let a=0;for(let i of e.children){if(i.kind==="textValue"){i.value.trim()!==""&&o.push(`${t}/#text ${i.value}`);continue}let d=t===""?String(a):`${t}/${a}`;if(a+=1,i.kind==="paragraph"){n.push(i),r.push(d),o.push(`${d} p`);continue}let l=I(i);o.push(l.length>0?`${d} ${C(i)}(${l.join(",")})`:`${d} ${C(i)}`),Nt(i,d,n,r,o,s+1);}}function Ot(e){let t=dn(e.root),n=[],r=[],o=[];Nt(t,"",n,r,o,0);let s=n.map((a,i)=>cn(a,i,r[i]));return {partName:e.name,paragraphs:s,structure:o}}function pn(e){let t=[];for(let n of e){let r=Ot(n);r&&t.push(r);}return {stories:t}}function un(e,t){let n=[],r=(s,a,i)=>{n.push({path:s,before:JSON.stringify(a)??"undefined",after:JSON.stringify(i)??"undefined"});};e.stories.length!==t.stories.length&&r("stories.length",e.stories.length,t.stories.length);let o=Math.min(e.stories.length,t.stories.length);for(let s=0;s<o;s+=1){let a=e.stories[s],i=t.stories[s],d=p=>`${a.partName}${p}`;a.paragraphs.length!==i.paragraphs.length&&r(d(".paragraphs.length"),a.paragraphs.length,i.paragraphs.length);let l=Math.min(a.paragraphs.length,i.paragraphs.length);for(let p=0;p<l;p+=1){let u=a.paragraphs[p],m=i.paragraphs[p];u.text!==m.text&&r(d(`.p[${p}].text`),u.text,m.text),u.path!==m.path&&r(d(`.p[${p}].path`),u.path,m.path),u.paraId!==m.paraId&&r(d(`.p[${p}].paraId`),u.paraId,m.paraId),JSON.stringify(u.paragraphProperties)!==JSON.stringify(m.paragraphProperties)&&r(d(`.p[${p}].paragraphProperties`),u.paragraphProperties,m.paragraphProperties),JSON.stringify(u.runProperties)!==JSON.stringify(m.runProperties)&&r(d(`.p[${p}].runProperties`),u.runProperties,m.runProperties),JSON.stringify(u.genericStructure)!==JSON.stringify(m.genericStructure)&&r(d(`.p[${p}].genericStructure`),u.genericStructure,m.genericStructure);}a.structure.length!==i.structure.length&&r(d(".structure.length"),a.structure.length,i.structure.length);let c=Math.min(a.structure.length,i.structure.length);for(let p=0;p<c;p+=1)a.structure[p]!==i.structure[p]&&r(d(`.structure[${p}]`),a.structure[p],i.structure[p]);}return n}var X="http://schemas.openxmlformats.org/wordprocessingml/2006/main",yn="http://schemas.openxmlformats.org/package/2006/relationships",Rt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",A="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",gn="application/vnd.openxmlformats-package.relationships+xml",hn="http://schemas.openxmlformats.org/package/2006/content-types",Ct="/[Content_Types].xml",b="/word/numbering.xml",bt=[{text:"\uF0B7",font:"Symbol"},{text:"o",font:"Courier New"},{text:"\uF0A7",font:"Wingdings"}],Et=["decimal","lowerLetter","lowerRoman"],qe=9;function Tt(e,t){let n=720*(t+1),r='<w:start w:val="1"/>';if(e==="bullet"){let a=bt[t%bt.length];return `<w:lvl w:ilvl="${t}">${r}<w:numFmt w:val="bullet"/><w:lvlText w:val="${a.text}"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="${n}" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:ascii="${a.font}" w:hAnsi="${a.font}" w:hint="default"/></w:rPr></w:lvl>`}let o=Et[t%Et.length],s=o==="lowerRoman";return `<w:lvl w:ilvl="${t}">${r}<w:numFmt w:val="${o}"/><w:lvlText w:val="%${t+1}."/><w:lvlJc w:val="${s?"right":"left"}"/><w:pPr><w:ind w:left="${n}" w:hanging="${s?180:360}"/></w:pPr></w:lvl>`}function xn(e,t){let n=Array.from({length:qe},(r,o)=>Tt(e,o)).join("");return `<w:abstractNum w:abstractNumId="${t}"><w:multiLevelType w:val="${e==="bullet"?"hybridMultilevel":"multilevel"}"/>${n}</w:abstractNum>`}function Nn(){let e=ra(`<w:numbering xmlns:w="${X}"></w:numbering>`,{name:b,contentType:A});return e.ok?e.part:null}var P=(e,t)=>{let n=[];for(let r of e.children)r.kind==="textValue"||r.localName!==t||r.namespaceUri===X&&n.push(r);return n},N=(e,t)=>e.attributes.find(n=>n.localName===t)?.value;function vt(e,t){let n=ra(`<w:numbering xmlns:w="${X}">${e}</w:numbering>`,{name:b,contentType:A});if(!n.ok)return null;let r=[];for(let o of n.part.root.children)o.kind!=="textValue"&&r.push(o);if(r.length!==t.length)return null;for(let o=0;o<t.length;o+=1){let s=r[o],a=t[o];if(s.namespaceUri!==X||s.localName!==a.localName||a.attribute&&N(s,a.attribute.localName)!==a.attribute.value)return null}return r}var Pt=["numPicBullet","abstractNum","num","numIdMacAtCleanup"];function It(e,t,n){let r=t.indexOf(n);if(r===-1)return e.length;let o=0;return e.forEach((s,a)=>{if(s.kind==="textValue")return;let i=t.indexOf(s.localName);i!==-1&&i<=r&&(o=a+1);}),o}function kt(e,t){let n=0;for(let r of e){let o=N(r,t);!o||!/^\d{1,9}$/.test(o)||(n=Math.max(n,Number(o)));}return n+1}function On(e,t){let n=e.parts.get(b),r=n??Nn();if(!r)return null;let o=r.root,s=P(o,"abstractNum"),a=P(o,"num"),i=t==="bullet"?"bullet":"decimal",d=s.find(O=>{let D=N(O,"abstractNumId");if(!D||!/^\d{1,9}$/.test(D))return false;let et=P(O,"lvl").find(nt=>N(nt,"ilvl")==="0"||N(nt,"ilvl")===void 0),tt=et?P(et,"numFmt")[0]:void 0;return tt!==void 0&&N(tt,"val")===i}),c=(d?Number(N(d,"abstractNumId")):null)??kt(s,"abstractNumId"),p=kt(a,"numId"),u=d===void 0,m=vt((u?xn(t,c):"")+`<w:num w:numId="${p}"><w:abstractNumId w:val="${c}"/></w:num>`,u?[{localName:"abstractNum",attribute:{localName:"abstractNumId",value:String(c)}},{localName:"num",attribute:{localName:"numId",value:String(p)}}]:[{localName:"num",attribute:{localName:"numId",value:String(p)}}]);if(!m)return null;let f=ta(r),y=m.map(O=>ne(O,f)),g=u?y[0]:void 0,v=y[u?1:0];if(u&&!g||!v)return null;let ae=r;if(g){let O=ya(r,o.id,It(o.children,Pt,"abstractNum"),[g]);if(!O.ok)return null;ae=O.part;}let Ze=ya(ae,o.id,It(ae.root.children,Pt,"num"),[v]);if(!Ze.ok)return null;let se=Object.freeze({...e,parts:new Map([...e.parts,[b,Ze.part]])});if(!n){let O=En(se);if(!O)return null;let D=Sn(O);if(!D)return null;se=D;}return {pkg:se,numId:String(p)}}var Rn=["nsid","multiLevelType","tmpl","name","styleLink","numStyleLink","lvl"];function wt(e){let t=N(e,"ilvl");return t===void 0||!/^\d{1,9}$/.test(t)?null:Number(t)}function Cn(e,t){let n=0;return e.forEach((r,o)=>{if(r.kind!=="textValue"){if(r.localName==="lvl"&&r.namespaceUri===X){(wt(r)??0)<t&&(n=o+1);return}Rn.includes(r.localName)&&(n=o+1);}}),n}function bn(e,t,n,r){if(!Number.isInteger(n)||n<0||n>=qe||t.length===0||t.length>64)return null;let o=e.parts.get(b);if(!o)return null;let s=o.root,a=P(s,"num").find(f=>N(f,"numId")===t),i=a?P(a,"abstractNumId")[0]:void 0,d=i?N(i,"val"):void 0;if(!d)return null;let l=P(s,"abstractNum").find(f=>N(f,"abstractNumId")===d);if(!l||P(l,"numStyleLink").length>0)return null;let c=P(l,"lvl");if(c.some(f=>wt(f)===n))return e;if(c.length>=qe)return null;let p=vt(Tt(r,n),[{localName:"lvl",attribute:{localName:"ilvl",value:String(n)}}]);if(!p)return null;let u=ta(o),m=ya(o,l.id,Cn(l.children,n),[ne(p[0],u)]);return m.ok?Object.freeze({...e,parts:new Map([...e.parts,[b,m.part]])}):null}function ne(e,t){return e.kind==="textValue"?{...e,id:t()}:{...e,id:t(),children:e.children.map(n=>ne(n,t))}}function En(e){let t=e.mainDocumentPart,n=Pn(t),r=e.parts.get(n),o=In(e),s=ra(`<Relationships xmlns="${yn}"><Relationship Id="${o}" Type="${Rt}" Target="numbering.xml"/></Relationships>`,{name:n,contentType:gn});if(!s.ok)return null;let a=e.relationships.get(t)??[],i={ownerPart:t,id:o,type:Rt,rawTarget:"numbering.xml",targetMode:"Internal",order:a.reduce((u,m)=>Math.max(u,m.order),-1)+1},d=new Map([...e.relationships,[t,[...a,i]]]);if(!r)return Object.freeze({...e,parts:new Map([...e.parts,[n,s.part]]),relationships:d});let l=ta(r),c=s.part.root.children[0];if(!c)return null;let p=ya(r,r.root.id,r.root.children.length,[ne(c,l)]);return p.ok?Object.freeze({...e,parts:new Map([...e.parts,[n,p.part]]),relationships:d}):null}function Pn(e){let t=e.lastIndexOf("/");return `${e.slice(0,t)}/_rels/${e.slice(t+1)}.rels`}function In(e){let t=0;for(let n of e.relationships.values())for(let r of n){let o=/^rId(\d{1,9})$/.exec(r.id);o&&(t=Math.max(t,Number(o[1])));}for(let n of e.externalTargets){let r=/^rId(\d{1,9})$/.exec(n.id);r&&(t=Math.max(t,Number(r[1])));}return `rId${t+1}`}var kn=`<Override PartName="${b}" ContentType="${A}"/>`;function Sn(e){let t=e.contentTypes.overrides.get(u(b));if(t===A)return e;if(t!==void 0)return null;let n=e.partBytes.get(Ct);if(!n)return null;let r=strFromU8(n),o=St(r);if(!o)return null;let s=r.lastIndexOf(`</${o.rootName}>`);if(s===-1)return null;let a=r.slice(0,s)+kn+r.slice(s),i=St(a);if(!i||i.rootName!==o.rootName)return null;let d=[...o.children,_t("Override",{PartName:b,ContentType:A})];return i.children.length!==d.length||i.children.some((l,c)=>l!==d[c])?null:Object.freeze({...e,partBytes:new Map([...e.partBytes,[Ct,strToU8(a)]]),contentTypes:Object.freeze({defaults:e.contentTypes.defaults,overrides:new Map([...e.contentTypes.overrides,[u(b),A]])})})}function St(e){let t=V$1(e);if(!t.ok)return null;let n=t.nodes.filter(i=>i.type==="element");if(n.length!==1)return null;let r=n[0],o=r.name.indexOf(":"),s=o===-1?"":r.name.slice(0,o);if(r.name.slice(o+1)!=="Types"||r.attributes[s?`xmlns:${s}`:"xmlns"]!==hn)return null;let a=[];for(let i of r.children)i.type==="element"&&a.push(_t(i.name,i.attributes));return {rootName:r.name,children:a}}function _t(e,t){let n=Object.entries(t).map(([r,o])=>`${r}=${o}`).sort();return [e,...n].join("")}function re(e){return e!=null&&e.kind!=="textValue"}function Qe(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===ca&&n.localName===t)return n;return null}function oe(e,t){for(let n of e.attributes)if(n.namespaceUri===ca&&n.localName===t)return n.value}function $(e,t){let n=Qe(e,t);if(!n)return false;let r=oe(n,"val");return r===void 0?true:r!=="0"&&r!=="false"&&r!=="off"}var At=Object.freeze({trackRevisions:false,restrictedToTrackedChanges:false,doNotTrackMoves:false,doNotTrackFormatting:false});function Tn(e){if(!re(e))return At;let t=Qe(e,"documentProtection"),n=t===null?void 0:oe(t,"enforcement"),r=n!==void 0&&n!=="0"&&n!=="false"&&n!=="off";return {trackRevisions:$(e,"trackRevisions"),restrictedToTrackedChanges:r&&t!==null&&oe(t,"edit")==="trackedChanges",doNotTrackMoves:$(e,"doNotTrackMoves"),doNotTrackFormatting:$(e,"doNotTrackFormatting")}}var $t=Object.freeze({doNotShadeFormData:false});function vn(e){return re(e)?{doNotShadeFormData:$(e,"doNotShadeFormData")}:$t}function wn(e,t){let n=e.parts.get(t.storyPartName);if(!n)return {ok:false,reason:`no story part named ${t.storyPartName}`};let r=[];for(let d of ve(n.root)){let l=te$1(d.node).tag;if(l===void 0||l.length===0)continue;let c=t.decide(l);c!=="keep"&&r.push({nodeId:d.node.id,policy:c});}let o=n,s=0,a=0;for(let{nodeId:d,policy:l}of r){let c=wa(o,d);if(!c)continue;if(l==="remove"){let g=Aa(o,d,{deferValidation:true});if(!g.ok)return {ok:false,reason:`a node could not be removed: ${Dt(g)}`};o=g.part,a+=1;continue}let p=c.children.find(g=>g.id===d);if(!p)continue;let u=re$1(p),m=u?u.children:[],f=c.children.flatMap(g=>g.id===d?m:[g]),y=xa(o,c.id,f,{deferValidation:true});if(!y.ok)return {ok:false,reason:`a node could not be unwrapped: ${Dt(y)}`};o=y.part,s+=1;}let i=o===n?e:qb(e,o);if(!i.parts.has(t.storyPartName))return {ok:false,reason:"the story went missing during the export"};for(let d of t.namespaces)for(let l of An(i,t.storyPartName,d)){let c=lf(i,l.itemId),p=ff(i,l.partName,c);if(p.pkg===i&&p.removed.length===0&&!_n(i,l.partName,c))return {ok:false,reason:`the payloads in ${d} could not be removed`};if(i=p.pkg,c.size>0)continue;let u=$n(i,l);if(!u.ok)return {ok:false,reason:`the payload store for ${d} could not be removed`};i=u.pkg;}return {ok:true,pkg:i,unwrapped:s,removed:a}}function _n(e,t,n){return bf(e,t).every(r=>n.has(r.id))}function Dt(e){return e.issues.map(t=>t.code).join(", ")||"the edit was refused"}function An(e,t,n){return Ze(e,t).filter(r=>r.namespaceUri===n)}function $n(e,t){let n=wb(e,t.partName);if(!n.ok)return {pkg:e,ok:false};let r=wb(n.pkg,t.propsPartName);return r.ok?{pkg:r.pkg,ok:true}:{pkg:e,ok:false}}var ie="http://purl.org/dc/elements/1.1/",Mt="http://schemas.openxmlformats.org/package/2006/metadata/core-properties",Lt="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties";var Ip=Object.freeze({});function k(e,t,n){if(e.kind!=="textValue")for(let r of e.children){if(r.kind==="textValue"||r.namespaceUri!==t||r.localName!==n)continue;let o=r.children.find(a=>a.kind==="textValue");if(!o||o.kind!=="textValue")return;let s=o.value.trim();return s.length===0?void 0:s.length>4096?s.slice(0,4096):s}}function kp(e,t){let n={};if(e&&e.kind!=="textValue"){let r=k(e,ie,"title");r!==void 0&&(n.title=r);let o=k(e,ie,"creator");o!==void 0&&(n.creator=o);let s=k(e,ie,"subject");s!==void 0&&(n.subject=s);let a=k(e,ie,"description");a!==void 0&&(n.description=a);let i=k(e,Mt,"keywords");i!==void 0&&(n.keywords=i);let d=k(e,Mt,"lastModifiedBy");d!==void 0&&(n.lastModifiedBy=d);}if(t&&t.kind!=="textValue"){let r=k(t,Lt,"Company");r!==void 0&&(n.company=r);let o=k(t,Lt,"Manager");o!==void 0&&(n.manager=o);}return n}
2
+ export{Xe as A,Ke as B,Ge as C,Qt as D,pt as E,ft as F,nn as G,on as H,Ot as I,pn as J,un as K,On as L,bn as M,At as N,Tn as O,$t as P,vn as Q,Ip as R,kp as S,wn as T,Ft as a,it as b,J as c,S as d,q as e,Q as f,h as g,Vt as h,T as i,U as j,Z as k,H as l,ee as m,Le as n,Fe as o,Be as p,Gt as q,zt as r,He as s,st as t,Wt as u,Ue as v,Yt as w,V as x,Ve as y,je as z};