@docx-editor.dev/core 2.35.0-canary.20261104032723.sha-43c2012 → 2.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/README.md +9 -14
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.ts +16 -11
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.ts +12 -12
  7. package/dist/binding.js +1 -1
  8. package/dist/{chrome-print-CK3v5NhC.d.ts → chrome-print-H0uSxdg3.d.ts} +70 -17
  9. package/dist/{chunk-AMOFXSEO.cjs → chunk-2C75IWUN.cjs} +1 -1
  10. package/dist/chunk-2NFQ7OXY.cjs +1 -0
  11. package/dist/chunk-2V3V57SC.js +3 -0
  12. package/dist/chunk-32YOHLEK.cjs +32 -0
  13. package/dist/chunk-4NISR27M.cjs +31 -0
  14. package/dist/chunk-5ZE7ROGP.js +31 -0
  15. package/dist/{chunk-LZ64O473.js → chunk-66ZAVRGB.js} +1 -1
  16. package/dist/{chunk-A5GMOQWD.js → chunk-6767S7UF.js} +1 -1
  17. package/dist/chunk-6BZINLEN.cjs +1 -0
  18. package/dist/{chunk-EBIMIIC3.js → chunk-AVGSD7FB.js} +5 -5
  19. package/dist/{chunk-TZTKEPCC.cjs → chunk-CBJMRC4L.cjs} +1 -1
  20. package/dist/chunk-DCILO4XD.cjs +236 -0
  21. package/dist/{chunk-FBGZOGLU.cjs → chunk-DSIDCA3V.cjs} +4 -4
  22. package/dist/chunk-FLEFHRJG.cjs +5 -0
  23. package/dist/chunk-FMSXJ22B.js +2 -0
  24. package/dist/{chunk-7ACXKFKO.js → chunk-I4OZW2NO.js} +1 -1
  25. package/dist/chunk-JGE2O6IF.cjs +3 -0
  26. package/dist/chunk-K2BBJDM7.js +32 -0
  27. package/dist/chunk-LMASPHYS.js +1 -0
  28. package/dist/chunk-NYZP5NM3.js +4 -0
  29. package/dist/chunk-P3XUE72N.js +236 -0
  30. package/dist/{chunk-JZ4LO3ZZ.js → chunk-Q5YVLUGG.js} +1 -1
  31. package/dist/chunk-QALWAAPL.cjs +4 -0
  32. package/dist/{chunk-ELR6HXOO.js → chunk-QDUMZYTX.js} +1 -1
  33. package/dist/chunk-QLANEOTJ.cjs +7 -0
  34. package/dist/{chunk-4NPNKO5U.cjs → chunk-SJV6WCTP.cjs} +1 -1
  35. package/dist/{chunk-I4WSXFY6.js → chunk-TMCMXIBT.js} +4 -4
  36. package/dist/{chunk-GTICLPKS.cjs → chunk-TY5CE2JR.cjs} +1 -1
  37. package/dist/chunk-UAUB5YV6.js +7 -0
  38. package/dist/{chunk-Q4MUV5KX.cjs → chunk-WWZWT26M.cjs} +1 -1
  39. package/dist/chunk-Y3JSN52G.cjs +2 -0
  40. package/dist/chunk-YD3KSZJM.js +1 -0
  41. package/dist/collaboration/replication.cjs +1 -1
  42. package/dist/collaboration/replication.d.ts +3 -3
  43. package/dist/collaboration/replication.js +1 -1
  44. package/dist/collaboration.d.ts +2 -2
  45. package/dist/contracts/document.d.ts +2 -2
  46. package/dist/contracts/editor.d.ts +8 -8
  47. package/dist/contracts/modules.cjs +1 -1
  48. package/dist/contracts/modules.d.ts +34 -13
  49. package/dist/contracts/modules.js +1 -1
  50. package/dist/contracts/types.d.ts +3 -3
  51. package/dist/{custom-node-writes-BC3z8NwO.d.ts → custom-node-writes-Cj0itq58.d.ts} +2 -2
  52. package/dist/{document-protection-8hXPdn5U.d.ts → document-protection-CDLoYQI3.d.ts} +1 -1
  53. package/dist/{drawing-graphic-kind-_5u2E4ee.d.ts → drawing-graphic-kind-8zt6pugF.d.ts} +2 -2
  54. package/dist/{drawing-preview-package-JyAqL6OV.d.ts → drawing-preview-package-8o9LSfzP.d.ts} +1 -1
  55. package/dist/{editor-BGCdE3tB.d.ts → editor-CujQcn1z.d.ts} +20 -10
  56. package/dist/editor.cjs +1 -1
  57. package/dist/editor.css +3 -3
  58. package/dist/editor.d.ts +52 -29
  59. package/dist/editor.js +1 -1
  60. package/dist/export.cjs +2 -2
  61. package/dist/export.d.ts +6 -6
  62. package/dist/export.js +1 -1
  63. package/dist/index.cjs +1 -1
  64. package/dist/index.d.ts +18 -18
  65. package/dist/index.js +1 -1
  66. package/dist/{layout-shaping-D2qNes9-.d.ts → layout-shaping-ZjLRz_qa.d.ts} +1 -1
  67. package/dist/layout.cjs +1 -1
  68. package/dist/layout.d.ts +25 -21
  69. package/dist/layout.js +1 -1
  70. package/dist/{note-properties-DGPzKUuA.d.ts → note-properties-BRpskBeh.d.ts} +1 -1
  71. package/dist/output.cjs +1 -1
  72. package/dist/output.d.ts +10 -10
  73. package/dist/output.js +1 -1
  74. package/dist/{protocol-0y3iaYj9.d.ts → protocol-GVVQQwCX.d.ts} +13 -2
  75. package/dist/{review-paragraph-order-DeQp2_iu.d.ts → review-paragraph-order-aEHnQTt7.d.ts} +5 -2
  76. package/dist/{revision-projection-CrAv-HP6.d.ts → revision-projection-vU_UiTLx.d.ts} +1 -1
  77. package/dist/{semantic-cell-selection-CeG_qqDV.d.ts → semantic-cell-selection-CaRIISu-.d.ts} +2 -2
  78. package/dist/{semantic-interaction-DcE_ZsiD.d.ts → semantic-interaction-LJtUJJS5.d.ts} +1 -1
  79. package/dist/{semantic-paint-DfeN6UQF.d.ts → semantic-paint-2LBYlQcn.d.ts} +11 -4
  80. package/dist/{semantic-record-queries-qwd9Ict6.d.ts → semantic-record-queries-C_YK2gCz.d.ts} +1 -1
  81. package/dist/{semantic-records-thL1rcmG.d.ts → semantic-records-AU2pIYRp.d.ts} +3 -3
  82. package/dist/store.cjs +1 -1
  83. package/dist/store.d.ts +1664 -1664
  84. package/dist/store.js +1 -1
  85. package/dist/{tree-op-types-CGlwCQXg.d.ts → tree-op-types-DmrePCMo.d.ts} +320 -11
  86. package/dist/{tree-package-store-D0_BOm-r.d.ts → tree-package-fragment-DXZ2B7x0.d.ts} +702 -691
  87. package/dist/{tree-session-contract-DkThhHjy.d.ts → tree-session-contract-D3e-5YNq.d.ts} +19 -4
  88. package/dist/{unsupported-elements-qj0sXi2s.d.ts → unsupported-elements-9Pz4I_F6.d.ts} +1 -1
  89. package/docs/accept-reject-without-scrolling.md +31 -48
  90. package/docs/comment-on-found-text.md +47 -23
  91. package/docs/custom-review-cards.md +50 -34
  92. package/docs/highlight-ranges.md +26 -6
  93. package/docs/index.md +21 -21
  94. package/docs/propose-rewrite.md +87 -138
  95. package/docs/tracked-replacement.md +41 -20
  96. package/package.json +2 -2
  97. package/dist/chunk-4C7JUJDX.cjs +0 -1
  98. package/dist/chunk-4HENIAFG.js +0 -1
  99. package/dist/chunk-6IYKYYWF.js +0 -32
  100. package/dist/chunk-CDAFCPT6.cjs +0 -3
  101. package/dist/chunk-CU6QPXKD.js +0 -2
  102. package/dist/chunk-EMITIPLN.js +0 -4
  103. package/dist/chunk-IGB66DIX.cjs +0 -30
  104. package/dist/chunk-JQPTNBLT.js +0 -236
  105. package/dist/chunk-JVWRILO3.cjs +0 -4
  106. package/dist/chunk-KOYEBRLV.js +0 -1
  107. package/dist/chunk-KZZPOZOF.cjs +0 -2
  108. package/dist/chunk-NPWMZIPA.cjs +0 -32
  109. package/dist/chunk-NS2QCOAS.js +0 -7
  110. package/dist/chunk-O2PGRL5D.js +0 -3
  111. package/dist/chunk-TFJUIP4X.cjs +0 -236
  112. package/dist/chunk-V3N4SOAK.cjs +0 -1
  113. package/dist/chunk-V6FOPP2H.js +0 -30
  114. package/dist/chunk-XFEIUKOS.cjs +0 -7
  115. package/dist/chunk-ZF4N3N3L.cjs +0 -5
package/dist/editor.d.ts CHANGED
@@ -9,46 +9,46 @@
9
9
  * @packageDocumentation
10
10
  * @public
11
11
  */
12
- import { O as OoxmlPart, b5 as TreeDocColorValue, r as ColorValue, aa as DrawingPositionInput, G as ParagraphTabStop, ar as Watermark } from './tree-op-types-CGlwCQXg.js';
13
- export { b6 as DEFAULT_IMAGE_RESOURCE_LIMITS, b7 as IMAGE_WRAP_TARGETS, ad as ImageDecodePort, ae as ImageResourceLimits, ag as ImageWrapTarget, F as ParagraphFlags, al as RenderableImageMime, R as ReviewModelInput, an as SupportedImageMime, b8 as TEXT_FORM_FORMATS, aq as VectorImageMime, b9 as resolveImageResourceLimits, ba as resolveSvgIntrinsicSize, bb as sniffImageMime, bc as validateRasterHeader } from './tree-op-types-CGlwCQXg.js';
14
- export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-D0_BOm-r.js';
15
- export { D as DrawingGraphicKind, a as DrawingSupport, b as DrawingSupportIssue } from './drawing-graphic-kind-_5u2E4ee.js';
16
- import { B as BookmarkNameProblem, D as DrawingPreviewPackageLimits, a as DrawingPreviewPackageResult } from './drawing-preview-package-JyAqL6OV.js';
17
- import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-DkThhHjy.js';
18
- export { a as TreeApplyResult } from './tree-session-contract-DkThhHjy.js';
19
- export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, RevisionMarkupDialog, RevisionMarkupDialogHost, resolveEditorModules } from './contracts/modules.js';
12
+ import { O as OoxmlPart, bp as TreeDocColorValue, N as ColorValue, at as DrawingPositionInput, a3 as ParagraphTabStop, aK as Watermark } from './tree-op-types-DmrePCMo.js';
13
+ export { an as COMPARE_DOCUMENTS_ACCEPT, c as CompareDocumentsBackgroundEngine, f as CompareDocumentsBackgroundResult, ao as CompareDocumentsChromeHandlers, C as CompareDocumentsDialogSession, b as CompareDocumentsEngine, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, k as CompareDocumentsOutcome, l as CompareDocumentsPhase, m as CompareDocumentsProgress, n as CompareDocumentsRefusalReason, o as CompareDocumentsRequest, bq as DEFAULT_IMAGE_RESOURCE_LIMITS, br as IMAGE_WRAP_TARGETS, aw as ImageDecodePort, ax as ImageResourceLimits, az as ImageWrapTarget, a2 as ParagraphFlags, aE as RenderableImageMime, R as ReviewModelInput, aG as SupportedImageMime, bs as TEXT_FORM_FORMATS, aJ as VectorImageMime, aN as compareDocumentsErrorKey, bt as resolveImageResourceLimits, bu as resolveSvgIntrinsicSize, bv as sniffImageMime, bw as validateRasterHeader } from './tree-op-types-DmrePCMo.js';
14
+ export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-fragment-DXZ2B7x0.js';
15
+ export { D as DrawingGraphicKind, a as DrawingSupport, b as DrawingSupportIssue } from './drawing-graphic-kind-8zt6pugF.js';
16
+ import { B as BookmarkNameProblem, D as DrawingPreviewPackageLimits, a as DrawingPreviewPackageResult } from './drawing-preview-package-8o9LSfzP.js';
17
+ import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-D3e-5YNq.js';
18
+ export { a as TreeApplyResult } from './tree-session-contract-D3e-5YNq.js';
19
+ export { CollectReviewItems, CompareDocumentsDialog, CompareDocumentsDialogHost, EditorModule, EditorModuleRegistry, ReviewModuleContribution, RevisionMarkupDialog, RevisionMarkupDialogHost, resolveEditorModules } from './contracts/modules.js';
20
20
  import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
