@docx-editor.dev/core 2.32.0 → 2.33.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 (119) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +1 -0
  3. package/dist/automation.cjs +1 -1
  4. package/dist/automation.d.ts +13 -51
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.ts +14 -14
  8. package/dist/binding.js +1 -1
  9. package/dist/{chrome-print-CznJ0ucN.d.ts → chrome-print-CrPI9ZQc.d.ts} +85 -30
  10. package/dist/chunk-23MKR33J.js +4 -0
  11. package/dist/chunk-2DEY5NUC.cjs +32 -0
  12. package/dist/chunk-2DR4TH6B.js +1 -0
  13. package/dist/{chunk-ETDZFNMI.js → chunk-2F2UEAE2.js} +1 -1
  14. package/dist/chunk-2GPGAFOJ.cjs +5 -0
  15. package/dist/chunk-ALD626VU.cjs +2 -0
  16. package/dist/chunk-AU33YWEJ.js +236 -0
  17. package/dist/chunk-AXU63LYW.cjs +1 -0
  18. package/dist/chunk-CM5VZRBV.js +32 -0
  19. package/dist/chunk-D7FAFFTN.js +1 -0
  20. package/dist/{chunk-TJHE5EET.cjs → chunk-DYUVJNDD.cjs} +1 -1
  21. package/dist/chunk-ESYUKD5D.js +2 -0
  22. package/dist/chunk-F7TGQMVR.js +5 -0
  23. package/dist/chunk-FLW7KIQX.js +30 -0
  24. package/dist/chunk-JG4A6W6I.js +7 -0
  25. package/dist/chunk-JNGLSBPH.js +2 -0
  26. package/dist/chunk-KE6ZWRIY.cjs +236 -0
  27. package/dist/{chunk-L5TYBFDB.js → chunk-L3YXJDPX.js} +1 -1
  28. package/dist/chunk-LI42N7OW.cjs +4 -0
  29. package/dist/{chunk-ACLR4DMK.js → chunk-PLKDS4JT.js} +1 -1
  30. package/dist/{chunk-6UDJUI3W.cjs → chunk-PXMTQ73F.cjs} +1 -1
  31. package/dist/chunk-R4R3AAE4.js +1 -0
  32. package/dist/{chunk-OKMEMSKB.cjs → chunk-RFUNFTGV.cjs} +1 -1
  33. package/dist/chunk-SVM6PGMS.js +3 -0
  34. package/dist/chunk-SZURLHR3.cjs +3 -0
  35. package/dist/chunk-UYCGCVZ2.cjs +1 -0
  36. package/dist/chunk-X34QRAUU.cjs +1 -0
  37. package/dist/chunk-XNBYG4XJ.cjs +30 -0
  38. package/dist/chunk-ZDFJW5XS.cjs +2 -0
  39. package/dist/chunk-ZWO4JHNN.cjs +7 -0
  40. package/dist/collaboration/replication.cjs +1 -1
  41. package/dist/collaboration/replication.d.ts +13 -4
  42. package/dist/collaboration/replication.js +1 -1
  43. package/dist/collaboration.d.ts +3 -3
  44. package/dist/contracts/document.d.ts +3 -3
  45. package/dist/contracts/editor.d.ts +10 -10
  46. package/dist/contracts/interaction.d.ts +2 -2
  47. package/dist/contracts/modules.d.ts +12 -12
  48. package/dist/contracts/types.d.ts +4 -4
  49. package/dist/{custom-node-writes-CLJKGD9t.d.ts → custom-node-writes-AqY5KpVx.d.ts} +2 -2
  50. package/dist/diagnostic-context-CuzhOX0g.d.ts +98 -0
  51. package/dist/{diagnostic-hints-DK8-V0fk.d.ts → diagnostic-hints-BtCaCqQC.d.ts} +2 -2
  52. package/dist/{document-protection-NaniLHWF.d.ts → document-protection-BvbpSXbQ.d.ts} +1 -1
  53. package/dist/{headless-document-view-Bcz9_Qva.d.ts → drawing-graphic-kind-CXYGYbB3.d.ts} +74 -4
  54. package/dist/drawing-preview-package-B9lSLRg4.d.ts +115 -0
  55. package/dist/{editor-DZwOTmlR.d.ts → editor-B7OOAAie.d.ts} +85 -13
  56. package/dist/{editor-scope-B3L-1ALc.d.ts → editor-scope-CA6egMaK.d.ts} +5 -1
  57. package/dist/editor.cjs +1 -1
  58. package/dist/editor.css +4 -4
  59. package/dist/editor.d.ts +215 -31
  60. package/dist/editor.js +1 -1
  61. package/dist/export.cjs +2 -2
  62. package/dist/export.d.ts +47 -12
  63. package/dist/export.js +2 -2
  64. package/dist/{font-resolver-BlQNGdvR.d.ts → font-resolver-Bm9XqTNO.d.ts} +14 -0
  65. package/dist/index.cjs +1 -1
  66. package/dist/index.d.ts +38 -23
  67. package/dist/index.js +1 -1
  68. package/dist/{layout-shaping-E5J4Z1Gf.d.ts → layout-shaping-Ci_BTnSU.d.ts} +1 -1
  69. package/dist/layout.cjs +1 -1
  70. package/dist/layout.d.ts +174 -99
  71. package/dist/layout.js +1 -1
  72. package/dist/metafile-drawing-DtMFyMKq.d.ts +107 -0
  73. package/dist/{note-properties-Ds5R2_3F.d.ts → note-properties-DCIJUKIy.d.ts} +1 -1
  74. package/dist/output.cjs +1 -1
  75. package/dist/output.d.ts +11 -11
  76. package/dist/output.js +1 -1
  77. package/dist/{protocol-DKa4qt7F.d.ts → protocol-Cp_QzVxS.d.ts} +2 -2
  78. package/dist/{review-paragraph-order-Dc17w_6v.d.ts → review-paragraph-order-BJQ43_r0.d.ts} +1 -1
  79. package/dist/{revision-projection-Cn6rZJ7H.d.ts → revision-projection-OVusTS77.d.ts} +1 -1
  80. package/dist/{semantic-cell-selection-BaUR0iJ4.d.ts → semantic-cell-selection-CoI5hHBm.d.ts} +2 -2
  81. package/dist/{semantic-interaction-CJoHLoOl.d.ts → semantic-interaction-BbA4dgEo.d.ts} +1 -1
  82. package/dist/{semantic-paint-BPw_n0li.d.ts → semantic-paint-B5JcIv9c.d.ts} +16 -9
  83. package/dist/{semantic-record-queries-C0rJ3sB4.d.ts → semantic-record-queries-DnO8J5_j.d.ts} +1 -1
  84. package/dist/{semantic-records-BvN-WWst.d.ts → semantic-records-DoK0lNjS.d.ts} +254 -43
  85. package/dist/store.cjs +1 -1
  86. package/dist/store.d.ts +510 -18
  87. package/dist/store.js +1 -1
  88. package/dist/{tree-op-types-C_S2niXW.d.ts → tree-op-types-Df4oY2u4.d.ts} +718 -252
  89. package/dist/{tree-package-store-CRHvMyNj.d.ts → tree-package-store-DXhX1PE-.d.ts} +8 -3
  90. package/dist/{tree-session-contract-D1awo_dA.d.ts → tree-session-contract-CF2625mv.d.ts} +5 -5
  91. package/dist/{unsupported-elements-CVos5cqe.d.ts → unsupported-elements-CUojsaCr.d.ts} +1 -1
  92. package/licenses/ECMA-376.md +29 -0
  93. package/package.json +2 -2
  94. package/dist/bookmark-names-DDuAra_V.d.ts +0 -37
  95. package/dist/chunk-25EXMBV2.cjs +0 -5
  96. package/dist/chunk-3IEXDEFH.cjs +0 -7
  97. package/dist/chunk-65XBN67F.cjs +0 -2
  98. package/dist/chunk-6NVZNB7O.cjs +0 -3
  99. package/dist/chunk-B2BEELUE.js +0 -1
  100. package/dist/chunk-DDFHKQFU.js +0 -30
  101. package/dist/chunk-E4IAO4CY.cjs +0 -2
  102. package/dist/chunk-FDSL5OJU.cjs +0 -30
  103. package/dist/chunk-FS7CMYLT.js +0 -4
  104. package/dist/chunk-GDS24SZN.js +0 -30
  105. package/dist/chunk-GIY6NT2X.js +0 -5
  106. package/dist/chunk-GWM3AKUD.js +0 -18
  107. package/dist/chunk-HDOXACHP.js +0 -2
  108. package/dist/chunk-IILEENID.js +0 -1
  109. package/dist/chunk-MNF2K7NN.cjs +0 -30
  110. package/dist/chunk-O324RB6R.cjs +0 -1
  111. package/dist/chunk-QXJKYNYZ.js +0 -1
  112. package/dist/chunk-RALTVLB6.js +0 -2
  113. package/dist/chunk-SRVKFUFI.js +0 -3
  114. package/dist/chunk-TELQ52LG.cjs +0 -1
  115. package/dist/chunk-UMMRURPE.js +0 -7
  116. package/dist/chunk-XJYZVGQR.cjs +0 -1
  117. package/dist/chunk-ZGTIE3QJ.cjs +0 -4
  118. package/dist/chunk-ZOZI27AW.cjs +0 -18
  119. package/dist/diagnostic-context-BtDUY3v2.d.ts +0 -31
@@ -1,4 +1,4 @@
1
- import { a5 as OoxmlPackage, an as SupportedImageMime, O as OoxmlPart, a4 as OoxmlNode, av as OoxmlElement, aH as PackageWatermarkWrite, aI as OoxmlInvariantIssue, ad as ImageDecodePort, aF as RevisionAttributionInput, aJ as DrawingTreeDocOp, aK as ImpactClass, au as TreeDocOp, aG as TreeOpRejection, aL as OoxmlParagraphNode, aM as OoxmlNoteNode, aN as OoxmlContinuationSeparatorNode, aO as OoxmlEndnotesNode, aP as OoxmlFootnotesNode, aQ as OoxmlNoteRefNode, aR as OoxmlNoteReferenceNode, aS as OoxmlSeparatorNode } from './tree-op-types-C_S2niXW.js';
1
+ import { a5 as OoxmlPackage, an as SupportedImageMime, O as OoxmlPart, a4 as OoxmlNode, av as OoxmlElement, aH as PackageWatermarkWrite, aI as OoxmlInvariantIssue, ad as ImageDecodePort, aE as RevisionAttributionInput, aJ as DrawingTreeDocOp, aK as ImpactClass, au as TreeDocOp, aF as TreeOpRejection, aL as OoxmlParagraphNode, aM as OoxmlNoteNode, aN as OoxmlContinuationSeparatorNode, aO as OoxmlEndnotesNode, aP as OoxmlFootnotesNode, aQ as OoxmlNoteRefNode, aR as OoxmlNoteReferenceNode, aS as OoxmlSeparatorNode } from './tree-op-types-Df4oY2u4.js';
2
2
 
