@docx-editor.dev/core 2.35.0 → 2.35.1-canary.20261106032727.sha-b131138
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.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +8 -8
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +12 -12
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-H0uSxdg3.d.ts → chrome-print-D77Z2MRQ.d.ts} +11 -11
- package/dist/{chunk-LMASPHYS.js → chunk-27XCGHXI.js} +1 -1
- package/dist/chunk-2JVOX642.cjs +236 -0
- package/dist/{chunk-2C75IWUN.cjs → chunk-462QYTNK.cjs} +1 -1
- package/dist/{chunk-JGE2O6IF.cjs → chunk-5QL7GBV2.cjs} +2 -2
- package/dist/{chunk-4NISR27M.cjs → chunk-7AFHVNPA.cjs} +13 -13
- package/dist/{chunk-6767S7UF.js → chunk-ASWUP7GU.js} +1 -1
- package/dist/{chunk-K2BBJDM7.js → chunk-CCM264XP.js} +1 -1
- package/dist/{chunk-NYZP5NM3.js → chunk-CORSCVCC.js} +1 -1
- package/dist/{chunk-Q5YVLUGG.js → chunk-FIT3HAWE.js} +1 -1
- package/dist/{chunk-SJV6WCTP.cjs → chunk-FTEXTGTC.cjs} +1 -1
- package/dist/{chunk-66ZAVRGB.js → chunk-GOXXQ2G3.js} +1 -1
- package/dist/{chunk-WWZWT26M.cjs → chunk-GP46C4QJ.cjs} +1 -1
- package/dist/{chunk-QDUMZYTX.js → chunk-I7C2C6IZ.js} +1 -1
- package/dist/chunk-KIDYIVZ5.js +236 -0
- package/dist/{chunk-6BZINLEN.cjs → chunk-Q3OARWRD.cjs} +1 -1
- package/dist/{chunk-QLANEOTJ.cjs → chunk-QHE5FKW3.cjs} +4 -4
- package/dist/{chunk-TMCMXIBT.js → chunk-R6SVC45W.js} +4 -4
- package/dist/{chunk-Y3JSN52G.cjs → chunk-RB55BB5N.cjs} +1 -1
- package/dist/{chunk-FLEFHRJG.cjs → chunk-RFM64DRG.cjs} +5 -5
- package/dist/{chunk-UAUB5YV6.js → chunk-RTOCN5IQ.js} +1 -1
- package/dist/{chunk-2V3V57SC.js → chunk-SCK44KXL.js} +1 -1
- package/dist/{chunk-5ZE7ROGP.js → chunk-STK3RNDU.js} +1 -1
- package/dist/{chunk-QALWAAPL.cjs → chunk-TRNTPFVY.cjs} +2 -2
- package/dist/{chunk-CBJMRC4L.cjs → chunk-TUSRTFEW.cjs} +1 -1
- package/dist/{chunk-FMSXJ22B.js → chunk-UMSQMNZU.js} +1 -1
- package/dist/{chunk-I4OZW2NO.js → chunk-V5NOTQ6L.js} +1 -1
- package/dist/{chunk-AVGSD7FB.js → chunk-XEGE36HF.js} +1 -1
- package/dist/{chunk-32YOHLEK.cjs → chunk-Y6FY46N6.cjs} +23 -23
- package/dist/{chunk-DSIDCA3V.cjs → chunk-YRJYEXVN.cjs} +4 -4
- package/dist/{chunk-TY5CE2JR.cjs → chunk-ZG6KPMLF.cjs} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +2 -2
- package/dist/contracts/document.d.ts +2 -2
- package/dist/contracts/editor.d.ts +8 -8
- package/dist/contracts/modules.d.ts +10 -10
- package/dist/contracts/types.d.ts +3 -3
- package/dist/{custom-node-writes-Cj0itq58.d.ts → custom-node-writes-BXn8hCVV.d.ts} +2 -2
- package/dist/{document-protection-CDLoYQI3.d.ts → document-protection-CfNgyZ4W.d.ts} +1 -1
- package/dist/{drawing-graphic-kind-8zt6pugF.d.ts → drawing-graphic-kind-C_kXByHh.d.ts} +2 -2
- package/dist/{drawing-preview-package-8o9LSfzP.d.ts → drawing-preview-package-W4jCeIW0.d.ts} +1 -1
- package/dist/{editor-CujQcn1z.d.ts → editor-CG4FJl_e.d.ts} +4 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.ts +25 -25
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +6 -6
- package/dist/export.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-ZjLRz_qa.d.ts → layout-shaping-Cxkd9f_f.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +17 -17
- package/dist/layout.js +1 -1
- package/dist/{note-properties-BRpskBeh.d.ts → note-properties-DvCg9hqk.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +10 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-GVVQQwCX.d.ts → protocol-BVr4_nzI.d.ts} +2 -2
- package/dist/{review-paragraph-order-aEHnQTt7.d.ts → review-paragraph-order-cFZfc4oS.d.ts} +1 -1
- package/dist/{revision-projection-vU_UiTLx.d.ts → revision-projection-BcWPdgFd.d.ts} +1 -1
- package/dist/{semantic-cell-selection-CaRIISu-.d.ts → semantic-cell-selection-CYS_l73g.d.ts} +2 -2
- package/dist/{semantic-interaction-LJtUJJS5.d.ts → semantic-interaction-DyXHZhFO.d.ts} +1 -1
- package/dist/{semantic-paint-2LBYlQcn.d.ts → semantic-paint-ChK1a0Qd.d.ts} +4 -4
- package/dist/{semantic-record-queries-C_YK2gCz.d.ts → semantic-record-queries-CYAipThi.d.ts} +1 -1
- package/dist/{semantic-records-AU2pIYRp.d.ts → semantic-records-D0NEAzyD.d.ts} +3 -3
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +12 -12
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-DmrePCMo.d.ts → tree-op-types-Ds9-dl3T.d.ts} +7 -1
- package/dist/{tree-package-fragment-DXZ2B7x0.d.ts → tree-package-fragment-Cya6ExyS.d.ts} +1 -1
- package/dist/{tree-session-contract-D3e-5YNq.d.ts → tree-session-contract-DiNorPOQ.d.ts} +4 -4
- package/dist/{unsupported-elements-9Pz4I_F6.d.ts → unsupported-elements-CJ33VvL9.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-DCILO4XD.cjs +0 -236
- package/dist/chunk-P3XUE72N.js +0 -236
package/dist/automation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkQHE5FKW3_cjs=require('./chunk-QHE5FKW3.cjs');require('./chunk-Q3OARWRD.cjs'),require('./chunk-Y6FY46N6.cjs'),require('./chunk-TUSRTFEW.cjs'),require('./chunk-GP46C4QJ.cjs'),require('./chunk-462QYTNK.cjs'),require('./chunk-TRNTPFVY.cjs'),require('./chunk-ZG6KPMLF.cjs'),require('./chunk-2JVOX642.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.m}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.l}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.n}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.k}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.v}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.E}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.F}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.t}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.G}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.w}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.I}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.H}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.z}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.L}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.M}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.K}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.y}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.p}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.o}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.A}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.r}});Object.defineProperty(exports,"reviewCodeOfSkip",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.C}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.D}});Object.defineProperty(exports,"reviewSkipOfReason",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.J}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.B}});
|
package/dist/automation.d.ts
CHANGED
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-
|
|
15
|
-
export { c as AutomationAlignment, d as AutomationAuthoringOperation, e as AutomationBatchRequest, f as AutomationBatchResponse, g as AutomationChangeEvent, h as AutomationContentControlLock, i as AutomationContentControlRangeLocation, j as AutomationContentControlScope, k as AutomationContentControlSubtype, l as AutomationContentControlValue, m as AutomationCustomNodePayload, n as AutomationEndpoint, o as AutomationError, p as AutomationErrorCode, q as AutomationFontRead, r as AutomationFontWrite, s as AutomationHandle, t as AutomationHandleRef, u as AutomationInlinePictureRead, v as AutomationInlinePictureWrite, w as AutomationListBullet, x as AutomationListLevelFormat, y as AutomationListNumbering, z as AutomationObjectKind, B as AutomationOperationKind, C as AutomationOperationResult, D as AutomationPageOrientation, E as AutomationPageSetupRead, F as AutomationPageSetupWrite, G as AutomationParagraphFormatRead, H as AutomationParagraphFormatWrite, I as AutomationParagraphRef, J as AutomationPoint, K as AutomationReadingOrder, L as AutomationSaveResult, M as AutomationSearchOptions, N as AutomationSelectionMode, O as AutomationShapeRead, P as AutomationShapeType, Q as AutomationSpan, R as AutomationSpanRef, S as AutomationStyleKind, T as AutomationStyleRead, U as AutomationTextProjection, V as AutomationUnsubscribe, W as AutomationValue } from './protocol-
|
|
16
|
-
import { H as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-fragment-
|
|
17
|
-
import { aP as OoxmlPackageLimits, b as CompareDocumentsEngine, aQ as OoxmlPackageRejection } from './tree-op-types-
|
|
18
|
-
export { aR as AutomationTableMutation, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, n as CompareDocumentsRefusalReason, a4 as RevisionAuthorEntry, a5 as RevisionAuthorResult, a6 as RevisionAuthorSkipReason, a7 as RevisionBatchEntry, a8 as RevisionBatchResult, a9 as RevisionBatchSkipDetail, aa as RevisionBatchSkipReason, ab as RevisionSiteRefusal } from './tree-op-types-
|
|
19
|
-
import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-
|
|
20
|
-
import { H as HeadlessDocumentView } from './drawing-graphic-kind-
|
|
14
|
+
import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-BVr4_nzI.js';
|
|
15
|
+
export { c as AutomationAlignment, d as AutomationAuthoringOperation, e as AutomationBatchRequest, f as AutomationBatchResponse, g as AutomationChangeEvent, h as AutomationContentControlLock, i as AutomationContentControlRangeLocation, j as AutomationContentControlScope, k as AutomationContentControlSubtype, l as AutomationContentControlValue, m as AutomationCustomNodePayload, n as AutomationEndpoint, o as AutomationError, p as AutomationErrorCode, q as AutomationFontRead, r as AutomationFontWrite, s as AutomationHandle, t as AutomationHandleRef, u as AutomationInlinePictureRead, v as AutomationInlinePictureWrite, w as AutomationListBullet, x as AutomationListLevelFormat, y as AutomationListNumbering, z as AutomationObjectKind, B as AutomationOperationKind, C as AutomationOperationResult, D as AutomationPageOrientation, E as AutomationPageSetupRead, F as AutomationPageSetupWrite, G as AutomationParagraphFormatRead, H as AutomationParagraphFormatWrite, I as AutomationParagraphRef, J as AutomationPoint, K as AutomationReadingOrder, L as AutomationSaveResult, M as AutomationSearchOptions, N as AutomationSelectionMode, O as AutomationShapeRead, P as AutomationShapeType, Q as AutomationSpan, R as AutomationSpanRef, S as AutomationStyleKind, T as AutomationStyleRead, U as AutomationTextProjection, V as AutomationUnsubscribe, W as AutomationValue } from './protocol-BVr4_nzI.js';
|
|
16
|
+
import { H as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-fragment-Cya6ExyS.js';
|
|
17
|
+
import { aP as OoxmlPackageLimits, b as CompareDocumentsEngine, aQ as OoxmlPackageRejection } from './tree-op-types-Ds9-dl3T.js';
|
|
18
|
+
export { aR as AutomationTableMutation, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, n as CompareDocumentsRefusalReason, a4 as RevisionAuthorEntry, a5 as RevisionAuthorResult, a6 as RevisionAuthorSkipReason, a7 as RevisionBatchEntry, a8 as RevisionBatchResult, a9 as RevisionBatchSkipDetail, aa as RevisionBatchSkipReason, ab as RevisionSiteRefusal } from './tree-op-types-Ds9-dl3T.js';
|
|
19
|
+
import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-D0NEAzyD.js';
|
|
20
|
+
import { H as HeadlessDocumentView } from './drawing-graphic-kind-C_kXByHh.js';
|
|
21
21
|
import { CollaborationModuleContribution } from './collaboration.js';
|
|
22
22
|
export { D as DiagnosticEmitter, a as DiagnosticPayload, b as byteSizeBucket, c as countBucket, e as createDiagnosticEmitter, f as diagnosticCause, d as diagnosticCauses, g as diagnosticErrorName, h as documentPartKind, i as exceptionCause, o as openDiagnosticCode, r as reviewCodeOfSkip, j as reviewDiagnosticCode, k as reviewSkipOfReason, s as storeEditDiagnosticCode } from './diagnostic-context-CkZKkKvB.js';
|
|
23
23
|
export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, a as CountBucket, b as CustomNodeDiagnosticCode, D as DiagnosticCode, c as DiagnosticErrorName, d as DiagnosticExplanation, e as DocumentOpenDiagnosticCode, f as DocumentPartKind, g as DocumentSaveDiagnosticCode, E as EditDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, j as ReviewChangeKind, R as ReviewDiagnosticCode, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-BTyb8yzX.js';
|
|
24
24
|
export { c as HistoryGroup, H as HistoryGroupOutcome } from './editor-scope-CA6egMaK.js';
|
|
25
|
-
import './revision-projection-
|
|
25
|
+
import './revision-projection-BcWPdgFd.js';
|
|
26
26
|
import './collaboration/replication.js';
|
|
27
27
|
import './failure-6KGFrDO9.js';
|
|
28
28
|
|
package/dist/automation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{m as AUTOMATION_COMMAND_OPERATIONS,l as AUTOMATION_QUERY_OPERATIONS,n as AUTOMATION_SOLITARY_OPERATIONS,k as HEADER_FOOTER_VARIANTS,v as SERVER_AUTOMATION_CAPABILITIES,E as byteSizeBucket,F as countBucket,t as createAutomationPaginationProvider,G as createDiagnosticEmitter,w as createServerAutomationHost,I as diagnosticCause,H as diagnosticCauses,z as diagnosticCodes,L as diagnosticErrorName,M as documentPartKind,K as exceptionCause,y as explainDiagnostic,p as isAutomationCommand,o as isSolitaryAutomationCommand,A as openDiagnosticCode,r as paginationSnapshotOf,C as reviewCodeOfSkip,D as reviewDiagnosticCode,J as reviewSkipOfReason,B as storeEditDiagnosticCode}from'./chunk-
|
|
1
|
+
export{m as AUTOMATION_COMMAND_OPERATIONS,l as AUTOMATION_QUERY_OPERATIONS,n as AUTOMATION_SOLITARY_OPERATIONS,k as HEADER_FOOTER_VARIANTS,v as SERVER_AUTOMATION_CAPABILITIES,E as byteSizeBucket,F as countBucket,t as createAutomationPaginationProvider,G as createDiagnosticEmitter,w as createServerAutomationHost,I as diagnosticCause,H as diagnosticCauses,z as diagnosticCodes,L as diagnosticErrorName,M as documentPartKind,K as exceptionCause,y as explainDiagnostic,p as isAutomationCommand,o as isSolitaryAutomationCommand,A as openDiagnosticCode,r as paginationSnapshotOf,C as reviewCodeOfSkip,D as reviewDiagnosticCode,J as reviewSkipOfReason,B as storeEditDiagnosticCode}from'./chunk-RTOCN5IQ.js';import'./chunk-27XCGHXI.js';import'./chunk-CCM264XP.js';import'./chunk-FIT3HAWE.js';import'./chunk-ASWUP7GU.js';import'./chunk-GOXXQ2G3.js';import'./chunk-CORSCVCC.js';import'./chunk-V5NOTQ6L.js';import'./chunk-KIDYIVZ5.js';
|
package/dist/binding.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkRFM64DRG_cjs=require('./chunk-RFM64DRG.cjs');require('./chunk-FTEXTGTC.cjs'),require('./chunk-TUSRTFEW.cjs'),require('./chunk-GP46C4QJ.cjs'),require('./chunk-462QYTNK.cjs'),require('./chunk-TRNTPFVY.cjs'),require('./chunk-ZG6KPMLF.cjs'),require('./chunk-2JVOX642.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.o}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.p}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.m}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkRFM64DRG_cjs.e}});
|
package/dist/binding.d.ts
CHANGED
|
@@ -9,28 +9,28 @@
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
import { Node, Schema } from 'prosemirror-model';
|
|
12
|
-
import { aS as OoxmlProperty, aT as OoxmlPackageResult, aQ as OoxmlPackageRejection } from './tree-op-types-
|
|
13
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
14
|
-
export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-
|
|
15
|
-
import { C as ContentLockPolicy } from './tree-package-fragment-
|
|
16
|
-
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-
|
|
12
|
+
import { aS as OoxmlProperty, aT as OoxmlPackageResult, aQ as OoxmlPackageRejection } from './tree-op-types-Ds9-dl3T.js';
|
|
13
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DiNorPOQ.js';
|
|
14
|
+
export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-DiNorPOQ.js';
|
|
15
|
+
import { C as ContentLockPolicy } from './tree-package-fragment-Cya6ExyS.js';
|
|
16
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-Cya6ExyS.js';
|
|
17
17
|
import { ReviewModuleContribution } from './contracts/modules.js';
|
|
18
18
|
import { EditorView } from 'prosemirror-view';
|
|
19
19
|
import './editor-scope-CA6egMaK.js';
|
|
20
|
-
import './custom-node-writes-
|
|
21
|
-
import './drawing-graphic-kind-
|
|
20
|
+
import './custom-node-writes-BXn8hCVV.js';
|
|
21
|
+
import './drawing-graphic-kind-C_kXByHh.js';
|
|
22
22
|
import './collaboration/replication.js';
|
|
23
|
-
import './revision-projection-
|
|
23
|
+
import './revision-projection-BcWPdgFd.js';
|
|
24
24
|
import './contracts/types.js';
|
|
25
25
|
import './failure-6KGFrDO9.js';
|
|
26
|
-
import './document-protection-
|
|
27
|
-
import './editor-
|
|
26
|
+
import './document-protection-CfNgyZ4W.js';
|
|
27
|
+
import './editor-CG4FJl_e.js';
|
|
28
28
|
import './editor-fonts-D_-vjuJi.js';
|
|
29
29
|
import './diagnostic-hints-BTyb8yzX.js';
|
|
30
30
|
import './contracts/document.js';
|
|
31
31
|
import './contracts/interaction.js';
|
|
32
|
-
import './semantic-interaction-
|
|
33
|
-
import './semantic-records-
|
|
32
|
+
import './semantic-interaction-DyXHZhFO.js';
|
|
33
|
+
import './semantic-records-D0NEAzyD.js';
|
|
34
34
|
import './collaboration.js';
|
|
35
35
|
|
|
36
36
|
/** Attributes carried by a projected paragraph. */
|
package/dist/binding.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{o as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,p as mountTreeSurface,m as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-
|
|
1
|
+
export{o as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,p as mountTreeSurface,m as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-XEGE36HF.js';import'./chunk-I7C2C6IZ.js';import'./chunk-FIT3HAWE.js';import'./chunk-ASWUP7GU.js';import'./chunk-GOXXQ2G3.js';import'./chunk-CORSCVCC.js';import'./chunk-V5NOTQ6L.js';import'./chunk-KIDYIVZ5.js';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { d as FontOrigin, M as MarkedFontResolver, c as FontConfigurationFragment, g as FontResolver, f as FontResolutionRequest } from './font-resolver-Bm9XqTNO.js';
|
|
2
2
|
import { F as FontConfiguration, a as FontFaceRequest, b as FontSource } from './editor-fonts-D_-vjuJi.js';
|
|
3
|
-
import { aO as TreeDocOp, bn as TextFormFieldRange, bo as TextFormFieldOptions, aw as ImageDecodePort, aH as Unsubscribe, ao as CompareDocumentsChromeHandlers, E as ExecResult, at as DrawingPositionInput, bh as DrawingTransform, a3 as ParagraphTabStop, Z as IndentFormatting, a2 as ParagraphFlags, a1 as ParagraphDisagreements, b9 as DrawingTreeDocOp, aG as SupportedImageMime, aF as SelectionPin, r as OoxmlPackage, x as ReviewRevisionKind, a$ as PackageWatermarkWrite, az as ImageWrapTarget } from './tree-op-types-
|
|
3
|
+
import { aO as TreeDocOp, bn as TextFormFieldRange, bo as TextFormFieldOptions, aw as ImageDecodePort, aH as Unsubscribe, ao as CompareDocumentsChromeHandlers, E as ExecResult, at as DrawingPositionInput, bh as DrawingTransform, a3 as ParagraphTabStop, Z as IndentFormatting, a2 as ParagraphFlags, a1 as ParagraphDisagreements, b9 as DrawingTreeDocOp, aG as SupportedImageMime, aF as SelectionPin, r as OoxmlPackage, x as ReviewRevisionKind, a$ as PackageWatermarkWrite, az as ImageWrapTarget } from './tree-op-types-Ds9-dl3T.js';
|
|
4
4
|
import { V as ViewScope, a as EditorExecOptions } from './editor-scope-CA6egMaK.js';
|
|
5
|
-
import { aJ as TableInteractionLabelKey, e as BookmarkStory, u as DocumentSource, aR as ZoomMode, J as EditorFontError, x as Editor, b as EditorCommand, C as CanResult, ax as SelectedImageState, _ as FormatPainterSurfaceState, f as BookmarkSummary, av as ScrollPlacement, aP as TrackedChangePredicate, aO as TrackedChangeFilterMode, a9 as ImageContext, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aI as TableContext, W as EditorSnapshot } from './editor-
|
|
6
|
-
import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions, g as RevisionMarkupChromeHandlers } from './revision-projection-
|
|
7
|
-
import { T as TextMeasurer, i as UnsupportedElementRule, S as SemanticLayout, C as ContentControlBoundaryRecord, t as SectionProperties } from './semantic-records-
|
|
8
|
-
import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-fragment-
|
|
5
|
+
import { aJ as TableInteractionLabelKey, e as BookmarkStory, u as DocumentSource, aR as ZoomMode, J as EditorFontError, x as Editor, b as EditorCommand, C as CanResult, ax as SelectedImageState, _ as FormatPainterSurfaceState, f as BookmarkSummary, av as ScrollPlacement, aP as TrackedChangePredicate, aO as TrackedChangeFilterMode, a9 as ImageContext, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aI as TableContext, W as EditorSnapshot } from './editor-CG4FJl_e.js';
|
|
6
|
+
import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions, g as RevisionMarkupChromeHandlers } from './revision-projection-BcWPdgFd.js';
|
|
7
|
+
import { T as TextMeasurer, i as UnsupportedElementRule, S as SemanticLayout, C as ContentControlBoundaryRecord, t as SectionProperties } from './semantic-records-D0NEAzyD.js';
|
|
8
|
+
import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-fragment-Cya6ExyS.js';
|
|
9
9
|
import { ReviewPaneOptions } from './contracts/types.js';
|
|
10
10
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
11
11
|
import { CollaborationModuleContribution, EditorCollaborationSession, CollaborationRemoteSelection } from './collaboration.js';
|
|
12
|
-
import { F as FieldShadingMode, c as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, b as RevisionAuthorStyle } from './semantic-paint-
|
|
12
|
+
import { F as FieldShadingMode, c as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, b as RevisionAuthorStyle } from './semantic-paint-ChK1a0Qd.js';
|
|
13
13
|
import { ReviewModuleContribution, EditorModule } from './contracts/modules.js';
|
|
14
|
-
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-
|
|
15
|
-
import { C as CellSelection } from './semantic-cell-selection-
|
|
16
|
-
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-
|
|
17
|
-
import { B as BookmarkIndex } from './custom-node-writes-
|
|
18
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
14
|
+
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-DyXHZhFO.js';
|
|
15
|
+
import { C as CellSelection } from './semantic-cell-selection-CYS_l73g.js';
|
|
16
|
+
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-DvCg9hqk.js';
|
|
17
|
+
import { B as BookmarkIndex } from './custom-node-writes-BXn8hCVV.js';
|
|
18
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DiNorPOQ.js';
|
|
19
19
|
import { a as CollaborationStatus } from './failure-6KGFrDO9.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {M as M$1,Yf,Pf,Dg,ib,mb,ta,if as _if,Cf,Rf,Af,kd,Zf,lf,Md,od,nb,oe,Sf,Bg,Of as Of$1,lb,xd,Xf,Qa,Kf,zb,wd,nf,Oa,Ra,Na,Ia,Ya,Ge,uf,jf as jf$1,Kd,pd,_c,pf,Re as Re$1,af,cf,sf,bf}from'./chunk-K2BBJDM7.js';import {a,c}from'./chunk-6767S7UF.js';import {Ba,$,aa}from'./chunk-NYZP5NM3.js';import {Tf,vd,ud,gm,q,Of,ll,eb,fb,Ol,Ug,rl,pj,tf,jf,pa,Yb,Zl,$l,Hi,qb,Re,da as da$1,pb,ob,Ve,Xe,Pe,Qe,Ue,ce,ee,Ja,Nl,Ei,fm,Rj,bm,Pl,Ea}from'./chunk-P3XUE72N.js';import {zlibSync}from'fflate';var Hr=Object.freeze({}),$r=Object.freeze([]);function Gr(e){let t=Object.keys(e);if(t.length===0)return Hr;let n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=o);}return Object.freeze(n)}function Yr(e){let t=new Map(Hi(e.part())),n=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!n.has(i)){n.add(i);for(let[s,c]of Hi(i))t.has(s)||t.set(s,c);}let r=e.currentPackage();for(let o of ["footnote","endnote"]){let a=pj(r,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of Hi(a))t.has(i)||t.set(i,s);}}return t}function Xr(e,t){let n=Re$1(e,t);if(!n)return null;let r=e.pages[n.pageIndex];if(!r)return null;let o=af(r),a=cf(e,t.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function qr(e,t){let n=[];for(let r of t.values()){let o=Xr(e,r);o&&n.push(o);}return n.length===0?$r:Object.freeze(n)}function Zt(e,t){return {documentMetadata:Gr(e.documentProperties()),destinations:qr(t,Yr(e))}}function ro(e,t){let n=e.destinations;if(n){for(let r of n)if(r.anchor.name===t)return r}}function er(e,t){let n=e[t];if(!Array.isArray(n)||n.length===0)return null;let r=Number(n[0]);return Number.isSafeInteger(r)&&r>0?r:null}var Qr={1:1,2:1,3:2,4:4,5:8,6:1,7:1,8:2,9:4,10:8,11:4,12:8,13:4},Jr=new Set([330,34665,34853,37500,50740,61440]);function Zr(e){if(e.length<8)return false;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=String.fromCharCode(e[0],e[1]);if(n!=="II"&&n!=="MM")return false;let r=n==="II";if(t.getUint16(2,r)!==42)return false;let o=t.getUint32(4,r);if(o<8||o+2>e.length)return false;let a=t.getUint16(o,r),i=o+2+a*12;if(i+4>e.length)return false;t.setUint32(i,0,r);for(let s=0;s<a;s+=1){let c=o+2+s*12;Jr.has(t.getUint16(c,r))&&t.setUint16(c,0,r);let d=Qr[t.getUint16(c+2,r)];if(d===void 0)continue;let u=t.getUint32(c+4,r)*d;u>4&&t.getUint32(c+8,r)+u>e.length&&t.setUint32(c+4,0,r);}return true}async function tr(e,t){let n=e.slice();if(!Zr(n))return null;let r=n.buffer,o=await import('utif2'),a=o.default??o,i=a.decode(r)[0];if(!i)return null;let s=er(i,"t256"),c=er(i,"t257");if(s===null||c===null||s>t.maxDimension||c>t.maxDimension||s>t.maxPixels/c)return null;let d=s*c;if(d*4>t.maxDecodedBytes||(a.decodeImage(r,i),i.width!==s||i.height!==c))return null;let u=a.toRGBA8(i);return u.length!==d*4?null:Object.freeze({rgba:u,pixelWidth:s,pixelHeight:c})}var me=null;function tn(e){if(!me){me=new Uint32Array(256);for(let n=0;n<256;n+=1){let r=n;for(let o=0;o<8;o+=1)r=r&1?3988292384^r>>>1:r>>>1;me[n]=r>>>0;}}let t=4294967295;for(let n of e)t=me[(t^n)&255]^t>>>8;return (t^4294967295)>>>0}function Oe(e,t){let n=new Uint8Array(12+t.length),r=new DataView(n.buffer);r.setUint32(0,t.length);for(let o=0;o<4;o+=1)n[4+o]=e.charCodeAt(o);return n.set(t,8),r.setUint32(8+t.length,tn(n.subarray(4,8+t.length))),n}function rn(e){let t=true;for(let n=0;n<e.length;n+=4){let r=e[n];if(e[n+3]!==255||e[n+1]!==r||e[n+2]!==r)return "rgba";r!==0&&r!==255&&(t=false);}return t?"bilevel":"grey"}function nn(e,t,n,r){let o=r==="bilevel"?Math.ceil(t/8):r==="grey"?t:t*4,a=new Uint8Array((o+1)*n);for(let i=0;i<n;i+=1){let s=i*(o+1)+1,c=i*t*4;if(r==="rgba")a.set(e.subarray(c,c+t*4),s);else if(r==="grey")for(let d=0;d<t;d+=1)a[s+d]=e[c+d*4];else for(let d=0;d<t;d+=1)e[c+d*4]===255&&(a[s+(d>>3)]|=128>>(d&7));}return r==="rgba"?{raw:a,depth:8,colour:6}:{raw:a,depth:r==="bilevel"?1:8,colour:0}}function rr(e,t,n){let{raw:r,depth:o,colour:a}=nn(e,t,n,rn(e)),i=new Uint8Array(13),s=new DataView(i.buffer);s.setUint32(0,t),s.setUint32(4,n),i[8]=o,i[9]=a;let c=[new Uint8Array([137,80,78,71,13,10,26,10]),Oe("IHDR",i),Oe("IDAT",zlibSync(r,{level:6})),Oe("IEND",new Uint8Array(0))],d=new Uint8Array(c.reduce((l,g)=>l+g.length,0)),u=0;for(let l of c)d.set(l,u),u+=l.length;return d}async function on(e,t,n){if(t!=="image/tiff")return null;let r=await tr(e,n);if(!r)return null;let o=rr(r.rgba,r.pixelWidth,r.pixelHeight);return Object.freeze({bytes:o,mime:"image/png"})}function nr(e={}){return Object.freeze({async decode(t,n,r){let o=Tf(t,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>r.maxDimension||o.pixelHeight>r.maxDimension||o.pixelWidth>r.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},convertPreserved:e.convertPreserved??on})}var or=new WeakMap;function ar(e,t){let n=or.get(e);n||(n=Af(e),or.set(e,n));let r=n.styleCascade(),o=new Set;if(t===e.part())for(let c of uf(t,void 0,void 0,r,n.numberingIndex()))for(let d of jf$1(c)?.slice(0,-1)??[])o.add(d.paragraph.id);let a=c=>{if(c.kind==="textValue")return false;let d=c.children.find(l=>l.kind!=="textValue"&&l.namespaceUri===pa&&l.localName==="pPr"),u=d?.kind!=="textValue"?d?.children.find(l=>l.kind!=="textValue"&&l.namespaceUri===pa&&l.localName==="rPr"):void 0;return u!==void 0&&Ea(u,"vanish")},i=0,s=(c,d)=>{if(++i>Re||d>da$1||c.kind==="textValue")return false;if(c.kind==="paragraph"&&!o.has(c.id)&&(sf(c,r,false)||a(c))&&Ei(c).length>0)return true;for(let u of c.children){if(i>=Re)break;if(s(u,d+1))return true}return false};return s(t.root,0)}var ir=new WeakMap,an=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function sn(e,t){let n=ir.get(e.root);if(n&&n.stylesPart===t)return n.codes;let r=new Set,o=[{node:e.root,scope:qb(),depth:0,mcSelected:false}],a=0;for(;o.length;){let{node:s,scope:c,depth:d,mcSelected:u}=o.pop();if(++a>Re||d>da$1){r.add("scan-limit");break}if(s.kind==="textValue")continue;if(a+o.length+s.children.length>Re){r.add("scan-limit");break}let l=pb(c,s),g=ob(s)?s:void 0;if(g){if(Ve(g,l).drawing)continue;let f=Xe(g,{ownerPartName:e.name,namespaceScope:l,supportedMcRequires:Qe,limits:Pe});if(f){let y=f.textboxStory?.content;y&&o.push({node:y,scope:l,depth:d+1,mcSelected:false});continue}let h=Ue(g,l);h.refused&&r.add("scan-limit"),h.branch&&o.push({node:h.branch,scope:l,depth:d+1,mcSelected:true});continue}if(!u&&ce(s)){let f=ee(s,e.name)?.textboxStory?.content;f&&o.push({node:f,scope:l,depth:d+1,mcSelected:u});continue}if(s.namespaceUri==="urn:schemas-microsoft-com:vml"&&s.localName==="textbox"){r.add("legacy-textbox");continue}s.namespaceUri==="urn:schemas-microsoft-com:vml"&&an.has(s.localName)&&!s.children.some(f=>f.kind!=="textValue"&&f.namespaceUri==="urn:schemas-microsoft-com:vml"&&f.localName==="textbox")&&r.add("legacy-drawing");for(let f of s.children)o.push({node:f,scope:l,depth:d+1,mcSelected:u});}let i=Object.freeze([...r]);return ir.set(e.root,{stylesPart:t,codes:i}),i}function sr(e){let t=new Set([e.part()]);for(let n of e.headerFooterPartsBySection())for(let r of [n.headers,n.footers])for(let o of r.values())t.add(o);for(let n of ["footnote","endnote"]){let r=pj(e.currentPackage(),n);r&&t.add(r);}return Object.freeze([...t].flatMap(n=>[...sn(n,ud(e.currentPackage())),...ar(e,n)?["unsupported-style-separator"]:[]].map(r=>Object.freeze({code:r,partName:n.name}))))}function cr(e){return Ug(e.fieldResults,()=>Xf(cn(e)))}function cn(e){return Yf(e.fieldResults,dn(e))}function*dn(e){let t=e.defaultTabStopPt?.(),n=e.view.part().name,r={view:e.view,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,compatibilityMode:e.compatibilityMode?.(),inlineDrawingLayoutForPart:e.inlineDrawingLayoutForPart,drawingTokenForParagraphForPart:e.drawingTokenForParagraphForPart,drawingLayoutEpochForPart:e.drawingLayoutEpochForPart,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},o=Pf(r),a={view:e.view,revision:e.revision,measurer:e.measurer,cache:e.cache,session:e.session,producer:e.producer,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,furniture:e.furniture,compatibilityMode:e.compatibilityMode,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,fieldResults:e.fieldResults,inlineDrawingLayout:e.inlineDrawingLayout,drawingTokenForParagraph:e.drawingTokenForParagraph,drawingLayoutEpoch:e.drawingLayoutEpoch,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,bodyBlockLimit:e.bodyBlockLimit},i={measurer:a.measurer,cache:a.cache,session:a.session,producer:a.producer,styleCascade:a.styleCascade?.(),defaultTabStopPt:a.defaultTabStopPt,compatibilityMode:a.compatibilityMode?.(),numberingIndex:a.numberingIndex?.(),sectionFurniture:a.furniture.sectionFurniture(),furniture:a.furniture.furniture(),evenAndOddHeaders:a.view.headerFooterPartsBySection()[0]?.evenAndOddHeaders===true,projectLink:a.linkProjectors.projectLink,projectFieldLink:a.projectFieldLink,showFieldCodes:a.showFieldCodes,fieldResults:a.fieldResults,documentProperties:a.view.documentProperties(),inlineDrawingLayout:a.inlineDrawingLayout,drawingTokenForParagraph:a.drawingTokenForParagraph,drawingLayoutEpoch:a.drawingLayoutEpoch,projectionTokenForParagraph:s=>a.linkProjectors.tokenForParagraphForPart(n,s),projectionTokenForTable:s=>a.linkProjectors.tokenForTableForPart(n,s),projectionEpoch:a.linkProjectors.epochForPart(n),notes:o,displayMode:a.displayMode,revisionAuthorFilter:a.revisionAuthorFilter,bodyBlockLimit:a.bodyBlockLimit};return yield*Dg(a.view.part(),a.revision,i)}var ln=65536;function ur(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function un(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function pn(e,t,n){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===n:true}function mn(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let n=null;return Na(e,r=>{if(n||!pn(t,r.story,r.noteScopeId))return;let o=r.story==="header"||r.story==="footer"?a=>Ia(a,r.origin,{x:e.box.x,y:e.box.y}):void 0;Ra(r.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(c=>c.drawingNodeId);un(s,t.textboxPath)&&(n=ur(e,i.storyOrigin));},r.origin,o);}),n}function fn(e,t){if(t.story==="textbox")return mn(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?bf(e,e.header.box):{x:0,y:0};case "footer":return e.footer?bf(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let r=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return r?bf(e,r.box):{x:0,y:0}}case "note-separator":{let n=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes,r=n?.separator?.box;return n?.continuationNotice&&Ra(n.continuationNotice,o=>{o.paragraphId===t.source.start.paragraphId&&(r=n.continuationNotice.box);}),r?bf(e,r):{x:0,y:0}}default:return {x:0,y:0}}}function pr(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function mr(e,t){let n=af(e);return Object.freeze({x:n.x+t.x,y:n.y+t.y,width:t.width,height:t.height})}function yn(e,t){let n=Re$1(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!n||n.pageIndex!==t.pageIndex)return;let r=e.pages[n.pageIndex];if(!r)return;let o=fn(r,t),a=Object.freeze([pr({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>mr(r,i)))})}function gn(e,t,n){let r=n.filter(i=>i.pageIndex===t.pageIndex);if(r.length===0)return fr(t)?yn(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(r.map(i=>pr(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>mr(o,i)))})}function fr(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function lr(e,t){return `${e}\0${t}`}function hn(e,t,n){let r=Math.max(e.start,t.offset),o=Math.min(e.end,n.offset);return o>r?{start:r,end:o}:null}function xn(e,t){let n=new Map,r=new Map,o=new Set,a=0;let i=(s,c)=>{if(a>=ln)return false;a+=1;let d=lr(s.pageIndex,c),u=r.get(d);return u?u.push(s):r.set(d,[s]),true};for(let[s,c]of t.entries())for(let[d,u]of c.occurrences.entries()){if(fr(u)||u.source.start.paragraphId!==u.source.end.paragraphId)continue;o.add(u.pageIndex);let l=`${s}\0${d}`,g={paragraphId:u.source.start.paragraphId,offset:u.source.start.offset},f={paragraphId:u.source.end.paragraphId,offset:u.source.end.offset},h=g.offset<=f.offset?{from:g,to:f}:{from:f,to:g};i({key:l,from:h.from,to:h.to,pageIndex:u.pageIndex},h.from.paragraphId);}if(r.size===0)return n;for(let s of e.pages)o.has(s.index)&&Na(s,c=>{let d=c.story==="header"||c.story==="footer"?u=>Ia(u,c.origin,{x:s.box.x,y:s.box.y}):void 0;Ra(c.host,(u,l)=>{let g=ur(s,l.storyOrigin);for(let f of u.lines)for(let h of Ya(f)){let y=r.get(lr(s.index,h.paragraphId));if(y)for(let b of y){let P=hn(h,b.from,b.to);if(!P)continue;let x=Ge(f,P.start,void 0,h),v=Ge(f,P.end,void 0,h,P.end>P.start),O=n.get(b.key)??[];O.push({pageIndex:s.index,x:Math.min(x,v)+g.x,y:f.box.y+g.y,width:Math.abs(v-x),height:f.box.height}),n.set(b.key,O);}}},c.origin,d);});return n}function yr(e,t){let n=false;for(let o of t)if(o.occurrences.length!==0){n=true;break}if(!n)return t;let r=xn(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,c)=>{let d=`${a}\0${c}`,u=gn(e,s,r.get(d)??[]);return u?{...s,geometry:u}:s});return {...o,occurrences:Object.freeze(i)}})}function wn(e){let t=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:r,depth:o}=n.pop();if(!(r.kind==="textValue"||o>64)){r.kind==="paragraph"&&!t.has(r.id)&&t.set(r.id,t.size);for(let a=r.children.length-1;a>=0;a-=1)n.push({node:r.children[a],depth:o+1});}}return t}function gr(){let e=new Map,t=r=>{let o=e.get(r.root);if(o)return o;let a=wn(r);return e.set(r.root,a),a},n={retainRevisionItems:false,revisionSites:Pl,locations:bm,commentAnchors:Rj,deepOrder:t};return Object.freeze({collectReviewItems:r=>fm(r,n),deepParagraphOrderOfPart:t})}var hr=new WeakMap,fe={};function De(e,t){let n=hr.get(e??fe)??new WeakMap;hr.set(e??fe,n);let r=n.get(t??fe);if(!r){let o=lf(e);r={table:o,numbering:Md(od(t),o)},n.set(t??fe,r);}return r}var Ee=new Set(["pPrChange","rPr","sectPr"]),ke=new Set(["rPrChange","ins","del","moveFrom","moveTo"]),bn=new Set(["ind","spacing","rFonts","lang"]),Pn={ind:[["firstLine","hanging"]],rFonts:[["ascii","asciiTheme"],["hAnsi","hAnsiTheme"],["eastAsia","eastAsiaTheme"],["cs","cstheme"]]},Rn={ind:{start:"left",end:"right"}},vn={ind:new Set(["startChars","endChars","leftChars","rightChars","firstLineChars","hangingChars"])},Me=new Set(["dstrike","noProof","webHidden","specVanish","rtl","cs","oMath","keepNext","keepLines","pageBreakBefore","suppressLineNumbers","suppressAutoHyphens","contextualSpacing","mirrorIndents","suppressOverlap","bidi"]);for(let e of M$1)Me.add(e);var wr=new Set(["0","false","off"]);function Sn(e,t,n,r){if(Me.has(e))return t==="val"&&wr.has(n);switch(e){case "jc":return n==="start"||!r&&n==="left";case "ind":return n==="0";case "u":case "highlight":return n==="none";case "vertAlign":return n==="baseline";case "color":return n==="auto";case "position":return n==="0";case "w":return n==="100";default:return false}}function In(e){let t=Rn[e.localName],n=vn[e.localName],r={};for(let[o,a]of Object.entries(e.attributes??{})){if(n?.has(o))return null;let i=t?.[o]??o;i!==o&&e.attributes?.[i]!==void 0||(r[i]=a);}return Me.has(e.localName)&&r.val===void 0&&(r.val="true"),r}function On(e,t,n){let r={...t};for(let o of Pn[e]??[])if(o.some(a=>n[a]!==void 0))for(let a of o)delete r[a];return Object.assign(r,n)}function br(e,t){let n=new Map;for(let i of e){if(t.has(i.localName))continue;let s=In(i);if(!s)return null;let c=n.get(i.localName);n.set(i.localName,c&&bn.has(i.localName)?On(i.localName,c,s):s);}let r=n.get("bidi"),o=r!==void 0&&!wr.has(r.val??"true"),a=[];for(let[i,s]of n){let c=Object.entries(s).filter(([d,u])=>!Sn(i,d,u,o)).sort(([d],[u])=>d.localeCompare(u));c.length===0&&Object.keys(s).length>0||a.push(`${i}(${c.map(([d,u])=>`${d}=${u}`).join(",")})`);}return a.sort().join(" ")}function ye(e,t){let n=[];for(let r of e?.children??[]){if(r.kind==="textValue")continue;let o=r.namespaceUri===pa;o&&t.has(r.localName)||o&&!r.children.some(a=>a.kind!=="textValue")||n.push(Ja(r));}return n.join("\0")}function ge(e,t){let n="";for(let r of e)r.localName===t&&(n=r.attributes?.val??"");return n}function Pr(e,t){let n=nf(e.table,t).paragraphPropertyNodes,r=Kd(n);if(!r||r.numId==="0")return null;let o=pd(e.numbering,r.numId,r.ilvl);return (o&&_c(o.level))??void 0}function xr(e,t){let n=Pr(e,t);if(n===void 0)return null;let r=nf(e.table,t,void 0,n??void 0);return br(r.paragraphProperties,Ee)}function Rr(e,t,n){let r=xd(t);if(ge(zb(n),"pStyle")!==ge(zb(r),"pStyle")||ye(n,Ee)!==ye(r,Ee))return false;let o=xr(e,n);return o!==null&&o===xr(e,r)}function vr(e,t,n,r){let o=wd(t),a=zb(n),i=zb(o);if(ge(a,"rStyle")!==ge(i,"rStyle")||ye(n,ke)!==ye(o,ke))return false;let s=Pr(e,r);if(s===void 0)return false;let c=nf(e.table,r,void 0,s??void 0).runProperties,d=l=>br(pf(c,l,e.table),ke),u=d(a);return u!==null&&u===d(i)}function Ir(e){return {pkg:e,stylesRoot:ud(e)?.root??null,numberingRoot:vd(e)}}var kn=64,Sr=new WeakMap;function Ae(e){return e.kind==="revision"&&e.revisionKind==="format"&&(e.formattingKind==="pPrChange"||e.formattingKind==="rPrChange")&&!e.readOnly&&e.ranges.length>0}function En(e,t){let n=null,r=fb(e,t);for(let o=0;r&&o<kn;o+=1){if(r.kind==="tableCell"||r.localName==="tc")return null;if(r.kind==="paragraph"){if(n)return null;n=r;}r=fb(e,r.id);}return r?null:n}function Dn(e,t,n,r){let o=eb(e,t);if(!o||o.kind==="textValue")return false;let a=fb(e,t);if(!a)return false;let i=En(e,a.id);if(!i||!r.has(i.id))return false;let s=xd(i),c=Sr.get(o);if(c&&c.context===n&&c.current===a&&c.paragraph===s)return c.inert;let d=o.localName==="pPrChange"?a===s&&Rr(n,o,a):o.localName==="rPrChange"&&vr(n,o,a,s);return Sr.set(o,{context:n,current:a,paragraph:s,inert:d}),d}function Or(e,t,n){if(!Ae(e))return false;let r=t.pkg.parts.get(e.ranges[0].partName),o=ll(e),a=new Set(e.ranges.map(i=>i.start.paragraphId));return !!r&&o.length>0&&o.every(i=>Dn(r,i,n,a))}function kr(e,t){if(!e.some(Ae))return e;let n=De(t.stylesRoot,t.numberingRoot),r=e.filter(o=>!Or(o,t,n));return r.length===e.length?e:gm(r)}function da(e,t){if(!e.some(Ae))return [];let n=De(t.stylesRoot,t.numberingRoot);return e.filter(r=>Or(r,t,n))}function Mn(e,t){if(t)return true;let n=e.map(r=>r.root);for(;n.length>0;){let r=n.pop();if(Nl(r))return true;if(r.kind!=="textValue")for(let o of r.children)n.push(o);}return false}function Cr(e,t){let n=[],r=new Set([t.name]),o=a=>{!a||r.has(a.name)||(r.add(a.name),n.push(a));};for(let a of tf(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(pj(e,"footnote")),o(pj(e,"endnote")),n}function An(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return pj(e,"footnote")?.name??null;case "endnote":return pj(e,"endnote")?.name??null;case "note-separator":return pj(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function Ln(e,t){let n=new Map;for(let r of e){let o=t.get(r.partName),a=o?.get(r.start.paragraphId),i=o?.get(r.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),c=Math.max(a,i),d=n.get(r.partName);n.set(r.partName,{lower:Math.min(d?.lower??s,s),upper:Math.max(d?.upper??c,c)});}return n}function Cn(e,t,n,r,o){let a=new Map(n.map(l=>[l.name,o(l)])),i=Ln(r,a),s=new Map,c=new Map,d=(l,g,f,h,y,b,P)=>{let x=a.get(l)?.get(y),v=i.get(l);if(x===void 0||!v||x<v.lower||x>v.upper)return;let O=s.get(l)??new Map;s.set(l,O);let V=c.get(l)??new Map;c.set(l,V);let $=JSON.stringify([g.story,g.noteScopeId,g.noteAreaKind]),K=f==="textbox"?JSON.stringify([$,"textbox",h]):$,G=O.get(y)??[],_=`${y}\0${g.page.index}\0${K}`,T=V.get(_);T||(T={pageIndex:g.page.index,story:f,rootStory:g.story,textboxPath:h,noteScopeId:g.noteScopeId,noteAreaKind:g.noteAreaKind,laneKey:K,intervals:[],intervalKeys:new Set},V.set(_,T),G.push(T),O.set(y,G));let Y=`${b}\0${P}`;T.intervalKeys?.has(Y)||(T.intervalKeys?.add(Y),T.intervals.push({start:b,end:P}));};Oa(e,l=>{let g=An(t,l);!g||!i.has(g)||Ra(l.host,(f,h)=>{let y=h.textboxDepth>0?"textbox":l.story,b=h.textboxPath.map(x=>x.drawingNodeId),P=[];for(let x of f.lines){for(let v of x.spans)P.push(v.range);for(let v of x.drawings??[])P.push({paragraphId:v.paragraphId,start:v.start,end:v.start+1});}P.length===0&&P.push({paragraphId:f.range.paragraphId,start:f.range.start,end:f.range.end});for(let{paragraphId:x,start:v,end:O}of P)d(g,l,y,b,x,v,O);});}),Qa(e,l=>{let g=l.drawing.ownerPartName;l.drawing.accessibility.hidden||!i.has(g)||d(g,l.root,l.story,l.textboxPath.map(f=>f.drawingNodeId),l.drawing.paragraphId,l.drawing.start,l.drawing.start+1);});for(let l of s.values())for(let g of l.values())for(let f of g){f.intervals.sort((y,b)=>y.start-b.start||y.end-b.end);let h=[];for(let y of f.intervals){let b=h.at(-1);b&&y.start<=b.end?b.end=Math.max(b.end,y.end):h.push({...y});}f.intervals.splice(0,f.intervals.length,...h),f.intervalKeys=void 0;}let u=new Map;for(let[l,g]of s){let f=a.get(l);if(!f)continue;let h=[];for(let[y,b]of g){let P=f.get(y);P!==void 0&&h.push({paragraphId:y,position:P,laneKeys:new Set(b.map(({laneKey:x})=>x))});}h.sort((y,b)=>y.position-b.position),u.set(l,h);}return {byPart:s,orderByPart:a,visibleByPart:u}}function Er(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>>1;e[o].position<t?n=o+1:r=o;}return n}function Tn(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=t.orderByPart.get(e.partName),r=t.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!r||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),c=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:l})=>l)??[]),d=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:l})=>l)??[]),u=new Set([...c].filter(l=>d.has(l)));return u.size===0?[e.start.paragraphId,e.end.paragraphId]:r.slice(Er(r,i),Er(r,s+1)).filter(l=>[...l.laneKeys].some(g=>u.has(g))).map(l=>l.paragraphId)}function Fn(e,t,n,r){return r?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,n)};return a.end>a.start?[a]:[]})}function Nn(e,t){let n=Number.NEGATIVE_INFINITY;for(let r of e)for(let o of r.intervals)n=Math.max(n,o.end);return t!==n?new Set:new Set(e.filter(r=>r.intervals.some(o=>o.end===n)))}function Dr(e,t,n){let r=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let c of Tn(i,t)){let d=t.byPart.get(i.partName)?.get(c)??[],l=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,g=c===i.start.paragraphId?i.start.offset:0,f=c===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,h=l?Nn(d,g):new Set;for(let y of d){let b=Fn(y,g,f,l);l&&b.length===0&&h.has(y)&&(b=[{start:g,end:g}]);for(let P of b){let x=`${y.pageIndex}\0${y.story}\0${y.noteScopeId??""}\0${y.noteAreaKind??""}\0${y.textboxPath.join("\0")}\0${i.partName}\0${c}\0${P.start}\0${P.end}\0${s??""}`;o.has(x)||(o.add(x),r.push({pageIndex:y.pageIndex,physicalPageNumber:y.pageIndex+1,story:y.story,rootStory:y.rootStory,textboxPath:y.textboxPath,noteScopeId:y.noteScopeId,noteAreaKind:y.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:c,offset:P.start},end:{paragraphId:c,offset:P.end}}}));}}}}return r}function Tr(e,t){let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,r=Math.imul(r^a+o,2246822507)>>>0,r^=r>>>13;}return `${e}_${t.length.toString(36)}_${n.toString(36)}_${r.toString(36)}`}function Mr(e,t,n=Tr){let r=new Map;for(let a of t){let i=n(e,a),s=r.get(i)??new Set;s.add(a),r.set(i,s);}let o=new Map;for(let[a,i]of r){let s=[...i].sort();for(let[c,d]of s.entries())o.set(d,s.length===1?a:`${a}_${c.toString(36)}`);}return o}function jn(e){let t=new Set,n=new Set;for(let r of e){if(r.kind==="comment"){t.add(r.id),r.parentId!==void 0&&t.add(r.parentId),r.parentRevisionId!==void 0&&n.add(r.parentRevisionId);for(let o of r.replyIds)t.add(o);}if(r.kind==="revision"){n.add(r.id),r.pairedWith!==void 0&&n.add(r.pairedWith);for(let o of r.replyIds)t.add(o);}}return {comment:Mr("comment",t),revision:Mr("change",n)}}function U(e,t,n){return e.get(n)??Tr(t,n)}var Ar=new WeakMap;function _n(e){let t=Ar.get(e.root);if(t)return t;let n=new Map,r=0,o=[e.root];for(;o.length>0;){let a=o.pop();if(!(a.kind==="textValue"||a.kind==="text"||a.kind==="runProperties"||a.kind==="paragraphProperties")){if(a.kind==="commentReference"){let i=jf(a,pa,"id");i!==void 0&&n.set(i,r++);continue}for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}}return Ar.set(e.root,n),n}function Bn(e,t,n,r){if(e.kind==="revision")return {kind:"tracked-change",id:U(n.revision,"change",e.id),change:e.revisionKind,...e.structuralChanges?{structuralChanges:e.structuralChanges}:{},...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:Yb(e.text),replacedText:Yb(e.replacedText),nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:U(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(a=>U(n.comment,"comment",a)),occurrences:t?Dr(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]};if(e.kind!=="comment")return null;let o=r.get(e.id);return {kind:"comment",id:U(n.comment,"comment",e.id),author:e.comment.author,initials:$l(e.comment),...e.comment.initials?.trim()?{declaredInitials:$l({...e.comment,author:""})}:{},...o!==void 0?{referenceOrder:o}:{},...e.comment.date!==void 0?{date:e.comment.date}:{},text:Zl(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:U(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:U(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(a=>U(n.comment,"comment",a)),orphaned:e.orphaned,occurrences:t&&e.range?Dr([e.range],t):[]}}function Fr(e){let t=e.parts.get(e.mainDocumentPart);if(!t)return null;let n=Cr(e,t),r=[t,...n],o=e.parts.get($(e,t.name));if(!Mn(r,o))return null;let a$1=gr(),i=a$1.collectReviewItems({storyPart:t,furnitureParts:n,commentsPart:o,commentsExtendedPart:e.parts.get(aa(e,t.name))}),s=kr(i,Ir(e)),c$1=new Set(s.map(l=>l.id)),d=a(i.filter(l=>!c$1.has(l.id))),u={sites:new Set(d.sites),paragraphs:d.paragraphs,key:c(ud(e)?.root??null,vd(e))};return {parts:r,derivation:a$1,items:s,unlistedSites:u}}var Un=new Map,Lr=new WeakMap,Vn={sites:new Set,paragraphs:new Map,key:""};function Nr(e){let t=Lr.get(e);if(!t){let n=e.parts.get(e.mainDocumentPart);t=n!==void 0&&[n,...Cr(e,n)].some(o=>Ol(o).some(a=>a.propertyChange))&&Fr(e)?.unlistedSites||Vn,Lr.set(e,t);}return t}function jr(e,t){let n=Fr(t);if(!n)return [];let{parts:r,derivation:o,items:a}=n;if(a.length===0)return [];let i=a.flatMap(u=>rl(u)),s=i.length>0?Cn(e,t,r,i,o.deepParagraphOrderOfPart):null,c=jn(a),d=a.some(u=>u.kind==="comment")?_n(r[0]):Un;return a.map(u=>Bn(u,s,c,d)).filter(u=>u!==null)}var Kn=new Set(["part","validatedHandle"]);function _r(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Z(e,t,n,r,o){if(!(r!==void 0&&Kn.has(r))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)Z(a,t,n,void 0,o);Object.freeze(e);return}if(!_r(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");Z(i.value,t,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function Br(e){if(!_r(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let r of e.pages)if(!(r===null||typeof r!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(r,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),Z(i,new Set,s,o),t.add(i);}let n=(r,o)=>{let a=new Set;for(let i of r){let s=new Set;s.add(e),Z(i,a,s,void 0,o);}Object.freeze(r);};for(let r of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(r==="pages"&&Array.isArray(o.value)){n(o.value,t);continue}if(r==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),Z(o.value,new Set,a,r);}return Object.freeze(e),e}var zn=Object.freeze([]),M=class extends Error{constructor(n,r,o){super(r,o);this.code=n;this.name="ExportResourceError";}code};function Wn(e){try{return e instanceof M}catch{return false}}function Hn(e){try{return e instanceof Kf}catch{return false}}function $n(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function Gn(e){if(Wn(e))return e;let t=Hn(e),n=$n(e),r=n?`: ${n}`:"",o=new M(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${r}`:`Export layout failed${r}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function Yn(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Ur(e){if(e==="all-markup"||e==="simple-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, simple-markup, proposed, or original")}var Xn=50,Le=64;function qn(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Qn(e){let t=false;return Qa(e,({drawing:n})=>{qn(n.resource)&&(t=true);}),t}function Vr(e){return !ArrayBuffer.isView(e)}function Xa(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};if(t.revisionAuthorSlots!==void 0&&(!t.revisionAuthorSlots||typeof t.revisionAuthorSlots!="object"||Array.isArray(t.revisionAuthorSlots)))throw new TypeError("revisionAuthorSlots must map author names to nonnegative safe integers.");let n=t.revisionAuthorSlots===void 0?void 0:Object.freeze(Object.fromEntries(Object.entries(t.revisionAuthorSlots).map(([m,w])=>{if(!Number.isSafeInteger(w)||w<0)throw new TypeError("revisionAuthorSlots values must be nonnegative safe integers.");return [m,w]}))),r=t.revisionMarkup?ib(t.revisionMarkup):void 0,o=r?{revisionMarkup:r,hiddenAuthors:new Set,cacheKey:JSON.stringify(r)}:void 0,a=Ur(t.displayMode??mb),i=Vr(e),s=Vr(e)?{ok:true,view:e}:Ba(e);if(!s.ok)return s;let c=s.view,d=t.reuseAcrossRevisions??i,u=Yn(t.resourceTimeoutMs),l=t.measurer??ta(),g=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),f=_if({retainAcrossPasses:d}),h=0,y=new Set,b=()=>{h+=1;for(let m of y)m();y.clear();},P=Cf({session:c,decodePort:t.imageDecodePort??nr(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:b}),x={view:c,measurer:l,paragraphCache:f,sessions:new Map,completed:new Map,inFlight:new Map,styles:Af(c),fieldLinks:new Map,links:Rf(c),drawingBundle:P,furniture:new Map},v=new AbortController,O=t.signal,V=false,$=()=>V?new M("aborted","Export resource settlement was aborted"):new M("disposed","Export session has been disposed"),K=()=>{V=true,G();};function G(){let m=x;if(m){x=null,O?.removeEventListener("abort",K),v.abort(O?.reason),m.drawingBundle.dispose(),m.paragraphCache.clear();for(let w of m.completed.values())kd(w.internal),Zf(w.internal);for(let w of m.fieldLinks.values())w.registry.clear();m.fieldLinks.clear(),m.completed.clear(),m.inFlight.clear(),m.furniture.clear(),m.sessions.clear(),b();}}O?.addEventListener("abort",K,{once:true}),O?.aborted&&K();let _=()=>{if(!x)throw $();if(v.signal.aborted)throw new M("aborted","Export resource settlement was aborted")},T=(m,w,R,p)=>h!==m||x?.view.packageRevision()!==w||x?.view.currentPackage()!==R?Promise.resolve():(_(),new Promise((I,E)=>{let D=false,F,A=N=>{D||(D=true,F!==void 0&&clearTimeout(F),y.delete(X),v.signal.removeEventListener("abort",q),N?E(N):I());},X=()=>A(),q=()=>A(new M("aborted","Export resource settlement was aborted")),L=()=>{if(x?.view.packageRevision()!==w||x?.view.currentPackage()!==R){A();return}let N=p-Date.now();if(N<=0){A(new M("timedOut",`Image resources did not settle within ${u}ms`));return}F=setTimeout(L,Math.min(Xn,N));};if(y.add(X),v.signal.addEventListener("abort",q,{once:true}),h!==m||x?.view.packageRevision()!==w||x?.view.currentPackage()!==R){A();return}F=setTimeout(L,0);})),Y=async(m,w=0,R=Date.now()+u)=>{if(_(),Date.now()>=R)throw new M("timedOut",`Export layout did not stabilize within ${u}ms`);let p=x,I=R,E=p.view.packageRevision(),D=p.view.currentPackage(),F=p.completed.get(m);if(F&&F.revision===E&&F.pkg===D)return F.published;let A=()=>{if(p.view.packageRevision()===E&&p.view.currentPackage()===D)return null;if(w>=Le-1)throw new M("nonConvergent","Document revision did not stabilize during export layout");return Y(m,w+1,I)},X=m==="simple-markup"?nb(o):o,q=m==="all-markup"||m==="simple-markup"?oe(X,Nr(D),m==="simple-markup"):X,L=p.fieldLinks.get(m);if(!L||L.revision!==E||L.pkg!==D){let k=L?.registry??Sf();k.clear(),L={revision:E,pkg:D,registry:k},p.fieldLinks.set(m,L),p.furniture.delete(m);}let N=L.registry,Te=p.sessions.get(m)??Bg();p.sessions.set(m,Te);let ee=p.furniture.get(m);ee||(ee=Of$1({view:p.view,measurer:p.measurer,producer:g,cache:p.paragraphCache,styleCascade:p.styles.styleCascade,numberingIndex:p.styles.numberingIndex,defaultTabStopPt:p.styles.defaultTabStopPt,compatibilityMode:p.styles.compatibilityMode,displayMode:lb(m),revisionAuthorFilter:q,showFieldCodes:false,inlineDrawingLayoutForPart:k=>p.drawingBundle.contextForPart(k),drawingLayoutTokenForPart:k=>p.drawingBundle.cacheTokenForPart(k),drawingTokenForParagraphForPart:(k,he)=>p.drawingBundle.drawingTokenForParagraph(he,k),linkProjectors:p.links,projectFieldLink:k=>N.project(k)}),p.furniture.set(m,ee));for(let k=0;k<Le;k+=1){let he=h;p.drawingBundle.sync(p.view);let Fe=A();if(Fe)return Fe;let j=cr({view:p.view,revision:p.view.packageRevision(),measurer:p.measurer,cache:p.paragraphCache,session:Te,producer:g,styleCascade:p.styles.styleCascade,defaultTabStopPt:p.styles.defaultTabStopPt,numberingIndex:p.styles.numberingIndex,furniture:ee,compatibilityMode:p.styles.compatibilityMode,linkProjectors:p.links,projectFieldLink:S=>N.project(S),inlineDrawingLayout:p.drawingBundle.bodyContext,inlineDrawingLayoutForPart:S=>p.drawingBundle.contextForPart(S),drawingTokenForParagraph:S=>p.drawingBundle.drawingTokenForParagraph(S,p.view.part().name),drawingTokenForParagraphForPart:(S,te)=>p.drawingBundle.drawingTokenForParagraph(te,S),drawingLayoutEpoch:p.drawingBundle.cacheTokenForPart(p.view.part().name),drawingLayoutEpochForPart:S=>p.drawingBundle.cacheTokenForPart(S),displayMode:lb(m),revisionAuthorFilter:q,showFieldCodes:false,bodyBlockLimit:void 0,fieldResults:"atomic"});if(!Qn(j)){let S=A();if(S)return S;d||(kd(j),Zf(j),p.paragraphCache.clear(),p.sessions.delete(m),p.furniture.delete(m));let te=jr(j,D),Kr=te.length===0?zn:Object.freeze(yr(j,te)),zr=Zt(p.view,j),Wr={...j,...zr,reviewDisplayMode:m,...r?{revisionMarkup:r}:{},...n?{revisionAuthorSlots:n}:{},facingPages:[...D.parts.values()].some(Be=>Be.root.localName==="settings"&&Be.root.children.some(re=>re.kind!=="textValue"&&(re.localName==="mirrorMargins"||re.localName==="evenAndOddHeaders")&&!re.attributes.some(Ue=>Ue.localName==="val"&&["0","false","off"].includes(Ue.value)))),contentWarnings:sr(p.view),reviewArtifacts:Kr},_e=Br(Wr);return p.completed.set(m,{revision:E,pkg:D,internal:j,published:_e}),_e}let Ne=he;for(;p.drawingBundle.pendingResourceCount()>0;){await T(Ne,E,D,I),Ne=h,_();let S=A();if(S)return S}_();let je=A();if(je)return je}throw new M("nonConvergent",`Image resources did not reach quiescence after ${Le} layout passes`)},Ce=m=>{let w;try{w=Ur(m);}catch(E){return Promise.reject(E)}if(!x)return Promise.reject($());let R=x,p=R.inFlight.get(w);if(p)return p;let I=Y(w).catch(E=>{throw Gn(E)}).finally(()=>R.inFlight.delete(w));return R.inFlight.set(w,I),I};return {ok:true,session:{layout:()=>Ce(a),layoutFor:Ce,validatedImageBytes(m){let w=x;return !w||m.resource.kind!=="ready"?null:w.drawingBundle.mintValidatedBytes(m.resource.validatedHandle,m.resource.contentId)?.slice()??null},async chartFallbackResource(m){let w=x;if(!w||!m.chart||!m.chartFallbackResource)return;if(m.chartFallbackResource.kind!=="pending")return m.chartFallbackResource;let R,p=new Promise(I=>{R=setTimeout(()=>I(Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),u);});try{return await Promise.race([w.drawingBundle.resolveChartFallback(m.ownerPartName,m.drawingNodeId),p])}finally{clearTimeout(R);}},metafileBytes(m){let w=x,R=m.resource;if(!w||R.kind!=="unrenderable"||R.partName===null||R.reason!=="unsupported-format"&&R.reason!=="decode-failed")return null;let p=R.mime;if(p!=="image/x-emf"&&p!=="image/x-wmf")return null;let I=w.view.currentPackage().partBytes.get(R.partName);return !I||I.byteLength>q.maxEncodedBytes||Of(I)!==p?null:{mime:p,bytes:I.slice()}},dispose:G}}}export{tr as a,cn as b,ro as c,nr as d,Ir as e,kr as f,da as g,M as h,Xa as i};
|
|
1
|
+
import {M as M$1,Yf,Pf,Dg,ib,mb,ta,if as _if,Cf,Rf,Af,kd,Zf,lf,Md,od,nb,oe,Sf,Bg,Of as Of$1,lb,xd,Xf,Qa,Kf,zb,wd,nf,Oa,Ra,Na,Ia,Ya,Ge,uf,jf as jf$1,Kd,pd,_c,pf,Re as Re$1,af,cf,sf,bf}from'./chunk-CCM264XP.js';import {a,c}from'./chunk-ASWUP7GU.js';import {Ba,$,aa}from'./chunk-CORSCVCC.js';import {Tf,vd,ud,gm,q,Of,ll,eb,fb,Ol,Ug,rl,pj,tf,jf,pa,Yb,Zl,$l,Hi,qb,Re,da as da$1,pb,ob,Ve,Xe,Pe,Qe,Ue,ce,ee,Ja,Nl,Ei,fm,Rj,bm,Pl,Ea}from'./chunk-KIDYIVZ5.js';import {zlibSync}from'fflate';var Hr=Object.freeze({}),$r=Object.freeze([]);function Gr(e){let t=Object.keys(e);if(t.length===0)return Hr;let n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=o);}return Object.freeze(n)}function Yr(e){let t=new Map(Hi(e.part())),n=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!n.has(i)){n.add(i);for(let[s,c]of Hi(i))t.has(s)||t.set(s,c);}let r=e.currentPackage();for(let o of ["footnote","endnote"]){let a=pj(r,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of Hi(a))t.has(i)||t.set(i,s);}}return t}function Xr(e,t){let n=Re$1(e,t);if(!n)return null;let r=e.pages[n.pageIndex];if(!r)return null;let o=af(r),a=cf(e,t.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function qr(e,t){let n=[];for(let r of t.values()){let o=Xr(e,r);o&&n.push(o);}return n.length===0?$r:Object.freeze(n)}function Zt(e,t){return {documentMetadata:Gr(e.documentProperties()),destinations:qr(t,Yr(e))}}function ro(e,t){let n=e.destinations;if(n){for(let r of n)if(r.anchor.name===t)return r}}function er(e,t){let n=e[t];if(!Array.isArray(n)||n.length===0)return null;let r=Number(n[0]);return Number.isSafeInteger(r)&&r>0?r:null}var Qr={1:1,2:1,3:2,4:4,5:8,6:1,7:1,8:2,9:4,10:8,11:4,12:8,13:4},Jr=new Set([330,34665,34853,37500,50740,61440]);function Zr(e){if(e.length<8)return false;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=String.fromCharCode(e[0],e[1]);if(n!=="II"&&n!=="MM")return false;let r=n==="II";if(t.getUint16(2,r)!==42)return false;let o=t.getUint32(4,r);if(o<8||o+2>e.length)return false;let a=t.getUint16(o,r),i=o+2+a*12;if(i+4>e.length)return false;t.setUint32(i,0,r);for(let s=0;s<a;s+=1){let c=o+2+s*12;Jr.has(t.getUint16(c,r))&&t.setUint16(c,0,r);let d=Qr[t.getUint16(c+2,r)];if(d===void 0)continue;let u=t.getUint32(c+4,r)*d;u>4&&t.getUint32(c+8,r)+u>e.length&&t.setUint32(c+4,0,r);}return true}async function tr(e,t){let n=e.slice();if(!Zr(n))return null;let r=n.buffer,o=await import('utif2'),a=o.default??o,i=a.decode(r)[0];if(!i)return null;let s=er(i,"t256"),c=er(i,"t257");if(s===null||c===null||s>t.maxDimension||c>t.maxDimension||s>t.maxPixels/c)return null;let d=s*c;if(d*4>t.maxDecodedBytes||(a.decodeImage(r,i),i.width!==s||i.height!==c))return null;let u=a.toRGBA8(i);return u.length!==d*4?null:Object.freeze({rgba:u,pixelWidth:s,pixelHeight:c})}var me=null;function tn(e){if(!me){me=new Uint32Array(256);for(let n=0;n<256;n+=1){let r=n;for(let o=0;o<8;o+=1)r=r&1?3988292384^r>>>1:r>>>1;me[n]=r>>>0;}}let t=4294967295;for(let n of e)t=me[(t^n)&255]^t>>>8;return (t^4294967295)>>>0}function Oe(e,t){let n=new Uint8Array(12+t.length),r=new DataView(n.buffer);r.setUint32(0,t.length);for(let o=0;o<4;o+=1)n[4+o]=e.charCodeAt(o);return n.set(t,8),r.setUint32(8+t.length,tn(n.subarray(4,8+t.length))),n}function rn(e){let t=true;for(let n=0;n<e.length;n+=4){let r=e[n];if(e[n+3]!==255||e[n+1]!==r||e[n+2]!==r)return "rgba";r!==0&&r!==255&&(t=false);}return t?"bilevel":"grey"}function nn(e,t,n,r){let o=r==="bilevel"?Math.ceil(t/8):r==="grey"?t:t*4,a=new Uint8Array((o+1)*n);for(let i=0;i<n;i+=1){let s=i*(o+1)+1,c=i*t*4;if(r==="rgba")a.set(e.subarray(c,c+t*4),s);else if(r==="grey")for(let d=0;d<t;d+=1)a[s+d]=e[c+d*4];else for(let d=0;d<t;d+=1)e[c+d*4]===255&&(a[s+(d>>3)]|=128>>(d&7));}return r==="rgba"?{raw:a,depth:8,colour:6}:{raw:a,depth:r==="bilevel"?1:8,colour:0}}function rr(e,t,n){let{raw:r,depth:o,colour:a}=nn(e,t,n,rn(e)),i=new Uint8Array(13),s=new DataView(i.buffer);s.setUint32(0,t),s.setUint32(4,n),i[8]=o,i[9]=a;let c=[new Uint8Array([137,80,78,71,13,10,26,10]),Oe("IHDR",i),Oe("IDAT",zlibSync(r,{level:6})),Oe("IEND",new Uint8Array(0))],d=new Uint8Array(c.reduce((l,g)=>l+g.length,0)),u=0;for(let l of c)d.set(l,u),u+=l.length;return d}async function on(e,t,n){if(t!=="image/tiff")return null;let r=await tr(e,n);if(!r)return null;let o=rr(r.rgba,r.pixelWidth,r.pixelHeight);return Object.freeze({bytes:o,mime:"image/png"})}function nr(e={}){return Object.freeze({async decode(t,n,r){let o=Tf(t,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>r.maxDimension||o.pixelHeight>r.maxDimension||o.pixelWidth>r.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},convertPreserved:e.convertPreserved??on})}var or=new WeakMap;function ar(e,t){let n=or.get(e);n||(n=Af(e),or.set(e,n));let r=n.styleCascade(),o=new Set;if(t===e.part())for(let c of uf(t,void 0,void 0,r,n.numberingIndex()))for(let d of jf$1(c)?.slice(0,-1)??[])o.add(d.paragraph.id);let a=c=>{if(c.kind==="textValue")return false;let d=c.children.find(l=>l.kind!=="textValue"&&l.namespaceUri===pa&&l.localName==="pPr"),u=d?.kind!=="textValue"?d?.children.find(l=>l.kind!=="textValue"&&l.namespaceUri===pa&&l.localName==="rPr"):void 0;return u!==void 0&&Ea(u,"vanish")},i=0,s=(c,d)=>{if(++i>Re||d>da$1||c.kind==="textValue")return false;if(c.kind==="paragraph"&&!o.has(c.id)&&(sf(c,r,false)||a(c))&&Ei(c).length>0)return true;for(let u of c.children){if(i>=Re)break;if(s(u,d+1))return true}return false};return s(t.root,0)}var ir=new WeakMap,an=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function sn(e,t){let n=ir.get(e.root);if(n&&n.stylesPart===t)return n.codes;let r=new Set,o=[{node:e.root,scope:qb(),depth:0,mcSelected:false}],a=0;for(;o.length;){let{node:s,scope:c,depth:d,mcSelected:u}=o.pop();if(++a>Re||d>da$1){r.add("scan-limit");break}if(s.kind==="textValue")continue;if(a+o.length+s.children.length>Re){r.add("scan-limit");break}let l=pb(c,s),g=ob(s)?s:void 0;if(g){if(Ve(g,l).drawing)continue;let f=Xe(g,{ownerPartName:e.name,namespaceScope:l,supportedMcRequires:Qe,limits:Pe});if(f){let y=f.textboxStory?.content;y&&o.push({node:y,scope:l,depth:d+1,mcSelected:false});continue}let h=Ue(g,l);h.refused&&r.add("scan-limit"),h.branch&&o.push({node:h.branch,scope:l,depth:d+1,mcSelected:true});continue}if(!u&&ce(s)){let f=ee(s,e.name)?.textboxStory?.content;f&&o.push({node:f,scope:l,depth:d+1,mcSelected:u});continue}if(s.namespaceUri==="urn:schemas-microsoft-com:vml"&&s.localName==="textbox"){r.add("legacy-textbox");continue}s.namespaceUri==="urn:schemas-microsoft-com:vml"&&an.has(s.localName)&&!s.children.some(f=>f.kind!=="textValue"&&f.namespaceUri==="urn:schemas-microsoft-com:vml"&&f.localName==="textbox")&&r.add("legacy-drawing");for(let f of s.children)o.push({node:f,scope:l,depth:d+1,mcSelected:u});}let i=Object.freeze([...r]);return ir.set(e.root,{stylesPart:t,codes:i}),i}function sr(e){let t=new Set([e.part()]);for(let n of e.headerFooterPartsBySection())for(let r of [n.headers,n.footers])for(let o of r.values())t.add(o);for(let n of ["footnote","endnote"]){let r=pj(e.currentPackage(),n);r&&t.add(r);}return Object.freeze([...t].flatMap(n=>[...sn(n,ud(e.currentPackage())),...ar(e,n)?["unsupported-style-separator"]:[]].map(r=>Object.freeze({code:r,partName:n.name}))))}function cr(e){return Ug(e.fieldResults,()=>Xf(cn(e)))}function cn(e){return Yf(e.fieldResults,dn(e))}function*dn(e){let t=e.defaultTabStopPt?.(),n=e.view.part().name,r={view:e.view,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,compatibilityMode:e.compatibilityMode?.(),inlineDrawingLayoutForPart:e.inlineDrawingLayoutForPart,drawingTokenForParagraphForPart:e.drawingTokenForParagraphForPart,drawingLayoutEpochForPart:e.drawingLayoutEpochForPart,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},o=Pf(r),a={view:e.view,revision:e.revision,measurer:e.measurer,cache:e.cache,session:e.session,producer:e.producer,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,furniture:e.furniture,compatibilityMode:e.compatibilityMode,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,fieldResults:e.fieldResults,inlineDrawingLayout:e.inlineDrawingLayout,drawingTokenForParagraph:e.drawingTokenForParagraph,drawingLayoutEpoch:e.drawingLayoutEpoch,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,bodyBlockLimit:e.bodyBlockLimit},i={measurer:a.measurer,cache:a.cache,session:a.session,producer:a.producer,styleCascade:a.styleCascade?.(),defaultTabStopPt:a.defaultTabStopPt,compatibilityMode:a.compatibilityMode?.(),numberingIndex:a.numberingIndex?.(),sectionFurniture:a.furniture.sectionFurniture(),furniture:a.furniture.furniture(),evenAndOddHeaders:a.view.headerFooterPartsBySection()[0]?.evenAndOddHeaders===true,projectLink:a.linkProjectors.projectLink,projectFieldLink:a.projectFieldLink,showFieldCodes:a.showFieldCodes,fieldResults:a.fieldResults,documentProperties:a.view.documentProperties(),inlineDrawingLayout:a.inlineDrawingLayout,drawingTokenForParagraph:a.drawingTokenForParagraph,drawingLayoutEpoch:a.drawingLayoutEpoch,projectionTokenForParagraph:s=>a.linkProjectors.tokenForParagraphForPart(n,s),projectionTokenForTable:s=>a.linkProjectors.tokenForTableForPart(n,s),projectionEpoch:a.linkProjectors.epochForPart(n),notes:o,displayMode:a.displayMode,revisionAuthorFilter:a.revisionAuthorFilter,bodyBlockLimit:a.bodyBlockLimit};return yield*Dg(a.view.part(),a.revision,i)}var ln=65536;function ur(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function un(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function pn(e,t,n){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===n:true}function mn(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let n=null;return Na(e,r=>{if(n||!pn(t,r.story,r.noteScopeId))return;let o=r.story==="header"||r.story==="footer"?a=>Ia(a,r.origin,{x:e.box.x,y:e.box.y}):void 0;Ra(r.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(c=>c.drawingNodeId);un(s,t.textboxPath)&&(n=ur(e,i.storyOrigin));},r.origin,o);}),n}function fn(e,t){if(t.story==="textbox")return mn(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?bf(e,e.header.box):{x:0,y:0};case "footer":return e.footer?bf(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let r=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return r?bf(e,r.box):{x:0,y:0}}case "note-separator":{let n=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes,r=n?.separator?.box;return n?.continuationNotice&&Ra(n.continuationNotice,o=>{o.paragraphId===t.source.start.paragraphId&&(r=n.continuationNotice.box);}),r?bf(e,r):{x:0,y:0}}default:return {x:0,y:0}}}function pr(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function mr(e,t){let n=af(e);return Object.freeze({x:n.x+t.x,y:n.y+t.y,width:t.width,height:t.height})}function yn(e,t){let n=Re$1(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!n||n.pageIndex!==t.pageIndex)return;let r=e.pages[n.pageIndex];if(!r)return;let o=fn(r,t),a=Object.freeze([pr({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>mr(r,i)))})}function gn(e,t,n){let r=n.filter(i=>i.pageIndex===t.pageIndex);if(r.length===0)return fr(t)?yn(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(r.map(i=>pr(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>mr(o,i)))})}function fr(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function lr(e,t){return `${e}\0${t}`}function hn(e,t,n){let r=Math.max(e.start,t.offset),o=Math.min(e.end,n.offset);return o>r?{start:r,end:o}:null}function xn(e,t){let n=new Map,r=new Map,o=new Set,a=0;let i=(s,c)=>{if(a>=ln)return false;a+=1;let d=lr(s.pageIndex,c),u=r.get(d);return u?u.push(s):r.set(d,[s]),true};for(let[s,c]of t.entries())for(let[d,u]of c.occurrences.entries()){if(fr(u)||u.source.start.paragraphId!==u.source.end.paragraphId)continue;o.add(u.pageIndex);let l=`${s}\0${d}`,g={paragraphId:u.source.start.paragraphId,offset:u.source.start.offset},f={paragraphId:u.source.end.paragraphId,offset:u.source.end.offset},h=g.offset<=f.offset?{from:g,to:f}:{from:f,to:g};i({key:l,from:h.from,to:h.to,pageIndex:u.pageIndex},h.from.paragraphId);}if(r.size===0)return n;for(let s of e.pages)o.has(s.index)&&Na(s,c=>{let d=c.story==="header"||c.story==="footer"?u=>Ia(u,c.origin,{x:s.box.x,y:s.box.y}):void 0;Ra(c.host,(u,l)=>{let g=ur(s,l.storyOrigin);for(let f of u.lines)for(let h of Ya(f)){let y=r.get(lr(s.index,h.paragraphId));if(y)for(let b of y){let P=hn(h,b.from,b.to);if(!P)continue;let x=Ge(f,P.start,void 0,h),v=Ge(f,P.end,void 0,h,P.end>P.start),O=n.get(b.key)??[];O.push({pageIndex:s.index,x:Math.min(x,v)+g.x,y:f.box.y+g.y,width:Math.abs(v-x),height:f.box.height}),n.set(b.key,O);}}},c.origin,d);});return n}function yr(e,t){let n=false;for(let o of t)if(o.occurrences.length!==0){n=true;break}if(!n)return t;let r=xn(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,c)=>{let d=`${a}\0${c}`,u=gn(e,s,r.get(d)??[]);return u?{...s,geometry:u}:s});return {...o,occurrences:Object.freeze(i)}})}function wn(e){let t=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:r,depth:o}=n.pop();if(!(r.kind==="textValue"||o>64)){r.kind==="paragraph"&&!t.has(r.id)&&t.set(r.id,t.size);for(let a=r.children.length-1;a>=0;a-=1)n.push({node:r.children[a],depth:o+1});}}return t}function gr(){let e=new Map,t=r=>{let o=e.get(r.root);if(o)return o;let a=wn(r);return e.set(r.root,a),a},n={retainRevisionItems:false,revisionSites:Pl,locations:bm,commentAnchors:Rj,deepOrder:t};return Object.freeze({collectReviewItems:r=>fm(r,n),deepParagraphOrderOfPart:t})}var hr=new WeakMap,fe={};function De(e,t){let n=hr.get(e??fe)??new WeakMap;hr.set(e??fe,n);let r=n.get(t??fe);if(!r){let o=lf(e);r={table:o,numbering:Md(od(t),o)},n.set(t??fe,r);}return r}var Ee=new Set(["pPrChange","rPr","sectPr"]),ke=new Set(["rPrChange","ins","del","moveFrom","moveTo"]),bn=new Set(["ind","spacing","rFonts","lang"]),Pn={ind:[["firstLine","hanging"]],rFonts:[["ascii","asciiTheme"],["hAnsi","hAnsiTheme"],["eastAsia","eastAsiaTheme"],["cs","cstheme"]]},Rn={ind:{start:"left",end:"right"}},vn={ind:new Set(["startChars","endChars","leftChars","rightChars","firstLineChars","hangingChars"])},Me=new Set(["dstrike","noProof","webHidden","specVanish","rtl","cs","oMath","keepNext","keepLines","pageBreakBefore","suppressLineNumbers","suppressAutoHyphens","contextualSpacing","mirrorIndents","suppressOverlap","bidi"]);for(let e of M$1)Me.add(e);var wr=new Set(["0","false","off"]);function Sn(e,t,n,r){if(Me.has(e))return t==="val"&&wr.has(n);switch(e){case "jc":return n==="start"||!r&&n==="left";case "ind":return n==="0";case "u":case "highlight":return n==="none";case "vertAlign":return n==="baseline";case "color":return n==="auto";case "position":return n==="0";case "w":return n==="100";default:return false}}function In(e){let t=Rn[e.localName],n=vn[e.localName],r={};for(let[o,a]of Object.entries(e.attributes??{})){if(n?.has(o))return null;let i=t?.[o]??o;i!==o&&e.attributes?.[i]!==void 0||(r[i]=a);}return Me.has(e.localName)&&r.val===void 0&&(r.val="true"),r}function On(e,t,n){let r={...t};for(let o of Pn[e]??[])if(o.some(a=>n[a]!==void 0))for(let a of o)delete r[a];return Object.assign(r,n)}function br(e,t){let n=new Map;for(let i of e){if(t.has(i.localName))continue;let s=In(i);if(!s)return null;let c=n.get(i.localName);n.set(i.localName,c&&bn.has(i.localName)?On(i.localName,c,s):s);}let r=n.get("bidi"),o=r!==void 0&&!wr.has(r.val??"true"),a=[];for(let[i,s]of n){let c=Object.entries(s).filter(([d,u])=>!Sn(i,d,u,o)).sort(([d],[u])=>d.localeCompare(u));c.length===0&&Object.keys(s).length>0||a.push(`${i}(${c.map(([d,u])=>`${d}=${u}`).join(",")})`);}return a.sort().join(" ")}function ye(e,t){let n=[];for(let r of e?.children??[]){if(r.kind==="textValue")continue;let o=r.namespaceUri===pa;o&&t.has(r.localName)||o&&!r.children.some(a=>a.kind!=="textValue")||n.push(Ja(r));}return n.join("\0")}function ge(e,t){let n="";for(let r of e)r.localName===t&&(n=r.attributes?.val??"");return n}function Pr(e,t){let n=nf(e.table,t).paragraphPropertyNodes,r=Kd(n);if(!r||r.numId==="0")return null;let o=pd(e.numbering,r.numId,r.ilvl);return (o&&_c(o.level))??void 0}function xr(e,t){let n=Pr(e,t);if(n===void 0)return null;let r=nf(e.table,t,void 0,n??void 0);return br(r.paragraphProperties,Ee)}function Rr(e,t,n){let r=xd(t);if(ge(zb(n),"pStyle")!==ge(zb(r),"pStyle")||ye(n,Ee)!==ye(r,Ee))return false;let o=xr(e,n);return o!==null&&o===xr(e,r)}function vr(e,t,n,r){let o=wd(t),a=zb(n),i=zb(o);if(ge(a,"rStyle")!==ge(i,"rStyle")||ye(n,ke)!==ye(o,ke))return false;let s=Pr(e,r);if(s===void 0)return false;let c=nf(e.table,r,void 0,s??void 0).runProperties,d=l=>br(pf(c,l,e.table),ke),u=d(a);return u!==null&&u===d(i)}function Ir(e){return {pkg:e,stylesRoot:ud(e)?.root??null,numberingRoot:vd(e)}}var kn=64,Sr=new WeakMap;function Ae(e){return e.kind==="revision"&&e.revisionKind==="format"&&(e.formattingKind==="pPrChange"||e.formattingKind==="rPrChange")&&!e.readOnly&&e.ranges.length>0}function En(e,t){let n=null,r=fb(e,t);for(let o=0;r&&o<kn;o+=1){if(r.kind==="tableCell"||r.localName==="tc")return null;if(r.kind==="paragraph"){if(n)return null;n=r;}r=fb(e,r.id);}return r?null:n}function Dn(e,t,n,r){let o=eb(e,t);if(!o||o.kind==="textValue")return false;let a=fb(e,t);if(!a)return false;let i=En(e,a.id);if(!i||!r.has(i.id))return false;let s=xd(i),c=Sr.get(o);if(c&&c.context===n&&c.current===a&&c.paragraph===s)return c.inert;let d=o.localName==="pPrChange"?a===s&&Rr(n,o,a):o.localName==="rPrChange"&&vr(n,o,a,s);return Sr.set(o,{context:n,current:a,paragraph:s,inert:d}),d}function Or(e,t,n){if(!Ae(e))return false;let r=t.pkg.parts.get(e.ranges[0].partName),o=ll(e),a=new Set(e.ranges.map(i=>i.start.paragraphId));return !!r&&o.length>0&&o.every(i=>Dn(r,i,n,a))}function kr(e,t){if(!e.some(Ae))return e;let n=De(t.stylesRoot,t.numberingRoot),r=e.filter(o=>!Or(o,t,n));return r.length===e.length?e:gm(r)}function da(e,t){if(!e.some(Ae))return [];let n=De(t.stylesRoot,t.numberingRoot);return e.filter(r=>Or(r,t,n))}function Mn(e,t){if(t)return true;let n=e.map(r=>r.root);for(;n.length>0;){let r=n.pop();if(Nl(r))return true;if(r.kind!=="textValue")for(let o of r.children)n.push(o);}return false}function Cr(e,t){let n=[],r=new Set([t.name]),o=a=>{!a||r.has(a.name)||(r.add(a.name),n.push(a));};for(let a of tf(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(pj(e,"footnote")),o(pj(e,"endnote")),n}function An(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return pj(e,"footnote")?.name??null;case "endnote":return pj(e,"endnote")?.name??null;case "note-separator":return pj(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function Ln(e,t){let n=new Map;for(let r of e){let o=t.get(r.partName),a=o?.get(r.start.paragraphId),i=o?.get(r.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),c=Math.max(a,i),d=n.get(r.partName);n.set(r.partName,{lower:Math.min(d?.lower??s,s),upper:Math.max(d?.upper??c,c)});}return n}function Cn(e,t,n,r,o){let a=new Map(n.map(l=>[l.name,o(l)])),i=Ln(r,a),s=new Map,c=new Map,d=(l,g,f,h,y,b,P)=>{let x=a.get(l)?.get(y),v=i.get(l);if(x===void 0||!v||x<v.lower||x>v.upper)return;let O=s.get(l)??new Map;s.set(l,O);let V=c.get(l)??new Map;c.set(l,V);let $=JSON.stringify([g.story,g.noteScopeId,g.noteAreaKind]),K=f==="textbox"?JSON.stringify([$,"textbox",h]):$,G=O.get(y)??[],_=`${y}\0${g.page.index}\0${K}`,T=V.get(_);T||(T={pageIndex:g.page.index,story:f,rootStory:g.story,textboxPath:h,noteScopeId:g.noteScopeId,noteAreaKind:g.noteAreaKind,laneKey:K,intervals:[],intervalKeys:new Set},V.set(_,T),G.push(T),O.set(y,G));let Y=`${b}\0${P}`;T.intervalKeys?.has(Y)||(T.intervalKeys?.add(Y),T.intervals.push({start:b,end:P}));};Oa(e,l=>{let g=An(t,l);!g||!i.has(g)||Ra(l.host,(f,h)=>{let y=h.textboxDepth>0?"textbox":l.story,b=h.textboxPath.map(x=>x.drawingNodeId),P=[];for(let x of f.lines){for(let v of x.spans)P.push(v.range);for(let v of x.drawings??[])P.push({paragraphId:v.paragraphId,start:v.start,end:v.start+1});}P.length===0&&P.push({paragraphId:f.range.paragraphId,start:f.range.start,end:f.range.end});for(let{paragraphId:x,start:v,end:O}of P)d(g,l,y,b,x,v,O);});}),Qa(e,l=>{let g=l.drawing.ownerPartName;l.drawing.accessibility.hidden||!i.has(g)||d(g,l.root,l.story,l.textboxPath.map(f=>f.drawingNodeId),l.drawing.paragraphId,l.drawing.start,l.drawing.start+1);});for(let l of s.values())for(let g of l.values())for(let f of g){f.intervals.sort((y,b)=>y.start-b.start||y.end-b.end);let h=[];for(let y of f.intervals){let b=h.at(-1);b&&y.start<=b.end?b.end=Math.max(b.end,y.end):h.push({...y});}f.intervals.splice(0,f.intervals.length,...h),f.intervalKeys=void 0;}let u=new Map;for(let[l,g]of s){let f=a.get(l);if(!f)continue;let h=[];for(let[y,b]of g){let P=f.get(y);P!==void 0&&h.push({paragraphId:y,position:P,laneKeys:new Set(b.map(({laneKey:x})=>x))});}h.sort((y,b)=>y.position-b.position),u.set(l,h);}return {byPart:s,orderByPart:a,visibleByPart:u}}function Er(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>>1;e[o].position<t?n=o+1:r=o;}return n}function Tn(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=t.orderByPart.get(e.partName),r=t.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!r||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),c=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:l})=>l)??[]),d=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:l})=>l)??[]),u=new Set([...c].filter(l=>d.has(l)));return u.size===0?[e.start.paragraphId,e.end.paragraphId]:r.slice(Er(r,i),Er(r,s+1)).filter(l=>[...l.laneKeys].some(g=>u.has(g))).map(l=>l.paragraphId)}function Fn(e,t,n,r){return r?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,n)};return a.end>a.start?[a]:[]})}function Nn(e,t){let n=Number.NEGATIVE_INFINITY;for(let r of e)for(let o of r.intervals)n=Math.max(n,o.end);return t!==n?new Set:new Set(e.filter(r=>r.intervals.some(o=>o.end===n)))}function Dr(e,t,n){let r=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let c of Tn(i,t)){let d=t.byPart.get(i.partName)?.get(c)??[],l=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,g=c===i.start.paragraphId?i.start.offset:0,f=c===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,h=l?Nn(d,g):new Set;for(let y of d){let b=Fn(y,g,f,l);l&&b.length===0&&h.has(y)&&(b=[{start:g,end:g}]);for(let P of b){let x=`${y.pageIndex}\0${y.story}\0${y.noteScopeId??""}\0${y.noteAreaKind??""}\0${y.textboxPath.join("\0")}\0${i.partName}\0${c}\0${P.start}\0${P.end}\0${s??""}`;o.has(x)||(o.add(x),r.push({pageIndex:y.pageIndex,physicalPageNumber:y.pageIndex+1,story:y.story,rootStory:y.rootStory,textboxPath:y.textboxPath,noteScopeId:y.noteScopeId,noteAreaKind:y.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:c,offset:P.start},end:{paragraphId:c,offset:P.end}}}));}}}}return r}function Tr(e,t){let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,r=Math.imul(r^a+o,2246822507)>>>0,r^=r>>>13;}return `${e}_${t.length.toString(36)}_${n.toString(36)}_${r.toString(36)}`}function Mr(e,t,n=Tr){let r=new Map;for(let a of t){let i=n(e,a),s=r.get(i)??new Set;s.add(a),r.set(i,s);}let o=new Map;for(let[a,i]of r){let s=[...i].sort();for(let[c,d]of s.entries())o.set(d,s.length===1?a:`${a}_${c.toString(36)}`);}return o}function jn(e){let t=new Set,n=new Set;for(let r of e){if(r.kind==="comment"){t.add(r.id),r.parentId!==void 0&&t.add(r.parentId),r.parentRevisionId!==void 0&&n.add(r.parentRevisionId);for(let o of r.replyIds)t.add(o);}if(r.kind==="revision"){n.add(r.id),r.pairedWith!==void 0&&n.add(r.pairedWith);for(let o of r.replyIds)t.add(o);}}return {comment:Mr("comment",t),revision:Mr("change",n)}}function U(e,t,n){return e.get(n)??Tr(t,n)}var Ar=new WeakMap;function _n(e){let t=Ar.get(e.root);if(t)return t;let n=new Map,r=0,o=[e.root];for(;o.length>0;){let a=o.pop();if(!(a.kind==="textValue"||a.kind==="text"||a.kind==="runProperties"||a.kind==="paragraphProperties")){if(a.kind==="commentReference"){let i=jf(a,pa,"id");i!==void 0&&n.set(i,r++);continue}for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}}return Ar.set(e.root,n),n}function Bn(e,t,n,r){if(e.kind==="revision")return {kind:"tracked-change",id:U(n.revision,"change",e.id),change:e.revisionKind,...e.structuralChanges?{structuralChanges:e.structuralChanges}:{},...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:Yb(e.text),replacedText:Yb(e.replacedText),nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:U(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(a=>U(n.comment,"comment",a)),occurrences:t?Dr(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]};if(e.kind!=="comment")return null;let o=r.get(e.id);return {kind:"comment",id:U(n.comment,"comment",e.id),author:e.comment.author,initials:$l(e.comment),...e.comment.initials?.trim()?{declaredInitials:$l({...e.comment,author:""})}:{},...o!==void 0?{referenceOrder:o}:{},...e.comment.date!==void 0?{date:e.comment.date}:{},text:Zl(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:U(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:U(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(a=>U(n.comment,"comment",a)),orphaned:e.orphaned,occurrences:t&&e.range?Dr([e.range],t):[]}}function Fr(e){let t=e.parts.get(e.mainDocumentPart);if(!t)return null;let n=Cr(e,t),r=[t,...n],o=e.parts.get($(e,t.name));if(!Mn(r,o))return null;let a$1=gr(),i=a$1.collectReviewItems({storyPart:t,furnitureParts:n,commentsPart:o,commentsExtendedPart:e.parts.get(aa(e,t.name))}),s=kr(i,Ir(e)),c$1=new Set(s.map(l=>l.id)),d=a(i.filter(l=>!c$1.has(l.id))),u={sites:new Set(d.sites),paragraphs:d.paragraphs,key:c(ud(e)?.root??null,vd(e))};return {parts:r,derivation:a$1,items:s,unlistedSites:u}}var Un=new Map,Lr=new WeakMap,Vn={sites:new Set,paragraphs:new Map,key:""};function Nr(e){let t=Lr.get(e);if(!t){let n=e.parts.get(e.mainDocumentPart);t=n!==void 0&&[n,...Cr(e,n)].some(o=>Ol(o).some(a=>a.propertyChange))&&Fr(e)?.unlistedSites||Vn,Lr.set(e,t);}return t}function jr(e,t){let n=Fr(t);if(!n)return [];let{parts:r,derivation:o,items:a}=n;if(a.length===0)return [];let i=a.flatMap(u=>rl(u)),s=i.length>0?Cn(e,t,r,i,o.deepParagraphOrderOfPart):null,c=jn(a),d=a.some(u=>u.kind==="comment")?_n(r[0]):Un;return a.map(u=>Bn(u,s,c,d)).filter(u=>u!==null)}var Kn=new Set(["part","validatedHandle"]);function _r(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Z(e,t,n,r,o){if(!(r!==void 0&&Kn.has(r))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)Z(a,t,n,void 0,o);Object.freeze(e);return}if(!_r(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");Z(i.value,t,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function Br(e){if(!_r(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let r of e.pages)if(!(r===null||typeof r!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(r,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),Z(i,new Set,s,o),t.add(i);}let n=(r,o)=>{let a=new Set;for(let i of r){let s=new Set;s.add(e),Z(i,a,s,void 0,o);}Object.freeze(r);};for(let r of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(r==="pages"&&Array.isArray(o.value)){n(o.value,t);continue}if(r==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),Z(o.value,new Set,a,r);}return Object.freeze(e),e}var zn=Object.freeze([]),M=class extends Error{constructor(n,r,o){super(r,o);this.code=n;this.name="ExportResourceError";}code};function Wn(e){try{return e instanceof M}catch{return false}}function Hn(e){try{return e instanceof Kf}catch{return false}}function $n(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function Gn(e){if(Wn(e))return e;let t=Hn(e),n=$n(e),r=n?`: ${n}`:"",o=new M(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${r}`:`Export layout failed${r}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function Yn(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Ur(e){if(e==="all-markup"||e==="simple-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, simple-markup, proposed, or original")}var Xn=50,Le=64;function qn(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Qn(e){let t=false;return Qa(e,({drawing:n})=>{qn(n.resource)&&(t=true);}),t}function Vr(e){return !ArrayBuffer.isView(e)}function Xa(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};if(t.revisionAuthorSlots!==void 0&&(!t.revisionAuthorSlots||typeof t.revisionAuthorSlots!="object"||Array.isArray(t.revisionAuthorSlots)))throw new TypeError("revisionAuthorSlots must map author names to nonnegative safe integers.");let n=t.revisionAuthorSlots===void 0?void 0:Object.freeze(Object.fromEntries(Object.entries(t.revisionAuthorSlots).map(([m,w])=>{if(!Number.isSafeInteger(w)||w<0)throw new TypeError("revisionAuthorSlots values must be nonnegative safe integers.");return [m,w]}))),r=t.revisionMarkup?ib(t.revisionMarkup):void 0,o=r?{revisionMarkup:r,hiddenAuthors:new Set,cacheKey:JSON.stringify(r)}:void 0,a=Ur(t.displayMode??mb),i=Vr(e),s=Vr(e)?{ok:true,view:e}:Ba(e);if(!s.ok)return s;let c=s.view,d=t.reuseAcrossRevisions??i,u=Yn(t.resourceTimeoutMs),l=t.measurer??ta(),g=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),f=_if({retainAcrossPasses:d}),h=0,y=new Set,b=()=>{h+=1;for(let m of y)m();y.clear();},P=Cf({session:c,decodePort:t.imageDecodePort??nr(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:b}),x={view:c,measurer:l,paragraphCache:f,sessions:new Map,completed:new Map,inFlight:new Map,styles:Af(c),fieldLinks:new Map,links:Rf(c),drawingBundle:P,furniture:new Map},v=new AbortController,O=t.signal,V=false,$=()=>V?new M("aborted","Export resource settlement was aborted"):new M("disposed","Export session has been disposed"),K=()=>{V=true,G();};function G(){let m=x;if(m){x=null,O?.removeEventListener("abort",K),v.abort(O?.reason),m.drawingBundle.dispose(),m.paragraphCache.clear();for(let w of m.completed.values())kd(w.internal),Zf(w.internal);for(let w of m.fieldLinks.values())w.registry.clear();m.fieldLinks.clear(),m.completed.clear(),m.inFlight.clear(),m.furniture.clear(),m.sessions.clear(),b();}}O?.addEventListener("abort",K,{once:true}),O?.aborted&&K();let _=()=>{if(!x)throw $();if(v.signal.aborted)throw new M("aborted","Export resource settlement was aborted")},T=(m,w,R,p)=>h!==m||x?.view.packageRevision()!==w||x?.view.currentPackage()!==R?Promise.resolve():(_(),new Promise((I,E)=>{let D=false,F,A=N=>{D||(D=true,F!==void 0&&clearTimeout(F),y.delete(X),v.signal.removeEventListener("abort",q),N?E(N):I());},X=()=>A(),q=()=>A(new M("aborted","Export resource settlement was aborted")),L=()=>{if(x?.view.packageRevision()!==w||x?.view.currentPackage()!==R){A();return}let N=p-Date.now();if(N<=0){A(new M("timedOut",`Image resources did not settle within ${u}ms`));return}F=setTimeout(L,Math.min(Xn,N));};if(y.add(X),v.signal.addEventListener("abort",q,{once:true}),h!==m||x?.view.packageRevision()!==w||x?.view.currentPackage()!==R){A();return}F=setTimeout(L,0);})),Y=async(m,w=0,R=Date.now()+u)=>{if(_(),Date.now()>=R)throw new M("timedOut",`Export layout did not stabilize within ${u}ms`);let p=x,I=R,E=p.view.packageRevision(),D=p.view.currentPackage(),F=p.completed.get(m);if(F&&F.revision===E&&F.pkg===D)return F.published;let A=()=>{if(p.view.packageRevision()===E&&p.view.currentPackage()===D)return null;if(w>=Le-1)throw new M("nonConvergent","Document revision did not stabilize during export layout");return Y(m,w+1,I)},X=m==="simple-markup"?nb(o):o,q=m==="all-markup"||m==="simple-markup"?oe(X,Nr(D),m==="simple-markup"):X,L=p.fieldLinks.get(m);if(!L||L.revision!==E||L.pkg!==D){let k=L?.registry??Sf();k.clear(),L={revision:E,pkg:D,registry:k},p.fieldLinks.set(m,L),p.furniture.delete(m);}let N=L.registry,Te=p.sessions.get(m)??Bg();p.sessions.set(m,Te);let ee=p.furniture.get(m);ee||(ee=Of$1({view:p.view,measurer:p.measurer,producer:g,cache:p.paragraphCache,styleCascade:p.styles.styleCascade,numberingIndex:p.styles.numberingIndex,defaultTabStopPt:p.styles.defaultTabStopPt,compatibilityMode:p.styles.compatibilityMode,displayMode:lb(m),revisionAuthorFilter:q,showFieldCodes:false,inlineDrawingLayoutForPart:k=>p.drawingBundle.contextForPart(k),drawingLayoutTokenForPart:k=>p.drawingBundle.cacheTokenForPart(k),drawingTokenForParagraphForPart:(k,he)=>p.drawingBundle.drawingTokenForParagraph(he,k),linkProjectors:p.links,projectFieldLink:k=>N.project(k)}),p.furniture.set(m,ee));for(let k=0;k<Le;k+=1){let he=h;p.drawingBundle.sync(p.view);let Fe=A();if(Fe)return Fe;let j=cr({view:p.view,revision:p.view.packageRevision(),measurer:p.measurer,cache:p.paragraphCache,session:Te,producer:g,styleCascade:p.styles.styleCascade,defaultTabStopPt:p.styles.defaultTabStopPt,numberingIndex:p.styles.numberingIndex,furniture:ee,compatibilityMode:p.styles.compatibilityMode,linkProjectors:p.links,projectFieldLink:S=>N.project(S),inlineDrawingLayout:p.drawingBundle.bodyContext,inlineDrawingLayoutForPart:S=>p.drawingBundle.contextForPart(S),drawingTokenForParagraph:S=>p.drawingBundle.drawingTokenForParagraph(S,p.view.part().name),drawingTokenForParagraphForPart:(S,te)=>p.drawingBundle.drawingTokenForParagraph(te,S),drawingLayoutEpoch:p.drawingBundle.cacheTokenForPart(p.view.part().name),drawingLayoutEpochForPart:S=>p.drawingBundle.cacheTokenForPart(S),displayMode:lb(m),revisionAuthorFilter:q,showFieldCodes:false,bodyBlockLimit:void 0,fieldResults:"atomic"});if(!Qn(j)){let S=A();if(S)return S;d||(kd(j),Zf(j),p.paragraphCache.clear(),p.sessions.delete(m),p.furniture.delete(m));let te=jr(j,D),Kr=te.length===0?zn:Object.freeze(yr(j,te)),zr=Zt(p.view,j),Wr={...j,...zr,reviewDisplayMode:m,...r?{revisionMarkup:r}:{},...n?{revisionAuthorSlots:n}:{},facingPages:[...D.parts.values()].some(Be=>Be.root.localName==="settings"&&Be.root.children.some(re=>re.kind!=="textValue"&&(re.localName==="mirrorMargins"||re.localName==="evenAndOddHeaders")&&!re.attributes.some(Ue=>Ue.localName==="val"&&["0","false","off"].includes(Ue.value)))),contentWarnings:sr(p.view),reviewArtifacts:Kr},_e=Br(Wr);return p.completed.set(m,{revision:E,pkg:D,internal:j,published:_e}),_e}let Ne=he;for(;p.drawingBundle.pendingResourceCount()>0;){await T(Ne,E,D,I),Ne=h,_();let S=A();if(S)return S}_();let je=A();if(je)return je}throw new M("nonConvergent",`Image resources did not reach quiescence after ${Le} layout passes`)},Ce=m=>{let w;try{w=Ur(m);}catch(E){return Promise.reject(E)}if(!x)return Promise.reject($());let R=x,p=R.inFlight.get(w);if(p)return p;let I=Y(w).catch(E=>{throw Gn(E)}).finally(()=>R.inFlight.delete(w));return R.inFlight.set(w,I),I};return {ok:true,session:{layout:()=>Ce(a),layoutFor:Ce,validatedImageBytes(m){let w=x;return !w||m.resource.kind!=="ready"?null:w.drawingBundle.mintValidatedBytes(m.resource.validatedHandle,m.resource.contentId)?.slice()??null},async chartFallbackResource(m){let w=x;if(!w||!m.chart||!m.chartFallbackResource)return;if(m.chartFallbackResource.kind!=="pending")return m.chartFallbackResource;let R,p=new Promise(I=>{R=setTimeout(()=>I(Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),u);});try{return await Promise.race([w.drawingBundle.resolveChartFallback(m.ownerPartName,m.drawingNodeId),p])}finally{clearTimeout(R);}},metafileBytes(m){let w=x,R=m.resource;if(!w||R.kind!=="unrenderable"||R.partName===null||R.reason!=="unsupported-format"&&R.reason!=="decode-failed")return null;let p=R.mime;if(p!=="image/x-emf"&&p!=="image/x-wmf")return null;let I=w.view.currentPackage().partBytes.get(R.partName);return !I||I.byteLength>q.maxEncodedBytes||Of(I)!==p?null:{mime:p,bytes:I.slice()}},dispose:G}}}export{tr as a,cn as b,ro as c,nr as d,Ir as e,kr as f,da as g,M as h,Xa as i};
|