21
- import { J as EditorFontError, W as EditorSnapshot, x as Editor, b as EditorCommand, C as CanResult, aR as ZoomMode, g as ClearAnchorHighlightOptions, c as AnchorHighlightOptions, aw as ScrollToAnchorOptions, av as ScrollPlacement, A as AnchorHighlightAnimation, a4 as HighlightRange, a6 as HighlightResult, a3 as HighlightOptions, aM as TextMatch, f as BookmarkSummary, B as BookmarkPlace } from './editor-BGCdE3tB.js';
22
- export { a2 as HighlightHit, a5 as HighlightRect, a9 as ImageContext, aa as ImageCropPercent, aS as ImageCropPermille, an as ReviewItemHit, ax as SelectedImageState, aJ as TableInteractionLabelKey, aO as TrackedChangeFilterMode, aP as TrackedChangePredicate, aT as cropPercentFromCropPermille, aU as cropPercentFromPermille, aV as cropPercentFromSourceCrop, aW as cropPermilleFromCropPercent, aX as cropPermilleFromPercent, aY as sourceCropFromCropPercent, aZ as validateImageCropPercent } from './editor-BGCdE3tB.js';
23
- import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-D2qNes9-.js';
24
- export { d as disposeLayoutShaping } from './layout-shaping-D2qNes9-.js';
21
+ import { J as EditorFontError, W as EditorSnapshot, x as Editor, b as EditorCommand, C as CanResult, aR as ZoomMode, g as ClearAnchorHighlightOptions, c as AnchorHighlightOptions, aw as ScrollToAnchorOptions, av as ScrollPlacement, A as AnchorHighlightAnimation, a4 as HighlightRange, a6 as HighlightResult, a3 as HighlightOptions, aM as TextMatch, f as BookmarkSummary, B as BookmarkPlace } from './editor-CujQcn1z.js';
22
+ export { a2 as HighlightHit, a5 as HighlightRect, a9 as ImageContext, aa as ImageCropPercent, aS as ImageCropPermille, an as ReviewItemHit, ax as SelectedImageState, aJ as TableInteractionLabelKey, aO as TrackedChangeFilterMode, aP as TrackedChangePredicate, aT as cropPercentFromCropPermille, aU as cropPercentFromPermille, aV as cropPercentFromSourceCrop, aW as cropPermilleFromCropPercent, aX as cropPermilleFromPercent, aY as sourceCropFromCropPercent, aZ as validateImageCropPercent } from './editor-CujQcn1z.js';
23
+ import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-ZjLRz_qa.js';
24
+ export { d as disposeLayoutShaping } from './layout-shaping-ZjLRz_qa.js';
25
25
  import { F as FontConfiguration } from './editor-fonts-D_-vjuJi.js';
26
26
  export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, m as MAX_RESOLVER_FAMILIES, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-Bm9XqTNO.js';
27
- import { ae as PaginatedSurfaceOptions, af as OpenPaginatedResult, ag as PaginatedSurface, ah as TableCommandPlan, z as DocxEditorInstance, ai as SurfaceFormatting } from './chrome-print-CK3v5NhC.js';
28
- export { aj as AnchorFrameOrigin, A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, ak as BookmarkMarkOptionsSource, C as CHROME_GROUPS, d as CHROME_MENUS, al as CHROME_UNAVAILABLE_KEY, am as ChromeControl, an as ChromeControlId, ao as ChromeControlState, e as ChromeExportError, f as ChromeExportFormat, g as ChromeExportHandlers, h as ChromeExportResult, i as ChromeExportView, ap as ChromeGroup, aq as ChromeGroupId, j as ChromeMenu, k as ChromeMenuEntry, l as ChromeMenuId, m as ChromeMenuItemEntry, n as ChromeMenuSeparatorEntry, o as ChromeMenuSubmenuEntry, p as ChromePrintError, q as ChromePrintErrorCode, r as ChromePrintJob, s as ChromePrintOptions, t as ChromeSlotId, u as CommentDraftChromeHandlers, v as ContentControlWidgetChromeHandlers, w as ContentControlWidgetSession, x as CustomFontsOptions, y as CustomFontsResolver, ar as DEFAULT_TABLE_CHROME_DRAFT, D as DocxEditorConfig, as as DrawingSelectionIntent, at as EMU_PER_POINT, au as EditorCommandExecute, E as EquationActivation, F as EquationChromeHandlers, av as EquationOps, aw as FinalizedImageOverlayInteraction, G as FontLoadFailure, H as FontLoadFailureReason, I as FontMeasurementState, J as FontUrlSource, ax as FormattingBarOptions, K as GoToChromeHandlers, L as HistoryGroupBinding, M as HistoryGroupBindingOptions, N as HyperlinkActivation, O as HyperlinkChromeHandlers, ay as HyperlinkOps, az as IMAGE_OVERLAY_NUDGE_PT, aA as IMAGE_OVERLAY_NUDGE_SHIFT_PT, aB as ImageInteractionSession, aC as ImageOverlayScrollPort, aD as ImageResizeHandle, aE as ImageResizeResult, P as InvalidTextFormFieldChromeHandlers, Q as InvalidTextFormFieldSession, R as LoadFontsRequest, S as LoadFontsResult, T as LockedControlNavigation, aF as OpeningIndicatorHost, aG as OverlayFrameRect, aH as PaginatedSurfaceState, aI as ParagraphPropertyEdit, U as PopupChromeRegistrationOptions, aJ as RemoteCaretLabelAnchor, aK as RemoteCaretLabelHost, aL as ReviewWriteIntent, aM as RunTableChromeCommandResult, aN as SectionAnchor, aO as SectionBreakInsertType, aP as SelectedDrawingOverlayTarget, V as SurfaceEquation, W as SurfaceHyperlink, aQ as SurfaceIndentAndListOps, aR as SurfaceInsertImageInput, aS as SurfaceNavigation, aT as SurfaceOverlayCoordinates, aU as SurfaceParagraphFormat, aV as TABLE_BORDER_STYLE_OPTIONS, aW as TABLE_BORDER_TARGET_OPTIONS, aX as TABLE_BORDER_WIDTH_OPTIONS, aY as TABLE_CHROME_SLOT_IDS, aZ as TableBorderStyleOption, a_ as TableBorderTargetOption, a$ as TableBorderTargetValue, b0 as TableBorderWidthOption, b1 as TableChromeDraft, b2 as TableChromePick, X as TableChromeSlotId, b3 as TextFormFieldChromeHandlers, b4 as TextFormFieldDialogSession, b5 as TocRemovalRefusal, Y as ToolbarCommandState, b6 as ToolbarSlotValue, Z as ToolbarValueMap, _ as ToolbarValueSlot, b7 as applyTableChromePick, $ as bindHistoryGroup, a0 as blankDocumentBytes, b8 as canExecuteImageCommand, b9 as captureImageMutationPreconditions, ba as chromeControlCount, a1 as chromeMenuSlots, bb as chromeProbeForSlot, bc as chromeSlotId, bd as chromeSlotIsToggle, be as commandExecOptions, a2 as commandForSlot, a3 as commandForSlotValue, bf as commandForTableChromeSlotValue, bg as computeImageResizeResult, bh as computeMovedImagePosition, bi as computeResizedImageExtentEmu, a4 as createDocxEditor, a5 as createFontSource, bj as createImageOverlayScrollPort, bk as cssPixelsToLayoutPoints, a6 as customFonts, bl as defaultChromeGroups, bm as defaultTableLabel, a7 as deferFonts, bn as emuToOverlayPoints, bo as equationAtPosition, bp as executeImageCommand, bq as finalizeImageOverlayInteraction, br as formattingBarChromeGroups, a8 as isChromePrintShortcut, bs as isStaleImageInteractionCommit, bt as isTableChromeSlot, bu as layoutPointsToCssPixels, a9 as loadFonts, bv as overlayFrameToSheetCssPixels, bw as overlayHostOrigin, bx as pointsToEmu, by as probeTableChromeCommand, bz as resizePreservesAspect, aa as runChromeExport, ab as runChromePrint, bA as runSave, bB as runTableChromeCommand, bC as runTableCommand, ac as runToolbarCommand, bD as selectedDrawingOverlayTargetOf, bE as selectedImageStateOf, bF as surfacePaintScale, bG as tableChromeIconPaths, bH as tableChromeLabelKeyForTarget, bI as tableChromeToolbarState, bJ as tableChromeVisible, bK as tableCommandToolbarState, ad as toolbarCommandState, bL as toolbarCommandStates } from './chrome-print-CK3v5NhC.js';
29
- import { a as AutomationCapabilities, b as AutomationHost, e as AutomationBatchRequest, f as AutomationBatchResponse } from './protocol-0y3iaYj9.js';
27
+ import { ai as PaginatedSurfaceOptions, aj as OpenPaginatedResult, ak as PaginatedSurface, al as TableCommandPlan, F as DocxEditorInstance, am as SurfaceFormatting } from './chrome-print-H0uSxdg3.js';
28
+ export { an as AnchorFrameOrigin, A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, ao as BookmarkMarkOptionsSource, C as CHROME_GROUPS, d as CHROME_MENUS, e as CHROME_PRINT_DISPLAY_MODES, ap as CHROME_UNAVAILABLE_KEY, aq as ChromeControl, ar as ChromeControlId, as as ChromeControlState, f as ChromeExportError, g as ChromeExportFormat, h as ChromeExportHandlers, i as ChromeExportResult, j as ChromeExportView, at as ChromeGroup, au as ChromeGroupId, k as ChromeMenu, l as ChromeMenuEntry, m as ChromeMenuId, n as ChromeMenuItemEntry, o as ChromeMenuSeparatorEntry, p as ChromeMenuSubmenuEntry, q as ChromePrintError, r as ChromePrintErrorCode, s as ChromePrintJob, t as ChromePrintOptions, u as ChromePrintSettings, v as ChromeSlotId, w as CommentDraftChromeHandlers, x as ContentControlWidgetChromeHandlers, y as ContentControlWidgetSession, z as CustomFontsOptions, D as CustomFontsResolver, av as DEFAULT_TABLE_CHROME_DRAFT, E as DocxEditorConfig, aw as DrawingSelectionIntent, ax as EMU_PER_POINT, ay as EditorCommandExecute, G as EquationActivation, H as EquationChromeHandlers, az as EquationOps, aA as FinalizedImageOverlayInteraction, I as FontLoadFailure, J as FontLoadFailureReason, K as FontMeasurementState, L as FontUrlSource, aB as FormattingBarOptions, M as GoToChromeHandlers, N as HistoryGroupBinding, O as HistoryGroupBindingOptions, P as HyperlinkActivation, Q as HyperlinkChromeHandlers, aC as HyperlinkOps, aD as IMAGE_OVERLAY_NUDGE_PT, aE as IMAGE_OVERLAY_NUDGE_SHIFT_PT, aF as ImageInteractionSession, aG as ImageOverlayScrollPort, aH as ImageResizeHandle, aI as ImageResizeResult, R as InvalidTextFormFieldChromeHandlers, S as InvalidTextFormFieldSession, T as LoadFontsRequest, U as LoadFontsResult, V as LockedControlNavigation, aJ as OpeningIndicatorHost, aK as OverlayFrameRect, aL as PaginatedSurfaceState, aM as ParagraphPropertyEdit, W as PopupChromeRegistrationOptions, aN as RemoteCaretLabelAnchor, aO as RemoteCaretLabelHost, X as ResolvedChromePrintSettings, aP as ReviewWriteIntent, aQ as RunTableChromeCommandResult, aR as SectionAnchor, aS as SectionBreakInsertType, aT as SelectedDrawingOverlayTarget, Y as SurfaceEquation, Z as SurfaceHyperlink, aU as SurfaceIndentAndListOps, aV as SurfaceInsertImageInput, aW as SurfaceNavigation, aX as SurfaceOverlayCoordinates, aY as SurfaceParagraphFormat, aZ as TABLE_BORDER_STYLE_OPTIONS, a_ as TABLE_BORDER_TARGET_OPTIONS, a$ as TABLE_BORDER_WIDTH_OPTIONS, b0 as TABLE_CHROME_SLOT_IDS, b1 as TableBorderStyleOption, b2 as TableBorderTargetOption, b3 as TableBorderTargetValue, b4 as TableBorderWidthOption, b5 as TableChromeDraft, b6 as TableChromePick, _ as TableChromeSlotId, b7 as TextFormFieldChromeHandlers, b8 as TextFormFieldDialogSession, b9 as TocRemovalRefusal, $ as ToolbarCommandState, ba as ToolbarSlotValue, a0 as ToolbarValueMap, a1 as ToolbarValueSlot, bb as applyTableChromePick, a2 as bindHistoryGroup, a3 as blankDocumentBytes, bc as canExecuteImageCommand, bd as captureImageMutationPreconditions, be as chromeControlCount, a4 as chromeMenuSlots, bf as chromeProbeForSlot, bg as chromeSlotId, bh as chromeSlotIsToggle, bi as commandExecOptions, a5 as commandForSlot, a6 as commandForSlotValue, bj as commandForTableChromeSlotValue, bk as computeImageResizeResult, bl as computeMovedImagePosition, bm as computeResizedImageExtentEmu, a7 as createDocxEditor, a8 as createFontSource, bn as createImageOverlayScrollPort, bo as cssPixelsToLayoutPoints, a9 as customFonts, bp as defaultChromeGroups, bq as defaultTableLabel, aa as deferFonts, br as emuToOverlayPoints, bs as equationAtPosition, bt as executeImageCommand, bu as finalizeImageOverlayInteraction, bv as formattingBarChromeGroups, ab as initialChromePrintSettings, ac as isChromePrintShortcut, bw as isStaleImageInteractionCommit, bx as isTableChromeSlot, by as layoutPointsToCssPixels, ad as loadFonts, bz as overlayFrameToSheetCssPixels, bA as overlayHostOrigin, bB as pointsToEmu, bC as probeTableChromeCommand, bD as resizePreservesAspect, ae as runChromeExport, af as runChromePrint, bE as runSave, bF as runTableChromeCommand, bG as runTableCommand, ag as runToolbarCommand, bH as selectedDrawingOverlayTargetOf, bI as selectedImageStateOf, bJ as surfacePaintScale, bK as tableChromeIconPaths, bL as tableChromeLabelKeyForTarget, bM as tableChromeToolbarState, bN as tableChromeVisible, bO as tableCommandToolbarState, ah as toolbarCommandState, bP as toolbarCommandStates } from './chrome-print-H0uSxdg3.js';
29
+ import { a as AutomationCapabilities, b as AutomationHost, e as AutomationBatchRequest, f as AutomationBatchResponse } from './protocol-GVVQQwCX.js';
30
30
  import { c as HistoryGroup } from './editor-scope-CA6egMaK.js';