3
3
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
4
4
  type DrawingPropertyIdResult = {
@@ -1098,6 +1098,11 @@ interface FragmentPasteInput {
1098
1098
  * merged document shows it. Omitted (solo) keeps Word's dense sequences.
1099
1099
  */
1100
1100
  readonly actorId?: string;
1101
+ /**
1102
+ * Suggesting mode: the author and date the whole paste is proposed under, as one tracked
1103
+ * insertion (`trackedFragment`). The caller tracks `priorOps` itself.
1104
+ */
1105
+ readonly revision?: RevisionAttributionInput;
1101
1106
  }
1102
1107
  type FragmentPasteResult = (Extract<PackageTransactResult, {
1103
1108
  ok: true;
@@ -1381,5 +1386,5 @@ declare class TreePackageStore {
1381
1386
  private publishSynthetic;
1382
1387
  }
1383
1388
 
1384
- export { NOTE_CONTINUATION_SEPARATOR_ID as B, DEFAULT_MAX_EDITABLE_STORY_PARTS as D, NOTE_ID_MAX as G, NOTE_ID_MIN as J, NOTE_SEPARATOR_ID as K, MAX_FRAGMENT_DECODED_BYTES as M, TreePackageStore as T, allocateDrawingPropertyId as a8, allocateNoteId as a9, isNoteNode as aA, isNoteRefNode as aB, isNoteReferenceNode as aC, isSeparatorNode as aD, normalNoteIds as aE, noteAtomText as aF, noteIdOf as aG, noteKindOf as aH, noteRefKindOf as aI, noteReferenceKindOf as aJ, noteTypeOf as aK, notesOf as aL, notesPartHasId as aM, observeHistoryGroup as aN, parentNodeOf as aO, parseNoteId as aP, parseNoteScopeId as aQ, removeNode as aR, replaceChildren as aS, replaceNode as aT, resolveHeaderFooterParts as aU, resolveHeaderFooterPartsBySection as aV, resolveHeaderFooterResolutionBySection as aW, resolveNotesPart as aX, withBinaryPart as aY, withEmbeddedImage as aZ, withoutUnreferencedImagePart as a_, applyEdits as aa, applyFragmentPaste as ab, applyHeaderFooterLifecycleOp as ac, applyNoteLifecycleOp as ad, atomicNoteSpansOf as ae, cascadeDeletedNoteReferences as af, collectNodeIds as ag, collectNoteReferences as ah, collectPackageNoteReferences as ai, collectSectionPropertyNodes as aj, createNodeIdAllocator as ak, createNoteReferenceScanBudget as al, customMarkFollows as am, diagnoseNoteReferences as an, findNode as ao, findNoteById as ap, formatNoteScopeId as aq, hasNode as ar, insertChildren as as, isContinuationSeparatorNode as at, isEndnotesNode as au, isFootnotesNode as av, isHeaderFooterLifecycleOp as aw, isNormalNote as ax, isNoteAtomNode as ay, isNoteLifecycleOp as az, TreeDocumentStore as f, reportHistoryGroup as r, MAX_NOTES_PER_PART as w, MAX_NOTE_REFERENCE_PARTS as x, MAX_NOTE_REFERENCE_SCAN as y, NOTE_ATOM_CHAR as z };
1385
- export type { PackageTransactResult as $, ApplyImagePropertiesInput as A, ContentLockPolicy as C, EditOptions as E, FieldResultsMode as F, HeaderFooterParts as H, InsertImageInput as I, NoteDiagnostic as L, NoteKind as N, NoteDiagnosticCode as O, NoteLifecycleImpact as P, NoteLifecycleOp as Q, ReplaceImageOptions as R, StoryScope as S, NoteLifecycleOptions as U, NoteLifecycleRejection as V, NoteLifecycleResult as W, NoteReferenceHit as X, NoteReferenceScanBudget as Y, NoteType as Z, OoxmlEditResult as _, StoryTargetRejection as a, RemotePackageAttribution as a0, StoryResolveResult as a1, TransactionRevisionIds as a2, TreeDocumentStoreOptions as a3, TreePackageStoreOptions as a4, TreeStoryRef as a5, TransactResult as a6, TransactionContext as a7, HeaderFooterSectionResolution as b, HeaderFooterVariant as c, HistoryGroup as d, TreeModelChange as e, SelectionMark as g, TransactOptions as h, ImageIntentResult as i, FragmentPasteInput as j, FragmentPasteResult as k, AtomicNoteSpan as l, CascadeDeletedNoteReferencesOptions as m, DrawingPropertyIdResult as n, HeaderFooterKind as o, HeaderFooterLifecycleImpact as p, HeaderFooterLifecycleOp as q, HeaderFooterLifecycleRejection as s, HeaderFooterLifecycleResult as t, HeaderFooterSlotMeta as u, HistoryCaptureKind as v };
1389
+ export { NOTE_CONTINUATION_SEPARATOR_ID as B, DEFAULT_MAX_EDITABLE_STORY_PARTS as D, NOTE_ID_MAX as G, NOTE_ID_MIN as J, NOTE_SEPARATOR_ID as K, MAX_FRAGMENT_DECODED_BYTES as M, TreePackageStore as T, allocateDrawingPropertyId as a8, allocateNoteId as a9, isNoteNode as aA, isNoteRefNode as aB, isNoteReferenceNode as aC, isSeparatorNode as aD, normalNoteIds as aE, noteAtomText as aF, noteIdOf as aG, noteKindOf as aH, noteRefKindOf as aI, noteReferenceKindOf as aJ, noteTypeOf as aK, notesOf as aL, notesPartHasId as aM, observeHistoryGroup as aN, parentNodeOf as aO, parseNoteId as aP, parseNoteScopeId as aQ, removeNode as aR, replaceChildren as aS, replaceNode as aT, resolveHeaderFooterParts as aU, resolveHeaderFooterPartsBySection as aV, resolveHeaderFooterResolutionBySection as aW, resolveNotesPart as aX, withBinaryPart as aY, withEmbeddedImage as aZ, withoutUnreferencedImagePart as a_, applyEdits as aa, applyFragmentPaste as ab, applyHeaderFooterLifecycleOp as ac, applyNoteLifecycleOp as ad, atomicNoteSpansOf as ae, cascadeDeletedNoteReferences as af, collectNodeIds as ag, collectNoteReferences as ah, collectPackageNoteReferences as ai, collectSectionPropertyNodes as aj, createNodeIdAllocator as ak, createNoteReferenceScanBudget as al, customMarkFollows as am, diagnoseNoteReferences as an, findNode as ao, findNoteById as ap, formatNoteScopeId as aq, hasNode as ar, insertChildren as as, isContinuationSeparatorNode as at, isEndnotesNode as au, isFootnotesNode as av, isHeaderFooterLifecycleOp as aw, isNormalNote as ax, isNoteAtomNode as ay, isNoteLifecycleOp as az, TreeDocumentStore as d, reportHistoryGroup as r, MAX_NOTES_PER_PART as w, MAX_NOTE_REFERENCE_PARTS as x, MAX_NOTE_REFERENCE_SCAN as y, NOTE_ATOM_CHAR as z };
1390
+ export type { PackageTransactResult as $, ApplyImagePropertiesInput as A, ContentLockPolicy as C, EditOptions as E, FieldResultsMode as F, HeaderFooterVariant as H, InsertImageInput as I, NoteDiagnostic as L, NoteKind as N, NoteDiagnosticCode as O, NoteLifecycleImpact as P, NoteLifecycleOp as Q, ReplaceImageOptions as R, StoryScope as S, NoteLifecycleOptions as U, NoteLifecycleRejection as V, NoteLifecycleResult as W, NoteReferenceHit as X, NoteReferenceScanBudget as Y, NoteType as Z, OoxmlEditResult as _, StoryTargetRejection as a, RemotePackageAttribution as a0, StoryResolveResult as a1, TransactionRevisionIds as a2, TreeDocumentStoreOptions as a3, TreePackageStoreOptions as a4, TreeStoryRef as a5, TransactResult as a6, TransactionContext as a7, HistoryGroup as b, TreeModelChange as c, HeaderFooterParts as e, HeaderFooterSectionResolution as f, SelectionMark as g, TransactOptions as h, ImageIntentResult as i, FragmentPasteInput as j, FragmentPasteResult as k, AtomicNoteSpan as l, CascadeDeletedNoteReferencesOptions as m, DrawingPropertyIdResult as n, HeaderFooterKind as o, HeaderFooterLifecycleImpact as p, HeaderFooterLifecycleOp as q, HeaderFooterLifecycleRejection as s, HeaderFooterLifecycleResult as t, HeaderFooterSlotMeta as u, HistoryCaptureKind as v };
@@ -1,10 +1,10 @@
1
- import { S as StoryScope, g as SelectionMark, h as TransactOptions, d as HistoryGroup, a as StoryTargetRejection, e as TreeModelChange, H as HeaderFooterParts, b as HeaderFooterSectionResolution, I as InsertImageInput, i as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, j as FragmentPasteInput, k as FragmentPasteResult } from './tree-package-store-CRHvMyNj.js';
2
- import { au as TreeDocOp, O as OoxmlPart, a4 as OoxmlNode, a5 as OoxmlPackage, av as OoxmlElement, a as ReviewItem, an as SupportedImageMime, ad as ImageDecodePort, aF as RevisionAttributionInput } from './tree-op-types-C_S2niXW.js';
3
- import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-CLJKGD9t.js';
4
- import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-Bcz9_Qva.js';
1
+ import { S as StoryScope, g as SelectionMark, h as TransactOptions, b as HistoryGroup, a as StoryTargetRejection, c as TreeModelChange, e as HeaderFooterParts, f as HeaderFooterSectionResolution, I as InsertImageInput, i as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, j as FragmentPasteInput, k as FragmentPasteResult } from './tree-package-store-DXhX1PE-.js';
2
+ import { au as TreeDocOp, O as OoxmlPart, a4 as OoxmlNode, a5 as OoxmlPackage, av as OoxmlElement, a as ReviewItem, an as SupportedImageMime, ad as ImageDecodePort, aE as RevisionAttributionInput } from './tree-op-types-Df4oY2u4.js';
3
+ import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-AqY5KpVx.js';
4
+ import { H as HeadlessDocumentView, c as DocumentProperties } from './drawing-graphic-kind-CXYGYbB3.js';
5
5
  import { Node } from 'prosemirror-model';
6
6
  import { CollaborationDocumentPort } from './collaboration/replication.js';
7
- import { V as ViewScope } from './editor-scope-B3L-1ALc.js';
7
+ import { V as ViewScope } from './editor-scope-CA6egMaK.js';
8
8
 
9
9
  /**
10
10
  * Why an edited projection could not be mapped back into tree ops.
@@ -1,4 +1,4 @@
1
- import { U as UnsupportedElement } from './semantic-records-BvN-WWst.js';
1
+ import { U as UnsupportedElement } from './semantic-records-DoK0lNjS.js';
2
2
 
3
3
  /** A component mount point and its built-in fallback. @public */
4
4
  interface UnsupportedElementHost {
@@ -0,0 +1,29 @@
1
+ # ECMA-376 preset shape geometry
2
+
3
+ `src/store/package/drawing-preset-table.ts` is generated from `presetShapeDefinitions.xml` in the electronic annex of ECMA-376 Part 1, _Office Open XML File Formats — Fundamentals and Markup Language Reference_ (https://ecma-international.org/publications-and-standards/standards/ecma-376/). The generator, `scripts/generate-drawing-presets.mjs`, re-encodes each preset's adjust values, guide formulas, text rectangle and paths in a compact form, and omits adjust handles and connection sites. The table implements the preset geometry functionality of the standard in a standard-conformant product, as permitted by clause (iv) of the notice below.
4
+
5
+ The following notice applies to that table.
6
+
7
+ COPYRIGHT NOTICE
8
+
9
+ © Ecma International
10
+
11
+ By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
12
+
13
+ This document may be copied, published and distributed to others, and certain derivative works of it may be prepared, copied, published, and distributed, in whole or in part, provided that the above copyright notice and this Copyright License and Disclaimer are included on all such copies and derivative works. The only derivative works that are permissible under this Copyright License and Disclaimer are:
14
+
15
+ (i) works which incorporate all or portion of this document for the purpose of providing commentary or explanation (such as an annotated version of the document),
16
+
17
+ (ii) works which incorporate all or portion of this document for the purpose of incorporating features that provide accessibility,
18
+
19
+ (iii) translations of this document into languages other than English and into different formats and
20
+
21
+ (iv) works by making use of this specification in standard conformant products by implementing (e.g. by copy and paste wholly or partly) the functionality therein.
22
+
23
+ However, the content of this document itself may not be modified in any way, including by removing the copyright notice or references to Ecma International, except as required to translate it into languages other than English or into a different format.
24
+
25
+ The official version of an Ecma International document is the English language version on the Ecma International website. In the event of discrepancies between a translated version and the official version, the official version shall govern.
26
+
27
+ The limited permissions granted above are perpetual and will not be revoked by Ecma International or its successors or assigns.
28
+
29
+ This document and the information contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docx-editor.dev/core",
3
- "version": "2.32.0",
3
+ "version": "2.33.0",
4
4
  "description": "Framework-agnostic core for docx-editor.dev: OOXML parse/serialize, the canonical document tree, layout and paint, and the Editor contract the adapters render.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -105,7 +105,7 @@
105
105
  "directory": "packages/core"
106
106
  },
107
107
  "dependencies": {
108
- "@docx-editor.dev/i18n": "^2.32.0",
108
+ "@docx-editor.dev/i18n": "^2.33.0",
109
109
  "bidi-js": "1.1.0",
110
110
  "emf-converter": "2.0.2",
111
111
  "fast-xml-parser": "^5.10.1",
@@ -1,37 +0,0 @@
1
- /** The longest name a bookmark is written with. */
2
- declare const MAX_AUTHORED_BOOKMARK_NAME_LENGTH = 40;
3
- /**
4
- * Why a name cannot be written, or null when it can.
5
- *
6
- * - `empty`: no characters.
7
- * - `tooLong`: more than {@link MAX_AUTHORED_BOOKMARK_NAME_LENGTH} characters.
8
- * - `invalidStart`: the first character is not a letter or an underscore.
9
- * - `invalidCharacter`: a later character is not a letter, a digit or an underscore.
10
- *
11
- * @public
12
- */
13
- type BookmarkNameProblem = 'empty' | 'tooLong' | 'invalidStart' | 'invalidCharacter';
14
- /**
15
- * Check a name before it is written. Measured in code points, so a letter outside the Basic
16
- * Multilingual Plane counts once.
17
- *
18
- * @public
19
- */
20
- declare function bookmarkNameProblem(name: string): BookmarkNameProblem | null;
21
- /**
22
- * Whether a bookmark is hidden: its name starts with an underscore. Hidden bookmarks are the
23
- * ones applications write for themselves, such as the targets of a table of contents.
24
- *
25
- * @public
26
- */
27
- declare function isHiddenBookmarkName(name: string): boolean;
28
- /**
29
- * The key two names are compared by. Names are case-insensitive, so `Intro` and `intro`
30
- * share a key.
31
- *
32
- * @public
33
- */
34
- declare function bookmarkNameKey(name: string): string;
35
-
36
- export { MAX_AUTHORED_BOOKMARK_NAME_LENGTH as M, bookmarkNameProblem as a, bookmarkNameKey as b, isHiddenBookmarkName as i };
37
- export type { BookmarkNameProblem as B };
@@ -1,5 +0,0 @@
1
- 'use strict';var chunkXJYZVGQR_cjs=require('./chunk-XJYZVGQR.cjs'),chunk6UDJUI3W_cjs=require('./chunk-6UDJUI3W.cjs'),chunkOKMEMSKB_cjs=require('./chunk-OKMEMSKB.cjs'),chunkTJHE5EET_cjs=require('./chunk-TJHE5EET.cjs'),chunk65XBN67F_cjs=require('./chunk-65XBN67F.cjs'),chunkO324RB6R_cjs=require('./chunk-O324RB6R.cjs'),chunkZOZI27AW_cjs=require('./chunk-ZOZI27AW.cjs'),prosemirrorModel=require('prosemirror-model'),prosemirrorState=require('prosemirror-state'),prosemirrorView=require('prosemirror-view'),prosemirrorKeymap=require('prosemirror-keymap'),prosemirrorCommands=require('prosemirror-commands');function Y(t){return t.attributes?.val}function U(t){let e=Y(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var nr=/^[0-9A-Fa-f]{6}$/,or=/^\d{1,6}$/;function Ve(t){return t===void 0||t==="auto"?null:nr.test(t)?`#${t}`:null}var rr={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"},ar={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 sr(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function Gn(t,e=false){let n=chunkZOZI27AW_cjs.sd(t);return n===null||Math.abs(n)>999999||!e&&n<0?null:n}function q(t,e=false){let n=Gn(t,e);return n===null?null:`${n/20}pt`}function Jn(t){let e=[],n=[],r=null,a=null;for(let o of t)switch(o.localName){case "b":e.push(`font-weight:${U(o)?"bold":"normal"}`);break;case "i":e.push(`font-style:${U(o)?"italic":"normal"}`);break;case "u":{let s=Y(o)??"single";if(s==="none"||!U(o))break;n.push("underline"),r=rr[s]??"solid",a=Ve(o.attributes?.color);break}case "strike":U(o)&&n.push("line-through");break;case "dstrike":U(o)&&n.push("line-through");break;case "caps":U(o)&&e.push("text-transform:uppercase");break;case "smallCaps":U(o)&&e.push("font-variant:small-caps");break;case "vertAlign":{let s=Y(o);s==="superscript"?e.push("vertical-align:super","font-size:0.75em"):s==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let s=Ve(Y(o));s&&e.push(`color:${s}`);break}case "highlight":{let s=ar[Y(o)??""];s&&e.push(`background-color:${s}`);break}case "sz":{let s=Y(o);s!==void 0&&or.test(s)&&e.push(`font-size:${Number(s)/2}pt`);break}case "rFonts":{let s=sr(o.attributes?.ascii??o.attributes?.hAnsi);s&&e.push(`font-family:${s}`);break}case "spacing":{let s=q(Y(o),true);s&&e.push(`letter-spacing:${s}`);break}}return n.length>0&&(e.push(`text-decoration-line:${[...new Set(n)].join(" ")}`),r&&e.push(`text-decoration-style:${r}`),a&&e.push(`text-decoration-color:${a}`)),e.join(";")}var ir={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function Kn(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let r=ir[Y(n)??""];r&&e.push(`text-align:${r}`);break}case "ind":{let r=q(n.attributes?.left??n.attributes?.start,true),a=q(n.attributes?.right??n.attributes?.end,true),o=q(n.attributes?.firstLine),s=q(n.attributes?.hanging);r&&e.push(`margin-left:${r}`),a&&e.push(`margin-right:${a}`),o?e.push(`text-indent:${o}`):s&&e.push(`text-indent:-${s}`);break}case "spacing":{let r=q(n.attributes?.before),a=q(n.attributes?.after);r&&e.push(`margin-top:${r}`),a&&e.push(`margin-bottom:${a}`);let o=Gn(n.attributes?.line),s=n.attributes?.lineRule;o!==null&&s!=="exact"&&s!=="atLeast"?e.push(`line-height:${(o/240).toFixed(3)}`):o!==null&&e.push(`line-height:${o/20}pt`);break}case "shd":{let r=Ve(n.attributes?.fill);r&&e.push(`background-color:${r}`);break}case "pageBreakBefore":U(n)&&e.push("break-before:page");break;}return e.join(";")}var N=new prosemirrorModel.Schema({nodes:{doc:{content:"paragraph+"},paragraph:{content:"inline*",group:"block",attrs:{nodeId:{default:null},props:{default:[]}},toDOM:t=>{let e=Kn(t.attrs.props??[]);return ["p",{"data-node-id":String(t.attrs.nodeId??""),...e?{style:e}:{}},0]},parseDOM:[{tag:"p",getAttrs:t=>typeof t=="string"?null:{nodeId:t.getAttribute("data-node-id")||null,props:[]}}]},text:{group:"inline"},tab:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"tab",class:"docx-tab"},"\u2192"],parseDOM:[{tag:'span[data-token="tab"]'}]},hardBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["br"],parseDOM:[{tag:"br"}]},pageBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"page-break",class:"docx-page-break"}],parseDOM:[{tag:'span[data-token="page-break"]'}]},unknownInline:{inline:true,group:"inline",atom:true,selectable:false,draggable:false,attrs:{nodeId:{default:null},label:{default:""}},toDOM:t=>["span",{"data-token":"unknown","data-node-id":String(t.attrs.nodeId??""),contenteditable:"false",class:"docx-unknown-inline",title:String(t.attrs.label||"Content this editor cannot edit yet. It is preserved.")}],parseDOM:[{tag:'span[data-token="unknown"]',getAttrs:t=>typeof t=="string"?false:{nodeId:t.getAttribute("data-node-id")||null,label:""}}]}},marks:{runProps:{attrs:{props:{default:[]}},excludes:"runProps",toDOM:t=>{let e=t.attrs.props??[],n=Jn(e);return ["span",{"data-run-props":dr(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=cr(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function dr(t){return JSON.stringify(Array.isArray(t)?t:[])}function cr(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let n=[];for(let r of e){if(typeof r!="object"||r===null)return null;let a=r;if(typeof a.localName!="string"||a.attributes!==void 0&&(typeof a.attributes!="object"||a.attributes===null))return null;n.push(a.attributes===void 0?{localName:a.localName}:{localName:a.localName,attributes:a.attributes});}return n}catch{return null}}function qe(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function Ce(t,e){return JSON.stringify(De(t))===JSON.stringify(De(e))}function De(t){return [...t].map(e=>({localName:e.localName,attributes:Object.fromEntries(Object.entries(e.attributes??{}).sort(([n],[r])=>n<r?-1:1))})).sort((e,n)=>e.localName<n.localName?-1:1)}function Ze(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue"||n.namespaceUri!==chunkZOZI27AW_cjs.pa||n.localName==="rPrChange"||n.localName==="pPrChange")continue;let r={};for(let a of n.attributes)a.namespaceUri===chunkZOZI27AW_cjs.pa&&(r[a.localName]=a.value);e.push(Object.keys(r).length>0?{localName:n.localName,attributes:r}:{localName:n.localName});}return e}function Xn(t){return t.kind==="textValue"?"":`${{drawing:"Picture",pict:"Picture",object:"Embedded object",fldSimple:"Field",hyperlink:"Hyperlink",sdt:"Content control",tbl:"Table"}[t.localName]??t.localName} \u2014 preserved, not editable yet`}function F(t){if(t.kind==="textValue")return [];let e=[],n=o=>{if(o.kind!=="run")return;let s=o.children.find(d=>d.kind==="runProperties"),l=Ze(s);for(let d of o.children)if(d.kind!=="runProperties"){if(d.kind==="tab"){e.push({kind:"tab"});continue}if(d.kind==="hardBreak"){e.push(chunkZOZI27AW_cjs.sb(d)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(d.kind==="text"){let p="";for(let m of d.children)m.kind==="textValue"&&(p+=m.value);p.length>0&&e.push({kind:"text",text:p,props:l});continue}e.push({kind:"unknown",nodeId:d.id,label:Xn(d),modelLength:d.kind==="drawing"||chunkZOZI27AW_cjs.Qd(d)||chunkZOZI27AW_cjs.vd(d)||chunkZOZI27AW_cjs.jb(d)!==null?1:0});}},r=o=>{if(o.kind==="run"){n(o);return}e.push({kind:"unknown",nodeId:o.id,label:Xn(o),modelLength:0});},a=(o,s)=>{for(let l of o)if(!(l.kind==="textValue"||l.kind==="paragraphProperties")&&!(s>=chunkZOZI27AW_cjs.Aa)){if(chunkZOZI27AW_cjs.Ca(l)&&!chunkZOZI27AW_cjs.za(l.kind)&&s<chunkZOZI27AW_cjs.Aa){a(l.children.filter(d=>!chunkZOZI27AW_cjs.xh(l,d)),chunkZOZI27AW_cjs.Ba(l,s));continue}if(chunkZOZI27AW_cjs.Yc(l)){let d=chunkZOZI27AW_cjs._c(l);d&&a(d,chunkZOZI27AW_cjs.Ba(l,s));continue}r(l);}};return a(t.children,0),e}function le(t){let e=[],n=r=>{if(r.kind!=="textValue"){if(r.kind==="body"){for(let a of r.children)a.kind==="paragraph"&&e.push(a);return}for(let a of r.children)n(a);}};return n(t.root),e}var Qn=chunkZOZI27AW_cjs.yb(16),Vn=chunkZOZI27AW_cjs.xb();function ur(t,e){let n=Vn.get(t);if(!n){let r=[];chunkZOZI27AW_cjs.Wc([t],r,0),n=Object.freeze(r),Vn.set(t,n,n.length);}for(let r of n)e.push(r);}function B(t){let e=Qn.get(t);if(e)return e;let n=[];for(let r of chunkZOZI27AW_cjs.Sc(t))if(r.root.kind!=="textValue")for(let a of r.root.children)ur(a,n);return Qn.set(t,n),n}function Z(t){let e=le(t).map(n=>{let r=n.kind==="textValue"?void 0:n.children.find(o=>o.kind==="paragraphProperties"),a=F(n).map(o=>{switch(o.kind){case "text":return N.text(o.text,o.props.length>0?[N.marks.runProps.create({props:o.props})]:[]);case "tab":return N.node("tab");case "hardBreak":return N.node("hardBreak");case "pageBreak":return N.node("pageBreak");default:return N.node("unknownInline",{nodeId:o.nodeId,label:o.label})}});return N.node("paragraph",{nodeId:n.id,props:Ze(r)},a)});return N.node("doc",null,e.length>0?e:[N.node("paragraph")])}function pr(t,e){let n=[];return t.forEach(r=>{if(r.isText&&r.text){n.push({kind:"text",text:r.text,props:qe(r)});return}r.type.name==="tab"?n.push({kind:"tab"}):r.type.name==="hardBreak"?n.push({kind:"hardBreak"}):r.type.name==="pageBreak"?n.push({kind:"pageBreak"}):r.type.name==="unknownInline"&&n.push({kind:"unknown",nodeId:String(r.attrs.nodeId??""),label:String(r.attrs.label??""),modelLength:e.has(String(r.attrs.nodeId??""))?1:0});}),n}function M(t){let e="";for(let n of t)n.kind==="text"?e+=n.text:n.kind==="tab"?e+=" ":n.kind==="hardBreak"?e+=`
2
- `:n.kind==="pageBreak"?e+=chunkZOZI27AW_cjs.qb:n.modelLength===1&&(e+=chunkZOZI27AW_cjs.vf);return e}function j(t){let e=[],n=0;for(let r of t)r.kind==="text"?n+=r.text.length:r.kind==="tab"||r.kind==="hardBreak"||r.kind==="pageBreak"?n+=1:(e.push(`${r.nodeId}@${n}`),n+=r.modelLength);return e}function fr(t,e){if(t===e)return null;let n=0,r=Math.min(t.length,e.length);for(;n<r&&t[n]===e[n];)n+=1;let a=t.length,o=e.length;for(;a>n&&o>n&&t[a-1]===e[o-1];)a-=1,o-=1;return {start:n,endBefore:a,endAfter:o}}function qn(t){let e=[];for(let n of t)if(n.kind==="text")for(let r=0;r<n.text.length;r+=1)e.push(n.props);else n.kind==="tab"||n.kind==="hardBreak"||n.kind==="pageBreak"?e.push(e[e.length-1]??[]):n.kind==="unknown"&&n.modelLength===1&&e.push([]);return e}function mr(t,e,n,r,a){let o=[],s=M(e),l=M(n),d=fr(s,l),p=[],m=0,f=false;for(let g of e){if(g.kind!=="unknown"){m+=g.kind==="text"?g.text.length:1;continue}let c=m;g.modelLength===1&&d&&(d.start<m+1&&d.endBefore>m&&(f=true),d.endBefore<=m&&(c+=d.endAfter-d.endBefore)),p.push(`${g.nodeId}@${c}`),m+=g.modelLength;}if(f||JSON.stringify(p)!==JSON.stringify(j(n)))return {ok:false,reason:"unknown-content-moved",detail:t};if(Ce(r,a)||o.push({op:"setParagraphProperties",paragraphId:t,properties:De(a)}),d&&(d.endBefore>d.start&&o.push({op:"deleteText",paragraphId:t,start:d.start,end:d.endBefore}),d.endAfter>d.start)){let g=l.slice(d.start,d.endAfter),c=d.start,y="",x=()=>{y.length!==0&&(o.push({op:"insertText",paragraphId:t,offset:c,text:y}),c+=y.length,y="");};for(let O of g)O===" "?(x(),o.push({op:"insertTab",paragraphId:t,offset:c}),c+=1):O===`
3
- `?(x(),o.push({op:"insertHardBreak",paragraphId:t,offset:c}),c+=1):O===chunkZOZI27AW_cjs.qb?(x(),o.push({op:"insertPageBreak",paragraphId:t,offset:c}),c+=1):y+=O;x();}if(!d){let g=qn(e),c=qn(n),y=0;for(;y<c.length;){if(Ce(g[y]??[],c[y])){y+=1;continue}let x=y,O=c[y];for(;y<c.length&&Ce(c[y],O)&&!Ce(g[y]??[],c[y]);)y+=1;o.push({op:"setRunProperties",paragraphId:t,start:x,end:y,properties:De(O)});}}return {ok:true,ops:o}}function et(t,e){let n=le(t),r=new Set;for(let l of n)for(let d of F(l))d.kind==="unknown"&&d.modelLength===1&&r.add(d.nodeId);let a=l=>pr(l,r),o=[];if(e.forEach(l=>{l.type.name==="paragraph"&&o.push(l);}),o.length!==e.childCount)return {ok:false,reason:"unsupported-node"};let s=o.length-n.length;if(s===0){let l=[];for(let[d,p]of o.entries()){let m=n[d];if(p.attrs.nodeId!==m.id)return {ok:false,reason:"paragraph-reordered",detail:String(p.attrs.nodeId)};let f=mr(m.id,F(m),a(p),Ze(m.kind==="textValue"?void 0:m.children.find(g=>g.kind==="paragraphProperties")),p.attrs.props??[]);if(!f.ok)return f;l.push(...f.ops);}return {ok:true,ops:l}}return s===1?gr(n,o,a):s===-1?yr(n,o,a):{ok:false,reason:"paragraph-count-unexplained",detail:String(s)}}function gr(t,e,n){for(let r=0;r<t.length;r+=1){let a=t[r],o=e[r],s=e[r+1];if(!o||!s||o.attrs.nodeId!==a.id)continue;let l=s.attrs.nodeId;if(l!==null&&l!==a.id)continue;let d=n(o),p=n(s),m=F(a),f=M(d);if(f+M(p)===M(m)&&JSON.stringify(j([...d,...p]))===JSON.stringify(j(m))&&Zn(t,e,r,n)&&eo(t,e,r+1,r+2,n))return {ok:true,ops:[{op:"splitParagraph",paragraphId:a.id,offset:f.length}]}}return {ok:false,reason:"split-not-clean"}}function yr(t,e,n){for(let r=0;r+1<t.length;r+=1){let a=t[r],o=t[r+1],s=e[r];if(!s||s.attrs.nodeId!==a.id)continue;let l=[...F(a),...F(o)],d=n(s);if(M(d)===M(l)&&JSON.stringify(j(d))===JSON.stringify(j(l))&&Zn(t,e,r,n)&&eo(t,e,r+2,r+1,n))return {ok:true,ops:[{op:"joinParagraphs",firstId:a.id,secondId:o.id}]}}return {ok:false,reason:"join-not-clean"}}function Zn(t,e,n,r){for(let a=0;a<n;a+=1){let o=e[a],s=t[a];if(!o||o.attrs.nodeId!==s.id||M(r(o))!==M(F(s))||JSON.stringify(j(r(o)))!==JSON.stringify(j(F(s))))return false}return true}function eo(t,e,n,r,a){for(let o=0;n+o<t.length;o+=1){let s=t[n+o],l=e[r+o];if(!l||l.attrs.nodeId!==s.id||M(a(l))!==M(F(s))||JSON.stringify(j(a(l)))!==JSON.stringify(j(F(s))))return false}return true}function hr(t,e){return chunkZOZI27AW_cjs.Xa(t,e)!==null}function tt(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return Z(e);let r=new Map;t.forEach(d=>{let p=d.attrs.nodeId;typeof p=="string"&&r.set(p,d);});let a=new Set(n.dirty),o=le(e);if(o.length!==t.childCount)return Z(e);let s=Z(e),l=[];for(let[d,p]of o.entries()){let m=r.get(p.id);l.push(m&&!a.has(p.id)?m:s.child(d));}return N.node("doc",null,l)}var xr=8*1024*1024;function to(){let t=new WeakMap;function*e(r){let a=t.get(r);if(a)return a.slice();let o=yield*chunkZOZI27AW_cjs.Me(r);return t=new WeakMap,o.byteLength<=xr&&t.set(r,o.slice()),o}return Object.assign(r=>{let a=e(r);for(;;){let o=a.next();if(o.done)return o.value}},{steps:e})}function oo(t){return B(t).map(e=>chunkZOZI27AW_cjs.Tk(t,e.id)??"").join(`
4
- `)}var kr=64,no=new WeakMap;function nt(t,e=0){if(e>kr)return false;let n=no.get(t);if(n!==void 0)return n;let r=false;for(let a of t.children)if(a.kind!=="textValue"&&(a.kind==="commentRangeStart"||a.kind==="commentReference"||nt(a,e+1))){r=true;break}return chunkZOZI27AW_cjs.vb(t)&&no.set(t,r),r}var Pr="/word/numbering.xml";function Or(t,e,n){if(t.relationships!==e.relationships||t.contentTypes!==e.contentTypes||t.parts.size!==e.parts.size)return false;for(let[r,a]of e.parts)if(!(r===n||r===Pr)&&t.parts.get(r)!==a)return false;return true}function Rr(t,e){let n=t.kind==="revision"?t.ranges[0]??null:t.range;if(!n)return null;let r=e.get(n.start.paragraphId);return r===void 0?null:r}function ro(t,e,n,r){for(let s of e)if(s.ranges.length===0)return false;let a=new Set;for(let s of t)s.kind!=="revision"||s.ranges.length>0||ot(s,n)||a.add(chunkZOZI27AW_cjs.Fj(s));for(let s of e)if(a.has(chunkZOZI27AW_cjs.Fj(s)))return false;let o=new Set(e.flatMap(s=>chunkZOZI27AW_cjs.Ej(s)));for(let s of t)if(s.kind==="revision"&&ot(s,n)&&chunkZOZI27AW_cjs.Ej(s).some(l=>!o.has(l)&&chunkZOZI27AW_cjs.Xa(r,l)))return false;return true}function ao(t,e,n,r,a=s=>s,o){let s=o?Sr(t,o,n):new Map;if(!s)return null;let l=e.get(n);if(l===void 0)return r.length===0?[...t]:null;let d=[],p=null,{groups:m,absorbed:f}=vr(t,e,n,r),g=a(f.size>0?r.filter(c=>!f.has(c)):r);for(let c of t){let y=c.kind==="revision"&&m.get(c)||c.kind==="comment"&&s.get(c)||c;if(y.kind==="revision"&&ot(y,n)){p===null&&(p=d.length);continue}if(p===null){let x=Rr(y,e);x!==null&&x>l&&(p=d.length);}d.push(y);}if(p===null&&(p=d.length),g.length>0){let c=g.length<2?[...g]:[...g].sort((y,x)=>chunkZOZI27AW_cjs.Mj(y,e)-chunkZOZI27AW_cjs.Mj(x,e));d.splice(p,0,...c);}if(m.size>0||s.size>0){let c=[];d.forEach((x,O)=>{(x.kind==="revision"?x.ranges[0]?.start:x.range?.start)?.paragraphId===n&&c.push(O);});let y=c.map(x=>d[x]).sort((x,O)=>chunkZOZI27AW_cjs.Mj(x,e)-chunkZOZI27AW_cjs.Mj(O,e));c.forEach((x,O)=>d[x]=y[O]);}return chunkZOZI27AW_cjs.wk(d)}function Sr(t,e,n){let r=new Map,a;for(let o of t){if(o.kind!=="comment"||!io(o,n))continue;let s=o.range;if(!s||o.orphaned)return null;if(!a){let m=chunkZOZI27AW_cjs.Xa(e,n);if(!m||m.kind!=="paragraph")return null;a=chunkZOZI27AW_cjs.ni(m);}let l=m=>{let f=a.filter(g=>g.commentId===o.id&&g.kind===m);return f.length===1?f[0].offset:void 0},d=s.start.paragraphId===n?l("start"):s.start.offset,p=s.end.paragraphId===n?l("end"):s.end.offset;if(d===void 0||p===void 0)return null;d===s.start.offset&&p===s.end.offset||r.set(o,{...o,range:{...s,start:{...s.start,offset:d},end:{...s.end,offset:p}}});}return r}function ot(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function so(t){return t.revisionKind==="format"&&t.formattingKind==="pPrChange"}function vr(t,e,n,r){let a=new Map,o=new Set,s=new Map;for(let l of t)if(l.kind==="revision"&&so(l)&&lo(l,n))for(let d of chunkZOZI27AW_cjs.Ej(l))s.set(d,l);if(s.size===0)return {groups:a,absorbed:o};for(let l of r){let d=chunkZOZI27AW_cjs.Ej(l),p=d.length>0?s.get(d[0]):void 0;if(!p||!d.every(g=>s.get(g)===p))continue;o.add(l);let m=a.get(p)??p,f=[...m.ranges.filter(g=>g.start.paragraphId!==n),...l.ranges].sort((g,c)=>(e.get(g.start.paragraphId)??0)-(e.get(c.start.paragraphId)??0)||g.start.offset-c.start.offset);a.set(p,chunkZOZI27AW_cjs.Dj({...m,ranges:f},chunkZOZI27AW_cjs.Ej(p)));}return {groups:a,absorbed:o}}function io(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function br(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function lo(t,e){return t.ranges.length===0||!t.ranges.some(r=>r.start.paragraphId===e||r.end.paragraphId===e)?false:!t.ranges.every(r=>r.start.paragraphId===e&&r.end.paragraphId===e)}function co(t,e,n){return t.fromRevision!==e.bodyRevision||n.currentPackageRevision!==e.packageRevision+1&&(n.changePackage!==n.currentPackage||!Or(e.pkg,n.currentPackage,n.part.name))||t.story!==void 0&&t.story.kind!=="body"||t.impact==="global"?false:e.commentsPart===n.commentsPart&&e.commentsExtendedPart===n.commentsExtendedPart}function uo(t,e){let n=chunkZOZI27AW_cjs.Ya(t,e);if(!n)return false;let r=n.children.findIndex(o=>o.id===e),a=n.children[r-1];return a?.kind==="paragraph"&&chunkZOZI27AW_cjs.lk({...t,root:a}).some(o=>o.paragraphMark)}function po(t,e,n,r){if(!co(t,e,r)||t.splitJoin.length!==1)return false;let a=t.splitJoin[0],o,s;if("split"in a){if(t.deleted.length>0||t.created.length!==1||t.created[0]!==a.split.tail)return false;o=s=[a.split.from,a.split.tail];}else {if(t.created.length>0||t.deleted.length!==1||t.deleted[0]!==a.join.removed)return false;o=[a.join.kept,a.join.removed],s=[a.join.kept];}for(let d of s){let p=chunkZOZI27AW_cjs.Xa(r.part,d);if(!p||p.kind!=="paragraph"||chunkZOZI27AW_cjs.lk({...r.part,root:p}).length>0)return false}if(uo(r.part,s[0]))return false;let l=d=>d!==void 0&&o.includes(d);for(let d of n){let p=d.kind==="revision"?d.ranges:d.range?[d.range]:[];for(let m of p)if(l(m.start.paragraphId)||l(m.end.paragraphId))return false}return true}function Ir(t,e,n){let r=chunkZOZI27AW_cjs.dc(n);if(r.length===0)return false;let a=t.parts.get(e.name),o=a?chunkZOZI27AW_cjs.Xa(a,n.id):null;if(!o)return true;let s=new Set(chunkZOZI27AW_cjs.dc(o).map(l=>l.node));return r.some(l=>!s.has(l.node))}function Tr(t,e,n){let r=new Set(n.flatMap(a=>a.kind==="custom"?[a.id]:[]));if(r.size===0)return false;for(let a=chunkZOZI27AW_cjs.Ya(t,e);a;a=chunkZOZI27AW_cjs.Ya(t,a.id))if(a.kind==="contentControl"&&r.has(a.id))return true;return false}function fo(t,e,n,r){if(!co(t,e,r)||t.dirty.length!==1||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0)return null;let{part:a}=r,o=t.dirty[0],s=chunkZOZI27AW_cjs.Xa(a,o);if(!s||s.kind!=="paragraph"||t.impact!=="text-local"&&(chunkZOZI27AW_cjs.lk({...a,root:s}).length>0||t.impact==="flow-structural"&&chunkZOZI27AW_cjs.Ya(a,o)?.localName!=="body")||Ir(e.pkg,a,s)||Tr(a,o,n)||uo(a,o))return null;for(let l of n){if(l.kind==="comment"){if(io(l,o)&&t.impact!=="text-local")return null;continue}if(l.kind==="custom"){if(l.range?.start.paragraphId===o)return null;continue}if(br(l,o)||lo(l,o)&&!(t.impact==="text-local"&&so(l)))return null}return o}function wr(t,e){if(t.size!==e.size)return false;for(let[n,r]of t){let a=e.get(n);if(!a||a.nodeId!==r.nodeId||a.label!==r.label||a.data!==r.data)return false}return true}function Nr(t,e){return t.root===e.root&&t.commentsPart===e.commentsPart&&t.commentsExtendedPart===e.commentsExtendedPart&&t.stylesPart===e.stylesPart&&t.numberingRoot===e.numberingRoot&&t.furnitureParts.length===e.furnitureParts.length&&t.furnitureParts.every((n,r)=>n===e.furnitureParts[r])&&wr(t.customNodePayloads,e.customNodePayloads)}function mo(){let t=[];return {get(e){let n=t.findIndex(a=>Nr(a.inputs,e));if(n<0)return;let[r]=t.splice(n,1);return t.unshift(r),r.items},set(e,n){let r=t.findIndex(a=>a.inputs.root===e.root);r>=0&&t.splice(r,1),t.unshift({inputs:e,items:n}),t.length>8&&(t.length=8);}}}var ho=new WeakMap;function Va(t,e){return ho.set(t,e),t}function Er(t){return t?ho.get(t):void 0}var de=new WeakMap,xo={sites:new Set,paragraphs:new Map,key:"",spanning:new Set};function Mr(t){return de.get(t)??xo}function Cr(t){return t.kind==="revision"&&t.revisionKind==="format"&&(t.formattingKind==="pPrChange"||t.formattingKind==="rPrChange")}function go(t,e){if(t.size!==e.size)return false;for(let n of e)if(!t.has(n))return false;return true}function Dr(t,e){if(t.size!==e.size)return false;for(let[n,r]of e)if(t.get(n)!==r)return false;return true}function yo(t,e){return t.key===e.key&&go(t.sites,e.sites)&&Dr(t.paragraphs,e.paragraphs)&&go(t.spanning,e.spanning)?t:e}function ko(t,e,n,r){let a=Er(t),o={pkg:e,stylesRoot:n.stylesPart?.root??null,numberingRoot:n.numberingRoot},s=r?Mr(r.items):xo,l=chunkOKMEMSKB_cjs.c(o.stylesRoot,o.numberingRoot),d=null,p=r!==null&&r.stylesPart===n.stylesPart&&(r.numberingRoot===n.numberingRoot||s.sites.size===0&&!r.items.some(Cr));return {filtered:m=>{if(!a)return m;let f=a(m,o),g=new Set(f.map(y=>y.id)),c=chunkOKMEMSKB_cjs.a(m.filter(y=>!g.has(y.id)));return d={result:f,removed:c.sites,paragraphs:c.paragraphs,spanning:c.spanning,touched:chunkOKMEMSKB_cjs.b(m),kept:chunkOKMEMSKB_cjs.a(f).sites},f},sameFilter:p,patchable:m=>p&&!s.spanning.has(m),publish:m=>{if(!a||de.has(m))return m;let f=d;if(f?.result===m){let x={sites:new Set(f.removed),paragraphs:f.paragraphs,key:l,spanning:new Set(f.spanning)};return de.set(m,yo(s,x)),m}if(!f)return de.set(m,s.key===l?s:{...s,key:l}),m;if(s.key===l&&f.removed.length===0&&!f.kept.some(x=>s.sites.has(x)))return de.set(m,s),m;let g=new Set(s.sites);for(let x of f.kept)g.delete(x);for(let x of f.removed)g.add(x);let c=new Map(s.paragraphs);for(let x of f.touched)c.delete(x);for(let[x,O]of f.paragraphs)c.set(x,O);let y=new Set(s.spanning);for(let x of f.touched)y.delete(x);for(let x of f.spanning)y.add(x);return de.set(m,yo(s,{sites:g,paragraphs:c,key:l,spanning:y})),m}}}var Ro=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,Ar=["ascii","hAnsi","cs","eastAsia"],Fr=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],Br=128,Lr=/[\u0000-\u001F\u007F-\u009F]/;function C(t){return t.kind!=="textValue"}function ee(t,e){return t.attributes.find(n=>n.localName===e)?.value}function So(t,e){let n=new Map;for(let a of t)for(let o of a.children)if(C(o))for(let[s,l]of Io(o,e))n.has(s)||n.set(s,l);let r=[...n.values()];return r.sort((a,o)=>a<o?-1:a>o?1:0),r}var rt=new WeakMap,vo=16,bo=32;function Io(t,e,n=0){let r=e?.major??null,a=e?.minor??null,o=e?.majorEastAsia??null,s=e?.minorEastAsia??null,l=e?.majorBidi??null,d=e?.minorBidi??null,p=rt.get(t);if(p&&p.major===r&&p.minor===a&&p.majorEastAsia===o&&p.minorEastAsia===s&&p.majorBidi===l&&p.minorBidi===d)return p.byFold;if(t.children.length>=vo&&n<bo&&t.localName!=="rFonts"){let c=new Map;for(let y of t.children)if(C(y))for(let[x,O]of Io(y,e,n+1))c.has(x)||c.set(x,O);return rt.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:s,majorBidi:l,minorBidi:d,byFold:c}),c}let m=new Map,f=c=>{if(!c||!Ro.test(c))return;let y=c.toLowerCase();m.has(y)||m.set(y,c);},g=[t];for(;g.length>0;){let c=g.pop();if(C(c)){if(c.localName==="rFonts"){for(let y of Ar)f(ee(c,y));if(e)for(let y of Fr)f(chunk65XBN67F_cjs.ya(ee(c,y),e));}for(let y=c.children.length-1;y>=0;y-=1)g.push(c.children[y]);}}return rt.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:s,majorBidi:l,minorBidi:d,byFold:m}),m}function To(t){let e=new Map;for(let r of t)for(let a of r.children)if(C(a))for(let[o,s]of wo(a))e.has(o)||e.set(o,s);let n=[...e.values()];return n.sort((r,a)=>r<a?-1:r>a?1:0),n}var Po=new WeakMap,_r=new Map;function wo(t,e=0){let n=Po.get(t);if(n)return n;let r=s=>{let l=s.size===0?_r:s;return Po.set(t,l),l},a=new Map;if(t.children.length>=vo&&e<bo&&t.localName!=="sym"){for(let s of t.children)if(C(s))for(let[l,d]of wo(s,e+1))a.has(l)||a.set(l,d);return r(a)}let o=[t];for(;o.length>0;){let s=o.pop();if(C(s)){if(s.localName==="sym"&&s.namespaceUri===chunkZOZI27AW_cjs.pa){let l=s.attributes.find(p=>p.localName==="font"&&(p.namespaceUri===chunkZOZI27AW_cjs.pa||p.namespaceUri===""))?.value,d=chunkXJYZVGQR_cjs.c(l);d!==null&&!a.has(d.toLowerCase())&&a.set(d.toLowerCase(),d);}for(let l=s.children.length-1;l>=0;l-=1)o.push(s.children[l]);}}return r(a)}function No(t){let e=[...t];for(;e.length>0;){let n=e.pop();if(C(n)){if(n.localName==="t"&&n.namespaceUri===chunkZOZI27AW_cjs.pa){for(let r of n.children)if(!C(r)&&r.value.length>0)return true;continue}for(let r of n.children)e.push(r);}}return false}var Hr=new Set(["paragraph","character","table","numbering"]),jr=/^[0-9A-Fa-f]{6}$/,zr=16,Oo=new Map([["normal",0],["title",1],["subtitle",2],["heading 1",11],["heading 2",12],["heading 3",13],["heading 4",14],["heading 5",15],["heading 6",16],["heading 7",17],["heading 8",18],["heading 9",19]]);function Eo(t){return t.children}function at(t,e){for(let n of Eo(t))if(C(n)&&n.localName===e)return n}function $r(t){return Oo.get(t.name.toLowerCase())??Oo.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function st(t){return t===void 0||t.length===0||t.length>Br||Lr.test(t)?null:t}function Mo(t,e){if(!t)return [];let n=new Map;for(let o of t.children){if(!C(o)||o.localName!=="style")continue;let s=st(ee(o,"styleId"));s!==null&&!n.has(s)&&n.set(s,o);}let r=o=>{let s=false,l=false,d=null,p=false,m=false,f=new Set,g=o;for(let x=0;x<zr&&g!==null&&!f.has(g);x+=1){f.add(g);let O=n.get(g);if(!O)break;let S=at(O,"rPr");for(let b of S?Eo(S):[]){if(!C(b))continue;let I=ee(b,"val"),E=I!=="0"&&I!=="false"&&I!=="off";b.localName==="b"&&!p?(s=E,p=true):b.localName==="i"&&!m?(l=E,m=true):b.localName==="color"&&d===null&&I&&jr.test(I)&&(d=I);}let v=at(O,"basedOn");g=v?st(ee(v,"val")):null;}let c=e?.(o),y=c?.fontFamily??null;return {fontFamily:y!==null&&Ro.test(y)?y:null,fontSizePt:c?.fontSizeHalfPoints!=null&&c.fontSizeHalfPoints>0?c.fontSizeHalfPoints/2:null,bold:s,italic:l,color:d}},a=[];for(let[o,s]of n){let l=ee(s,"type");if(l===void 0||!Hr.has(l))continue;let d=at(s,"name"),p=st(d?ee(d,"val"):void 0);a.push({styleId:o,name:p??o,type:l,preview:r(o)});}return a.map((o,s)=>({entry:o,index:s,rank:$r(o)})).sort((o,s)=>o.rank-s.rank||o.index-s.index).map(o=>o.entry)}var Wr=128,Ur=/[\u0000-\u001F\u007F-\u009F]/,Yr=/[\u0000-\u001F\u007F-\u009F]/g,Gr=200;function lt(t){return t.kind!=="textValue"}function Co(t,e){for(let n of t.children)if(lt(n)&&n.localName===e)return n}function it(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Jr(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!lt(n)||n.localName!=="style"||it(n,"type")!=="paragraph")continue;let r=it(n,"styleId");if(r===void 0||r.length===0||r.length>Wr||Ur.test(r))continue;let a=chunkTJHE5EET_cjs.a(n);a!==null&&e.set(r,a);}return e}function dt(t){let e=Co(t,"pPr"),n=e?Co(e,"pStyle"):void 0;return n?it(n,"val"):void 0}function Do(t,e){let n=Jr(e);if(n.size===0)return [];let r=[];for(let a of le(t)){if(!lt(a))continue;let o=dt(a);if(o===void 0)continue;let s=n.get(o);if(s===void 0)continue;let l=chunkZOZI27AW_cjs.Tk(t,a.id)??"",d=a.kind==="paragraph"?chunkZOZI27AW_cjs.Vk(a,l):l,p=chunkZOZI27AW_cjs.pb(d).replace(Yr," ").trim().slice(0,Gr);p.length!==0&&r.push({text:p,level:s,blockId:a.id});}return r}function Kr(t,e,n){let r=new Map,a=n(t);for(let o of a){let s=r.get(o.hostParagraphId);s?s.push(o):r.set(o.hostParagraphId,[o]);}return r}function Xr(t,e,n){let r=[];for(let a of chunkZOZI27AW_cjs.Vc(t.root)){let o=e.get(a.id);if(o)for(let s of o)r.push(s);}return r}function Ao(t,e,n=chunkZOZI27AW_cjs.Di){let r=[],a=new Map;for(let o of t){if(r.push(o),o.scope?.kind==="note")continue;let s=a.get(o.part);s||(s=Kr(o.part,e,n),a.set(o.part,s));for(let l of Xr(o,s)){let d=o.scope;r.push({part:o.part,root:l.root,scope:{kind:"frame",id:l.root.id,drawingNodeId:l.drawingNodeId,hostParagraphId:l.hostParagraphId,...d?.kind==="headerFooter"?{owner:d}:{}}});}}return r}var Ae=48,Qr=/[\u0000-\u001F\u007F-\u009F]/g;function Vr(t){let e=[],n=chunkZOZI27AW_cjs.rg(t),r=new Map;for(let a of n.segments)chunkZOZI27AW_cjs.Df(a.node)&&r.set(a.node.id,a.formatRunIds??[]);return chunkZOZI27AW_cjs.dd(t.children,0,a=>{if(a.kind==="run"){e.push({id:a.id,start:n.spanOf(a)?.start??0});return}if(chunkZOZI27AW_cjs.Df(a))for(let o of r.get(a.id)??[]){let s=n.spanOf(o);s&&e.push({id:o,start:s.start});}},{descendRevisions:true}),e}function qr(t){let e=chunkZOZI27AW_cjs.Uc(t);return e?[{part:t,root:e}]:[]}function Zr(t,e){let n=[];for(let r of ["header","footer"])for(let a of t){let o=r==="header"?a.headers:a.footers;for(let[s,l]of o){if(!chunkZOZI27AW_cjs.jf(a,s)||e.has(l.part))continue;e.add(l.part);let d=chunkZOZI27AW_cjs.Sc(l.part).find(p=>p.kind===r);d&&n.push({part:l.part,root:d.root,scope:{kind:"headerFooter",rId:l.rId}});}}return n}function Fo(t,e,n){if(!t)return [];let r=[];for(let a of chunkZOZI27AW_cjs.Oc(t.root)){let o=chunkZOZI27AW_cjs.Cc(a);!chunkZOZI27AW_cjs.Ec(a)||o===null||!n.has(o)||r.push({part:t,root:a,scope:{kind:"note",id:chunkZOZI27AW_cjs.sc(e,o)}});}return r}function ea(t,e){let n=qr(t);if(e){let r=new Set;for(let a of Zr(e.headerFooterBySection,r))n.push(a);for(let a of Fo(e.footnotes,"footnote",e.referencedNoteIds.footnote))n.push(a);for(let a of Fo(e.endnotes,"endnote",e.referencedNoteIds.endnote))n.push(a);}return Ao(n)}function Bo(t,e){if(t.length===0)return {index:0,offset:e};for(let n=t.length-1;n>=0;n-=1){let r=t[n].start;if(e>=r)return {index:n,offset:e-r}}return {index:0,offset:e}}function ta(t,e,n){let r=t.findIndex(a=>a.id===e);return r<0?null:{index:r,offset:n}}function ct(t,e){return chunkZOZI27AW_cjs.pb(t).replace(Qr," ").slice(0,e)}var na=1e3;function Lo(t,e,n={},r){let a=n.limit!==void 0&&Number.isInteger(n.limit)&&n.limit>0?Math.min(n.limit,2e3):2e3,o={...n.matchCase===void 0?{}:{matchCase:n.matchCase},...n.wholeWord===void 0?{}:{wholeWord:n.wholeWord}},s=e.slice(0,na),l=s.map(()=>({matches:[],truncated:false})),d=s.map((m,f)=>chunk65XBN67F_cjs.pa(m)?f:-1);if(d=d.filter(m=>m>=0),d.length===0)return l;let p=n.stories==="body"?void 0:r;for(let m of ea(t,p)){let f=0;for(let g of chunkZOZI27AW_cjs.Vc(m.root)){if(g.kind!=="paragraph")continue;let c=f;f+=1;let y=chunkZOZI27AW_cjs.Tk(m.part,g.id)??"",x=chunk6UDJUI3W_cjs.d(g,y);if(x.text.length===0)continue;let O=null,S=false;for(let v of d){let b=l[v],I=a-b.matches.length,E=x.findOccurrences(s[v],Math.max(I,1),o);if(I===0&&E.matches.length>0){b.truncated=true,S=true;continue}for(let w of E.matches){let L=w.start+w.length;O??=Vr(g);let _=x.resultRunAddressAt(w.start),G=_?ta(O,_.runId,_.offset)??Bo(O,w.rawStart):Bo(O,w.rawStart);b.matches.push({blockId:g.id,start:w.rawStart,length:w.rawEnd-w.rawStart,paragraphIndex:c,runIndex:G.index,runOffset:G.offset,...m.scope?{scope:m.scope}:{},text:ct(x.displaySlice(w.start,L),256),contextBefore:ct(x.displaySlice(Math.max(0,w.start-Ae),w.start),Ae),contextAfter:ct(x.displaySlice(L,L+Ae),Ae)});}E.truncated&&(b.truncated=true,S=true);}if(S&&(d=d.filter(v=>!l[v].truncated)),d.length===0)return l}}return l}var oa=32;function _o(t){let e=null;return((n,r)=>{let a=t.revision(),o=typeof n!="string",s=`${r?.matchCase===true?"c":""}${r?.wholeWord===true?"w":""}`,l=`${r?.limit??""}:${r?.stories??"all"}`,d=JSON.stringify([s,l,n]);e?.revision!==a&&(e={revision:a,results:new Map});let p=e.results.get(d);if(p)return p;let m=t.bodyPart(),f=t.currentPackage(),g={footnote:new Set,endnote:new Set};for(let x of chunkZOZI27AW_cjs.rh(m))g[x.noteKind].add(x.noteId);let c=Lo(m,o?n:[n],r,{headerFooterBySection:t.headerFooterBySection(),footnotes:chunkZOZI27AW_cjs.qh(f,"footnote")??null,endnotes:chunkZOZI27AW_cjs.qh(f,"endnote")??null,referencedNoteIds:g}),y=o?c:c[0];return e.results.size>=oa&&e.results.delete(e.results.keys().next().value),e.results.set(d,y),y})}var ra=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"];function ce(t,e=null,n=null){return chunk65XBN67F_cjs.xa(t,e,n)}function Ho(t){let e=chunkZOZI27AW_cjs.Jd(t),n=[];for(let r of ra){let a=e.get(r);if(!a)return [];n.push({slot:r,hex:a});}return n}var jo=new WeakMap;function pt(t){let e=jo.get(t);if(e!==void 0)return e;let n=chunkZOZI27AW_cjs.Ab(t),r=n===null||!chunkZOZI27AW_cjs.zb(n)?null:n;return jo.set(t,r),r}var ut=class{#e;#t;constructor(e,n){this.#e=e,this.#t=n;}get size(){return this.#e.size}get(e){if(this.#e.has(e))return this.#t.find(n=>e.startsWith(`${n.name}#`))}has(e){return this.get(e)!==void 0}*entries(){for(let e of this.#e.keys()){let n=this.get(e);n&&(yield [e,n]);}}keys(){return this.#e.keys()}*values(){for(let[,e]of this.entries())yield e;}[Symbol.iterator](){return this.entries()}forEach(e,n){for(let[r,a]of this.entries())e.call(n,a,r,this);}};function zo(t,e){return Object.freeze({...t,partByNode:new ut(t.ordinalByNode,e)})}function $o(t){let e=new Map,n=new Map,r=new Map,a=new Set,o=new Map,s=new Map,l=0;for(let d of t)for(let p of B(d)){r.set(p.id,l),o.set(p.id,d),l+=1;let m=pt(p);if(m===null)continue;e.set(p.id,m);let f=m.toUpperCase(),g=s.get(f);g?(g.push(p.id),a.add(f)):(s.set(f,[p.id]),n.set(f,p.id));}return Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:r,ambiguousParaIds:a,partByNode:o,claimantsByParaId:s})}function Wo(t,e){let n=t.indexOf("#");if(n<=0)return null;let r=t.slice(0,n),a=e.body.name===r?e.body:void 0;a??=e.openStories.find(l=>l.name===r);let o=a?void 0:e.otherStories.find(l=>l.name===r);if(a??=o?e.normalize(o):void 0,!a)return null;let s=chunkZOZI27AW_cjs.Xa(a,t);return s?.kind==="paragraph"?pt(s):null}function ft(t){return t.historyToken??t.historyGroup}var Uo={committed:false,rejected:false,opCount:0};function z(t,e){return e===void 0?{committed:false,rejected:true,opCount:t}:{committed:false,rejected:true,opCount:t,reason:e}}function Yo(t,e,n={}){let r=e.filter(m=>m.ops.length>0),a=n.partOps??[],o=[...r,...a].reduce((m,f)=>m+f.ops.length,0);if(o===0)return n.packageEdits?.length?z(0,"invalidArgs"):Uo;if([...r,...a].some(m=>m.ops.some(chunkZOZI27AW_cjs._g))||[...r,...a].some(m=>m.ops.some(chunkZOZI27AW_cjs.hi)))return z(o,"invalidArgs");let[s,...l]=r,d=[];for(let m of l){let f=t.partFor(m.scope);if(!f)return z(o,"unknown-part");d.push({partName:f.name,ops:m.ops});}let p=t.transact(s?.scope??{kind:"body"},m=>{for(let f of n.packageEdits??[])m.applyPackage(f);for(let f of s?.ops??[])m.apply(f);for(let f of d)for(let g of f.ops)m.applyTo(f.partName,g);for(let f of a)for(let g of f.ops)m.applyTo(f.partName,g);},{...n,historyGroup:ft(n)});return p.ok?{committed:true,rejected:false,opCount:o}:z(o,p.reason)}function Go(t,e,n,r,a,o){let s=o.partOps??[],l=e.length+s.reduce((f,g)=>f+g.ops.length,0);if(l===0&&!o.packageEdits?.length)return Uo;if(s.some(f=>f.ops.some(g=>chunkZOZI27AW_cjs._g(g)||chunkZOZI27AW_cjs.hi(g))))return z(l,"invalidArgs");let d=e.filter(f=>chunkZOZI27AW_cjs._g(f)||chunkZOZI27AW_cjs.hi(f)).length;if(d>0){if(s.length||o.packageEdits?.length||d!==e.length||e.length!==1)return z(e.length,"invalidArgs");let f=t.applyLifecycleOp(e[0],{actorId:o.actorId,historyGroup:ft(o)});return f.ok?{committed:true,rejected:false,opCount:1}:z(1,f.detail??f.reason)}let p=o.recordsHistory===false&&o.actorId&&o.operationId?t.partFor(a)?.name:void 0,m=t.transact(a,f=>{n!==void 0&&f.selectionBefore(n),r!==void 0&&f.selectionAfter(r);for(let g of o.packageEdits??[])f.applyPackage(g);for(let g of e)f.apply(g);for(let g of s)for(let c of g.ops)f.applyTo(g.partName,c);p&&f.applyPackage(g=>chunkO324RB6R_cjs.a(g,p,e));},{...o,historyGroup:ft(o)});return m.ok?{committed:true,rejected:false,opCount:l}:z(l,m.reason)}var aa=Object.freeze([]);function sa(t,e={}){return ia(chunkZOZI27AW_cjs.Je(t),e)}function ia(t,e={}){if(!t.ok)return t;let n=t.package,r=n.parts.get(n.mainDocumentPart);if(!r)return {ok:false,reason:"no-main-document-tree",detail:n.mainDocumentPart};let a=chunkZOZI27AW_cjs.Ib(r),o=new chunk65XBN67F_cjs.Q(n,chunk65XBN67F_cjs.ra(n,a),e.contentLockPolicy?{contentLockPolicy:e.contentLockPolicy}:{}),s=null,l=null,d=null,p=null,m=null;o.subscribe(i=>{p=i,m=o.currentPackage();});let f=()=>o.bodyStore(),g=()=>o.currentPackage(),c=to(),y=Object.freeze({kind:"body"}),x=(i,u)=>{let h=u?.find(P=>P.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");if(!h)return;let k=chunkZOZI27AW_cjs.N(h);return k.mode==="Internal"&&k.target.ok?i.parts.get(k.target.partName):void 0},O=(i,u,h)=>{if(i.mainRelationships!==h||i.settingsPart!==x(u,h))return false;for(let k of i.resolution)for(let P of [k.headers,k.footers])for(let R of P.values())if(u.parts.get(R.partName)!==R.part)return false;return true},S=()=>{let i=g(),u=i.relationships.get(i.mainDocumentPart);if(s&&p&&m===i&&O(s,i,u)&&s.packageRevision===p.fromRevision&&o.packageRevision===p.toRevision&&p.story?.kind==="body"&&p.impact==="text-local"&&p.created.length===0&&p.deleted.length===0&&p.splitJoin.length===0&&(s={...s,packageRevision:o.packageRevision,pkg:i,mainRelationships:u,settingsPart:x(i,u)}),!s||s.packageRevision!==o.packageRevision||s.pkg!==i){let h=chunkZOZI27AW_cjs.mf(i);s={packageRevision:o.packageRevision,pkg:i,mainRelationships:u,settingsPart:x(i,u),resolution:h,parts:chunkZOZI27AW_cjs.lf(h)};}return s},v="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",b=null,I=()=>{let i=g(),u=(i.relationships.get(i.mainDocumentPart)??[]).find(P=>P.type===v),h;if(u){let P=chunkZOZI27AW_cjs.N(u);P.mode==="Internal"&&P.target.ok&&(h=i.parts.get(P.target.partName));}h??=i.parts.get("/word/styles.xml");let k=h?.root??null;return k!==b&&(b=k,me=null,K=null),b},E=null,w=null,L=()=>{let i=g();return E===i||(E=i,w=chunkZOZI27AW_cjs.gd(i)),w},_="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",G=null,Oe=null,J=()=>{let i=g();if(G===i)return Oe;G=i;let u=(i.relationships.get(i.mainDocumentPart)??[]).find(P=>P.type===_),h;if(u){let P=chunkZOZI27AW_cjs.N(u);P.mode==="Internal"&&P.target.ok&&(h=i.parts.get(P.target.partName));}h??=i.parts.get("/word/settings.xml");let k=h?.root??null;return k!==Oe&&(Oe=k,Se=null,me=null,K=null),Oe},Ko="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Xo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",mt=(i,u)=>{let h=g(),k=(h.relationships.get("/")??[]).find(R=>R.type===i),P;if(k){let R=chunkZOZI27AW_cjs.N(k);R.mode==="Internal"&&R.target.ok&&(P=h.parts.get(R.target.partName));}return P??h.parts.get(u)},gt=null,Fe=chunkZOZI27AW_cjs.Bi,Qo=()=>{let i=g();if(gt===i)return Fe;gt=i;let u=mt(Ko,"/docProps/core.xml"),h=mt(Xo,"/docProps/app.xml");return Fe=chunkZOZI27AW_cjs.Ci(u?.root??null,h?.root??null),Fe},Vo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",yt=null,Re=null,te=()=>{let i=g();if(yt===i)return Re;yt=i;let u=(i.relationships.get(i.mainDocumentPart)??[]).find(P=>P.type===Vo),h;if(u){let P=chunkZOZI27AW_cjs.N(u);P.mode==="Internal"&&P.target.ok&&(h=i.parts.get(P.target.partName));}h??=i.parts.get("/word/theme/theme1.xml");let k=h?.root??null;return k!==Re&&(Re=k,Se=null,Be=null,me=null,K=null),Re},qo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",ht=null,xt=()=>{let i=g(),u=(i.relationships.get(i.mainDocumentPart)??[]).find(P=>P.type===qo),h=u?chunkZOZI27AW_cjs.N(u):null;return (h?.mode==="Internal"&&h.target.ok?i.parts.get(h.target.partName):void 0)??i.parts.get("/word/fontTable.xml")},Zo=()=>(ht??=Object.freeze(chunkZOZI27AW_cjs.qf(g(),xt())),ht),ue=null,ne=null,pe=null,fe=null,me=null,Be=null,Se=null,kt=()=>{let i=[f().part.root],u=new Set;for(let h of $())u.has(h)||(u.add(h),i.push(h.root));return i},Le=()=>{let i=kt(),u=I();return u&&i.splice(1,0,u),i},K=null,ve=null,ge=null,oe=null,Pt=new WeakMap,be=null,Ot=i=>{let u=Pt.get(i);if(u)return u;let h=chunkZOZI27AW_cjs.Ib(i);return Pt.set(i,h),h},Rt=()=>{let i=o.packageRevision,u=o.openStoryToken();if(!oe||oe.revision!==i||oe.openStories!==u){let h=o.openStoryParts(),k=new Set(h.map(D=>D.name)),P=$().filter(D=>!k.has(D.name)).map(Ot),R=[f().part,...h,...P],T=oe,H=T!==null&&p!==null&&T.openStories===u&&T.revision===p.fromRevision&&i===p.toRevision&&p.impact==="text-local"&&p.created.length===0&&p.deleted.length===0&&p.splitJoin.length===0&&T.parts.length===R.length&&T.parts.every((D,X)=>D.name===R[X]?.name);oe={revision:i,openStories:u,parts:R,index:H&&T?zo(T.index,R):$o(R)};}return oe.index},St=mo(),er=()=>{let i=f().part.name,u=new Map;for(let h of [f().part,...$()])for(let[k,P]of chunk65XBN67F_cjs.ha(g(),h.name,i))u.set(k,P);return u},tr=()=>[f().part,...$()],$=()=>{let i=[],u=new Set;for(let k of S().parts)for(let P of [k.headers,k.footers])for(let R of P.values())u.has(R)||(u.add(R),i.push(R));let h=g();for(let k of ["footnote","endnote"]){let P=chunkZOZI27AW_cjs.qh(h,k);!P||u.has(P)||(u.add(P),i.push(P));}return i},vt={ok:true,session:{editable:B(f().part).length>0,paragraphIds:()=>B(f().part).map(i=>i.id),paragraphIdsIn(i=y){let u=o.partFor(i);return u?B(u).map(h=>h.id):[]},part:()=>f().part,partFor:i=>o.partFor(i),currentPackage:g,collaborationPort:i=>chunkO324RB6R_cjs.b(o,{documentId:i,interactive:true}),applyTreeOps(i,u,h,k=y,P={}){return Go(o,i,u,h,k,P)},applyTreeOpsAtomic(i,u={}){return Yo(o,i,u)},projectDoc:()=>Z(f().part),reconcile:i=>tt(i,f().part,p),lastCommitWasStructural:()=>p!==null&&(p.created.length>0||p.deleted.length>0||p.splitJoin.length>0||p.impact==="global"),applyPmDoc(i){let u=f(),h=et(u.part,i);if(!h.ok)return {committed:false,rejected:true,opCount:0,reason:h.reason};if(h.ops.length===0)return {committed:false,rejected:false,opCount:0};let k=o.transact(y,P=>{for(let R of h.ops)P.apply(R);});return k.ok?{committed:true,rejected:false,opCount:h.ops.length}:{committed:false,rejected:true,opCount:h.ops.length,reason:k.reason}},storyParts:tr,bodyText:()=>oo(f().part),storyText(i){let u=o.partFor(i);return u?B(u).map(h=>chunkZOZI27AW_cjs.Tk(u,h.id)??"").join(`
5
- `):null},revision:()=>f().revision,revisionFor:i=>o.revisionFor(i),packageRevision:()=>o.packageRevision,canUndo:()=>o.canUndo,canRedo:()=>o.canRedo,undo:()=>{let i=o.selectionForUndo();return o.undo()===null?null:i},redo:()=>{let i=o.selectionForRedo();return o.redo()===null?null:i},beginComposition:(i=y)=>{o.beginComposition(i);},endComposition:()=>o.endComposition(),subscribe(i){return o.subscribe(i)},save(){return c(g())},saveSteps(){return c.steps(g())},headerFooterParts:()=>{let i=S().parts;return i[i.length-1]??chunkZOZI27AW_cjs.of(g())},headerFooterPartsBySection:()=>S().parts,headerFooterResolutionBySection:()=>S().resolution,documentFonts(){return ue&&ue.revision===o.packageRevision||(ue={revision:o.packageRevision,fonts:So(Le(),ce(te(),J()))}),ue.fonts},symbolFontFamilies(){return pe&&pe.revision===o.packageRevision||(pe={revision:o.packageRevision,fonts:To(Le())}),pe.fonts},renderedFontFamilies(){let i=I();return ne&&ne.revision===o.packageRevision&&ne.styles===i||(ne={revision:o.packageRevision,styles:i,families:chunkXJYZVGQR_cjs.f(kt(),i,ce(te(),J()))}),ne.families},rendersText(){return fe&&fe.revision===o.packageRevision||(fe={revision:o.packageRevision,rendersText:No(Le())}),fe.rendersText},documentStyles(){let i=I(),u=te(),h=J();K??=chunkXJYZVGQR_cjs.d(i,ce(u,h));let k=K;return me??=Mo(i,P=>k(P)),me},stylesRoot:()=>I(),documentThemeFonts(){let i=te(),u=J();return Se??=ce(i,u,xt()?.root??null),Se},numberingRoot:()=>L(),settingsRoot:()=>J(),documentProperties:()=>Qo(),trackingSettings:()=>chunkZOZI27AW_cjs.yi(J()),documentThemeColors(){let i=te();return Be??=Ho(i),Be},effectiveRunDefaults(i,u){let h=I(),k=te(),P=J();K??=chunkXJYZVGQR_cjs.d(h,ce(k,P));let R=f();if(!ve||ve.revision!==R.revision){let T=new Map;for(let H of B(R.part))H.kind!=="textValue"&&T.set(H.id,dt(H)??null);ve={revision:R.revision,byId:T};}return K(ve.byId.get(i)??null,u)},documentOutline(){let i=f();return ge&&ge.revision===i.revision||(ge={revision:i.revision,outline:Do(i.part,I())}),ge.outline},findText:_o({revision:()=>o.packageRevision,bodyPart:()=>f().part,currentPackage:g,headerFooterBySection:()=>S().resolution}),embeddedFonts:Zo,paragraphAnchors:Rt,paraIdOf:i=>Wo(i,{body:f().part,openStories:o.openStoryParts(),otherStories:$(),normalize:Ot}),nodeIdOf:i=>Rt().nodeByParaId.get(i.toUpperCase())??null,relationshipTarget:(i,u=y)=>{let h=g(),k=o.partFor(u);return k?chunkZOZI27AW_cjs.Vg(h,k.name,i):null},bookmarks:()=>{let i=o.packageRevision;if(!be||be.revision!==i){let u=new Map(chunkZOZI27AW_cjs.wg(f().part));for(let h of $())for(let[k,P]of chunkZOZI27AW_cjs.wg(h))u.has(k)||u.set(k,P);be={revision:i,index:u};}return be.index},ensureHyperlinkRelationship(i,u=y){let h=o.partFor(u);return h?chunkZOZI27AW_cjs.Ra(o,()=>{let k=g(),P=chunkZOZI27AW_cjs.Ug(k,i,h.name);return P?(P.pkg!==k&&o.replacePackageShell(P.pkg),P.relationshipId):null},k=>k!==null):null},reviewItems(){let i=e.reviewModel;if(!i)return aa;let u=f(),h=`${o.packageRevision}:${u.revision}`;if(l&&l.revisionKey===h)return l.items;let k=g(),P=k.parts.get(chunk65XBN67F_cjs.Z(k,u.part.name)),R=k.parts.get(chunk65XBN67F_cjs._(k,u.part.name)),T={root:u.part.root,commentsPart:P,commentsExtendedPart:R,stylesPart:chunkZOZI27AW_cjs.fd(k),numberingRoot:L(),furnitureParts:$(),customNodePayloads:er()},{stylesPart:H,numberingRoot:D}=T,X=ko(i,k,T,l),bt=()=>St.get(T)??X.filtered(i.collectReviewItems({storyPart:u.part,furnitureParts:T.furnitureParts,stylesPart:T.stylesPart,commentsPart:P,commentsExtendedPart:R,customNodePayloads:T.customNodePayloads})),It={part:u.part,commentsPart:P,commentsExtendedPart:R,currentPackageRevision:o.packageRevision,currentPackage:k,changePackage:m},re,ye=null;if(l&&p&&X.sameFilter&&po(p,l,l.items,It))re=l.items;else {let ae=l&&p?fo(p,l,l.items,It):null,_e=ae&&l&&X.patchable(ae)?i.revisionItemsOfParagraph(u.part,ae):null;if(ae&&l&&_e&&ro(l.items,_e,ae,u.part)){ye=l.paragraphOrder??chunkZOZI27AW_cjs.qj(u.part);let Tt=ao(l.items,ye,ae,_e,X.filtered,u.part);Tt||(ye=chunkZOZI27AW_cjs.qj(u.part)),re=Tt??bt();}else ye=chunkZOZI27AW_cjs.qj(u.part),re=bt();}return St.set(T,re=X.publish(re)),l={revisionKey:h,bodyRevision:u.revision,packageRevision:o.packageRevision,items:re,paragraphOrder:ye,commentsPart:P,commentsExtendedPart:R,pkg:k,stylesPart:H,numberingRoot:D},l.items},hasReviewContent(){let i=o.packageRevision;if(!d||d.revision!==i){let u=chunkZOZI27AW_cjs.fd(g()),h=[f().part,...$(),...u?[u]:[]];d={revision:i,present:h.some(k=>nt(k.root)||chunkZOZI27AW_cjs.lk(k).length>0)};}return d.present},replyToComment(i,u,h,k,P,R=y,T,H={}){let D=chunk65XBN67F_cjs.$(o,{anchor:{paragraphId:u.paragraphId,start:u.start,end:u.end,...u.endParagraphId===void 0?{}:{endParagraphId:u.endParagraphId}},author:k,text:h,...P===void 0?{}:{date:P},...i===null?{}:{replyToCommentId:i},...T===void 0?{}:{actorId:T}},R,H.historyToken);return D.ok?D.commentId:null},setCommentResolved(i,u,h={}){return chunk65XBN67F_cjs.aa(o,i,u,h.historyToken).ok},deleteComment(i,u=y,h,k){return this.deleteComments([{commentId:i}],u,h,k)},deleteComments(i,u=y,h,k={}){return chunk65XBN67F_cjs.ba(o,i,u,h,k.historyToken)},insertCustomNode(i,u=y,h={}){return chunk65XBN67F_cjs.ja(o,i,u,h.historyToken)},removeCustomNode(i,u=y){return chunk65XBN67F_cjs.ka(o,i,u)},sweepCustomNodePayloads(i){return chunkZOZI27AW_cjs.Ra(o,()=>{let u=f(),h=chunk65XBN67F_cjs.ga(o.currentPackage(),u.part.name,i);return h.ok?h.removed.length===0?{ok:true,removed:[]}:(o.replacePackageShell(h.pkg),{ok:true,removed:h.removed}):{ok:false,reason:h.reason}},u=>u.ok&&u.removed.length>0)},ensureListDefinition(i){return chunkZOZI27AW_cjs.Ra(o,()=>{let u=chunkZOZI27AW_cjs.Ig(g(),i);return u?(o.replacePackageShell(u.pkg),E=null,w=null,u.numId):null},u=>u!==null)},ensureNumberingLevel(i,u,h){return chunkZOZI27AW_cjs.Ra(o,()=>{let k=g(),P=chunkZOZI27AW_cjs.Jg(k,i,u,h);return P?P!==k?(o.replacePackageShell(P),E=null,w=null,{ok:true,changed:true}):{ok:true,changed:false}:{ok:false,changed:false}},k=>k.changed).ok},insertImage(i,u){return o.insertImage(i,u)},replaceImage(i,u,h,k,P,R){return o.replaceImage(i,u,h,k,P,R)},deleteImage(i,u){return o.deleteImage(i,u)},deleteImageTracked(i,u,h){return o.deleteImageTracked(i,u,h)},applyImageProperties(i,u){return o.applyImageProperties(i,u)},applyFragmentPaste(i,u){return o.applyFragmentPaste(i,u)}}};return chunkZOZI27AW_cjs.Xl(vt.session,o),vt}var la=chunkZOZI27AW_cjs.g.projection;function ka(t,e,n){let r=t.filter(a=>a.localName!==e);return r.length!==t.length?r:[...r,n?{localName:e,attributes:n}:{localName:e}]}function Pa(t,e,n={}){let r=null,a=false,o=()=>n.onChange?.(s()),s=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:r}),l=c=>{a=true;let y=p.state.tr.replaceWith(0,p.state.doc.content.size,c.content);y.setMeta("addToHistory",false),p.dispatch(y),a=false;},d=c=>()=>(c()&&(l(e.projectDoc()),o()),true),p=new prosemirrorView.EditorView(t,{state:prosemirrorState.EditorState.create({doc:e.projectDoc(),plugins:[prosemirrorKeymap.keymap({...prosemirrorCommands.baseKeymap,Home:prosemirrorCommands.selectTextblockStart,End:prosemirrorCommands.selectTextblockEnd,"Mod-z":d(()=>e.undo()!==null),"Mod-y":d(()=>e.redo()!==null),"Shift-Mod-z":d(()=>e.redo()!==null),"Mod-b":(c,y)=>g(c,y,"b"),"Mod-i":(c,y)=>g(c,y,"i"),"Mod-u":(c,y)=>g(c,y,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:c=>(m(c),false),beforeinput:(c,y)=>{let x=y;if(c.composing)return false;m(c);let O=x.inputType;if(O==="insertText"&&x.data!=null){x.preventDefault();let{from:S,to:v}=c.state.selection;return c.dispatch(c.state.tr.insertText(x.data,S,v)),true}if(O==="deleteContentBackward"){x.preventDefault();let{from:S,empty:v}=c.state.selection;return v?S>0?c.dispatch(c.state.tr.delete(S-1,S)):prosemirrorCommands.joinBackward(c.state,c.dispatch):prosemirrorCommands.deleteSelection(c.state,c.dispatch),true}if(O==="deleteContentForward"){x.preventDefault();let{from:S,to:v,empty:b}=c.state.selection;return b?v<c.state.doc.content.size?c.dispatch(c.state.tr.delete(S,S+1)):prosemirrorCommands.joinForward(c.state,c.dispatch):prosemirrorCommands.deleteSelection(c.state,c.dispatch),true}return O==="insertParagraph"?(x.preventDefault(),prosemirrorCommands.splitBlock(c.state,c.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),o(),false)},dispatchTransaction(c){let y=p.state.apply(c);if(a||!c.docChanged){p.updateState(y);return}let x=e.applyPmDoc(y.doc);if(x.rejected){r=String(x.reason??"rejected"),p.updateState(y),l(e.projectDoc()),o();return}r=null,p.updateState(x.committed&&e.lastCommitWasStructural()?f(y):y),o();}});function m(c){if(c.composing||a)return;let y=c.dom.ownerDocument.getSelection(),x=y?.anchorNode,O=y?.focusNode;if(!(!y||!x||!O)&&!(!c.dom.contains(x)||!c.dom.contains(O)))try{let S=c.posAtDOM(x,y.anchorOffset),v=c.posAtDOM(O,y.focusOffset),b=c.state.selection;if(b.anchor===S&&b.head===v)return;let I=prosemirrorState.TextSelection.create(c.state.doc,S,v);c.dispatch(c.state.tr.setSelection(I).setMeta("addToHistory",!1));}catch{}}function f(c){let y=e.paragraphIds(),x=c.tr,O=false,S=0;return c.doc.forEach((v,b)=>{let I=y[S];S+=1,!(v.type.name!=="paragraph"||I===void 0)&&v.attrs.nodeId!==I&&(x=x.setNodeMarkup(b,void 0,{...v.attrs,nodeId:I}),O=true);}),O?c.apply(x.setMeta("addToHistory",false)):c}function g(c,y,x,O){let S=N.marks.runProps;if(!y)return true;let{from:v,to:b,empty:I}=c.selection;if(I)return true;let w=c.doc.resolve(v).marks().find(G=>G.type===S)?.attrs.props??[],L=ka(w,x,O),_=c.tr;return _.removeMark(v,b,S),L.length>0&&_.addMark(v,b,S.create({props:L})),y(_),true}return {view:p,state:s,undo:()=>d(()=>e.undo()!==null)(),redo:()=>d(()=>e.redo()!==null)(),toggleRunProperty(c,y){g(p.state,p.dispatch.bind(p),c,y);},destroy:()=>p.destroy()}}exports.a=N;exports.b=qe;exports.c=le;exports.d=B;exports.e=Z;exports.f=et;exports.g=hr;exports.h=tt;exports.i=dt;exports.j=Va;exports.k=Mr;exports.l=sa;exports.m=ia;exports.n=la;exports.o=Pa;