31
31
  export { d as HistoryGroupOptions } from './editor-scope-CA6egMaK.js';
32
32
  import { E as EditDiagnosticCode, R as ReviewDiagnosticCode, k as ReviewOperation } from './diagnostic-hints-BTyb8yzX.js';
33
- import { S as SemanticLayout, T as TextMeasurer, U as UnsupportedElement } from './semantic-records-thL1rcmG.js';
34
- export { t as SectionProperties, u as SectionVerticalAlign, h as UnsupportedElementLayout, i as UnsupportedElementRule, v as unsupportedElementRuleMatches } from './semantic-records-thL1rcmG.js';
33
+ import { S as SemanticLayout, T as TextMeasurer, U as UnsupportedElement } from './semantic-records-AU2pIYRp.js';
34
+ export { t as SectionProperties, u as SectionVerticalAlign, h as UnsupportedElementLayout, i as UnsupportedElementRule, v as unsupportedElementRuleMatches } from './semantic-records-AU2pIYRp.js';
35
35
  import { ReviewPaneOverflow } from './contracts/types.js';
36
36
  export { CommentMarkerStyle, DEFAULT_REVIEW_PANE, ResolvedReviewPane, ReviewPaneItemFields, ReviewPaneOpening, ReviewPaneOptions, RevisionDisplay, resolveReviewPane, reviewPaneListsItem } from './contracts/types.js';
37
- export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup } from './revision-projection-CrAv-HP6.js';
38
- export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-DcE_ZsiD.js';
39
- export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-DfeN6UQF.js';
40
- export { U as UnsupportedElementHost, o as observeUnsupportedElements } from './unsupported-elements-qj0sXi2s.js';
37
+ export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup } from './revision-projection-vU_UiTLx.js';
38
+ export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-LJtUJJS5.js';
39
+ export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-2LBYlQcn.js';
40
+ export { U as UnsupportedElementHost, o as observeUnsupportedElements } from './unsupported-elements-9Pz4I_F6.js';
41
41
  export { CollaborationModuleContribution } from './collaboration.js';
42
- import './custom-node-writes-BC3z8NwO.js';
42
+ import './custom-node-writes-Cj0itq58.js';
43
43
  import 'prosemirror-model';
44
44
  import './collaboration/replication.js';
45
45
  import './failure-6KGFrDO9.js';
46
- import './document-protection-8hXPdn5U.js';
46
+ import './document-protection-CDLoYQI3.js';
47
47
  import './contracts/document.js';
48
48
  import './contracts/interaction.js';
49
- import './semantic-cell-selection-CeG_qqDV.js';
50
- import './note-properties-DGPzKUuA.js';
51
- import './semantic-record-queries-qwd9Ict6.js';
49
+ import './semantic-cell-selection-CaRIISu-.js';
50
+ import './note-properties-BRpskBeh.js';
51
+ import './semantic-record-queries-C_YK2gCz.js';
52
52
 
53
53
  declare function toEditorFontError(error: unknown): EditorFontError;
54
54
  declare function createLayoutShaping(configuration: FontConfiguration, instrumentation?: LayoutShapingInstrumentation, execution?: FontShapingOptions): Promise<LayoutShapingOptions>;
@@ -262,8 +262,8 @@ declare function storyLabelTop(storyRect: {
262
262
 
263
263
  /**
264
264
  * The message key saying why a selected text box frame takes no caret or offers no handles, or
265
- * null when it does both. Only in editing mode: viewing and suggesting refuse the edit
266
- * themselves, so the box is not what stops it.
265
+ * null when it does both. Not in viewing mode: viewing refuses the edit itself, so the box
266
+ * is not what stops it.
267
267
  *
268
268
  * @param target - The overlay target of the selected drawing.
269
269
  * @param editingMode - The surface's editing mode.
@@ -2200,6 +2200,29 @@ interface DocumentSearch {
2200
2200
  */
2201
2201
  declare function createDocumentSearch(editor: Editor): DocumentSearch;
2202
2202
 
2203
+ /**
2204
+ * The attribute that marks a Compare documents dialog's busy status: the step of a running
2205
+ * compare in words. {@link focusCompareDocumentsControl} focuses it while nothing else can
2206
+ * take focus.
2207
+ *
2208
+ * @public
2209
+ */
2210
+ declare const COMPARE_DOCUMENTS_PHASE_ATTRIBUTE = "data-docx-compare-phase";
2211
+ /**
2212
+ * Move focus to the control that is useful at `moment` in a Compare documents dialog:
2213
+ *
2214
+ * - `busy`: a compare started and Compare is disabled. Cancel when it stays enabled (a
2215
+ * background compare), else the busy status, else the dialog itself.
2216
+ * - `refused`: a compare was refused, or the file could not be read. The file input.
2217
+ * - `unchanged`: the documents have no differences. Compare, else the file input.
2218
+ *
2219
+ * The dialog's controls carry `data-docx-part` markers (`cancel`, `apply`) and the file
2220
+ * field `data-docx-field="revised"`. Focus never moves out of `dialog`.
2221
+ *
2222
+ * @public
2223
+ */
2224
+ declare function focusCompareDocumentsControl(dialog: HTMLElement | null | undefined, moment: 'busy' | 'refused' | 'unchanged'): void;
2225
+
2203
2226
  /** The font a text watermark uses when its options name none. @public */
2204
2227
  declare const DEFAULT_WATERMARK_FONT = "Calibri";
2205
2228
  /** A width and a height in points. @public */
@@ -2336,5 +2359,5 @@ declare function bookmarkDialogNameState(bookmarks: readonly BookmarkSummary[],
2336
2359
  */
2337
2360
  declare function drawingPreviewDocx(editor: DocxEditorInstance, element: Pick<UnsupportedElement, 'ownerPartName' | 'nodeId'>, limits?: DrawingPreviewPackageLimits): DrawingPreviewPackageResult;
2338
2361
 
2339
- export { AUTO_ZOOM_MODE, AnchorHighlightAnimation, AnchorHighlightOptions, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, ClearAnchorHighlightOptions, DEFAULT_WATERMARK_FONT, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocumentRefreshError, DocxEditorInstance, DrawingPositionInput, DrawingPreviewPackageLimits, DrawingPreviewPackageResult, FIT_WIDTH_ZOOM_MODE, FontShapingOptions, HIGHLIGHT_REFRESH_MS, HighlightOptions, HighlightRange, HighlightResult, HistoryGroup, LINE_SPACING_PRESETS, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, ParagraphTabStop, REVIEW_MARKERS_GUTTER_PX, ReviewDiagnosticCode, ReviewOperation, ReviewPaneOverflow, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, SPLIT_CELL_FALLBACK_MAX, ScrollPlacement, ScrollToAnchorOptions, SurfaceFormatting, TAB_ALIGNMENT_LABELS, TOOLBAR_COLLAPSE_ORDER, TOOLBAR_HOST_ITEM, TOOLBAR_ITEM_ATTRIBUTE, TOOLBAR_OVERFLOW_HYSTERESIS, TOOLBAR_PANEL_EDGE_MARGIN, TOOLBAR_PINNED_GROUPS, TWIPS_PER_CM, TWIPS_PER_INCH, TextMatch, TextMeasurer, TreeDocxSessionView, UnsupportedElement, ZOOM_MAX, ZOOM_MIN, alignmentAfterDirectionChange, applyThemeShade, applyThemeTint, arrangeToolbarGroups, barRoomWidth, beginEditorPreview, bookmarkDialogInitialName, bookmarkDialogNameState, bookmarkDialogRows, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, chordLetter, clipboardDropLandsText, clipboardPasteLandsContent, collapseOrder, contentControlPopupKeyDown, contentControlPopupOpener, controlsOverflow, copyEditorStyles, createBrowserAutomationHost, createContentControlListNavigation, createDocumentRefresh, createDocumentSearch, createLayoutShaping, dragIndent, drawingPreviewDocx, editorCommandKey, editorHostDocument, editorHostElement, editorHostWindow, editorInstanceScope, editorPreviewActive, firstDayOfWeek, formatInches, generateRulerTicks, goToBookmarkGroups, goToBookmarkMatch, goToBookmarkRows, goToBookmarkTarget, handlePosition, hasOpenNestedPopup, historyShortcutOf, hostDirectionOf, hostDocumentOf, hostTimers, hostWindowOf, inchesToTwips, initialSplitCellCounts, isDomNode, isElementNode, isGoToChord, isHTMLElementNode, isInputEvent, isKeyboardEvent, isMouseEvent, isPointerEvent, isTextNode, isoDateOf, keepScrollAtInlineEnd, lineSpacingMenuRowLabel, lineSpacingMenuRows, listenForOutsidePress, listenForPopupEscape, listenForPopupFocusLeave, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, observeHostDirection, openEditorWindow, parseIsoDate, partOfNodeId, placeSubmenu, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, readAvailableWidth, readColumnGap, readInlineMargins, readSplitCellCounts, readToolbarRow, reportAutomationException, reportAutomationRefusal, reportAutomationReviewSkip, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, reviewPaneEntitledZoom, rulerMarginTicks, rulerPageBox, rulerTabPosition, sameItemOverflow, sameTabStops, sameZoomMode, seedFields, separatorLeadingCost, shiftMonth, signedFirstLineOf, snapTwips, specialOf, storyLabelTop, submenuKeys, surfaceExtent, tableCommandState, textboxFrameReason, toEditorFontError, toolbarGroupItems, toolbarGroupPriority, toolbarGroupsKey, toolbarHostPanelShown, toolbarItemKey, toolbarOverflowItems, toolbarPanelPlacement, toolbarPopupLeft, toolbarShownCount, trailingGapCost, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, watchHighlights, watermarkShapeBox, withTabStop };
2362
+ export { AUTO_ZOOM_MODE, AnchorHighlightAnimation, AnchorHighlightOptions, BROWSER_AUTOMATION_CAPABILITIES, COMPARE_DOCUMENTS_PHASE_ATTRIBUTE, CONTENT_CONTROL_PICTURE_ACCEPT, ClearAnchorHighlightOptions, DEFAULT_WATERMARK_FONT, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocumentRefreshError, DocxEditorInstance, DrawingPositionInput, DrawingPreviewPackageLimits, DrawingPreviewPackageResult, FIT_WIDTH_ZOOM_MODE, FontShapingOptions, HIGHLIGHT_REFRESH_MS, HighlightOptions, HighlightRange, HighlightResult, HistoryGroup, LINE_SPACING_PRESETS, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, ParagraphTabStop, REVIEW_MARKERS_GUTTER_PX, ReviewDiagnosticCode, ReviewOperation, ReviewPaneOverflow, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, SPLIT_CELL_FALLBACK_MAX, ScrollPlacement, ScrollToAnchorOptions, SurfaceFormatting, TAB_ALIGNMENT_LABELS, TOOLBAR_COLLAPSE_ORDER, TOOLBAR_HOST_ITEM, TOOLBAR_ITEM_ATTRIBUTE, TOOLBAR_OVERFLOW_HYSTERESIS, TOOLBAR_PANEL_EDGE_MARGIN, TOOLBAR_PINNED_GROUPS, TWIPS_PER_CM, TWIPS_PER_INCH, TextMatch, TextMeasurer, TreeDocxSessionView, UnsupportedElement, ZOOM_MAX, ZOOM_MIN, alignmentAfterDirectionChange, applyThemeShade, applyThemeTint, arrangeToolbarGroups, barRoomWidth, beginEditorPreview, bookmarkDialogInitialName, bookmarkDialogNameState, bookmarkDialogRows, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, chordLetter, clipboardDropLandsText, clipboardPasteLandsContent, collapseOrder, contentControlPopupKeyDown, contentControlPopupOpener, controlsOverflow, copyEditorStyles, createBrowserAutomationHost, createContentControlListNavigation, createDocumentRefresh, createDocumentSearch, createLayoutShaping, dragIndent, drawingPreviewDocx, editorCommandKey, editorHostDocument, editorHostElement, editorHostWindow, editorInstanceScope, editorPreviewActive, firstDayOfWeek, focusCompareDocumentsControl, formatInches, generateRulerTicks, goToBookmarkGroups, goToBookmarkMatch, goToBookmarkRows, goToBookmarkTarget, handlePosition, hasOpenNestedPopup, historyShortcutOf, hostDirectionOf, hostDocumentOf, hostTimers, hostWindowOf, inchesToTwips, initialSplitCellCounts, isDomNode, isElementNode, isGoToChord, isHTMLElementNode, isInputEvent, isKeyboardEvent, isMouseEvent, isPointerEvent, isTextNode, isoDateOf, keepScrollAtInlineEnd, lineSpacingMenuRowLabel, lineSpacingMenuRows, listenForOutsidePress, listenForPopupEscape, listenForPopupFocusLeave, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, observeHostDirection, openEditorWindow, parseIsoDate, partOfNodeId, placeSubmenu, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, readAvailableWidth, readColumnGap, readInlineMargins, readSplitCellCounts, readToolbarRow, reportAutomationException, reportAutomationRefusal, reportAutomationReviewSkip, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, reviewPaneEntitledZoom, rulerMarginTicks, rulerPageBox, rulerTabPosition, sameItemOverflow, sameTabStops, sameZoomMode, seedFields, separatorLeadingCost, shiftMonth, signedFirstLineOf, snapTwips, specialOf, storyLabelTop, submenuKeys, surfaceExtent, tableCommandState, textboxFrameReason, toEditorFontError, toolbarGroupItems, toolbarGroupPriority, toolbarGroupsKey, toolbarHostPanelShown, toolbarItemKey, toolbarOverflowItems, toolbarPanelPlacement, toolbarPopupLeft, toolbarShownCount, trailingGapCost, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, watchHighlights, watermarkShapeBox, withTabStop };
2340
2363
  export type { BarRoomInput, BookmarkDialogNameState, BookmarkSortOrder, BrowserAutomationHost, CalendarDay, CalendarMonth, CalendarMonthOptions, ClearRefreshHighlightsOptions, ColorLowerResult, ContentControlListNavigation, DocumentRefresh, DocumentRefreshState, DocumentSearch, DocumentSearchFindOptions, DocumentSearchHighlight, DocumentSearchNavigateOptions, DocumentSearchOptions, DocumentSearchState, EditorPreviewFork, EditorPreviewRefusal, EditorWindow, GoToBookmarkGroup, HighlightSource, HighlightWatch, HistoryGroupRun, HistoryShortcutKeys, HostTimers, HostWindow, LineSpacingMenuRow, LineSpacingMenuValue, NavigateToChangeOptions, OpenEditorWindowOptions, OutsidePressOptions, ParagraphDialogFields, ParagraphDialogMixed, ParagraphFlagKey, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, PopupEscapeOptions, PopupFocusLeaveOptions, RefreshChange, RefreshChangeInput, RefreshFailureCode, RefreshHighlightAnimation, RefreshHighlightOptions, RefreshLocation, RefreshResult, RefreshSubmission, RefreshUpdate, RulerDragOptions, RulerIndent, RulerIndentHandle, RulerMarginTick, RulerPageMetrics, RulerTick, RulerUnit, SpecialIndent, SplitCellCountProblem, SplitCellCounts, SplitCellLimits, SurfaceExtent, TabAlignment, TabLeaderName, ToolbarFitGroup, ToolbarHostGroupPlacement, ToolbarItemFitInput, ToolbarItemOverflow, ToolbarPanelPlacement, ToolbarRowMemory, ToolbarRowReading, WatchHighlightsOptions, WatermarkSize };
package/dist/editor.js CHANGED
@@ -1 +1 @@
1
- export{mc as AUTO_ZOOM_MODE,sc as BROWSER_AUTOMATION_CAPABILITIES,Bb as CHROME_GROUPS,Fb as CHROME_MENUS,Ib as CHROME_UNAVAILABLE_KEY,Nb as CONTENT_CONTROL_PICTURE_ACCEPT,kd as ChromeExportError,md as ChromePrintError,c as DEFAULT_REVIEW_PANE,Ba as DEFAULT_TABLE_CHROME_DRAFT,ea as DEFAULT_WATERMARK_FONT,bd as DocumentRefreshError,na as EMU_PER_POINT,nc as FIT_WIDTH_ZOOM_MODE,dd as HIGHLIGHT_REFRESH_MS,wa as IMAGE_OVERLAY_NUDGE_PT,xa as IMAGE_OVERLAY_NUDGE_SHIFT_PT,_c as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,Pc as NO_MIXED_FIELDS,M as PX_PER_CM,L as PX_PER_INCH,jc as REVIEW_MARKERS_GUTTER_PX,fd as SEARCH_DEBOUNCE_MS,id as SEARCH_HIGHLIGHT_PRIORITY,hd as SEARCH_HIGHLIGHT_SET,gd as SEARCH_MATCH_LIMIT,S as SNAP_TWIPS_CM,R as SNAP_TWIPS_INCH,Wc as SPLIT_CELL_FALLBACK_MAX,Ha as TABLE_BORDER_STYLE_OPTIONS,Ga as TABLE_BORDER_TARGET_OPTIONS,Ia as TABLE_BORDER_WIDTH_OPTIONS,Ca as TABLE_CHROME_SLOT_IDS,Lc as TAB_ALIGNMENT_LABELS,$a as TOOLBAR_COLLAPSE_ORDER,jb as TOOLBAR_HOST_ITEM,ib as TOOLBAR_ITEM_ATTRIBUTE,bb as TOOLBAR_OVERFLOW_HYSTERESIS,fb as TOOLBAR_PANEL_EDGE_MARGIN,ab as TOOLBAR_PINNED_GROUPS,Q as TWIPS_PER_CM,P as TWIPS_PER_INCH,lc as ZOOM_MAX,kc as ZOOM_MIN,Tc as alignmentAfterDirectionChange,Ja as applyTableChromePick,$ as applyThemeShade,_ as applyThemeTint,eb as arrangeToolbarGroups,vb as barRoomWidth,ic as beginEditorPreview,Zc as bindHistoryGroup,h as blankDocumentBytes,ud as bookmarkDialogInitialName,vd as bookmarkDialogNameState,pd as bookmarkDialogRows,Vb as calendarDateForKey,Xb as calendarDateFromText,Wb as calendarDateText,Tb as calendarMonth,Yb as calendarMonthNames,Rb as calendarMonthTitle,Sb as calendarWeekdays,ua as canExecuteImageCommand,ta as captureImageMutationPreconditions,Sc as changedFields,zb as chordLetter,Hb as chromeControlCount,Gb as chromeMenuSlots,Na as chromeProbeForSlot,Cb as chromeSlotId,Ta as chromeSlotIsToggle,C as clipboardDropLandsText,B as clipboardPasteLandsContent,db as collapseOrder,Y as commandExecOptions,Oa as commandForSlot,Qa as commandForSlotValue,Pa as commandForTableChromeSlotValue,Fc as computeImageResizeResult,ra as computeMovedImagePosition,qa as computeResizedImageExtentEmu,Lb as contentControlPopupKeyDown,Mb as contentControlPopupOpener,wb as controlsOverflow,E as copyEditorStyles,tc as createBrowserAutomationHost,Zb as createContentControlListNavigation,cd as createDocumentRefresh,jd as createDocumentSearch,rc as createDocxEditor,J as createFontSource,Gc as createImageOverlayScrollPort,b as createLayoutShaping,la as cropPercentFromCropPermille,ja as cropPercentFromPermille,ga as cropPercentFromSourceCrop,ka as cropPermilleFromCropPercent,ia as cropPermilleFromPercent,Bc as cssPixelsToLayoutPoints,K as customFonts,Db as defaultChromeGroups,Da as defaultTableLabel,g as deferFonts,V as dragIndent,xd as drawingPreviewDocx,_a as editorCommandKey,l as editorHostDocument,k as editorHostElement,m as editorHostWindow,uc as editorInstanceScope,hc as editorPreviewActive,pa as emuToOverlayPoints,ac as equationAtPosition,va as executeImageCommand,Hc as finalizeImageOverlayInteraction,Qb as firstDayOfWeek,Jc as formatInches,Eb as formattingBarChromeGroups,N as generateRulerTicks,td as goToBookmarkGroups,sd as goToBookmarkMatch,qd as goToBookmarkRows,rd as goToBookmarkTarget,T as handlePosition,wc as hasOpenNestedPopup,$b as historyShortcutOf,z as hostDirectionOf,i as hostDocumentOf,r as hostTimers,j as hostWindowOf,Kc as inchesToTwips,Yc as initialSplitCellCounts,nd as isChromePrintShortcut,q as isDomNode,n as isElementNode,Ab as isGoToChord,o as isHTMLElementNode,v as isInputEvent,s as isKeyboardEvent,u as isMouseEvent,t as isPointerEvent,za as isStaleImageInteractionCommit,Ea as isTableChromeSlot,p as isTextNode,Ob as isoDateOf,w as keepScrollAtInlineEnd,Ac as layoutPointsToCssPixels,ad as lineSpacingMenuRowLabel,$c as lineSpacingMenuRows,yc as listenForOutsidePress,vc as listenForPopupEscape,xc as listenForPopupFocusLeave,I as loadFonts,ba as lowerColorValueForBorder,ca as lowerColorValueForFill,Qc as mixedFieldsOf,bc as mountPaginatedSurface,Kb as observeContentControlPopup,A as observeHostDirection,D as openEditorWindow,Cc as overlayFrameToSheetCssPixels,Dc as overlayHostOrigin,Pb as parseIsoDate,H as partOfNodeId,x as placeSubmenu,oa as pointsToEmu,Jb as positionContentControlPopup,Ka as probeTableChromeCommand,xb as readAvailableWidth,ub as readColumnGap,tb as readInlineMargins,Xc as readSplitCellCounts,yb as readToolbarRow,gc as reportAutomationException,ec as reportAutomationRefusal,fc as reportAutomationReviewSkip,Ec as resizePreservesAspect,da as resolveColorValueToCss,d as resolveReviewPane,aa as resolveThemeColorHex,oc as resolveZoomMode,qc as reviewPaneEntitledZoom,e as reviewPaneListsItem,X as rulerMarginTicks,O as rulerPageBox,W as rulerTabPosition,ld as runChromeExport,od as runChromePrint,Xa as runSave,Va as runTableChromeCommand,Za as runTableCommand,Wa as runToolbarCommand,pb as sameItemOverflow,Rc as sameTabStops,pc as sameZoomMode,Oc as seedFields,ya as selectedDrawingOverlayTargetOf,sa as selectedImageStateOf,rb as separatorLeadingCost,Ub as shiftMonth,Nc as signedFirstLineOf,U as snapTwips,ha as sourceCropFromCropPercent,Mc as specialOf,F as storyLabelTop,y as submenuKeys,_b as surfaceExtent,zc as surfacePaintScale,Ma as tableChromeIconPaths,La as tableChromeLabelKeyForTarget,Ra as tableChromeToolbarState,Fa as tableChromeVisible,Aa as tableCommandState,Ya as tableCommandToolbarState,G as textboxFrameReason,a as toEditorFontError,Sa as toolbarCommandState,Ua as toolbarCommandStates,mb as toolbarGroupItems,cb as toolbarGroupPriority,lb as toolbarGroupsKey,nb as toolbarHostPanelShown,kb as toolbarItemKey,qb as toolbarOverflowItems,gb as toolbarPanelPlacement,hb as toolbarPopupLeft,ob as toolbarShownCount,sb as trailingGapCost,Vc as trapTabWithin,Ic as twipsToInches,wd as unsupportedElementRuleMatches,ma as validateImageCropPercent,Z as validateThemeModifier,ed as watchHighlights,fa as watermarkShapeBox,Uc as withTabStop}from'./chunk-V6FOPP2H.js';export{a as resolveEditorModules}from'./chunk-4HENIAFG.js';export{c as observeUnsupportedElements}from'./chunk-I4WSXFY6.js';export{d as DEFAULT_FONT,n as FONT_RESOLVER_BRAND,m as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,s as composeFontOrigins,o as defineFontResolver,p as isFontResolver}from'./chunk-CU6QPXKD.js';export{t as disposeLayoutShaping}from'./chunk-O2PGRL5D.js';import'./chunk-RIYSCEFQ.js';import'./chunk-NS2QCOAS.js';import'./chunk-KOYEBRLV.js';export{gb as DEFAULT_REVISION_MARKUP,fb as REVISION_MARKUP_COLORS,hb as resolveRevisionMarkup}from'./chunk-6IYKYYWF.js';import'./chunk-EBIMIIC3.js';import'./chunk-ELR6HXOO.js';import'./chunk-JZ4LO3ZZ.js';import'./chunk-A5GMOQWD.js';import'./chunk-LZ64O473.js';import'./chunk-EMITIPLN.js';import'./chunk-WN7ICTA5.js';import'./chunk-7ACXKFKO.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,hn as DRAWING_REL_FROM_H,in as DRAWING_REL_FROM_V,Oe as IMAGE_WRAP_TARGETS,Dk as TEXT_FORM_FORMATS,kn as positionInputFromPropertiesCommand,jn as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,Sf as resolveSvgIntrinsicSize,Of as sniffImageMime,gn as validateDrawingPositionInput,Tf as validateRasterHeader,ln as validateSetImagePositionCommand}from'./chunk-JQPTNBLT.js';import'./chunk-S6J4O5XP.js';
1
+ export{mc as AUTO_ZOOM_MODE,sc as BROWSER_AUTOMATION_CAPABILITIES,Bb as CHROME_GROUPS,Fb as CHROME_MENUS,od as CHROME_PRINT_DISPLAY_MODES,Ib as CHROME_UNAVAILABLE_KEY,rd as COMPARE_DOCUMENTS_ACCEPT,td as COMPARE_DOCUMENTS_PHASE_ATTRIBUTE,Nb as CONTENT_CONTROL_PICTURE_ACCEPT,kd as ChromeExportError,md as ChromePrintError,c as DEFAULT_REVIEW_PANE,Ba as DEFAULT_TABLE_CHROME_DRAFT,ea as DEFAULT_WATERMARK_FONT,bd as DocumentRefreshError,na as EMU_PER_POINT,nc as FIT_WIDTH_ZOOM_MODE,dd as HIGHLIGHT_REFRESH_MS,wa as IMAGE_OVERLAY_NUDGE_PT,xa as IMAGE_OVERLAY_NUDGE_SHIFT_PT,_c as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,Pc as NO_MIXED_FIELDS,M as PX_PER_CM,L as PX_PER_INCH,jc as REVIEW_MARKERS_GUTTER_PX,fd as SEARCH_DEBOUNCE_MS,id as SEARCH_HIGHLIGHT_PRIORITY,hd as SEARCH_HIGHLIGHT_SET,gd as SEARCH_MATCH_LIMIT,S as SNAP_TWIPS_CM,R as SNAP_TWIPS_INCH,Wc as SPLIT_CELL_FALLBACK_MAX,Ha as TABLE_BORDER_STYLE_OPTIONS,Ga as TABLE_BORDER_TARGET_OPTIONS,Ia as TABLE_BORDER_WIDTH_OPTIONS,Ca as TABLE_CHROME_SLOT_IDS,Lc as TAB_ALIGNMENT_LABELS,$a as TOOLBAR_COLLAPSE_ORDER,jb as TOOLBAR_HOST_ITEM,ib as TOOLBAR_ITEM_ATTRIBUTE,bb as TOOLBAR_OVERFLOW_HYSTERESIS,fb as TOOLBAR_PANEL_EDGE_MARGIN,ab as TOOLBAR_PINNED_GROUPS,Q as TWIPS_PER_CM,P as TWIPS_PER_INCH,lc as ZOOM_MAX,kc as ZOOM_MIN,Tc as alignmentAfterDirectionChange,Ja as applyTableChromePick,$ as applyThemeShade,_ as applyThemeTint,eb as arrangeToolbarGroups,vb as barRoomWidth,ic as beginEditorPreview,Zc as bindHistoryGroup,h as blankDocumentBytes,Ad as bookmarkDialogInitialName,Bd as bookmarkDialogNameState,vd as bookmarkDialogRows,Vb as calendarDateForKey,Xb as calendarDateFromText,Wb as calendarDateText,Tb as calendarMonth,Yb as calendarMonthNames,Rb as calendarMonthTitle,Sb as calendarWeekdays,ua as canExecuteImageCommand,ta as captureImageMutationPreconditions,Sc as changedFields,zb as chordLetter,Hb as chromeControlCount,Gb as chromeMenuSlots,Na as chromeProbeForSlot,Cb as chromeSlotId,Ta as chromeSlotIsToggle,C as clipboardDropLandsText,B as clipboardPasteLandsContent,db as collapseOrder,Y as commandExecOptions,Oa as commandForSlot,Qa as commandForSlotValue,Pa as commandForTableChromeSlotValue,sd as compareDocumentsErrorKey,Fc as computeImageResizeResult,ra as computeMovedImagePosition,qa as computeResizedImageExtentEmu,Lb as contentControlPopupKeyDown,Mb as contentControlPopupOpener,wb as controlsOverflow,E as copyEditorStyles,tc as createBrowserAutomationHost,Zb as createContentControlListNavigation,cd as createDocumentRefresh,jd as createDocumentSearch,rc as createDocxEditor,J as createFontSource,Gc as createImageOverlayScrollPort,b as createLayoutShaping,la as cropPercentFromCropPermille,ja as cropPercentFromPermille,ga as cropPercentFromSourceCrop,ka as cropPermilleFromCropPercent,ia as cropPermilleFromPercent,Bc as cssPixelsToLayoutPoints,K as customFonts,Db as defaultChromeGroups,Da as defaultTableLabel,g as deferFonts,V as dragIndent,Dd as drawingPreviewDocx,_a as editorCommandKey,l as editorHostDocument,k as editorHostElement,m as editorHostWindow,uc as editorInstanceScope,hc as editorPreviewActive,pa as emuToOverlayPoints,ac as equationAtPosition,va as executeImageCommand,Hc as finalizeImageOverlayInteraction,Qb as firstDayOfWeek,ud as focusCompareDocumentsControl,Jc as formatInches,Eb as formattingBarChromeGroups,N as generateRulerTicks,zd as goToBookmarkGroups,yd as goToBookmarkMatch,wd as goToBookmarkRows,xd as goToBookmarkTarget,T as handlePosition,wc as hasOpenNestedPopup,$b as historyShortcutOf,z as hostDirectionOf,i as hostDocumentOf,r as hostTimers,j as hostWindowOf,Kc as inchesToTwips,pd as initialChromePrintSettings,Yc as initialSplitCellCounts,nd as isChromePrintShortcut,q as isDomNode,n as isElementNode,Ab as isGoToChord,o as isHTMLElementNode,v as isInputEvent,s as isKeyboardEvent,u as isMouseEvent,t as isPointerEvent,za as isStaleImageInteractionCommit,Ea as isTableChromeSlot,p as isTextNode,Ob as isoDateOf,w as keepScrollAtInlineEnd,Ac as layoutPointsToCssPixels,ad as lineSpacingMenuRowLabel,$c as lineSpacingMenuRows,yc as listenForOutsidePress,vc as listenForPopupEscape,xc as listenForPopupFocusLeave,I as loadFonts,ba as lowerColorValueForBorder,ca as lowerColorValueForFill,Qc as mixedFieldsOf,bc as mountPaginatedSurface,Kb as observeContentControlPopup,A as observeHostDirection,D as openEditorWindow,Cc as overlayFrameToSheetCssPixels,Dc as overlayHostOrigin,Pb as parseIsoDate,H as partOfNodeId,x as placeSubmenu,oa as pointsToEmu,Jb as positionContentControlPopup,Ka as probeTableChromeCommand,xb as readAvailableWidth,ub as readColumnGap,tb as readInlineMargins,Xc as readSplitCellCounts,yb as readToolbarRow,gc as reportAutomationException,ec as reportAutomationRefusal,fc as reportAutomationReviewSkip,Ec as resizePreservesAspect,da as resolveColorValueToCss,d as resolveReviewPane,aa as resolveThemeColorHex,oc as resolveZoomMode,qc as reviewPaneEntitledZoom,e as reviewPaneListsItem,X as rulerMarginTicks,O as rulerPageBox,W as rulerTabPosition,ld as runChromeExport,qd as runChromePrint,Xa as runSave,Va as runTableChromeCommand,Za as runTableCommand,Wa as runToolbarCommand,pb as sameItemOverflow,Rc as sameTabStops,pc as sameZoomMode,Oc as seedFields,ya as selectedDrawingOverlayTargetOf,sa as selectedImageStateOf,rb as separatorLeadingCost,Ub as shiftMonth,Nc as signedFirstLineOf,U as snapTwips,ha as sourceCropFromCropPercent,Mc as specialOf,F as storyLabelTop,y as submenuKeys,_b as surfaceExtent,zc as surfacePaintScale,Ma as tableChromeIconPaths,La as tableChromeLabelKeyForTarget,Ra as tableChromeToolbarState,Fa as tableChromeVisible,Aa as tableCommandState,Ya as tableCommandToolbarState,G as textboxFrameReason,a as toEditorFontError,Sa as toolbarCommandState,Ua as toolbarCommandStates,mb as toolbarGroupItems,cb as toolbarGroupPriority,lb as toolbarGroupsKey,nb as toolbarHostPanelShown,kb as toolbarItemKey,qb as toolbarOverflowItems,gb as toolbarPanelPlacement,hb as toolbarPopupLeft,ob as toolbarShownCount,sb as trailingGapCost,Vc as trapTabWithin,Ic as twipsToInches,Cd as unsupportedElementRuleMatches,ma as validateImageCropPercent,Z as validateThemeModifier,ed as watchHighlights,fa as watermarkShapeBox,Uc as withTabStop}from'./chunk-5ZE7ROGP.js';export{a as resolveEditorModules}from'./chunk-YD3KSZJM.js';export{c as observeUnsupportedElements}from'./chunk-TMCMXIBT.js';export{d as DEFAULT_FONT,n as FONT_RESOLVER_BRAND,m as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,s as composeFontOrigins,o as defineFontResolver,p as isFontResolver}from'./chunk-FMSXJ22B.js';export{t as disposeLayoutShaping}from'./chunk-2V3V57SC.js';import'./chunk-RIYSCEFQ.js';import'./chunk-UAUB5YV6.js';import'./chunk-LMASPHYS.js';export{hb as DEFAULT_REVISION_MARKUP,gb as REVISION_MARKUP_COLORS,ib as resolveRevisionMarkup}from'./chunk-K2BBJDM7.js';import'./chunk-AVGSD7FB.js';import'./chunk-QDUMZYTX.js';import'./chunk-Q5YVLUGG.js';import'./chunk-6767S7UF.js';import'./chunk-66ZAVRGB.js';import'./chunk-NYZP5NM3.js';import'./chunk-WN7ICTA5.js';import'./chunk-I4OZW2NO.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,kn as DRAWING_REL_FROM_H,ln as DRAWING_REL_FROM_V,Oe as IMAGE_WRAP_TARGETS,Gk as TEXT_FORM_FORMATS,nn as positionInputFromPropertiesCommand,mn as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,Sf as resolveSvgIntrinsicSize,Of as sniffImageMime,jn as validateDrawingPositionInput,Tf as validateRasterHeader,on as validateSetImagePositionCommand}from'./chunk-P3XUE72N.js';import'./chunk-S6J4O5XP.js';
package/dist/export.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkKZZPOZOF_cjs=require('./chunk-KZZPOZOF.cjs'),chunkCDAFCPT6_cjs=require('./chunk-CDAFCPT6.cjs'),chunk4C7JUJDX_cjs=require('./chunk-4C7JUJDX.cjs'),chunkNPWMZIPA_cjs=require('./chunk-NPWMZIPA.cjs'),chunk4NPNKO5U_cjs=require('./chunk-4NPNKO5U.cjs');require('./chunk-Q4MUV5KX.cjs'),require('./chunk-AMOFXSEO.cjs');var chunkJVWRILO3_cjs=require('./chunk-JVWRILO3.cjs'),chunkTFJUIP4X_cjs=require('./chunk-TFJUIP4X.cjs');function Yt(e,o,t){let n=chunkTFJUIP4X_cjs.be().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:chunkNPWMZIPA_cjs.n(y+Math.round(b.originX*f)),originY:chunkNPWMZIPA_cjs.n(Math.round(b.originY*f)),offsetX:chunkNPWMZIPA_cjs.n(Math.round(b.offsetX*f)),offsetY:chunkNPWMZIPA_cjs.n(Math.round(b.offsetY*f)),advanceX:chunkNPWMZIPA_cjs.n(Math.round(b.advanceX*f)),advanceY:chunkNPWMZIPA_cjs.n(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=chunkNPWMZIPA_cjs.n(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:chunkNPWMZIPA_cjs.n(T.advance+I),caretEdges:[chunkNPWMZIPA_cjs.n(0),chunkNPWMZIPA_cjs.n(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>chunkNPWMZIPA_cjs.n(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:chunkNPWMZIPA_cjs.r({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:chunkNPWMZIPA_cjs.n(c+h.originX),originY:chunkNPWMZIPA_cjs.n(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return chunkNPWMZIPA_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunkNPWMZIPA_cjs.n(f),descent:chunkNPWMZIPA_cjs.n(E),lineGap:chunkNPWMZIPA_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return chunkNPWMZIPA_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof chunkNPWMZIPA_cjs.d)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:chunkNPWMZIPA_cjs.r({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=chunkNPWMZIPA_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:chunkNPWMZIPA_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkNPWMZIPA_cjs.d?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof chunkNPWMZIPA_cjs.d||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkKZZPOZOF_cjs.q))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkKZZPOZOF_cjs.r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunk4C7JUJDX_cjs.h("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkNPWMZIPA_cjs.h(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof chunkNPWMZIPA_cjs.d?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=chunkNPWMZIPA_cjs.Ga(n.style,n.fontSlot),r=chunkNPWMZIPA_cjs.Dd(n)?chunkNPWMZIPA_cjs.Ed(n):chunkNPWMZIPA_cjs.na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunkTFJUIP4X_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunkCDAFCPT6_cjs.Q(e.shaper,e.environment,i,a,t))return null;let p=chunkCDAFCPT6_cjs.P(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=chunkNPWMZIPA_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunkCDAFCPT6_cjs.d(),chunkCDAFCPT6_cjs.h({...chunkCDAFCPT6_cjs.i,maxFontBytes:chunkNPWMZIPA_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunkCDAFCPT6_cjs.ga(e,{resolveFont(t){return St(e,o,t)},fallback:chunkNPWMZIPA_cjs.ta()})}async function Lt(e,o,t=[],n=false,a){if(!chunkCDAFCPT6_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunkCDAFCPT6_cjs.k(a,chunkCDAFCPT6_cjs.i),s=await At(),i=Et(await chunkCDAFCPT6_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunkNPWMZIPA_cjs.sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunkCDAFCPT6_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunkCDAFCPT6_cjs.k(t,chunkCDAFCPT6_cjs.i),a=chunkCDAFCPT6_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunkCDAFCPT6_cjs.o(e)}|${a}`,p=C.get(i);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=chunkCDAFCPT6_cjs.n(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await chunkCDAFCPT6_cjs.t(e,f,n,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i,p),p.catch(()=>{C.get(i)===p&&C.delete(i);});}let l=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${chunkNPWMZIPA_cjs.sa}`].join("|"),extensionFingerprint:l}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=chunkTFJUIP4X_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkTFJUIP4X_cjs.Rg(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkKZZPOZOF_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunkNPWMZIPA_cjs.h(s))),r=chunkKZZPOZOF_cjs.K(t,{maxFontBytes:chunkNPWMZIPA_cjs.a,aggregateBudget:Fo(n),shadowedRequests:a});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkNPWMZIPA_cjs.c:Math.max(0,chunkNPWMZIPA_cjs.c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>chunkNPWMZIPA_cjs.c)throw new chunk4C7JUJDX_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunkNPWMZIPA_cjs.c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkTFJUIP4X_cjs.pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunkJVWRILO3_cjs.Ba(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof chunk4C7JUJDX_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunk4C7JUJDX_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunk4C7JUJDX_cjs.i(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new chunk4C7JUJDX_cjs.h("aborted","Export resource settlement was aborted"):new chunk4C7JUJDX_cjs.h("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t={}){let n=chunkCDAFCPT6_cjs.k(t.fontShaping,chunkCDAFCPT6_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p=(async()=>{let l=bo(t.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,chunkKZZPOZOF_cjs.c),c=chunkKZZPOZOF_cjs.D(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkKZZPOZOF_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkKZZPOZOF_cjs.c),defaultFamily:chunkKZZPOZOF_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkKZZPOZOF_cjs.f(m??{}),g=chunkKZZPOZOF_cjs.F(x,c),S=chunkKZZPOZOF_cjs.G(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d,void 0,f.dropped);ne(F,t),re(F,t,t.glyphFallbacks);return}let h=await Lt(chunkCDAFCPT6_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d,h.resolveFont,f.dropped,S);return ne(b,t),re(b,t,t.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,wo(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new chunk4C7JUJDX_cjs.h(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=chunk4NPNKO5U_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkKZZPOZOF_cjs.B(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkKZZPOZOF_cjs.y(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkKZZPOZOF_cjs.u(e.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=chunkTFJUIP4X_cjs.mj(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkTFJUIP4X_cjs.nj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkTFJUIP4X_cjs.Sc(r),i=chunkTFJUIP4X_cjs.Rc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===chunkTFJUIP4X_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkTFJUIP4X_cjs.pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=chunkNPWMZIPA_cjs.Nc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=chunkTFJUIP4X_cjs.Aa||c.namespaceUri===chunkTFJUIP4X_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunkTFJUIP4X_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunkTFJUIP4X_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunkNPWMZIPA_cjs.ke(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===chunkTFJUIP4X_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunkNPWMZIPA_cjs.Qc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunkTFJUIP4X_cjs.ih(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunkNPWMZIPA_cjs.Sc(n),x){let g=chunkNPWMZIPA_cjs.Pc(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=chunkNPWMZIPA_cjs.Pc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunkNPWMZIPA_cjs.je(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}chunkNPWMZIPA_cjs.Tc(n);}continue}if(c.namespaceUri===chunkTFJUIP4X_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunkNPWMZIPA_cjs.Rc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunkNPWMZIPA_cjs.Uc(n)&&c.namespaceUri===chunkTFJUIP4X_cjs.pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:chunkTFJUIP4X_cjs.Ba(c,E)});}}chunkNPWMZIPA_cjs.Oc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===chunkTFJUIP4X_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkTFJUIP4X_cjs.pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkTFJUIP4X_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=chunk4NPNKO5U_cjs.b(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(chunkNPWMZIPA_cjs.zc),r.namespaceUri===chunkTFJUIP4X_cjs.pa&&r.localName==="sym"&&t(chunk4NPNKO5U_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunkTFJUIP4X_cjs.$d(r)),r.namespaceUri===chunkTFJUIP4X_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkNPWMZIPA_cjs.ie(s??"")?.font??null);}if(r.namespaceUri===chunkTFJUIP4X_cjs.pa&&r.localName==="p")for(let s of chunkKZZPOZOF_cjs.A(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkNPWMZIPA_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkNPWMZIPA_cjs.a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
2
- Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunk4C7JUJDX_cjs.h}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunk4C7JUJDX_cjs.d}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunk4C7JUJDX_cjs.c}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunk4C7JUJDX_cjs.i}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=ho;exports.createPackagedFileFetch=Vo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=Eo;exports.openFontBackedDocumentForExport=So;exports.replayMetafile=Yt;
1
+ 'use strict';var chunkY3JSN52G_cjs=require('./chunk-Y3JSN52G.cjs'),chunkJGE2O6IF_cjs=require('./chunk-JGE2O6IF.cjs'),chunk6BZINLEN_cjs=require('./chunk-6BZINLEN.cjs'),chunk32YOHLEK_cjs=require('./chunk-32YOHLEK.cjs'),chunkSJV6WCTP_cjs=require('./chunk-SJV6WCTP.cjs');require('./chunk-WWZWT26M.cjs'),require('./chunk-2C75IWUN.cjs');var chunkQALWAAPL_cjs=require('./chunk-QALWAAPL.cjs'),chunkDCILO4XD_cjs=require('./chunk-DCILO4XD.cjs');function Yt(e,o,t){let n=chunkDCILO4XD_cjs.be().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:chunk32YOHLEK_cjs.n(y+Math.round(b.originX*f)),originY:chunk32YOHLEK_cjs.n(Math.round(b.originY*f)),offsetX:chunk32YOHLEK_cjs.n(Math.round(b.offsetX*f)),offsetY:chunk32YOHLEK_cjs.n(Math.round(b.offsetY*f)),advanceX:chunk32YOHLEK_cjs.n(Math.round(b.advanceX*f)),advanceY:chunk32YOHLEK_cjs.n(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=chunk32YOHLEK_cjs.n(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:chunk32YOHLEK_cjs.n(T.advance+I),caretEdges:[chunk32YOHLEK_cjs.n(0),chunk32YOHLEK_cjs.n(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>chunk32YOHLEK_cjs.n(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:chunk32YOHLEK_cjs.r({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:chunk32YOHLEK_cjs.n(c+h.originX),originY:chunk32YOHLEK_cjs.n(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return chunk32YOHLEK_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunk32YOHLEK_cjs.n(f),descent:chunk32YOHLEK_cjs.n(E),lineGap:chunk32YOHLEK_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return chunk32YOHLEK_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof chunk32YOHLEK_cjs.d)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:chunk32YOHLEK_cjs.r({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=chunk32YOHLEK_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:chunk32YOHLEK_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunk32YOHLEK_cjs.d?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof chunk32YOHLEK_cjs.d||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkY3JSN52G_cjs.q))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkY3JSN52G_cjs.r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunk6BZINLEN_cjs.h("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunk32YOHLEK_cjs.h(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof chunk32YOHLEK_cjs.d?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=chunk32YOHLEK_cjs.Ga(n.style,n.fontSlot),r=chunk32YOHLEK_cjs.Ed(n)?chunk32YOHLEK_cjs.Fd(n):chunk32YOHLEK_cjs.na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunkDCILO4XD_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunkJGE2O6IF_cjs.Q(e.shaper,e.environment,i,a,t))return null;let p=chunkJGE2O6IF_cjs.P(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=chunk32YOHLEK_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunkJGE2O6IF_cjs.d(),chunkJGE2O6IF_cjs.h({...chunkJGE2O6IF_cjs.i,maxFontBytes:chunk32YOHLEK_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunkJGE2O6IF_cjs.ga(e,{resolveFont(t){return St(e,o,t)},fallback:chunk32YOHLEK_cjs.ta()})}async function Lt(e,o,t=[],n=false,a){if(!chunkJGE2O6IF_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunkJGE2O6IF_cjs.k(a,chunkJGE2O6IF_cjs.i),s=await At(),i=Et(await chunkJGE2O6IF_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunk32YOHLEK_cjs.sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunkJGE2O6IF_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunkJGE2O6IF_cjs.k(t,chunkJGE2O6IF_cjs.i),a=chunkJGE2O6IF_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunkJGE2O6IF_cjs.o(e)}|${a}`,p=C.get(i);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=chunkJGE2O6IF_cjs.n(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await chunkJGE2O6IF_cjs.t(e,f,n,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i,p),p.catch(()=>{C.get(i)===p&&C.delete(i);});}let l=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${chunk32YOHLEK_cjs.sa}`].join("|"),extensionFingerprint:l}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=chunkDCILO4XD_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkDCILO4XD_cjs.Sg(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkY3JSN52G_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunk32YOHLEK_cjs.h(s))),r=chunkY3JSN52G_cjs.L(t,{maxFontBytes:chunk32YOHLEK_cjs.a,aggregateBudget:Fo(n),shadowedRequests:a});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunk32YOHLEK_cjs.c:Math.max(0,chunk32YOHLEK_cjs.c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>chunk32YOHLEK_cjs.c)throw new chunk6BZINLEN_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunk32YOHLEK_cjs.c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkDCILO4XD_cjs.pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunkQALWAAPL_cjs.Ba(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof chunk6BZINLEN_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunk6BZINLEN_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunk6BZINLEN_cjs.i(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new chunk6BZINLEN_cjs.h("aborted","Export resource settlement was aborted"):new chunk6BZINLEN_cjs.h("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t={}){let n=chunkJGE2O6IF_cjs.k(t.fontShaping,chunkJGE2O6IF_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p=(async()=>{let l=bo(t.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,chunkY3JSN52G_cjs.c),c=chunkY3JSN52G_cjs.E(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkY3JSN52G_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkY3JSN52G_cjs.c),defaultFamily:chunkY3JSN52G_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkY3JSN52G_cjs.f(m??{}),g=chunkY3JSN52G_cjs.G(x,c),S=chunkY3JSN52G_cjs.H(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d,void 0,f.dropped);ne(F,t),re(F,t,t.glyphFallbacks);return}let h=await Lt(chunkJGE2O6IF_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d,h.resolveFont,f.dropped,S);return ne(b,t),re(b,t,t.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,wo(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new chunk6BZINLEN_cjs.h(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=chunkSJV6WCTP_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkY3JSN52G_cjs.C(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkY3JSN52G_cjs.z(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkY3JSN52G_cjs.v(e.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=chunkDCILO4XD_cjs.pj(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkDCILO4XD_cjs.qj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkDCILO4XD_cjs.Sc(r),i=chunkDCILO4XD_cjs.Rc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===chunkDCILO4XD_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkDCILO4XD_cjs.pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=chunk32YOHLEK_cjs.Oc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=chunkDCILO4XD_cjs.Aa||c.namespaceUri===chunkDCILO4XD_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunkDCILO4XD_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunkDCILO4XD_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunk32YOHLEK_cjs.le(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===chunkDCILO4XD_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunk32YOHLEK_cjs.Rc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunkDCILO4XD_cjs.jh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunk32YOHLEK_cjs.Tc(n),x){let g=chunk32YOHLEK_cjs.Qc(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=chunk32YOHLEK_cjs.Qc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunk32YOHLEK_cjs.ke(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}chunk32YOHLEK_cjs.Uc(n);}continue}if(c.namespaceUri===chunkDCILO4XD_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunk32YOHLEK_cjs.Sc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunk32YOHLEK_cjs.Vc(n)&&c.namespaceUri===chunkDCILO4XD_cjs.pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:chunkDCILO4XD_cjs.Ba(c,E)});}}chunk32YOHLEK_cjs.Pc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===chunkDCILO4XD_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkDCILO4XD_cjs.pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkDCILO4XD_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=chunkSJV6WCTP_cjs.b(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(chunk32YOHLEK_cjs.Ac),r.namespaceUri===chunkDCILO4XD_cjs.pa&&r.localName==="sym"&&t(chunkSJV6WCTP_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunkDCILO4XD_cjs.$d(r)),r.namespaceUri===chunkDCILO4XD_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunk32YOHLEK_cjs.je(s??"")?.font??null);}if(r.namespaceUri===chunkDCILO4XD_cjs.pa&&r.localName==="p")for(let s of chunkY3JSN52G_cjs.B(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunk32YOHLEK_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunk32YOHLEK_cjs.a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
2
+ Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunk6BZINLEN_cjs.h}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunk6BZINLEN_cjs.d}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunk6BZINLEN_cjs.c}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunk6BZINLEN_cjs.i}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=ho;exports.createPackagedFileFetch=Vo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=Eo;exports.openFontBackedDocumentForExport=So;exports.replayMetafile=Yt;
package/dist/export.d.ts CHANGED
@@ -7,17 +7,17 @@
7
7
  * @packageDocumentation
8
8
  * @public
9
9
  */
10
- import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions } from './revision-projection-CrAv-HP6.js';
11
- import { aj as PreservedImageMime, ae as ImageResourceLimits, an as SupportedImageMime, ad as ImageDecodePort } from './tree-op-types-CGlwCQXg.js';
12
- import { S as SemanticLayout, p as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, q as ListMarkerPictureRecord, T as TextMeasurer, o as FontRequest, r as FontSubstitution, s as ShapedRun, e as StyleSpanRecord } from './semantic-records-thL1rcmG.js';
13
- import { c as DocumentProperties, H as HeadlessDocumentView, d as HeadlessDocumentRejection } from './drawing-graphic-kind-_5u2E4ee.js';
10
+ import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions } from './revision-projection-vU_UiTLx.js';
11
+ import { aC as PreservedImageMime, ax as ImageResourceLimits, aG as SupportedImageMime, aw as ImageDecodePort } from './tree-op-types-DmrePCMo.js';
12
+ import { S as SemanticLayout, p as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, q as ListMarkerPictureRecord, T as TextMeasurer, o as FontRequest, r as FontSubstitution, s as ShapedRun, e as StyleSpanRecord } from './semantic-records-AU2pIYRp.js';
13
+ import { c as DocumentProperties, H as HeadlessDocumentView, d as HeadlessDocumentRejection } from './drawing-graphic-kind-8zt6pugF.js';
14
14
  import { M as MetafileFont, a as MetafileReplay } from './metafile-drawing-Ce6TuWLm.js';
15
15
  export { b as MetafileCommand, c as MetafileDrawing, d as MetafileMatrix, e as MetafilePaint, f as MetafilePathCommand, g as MetafileRaster } from './metafile-drawing-Ce6TuWLm.js';
16
16
  import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
17
- import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-D2qNes9-.js';
17
+ import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-ZjLRz_qa.js';
18
18
  import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-Bm9XqTNO.js';
19
19
  import './editor-scope-CA6egMaK.js';
20
- import './tree-package-store-D0_BOm-r.js';
20
+ import './tree-package-fragment-DXZ2B7x0.js';
21
21
  import './editor-fonts-D_-vjuJi.js';
22
22
 
23
23
  /** Source content that cannot be certified by the layout snapshot. @public */
package/dist/export.js CHANGED
@@ -1,2 +1,2 @@
1
- import {c as c$1,D,t,d,f,F,G as G$1,u,B,y,o,K,r,A as A$1,q}from'./chunk-CU6QPXKD.js';import {l,j,h,i,n,m,s,p,c as c$2,g,P,O,fa}from'./chunk-O2PGRL5D.js';import'./chunk-RIYSCEFQ.js';import {h as h$1,i as i$1}from'./chunk-KOYEBRLV.js';export{h as ExportResourceError,d as createNodeImageDecodePort,c as exportDestinationNamed,i as openDocumentForExport}from'./chunk-KOYEBRLV.js';import {c,sa,a,Ga,Dd,Ed,na,ta,h as h$2,d as d$1,ie as ie$1,b as b$1,i as i$2,Nc,ke,Qc,Sc as Sc$1,Pc,je,Tc,Rc as Rc$1,Uc,Oc,r as r$1,u as u$1,n as n$1,zc}from'./chunk-6IYKYYWF.js';import {e,c as c$3,b as b$2}from'./chunk-ELR6HXOO.js';import'./chunk-A5GMOQWD.js';import'./chunk-LZ64O473.js';import {Ba}from'./chunk-EMITIPLN.js';import {be,mj,nj,Sc,Rc,b,pa,$d,N,Rg,Aa,ih,Ba as Ba$1}from'./chunk-JQPTNBLT.js';function Yt(e,o,t){let n=be().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:n$1(y+Math.round(b.originX*f)),originY:n$1(Math.round(b.originY*f)),offsetX:n$1(Math.round(b.offsetX*f)),offsetY:n$1(Math.round(b.offsetY*f)),advanceX:n$1(Math.round(b.advanceX*f)),advanceY:n$1(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=n$1(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:n$1(T.advance+I),caretEdges:[n$1(0),n$1(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>n$1(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:r$1({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:n$1(c+h.originX),originY:n$1(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return u$1({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:n$1(f),descent:n$1(E),lineGap:n$1(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return u$1({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof d$1)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:r$1({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:i$2(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$1?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof d$1||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r$1=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof q))return true;let u=n(l.request.family);return a.has(u)||!r$1.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new h$1("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$2(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$1?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=Ga(n.style,n.fontSlot),r=Dd(n)?Ed(n):na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!P(e.shaper,e.environment,i,a,t))return null;let p=O(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=c;function At(){if(U)return U;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return fa(e,{resolveFont(t){return St(e,o,t)},fallback:ta()})}async function Lt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j(a,h),s$1=await At(),i=Et(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j(t,h),a=i(n$1),r=vt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=C.get(i$1);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=m(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await s(e,f,n$1,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i$1,p),p.catch(()=>{C.get(i$1)===p&&C.delete(i$1);});}let l$1=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l$1,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${sa}`].join("|"),extensionFingerprint:l$1}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),Rg(o,n)}function Pt(e,o$1){let t=xo(e);if(t.length!==0)return o(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$2(s))),r=K(t,{maxFontBytes:a,aggregateBudget:Fo(n),shadowedRequests:a$1});if(o$1)for(let s of r.dropped){if(o$1.dropped.length>=ee)break;o$1.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>c)throw new h$1("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=Ba(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof h$1&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new h$1("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=i$1(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new h$1("aborted","Export resource settlement was aborted"):new h$1("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t$1={}){let n=j(t$1.fontShaping,h);if((t$1.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t$1.timeoutMs),r=new AbortController,s=()=>r.abort(t$1.signal?.reason);t$1.signal?.addEventListener("abort",s,{once:true}),t$1.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p$1=(async()=>{let l=bo(t$1.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,c$1),c=D(e,y),d$1=[],f$1={dropped:[]},E=Pt(e,f$1),R=[...o,...E?[E]:[],...t$1.lastResortFonts??[]],m=await t(R,{families:[...new Set([...(t$1.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,c$1),defaultFamily:d.family,signal:r.signal},{onOriginFailure:F=>d$1.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=f(m??{}),g=F(x,c),S=G$1(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d$1,void 0,f$1.dropped);ne(F,t$1),re(F,t$1,t$1.glyphFallbacks);return}let h=await Lt(p(g),void 0,t$1.glyphFallbacks,t$1.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d$1,h.resolveFont,f$1.dropped,S);return ne(b,t$1),re(b,t$1,t$1.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,wo(r.signal)])}finally{clearTimeout(i),t$1.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new h$1(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e$1){let o=[e$1.part().root],t=[],n=[],a=new Set([e$1.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e$1.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e$1,u));let s=e$1.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y$1)=>{let c=e(u,e$1.stylesRoot(),i,Po(u,y$1)),d=B(u,e$1.numberingRoot(),e$1.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...y(u,e$1.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u$1 of u(e$1.currentPackage(),i)){let y=u$1.toLowerCase();p.has(y)||p.set(y,u$1);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=mj(e.currentPackage(),o);if(!t)return [];let n=new Set(nj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=Sc(r),i=Rc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=Nc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=Aa||c.namespaceUri===pa&&c.localName==="p")continue;let R=c.namespaceUri===pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";ke(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")Qc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=ih(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(Sc$1(n),x){let g=Pc(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=Pc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&je(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}Tc(n);}continue}if(c.namespaceUri===pa&&(c.localName==="instrText"||c.localName==="delInstrText")){Rc$1(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&Uc(n)&&c.namespaceUri===pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:Ba$1(c,E)});}}Oc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===pa&&n.localName==="p")){if(n.namespaceUri===pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=b$2(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(zc),r.namespaceUri===pa&&r.localName==="sym"&&t(c$3(Ro(r,"font"))),r.localName==="textpath"&&t($d(r)),r.namespaceUri===pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(ie$1(s??"")?.font??null);}if(r.namespaceUri===pa&&r.localName==="p")for(let s of A$1(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
1
+ import {c as c$1,E,t,d,f,G as G$1,H as H$1,v,C as C$1,z as z$1,o,L,r,B,q}from'./chunk-FMSXJ22B.js';import {l,j,h,i,n,m,s,p,c as c$2,g,P,O,fa}from'./chunk-2V3V57SC.js';import'./chunk-RIYSCEFQ.js';import {h as h$1,i as i$1}from'./chunk-LMASPHYS.js';export{h as ExportResourceError,d as createNodeImageDecodePort,c as exportDestinationNamed,i as openDocumentForExport}from'./chunk-LMASPHYS.js';import {c,sa,a,Ga,Ed,Fd,na,ta,h as h$2,d as d$1,je,b as b$1,i as i$2,Oc,le as le$1,Rc as Rc$1,Tc,Qc,ke,Uc,Sc as Sc$1,Vc,Pc,r as r$1,u,n as n$1,Ac}from'./chunk-K2BBJDM7.js';import {e,c as c$3,b as b$2}from'./chunk-QDUMZYTX.js';import'./chunk-6767S7UF.js';import'./chunk-66ZAVRGB.js';import {Ba}from'./chunk-NYZP5NM3.js';import {be,pj,qj,Sc,Rc,b,pa,$d,N,Sg,Aa,jh,Ba as Ba$1}from'./chunk-P3XUE72N.js';function Yt(e,o,t){let n=be().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:n$1(y+Math.round(b.originX*f)),originY:n$1(Math.round(b.originY*f)),offsetX:n$1(Math.round(b.offsetX*f)),offsetY:n$1(Math.round(b.offsetY*f)),advanceX:n$1(Math.round(b.advanceX*f)),advanceY:n$1(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=n$1(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:n$1(T.advance+I),caretEdges:[n$1(0),n$1(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>n$1(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:r$1({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u$1=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:n$1(c+h.originX),originY:n$1(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u$1.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u$1.length===i.length?u$1:void 0,metrics:{ascent:n$1(f),descent:n$1(E),lineGap:n$1(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof d$1)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:r$1({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:i$2(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$1?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof d$1||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r$1=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof q))return true;let u=n(l.request.family);return a.has(u)||!r$1.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new h$1("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$2(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$1?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=Ga(n.style,n.fontSlot),r=Ed(n)?Fd(n):na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!P(e.shaper,e.environment,i,a,t))return null;let p=O(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=c;function At(){if(U)return U;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return fa(e,{resolveFont(t){return St(e,o,t)},fallback:ta()})}async function Lt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j(a,h),s$1=await At(),i=Et(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j(t,h),a=i(n$1),r=vt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=C.get(i$1);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=m(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await s(e,f,n$1,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i$1,p),p.catch(()=>{C.get(i$1)===p&&C.delete(i$1);});}let l$1=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l$1,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${sa}`].join("|"),extensionFingerprint:l$1}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),Sg(o,n)}function Pt(e,o$1){let t=xo(e);if(t.length!==0)return o(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$2(s))),r=L(t,{maxFontBytes:a,aggregateBudget:Fo(n),shadowedRequests:a$1});if(o$1)for(let s of r.dropped){if(o$1.dropped.length>=ee)break;o$1.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>c)throw new h$1("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=Ba(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof h$1&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new h$1("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=i$1(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new h$1("aborted","Export resource settlement was aborted"):new h$1("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t$1={}){let n=j(t$1.fontShaping,h);if((t$1.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t$1.timeoutMs),r=new AbortController,s=()=>r.abort(t$1.signal?.reason);t$1.signal?.addEventListener("abort",s,{once:true}),t$1.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p$1=(async()=>{let l=bo(t$1.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,c$1),c=E(e,y),d$1=[],f$1={dropped:[]},E$1=Pt(e,f$1),R=[...o,...E$1?[E$1]:[],...t$1.lastResortFonts??[]],m=await t(R,{families:[...new Set([...(t$1.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,c$1),defaultFamily:d.family,signal:r.signal},{onOriginFailure:F=>d$1.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=f(m??{}),g=G$1(x,c),S=H$1(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d$1,void 0,f$1.dropped);ne(F,t$1),re(F,t$1,t$1.glyphFallbacks);return}let h=await Lt(p(g),void 0,t$1.glyphFallbacks,t$1.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d$1,h.resolveFont,f$1.dropped,S);return ne(b,t$1),re(b,t$1,t$1.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,wo(r.signal)])}finally{clearTimeout(i),t$1.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new h$1(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e$1){let o=[e$1.part().root],t=[],n=[],a=new Set([e$1.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e$1.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e$1,u));let s=e$1.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=e(u,e$1.stylesRoot(),i,Po(u,y)),d=C$1(u,e$1.numberingRoot(),e$1.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...z$1(u,e$1.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of v(e$1.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=pj(e.currentPackage(),o);if(!t)return [];let n=new Set(qj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=Sc(r),i=Rc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=Oc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=Aa||c.namespaceUri===pa&&c.localName==="p")continue;let R=c.namespaceUri===pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";le$1(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")Rc$1(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=jh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(Tc(n),x){let g=Qc(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=Qc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&ke(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}Uc(n);}continue}if(c.namespaceUri===pa&&(c.localName==="instrText"||c.localName==="delInstrText")){Sc$1(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&Vc(n)&&c.namespaceUri===pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:Ba$1(c,E)});}}Pc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===pa&&n.localName==="p")){if(n.namespaceUri===pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=b$2(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(Ac),r.namespaceUri===pa&&r.localName==="sym"&&t(c$3(Ro(r,"font"))),r.localName==="textpath"&&t($d(r)),r.namespaceUri===pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(je(s??"")?.font??null);}if(r.namespaceUri===pa&&r.localName==="p")for(let s of B(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
2
2
  export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,ho as acquireSharedExportShaping,Vo as createPackagedFileFetch,te as hasExportAdmittedFont,ie as hasExportLaidOutText,Eo as hasFontBackedExportCapabilities,So as openFontBackedDocumentForExport,Yt as replayMetafile};