superdoc 0.31.0-next.1 → 0.31.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PdfViewer-DYfpBL2P.es.js → PdfViewer-Ck2UtdkO.es.js} +2 -2
- package/dist/chunks/{PdfViewer-CSZtzevK.cjs → PdfViewer-CxLHqmsp.cjs} +2 -2
- package/dist/chunks/{eventemitter3-hYlnBzSA.es.js → eventemitter3-BZXKb7j7.es.js} +1 -1
- package/dist/chunks/{eventemitter3-DmHNHvFX.cjs → eventemitter3-CFCpOk3d.cjs} +1 -1
- package/dist/chunks/{index-BiYSI2c3.es.js → index-S2kR904m.es.js} +6 -6
- package/dist/chunks/{index-0zP7LFOd-CQ5IRTwG.es.js → index-TPvf306Z-DLAdtd9g.es.js} +1 -1
- package/dist/chunks/{index-0zP7LFOd-PDPveafF.cjs → index-TPvf306Z-Dymhw354.cjs} +1 -1
- package/dist/chunks/{index-9j37gBmK.cjs → index-qZtf9OYt.cjs} +6 -6
- package/dist/chunks/{jszip-BP2FTbpi.cjs → jszip-B99MTu59.cjs} +1 -1
- package/dist/chunks/{jszip-jKrsZoMS.es.js → jszip-Duxs2YMV.es.js} +1 -1
- package/dist/chunks/{super-editor.es-BzhuUuJx.es.js → super-editor.es-CNPHD-mt.es.js} +2310 -1997
- package/dist/chunks/{super-editor.es-D8j9E-4h.cjs → super-editor.es-d0fSEchl.cjs} +2357 -2044
- package/dist/chunks/{vue-Cwv-wUpm.cjs → vue-ARQSyfaw.cjs} +2401 -2360
- package/dist/chunks/{vue-CKmzTNVs.es.js → vue-B5QAf5pA.es.js} +2401 -2360
- package/dist/chunks/xml-js-CVyfrKaV.es.js +2 -0
- package/dist/chunks/xml-js-DQa4Ye5C.cjs +3 -0
- package/dist/images/altText_add.svg +3 -0
- package/dist/images/altText_disclaimer.svg +3 -0
- package/dist/images/altText_done.svg +3 -0
- package/dist/images/altText_spinner.svg +30 -0
- package/dist/images/altText_warning.svg +3 -0
- package/dist/images/annotation-check.svg +11 -0
- package/dist/images/annotation-comment.svg +16 -0
- package/dist/images/annotation-help.svg +26 -0
- package/dist/images/annotation-insert.svg +10 -0
- package/dist/images/annotation-key.svg +11 -0
- package/dist/images/annotation-newparagraph.svg +11 -0
- package/dist/images/annotation-noicon.svg +7 -0
- package/dist/images/annotation-note.svg +42 -0
- package/dist/images/annotation-paperclip.svg +6 -0
- package/dist/images/annotation-paragraph.svg +16 -0
- package/dist/images/annotation-pushpin.svg +7 -0
- package/dist/images/cursor-editorFreeHighlight.svg +6 -0
- package/dist/images/cursor-editorFreeText.svg +3 -0
- package/dist/images/cursor-editorInk.svg +4 -0
- package/dist/images/cursor-editorTextHighlight.svg +8 -0
- package/dist/images/editor-toolbar-delete.svg +5 -0
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/messageBar_closingButton.svg +3 -0
- package/dist/images/messageBar_warning.svg +3 -0
- package/dist/images/toolbarButton-editorHighlight.svg +6 -0
- package/dist/images/toolbarButton-menuArrow.svg +3 -0
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +140 -52
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +140 -52
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/style.css +12 -9
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-B3mE6WPB.js → converter-CuN7BQ8r.js} +1452 -1348
- package/dist/super-editor/chunks/{docx-zipper-FgUekv4g.js → docx-zipper-DvU3g1QE.js} +1 -1
- package/dist/super-editor/chunks/{editor-B0PiO07g.js → editor-CJUnMzXV.js} +604 -459
- package/dist/super-editor/chunks/{index-0zP7LFOd.js → index-TPvf306Z.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-Bj9E8rmT.js → toolbar-_AUH-ukY.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +12 -9
- package/dist/super-editor/super-editor/src/core/Attribute.d.ts +75 -29
- package/dist/super-editor/super-editor/src/core/Attribute.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/CommandService.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/CommandService.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Editor.d.ts +145 -673
- package/dist/super-editor/super-editor/src/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/EventEmitter.d.ts +23 -14
- package/dist/super-editor/super-editor/src/core/EventEmitter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Extension.d.ts +25 -11
- package/dist/super-editor/super-editor/src/core/Extension.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/ExtensionService.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/ExtensionService.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Mark.d.ts +28 -12
- package/dist/super-editor/super-editor/src/core/Mark.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Node.d.ts +87 -25
- package/dist/super-editor/super-editor/src/core/Node.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/OxmlNode.d.ts +20 -13
- package/dist/super-editor/super-editor/src/core/OxmlNode.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Schema.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/commands/types/index.d.ts +11 -89
- package/dist/super-editor/super-editor/src/core/commands/types/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/commands.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/commands.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/editable.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/editable.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/editorFocus.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/editorFocus.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/keymap.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/keymap.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/annotator.d.ts +3 -2
- package/dist/super-editor/super-editor/src/core/helpers/annotator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/getExtensionConfigField.d.ts +12 -5
- package/dist/super-editor/super-editor/src/core/helpers/getExtensionConfigField.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/isList.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/isList.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/list-numbering-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/index.d.ts +18 -13
- package/dist/super-editor/super-editor/src/core/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/schema-summary.d.ts +4 -0
- package/dist/super-editor/super-editor/src/core/schema-summary.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts +0 -48
- package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/styles.d.ts +2 -1
- package/dist/super-editor/super-editor/src/core/super-converter/styles.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/autoPageNumberImporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/markImporter.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/autoPageNumber/autoPageNumber-translator.d.ts +8 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/autoPageNumber/autoPageNumber-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/autoPageNumber/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/autoPageNumber/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/totalPageNumber/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/totalPageNumber/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/totalPageNumber/totalPageNumber-translator.d.ts +8 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/totalPageNumber/totalPageNumber-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/generate-paragraph-properties.d.ts +8 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/generate-paragraph-properties.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/legacy-handle-paragraph-node.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/translate-paragraph-node.d.ts +8 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/translate-paragraph-node.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/convert-sdt-content-to-runs.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/convert-sdt-content-to-runs.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-field-annotation.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/helpers/translate-text-node.d.ts +5 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/helpers/translate-text-node.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tbl/tbl-translator.d.ts +14 -10
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tbl/tbl-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tblGrid/tblGrid-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr/tr-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/types/ChainedCommands.d.ts +118 -0
- package/dist/super-editor/super-editor/src/core/types/ChainedCommands.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/EditorConfig.d.ts +265 -0
- package/dist/super-editor/super-editor/src/core/types/EditorConfig.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/EditorEvents.d.ts +144 -0
- package/dist/super-editor/super-editor/src/core/types/EditorEvents.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/EditorSchema.d.ts +35 -0
- package/dist/super-editor/super-editor/src/core/types/EditorSchema.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/EditorTypes.d.ts +73 -0
- package/dist/super-editor/super-editor/src/core/types/EditorTypes.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/__tests__/command-types.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/types/__tests__/command-types.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/utilities/callOrGet.d.ts +6 -2
- package/dist/super-editor/super-editor/src/core/utilities/callOrGet.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/utilities/isIOS.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-marks.d.ts +8 -2
- package/dist/super-editor/super-editor/src/extensions/ai/ai-marks.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-nodes.d.ts +7 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-nodes.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-plugin.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-plugin.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/block-node/block-node.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/block-node/block-node.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/bold/bold.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/bold/bold.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/bookmarks/bookmark-end.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/bookmarks/bookmark-end.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/bookmarks/bookmark-start.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/bookmarks/bookmark-start.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration-cursor/collaboration-cursor.d.ts +9 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration-cursor/collaboration-cursor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/color/color.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/color/color.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comment.d.ts +18 -3
- package/dist/super-editor/super-editor/src/extensions/comment/comment.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-marks.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-marks.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-plugin.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-plugin.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/content-block/content-block.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/content-block/content-block.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/custom-selection/custom-selection.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/custom-selection/custom-selection.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/document/document.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/document/document.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/dropcursor/dropcursor.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/dropcursor/dropcursor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/field-annotation/field-annotation.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/field-annotation/field-annotation.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/font-family/font-family.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/font-family/font-family.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/font-size/font-size.d.ts +9 -1
- package/dist/super-editor/super-editor/src/extensions/font-size/font-size.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/format-commands/format-commands.d.ts +7 -1
- package/dist/super-editor/super-editor/src/extensions/format-commands/format-commands.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/gapcursor/gapcursor.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/gapcursor/gapcursor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/heading/heading.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/heading/heading.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/highlight/highlight.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/highlight/highlight.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/history/history.d.ts +4 -1
- package/dist/super-editor/super-editor/src/extensions/history/history.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/image/image.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/image/image.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/index.d.ts +22 -2
- package/dist/super-editor/super-editor/src/extensions/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/italic/italic.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/italic/italic.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/line-break/line-break.d.ts +2 -2
- package/dist/super-editor/super-editor/src/extensions/line-break/line-break.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/line-height/line-height.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/line-height/line-height.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/link/link.d.ts +9 -1
- package/dist/super-editor/super-editor/src/extensions/link/link.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/helpers.d.ts +1 -0
- package/dist/super-editor/super-editor/src/extensions/linked-styles/helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/linked-styles.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/linked-styles.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/plugin.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/mention/mention.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/mention/mention.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/noderesizer/noderesizer.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/noderesizer/noderesizer.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/page-number/page-number.d.ts +2 -2
- package/dist/super-editor/super-editor/src/extensions/page-number/page-number.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/page-reference/page-reference.d.ts +8 -1
- package/dist/super-editor/super-editor/src/extensions/page-reference/page-reference.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/paragraph/paragraph.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/paragraph/paragraph.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/placeholder/placeholder.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/placeholder/placeholder.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/popover-plugin/popover-plugin.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/popover-plugin/popover-plugin.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/run/run.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/run/run.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/search/search.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/search/search.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-container/shape-container.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/shape-container/shape-container.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-group/shape-group.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-group/shape-group.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-textbox/shape-textbox.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/shape-textbox/shape-textbox.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/slash-menu/slash-menu.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/slash-menu/slash-menu.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/strike/strike.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/strike/strike.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/document-part-object.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/document-part-object.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/document-section.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/document-section.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-block.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-block.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-commands.d.ts +9 -3
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-commands.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentByGroup.d.ts +19 -0
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentByGroup.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/tagUtils.d.ts +53 -0
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/tagUtils.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/tab/tab.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/tab/tab.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table/TableView.d.ts +7 -1
- package/dist/super-editor/super-editor/src/extensions/table/TableView.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table/table.d.ts +19 -1
- package/dist/super-editor/super-editor/src/extensions/table/table.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table-cell/table-cell.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/table-cell/table-cell.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table-header/table-header.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/table-header/table-header.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table-of-contents/table-of-contents.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/table-of-contents/table-of-contents.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table-row/table-row.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/table-row/table-row.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text/text.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/text/text.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text-align/text-align.d.ts +4 -1
- package/dist/super-editor/super-editor/src/extensions/text-align/text-align.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text-indent/text-indent.d.ts +7 -1
- package/dist/super-editor/super-editor/src/extensions/text-indent/text-indent.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text-style/text-style.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/text-style/text-style.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text-transform/text-transform.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/text-transform/text-transform.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts +140 -52
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-changes.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-changes.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-delete.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-delete.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-format.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-format.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-insert.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-insert.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/trackChangesHelpers/trackedTransaction.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/trackChangesHelpers/trackedTransaction.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/types/formatting-commands.d.ts +40 -0
- package/dist/super-editor/super-editor/src/extensions/types/formatting-commands.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/types/history-link-table-commands.d.ts +57 -0
- package/dist/super-editor/super-editor/src/extensions/types/history-link-table-commands.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/types/specialized-commands.d.ts +83 -0
- package/dist/super-editor/super-editor/src/extensions/types/specialized-commands.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/underline/underline.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/underline/underline.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/vector-shape/vector-shape.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/vector-shape/vector-shape.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/tests/export/export-helpers/export-helpers.d.ts +1 -1
- package/dist/super-editor/super-editor/src/tests/export/export-helpers/export-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +7 -7
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +2699 -2346
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-BSDu25I7.cjs +0 -3
- package/dist/chunks/xml-js-CBrRls0f.es.js +0 -2
|
@@ -413,17 +413,17 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
if (a === b2) return 0;
|
|
416
|
-
let
|
|
416
|
+
let x2 = a.length;
|
|
417
417
|
let y2 = b2.length;
|
|
418
|
-
for (let i = 0, len = Math.min(
|
|
418
|
+
for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
|
|
419
419
|
if (a[i] !== b2[i]) {
|
|
420
|
-
|
|
420
|
+
x2 = a[i];
|
|
421
421
|
y2 = b2[i];
|
|
422
422
|
break;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
426
|
-
if (y2 <
|
|
425
|
+
if (x2 < y2) return -1;
|
|
426
|
+
if (y2 < x2) return 1;
|
|
427
427
|
return 0;
|
|
428
428
|
};
|
|
429
429
|
Buffer3.isEncoding = function isEncoding(encoding) {
|
|
@@ -672,20 +672,20 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
672
672
|
thisStart >>>= 0;
|
|
673
673
|
thisEnd >>>= 0;
|
|
674
674
|
if (this === target) return 0;
|
|
675
|
-
let
|
|
675
|
+
let x2 = thisEnd - thisStart;
|
|
676
676
|
let y2 = end - start;
|
|
677
|
-
const len = Math.min(
|
|
677
|
+
const len = Math.min(x2, y2);
|
|
678
678
|
const thisCopy = this.slice(thisStart, thisEnd);
|
|
679
679
|
const targetCopy = target.slice(start, end);
|
|
680
680
|
for (let i = 0; i < len; ++i) {
|
|
681
681
|
if (thisCopy[i] !== targetCopy[i]) {
|
|
682
|
-
|
|
682
|
+
x2 = thisCopy[i];
|
|
683
683
|
y2 = targetCopy[i];
|
|
684
684
|
break;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
if (
|
|
688
|
-
if (y2 <
|
|
687
|
+
if (x2 < y2) return -1;
|
|
688
|
+
if (y2 < x2) return 1;
|
|
689
689
|
return 0;
|
|
690
690
|
};
|
|
691
691
|
function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
|
|
@@ -1775,8 +1775,8 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
1775
1775
|
})(buffer);
|
|
1776
1776
|
const Buffer2 = buffer.Buffer;
|
|
1777
1777
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
1778
|
-
function getDefaultExportFromCjs$2(
|
|
1779
|
-
return
|
|
1778
|
+
function getDefaultExportFromCjs$2(x2) {
|
|
1779
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
1780
1780
|
}
|
|
1781
1781
|
var sax = {};
|
|
1782
1782
|
var events = { exports: {} };
|
|
@@ -1784,13 +1784,13 @@ var hasRequiredEvents;
|
|
|
1784
1784
|
function requireEvents() {
|
|
1785
1785
|
if (hasRequiredEvents) return events.exports;
|
|
1786
1786
|
hasRequiredEvents = 1;
|
|
1787
|
-
var
|
|
1788
|
-
var ReflectApply =
|
|
1787
|
+
var R = typeof Reflect === "object" ? Reflect : null;
|
|
1788
|
+
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
1789
1789
|
return Function.prototype.apply.call(target, receiver, args);
|
|
1790
1790
|
};
|
|
1791
1791
|
var ReflectOwnKeys;
|
|
1792
|
-
if (
|
|
1793
|
-
ReflectOwnKeys =
|
|
1792
|
+
if (R && typeof R.ownKeys === "function") {
|
|
1793
|
+
ReflectOwnKeys = R.ownKeys;
|
|
1794
1794
|
} else if (Object.getOwnPropertySymbols) {
|
|
1795
1795
|
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
1796
1796
|
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
@@ -2180,8 +2180,8 @@ function requireInherits_browser() {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
return inherits_browser.exports;
|
|
2182
2182
|
}
|
|
2183
|
-
function getDefaultExportFromCjs$1(
|
|
2184
|
-
return
|
|
2183
|
+
function getDefaultExportFromCjs$1(x2) {
|
|
2184
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
2185
2185
|
}
|
|
2186
2186
|
var browser$1 = { exports: {} };
|
|
2187
2187
|
var process = browser$1.exports = {};
|
|
@@ -2762,17 +2762,17 @@ function requireDist() {
|
|
|
2762
2762
|
);
|
|
2763
2763
|
}
|
|
2764
2764
|
if (a === b2) return 0;
|
|
2765
|
-
let
|
|
2765
|
+
let x2 = a.length;
|
|
2766
2766
|
let y2 = b2.length;
|
|
2767
|
-
for (let i2 = 0, len2 = Math.min(
|
|
2767
|
+
for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
|
|
2768
2768
|
if (a[i2] !== b2[i2]) {
|
|
2769
|
-
|
|
2769
|
+
x2 = a[i2];
|
|
2770
2770
|
y2 = b2[i2];
|
|
2771
2771
|
break;
|
|
2772
2772
|
}
|
|
2773
2773
|
}
|
|
2774
|
-
if (
|
|
2775
|
-
if (y2 <
|
|
2774
|
+
if (x2 < y2) return -1;
|
|
2775
|
+
if (y2 < x2) return 1;
|
|
2776
2776
|
return 0;
|
|
2777
2777
|
};
|
|
2778
2778
|
Buffer4.isEncoding = function isEncoding(encoding) {
|
|
@@ -3021,20 +3021,20 @@ function requireDist() {
|
|
|
3021
3021
|
thisStart >>>= 0;
|
|
3022
3022
|
thisEnd >>>= 0;
|
|
3023
3023
|
if (this === target) return 0;
|
|
3024
|
-
let
|
|
3024
|
+
let x2 = thisEnd - thisStart;
|
|
3025
3025
|
let y2 = end - start;
|
|
3026
|
-
const len2 = Math.min(
|
|
3026
|
+
const len2 = Math.min(x2, y2);
|
|
3027
3027
|
const thisCopy = this.slice(thisStart, thisEnd);
|
|
3028
3028
|
const targetCopy = target.slice(start, end);
|
|
3029
3029
|
for (let i2 = 0; i2 < len2; ++i2) {
|
|
3030
3030
|
if (thisCopy[i2] !== targetCopy[i2]) {
|
|
3031
|
-
|
|
3031
|
+
x2 = thisCopy[i2];
|
|
3032
3032
|
y2 = targetCopy[i2];
|
|
3033
3033
|
break;
|
|
3034
3034
|
}
|
|
3035
3035
|
}
|
|
3036
|
-
if (
|
|
3037
|
-
if (y2 <
|
|
3036
|
+
if (x2 < y2) return -1;
|
|
3037
|
+
if (y2 < x2) return 1;
|
|
3038
3038
|
return 0;
|
|
3039
3039
|
};
|
|
3040
3040
|
function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
|
|
@@ -4606,15 +4606,15 @@ function requireGetProto() {
|
|
|
4606
4606
|
var reflectGetProto = requireReflect_getPrototypeOf();
|
|
4607
4607
|
var originalGetProto = requireObject_getPrototypeOf();
|
|
4608
4608
|
var getDunderProto = /* @__PURE__ */ requireGet();
|
|
4609
|
-
getProto = reflectGetProto ? function getProto2(
|
|
4610
|
-
return reflectGetProto(
|
|
4611
|
-
} : originalGetProto ? function getProto2(
|
|
4612
|
-
if (!
|
|
4609
|
+
getProto = reflectGetProto ? function getProto2(O) {
|
|
4610
|
+
return reflectGetProto(O);
|
|
4611
|
+
} : originalGetProto ? function getProto2(O) {
|
|
4612
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
4613
4613
|
throw new TypeError("getProto: not an object");
|
|
4614
4614
|
}
|
|
4615
|
-
return originalGetProto(
|
|
4616
|
-
} : getDunderProto ? function getProto2(
|
|
4617
|
-
return getDunderProto(
|
|
4615
|
+
return originalGetProto(O);
|
|
4616
|
+
} : getDunderProto ? function getProto2(O) {
|
|
4617
|
+
return getDunderProto(O);
|
|
4618
4618
|
} : null;
|
|
4619
4619
|
return getProto;
|
|
4620
4620
|
}
|
|
@@ -5282,18 +5282,18 @@ function requireForEach() {
|
|
|
5282
5282
|
}
|
|
5283
5283
|
};
|
|
5284
5284
|
var forEachObject = function forEachObject2(object, iterator, receiver) {
|
|
5285
|
-
for (var
|
|
5286
|
-
if (hasOwnProperty.call(object,
|
|
5285
|
+
for (var k2 in object) {
|
|
5286
|
+
if (hasOwnProperty.call(object, k2)) {
|
|
5287
5287
|
if (receiver == null) {
|
|
5288
|
-
iterator(object[
|
|
5288
|
+
iterator(object[k2], k2, object);
|
|
5289
5289
|
} else {
|
|
5290
|
-
iterator.call(receiver, object[
|
|
5290
|
+
iterator.call(receiver, object[k2], k2, object);
|
|
5291
5291
|
}
|
|
5292
5292
|
}
|
|
5293
5293
|
}
|
|
5294
5294
|
};
|
|
5295
|
-
function isArray(
|
|
5296
|
-
return toStr.call(
|
|
5295
|
+
function isArray(x2) {
|
|
5296
|
+
return toStr.call(x2) === "[object Array]";
|
|
5297
5297
|
}
|
|
5298
5298
|
forEach = function forEach2(list, iterator, thisArg) {
|
|
5299
5299
|
if (!isCallable2(iterator)) {
|
|
@@ -5902,10 +5902,10 @@ function requireUtil() {
|
|
|
5902
5902
|
var i = 1;
|
|
5903
5903
|
var args = arguments;
|
|
5904
5904
|
var len = args.length;
|
|
5905
|
-
var str = String(f).replace(formatRegExp, function(
|
|
5906
|
-
if (
|
|
5907
|
-
if (i >= len) return
|
|
5908
|
-
switch (
|
|
5905
|
+
var str = String(f).replace(formatRegExp, function(x3) {
|
|
5906
|
+
if (x3 === "%%") return "%";
|
|
5907
|
+
if (i >= len) return x3;
|
|
5908
|
+
switch (x3) {
|
|
5909
5909
|
case "%s":
|
|
5910
5910
|
return String(args[i++]);
|
|
5911
5911
|
case "%d":
|
|
@@ -5917,14 +5917,14 @@ function requireUtil() {
|
|
|
5917
5917
|
return "[Circular]";
|
|
5918
5918
|
}
|
|
5919
5919
|
default:
|
|
5920
|
-
return
|
|
5920
|
+
return x3;
|
|
5921
5921
|
}
|
|
5922
5922
|
});
|
|
5923
|
-
for (var
|
|
5924
|
-
if (isNull(
|
|
5925
|
-
str += " " +
|
|
5923
|
+
for (var x2 = args[i]; i < len; x2 = args[++i]) {
|
|
5924
|
+
if (isNull(x2) || !isObject(x2)) {
|
|
5925
|
+
str += " " + x2;
|
|
5926
5926
|
} else {
|
|
5927
|
-
str += " " + inspect(
|
|
5927
|
+
str += " " + inspect(x2);
|
|
5928
5928
|
}
|
|
5929
5929
|
}
|
|
5930
5930
|
return str;
|
|
@@ -7489,6 +7489,7 @@ function require_stream_duplex() {
|
|
|
7489
7489
|
}
|
|
7490
7490
|
var string_decoder = {};
|
|
7491
7491
|
var safeBuffer = { exports: {} };
|
|
7492
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
7492
7493
|
var hasRequiredSafeBuffer;
|
|
7493
7494
|
function requireSafeBuffer() {
|
|
7494
7495
|
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
@@ -7510,6 +7511,7 @@ function requireSafeBuffer() {
|
|
|
7510
7511
|
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
7511
7512
|
return Buffer3(arg, encodingOrOffset, length);
|
|
7512
7513
|
}
|
|
7514
|
+
SafeBuffer.prototype = Object.create(Buffer3.prototype);
|
|
7513
7515
|
copyProps(Buffer3, SafeBuffer);
|
|
7514
7516
|
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
7515
7517
|
if (typeof arg === "number") {
|
|
@@ -8787,9 +8789,9 @@ function require_stream_readable() {
|
|
|
8787
8789
|
return from(Readable, iterable, opts);
|
|
8788
8790
|
};
|
|
8789
8791
|
}
|
|
8790
|
-
function indexOf(xs,
|
|
8792
|
+
function indexOf(xs, x2) {
|
|
8791
8793
|
for (var i = 0, l3 = xs.length; i < l3; i++) {
|
|
8792
|
-
if (xs[i] ===
|
|
8794
|
+
if (xs[i] === x2) return i;
|
|
8793
8795
|
}
|
|
8794
8796
|
return -1;
|
|
8795
8797
|
}
|
|
@@ -9247,27 +9249,27 @@ function requireSax() {
|
|
|
9247
9249
|
this._parser = new SAXParser(strict, opt);
|
|
9248
9250
|
this.writable = true;
|
|
9249
9251
|
this.readable = true;
|
|
9250
|
-
var
|
|
9252
|
+
var me2 = this;
|
|
9251
9253
|
this._parser.onend = function() {
|
|
9252
|
-
|
|
9254
|
+
me2.emit("end");
|
|
9253
9255
|
};
|
|
9254
9256
|
this._parser.onerror = function(er) {
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
+
me2.emit("error", er);
|
|
9258
|
+
me2._parser.error = null;
|
|
9257
9259
|
};
|
|
9258
9260
|
this._decoder = null;
|
|
9259
9261
|
streamWraps.forEach(function(ev) {
|
|
9260
|
-
Object.defineProperty(
|
|
9262
|
+
Object.defineProperty(me2, "on" + ev, {
|
|
9261
9263
|
get: function() {
|
|
9262
|
-
return
|
|
9264
|
+
return me2._parser["on" + ev];
|
|
9263
9265
|
},
|
|
9264
|
-
set: function(
|
|
9265
|
-
if (!
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
return
|
|
9266
|
+
set: function(h) {
|
|
9267
|
+
if (!h) {
|
|
9268
|
+
me2.removeAllListeners(ev);
|
|
9269
|
+
me2._parser["on" + ev] = h;
|
|
9270
|
+
return h;
|
|
9269
9271
|
}
|
|
9270
|
-
|
|
9272
|
+
me2.on(ev, h);
|
|
9271
9273
|
},
|
|
9272
9274
|
enumerable: true,
|
|
9273
9275
|
configurable: false
|
|
@@ -9299,15 +9301,15 @@ function requireSax() {
|
|
|
9299
9301
|
return true;
|
|
9300
9302
|
};
|
|
9301
9303
|
SAXStream.prototype.on = function(ev, handler2) {
|
|
9302
|
-
var
|
|
9303
|
-
if (!
|
|
9304
|
-
|
|
9304
|
+
var me2 = this;
|
|
9305
|
+
if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
|
|
9306
|
+
me2._parser["on" + ev] = function() {
|
|
9305
9307
|
var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
|
9306
9308
|
args.splice(0, 0, ev);
|
|
9307
|
-
|
|
9309
|
+
me2.emit.apply(me2, args);
|
|
9308
9310
|
};
|
|
9309
9311
|
}
|
|
9310
|
-
return Stream.prototype.on.call(
|
|
9312
|
+
return Stream.prototype.on.call(me2, ev, handler2);
|
|
9311
9313
|
};
|
|
9312
9314
|
var CDATA = "[CDATA[";
|
|
9313
9315
|
var DOCTYPE = "DOCTYPE";
|
|
@@ -9899,9 +9901,9 @@ function requireSax() {
|
|
|
9899
9901
|
var tag = parser.tag = parser.tags.pop();
|
|
9900
9902
|
parser.tagName = parser.tag.name;
|
|
9901
9903
|
emitNode(parser, "onclosetag", parser.tagName);
|
|
9902
|
-
var
|
|
9904
|
+
var x2 = {};
|
|
9903
9905
|
for (var i in tag.ns) {
|
|
9904
|
-
|
|
9906
|
+
x2[i] = tag.ns[i];
|
|
9905
9907
|
}
|
|
9906
9908
|
var parent = parser.tags[parser.tags.length - 1] || parser;
|
|
9907
9909
|
if (parser.opt.xmlns && tag.ns !== parent.ns) {
|
|
@@ -10958,8 +10960,8 @@ function requireXml2json() {
|
|
|
10958
10960
|
js = xml2js2(xml, options);
|
|
10959
10961
|
parentKey = "compact" in options && options.compact ? "_parent" : "parent";
|
|
10960
10962
|
if ("addParent" in options && options.addParent) {
|
|
10961
|
-
json = JSON.stringify(js, function(
|
|
10962
|
-
return
|
|
10963
|
+
json = JSON.stringify(js, function(k2, v2) {
|
|
10964
|
+
return k2 === parentKey ? "_" : v2;
|
|
10963
10965
|
}, options.spaces);
|
|
10964
10966
|
} else {
|
|
10965
10967
|
json = JSON.stringify(js, null, options.spaces);
|
|
@@ -11381,8 +11383,8 @@ function v4(options, buf, offset) {
|
|
|
11381
11383
|
rnds[8] = rnds[8] & 63 | 128;
|
|
11382
11384
|
return unsafeStringify(rnds);
|
|
11383
11385
|
}
|
|
11384
|
-
function getDefaultExportFromCjs(
|
|
11385
|
-
return
|
|
11386
|
+
function getDefaultExportFromCjs(x2) {
|
|
11387
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
11386
11388
|
}
|
|
11387
11389
|
const CRC_TABLE = new Int32Array([
|
|
11388
11390
|
0,
|
|
@@ -11683,8 +11685,9 @@ var bufferCrc32 = crc32;
|
|
|
11683
11685
|
const index = /* @__PURE__ */ getDefaultExportFromCjs(bufferCrc32);
|
|
11684
11686
|
function callOrGet(value, context = null, ...props) {
|
|
11685
11687
|
if (typeof value === "function") {
|
|
11686
|
-
|
|
11687
|
-
return
|
|
11688
|
+
const fn = value;
|
|
11689
|
+
if (context) return fn.bind(context)(...props);
|
|
11690
|
+
return fn(...props);
|
|
11688
11691
|
}
|
|
11689
11692
|
return value;
|
|
11690
11693
|
}
|
|
@@ -11695,6 +11698,7 @@ const isMacOS = () => {
|
|
|
11695
11698
|
return typeof navigator !== "undefined" ? /Mac/.test(navigator.platform) : false;
|
|
11696
11699
|
};
|
|
11697
11700
|
const isIOS = () => {
|
|
11701
|
+
if (typeof navigator === "undefined") return false;
|
|
11698
11702
|
return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
|
|
11699
11703
|
navigator.platform
|
|
11700
11704
|
);
|
|
@@ -15206,8 +15210,8 @@ function polygonToObj(polygonNode) {
|
|
|
15206
15210
|
const points = [];
|
|
15207
15211
|
polygonNode.elements.forEach((element) => {
|
|
15208
15212
|
if (["wp:start", "wp:lineTo"].includes(element.name)) {
|
|
15209
|
-
const { x, y: y2 } = element.attributes;
|
|
15210
|
-
points.push([polygonUnitsToPixels(
|
|
15213
|
+
const { x: x2, y: y2 } = element.attributes;
|
|
15214
|
+
points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
|
|
15211
15215
|
}
|
|
15212
15216
|
});
|
|
15213
15217
|
if (points.length > 1) {
|
|
@@ -15230,13 +15234,13 @@ function objToPolygon(points) {
|
|
|
15230
15234
|
elements: []
|
|
15231
15235
|
};
|
|
15232
15236
|
points.forEach((point, index2) => {
|
|
15233
|
-
const [
|
|
15237
|
+
const [x2, y2] = point;
|
|
15234
15238
|
const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
|
|
15235
15239
|
const pointNode = {
|
|
15236
15240
|
name: tagName,
|
|
15237
15241
|
type: tagName,
|
|
15238
15242
|
attributes: {
|
|
15239
|
-
x: pixelsToPolygonUnits(
|
|
15243
|
+
x: pixelsToPolygonUnits(x2),
|
|
15240
15244
|
y: pixelsToPolygonUnits(y2)
|
|
15241
15245
|
}
|
|
15242
15246
|
};
|
|
@@ -15404,18 +15408,37 @@ const hasSomeParentWithClass = (element, classname) => {
|
|
|
15404
15408
|
if (element.className?.split(" ")?.indexOf(classname) >= 0) return true;
|
|
15405
15409
|
return element.parentNode && hasSomeParentWithClass(element.parentNode, classname);
|
|
15406
15410
|
};
|
|
15407
|
-
function
|
|
15408
|
-
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15411
|
+
function convertSizeToCSS(value, type2) {
|
|
15412
|
+
if (typeof value === "string" && value.endsWith("%")) {
|
|
15413
|
+
type2 = "pct";
|
|
15414
|
+
}
|
|
15415
|
+
if (value === null || value === void 0) {
|
|
15416
|
+
value = 0;
|
|
15417
|
+
}
|
|
15418
|
+
switch (type2) {
|
|
15419
|
+
case "dxa":
|
|
15420
|
+
case null:
|
|
15421
|
+
case void 0:
|
|
15422
|
+
return `${twipsToPixels(value)}px`;
|
|
15423
|
+
case "nil":
|
|
15424
|
+
return "0";
|
|
15425
|
+
case "auto":
|
|
15426
|
+
return null;
|
|
15427
|
+
case "pct":
|
|
15428
|
+
let percent;
|
|
15429
|
+
if (typeof value === "number") {
|
|
15430
|
+
percent = value * 0.02;
|
|
15431
|
+
} else {
|
|
15432
|
+
if (value.endsWith("%")) {
|
|
15433
|
+
percent = parseFloat(value.slice(0, -1));
|
|
15434
|
+
} else {
|
|
15435
|
+
percent = parseFloat(value) * 0.02;
|
|
15436
|
+
}
|
|
15437
|
+
}
|
|
15438
|
+
return `${percent}%`;
|
|
15439
|
+
default:
|
|
15440
|
+
return null;
|
|
15441
|
+
}
|
|
15419
15442
|
}
|
|
15420
15443
|
const DEFAULT_DOCX_DEFS = {
|
|
15421
15444
|
"xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
|
|
@@ -16622,15 +16645,6 @@ const COMMENTS_XML_DEFINITIONS = {
|
|
|
16622
16645
|
DOCUMENT_RELS_XML_DEF,
|
|
16623
16646
|
CONTENT_TYPES
|
|
16624
16647
|
};
|
|
16625
|
-
const carbonCopy = (obj) => {
|
|
16626
|
-
if (!obj) return void 0;
|
|
16627
|
-
try {
|
|
16628
|
-
return JSON.parse(JSON.stringify(obj));
|
|
16629
|
-
} catch (e) {
|
|
16630
|
-
console.error("Error in carbonCopy", obj, e);
|
|
16631
|
-
return void 0;
|
|
16632
|
-
}
|
|
16633
|
-
};
|
|
16634
16648
|
function translateChildNodes(params) {
|
|
16635
16649
|
const { content: nodes } = params.node;
|
|
16636
16650
|
if (!nodes) return [];
|
|
@@ -18040,37 +18054,37 @@ const _NodeTranslator = class _NodeTranslator {
|
|
|
18040
18054
|
/** @type {typeof TranslatorTypes} */
|
|
18041
18055
|
__publicField(_NodeTranslator, "translatorTypes", TranslatorTypes);
|
|
18042
18056
|
let NodeTranslator = _NodeTranslator;
|
|
18043
|
-
const encode$
|
|
18057
|
+
const encode$R = (attributes) => {
|
|
18044
18058
|
return attributes["w:type"];
|
|
18045
18059
|
};
|
|
18046
|
-
const decode$
|
|
18060
|
+
const decode$T = (attrs) => {
|
|
18047
18061
|
const { lineBreakType } = attrs;
|
|
18048
18062
|
return lineBreakType;
|
|
18049
18063
|
};
|
|
18050
18064
|
const attrConfig$s = Object.freeze({
|
|
18051
18065
|
xmlName: "w:type",
|
|
18052
18066
|
sdName: "lineBreakType",
|
|
18053
|
-
encode: encode$
|
|
18054
|
-
decode: decode$
|
|
18067
|
+
encode: encode$R,
|
|
18068
|
+
decode: decode$T
|
|
18055
18069
|
});
|
|
18056
|
-
const encode$
|
|
18070
|
+
const encode$Q = (attributes) => {
|
|
18057
18071
|
const xmlAttrValue = attributes["w:clear"];
|
|
18058
18072
|
return xmlAttrValue;
|
|
18059
18073
|
};
|
|
18060
|
-
const decode$
|
|
18074
|
+
const decode$S = (attrs) => {
|
|
18061
18075
|
const { clear } = attrs;
|
|
18062
18076
|
return clear;
|
|
18063
18077
|
};
|
|
18064
18078
|
const attrConfig$r = Object.freeze({
|
|
18065
18079
|
xmlName: "w:clear",
|
|
18066
18080
|
sdName: "clear",
|
|
18067
|
-
encode: encode$
|
|
18068
|
-
decode: decode$
|
|
18081
|
+
encode: encode$Q,
|
|
18082
|
+
decode: decode$S
|
|
18069
18083
|
});
|
|
18070
18084
|
const validXmlAttributes$j = [attrConfig$s, attrConfig$r];
|
|
18071
|
-
const XML_NODE_NAME$
|
|
18072
|
-
const SD_NODE_NAME$
|
|
18073
|
-
const encode$
|
|
18085
|
+
const XML_NODE_NAME$q = "w:br";
|
|
18086
|
+
const SD_NODE_NAME$k = "lineBreak";
|
|
18087
|
+
const encode$P = (_2, encodedAttrs) => {
|
|
18074
18088
|
const isPageBreak = encodedAttrs?.lineBreakType === "page";
|
|
18075
18089
|
const translated = {
|
|
18076
18090
|
type: isPageBreak ? "hardBreak" : "lineBreak"
|
|
@@ -18080,7 +18094,7 @@ const encode$N = (_2, encodedAttrs) => {
|
|
|
18080
18094
|
}
|
|
18081
18095
|
return translated;
|
|
18082
18096
|
};
|
|
18083
|
-
const decode$
|
|
18097
|
+
const decode$R = (params, decodedAttrs) => {
|
|
18084
18098
|
const { node } = params;
|
|
18085
18099
|
if (!node) return;
|
|
18086
18100
|
const wBreak = { name: "w:br" };
|
|
@@ -18097,39 +18111,39 @@ const decode$P = (params, decodedAttrs) => {
|
|
|
18097
18111
|
};
|
|
18098
18112
|
return translated;
|
|
18099
18113
|
};
|
|
18100
|
-
const config$
|
|
18101
|
-
xmlName: XML_NODE_NAME$
|
|
18102
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
18114
|
+
const config$p = {
|
|
18115
|
+
xmlName: XML_NODE_NAME$q,
|
|
18116
|
+
sdNodeOrKeyName: SD_NODE_NAME$k,
|
|
18103
18117
|
type: NodeTranslator.translatorTypes.NODE,
|
|
18104
|
-
encode: encode$
|
|
18105
|
-
decode: decode$
|
|
18118
|
+
encode: encode$P,
|
|
18119
|
+
decode: decode$R,
|
|
18106
18120
|
attributes: validXmlAttributes$j
|
|
18107
18121
|
};
|
|
18108
|
-
const translator$
|
|
18109
|
-
const encode$
|
|
18110
|
-
const decode$
|
|
18122
|
+
const translator$23 = NodeTranslator.from(config$p);
|
|
18123
|
+
const encode$O = (attributes) => attributes?.["w:val"];
|
|
18124
|
+
const decode$Q = (attrs) => attrs?.highlight;
|
|
18111
18125
|
const attrConfig$q = Object.freeze({
|
|
18112
18126
|
xmlName: "w:val",
|
|
18113
18127
|
sdName: "highlight",
|
|
18114
|
-
encode: encode$
|
|
18115
|
-
decode: decode$
|
|
18128
|
+
encode: encode$O,
|
|
18129
|
+
decode: decode$Q
|
|
18116
18130
|
});
|
|
18117
18131
|
const validXmlAttributes$i = [attrConfig$q];
|
|
18118
|
-
const XML_NODE_NAME$
|
|
18132
|
+
const XML_NODE_NAME$p = "w:highlight";
|
|
18119
18133
|
const SD_ATTR_KEY$4 = "highlight";
|
|
18120
18134
|
const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
|
|
18121
|
-
const encode$
|
|
18135
|
+
const encode$N = (params, encodedAttrs = {}) => {
|
|
18122
18136
|
const { nodes } = params;
|
|
18123
18137
|
const node = nodes?.[0];
|
|
18124
18138
|
const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
|
|
18125
18139
|
return {
|
|
18126
18140
|
type: "attr",
|
|
18127
|
-
xmlName: XML_NODE_NAME$
|
|
18141
|
+
xmlName: XML_NODE_NAME$p,
|
|
18128
18142
|
sdNodeOrKeyName: SD_ATTR_KEY$4,
|
|
18129
18143
|
attributes: { "w:val": value ?? null }
|
|
18130
18144
|
};
|
|
18131
18145
|
};
|
|
18132
|
-
const decode$
|
|
18146
|
+
const decode$P = (params) => {
|
|
18133
18147
|
const attrs = params?.node?.attrs || {};
|
|
18134
18148
|
const highlightValue = attrs.highlight?.["w:val"] ?? attrs.highlight ?? attrs.color ?? null;
|
|
18135
18149
|
if (!highlightValue) return void 0;
|
|
@@ -18137,14 +18151,14 @@ const decode$N = (params) => {
|
|
|
18137
18151
|
if (!normalizedValue) return void 0;
|
|
18138
18152
|
if (DISABLED_TOKENS.has(normalizedValue)) {
|
|
18139
18153
|
return {
|
|
18140
|
-
name: XML_NODE_NAME$
|
|
18154
|
+
name: XML_NODE_NAME$p,
|
|
18141
18155
|
attributes: { "w:val": "none" }
|
|
18142
18156
|
};
|
|
18143
18157
|
}
|
|
18144
18158
|
const keyword = getDocxHighlightKeywordFromHex(highlightValue);
|
|
18145
18159
|
if (keyword) {
|
|
18146
18160
|
return {
|
|
18147
|
-
name: XML_NODE_NAME$
|
|
18161
|
+
name: XML_NODE_NAME$p,
|
|
18148
18162
|
attributes: { "w:val": keyword }
|
|
18149
18163
|
};
|
|
18150
18164
|
}
|
|
@@ -18159,64 +18173,64 @@ const decode$N = (params) => {
|
|
|
18159
18173
|
}
|
|
18160
18174
|
};
|
|
18161
18175
|
};
|
|
18162
|
-
const config$
|
|
18163
|
-
xmlName: XML_NODE_NAME$
|
|
18176
|
+
const config$o = {
|
|
18177
|
+
xmlName: XML_NODE_NAME$p,
|
|
18164
18178
|
sdNodeOrKeyName: SD_ATTR_KEY$4,
|
|
18165
18179
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
18166
|
-
encode: encode$
|
|
18167
|
-
decode: decode$
|
|
18180
|
+
encode: encode$N,
|
|
18181
|
+
decode: decode$P,
|
|
18168
18182
|
attributes: validXmlAttributes$i
|
|
18169
18183
|
};
|
|
18170
|
-
const translator$
|
|
18171
|
-
const encode$
|
|
18184
|
+
const translator$22 = NodeTranslator.from(config$o);
|
|
18185
|
+
const encode$M = (attributes) => {
|
|
18172
18186
|
return attributes["w:val"];
|
|
18173
18187
|
};
|
|
18174
|
-
const decode$
|
|
18188
|
+
const decode$O = (attrs) => {
|
|
18175
18189
|
const { tabType } = attrs || {};
|
|
18176
18190
|
return tabType;
|
|
18177
18191
|
};
|
|
18178
18192
|
const attrConfig$p = Object.freeze({
|
|
18179
18193
|
xmlName: "w:val",
|
|
18180
18194
|
sdName: "tabType",
|
|
18181
|
-
encode: encode$
|
|
18182
|
-
decode: decode$
|
|
18195
|
+
encode: encode$M,
|
|
18196
|
+
decode: decode$O
|
|
18183
18197
|
});
|
|
18184
|
-
const encode$
|
|
18198
|
+
const encode$L = (attributes) => {
|
|
18185
18199
|
return attributes["w:leader"];
|
|
18186
18200
|
};
|
|
18187
|
-
const decode$
|
|
18201
|
+
const decode$N = (attrs) => {
|
|
18188
18202
|
const { leader } = attrs || {};
|
|
18189
18203
|
return leader;
|
|
18190
18204
|
};
|
|
18191
18205
|
const attrConfig$o = Object.freeze({
|
|
18192
18206
|
xmlName: "w:leader",
|
|
18193
18207
|
sdName: "leader",
|
|
18194
|
-
encode: encode$
|
|
18195
|
-
decode: decode$
|
|
18208
|
+
encode: encode$L,
|
|
18209
|
+
decode: decode$N
|
|
18196
18210
|
});
|
|
18197
|
-
const encode$
|
|
18211
|
+
const encode$K = (attributes) => {
|
|
18198
18212
|
if (attributes["w:pos"] != null) return parseInt(attributes["w:pos"]);
|
|
18199
18213
|
return null;
|
|
18200
18214
|
};
|
|
18201
|
-
const decode$
|
|
18215
|
+
const decode$M = (attrs) => {
|
|
18202
18216
|
const { pos } = attrs || {};
|
|
18203
18217
|
return pos?.toString();
|
|
18204
18218
|
};
|
|
18205
18219
|
const attrConfig$n = Object.freeze({
|
|
18206
18220
|
xmlName: "w:pos",
|
|
18207
18221
|
sdName: "pos",
|
|
18208
|
-
encode: encode$
|
|
18209
|
-
decode: decode$
|
|
18222
|
+
encode: encode$K,
|
|
18223
|
+
decode: decode$M
|
|
18210
18224
|
});
|
|
18211
18225
|
const validXmlAttributes$h = [attrConfig$p, attrConfig$n, attrConfig$o];
|
|
18212
|
-
const XML_NODE_NAME$
|
|
18213
|
-
const SD_NODE_NAME$
|
|
18214
|
-
const encode$
|
|
18226
|
+
const XML_NODE_NAME$o = "w:tab";
|
|
18227
|
+
const SD_NODE_NAME$j = "tab";
|
|
18228
|
+
const encode$J = (_2, encodedAttrs = {}) => {
|
|
18215
18229
|
const translated = { type: "tab" };
|
|
18216
18230
|
if (encodedAttrs) translated.attrs = { ...encodedAttrs };
|
|
18217
18231
|
return translated;
|
|
18218
18232
|
};
|
|
18219
|
-
function decode$
|
|
18233
|
+
function decode$L(params, decodedAttrs = {}) {
|
|
18220
18234
|
const { node } = params || {};
|
|
18221
18235
|
if (!node) return;
|
|
18222
18236
|
const wTab = { name: "w:tab", elements: [] };
|
|
@@ -18238,15 +18252,24 @@ function decode$J(params, decodedAttrs = {}) {
|
|
|
18238
18252
|
}
|
|
18239
18253
|
return translated;
|
|
18240
18254
|
}
|
|
18241
|
-
const config$
|
|
18242
|
-
xmlName: XML_NODE_NAME$
|
|
18243
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
18255
|
+
const config$n = {
|
|
18256
|
+
xmlName: XML_NODE_NAME$o,
|
|
18257
|
+
sdNodeOrKeyName: SD_NODE_NAME$j,
|
|
18244
18258
|
type: NodeTranslator.translatorTypes.NODE,
|
|
18245
|
-
encode: encode$
|
|
18246
|
-
decode: decode$
|
|
18259
|
+
encode: encode$J,
|
|
18260
|
+
decode: decode$L,
|
|
18247
18261
|
attributes: validXmlAttributes$h
|
|
18248
18262
|
};
|
|
18249
|
-
const translator$
|
|
18263
|
+
const translator$21 = NodeTranslator.from(config$n);
|
|
18264
|
+
const carbonCopy = (obj) => {
|
|
18265
|
+
if (!obj) return void 0;
|
|
18266
|
+
try {
|
|
18267
|
+
return JSON.parse(JSON.stringify(obj));
|
|
18268
|
+
} catch (e) {
|
|
18269
|
+
console.error("Error in carbonCopy", obj, e);
|
|
18270
|
+
return void 0;
|
|
18271
|
+
}
|
|
18272
|
+
};
|
|
18250
18273
|
const mergeTextNodes = (nodes) => {
|
|
18251
18274
|
if (!nodes || !Array.isArray(nodes)) {
|
|
18252
18275
|
return nodes;
|
|
@@ -18563,53 +18586,53 @@ const integerToString = (value) => {
|
|
|
18563
18586
|
const intValue = parseInteger(value);
|
|
18564
18587
|
return intValue != void 0 ? String(intValue) : void 0;
|
|
18565
18588
|
};
|
|
18566
|
-
const translator$
|
|
18567
|
-
const translator$
|
|
18568
|
-
const translator$
|
|
18569
|
-
const encode$
|
|
18570
|
-
const decode$
|
|
18589
|
+
const translator$20 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
|
|
18590
|
+
const translator$1$ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
|
|
18591
|
+
const translator$1_ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
|
|
18592
|
+
const encode$I = (attributes) => attributes?.["w:val"];
|
|
18593
|
+
const decode$K = (attrs) => attrs?.underline;
|
|
18571
18594
|
const attrConfig$m = Object.freeze({
|
|
18572
18595
|
xmlName: "w:val",
|
|
18573
18596
|
sdName: "underline",
|
|
18574
|
-
encode: encode$
|
|
18575
|
-
decode: decode$
|
|
18597
|
+
encode: encode$I,
|
|
18598
|
+
decode: decode$K
|
|
18576
18599
|
});
|
|
18577
|
-
const encode$
|
|
18578
|
-
const decode$
|
|
18600
|
+
const encode$H = (attributes) => attributes?.["w:color"];
|
|
18601
|
+
const decode$J = (attrs) => attrs?.color;
|
|
18579
18602
|
const attrConfig$l = Object.freeze({
|
|
18580
18603
|
xmlName: "w:color",
|
|
18581
18604
|
sdName: "color",
|
|
18582
|
-
encode: encode$
|
|
18583
|
-
decode: decode$
|
|
18605
|
+
encode: encode$H,
|
|
18606
|
+
decode: decode$J
|
|
18584
18607
|
});
|
|
18585
|
-
const encode$
|
|
18586
|
-
const decode$
|
|
18608
|
+
const encode$G = (attributes) => attributes?.["w:themeColor"];
|
|
18609
|
+
const decode$I = (attrs) => attrs?.themeColor;
|
|
18587
18610
|
const attrConfig$k = Object.freeze({
|
|
18588
18611
|
xmlName: "w:themeColor",
|
|
18589
18612
|
sdName: "themeColor",
|
|
18590
|
-
encode: encode$
|
|
18591
|
-
decode: decode$
|
|
18613
|
+
encode: encode$G,
|
|
18614
|
+
decode: decode$I
|
|
18592
18615
|
});
|
|
18593
|
-
const encode$
|
|
18594
|
-
const decode$
|
|
18616
|
+
const encode$F = (attributes) => attributes?.["w:themeTint"];
|
|
18617
|
+
const decode$H = (attrs) => attrs?.themeTint;
|
|
18595
18618
|
const attrConfig$j = Object.freeze({
|
|
18596
18619
|
xmlName: "w:themeTint",
|
|
18597
18620
|
sdName: "themeTint",
|
|
18598
|
-
encode: encode$
|
|
18599
|
-
decode: decode$
|
|
18621
|
+
encode: encode$F,
|
|
18622
|
+
decode: decode$H
|
|
18600
18623
|
});
|
|
18601
|
-
const encode$
|
|
18602
|
-
const decode$
|
|
18624
|
+
const encode$E = (attributes) => attributes?.["w:themeShade"];
|
|
18625
|
+
const decode$G = (attrs) => attrs?.themeShade;
|
|
18603
18626
|
const attrConfig$i = Object.freeze({
|
|
18604
18627
|
xmlName: "w:themeShade",
|
|
18605
18628
|
sdName: "themeShade",
|
|
18606
|
-
encode: encode$
|
|
18607
|
-
decode: decode$
|
|
18629
|
+
encode: encode$E,
|
|
18630
|
+
decode: decode$G
|
|
18608
18631
|
});
|
|
18609
18632
|
const validXmlAttributes$g = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j, attrConfig$i];
|
|
18610
|
-
const XML_NODE_NAME$
|
|
18633
|
+
const XML_NODE_NAME$n = "w:u";
|
|
18611
18634
|
const SD_ATTR_KEY$3 = "underline";
|
|
18612
|
-
const encode$
|
|
18635
|
+
const encode$D = (params, encodedAttrs = {}) => {
|
|
18613
18636
|
const { nodes } = params;
|
|
18614
18637
|
const node = nodes?.[0];
|
|
18615
18638
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -18625,12 +18648,12 @@ const encode$B = (params, encodedAttrs = {}) => {
|
|
|
18625
18648
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
18626
18649
|
return {
|
|
18627
18650
|
type: "attr",
|
|
18628
|
-
xmlName: XML_NODE_NAME$
|
|
18651
|
+
xmlName: XML_NODE_NAME$n,
|
|
18629
18652
|
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
18630
18653
|
attributes
|
|
18631
18654
|
};
|
|
18632
18655
|
};
|
|
18633
|
-
const decode$
|
|
18656
|
+
const decode$F = (params) => {
|
|
18634
18657
|
const attrs = params?.node?.attrs?.underline || params?.node?.attrs || {};
|
|
18635
18658
|
const underlineType = attrs.underlineType ?? attrs.underline ?? attrs["w:val"] ?? null;
|
|
18636
18659
|
const color = attrs.underlineColor ?? attrs.color ?? attrs["w:color"] ?? null;
|
|
@@ -18648,22 +18671,22 @@ const decode$D = (params) => {
|
|
|
18648
18671
|
if (themeTint) attributes["w:themeTint"] = themeTint;
|
|
18649
18672
|
if (themeShade) attributes["w:themeShade"] = themeShade;
|
|
18650
18673
|
return {
|
|
18651
|
-
name: XML_NODE_NAME$
|
|
18674
|
+
name: XML_NODE_NAME$n,
|
|
18652
18675
|
attributes
|
|
18653
18676
|
};
|
|
18654
18677
|
};
|
|
18655
|
-
const config$
|
|
18656
|
-
xmlName: XML_NODE_NAME$
|
|
18678
|
+
const config$m = {
|
|
18679
|
+
xmlName: XML_NODE_NAME$n,
|
|
18657
18680
|
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
18658
18681
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
18659
|
-
encode: encode$
|
|
18660
|
-
decode: decode$
|
|
18682
|
+
encode: encode$D,
|
|
18683
|
+
decode: decode$F,
|
|
18661
18684
|
attributes: validXmlAttributes$g
|
|
18662
18685
|
};
|
|
18663
|
-
const translator$
|
|
18664
|
-
const translator$
|
|
18665
|
-
const translator$
|
|
18666
|
-
const translator$
|
|
18686
|
+
const translator$1Z = NodeTranslator.from(config$m);
|
|
18687
|
+
const translator$1Y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
|
|
18688
|
+
const translator$1X = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
|
|
18689
|
+
const translator$1W = NodeTranslator.from({
|
|
18667
18690
|
xmlName: "w:color",
|
|
18668
18691
|
sdNodeOrKeyName: "color",
|
|
18669
18692
|
attributes: [
|
|
@@ -18680,7 +18703,7 @@ const translator$1U = NodeTranslator.from({
|
|
|
18680
18703
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18681
18704
|
}
|
|
18682
18705
|
});
|
|
18683
|
-
const translator$
|
|
18706
|
+
const translator$1V = NodeTranslator.from({
|
|
18684
18707
|
xmlName: "w:rFonts",
|
|
18685
18708
|
sdNodeOrKeyName: "fontFamily",
|
|
18686
18709
|
attributes: [
|
|
@@ -18711,16 +18734,16 @@ const translator$1T = NodeTranslator.from({
|
|
|
18711
18734
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18712
18735
|
}
|
|
18713
18736
|
});
|
|
18714
|
-
const translator$
|
|
18715
|
-
const translator$
|
|
18716
|
-
const translator$
|
|
18717
|
-
const translator$
|
|
18737
|
+
const translator$1U = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
|
|
18738
|
+
const translator$1T = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
|
|
18739
|
+
const translator$1S = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
|
|
18740
|
+
const translator$1R = NodeTranslator.from({
|
|
18718
18741
|
xmlName: "w:caps",
|
|
18719
18742
|
sdNodeOrKeyName: "textTransform",
|
|
18720
18743
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1") ? "uppercase" : "none",
|
|
18721
18744
|
decode: ({ node }) => node.attrs["textTransform"] != null ? { name: "w:caps", attributes: { "w:val": booleanToString(node.attrs["textTransform"] === "uppercase") } } : void 0
|
|
18722
18745
|
});
|
|
18723
|
-
const translator$
|
|
18746
|
+
const translator$1Q = NodeTranslator.from({
|
|
18724
18747
|
xmlName: "w:shd",
|
|
18725
18748
|
sdNodeOrKeyName: "shading",
|
|
18726
18749
|
attributes: [
|
|
@@ -18742,7 +18765,7 @@ const translator$1O = NodeTranslator.from({
|
|
|
18742
18765
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18743
18766
|
}
|
|
18744
18767
|
});
|
|
18745
|
-
const translator$
|
|
18768
|
+
const translator$1P = NodeTranslator.from({
|
|
18746
18769
|
xmlName: "w:lang",
|
|
18747
18770
|
sdNodeOrKeyName: "lang",
|
|
18748
18771
|
attributes: [createAttributeHandler("w:val"), createAttributeHandler("w:eastAsia"), createAttributeHandler("w:bidi")],
|
|
@@ -18754,26 +18777,26 @@ const translator$1N = NodeTranslator.from({
|
|
|
18754
18777
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18755
18778
|
}
|
|
18756
18779
|
});
|
|
18757
|
-
const translator$
|
|
18780
|
+
const translator$1O = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
|
|
18758
18781
|
const propertyTranslators$b = [
|
|
18782
|
+
translator$20,
|
|
18783
|
+
translator$1$,
|
|
18759
18784
|
translator$1_,
|
|
18760
18785
|
translator$1Z,
|
|
18761
18786
|
translator$1Y,
|
|
18762
18787
|
translator$1X,
|
|
18763
18788
|
translator$1W,
|
|
18789
|
+
translator$22,
|
|
18764
18790
|
translator$1V,
|
|
18765
18791
|
translator$1U,
|
|
18766
|
-
translator$20,
|
|
18767
18792
|
translator$1T,
|
|
18768
18793
|
translator$1S,
|
|
18769
18794
|
translator$1R,
|
|
18770
18795
|
translator$1Q,
|
|
18771
18796
|
translator$1P,
|
|
18772
|
-
translator$1O
|
|
18773
|
-
translator$1N,
|
|
18774
|
-
translator$1M
|
|
18797
|
+
translator$1O
|
|
18775
18798
|
];
|
|
18776
|
-
const translator$
|
|
18799
|
+
const translator$1N = NodeTranslator.from(
|
|
18777
18800
|
createNestedPropertiesTranslator("w:rPr", "runProperties", propertyTranslators$b)
|
|
18778
18801
|
);
|
|
18779
18802
|
const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
|
|
@@ -18790,10 +18813,10 @@ const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
|
|
|
18790
18813
|
"w16sdtfl",
|
|
18791
18814
|
"w16se"
|
|
18792
18815
|
]);
|
|
18793
|
-
const XML_NODE_NAME$
|
|
18794
|
-
const SD_NODE_NAME$
|
|
18816
|
+
const XML_NODE_NAME$m = "mc:AlternateContent";
|
|
18817
|
+
const SD_NODE_NAME$i = [];
|
|
18795
18818
|
const validXmlAttributes$f = [];
|
|
18796
|
-
function encode$
|
|
18819
|
+
function encode$C(params) {
|
|
18797
18820
|
const { nodeListHandler } = params;
|
|
18798
18821
|
const { node } = params.extraParams;
|
|
18799
18822
|
if (!node || !node.type) {
|
|
@@ -18809,7 +18832,7 @@ function encode$A(params) {
|
|
|
18809
18832
|
path: buildPath(params.path, node, branch)
|
|
18810
18833
|
});
|
|
18811
18834
|
}
|
|
18812
|
-
function decode$
|
|
18835
|
+
function decode$E(params) {
|
|
18813
18836
|
const { node } = params;
|
|
18814
18837
|
const { drawingContent } = node.attrs;
|
|
18815
18838
|
const drawing = {
|
|
@@ -18826,12 +18849,12 @@ function decode$C(params) {
|
|
|
18826
18849
|
elements: [choice]
|
|
18827
18850
|
};
|
|
18828
18851
|
}
|
|
18829
|
-
const config$
|
|
18830
|
-
xmlName: XML_NODE_NAME$
|
|
18831
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
18852
|
+
const config$l = {
|
|
18853
|
+
xmlName: XML_NODE_NAME$m,
|
|
18854
|
+
sdNodeOrKeyName: SD_NODE_NAME$i,
|
|
18832
18855
|
type: NodeTranslator.translatorTypes.NODE,
|
|
18833
|
-
encode: encode$
|
|
18834
|
-
decode: decode$
|
|
18856
|
+
encode: encode$C,
|
|
18857
|
+
decode: decode$E,
|
|
18835
18858
|
attributes: validXmlAttributes$f
|
|
18836
18859
|
};
|
|
18837
18860
|
function selectAlternateContentElements(node) {
|
|
@@ -18855,18 +18878,18 @@ function selectAlternateContentElements(node) {
|
|
|
18855
18878
|
elements: carbonCopy(selectedElements)
|
|
18856
18879
|
};
|
|
18857
18880
|
}
|
|
18858
|
-
const translator$
|
|
18881
|
+
const translator$1M = NodeTranslator.from(config$l);
|
|
18859
18882
|
function buildPath(existingPath = [], node, branch) {
|
|
18860
18883
|
const path = [...existingPath];
|
|
18861
18884
|
if (node) path.push(node);
|
|
18862
18885
|
if (branch) path.push(branch);
|
|
18863
18886
|
return path;
|
|
18864
18887
|
}
|
|
18865
|
-
const translator$
|
|
18866
|
-
const translator$
|
|
18867
|
-
const translator$
|
|
18868
|
-
const translator$
|
|
18869
|
-
const translator$
|
|
18888
|
+
const translator$1L = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
|
|
18889
|
+
const translator$1K = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
|
|
18890
|
+
const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
|
|
18891
|
+
const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
|
|
18892
|
+
const translator$1H = NodeTranslator.from({
|
|
18870
18893
|
xmlName: "w:cnfStyle",
|
|
18871
18894
|
sdNodeOrKeyName: "cnfStyle",
|
|
18872
18895
|
attributes: [
|
|
@@ -18892,9 +18915,9 @@ const translator$1F = NodeTranslator.from({
|
|
|
18892
18915
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18893
18916
|
}
|
|
18894
18917
|
});
|
|
18895
|
-
const translator$
|
|
18896
|
-
const translator$
|
|
18897
|
-
const translator$
|
|
18918
|
+
const translator$1G = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
|
|
18919
|
+
const translator$1F = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
|
|
18920
|
+
const translator$1E = NodeTranslator.from({
|
|
18898
18921
|
xmlName: "w:framePr",
|
|
18899
18922
|
sdNodeOrKeyName: "framePr",
|
|
18900
18923
|
attributes: [
|
|
@@ -18922,7 +18945,7 @@ const translator$1C = NodeTranslator.from({
|
|
|
18922
18945
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18923
18946
|
}
|
|
18924
18947
|
});
|
|
18925
|
-
const translator$
|
|
18948
|
+
const translator$1D = NodeTranslator.from({
|
|
18926
18949
|
xmlName: "w:ind",
|
|
18927
18950
|
sdNodeOrKeyName: "indent",
|
|
18928
18951
|
attributes: [
|
|
@@ -18947,12 +18970,12 @@ const translator$1B = NodeTranslator.from({
|
|
|
18947
18970
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18948
18971
|
}
|
|
18949
18972
|
});
|
|
18950
|
-
const translator$
|
|
18951
|
-
const translator$
|
|
18952
|
-
const translator$
|
|
18953
|
-
const translator$
|
|
18954
|
-
const translator$
|
|
18955
|
-
const translator$
|
|
18973
|
+
const translator$1C = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
|
|
18974
|
+
const translator$1B = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
|
|
18975
|
+
const translator$1A = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
|
|
18976
|
+
const translator$1z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
|
|
18977
|
+
const translator$1y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
|
|
18978
|
+
const translator$1x = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
|
|
18956
18979
|
const createTrackStyleMark = (marks) => {
|
|
18957
18980
|
const trackStyleMark = marks.find((mark) => mark.type === "trackFormat");
|
|
18958
18981
|
if (trackStyleMark) {
|
|
@@ -18970,7 +18993,7 @@ const createTrackStyleMark = (marks) => {
|
|
|
18970
18993
|
}
|
|
18971
18994
|
return void 0;
|
|
18972
18995
|
};
|
|
18973
|
-
const XML_NODE_NAME$
|
|
18996
|
+
const XML_NODE_NAME$l = "w:ins";
|
|
18974
18997
|
const SD_ATTR_KEY$2 = "trackInsert";
|
|
18975
18998
|
const validXmlAttributes$e = [
|
|
18976
18999
|
createAttributeHandler("w:id", "id"),
|
|
@@ -18978,7 +19001,7 @@ const validXmlAttributes$e = [
|
|
|
18978
19001
|
createAttributeHandler("w:author", "author"),
|
|
18979
19002
|
createAttributeHandler("w:authorEmail", "authorEmail")
|
|
18980
19003
|
];
|
|
18981
|
-
const encode$
|
|
19004
|
+
const encode$B = (params, encodedAttrs = {}) => {
|
|
18982
19005
|
const { nodeListHandler, extraParams = {} } = params;
|
|
18983
19006
|
const { node } = extraParams;
|
|
18984
19007
|
const subs = nodeListHandler.handler({
|
|
@@ -18994,7 +19017,7 @@ const encode$z = (params, encodedAttrs = {}) => {
|
|
|
18994
19017
|
});
|
|
18995
19018
|
return subs;
|
|
18996
19019
|
};
|
|
18997
|
-
function decode$
|
|
19020
|
+
function decode$D(params) {
|
|
18998
19021
|
const { node } = params;
|
|
18999
19022
|
if (!node || !node.type) {
|
|
19000
19023
|
return null;
|
|
@@ -19019,50 +19042,50 @@ function decode$B(params) {
|
|
|
19019
19042
|
elements: [translatedTextNode]
|
|
19020
19043
|
};
|
|
19021
19044
|
}
|
|
19022
|
-
const config$
|
|
19023
|
-
xmlName: XML_NODE_NAME$
|
|
19045
|
+
const config$k = {
|
|
19046
|
+
xmlName: XML_NODE_NAME$l,
|
|
19024
19047
|
sdNodeOrKeyName: SD_ATTR_KEY$2,
|
|
19025
19048
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
19026
|
-
encode: encode$
|
|
19027
|
-
decode: decode$
|
|
19049
|
+
encode: encode$B,
|
|
19050
|
+
decode: decode$D,
|
|
19028
19051
|
attributes: validXmlAttributes$e
|
|
19029
19052
|
};
|
|
19030
|
-
const translator$
|
|
19031
|
-
const translator$
|
|
19032
|
-
const propertyTranslators$a = [translator$
|
|
19033
|
-
const translator$
|
|
19053
|
+
const translator$1w = NodeTranslator.from(config$k);
|
|
19054
|
+
const translator$1v = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
|
|
19055
|
+
const propertyTranslators$a = [translator$1M, translator$1x, translator$1w, translator$1v];
|
|
19056
|
+
const translator$1u = NodeTranslator.from(
|
|
19034
19057
|
createNestedPropertiesTranslator("w:numPr", "numberingProperties", propertyTranslators$a)
|
|
19035
19058
|
);
|
|
19036
|
-
const translator$
|
|
19059
|
+
const translator$1t = NodeTranslator.from(
|
|
19037
19060
|
createSingleAttrPropertyHandler("w:outlineLvl", "outlineLvl", "w:val", parseInteger, integerToString)
|
|
19038
19061
|
);
|
|
19039
|
-
const translator$
|
|
19040
|
-
const translator$
|
|
19041
|
-
const translator$
|
|
19042
|
-
const translator$
|
|
19043
|
-
const translator$
|
|
19044
|
-
const translator$
|
|
19045
|
-
const translator$
|
|
19046
|
-
const translator$
|
|
19047
|
-
const translator$
|
|
19048
|
-
const translator$
|
|
19049
|
-
const translator$
|
|
19062
|
+
const translator$1s = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
|
|
19063
|
+
const translator$1r = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
|
|
19064
|
+
const translator$1q = NodeTranslator.from(createBorderPropertyHandler("w:between"));
|
|
19065
|
+
const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
|
|
19066
|
+
const translator$1o = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
|
|
19067
|
+
const translator$1n = NodeTranslator.from(createBorderPropertyHandler("w:left"));
|
|
19068
|
+
const translator$1m = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
|
|
19069
|
+
const translator$1l = NodeTranslator.from(createBorderPropertyHandler("w:right"));
|
|
19070
|
+
const translator$1k = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
|
|
19071
|
+
const translator$1j = NodeTranslator.from(createBorderPropertyHandler("w:top"));
|
|
19072
|
+
const translator$1i = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
|
|
19050
19073
|
const propertyTranslators$9 = [
|
|
19051
|
-
translator$
|
|
19074
|
+
translator$1M,
|
|
19075
|
+
translator$1r,
|
|
19076
|
+
translator$1q,
|
|
19052
19077
|
translator$1p,
|
|
19053
|
-
translator$1o,
|
|
19054
19078
|
translator$1n,
|
|
19055
19079
|
translator$1l,
|
|
19056
|
-
translator$1j
|
|
19057
|
-
translator$1h
|
|
19080
|
+
translator$1j
|
|
19058
19081
|
];
|
|
19059
|
-
const translator$
|
|
19082
|
+
const translator$1h = NodeTranslator.from(
|
|
19060
19083
|
createNestedPropertiesTranslator("w:pBdr", "borders", propertyTranslators$9)
|
|
19061
19084
|
);
|
|
19062
|
-
const translator$
|
|
19063
|
-
const translator$
|
|
19064
|
-
const translator$
|
|
19065
|
-
const translator$
|
|
19085
|
+
const translator$1g = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
|
|
19086
|
+
const translator$1f = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
|
|
19087
|
+
const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
|
|
19088
|
+
const translator$1d = NodeTranslator.from({
|
|
19066
19089
|
xmlName: "w:spacing",
|
|
19067
19090
|
sdNodeOrKeyName: "spacing",
|
|
19068
19091
|
attributes: [
|
|
@@ -19083,20 +19106,22 @@ const translator$1b = NodeTranslator.from({
|
|
|
19083
19106
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
19084
19107
|
}
|
|
19085
19108
|
});
|
|
19086
|
-
const translator$
|
|
19087
|
-
const translator$
|
|
19088
|
-
const translator$
|
|
19089
|
-
const propertyTranslators$8 = [translator$
|
|
19090
|
-
const translator$
|
|
19109
|
+
const translator$1c = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
|
|
19110
|
+
const translator$1b = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
|
|
19111
|
+
const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
|
|
19112
|
+
const propertyTranslators$8 = [translator$1M, translator$21];
|
|
19113
|
+
const translator$19 = NodeTranslator.from(
|
|
19091
19114
|
createNestedArrayPropertyHandler("w:tabs", "tabStops", propertyTranslators$8, { skipRun: true })
|
|
19092
19115
|
);
|
|
19093
|
-
const translator$
|
|
19094
|
-
const translator$
|
|
19095
|
-
const translator$
|
|
19096
|
-
const translator$
|
|
19097
|
-
const translator$
|
|
19098
|
-
const translator$
|
|
19116
|
+
const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
|
|
19117
|
+
const translator$17 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
|
|
19118
|
+
const translator$16 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
|
|
19119
|
+
const translator$15 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
|
|
19120
|
+
const translator$14 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
|
|
19121
|
+
const translator$13 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
|
|
19099
19122
|
const propertyTranslators$7 = [
|
|
19123
|
+
translator$1M,
|
|
19124
|
+
translator$1L,
|
|
19100
19125
|
translator$1K,
|
|
19101
19126
|
translator$1J,
|
|
19102
19127
|
translator$1I,
|
|
@@ -19110,15 +19135,15 @@ const propertyTranslators$7 = [
|
|
|
19110
19135
|
translator$1A,
|
|
19111
19136
|
translator$1z,
|
|
19112
19137
|
translator$1y,
|
|
19113
|
-
translator$
|
|
19114
|
-
translator$
|
|
19138
|
+
translator$1u,
|
|
19139
|
+
translator$1t,
|
|
19115
19140
|
translator$1s,
|
|
19116
|
-
translator$
|
|
19117
|
-
translator$
|
|
19141
|
+
translator$1h,
|
|
19142
|
+
translator$1g,
|
|
19118
19143
|
translator$1f,
|
|
19144
|
+
translator$1Q,
|
|
19119
19145
|
translator$1e,
|
|
19120
19146
|
translator$1d,
|
|
19121
|
-
translator$1O,
|
|
19122
19147
|
translator$1c,
|
|
19123
19148
|
translator$1b,
|
|
19124
19149
|
translator$1a,
|
|
@@ -19129,18 +19154,16 @@ const propertyTranslators$7 = [
|
|
|
19129
19154
|
translator$15,
|
|
19130
19155
|
translator$14,
|
|
19131
19156
|
translator$13,
|
|
19132
|
-
translator$
|
|
19133
|
-
translator$11,
|
|
19134
|
-
translator$1L
|
|
19157
|
+
translator$1N
|
|
19135
19158
|
];
|
|
19136
|
-
const translator$
|
|
19159
|
+
const translator$12 = NodeTranslator.from(
|
|
19137
19160
|
createNestedPropertiesTranslator("w:pPr", "paragraphProperties", propertyTranslators$7)
|
|
19138
19161
|
);
|
|
19139
19162
|
function getUnderlineCssString({ type: type2 = "single", color = null, thickness = null, approximate = true } = {}) {
|
|
19140
19163
|
const parts = [];
|
|
19141
|
-
const add = (
|
|
19164
|
+
const add = (k2, v2) => {
|
|
19142
19165
|
if (!v2) return;
|
|
19143
|
-
parts.push(`${
|
|
19166
|
+
parts.push(`${k2}: ${v2}`);
|
|
19144
19167
|
};
|
|
19145
19168
|
const lower = String(type2 || "single").toLowerCase();
|
|
19146
19169
|
if (lower === "none" || lower === "0") {
|
|
@@ -19202,12 +19225,12 @@ function getUnderlineCssString({ type: type2 = "single", color = null, thickness
|
|
|
19202
19225
|
}
|
|
19203
19226
|
const resolveRunProperties = (params, inlineRpr, resolvedPpr, isListNumber = false, numberingDefinedInline = false) => {
|
|
19204
19227
|
const paragraphStyleId = resolvedPpr?.styleId;
|
|
19205
|
-
const paragraphStyleProps = resolveStyleChain(params, paragraphStyleId, translator$
|
|
19206
|
-
const defaultProps = getDefaultProperties(params, translator$
|
|
19207
|
-
const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params, "Normal", translator$
|
|
19228
|
+
const paragraphStyleProps = resolveStyleChain(params, paragraphStyleId, translator$1N);
|
|
19229
|
+
const defaultProps = getDefaultProperties(params, translator$1N);
|
|
19230
|
+
const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params, "Normal", translator$1N);
|
|
19208
19231
|
let runStyleProps = {};
|
|
19209
19232
|
if (!paragraphStyleId?.startsWith("TOC")) {
|
|
19210
|
-
runStyleProps = inlineRpr.styleId ? resolveStyleChain(params, inlineRpr.styleId, translator$
|
|
19233
|
+
runStyleProps = inlineRpr.styleId ? resolveStyleChain(params, inlineRpr.styleId, translator$1N) : {};
|
|
19211
19234
|
}
|
|
19212
19235
|
let styleChain;
|
|
19213
19236
|
if (isNormalDefault) {
|
|
@@ -19222,7 +19245,7 @@ const resolveRunProperties = (params, inlineRpr, resolvedPpr, isListNumber = fal
|
|
|
19222
19245
|
params,
|
|
19223
19246
|
resolvedPpr.numberingProperties.ilvl ?? 0,
|
|
19224
19247
|
resolvedPpr.numberingProperties.numId,
|
|
19225
|
-
translator$
|
|
19248
|
+
translator$1N
|
|
19226
19249
|
);
|
|
19227
19250
|
}
|
|
19228
19251
|
if (!numberingDefinedInline) {
|
|
@@ -19238,11 +19261,11 @@ const resolveRunProperties = (params, inlineRpr, resolvedPpr, isListNumber = fal
|
|
|
19238
19261
|
const finalProps = combineProperties(styleChain, ["fontFamily", "color"]);
|
|
19239
19262
|
return finalProps;
|
|
19240
19263
|
};
|
|
19241
|
-
function resolveParagraphProperties(params, inlineProps, insideTable = false, overrideInlineStyleId = false) {
|
|
19242
|
-
const defaultProps = getDefaultProperties(params, translator$
|
|
19243
|
-
const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params, "Normal", translator$
|
|
19264
|
+
function resolveParagraphProperties(params, inlineProps, insideTable = false, overrideInlineStyleId = false, tableStyleId = null) {
|
|
19265
|
+
const defaultProps = getDefaultProperties(params, translator$12);
|
|
19266
|
+
const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params, "Normal", translator$12);
|
|
19244
19267
|
let styleId = inlineProps?.styleId;
|
|
19245
|
-
let styleProps = inlineProps?.styleId ? resolveStyleChain(params, inlineProps?.styleId, translator$
|
|
19268
|
+
let styleProps = inlineProps?.styleId ? resolveStyleChain(params, inlineProps?.styleId, translator$12) : {};
|
|
19246
19269
|
let numberingProps = {};
|
|
19247
19270
|
let ilvl = inlineProps?.numberingProperties?.ilvl ?? styleProps?.numberingProperties?.ilvl;
|
|
19248
19271
|
const numId = inlineProps?.numberingProperties?.numId ?? styleProps?.numberingProperties?.numId;
|
|
@@ -19250,10 +19273,10 @@ function resolveParagraphProperties(params, inlineProps, insideTable = false, ov
|
|
|
19250
19273
|
const isList2 = numId != null;
|
|
19251
19274
|
if (isList2) {
|
|
19252
19275
|
ilvl = ilvl != null ? ilvl : 0;
|
|
19253
|
-
numberingProps = getNumberingProperties(params, ilvl, numId, translator$
|
|
19276
|
+
numberingProps = getNumberingProperties(params, ilvl, numId, translator$12);
|
|
19254
19277
|
if (overrideInlineStyleId && numberingProps.styleId) {
|
|
19255
19278
|
styleId = numberingProps.styleId;
|
|
19256
|
-
styleProps = resolveStyleChain(params, styleId, translator$
|
|
19279
|
+
styleProps = resolveStyleChain(params, styleId, translator$12);
|
|
19257
19280
|
if (inlineProps) {
|
|
19258
19281
|
inlineProps.styleId = styleId;
|
|
19259
19282
|
if (styleProps.numberingProperties?.ilvl === inlineProps.numberingProperties?.ilvl && styleProps.numberingProperties?.numId === inlineProps.numberingProperties?.numId) {
|
|
@@ -19263,19 +19286,20 @@ function resolveParagraphProperties(params, inlineProps, insideTable = false, ov
|
|
|
19263
19286
|
}
|
|
19264
19287
|
}
|
|
19265
19288
|
}
|
|
19289
|
+
const tableProps = tableStyleId ? resolveStyleChain(params, tableStyleId, translator$12) : {};
|
|
19266
19290
|
let defaultsChain;
|
|
19267
19291
|
if (isNormalDefault) {
|
|
19268
19292
|
defaultsChain = [defaultProps, normalProps];
|
|
19269
19293
|
} else {
|
|
19270
19294
|
defaultsChain = [normalProps, defaultProps];
|
|
19271
19295
|
}
|
|
19272
|
-
const propsChain = [...defaultsChain, numberingProps, styleProps, inlineProps];
|
|
19296
|
+
const propsChain = [...defaultsChain, tableProps, numberingProps, styleProps, inlineProps];
|
|
19273
19297
|
let indentChain;
|
|
19274
19298
|
if (isList2) {
|
|
19275
19299
|
if (numberingDefinedInline) {
|
|
19276
19300
|
indentChain = [...defaultsChain, styleProps, numberingProps, inlineProps];
|
|
19277
19301
|
} else {
|
|
19278
|
-
styleProps = resolveStyleChain(params, styleId, translator$
|
|
19302
|
+
styleProps = resolveStyleChain(params, styleId, translator$12, false);
|
|
19279
19303
|
indentChain = [...defaultsChain, numberingProps, styleProps, inlineProps];
|
|
19280
19304
|
}
|
|
19281
19305
|
} else {
|
|
@@ -19383,7 +19407,7 @@ function getNumberingProperties(params, ilvl, numId, translator2, tries = 0) {
|
|
|
19383
19407
|
const numStyleLink = listDefinitionForThisNumId.elements?.find((item) => item.name === "w:numStyleLink");
|
|
19384
19408
|
const styleId = numStyleLink?.attributes?.["w:val"];
|
|
19385
19409
|
if (styleId && tries < 1) {
|
|
19386
|
-
const { properties: styleProps } = getStyleProperties(params, styleId, translator$
|
|
19410
|
+
const { properties: styleProps } = getStyleProperties(params, styleId, translator$12);
|
|
19387
19411
|
if (styleProps?.numberingProperties?.numId) {
|
|
19388
19412
|
return getNumberingProperties(params, ilvl, styleProps.numberingProperties.numId, translator2, tries + 1);
|
|
19389
19413
|
}
|
|
@@ -19918,7 +19942,7 @@ function handleStyleChangeMarksV2(rPrChange, currentMarks, params) {
|
|
|
19918
19942
|
let submarks = [];
|
|
19919
19943
|
const rPr = rPrChange.elements?.find((el) => el.name === "w:rPr");
|
|
19920
19944
|
if (rPr) {
|
|
19921
|
-
const runProperties = translator$
|
|
19945
|
+
const runProperties = translator$1N.encode({ ...params, nodes: [rPr] });
|
|
19922
19946
|
submarks = encodeMarksFromRPr(runProperties, params?.docx);
|
|
19923
19947
|
}
|
|
19924
19948
|
return [{ type: TrackFormatMarkName, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
|
|
@@ -20020,6 +20044,21 @@ function getStrikeValue(attributes) {
|
|
|
20020
20044
|
if (value === "0" || value === "false" || value === "off") return "0";
|
|
20021
20045
|
return "1";
|
|
20022
20046
|
}
|
|
20047
|
+
function getTableStyleId(path) {
|
|
20048
|
+
const tbl = path.find((ancestor) => ancestor.name === "w:tbl");
|
|
20049
|
+
if (!tbl) {
|
|
20050
|
+
return;
|
|
20051
|
+
}
|
|
20052
|
+
const tblPr = tbl.elements?.find((child) => child.name === "w:tblPr");
|
|
20053
|
+
if (!tblPr) {
|
|
20054
|
+
return;
|
|
20055
|
+
}
|
|
20056
|
+
const tblStyle = tblPr.elements?.find((child) => child.name === "w:tblStyle");
|
|
20057
|
+
if (!tblStyle) {
|
|
20058
|
+
return;
|
|
20059
|
+
}
|
|
20060
|
+
return tblStyle.attributes?.["w:val"];
|
|
20061
|
+
}
|
|
20023
20062
|
const handleParagraphNode$1 = (params) => {
|
|
20024
20063
|
const { nodes, nodeListHandler, filename } = params;
|
|
20025
20064
|
const node = carbonCopy(nodes[0]);
|
|
@@ -20027,10 +20066,17 @@ const handleParagraphNode$1 = (params) => {
|
|
|
20027
20066
|
const pPr = node.elements?.find((el) => el.name === "w:pPr");
|
|
20028
20067
|
let inlineParagraphProperties = {};
|
|
20029
20068
|
if (pPr) {
|
|
20030
|
-
inlineParagraphProperties = translator$
|
|
20069
|
+
inlineParagraphProperties = translator$12.encode({ ...params, nodes: [pPr] }) || {};
|
|
20031
20070
|
}
|
|
20032
20071
|
const insideTable = (params.path || []).some((ancestor) => ancestor.name === "w:tc");
|
|
20033
|
-
const
|
|
20072
|
+
const tableStyleId = getTableStyleId(params.path || []);
|
|
20073
|
+
const resolvedParagraphProperties = resolveParagraphProperties(
|
|
20074
|
+
params,
|
|
20075
|
+
inlineParagraphProperties,
|
|
20076
|
+
insideTable,
|
|
20077
|
+
false,
|
|
20078
|
+
tableStyleId
|
|
20079
|
+
);
|
|
20034
20080
|
const handleStandardNode2 = nodeListHandler.handlerEntities.find(
|
|
20035
20081
|
(e) => e.handlerName === "standardNodeHandler"
|
|
20036
20082
|
)?.handler;
|
|
@@ -20080,89 +20126,139 @@ const handleParagraphNode$1 = (params) => {
|
|
|
20080
20126
|
}
|
|
20081
20127
|
return schemaNode;
|
|
20082
20128
|
};
|
|
20083
|
-
|
|
20129
|
+
function generateParagraphProperties(params) {
|
|
20130
|
+
const { node } = params;
|
|
20131
|
+
const { attrs = {} } = node;
|
|
20132
|
+
const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
|
|
20133
|
+
if (attrs.styleId !== paragraphProperties.styleId) {
|
|
20134
|
+
paragraphProperties.styleId = attrs.styleId;
|
|
20135
|
+
}
|
|
20136
|
+
["borders", "styleId", "indent", "textAlign", "keepLines", "keepNext", "spacing", "tabStops"].forEach((key) => {
|
|
20137
|
+
let propKey = key === "textAlign" ? "justification" : key;
|
|
20138
|
+
if (JSON.stringify(paragraphProperties[propKey]) !== JSON.stringify(attrs[key])) {
|
|
20139
|
+
paragraphProperties[propKey] = attrs[key];
|
|
20140
|
+
}
|
|
20141
|
+
});
|
|
20142
|
+
const framePr = attrs.dropcap;
|
|
20143
|
+
if (framePr) {
|
|
20144
|
+
framePr.dropCap = framePr.type;
|
|
20145
|
+
delete framePr.type;
|
|
20146
|
+
}
|
|
20147
|
+
if (JSON.stringify(paragraphProperties.framePr) !== JSON.stringify(framePr)) {
|
|
20148
|
+
paragraphProperties.framePr = framePr;
|
|
20149
|
+
}
|
|
20150
|
+
const marksProps = decodeRPrFromMarks(attrs.marksAttrs || []);
|
|
20151
|
+
const finalRunProps = combineRunProperties([paragraphProperties.runProperties || {}, marksProps]);
|
|
20152
|
+
paragraphProperties.runProperties = finalRunProps;
|
|
20153
|
+
const pPr = translator$12.decode({ node: { ...node, attrs: { paragraphProperties } } });
|
|
20154
|
+
const sectPr = node.attrs?.paragraphProperties?.sectPr;
|
|
20155
|
+
if (sectPr) {
|
|
20156
|
+
pPr.elements.push(sectPr);
|
|
20157
|
+
}
|
|
20158
|
+
return pPr;
|
|
20159
|
+
}
|
|
20160
|
+
function translateParagraphNode(params) {
|
|
20161
|
+
const elements = translateChildNodes(params);
|
|
20162
|
+
const htmlAnnotationChild = elements.find((element) => element.name === "htmlAnnotation");
|
|
20163
|
+
if (htmlAnnotationChild) {
|
|
20164
|
+
return htmlAnnotationChild.elements;
|
|
20165
|
+
}
|
|
20166
|
+
const pPr = generateParagraphProperties(params);
|
|
20167
|
+
if (pPr) elements.unshift(pPr);
|
|
20168
|
+
let attributes = {};
|
|
20169
|
+
if (params.node.attrs?.rsidRDefault) {
|
|
20170
|
+
attributes["w:rsidRDefault"] = params.node.attrs.rsidRDefault;
|
|
20171
|
+
}
|
|
20172
|
+
const result = {
|
|
20173
|
+
name: "w:p",
|
|
20174
|
+
elements,
|
|
20175
|
+
attributes
|
|
20176
|
+
};
|
|
20177
|
+
return result;
|
|
20178
|
+
}
|
|
20179
|
+
const encode$A = (attributes) => {
|
|
20084
20180
|
return attributes["w:rsidDel"];
|
|
20085
20181
|
};
|
|
20086
|
-
const decode$
|
|
20182
|
+
const decode$C = (attrs) => {
|
|
20087
20183
|
return attrs.rsidDel;
|
|
20088
20184
|
};
|
|
20089
20185
|
const attrConfig$h = Object.freeze({
|
|
20090
20186
|
xmlName: "w:rsidDel",
|
|
20091
20187
|
sdName: "rsidDel",
|
|
20092
|
-
encode: encode$
|
|
20093
|
-
decode: decode$
|
|
20188
|
+
encode: encode$A,
|
|
20189
|
+
decode: decode$C
|
|
20094
20190
|
});
|
|
20095
|
-
const encode$
|
|
20191
|
+
const encode$z = (attributes) => {
|
|
20096
20192
|
return attributes["w:rsidP"];
|
|
20097
20193
|
};
|
|
20098
|
-
const decode$
|
|
20194
|
+
const decode$B = (attrs) => {
|
|
20099
20195
|
return attrs.rsidP;
|
|
20100
20196
|
};
|
|
20101
20197
|
const attrConfig$g = Object.freeze({
|
|
20102
20198
|
xmlName: "w:rsidP",
|
|
20103
20199
|
sdName: "rsidP",
|
|
20104
|
-
encode: encode$
|
|
20105
|
-
decode: decode$
|
|
20200
|
+
encode: encode$z,
|
|
20201
|
+
decode: decode$B
|
|
20106
20202
|
});
|
|
20107
|
-
const encode$
|
|
20203
|
+
const encode$y = (attributes) => {
|
|
20108
20204
|
return attributes["w:rsidR"];
|
|
20109
20205
|
};
|
|
20110
|
-
const decode$
|
|
20206
|
+
const decode$A = (attrs) => {
|
|
20111
20207
|
return attrs.rsidR;
|
|
20112
20208
|
};
|
|
20113
20209
|
const attrConfig$f = Object.freeze({
|
|
20114
20210
|
xmlName: "w:rsidR",
|
|
20115
20211
|
sdName: "rsidR",
|
|
20116
|
-
encode: encode$
|
|
20117
|
-
decode: decode$
|
|
20212
|
+
encode: encode$y,
|
|
20213
|
+
decode: decode$A
|
|
20118
20214
|
});
|
|
20119
|
-
const encode$
|
|
20215
|
+
const encode$x = (attributes) => {
|
|
20120
20216
|
return attributes["w:rsidRPr"];
|
|
20121
20217
|
};
|
|
20122
|
-
const decode$
|
|
20218
|
+
const decode$z = (attrs) => {
|
|
20123
20219
|
return attrs.rsidRPr;
|
|
20124
20220
|
};
|
|
20125
20221
|
const attrConfig$e = Object.freeze({
|
|
20126
20222
|
xmlName: "w:rsidRPr",
|
|
20127
20223
|
sdName: "rsidRPr",
|
|
20128
|
-
encode: encode$
|
|
20129
|
-
decode: decode$
|
|
20224
|
+
encode: encode$x,
|
|
20225
|
+
decode: decode$z
|
|
20130
20226
|
});
|
|
20131
|
-
const encode$
|
|
20227
|
+
const encode$w = (attributes) => {
|
|
20132
20228
|
return attributes["w:rsidRDefault"];
|
|
20133
20229
|
};
|
|
20134
|
-
const decode$
|
|
20230
|
+
const decode$y = (attrs) => {
|
|
20135
20231
|
return attrs.rsidRDefault;
|
|
20136
20232
|
};
|
|
20137
20233
|
const attrConfig$d = Object.freeze({
|
|
20138
20234
|
xmlName: "w:rsidRDefault",
|
|
20139
20235
|
sdName: "rsidRDefault",
|
|
20140
|
-
encode: encode$
|
|
20141
|
-
decode: decode$
|
|
20236
|
+
encode: encode$w,
|
|
20237
|
+
decode: decode$y
|
|
20142
20238
|
});
|
|
20143
|
-
const encode$
|
|
20239
|
+
const encode$v = (attributes) => {
|
|
20144
20240
|
return attributes["w14:paraId"];
|
|
20145
20241
|
};
|
|
20146
|
-
const decode$
|
|
20242
|
+
const decode$x = (attrs) => {
|
|
20147
20243
|
return attrs.paraId;
|
|
20148
20244
|
};
|
|
20149
20245
|
const attrConfig$c = Object.freeze({
|
|
20150
20246
|
xmlName: "w14:paraId",
|
|
20151
20247
|
sdName: "paraId",
|
|
20152
|
-
encode: encode$
|
|
20153
|
-
decode: decode$
|
|
20248
|
+
encode: encode$v,
|
|
20249
|
+
decode: decode$x
|
|
20154
20250
|
});
|
|
20155
|
-
const encode$
|
|
20251
|
+
const encode$u = (attributes) => {
|
|
20156
20252
|
return attributes["w14:textId"];
|
|
20157
20253
|
};
|
|
20158
|
-
const decode$
|
|
20254
|
+
const decode$w = (attrs) => {
|
|
20159
20255
|
return attrs.textId;
|
|
20160
20256
|
};
|
|
20161
20257
|
const attrConfig$b = Object.freeze({
|
|
20162
20258
|
xmlName: "w14:textId",
|
|
20163
20259
|
sdName: "textId",
|
|
20164
|
-
encode: encode$
|
|
20165
|
-
decode: decode$
|
|
20260
|
+
encode: encode$u,
|
|
20261
|
+
decode: decode$w
|
|
20166
20262
|
});
|
|
20167
20263
|
const validXmlAttributes$d = [
|
|
20168
20264
|
attrConfig$c,
|
|
@@ -20173,9 +20269,9 @@ const validXmlAttributes$d = [
|
|
|
20173
20269
|
attrConfig$e,
|
|
20174
20270
|
attrConfig$h
|
|
20175
20271
|
];
|
|
20176
|
-
const XML_NODE_NAME$
|
|
20177
|
-
const SD_NODE_NAME$
|
|
20178
|
-
const encode$
|
|
20272
|
+
const XML_NODE_NAME$k = "w:p";
|
|
20273
|
+
const SD_NODE_NAME$h = "paragraph";
|
|
20274
|
+
const encode$t = (params, encodedAttrs = {}) => {
|
|
20179
20275
|
const node = handleParagraphNode$1(params);
|
|
20180
20276
|
if (!node) return void 0;
|
|
20181
20277
|
if (encodedAttrs && Object.keys(encodedAttrs).length) {
|
|
@@ -20183,7 +20279,7 @@ const encode$r = (params, encodedAttrs = {}) => {
|
|
|
20183
20279
|
}
|
|
20184
20280
|
return node;
|
|
20185
20281
|
};
|
|
20186
|
-
const decode$
|
|
20282
|
+
const decode$v = (params, decodedAttrs = {}) => {
|
|
20187
20283
|
const translated = translateParagraphNode(params);
|
|
20188
20284
|
if (!translated) return void 0;
|
|
20189
20285
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
@@ -20191,15 +20287,15 @@ const decode$t = (params, decodedAttrs = {}) => {
|
|
|
20191
20287
|
}
|
|
20192
20288
|
return translated;
|
|
20193
20289
|
};
|
|
20194
|
-
const config$
|
|
20195
|
-
xmlName: XML_NODE_NAME$
|
|
20196
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
20290
|
+
const config$j = {
|
|
20291
|
+
xmlName: XML_NODE_NAME$k,
|
|
20292
|
+
sdNodeOrKeyName: SD_NODE_NAME$h,
|
|
20197
20293
|
type: NodeTranslator.translatorTypes.NODE,
|
|
20198
|
-
encode: encode$
|
|
20199
|
-
decode: decode$
|
|
20294
|
+
encode: encode$t,
|
|
20295
|
+
decode: decode$v,
|
|
20200
20296
|
attributes: validXmlAttributes$d
|
|
20201
20297
|
};
|
|
20202
|
-
const translator
|
|
20298
|
+
const translator$11 = NodeTranslator.from(config$j);
|
|
20203
20299
|
const EAST_ASIAN_CHARACTER_REGEX = /[\u1100-\u11FF\u2E80-\u2EFF\u2F00-\u2FDF\u3040-\u30FF\u3100-\u312F\u3130-\u318F\u31A0-\u31BF\u3400-\u4DBF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uF900-\uFAFF\uFF00-\uFFEF]/u;
|
|
20204
20300
|
const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
|
|
20205
20301
|
const resolveFontFamily = (textStyleAttrs, text) => {
|
|
@@ -20359,8 +20455,21 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
|
|
|
20359
20455
|
}
|
|
20360
20456
|
return runs;
|
|
20361
20457
|
};
|
|
20362
|
-
|
|
20363
|
-
const
|
|
20458
|
+
function generateDocxRandomId(length = 8) {
|
|
20459
|
+
const max2 = 2147483647;
|
|
20460
|
+
const value = Math.floor(Math.random() * (max2 + 1));
|
|
20461
|
+
return value.toString(16).padStart(length, "0").slice(0, length);
|
|
20462
|
+
}
|
|
20463
|
+
function generateRandomSigned32BitIntStrId() {
|
|
20464
|
+
const val = Math.floor(Math.random() * 2147483647);
|
|
20465
|
+
return val.toString();
|
|
20466
|
+
}
|
|
20467
|
+
function generateRandom32BitHex() {
|
|
20468
|
+
const val = Math.floor(Math.random() * 2147483647);
|
|
20469
|
+
return val.toString(16).toUpperCase().padStart(8, "0");
|
|
20470
|
+
}
|
|
20471
|
+
const XML_NODE_NAME$j = "w:hyperlink";
|
|
20472
|
+
const SD_NODE_NAME$g = "link";
|
|
20364
20473
|
const _createAttributeHandler = (xmlName, sdName) => ({
|
|
20365
20474
|
xmlName,
|
|
20366
20475
|
sdName,
|
|
@@ -20380,7 +20489,7 @@ const validXmlAttributes$c = [
|
|
|
20380
20489
|
_createAttributeHandler("r:id", "rId"),
|
|
20381
20490
|
_createAttributeHandler("w:tgtFrame", "target")
|
|
20382
20491
|
];
|
|
20383
|
-
const encode$
|
|
20492
|
+
const encode$s = (params, encodedAttrs) => {
|
|
20384
20493
|
const { nodes, docx, nodeListHandler } = params;
|
|
20385
20494
|
const node = nodes[0];
|
|
20386
20495
|
let href = _resolveHref(docx, encodedAttrs);
|
|
@@ -20414,7 +20523,7 @@ const _resolveHref = (docx, encodedAttrs) => {
|
|
|
20414
20523
|
}
|
|
20415
20524
|
return href;
|
|
20416
20525
|
};
|
|
20417
|
-
function decode$
|
|
20526
|
+
function decode$u(params) {
|
|
20418
20527
|
const { hyperlinkGroup = [params.node] } = params.extraParams || {};
|
|
20419
20528
|
const node = hyperlinkGroup[0];
|
|
20420
20529
|
const linkMark = node.marks.find((m2) => m2.type === "link");
|
|
@@ -20455,69 +20564,69 @@ function _addNewLinkRelationship(params, link) {
|
|
|
20455
20564
|
type: "element",
|
|
20456
20565
|
name: "Relationship",
|
|
20457
20566
|
attributes: {
|
|
20458
|
-
Id: id
|
|
20567
|
+
Id: `rId${id}`,
|
|
20459
20568
|
Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
|
|
20460
20569
|
Target: link,
|
|
20461
20570
|
TargetMode: "External"
|
|
20462
20571
|
}
|
|
20463
20572
|
});
|
|
20464
|
-
return id
|
|
20573
|
+
return `rId${id}`;
|
|
20465
20574
|
}
|
|
20466
|
-
const config$
|
|
20467
|
-
xmlName: XML_NODE_NAME$
|
|
20468
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
20575
|
+
const config$i = {
|
|
20576
|
+
xmlName: XML_NODE_NAME$j,
|
|
20577
|
+
sdNodeOrKeyName: SD_NODE_NAME$g,
|
|
20469
20578
|
type: NodeTranslator.translatorTypes.NODE,
|
|
20470
|
-
encode: encode$
|
|
20471
|
-
decode: decode$
|
|
20579
|
+
encode: encode$s,
|
|
20580
|
+
decode: decode$u,
|
|
20472
20581
|
attributes: validXmlAttributes$c
|
|
20473
20582
|
};
|
|
20474
|
-
const translator$
|
|
20475
|
-
const encode$
|
|
20583
|
+
const translator$10 = NodeTranslator.from(config$i);
|
|
20584
|
+
const encode$r = (attributes) => {
|
|
20476
20585
|
return attributes["w:rsidR"];
|
|
20477
20586
|
};
|
|
20478
|
-
const decode$
|
|
20587
|
+
const decode$t = (attrs) => {
|
|
20479
20588
|
return attrs.rsidR;
|
|
20480
20589
|
};
|
|
20481
20590
|
const attrConfig$a = Object.freeze({
|
|
20482
20591
|
xmlName: "w:rsidR",
|
|
20483
20592
|
sdName: "rsidR",
|
|
20484
|
-
encode: encode$
|
|
20485
|
-
decode: decode$
|
|
20593
|
+
encode: encode$r,
|
|
20594
|
+
decode: decode$t
|
|
20486
20595
|
});
|
|
20487
|
-
const encode$
|
|
20596
|
+
const encode$q = (attributes) => {
|
|
20488
20597
|
return attributes["w:rsidRPr"];
|
|
20489
20598
|
};
|
|
20490
|
-
const decode$
|
|
20599
|
+
const decode$s = (attrs) => {
|
|
20491
20600
|
return attrs.rsidRPr;
|
|
20492
20601
|
};
|
|
20493
20602
|
const attrConfig$9 = Object.freeze({
|
|
20494
20603
|
xmlName: "w:rsidRPr",
|
|
20495
20604
|
sdName: "rsidRPr",
|
|
20496
|
-
encode: encode$
|
|
20497
|
-
decode: decode$
|
|
20605
|
+
encode: encode$q,
|
|
20606
|
+
decode: decode$s
|
|
20498
20607
|
});
|
|
20499
|
-
const encode$
|
|
20608
|
+
const encode$p = (attributes) => {
|
|
20500
20609
|
return attributes["w:rsidDel"];
|
|
20501
20610
|
};
|
|
20502
|
-
const decode$
|
|
20611
|
+
const decode$r = (attrs) => {
|
|
20503
20612
|
return attrs.rsidDel;
|
|
20504
20613
|
};
|
|
20505
20614
|
const attrConfig$8 = Object.freeze({
|
|
20506
20615
|
xmlName: "w:rsidDel",
|
|
20507
20616
|
sdName: "rsidDel",
|
|
20508
|
-
encode: encode$
|
|
20509
|
-
decode: decode$
|
|
20617
|
+
encode: encode$p,
|
|
20618
|
+
decode: decode$r
|
|
20510
20619
|
});
|
|
20511
20620
|
const validXmlAttributes$b = [attrConfig$a, attrConfig$9, attrConfig$8];
|
|
20512
|
-
const XML_NODE_NAME$
|
|
20621
|
+
const XML_NODE_NAME$i = "w:r";
|
|
20513
20622
|
const SD_KEY_NAME = "run";
|
|
20514
|
-
const encode$
|
|
20623
|
+
const encode$o = (params, encodedAttrs = {}) => {
|
|
20515
20624
|
const { nodes = [], nodeListHandler } = params || {};
|
|
20516
20625
|
const runNode = nodes[0];
|
|
20517
20626
|
if (!runNode) return void 0;
|
|
20518
20627
|
const elements = Array.isArray(runNode.elements) ? runNode.elements : [];
|
|
20519
20628
|
const rPrNode = elements.find((child) => child?.name === "w:rPr");
|
|
20520
|
-
const runProperties = rPrNode ? translator$
|
|
20629
|
+
const runProperties = rPrNode ? translator$1N.encode({ ...params, nodes: [rPrNode] }) : {};
|
|
20521
20630
|
const paragraphProperties = params?.extraParams?.paragraphProperties || {};
|
|
20522
20631
|
const resolvedRunProperties = resolveRunProperties(params, runProperties ?? {}, paragraphProperties);
|
|
20523
20632
|
const marks = encodeMarksFromRPr(resolvedRunProperties, params?.docx) || [];
|
|
@@ -20564,7 +20673,7 @@ const encode$m = (params, encodedAttrs = {}) => {
|
|
|
20564
20673
|
}
|
|
20565
20674
|
return runNodeResult;
|
|
20566
20675
|
};
|
|
20567
|
-
const decode$
|
|
20676
|
+
const decode$q = (params, decodedAttrs = {}) => {
|
|
20568
20677
|
const { node } = params || {};
|
|
20569
20678
|
if (!node) return void 0;
|
|
20570
20679
|
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
@@ -20573,7 +20682,7 @@ const decode$o = (params, decodedAttrs = {}) => {
|
|
|
20573
20682
|
...params.extraParams,
|
|
20574
20683
|
linkProcessed: true
|
|
20575
20684
|
};
|
|
20576
|
-
return translator$
|
|
20685
|
+
return translator$10.decode({ ...params, extraParams });
|
|
20577
20686
|
}
|
|
20578
20687
|
const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
|
|
20579
20688
|
const runAttrs = runNodeForExport.attrs || {};
|
|
@@ -20589,7 +20698,7 @@ const decode$o = (params, decodedAttrs = {}) => {
|
|
|
20589
20698
|
exportParams.editor = { extensionService: { extensions: [] } };
|
|
20590
20699
|
}
|
|
20591
20700
|
const childElements = translateChildNodes(exportParams) || [];
|
|
20592
|
-
let runPropertiesElement = translator$
|
|
20701
|
+
let runPropertiesElement = translator$1N.decode({
|
|
20593
20702
|
...params,
|
|
20594
20703
|
node: { attrs: { runProperties: finalRunProperties } }
|
|
20595
20704
|
});
|
|
@@ -20622,7 +20731,7 @@ const decode$o = (params, decodedAttrs = {}) => {
|
|
|
20622
20731
|
runs.push(trackedClone);
|
|
20623
20732
|
return;
|
|
20624
20733
|
}
|
|
20625
|
-
const runWrapper = { name: XML_NODE_NAME$
|
|
20734
|
+
const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
|
|
20626
20735
|
applyBaseRunProps(runWrapper);
|
|
20627
20736
|
if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
|
|
20628
20737
|
runWrapper.elements.push(cloneXmlNode(child));
|
|
@@ -20630,7 +20739,7 @@ const decode$o = (params, decodedAttrs = {}) => {
|
|
|
20630
20739
|
});
|
|
20631
20740
|
const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
|
|
20632
20741
|
if (!trackedRuns.length) {
|
|
20633
|
-
const emptyRun = { name: XML_NODE_NAME$
|
|
20742
|
+
const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
|
|
20634
20743
|
applyBaseRunProps(emptyRun);
|
|
20635
20744
|
trackedRuns.push(emptyRun);
|
|
20636
20745
|
}
|
|
@@ -20644,17 +20753,17 @@ const decode$o = (params, decodedAttrs = {}) => {
|
|
|
20644
20753
|
}
|
|
20645
20754
|
return trackedRuns;
|
|
20646
20755
|
};
|
|
20647
|
-
const config$
|
|
20648
|
-
xmlName: XML_NODE_NAME$
|
|
20756
|
+
const config$h = {
|
|
20757
|
+
xmlName: XML_NODE_NAME$i,
|
|
20649
20758
|
sdNodeOrKeyName: SD_KEY_NAME,
|
|
20650
20759
|
type: NodeTranslator.translatorTypes.NODE,
|
|
20651
|
-
encode: encode$
|
|
20652
|
-
decode: decode$
|
|
20760
|
+
encode: encode$o,
|
|
20761
|
+
decode: decode$q,
|
|
20653
20762
|
attributes: validXmlAttributes$b
|
|
20654
20763
|
};
|
|
20655
|
-
const translator
|
|
20656
|
-
const translator$
|
|
20657
|
-
const translator$
|
|
20764
|
+
const translator$$ = NodeTranslator.from(config$h);
|
|
20765
|
+
const translator$_ = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
|
|
20766
|
+
const translator$Z = NodeTranslator.from(
|
|
20658
20767
|
createSingleAttrPropertyHandler(
|
|
20659
20768
|
"w:gridSpan",
|
|
20660
20769
|
null,
|
|
@@ -20663,31 +20772,31 @@ const translator$X = NodeTranslator.from(
|
|
|
20663
20772
|
(v2) => integerToString(v2)
|
|
20664
20773
|
)
|
|
20665
20774
|
);
|
|
20666
|
-
const translator$
|
|
20667
|
-
const translator$
|
|
20668
|
-
const translator$
|
|
20669
|
-
const translator$
|
|
20670
|
-
const translator$
|
|
20671
|
-
const translator$
|
|
20672
|
-
const translator$
|
|
20673
|
-
const translator$
|
|
20674
|
-
const translator$
|
|
20775
|
+
const translator$Y = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
|
|
20776
|
+
const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:end"));
|
|
20777
|
+
const translator$W = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
|
|
20778
|
+
const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
|
|
20779
|
+
const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
|
|
20780
|
+
const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:start"));
|
|
20781
|
+
const translator$S = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
|
|
20782
|
+
const translator$R = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
|
|
20783
|
+
const translator$Q = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
|
|
20675
20784
|
const propertyTranslators$6 = [
|
|
20676
|
-
translator$1h,
|
|
20677
|
-
translator$R,
|
|
20678
|
-
translator$1l,
|
|
20679
|
-
translator$1n,
|
|
20680
|
-
translator$V,
|
|
20681
20785
|
translator$1j,
|
|
20682
20786
|
translator$T,
|
|
20683
|
-
translator$
|
|
20684
|
-
translator$
|
|
20685
|
-
translator$
|
|
20787
|
+
translator$1n,
|
|
20788
|
+
translator$1p,
|
|
20789
|
+
translator$X,
|
|
20790
|
+
translator$1l,
|
|
20791
|
+
translator$V,
|
|
20792
|
+
translator$U,
|
|
20793
|
+
translator$R,
|
|
20794
|
+
translator$Q
|
|
20686
20795
|
];
|
|
20687
|
-
const translator$
|
|
20796
|
+
const translator$P = NodeTranslator.from(
|
|
20688
20797
|
createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$6)
|
|
20689
20798
|
);
|
|
20690
|
-
const translator$
|
|
20799
|
+
const translator$O = NodeTranslator.from(
|
|
20691
20800
|
createSingleAttrPropertyHandler(
|
|
20692
20801
|
"w:noWrap",
|
|
20693
20802
|
null,
|
|
@@ -20697,17 +20806,17 @@ const translator$M = NodeTranslator.from(
|
|
|
20697
20806
|
)
|
|
20698
20807
|
);
|
|
20699
20808
|
const propertyTranslators$5 = [
|
|
20809
|
+
translator$1o,
|
|
20810
|
+
translator$W,
|
|
20700
20811
|
translator$1m,
|
|
20701
|
-
translator$U,
|
|
20702
20812
|
translator$1k,
|
|
20703
|
-
translator$
|
|
20704
|
-
translator$
|
|
20705
|
-
translator$1g
|
|
20813
|
+
translator$S,
|
|
20814
|
+
translator$1i
|
|
20706
20815
|
];
|
|
20707
|
-
const translator$
|
|
20816
|
+
const translator$N = NodeTranslator.from(
|
|
20708
20817
|
createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$5)
|
|
20709
20818
|
);
|
|
20710
|
-
const translator$
|
|
20819
|
+
const translator$M = NodeTranslator.from(
|
|
20711
20820
|
createSingleAttrPropertyHandler(
|
|
20712
20821
|
"w:tcFitText",
|
|
20713
20822
|
null,
|
|
@@ -20716,8 +20825,8 @@ const translator$K = NodeTranslator.from(
|
|
|
20716
20825
|
(v2) => booleanToString(v2)
|
|
20717
20826
|
)
|
|
20718
20827
|
);
|
|
20719
|
-
const translator$
|
|
20720
|
-
const translator$
|
|
20828
|
+
const translator$L = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
|
|
20829
|
+
const translator$K = NodeTranslator.from(
|
|
20721
20830
|
createSingleAttrPropertyHandler(
|
|
20722
20831
|
"w:hideMark",
|
|
20723
20832
|
null,
|
|
@@ -20726,26 +20835,26 @@ const translator$I = NodeTranslator.from(
|
|
|
20726
20835
|
(v2) => booleanToString(v2)
|
|
20727
20836
|
)
|
|
20728
20837
|
);
|
|
20729
|
-
const translator$
|
|
20730
|
-
const translator$
|
|
20731
|
-
createNestedArrayPropertyHandler("w:headers", "headers", [translator$
|
|
20838
|
+
const translator$J = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
|
|
20839
|
+
const translator$I = NodeTranslator.from(
|
|
20840
|
+
createNestedArrayPropertyHandler("w:headers", "headers", [translator$J])
|
|
20732
20841
|
);
|
|
20733
20842
|
const propertyTranslators$4 = [
|
|
20734
|
-
translator$
|
|
20843
|
+
translator$1H,
|
|
20844
|
+
translator$_,
|
|
20845
|
+
translator$Z,
|
|
20735
20846
|
translator$Y,
|
|
20736
|
-
translator$
|
|
20737
|
-
translator$
|
|
20847
|
+
translator$P,
|
|
20848
|
+
translator$1Q,
|
|
20849
|
+
translator$O,
|
|
20738
20850
|
translator$N,
|
|
20739
|
-
translator$
|
|
20851
|
+
translator$17,
|
|
20740
20852
|
translator$M,
|
|
20741
20853
|
translator$L,
|
|
20742
|
-
translator$15,
|
|
20743
20854
|
translator$K,
|
|
20744
|
-
translator$
|
|
20745
|
-
translator$I,
|
|
20746
|
-
translator$G
|
|
20855
|
+
translator$I
|
|
20747
20856
|
];
|
|
20748
|
-
const translator$
|
|
20857
|
+
const translator$H = NodeTranslator.from(
|
|
20749
20858
|
createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators$4)
|
|
20750
20859
|
);
|
|
20751
20860
|
function handleTableCellNode({
|
|
@@ -20763,7 +20872,7 @@ function handleTableCellNode({
|
|
|
20763
20872
|
const attributes = {};
|
|
20764
20873
|
const referencedStyles = _referencedStyles ?? { fontSize: null, fonts: {}, cellMargins: {} };
|
|
20765
20874
|
const tcPr = node.elements.find((el) => el.name === "w:tcPr");
|
|
20766
|
-
const tableCellProperties = tcPr ? translator$
|
|
20875
|
+
const tableCellProperties = tcPr ? translator$H.encode({ ...params, nodes: [tcPr] }) ?? {} : {};
|
|
20767
20876
|
attributes["tableCellProperties"] = tableCellProperties;
|
|
20768
20877
|
if (rowBorders?.insideH) {
|
|
20769
20878
|
rowBorders["bottom"] = rowBorders.insideH;
|
|
@@ -21075,13 +21184,13 @@ function generateTableCellProperties(node) {
|
|
|
21075
21184
|
} else if (tableCellProperties?.borders) {
|
|
21076
21185
|
delete tableCellProperties.borders;
|
|
21077
21186
|
}
|
|
21078
|
-
const result = translator$
|
|
21187
|
+
const result = translator$H.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
|
|
21079
21188
|
return result;
|
|
21080
21189
|
}
|
|
21081
|
-
const XML_NODE_NAME$
|
|
21082
|
-
const SD_NODE_NAME$
|
|
21190
|
+
const XML_NODE_NAME$h = "w:tc";
|
|
21191
|
+
const SD_NODE_NAME$f = "tableCell";
|
|
21083
21192
|
const validXmlAttributes$a = [];
|
|
21084
|
-
function encode$
|
|
21193
|
+
function encode$n(params, encodedAttrs) {
|
|
21085
21194
|
const {
|
|
21086
21195
|
node,
|
|
21087
21196
|
table,
|
|
@@ -21108,29 +21217,29 @@ function encode$l(params, encodedAttrs) {
|
|
|
21108
21217
|
}
|
|
21109
21218
|
return schemaNode;
|
|
21110
21219
|
}
|
|
21111
|
-
function decode$
|
|
21220
|
+
function decode$p(params, decodedAttrs) {
|
|
21112
21221
|
const translated = translateTableCell(params);
|
|
21113
21222
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
21114
21223
|
translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
|
|
21115
21224
|
}
|
|
21116
21225
|
return translated;
|
|
21117
21226
|
}
|
|
21118
|
-
const config$
|
|
21119
|
-
xmlName: XML_NODE_NAME$
|
|
21120
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
21227
|
+
const config$g = {
|
|
21228
|
+
xmlName: XML_NODE_NAME$h,
|
|
21229
|
+
sdNodeOrKeyName: SD_NODE_NAME$f,
|
|
21121
21230
|
type: NodeTranslator.translatorTypes.NODE,
|
|
21122
|
-
encode: encode$
|
|
21123
|
-
decode: decode$
|
|
21231
|
+
encode: encode$n,
|
|
21232
|
+
decode: decode$p,
|
|
21124
21233
|
attributes: validXmlAttributes$a
|
|
21125
21234
|
};
|
|
21126
|
-
const translator$
|
|
21127
|
-
const translator$
|
|
21235
|
+
const translator$G = NodeTranslator.from(config$g);
|
|
21236
|
+
const translator$F = NodeTranslator.from({
|
|
21128
21237
|
xmlName: "w:cantSplit",
|
|
21129
21238
|
sdNodeOrKeyName: "cantSplit",
|
|
21130
21239
|
encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
21131
21240
|
decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
|
|
21132
21241
|
});
|
|
21133
|
-
const translator$
|
|
21242
|
+
const translator$E = NodeTranslator.from(
|
|
21134
21243
|
createSingleAttrPropertyHandler(
|
|
21135
21244
|
"w:gridAfter",
|
|
21136
21245
|
null,
|
|
@@ -21139,7 +21248,7 @@ const translator$C = NodeTranslator.from(
|
|
|
21139
21248
|
(v2) => integerToString(v2)
|
|
21140
21249
|
)
|
|
21141
21250
|
);
|
|
21142
|
-
const translator$
|
|
21251
|
+
const translator$D = NodeTranslator.from(
|
|
21143
21252
|
createSingleAttrPropertyHandler(
|
|
21144
21253
|
"w:gridBefore",
|
|
21145
21254
|
null,
|
|
@@ -21148,20 +21257,20 @@ const translator$B = NodeTranslator.from(
|
|
|
21148
21257
|
(v2) => integerToString(v2)
|
|
21149
21258
|
)
|
|
21150
21259
|
);
|
|
21151
|
-
const translator$
|
|
21260
|
+
const translator$C = NodeTranslator.from({
|
|
21152
21261
|
xmlName: "w:hidden",
|
|
21153
21262
|
sdNodeOrKeyName: "hidden",
|
|
21154
21263
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
21155
21264
|
decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
|
|
21156
21265
|
});
|
|
21157
|
-
const translator$
|
|
21158
|
-
const translator$
|
|
21266
|
+
const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
|
|
21267
|
+
const translator$A = NodeTranslator.from({
|
|
21159
21268
|
xmlName: "w:tblHeader",
|
|
21160
21269
|
sdNodeOrKeyName: "repeatHeader",
|
|
21161
21270
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
21162
21271
|
decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
|
|
21163
21272
|
});
|
|
21164
|
-
const translator$
|
|
21273
|
+
const translator$z = NodeTranslator.from({
|
|
21165
21274
|
xmlName: "w:trHeight",
|
|
21166
21275
|
sdNodeOrKeyName: "rowHeight",
|
|
21167
21276
|
encode: ({ nodes }) => {
|
|
@@ -21188,23 +21297,23 @@ const translator$x = NodeTranslator.from({
|
|
|
21188
21297
|
return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
|
|
21189
21298
|
}
|
|
21190
21299
|
});
|
|
21191
|
-
const translator$
|
|
21192
|
-
const translator$
|
|
21300
|
+
const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
|
|
21301
|
+
const translator$x = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
|
|
21193
21302
|
const propertyTranslators$3 = [
|
|
21194
|
-
translator$
|
|
21303
|
+
translator$F,
|
|
21304
|
+
translator$1H,
|
|
21195
21305
|
translator$1F,
|
|
21196
|
-
translator$
|
|
21306
|
+
translator$E,
|
|
21307
|
+
translator$D,
|
|
21197
21308
|
translator$C,
|
|
21309
|
+
translator$1C,
|
|
21198
21310
|
translator$B,
|
|
21199
21311
|
translator$A,
|
|
21200
|
-
translator$1A,
|
|
21201
21312
|
translator$z,
|
|
21202
21313
|
translator$y,
|
|
21203
|
-
translator$x
|
|
21204
|
-
translator$w,
|
|
21205
|
-
translator$v
|
|
21314
|
+
translator$x
|
|
21206
21315
|
];
|
|
21207
|
-
const translator$
|
|
21316
|
+
const translator$w = NodeTranslator.from(
|
|
21208
21317
|
createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$3, {
|
|
21209
21318
|
cantSplit: false,
|
|
21210
21319
|
hidden: false,
|
|
@@ -21273,17 +21382,17 @@ const isPlaceholderCell = (cell) => {
|
|
|
21273
21382
|
}
|
|
21274
21383
|
return false;
|
|
21275
21384
|
};
|
|
21276
|
-
const XML_NODE_NAME$
|
|
21277
|
-
const SD_NODE_NAME$
|
|
21385
|
+
const XML_NODE_NAME$g = "w:tr";
|
|
21386
|
+
const SD_NODE_NAME$e = "tableRow";
|
|
21278
21387
|
const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
|
|
21279
21388
|
(xmlName) => createAttributeHandler(xmlName)
|
|
21280
21389
|
);
|
|
21281
|
-
const encode$
|
|
21390
|
+
const encode$m = (params, encodedAttrs) => {
|
|
21282
21391
|
const { row } = params.extraParams;
|
|
21283
21392
|
let tableRowProperties = {};
|
|
21284
21393
|
const tPr = row.elements.find((el) => el.name === "w:trPr");
|
|
21285
21394
|
if (tPr) {
|
|
21286
|
-
tableRowProperties = translator$
|
|
21395
|
+
tableRowProperties = translator$w.encode({
|
|
21287
21396
|
...params,
|
|
21288
21397
|
nodes: [tPr]
|
|
21289
21398
|
});
|
|
@@ -21320,8 +21429,9 @@ const encode$k = (params, encodedAttrs) => {
|
|
|
21320
21429
|
skipOccupiedColumns();
|
|
21321
21430
|
const startColumn = currentColumnIndex;
|
|
21322
21431
|
const columnWidth = gridColumnWidths?.[startColumn] || null;
|
|
21323
|
-
const result = translator$
|
|
21432
|
+
const result = translator$G.encode({
|
|
21324
21433
|
...params,
|
|
21434
|
+
path: [...params.path || [], node],
|
|
21325
21435
|
extraParams: {
|
|
21326
21436
|
...params.extraParams,
|
|
21327
21437
|
node,
|
|
@@ -21353,7 +21463,7 @@ const encode$k = (params, encodedAttrs) => {
|
|
|
21353
21463
|
};
|
|
21354
21464
|
return newNode;
|
|
21355
21465
|
};
|
|
21356
|
-
const decode$
|
|
21466
|
+
const decode$o = (params, decodedAttrs) => {
|
|
21357
21467
|
const { node } = params;
|
|
21358
21468
|
const cells = node.content || [];
|
|
21359
21469
|
let leadingPlaceholders = 0;
|
|
@@ -21393,7 +21503,7 @@ const decode$m = (params, decodedAttrs) => {
|
|
|
21393
21503
|
}
|
|
21394
21504
|
}
|
|
21395
21505
|
tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
|
|
21396
|
-
const trPr = translator$
|
|
21506
|
+
const trPr = translator$w.decode({
|
|
21397
21507
|
...params,
|
|
21398
21508
|
node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
|
|
21399
21509
|
});
|
|
@@ -21405,15 +21515,15 @@ const decode$m = (params, decodedAttrs) => {
|
|
|
21405
21515
|
elements
|
|
21406
21516
|
};
|
|
21407
21517
|
};
|
|
21408
|
-
const config$
|
|
21409
|
-
xmlName: XML_NODE_NAME$
|
|
21410
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
21518
|
+
const config$f = {
|
|
21519
|
+
xmlName: XML_NODE_NAME$g,
|
|
21520
|
+
sdNodeOrKeyName: SD_NODE_NAME$e,
|
|
21411
21521
|
type: NodeTranslator.translatorTypes.NODE,
|
|
21412
|
-
encode: encode$
|
|
21413
|
-
decode: decode$
|
|
21522
|
+
encode: encode$m,
|
|
21523
|
+
decode: decode$o,
|
|
21414
21524
|
attributes: validXmlAttributes$9
|
|
21415
21525
|
};
|
|
21416
|
-
const translator$
|
|
21526
|
+
const translator$v = NodeTranslator.from(config$f);
|
|
21417
21527
|
function parseTagValueJSON(json) {
|
|
21418
21528
|
if (typeof json !== "string") {
|
|
21419
21529
|
return {};
|
|
@@ -24911,18 +25021,18 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
|
|
|
24911
25021
|
const rawY = shapeOff?.attributes?.["y"] ? parseFloat(shapeOff.attributes["y"]) : 0;
|
|
24912
25022
|
const rawWidth = shapeExt?.attributes?.["cx"] ? parseFloat(shapeExt.attributes["cx"]) : 914400;
|
|
24913
25023
|
const rawHeight = shapeExt?.attributes?.["cy"] ? parseFloat(shapeExt.attributes["cy"]) : 914400;
|
|
24914
|
-
let
|
|
25024
|
+
let x2, y2, width, height;
|
|
24915
25025
|
if (groupTransform.childWidth && groupTransform.childHeight) {
|
|
24916
25026
|
const scaleX = groupTransform.width / groupTransform.childWidth;
|
|
24917
25027
|
const scaleY = groupTransform.height / groupTransform.childHeight;
|
|
24918
25028
|
const childOriginX = groupTransform.childOriginXEmu || 0;
|
|
24919
25029
|
const childOriginY = groupTransform.childOriginYEmu || 0;
|
|
24920
|
-
|
|
25030
|
+
x2 = groupTransform.x + emuToPixels((rawX - childOriginX) * scaleX);
|
|
24921
25031
|
y2 = groupTransform.y + emuToPixels((rawY - childOriginY) * scaleY);
|
|
24922
25032
|
width = emuToPixels(rawWidth * scaleX);
|
|
24923
25033
|
height = emuToPixels(rawHeight * scaleY);
|
|
24924
25034
|
} else {
|
|
24925
|
-
|
|
25035
|
+
x2 = emuToPixels(rawX);
|
|
24926
25036
|
y2 = emuToPixels(rawY);
|
|
24927
25037
|
width = emuToPixels(rawWidth);
|
|
24928
25038
|
height = emuToPixels(rawHeight);
|
|
@@ -24941,7 +25051,7 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
|
|
|
24941
25051
|
shapeType: "vectorShape",
|
|
24942
25052
|
attrs: {
|
|
24943
25053
|
kind: shapeKind,
|
|
24944
|
-
x,
|
|
25054
|
+
x: x2,
|
|
24945
25055
|
y: y2,
|
|
24946
25056
|
width,
|
|
24947
25057
|
height,
|
|
@@ -25124,11 +25234,12 @@ function createDocument(converter, schema, editor, { check = false } = {}) {
|
|
|
25124
25234
|
return schema.topNodeType.createAndFill();
|
|
25125
25235
|
}
|
|
25126
25236
|
function getExtensionConfigField(extension, field, context = {}) {
|
|
25127
|
-
|
|
25128
|
-
|
|
25129
|
-
|
|
25237
|
+
const fieldValue = extension.config[field];
|
|
25238
|
+
if (typeof fieldValue === "function") {
|
|
25239
|
+
const boundValue = fieldValue.bind({ ...context });
|
|
25240
|
+
return boundValue;
|
|
25130
25241
|
}
|
|
25131
|
-
return
|
|
25242
|
+
return fieldValue;
|
|
25132
25243
|
}
|
|
25133
25244
|
function getSchemaTypeByName(name, schema) {
|
|
25134
25245
|
return schema.nodes[name] || schema.marks[name] || null;
|
|
@@ -25563,7 +25674,7 @@ function posToDOMRect(view, from, to) {
|
|
|
25563
25674
|
const right = Math.max(start.right, end.right);
|
|
25564
25675
|
const width = right - left;
|
|
25565
25676
|
const height = bottom - top;
|
|
25566
|
-
const
|
|
25677
|
+
const x2 = left;
|
|
25567
25678
|
const y2 = top;
|
|
25568
25679
|
const data = {
|
|
25569
25680
|
top,
|
|
@@ -25572,7 +25683,7 @@ function posToDOMRect(view, from, to) {
|
|
|
25572
25683
|
right,
|
|
25573
25684
|
width,
|
|
25574
25685
|
height,
|
|
25575
|
-
x,
|
|
25686
|
+
x: x2,
|
|
25576
25687
|
y: y2
|
|
25577
25688
|
};
|
|
25578
25689
|
return {
|
|
@@ -27412,7 +27523,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
|
|
|
27412
27523
|
};
|
|
27413
27524
|
const getNewListId = (editor, grouping = "definitions") => {
|
|
27414
27525
|
const defs = editor.converter?.numbering?.[grouping] || {};
|
|
27415
|
-
const intKeys = Object.keys(defs).map((
|
|
27526
|
+
const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
|
|
27416
27527
|
const max2 = intKeys.length ? Math.max(...intKeys) : 0;
|
|
27417
27528
|
return max2 + 1;
|
|
27418
27529
|
};
|
|
@@ -28712,25 +28823,31 @@ function createDocFromHTML(content, editor, options = {}) {
|
|
|
28712
28823
|
function L() {
|
|
28713
28824
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
28714
28825
|
}
|
|
28715
|
-
var
|
|
28826
|
+
var T = L();
|
|
28716
28827
|
function G(l3) {
|
|
28717
|
-
|
|
28828
|
+
T = l3;
|
|
28718
28829
|
}
|
|
28719
28830
|
var E = { exec: () => null };
|
|
28720
|
-
function
|
|
28831
|
+
function d(l3, e = "") {
|
|
28721
28832
|
let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
|
|
28722
28833
|
let s = typeof i == "string" ? i : i.source;
|
|
28723
28834
|
return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
|
|
28724
28835
|
}, getRegex: () => new RegExp(t, e) };
|
|
28725
28836
|
return n;
|
|
28726
28837
|
}
|
|
28727
|
-
var
|
|
28728
|
-
|
|
28729
|
-
|
|
28838
|
+
var be = (() => {
|
|
28839
|
+
try {
|
|
28840
|
+
return !!new RegExp("(?<=1)(?<!1)");
|
|
28841
|
+
} catch {
|
|
28842
|
+
return false;
|
|
28843
|
+
}
|
|
28844
|
+
})(), m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}#`), htmlBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, Re = /^(?:[ \t]*(?:\n|$))+/, Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Oe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = /(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ye = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Pe = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $e = d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _e = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = d(j).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Le = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K = { blockquote: Le, code: Te, def: Se, fences: Oe, heading: we, hr: I, html: _e, lheading: oe, list: $e, newline: Re, paragraph: ae, table: E, text: Pe }, re = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Me = { ...K, lheading: ye, table: re, paragraph: d(j).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, ze = { ...K, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(j).replace("hr", I).replace("heading", ` *#{1,6} *[^
|
|
28845
|
+
]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ae = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ee = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, le = /^( {2,}|\\)\n(?!\s*$)/, Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ue = /[^\s\p{P}\p{S}]/u, Ce = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, qe = /(?:[^\s\p{P}\p{S}]|~)/u, ve = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, De = d(ce, "u").replace(/punct/g, D).getRegex(), He = d(ce, "u").replace(/punct/g, pe).getRegex(), he$3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ze = d(he$3, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = d(he$3, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, Be).replace(/punct/g, pe).getRegex(), Ne = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Fe = d(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), je = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Qe = d(U).replace("(?:-->|$)", "-->").getRegex(), Ue = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Qe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ke = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = d(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), We = d("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: E, anyPunctuation: Fe, autolink: je, blockSkip: ve, br: le, code: Ee, del: E, emStrongLDelim: De, emStrongRDelimAst: Ze, emStrongRDelimUnd: Ne, escape: Ae, link: Ke, nolink: ke, punctuation: Ce, reflink: de, reflinkSearch: We, tag: Ue, text: Ie, url: E }, Xe = { ...X, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ge, emStrongLDelim: He, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() }, Je = { ...N, br: d(le).replace("{2,}", "*").getRegex(), text: d(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K, gfm: Me, pedantic: ze }, M = { normal: X, gfm: N, breaks: Je, pedantic: Xe };
|
|
28846
|
+
var Ve = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ge = (l3) => Ve[l3];
|
|
28730
28847
|
function w(l3, e) {
|
|
28731
28848
|
if (e) {
|
|
28732
|
-
if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace,
|
|
28733
|
-
} else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode,
|
|
28849
|
+
if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ge);
|
|
28850
|
+
} else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ge);
|
|
28734
28851
|
return l3;
|
|
28735
28852
|
}
|
|
28736
28853
|
function J(l3) {
|
|
@@ -28742,10 +28859,10 @@ function J(l3) {
|
|
|
28742
28859
|
return l3;
|
|
28743
28860
|
}
|
|
28744
28861
|
function V(l3, e) {
|
|
28745
|
-
let t = l3.replace(m.findPipe, (i, s,
|
|
28746
|
-
let
|
|
28747
|
-
for (; --
|
|
28748
|
-
return
|
|
28862
|
+
let t = l3.replace(m.findPipe, (i, s, a) => {
|
|
28863
|
+
let o = false, p = s;
|
|
28864
|
+
for (; --p >= 0 && a[p] === "\\"; ) o = !o;
|
|
28865
|
+
return o ? "|" : " |";
|
|
28749
28866
|
}), n = t.split(m.splitPipe), r = 0;
|
|
28750
28867
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
|
|
28751
28868
|
else for (; n.length < e; ) n.push("");
|
|
@@ -28763,7 +28880,7 @@ function z(l3, e, t) {
|
|
|
28763
28880
|
}
|
|
28764
28881
|
return l3.slice(0, n - r);
|
|
28765
28882
|
}
|
|
28766
|
-
function
|
|
28883
|
+
function fe(l3, e) {
|
|
28767
28884
|
if (l3.indexOf(e[1]) === -1) return -1;
|
|
28768
28885
|
let t = 0;
|
|
28769
28886
|
for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
|
|
@@ -28771,13 +28888,13 @@ function ge(l3, e) {
|
|
|
28771
28888
|
else if (l3[n] === e[1] && (t--, t < 0)) return n;
|
|
28772
28889
|
return t > 0 ? -2 : -1;
|
|
28773
28890
|
}
|
|
28774
|
-
function
|
|
28775
|
-
let i = e.href, s = e.title || null,
|
|
28891
|
+
function me(l3, e, t, n, r) {
|
|
28892
|
+
let i = e.href, s = e.title || null, a = l3[1].replace(r.other.outputLinkReplace, "$1");
|
|
28776
28893
|
n.state.inLink = true;
|
|
28777
|
-
let
|
|
28778
|
-
return n.state.inLink = false,
|
|
28894
|
+
let o = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
|
|
28895
|
+
return n.state.inLink = false, o;
|
|
28779
28896
|
}
|
|
28780
|
-
function
|
|
28897
|
+
function Ye(l3, e, t) {
|
|
28781
28898
|
let n = l3.match(t.other.indentCodeCompensation);
|
|
28782
28899
|
if (n === null) return e;
|
|
28783
28900
|
let r = n[1];
|
|
@@ -28785,8 +28902,8 @@ function Je(l3, e, t) {
|
|
|
28785
28902
|
`).map((i) => {
|
|
28786
28903
|
let s = i.match(t.other.beginningSpace);
|
|
28787
28904
|
if (s === null) return i;
|
|
28788
|
-
let [
|
|
28789
|
-
return
|
|
28905
|
+
let [a] = s;
|
|
28906
|
+
return a.length >= r.length ? i.slice(r.length) : i;
|
|
28790
28907
|
}).join(`
|
|
28791
28908
|
`);
|
|
28792
28909
|
}
|
|
@@ -28795,7 +28912,7 @@ var y = class {
|
|
|
28795
28912
|
__publicField(this, "options");
|
|
28796
28913
|
__publicField(this, "rules");
|
|
28797
28914
|
__publicField(this, "lexer");
|
|
28798
|
-
this.options = e ||
|
|
28915
|
+
this.options = e || T;
|
|
28799
28916
|
}
|
|
28800
28917
|
space(e) {
|
|
28801
28918
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -28812,7 +28929,7 @@ var y = class {
|
|
|
28812
28929
|
fences(e) {
|
|
28813
28930
|
let t = this.rules.block.fences.exec(e);
|
|
28814
28931
|
if (t) {
|
|
28815
|
-
let n = t[0], r =
|
|
28932
|
+
let n = t[0], r = Ye(n, t[3] || "", this.rules);
|
|
28816
28933
|
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
28817
28934
|
}
|
|
28818
28935
|
}
|
|
@@ -28839,32 +28956,32 @@ var y = class {
|
|
|
28839
28956
|
`).split(`
|
|
28840
28957
|
`), r = "", i = "", s = [];
|
|
28841
28958
|
for (; n.length > 0; ) {
|
|
28842
|
-
let
|
|
28843
|
-
for (
|
|
28844
|
-
else if (!
|
|
28959
|
+
let a = false, o = [], p;
|
|
28960
|
+
for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) o.push(n[p]), a = true;
|
|
28961
|
+
else if (!a) o.push(n[p]);
|
|
28845
28962
|
else break;
|
|
28846
|
-
n = n.slice(
|
|
28847
|
-
let
|
|
28848
|
-
`), c =
|
|
28963
|
+
n = n.slice(p);
|
|
28964
|
+
let u = o.join(`
|
|
28965
|
+
`), c = u.replace(this.rules.other.blockquoteSetextReplace, `
|
|
28849
28966
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
28850
28967
|
r = r ? `${r}
|
|
28851
|
-
${
|
|
28968
|
+
${u}` : u, i = i ? `${i}
|
|
28852
28969
|
${c}` : c;
|
|
28853
|
-
let
|
|
28854
|
-
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top =
|
|
28855
|
-
let
|
|
28856
|
-
if (
|
|
28857
|
-
if (
|
|
28858
|
-
let
|
|
28970
|
+
let g = this.lexer.state.top;
|
|
28971
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = g, n.length === 0) break;
|
|
28972
|
+
let h = s.at(-1);
|
|
28973
|
+
if (h?.type === "code") break;
|
|
28974
|
+
if (h?.type === "blockquote") {
|
|
28975
|
+
let R = h, f = R.raw + `
|
|
28859
28976
|
` + n.join(`
|
|
28860
|
-
`),
|
|
28861
|
-
s[s.length - 1] =
|
|
28977
|
+
`), O = this.blockquote(f);
|
|
28978
|
+
s[s.length - 1] = O, r = r.substring(0, r.length - R.raw.length) + O.raw, i = i.substring(0, i.length - R.text.length) + O.text;
|
|
28862
28979
|
break;
|
|
28863
|
-
} else if (
|
|
28864
|
-
let
|
|
28980
|
+
} else if (h?.type === "list") {
|
|
28981
|
+
let R = h, f = R.raw + `
|
|
28865
28982
|
` + n.join(`
|
|
28866
|
-
`),
|
|
28867
|
-
s[s.length - 1] =
|
|
28983
|
+
`), O = this.list(f);
|
|
28984
|
+
s[s.length - 1] = O, r = r.substring(0, r.length - h.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
|
|
28868
28985
|
`);
|
|
28869
28986
|
continue;
|
|
28870
28987
|
}
|
|
@@ -28877,45 +28994,45 @@ ${c}` : c;
|
|
|
28877
28994
|
if (t) {
|
|
28878
28995
|
let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
|
|
28879
28996
|
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
28880
|
-
let s = this.rules.other.listItemRegex(n),
|
|
28997
|
+
let s = this.rules.other.listItemRegex(n), a = false;
|
|
28881
28998
|
for (; e; ) {
|
|
28882
|
-
let
|
|
28999
|
+
let p = false, u = "", c = "";
|
|
28883
29000
|
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
28884
|
-
|
|
28885
|
-
let
|
|
28886
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)),
|
|
28887
|
-
`, 1)[0],
|
|
28888
|
-
if (this.options.pedantic ? (
|
|
28889
|
-
`, e = e.substring(
|
|
28890
|
-
let H = this.rules.other.nextBulletRegex(
|
|
29001
|
+
u = t[0], e = e.substring(u.length);
|
|
29002
|
+
let g = t[2].split(`
|
|
29003
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), h = e.split(`
|
|
29004
|
+
`, 1)[0], R = !g.trim(), f = 0;
|
|
29005
|
+
if (this.options.pedantic ? (f = 2, c = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (u += h + `
|
|
29006
|
+
`, e = e.substring(h.length + 1), p = true), !p) {
|
|
29007
|
+
let H = this.rules.other.nextBulletRegex(f), ee = this.rules.other.hrRegex(f), te = this.rules.other.fencesBeginRegex(f), ne = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f);
|
|
28891
29008
|
for (; e; ) {
|
|
28892
29009
|
let Z = e.split(`
|
|
28893
29010
|
`, 1)[0], A;
|
|
28894
|
-
if (
|
|
28895
|
-
if (A.search(this.rules.other.nonSpaceChar) >=
|
|
28896
|
-
` + A.slice(
|
|
29011
|
+
if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), te.test(h) || ne.test(h) || xe.test(h) || H.test(h) || ee.test(h)) break;
|
|
29012
|
+
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
|
|
29013
|
+
` + A.slice(f);
|
|
28897
29014
|
else {
|
|
28898
|
-
if (
|
|
29015
|
+
if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
|
|
28899
29016
|
c += `
|
|
28900
|
-
` +
|
|
29017
|
+
` + h;
|
|
28901
29018
|
}
|
|
28902
|
-
!
|
|
28903
|
-
`, e = e.substring(Z.length + 1),
|
|
29019
|
+
!R && !h.trim() && (R = true), u += Z + `
|
|
29020
|
+
`, e = e.substring(Z.length + 1), g = A.slice(f);
|
|
28904
29021
|
}
|
|
28905
29022
|
}
|
|
28906
|
-
i.loose || (
|
|
28907
|
-
let
|
|
28908
|
-
this.options.gfm && (
|
|
29023
|
+
i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(u) && (a = true));
|
|
29024
|
+
let O = null, Y;
|
|
29025
|
+
this.options.gfm && (O = this.rules.other.listIsTask.exec(c), O && (Y = O[0] !== "[ ] ", c = c.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: u, task: !!O, checked: Y, loose: false, text: c, tokens: [] }), i.raw += u;
|
|
28909
29026
|
}
|
|
28910
|
-
let
|
|
28911
|
-
if (
|
|
29027
|
+
let o = i.items.at(-1);
|
|
29028
|
+
if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
|
|
28912
29029
|
else return;
|
|
28913
29030
|
i.raw = i.raw.trimEnd();
|
|
28914
|
-
for (let
|
|
28915
|
-
let
|
|
29031
|
+
for (let p = 0; p < i.items.length; p++) if (this.lexer.state.top = false, i.items[p].tokens = this.lexer.blockTokens(i.items[p].text, []), !i.loose) {
|
|
29032
|
+
let u = i.items[p].tokens.filter((g) => g.type === "space"), c = u.length > 0 && u.some((g) => this.rules.other.anyLine.test(g.raw));
|
|
28916
29033
|
i.loose = c;
|
|
28917
29034
|
}
|
|
28918
|
-
if (i.loose) for (let
|
|
29035
|
+
if (i.loose) for (let p = 0; p < i.items.length; p++) i.items[p].loose = true;
|
|
28919
29036
|
return i;
|
|
28920
29037
|
}
|
|
28921
29038
|
}
|
|
@@ -28936,9 +29053,9 @@ ${c}` : c;
|
|
|
28936
29053
|
let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
28937
29054
|
`) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
28938
29055
|
if (n.length === r.length) {
|
|
28939
|
-
for (let
|
|
28940
|
-
for (let
|
|
28941
|
-
for (let
|
|
29056
|
+
for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
|
|
29057
|
+
for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
|
|
29058
|
+
for (let a of i) s.rows.push(V(a, s.header.length).map((o, p) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[p] })));
|
|
28942
29059
|
return s;
|
|
28943
29060
|
}
|
|
28944
29061
|
}
|
|
@@ -28975,11 +29092,11 @@ ${c}` : c;
|
|
|
28975
29092
|
let s = z(n.slice(0, -1), "\\");
|
|
28976
29093
|
if ((n.length - s.length) % 2 === 0) return;
|
|
28977
29094
|
} else {
|
|
28978
|
-
let s =
|
|
29095
|
+
let s = fe(t[2], "()");
|
|
28979
29096
|
if (s === -2) return;
|
|
28980
29097
|
if (s > -1) {
|
|
28981
|
-
let
|
|
28982
|
-
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0,
|
|
29098
|
+
let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
|
|
29099
|
+
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
|
|
28983
29100
|
}
|
|
28984
29101
|
}
|
|
28985
29102
|
let r = t[2], i = "";
|
|
@@ -28987,7 +29104,7 @@ ${c}` : c;
|
|
|
28987
29104
|
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
28988
29105
|
s && (r = s[1], i = s[3]);
|
|
28989
29106
|
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
28990
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)),
|
|
29107
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
|
|
28991
29108
|
}
|
|
28992
29109
|
}
|
|
28993
29110
|
reflink(e, t) {
|
|
@@ -28998,32 +29115,32 @@ ${c}` : c;
|
|
|
28998
29115
|
let s = n[0].charAt(0);
|
|
28999
29116
|
return { type: "text", raw: s, text: s };
|
|
29000
29117
|
}
|
|
29001
|
-
return
|
|
29118
|
+
return me(n, i, n[0], this.lexer, this.rules);
|
|
29002
29119
|
}
|
|
29003
29120
|
}
|
|
29004
29121
|
emStrong(e, t, n = "") {
|
|
29005
29122
|
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
29006
29123
|
if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
29007
29124
|
if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
29008
|
-
let s = [...r[0]].length - 1,
|
|
29125
|
+
let s = [...r[0]].length - 1, a, o, p = s, u = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
29009
29126
|
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
|
|
29010
|
-
if (
|
|
29011
|
-
if (
|
|
29012
|
-
|
|
29127
|
+
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
29128
|
+
if (o = [...a].length, r[3] || r[4]) {
|
|
29129
|
+
p += o;
|
|
29013
29130
|
continue;
|
|
29014
|
-
} else if ((r[5] || r[6]) && s % 3 && !((s +
|
|
29015
|
-
|
|
29131
|
+
} else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
|
|
29132
|
+
u += o;
|
|
29016
29133
|
continue;
|
|
29017
29134
|
}
|
|
29018
|
-
if (
|
|
29019
|
-
|
|
29020
|
-
let
|
|
29021
|
-
if (Math.min(s,
|
|
29022
|
-
let
|
|
29023
|
-
return { type: "em", raw:
|
|
29135
|
+
if (p -= o, p > 0) continue;
|
|
29136
|
+
o = Math.min(o, o + p + u);
|
|
29137
|
+
let g = [...r[0]][0].length, h = e.slice(0, s + r.index + g + o);
|
|
29138
|
+
if (Math.min(s, o) % 2) {
|
|
29139
|
+
let f = h.slice(1, -1);
|
|
29140
|
+
return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
29024
29141
|
}
|
|
29025
|
-
let
|
|
29026
|
-
return { type: "strong", raw:
|
|
29142
|
+
let R = h.slice(2, -2);
|
|
29143
|
+
return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
|
|
29027
29144
|
}
|
|
29028
29145
|
}
|
|
29029
29146
|
}
|
|
@@ -29072,19 +29189,19 @@ ${c}` : c;
|
|
|
29072
29189
|
}
|
|
29073
29190
|
}
|
|
29074
29191
|
};
|
|
29075
|
-
var
|
|
29192
|
+
var x = class l {
|
|
29076
29193
|
constructor(e) {
|
|
29077
29194
|
__publicField(this, "tokens");
|
|
29078
29195
|
__publicField(this, "options");
|
|
29079
29196
|
__publicField(this, "state");
|
|
29080
29197
|
__publicField(this, "tokenizer");
|
|
29081
29198
|
__publicField(this, "inlineQueue");
|
|
29082
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
29083
|
-
let t = { other: m, block:
|
|
29084
|
-
this.options.pedantic ? (t.block =
|
|
29199
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
|
|
29200
|
+
let t = { other: m, block: C.normal, inline: M.normal };
|
|
29201
|
+
this.options.pedantic ? (t.block = C.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
|
|
29085
29202
|
}
|
|
29086
29203
|
static get rules() {
|
|
29087
|
-
return { block:
|
|
29204
|
+
return { block: C, inline: M };
|
|
29088
29205
|
}
|
|
29089
29206
|
static lex(e, t) {
|
|
29090
29207
|
return new l(t).lex(e);
|
|
@@ -29164,9 +29281,9 @@ var b = class l {
|
|
|
29164
29281
|
}
|
|
29165
29282
|
let i = e;
|
|
29166
29283
|
if (this.options.extensions?.startBlock) {
|
|
29167
|
-
let s = 1 / 0,
|
|
29168
|
-
this.options.extensions.startBlock.forEach((
|
|
29169
|
-
|
|
29284
|
+
let s = 1 / 0, a = e.slice(1), o;
|
|
29285
|
+
this.options.extensions.startBlock.forEach((p) => {
|
|
29286
|
+
o = p.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
|
|
29170
29287
|
}), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
|
|
29171
29288
|
}
|
|
29172
29289
|
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
@@ -29206,11 +29323,12 @@ var b = class l {
|
|
|
29206
29323
|
if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
29207
29324
|
}
|
|
29208
29325
|
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
29209
|
-
|
|
29326
|
+
let i;
|
|
29327
|
+
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
29210
29328
|
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
29211
|
-
let
|
|
29329
|
+
let s = false, a = "";
|
|
29212
29330
|
for (; e; ) {
|
|
29213
|
-
|
|
29331
|
+
s || (a = ""), s = false;
|
|
29214
29332
|
let o;
|
|
29215
29333
|
if (this.options.extensions?.inline?.some((u) => (o = u.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
|
|
29216
29334
|
if (o = this.tokenizer.escape(e)) {
|
|
@@ -29231,7 +29349,7 @@ var b = class l {
|
|
|
29231
29349
|
o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
|
|
29232
29350
|
continue;
|
|
29233
29351
|
}
|
|
29234
|
-
if (o = this.tokenizer.emStrong(e, n,
|
|
29352
|
+
if (o = this.tokenizer.emStrong(e, n, a)) {
|
|
29235
29353
|
e = e.substring(o.raw.length), t.push(o);
|
|
29236
29354
|
continue;
|
|
29237
29355
|
}
|
|
@@ -29255,15 +29373,15 @@ var b = class l {
|
|
|
29255
29373
|
e = e.substring(o.raw.length), t.push(o);
|
|
29256
29374
|
continue;
|
|
29257
29375
|
}
|
|
29258
|
-
let
|
|
29376
|
+
let p = e;
|
|
29259
29377
|
if (this.options.extensions?.startInline) {
|
|
29260
|
-
let u = 1 / 0,
|
|
29261
|
-
this.options.extensions.startInline.forEach((
|
|
29262
|
-
|
|
29263
|
-
}), u < 1 / 0 && u >= 0 && (
|
|
29378
|
+
let u = 1 / 0, c = e.slice(1), g;
|
|
29379
|
+
this.options.extensions.startInline.forEach((h) => {
|
|
29380
|
+
g = h.call({ lexer: this }, c), typeof g == "number" && g >= 0 && (u = Math.min(u, g));
|
|
29381
|
+
}), u < 1 / 0 && u >= 0 && (p = e.substring(0, u + 1));
|
|
29264
29382
|
}
|
|
29265
|
-
if (o = this.tokenizer.inlineText(
|
|
29266
|
-
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (
|
|
29383
|
+
if (o = this.tokenizer.inlineText(p)) {
|
|
29384
|
+
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
|
|
29267
29385
|
let u = t.at(-1);
|
|
29268
29386
|
u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
|
|
29269
29387
|
continue;
|
|
@@ -29283,7 +29401,7 @@ var P = class {
|
|
|
29283
29401
|
constructor(e) {
|
|
29284
29402
|
__publicField(this, "options");
|
|
29285
29403
|
__publicField(this, "parser");
|
|
29286
|
-
this.options = e ||
|
|
29404
|
+
this.options = e || T;
|
|
29287
29405
|
}
|
|
29288
29406
|
space(e) {
|
|
29289
29407
|
return "";
|
|
@@ -29316,9 +29434,9 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
29316
29434
|
}
|
|
29317
29435
|
list(e) {
|
|
29318
29436
|
let t = e.ordered, n = e.start, r = "";
|
|
29319
|
-
for (let
|
|
29320
|
-
let
|
|
29321
|
-
r += this.listitem(
|
|
29437
|
+
for (let a = 0; a < e.items.length; a++) {
|
|
29438
|
+
let o = e.items[a];
|
|
29439
|
+
r += this.listitem(o);
|
|
29322
29440
|
}
|
|
29323
29441
|
let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
|
|
29324
29442
|
return "<" + i + s + `>
|
|
@@ -29349,7 +29467,7 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
29349
29467
|
for (let i = 0; i < e.rows.length; i++) {
|
|
29350
29468
|
let s = e.rows[i];
|
|
29351
29469
|
n = "";
|
|
29352
|
-
for (let
|
|
29470
|
+
for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
|
|
29353
29471
|
r += this.tablerow({ text: n });
|
|
29354
29472
|
}
|
|
29355
29473
|
return r && (r = `<tbody>${r}</tbody>`), `<table>
|
|
@@ -29431,12 +29549,12 @@ var $ = class {
|
|
|
29431
29549
|
return "";
|
|
29432
29550
|
}
|
|
29433
29551
|
};
|
|
29434
|
-
var
|
|
29552
|
+
var b = class l2 {
|
|
29435
29553
|
constructor(e) {
|
|
29436
29554
|
__publicField(this, "options");
|
|
29437
29555
|
__publicField(this, "renderer");
|
|
29438
29556
|
__publicField(this, "textRenderer");
|
|
29439
|
-
this.options = e ||
|
|
29557
|
+
this.options = e || T, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
|
|
29440
29558
|
}
|
|
29441
29559
|
static parse(e, t) {
|
|
29442
29560
|
return new l2(t).parse(e);
|
|
@@ -29449,9 +29567,9 @@ var R = class l2 {
|
|
|
29449
29567
|
for (let r = 0; r < e.length; r++) {
|
|
29450
29568
|
let i = e[r];
|
|
29451
29569
|
if (this.options.extensions?.renderers?.[i.type]) {
|
|
29452
|
-
let
|
|
29453
|
-
if (
|
|
29454
|
-
n +=
|
|
29570
|
+
let a = i, o = this.options.extensions.renderers[a.type].call({ parser: this }, a);
|
|
29571
|
+
if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(a.type)) {
|
|
29572
|
+
n += o || "";
|
|
29455
29573
|
continue;
|
|
29456
29574
|
}
|
|
29457
29575
|
}
|
|
@@ -29498,16 +29616,16 @@ var R = class l2 {
|
|
|
29498
29616
|
continue;
|
|
29499
29617
|
}
|
|
29500
29618
|
case "text": {
|
|
29501
|
-
let
|
|
29502
|
-
for (; r + 1 < e.length && e[r + 1].type === "text"; )
|
|
29503
|
-
` + this.renderer.text(
|
|
29504
|
-
t ? n += this.renderer.paragraph({ type: "paragraph", raw:
|
|
29619
|
+
let a = s, o = this.renderer.text(a);
|
|
29620
|
+
for (; r + 1 < e.length && e[r + 1].type === "text"; ) a = e[++r], o += `
|
|
29621
|
+
` + this.renderer.text(a);
|
|
29622
|
+
t ? n += this.renderer.paragraph({ type: "paragraph", raw: o, text: o, tokens: [{ type: "text", raw: o, text: o, escaped: true }] }) : n += o;
|
|
29505
29623
|
continue;
|
|
29506
29624
|
}
|
|
29507
29625
|
default: {
|
|
29508
|
-
let
|
|
29509
|
-
if (this.options.silent) return console.error(
|
|
29510
|
-
throw new Error(
|
|
29626
|
+
let a = 'Token with "' + s.type + '" type was not found.';
|
|
29627
|
+
if (this.options.silent) return console.error(a), "";
|
|
29628
|
+
throw new Error(a);
|
|
29511
29629
|
}
|
|
29512
29630
|
}
|
|
29513
29631
|
}
|
|
@@ -29518,9 +29636,9 @@ var R = class l2 {
|
|
|
29518
29636
|
for (let r = 0; r < e.length; r++) {
|
|
29519
29637
|
let i = e[r];
|
|
29520
29638
|
if (this.options.extensions?.renderers?.[i.type]) {
|
|
29521
|
-
let
|
|
29522
|
-
if (
|
|
29523
|
-
n +=
|
|
29639
|
+
let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
29640
|
+
if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
|
|
29641
|
+
n += a || "";
|
|
29524
29642
|
continue;
|
|
29525
29643
|
}
|
|
29526
29644
|
}
|
|
@@ -29567,9 +29685,9 @@ var R = class l2 {
|
|
|
29567
29685
|
break;
|
|
29568
29686
|
}
|
|
29569
29687
|
default: {
|
|
29570
|
-
let
|
|
29571
|
-
if (this.options.silent) return console.error(
|
|
29572
|
-
throw new Error(
|
|
29688
|
+
let a = 'Token with "' + s.type + '" type was not found.';
|
|
29689
|
+
if (this.options.silent) return console.error(a), "";
|
|
29690
|
+
throw new Error(a);
|
|
29573
29691
|
}
|
|
29574
29692
|
}
|
|
29575
29693
|
}
|
|
@@ -29580,7 +29698,7 @@ var S = (_a = class {
|
|
|
29580
29698
|
constructor(e) {
|
|
29581
29699
|
__publicField(this, "options");
|
|
29582
29700
|
__publicField(this, "block");
|
|
29583
|
-
this.options = e ||
|
|
29701
|
+
this.options = e || T;
|
|
29584
29702
|
}
|
|
29585
29703
|
preprocess(e) {
|
|
29586
29704
|
return e;
|
|
@@ -29595,10 +29713,10 @@ var S = (_a = class {
|
|
|
29595
29713
|
return e;
|
|
29596
29714
|
}
|
|
29597
29715
|
provideLexer() {
|
|
29598
|
-
return this.block ?
|
|
29716
|
+
return this.block ? x.lex : x.lexInline;
|
|
29599
29717
|
}
|
|
29600
29718
|
provideParser() {
|
|
29601
|
-
return this.block ?
|
|
29719
|
+
return this.block ? b.parse : b.parseInline;
|
|
29602
29720
|
}
|
|
29603
29721
|
}, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
|
|
29604
29722
|
var B = class {
|
|
@@ -29607,10 +29725,10 @@ var B = class {
|
|
|
29607
29725
|
__publicField(this, "options", this.setOptions);
|
|
29608
29726
|
__publicField(this, "parse", this.parseMarkdown(true));
|
|
29609
29727
|
__publicField(this, "parseInline", this.parseMarkdown(false));
|
|
29610
|
-
__publicField(this, "Parser",
|
|
29728
|
+
__publicField(this, "Parser", b);
|
|
29611
29729
|
__publicField(this, "Renderer", P);
|
|
29612
29730
|
__publicField(this, "TextRenderer", $);
|
|
29613
|
-
__publicField(this, "Lexer",
|
|
29731
|
+
__publicField(this, "Lexer", x);
|
|
29614
29732
|
__publicField(this, "Tokenizer", y);
|
|
29615
29733
|
__publicField(this, "Hooks", S);
|
|
29616
29734
|
this.use(...e);
|
|
@@ -29621,7 +29739,7 @@ var B = class {
|
|
|
29621
29739
|
case "table": {
|
|
29622
29740
|
let i = r;
|
|
29623
29741
|
for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
|
|
29624
|
-
for (let s of i.rows) for (let
|
|
29742
|
+
for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
|
|
29625
29743
|
break;
|
|
29626
29744
|
}
|
|
29627
29745
|
case "list": {
|
|
@@ -29632,8 +29750,8 @@ var B = class {
|
|
|
29632
29750
|
default: {
|
|
29633
29751
|
let i = r;
|
|
29634
29752
|
this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
|
|
29635
|
-
let
|
|
29636
|
-
n = n.concat(this.walkTokens(
|
|
29753
|
+
let a = i[s].flat(1 / 0);
|
|
29754
|
+
n = n.concat(this.walkTokens(a, t));
|
|
29637
29755
|
}) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
|
|
29638
29756
|
}
|
|
29639
29757
|
}
|
|
@@ -29647,9 +29765,9 @@ var B = class {
|
|
|
29647
29765
|
if (!i.name) throw new Error("extension name required");
|
|
29648
29766
|
if ("renderer" in i) {
|
|
29649
29767
|
let s = t.renderers[i.name];
|
|
29650
|
-
s ? t.renderers[i.name] = function(...
|
|
29651
|
-
let
|
|
29652
|
-
return
|
|
29768
|
+
s ? t.renderers[i.name] = function(...a) {
|
|
29769
|
+
let o = i.renderer.apply(this, a);
|
|
29770
|
+
return o === false && (o = s.apply(this, a)), o;
|
|
29653
29771
|
} : t.renderers[i.name] = i.renderer;
|
|
29654
29772
|
}
|
|
29655
29773
|
if ("tokenizer" in i) {
|
|
@@ -29663,10 +29781,10 @@ var B = class {
|
|
|
29663
29781
|
for (let s in n.renderer) {
|
|
29664
29782
|
if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
|
|
29665
29783
|
if (["options", "parser"].includes(s)) continue;
|
|
29666
|
-
let
|
|
29667
|
-
i[
|
|
29668
|
-
let c =
|
|
29669
|
-
return c === false && (c =
|
|
29784
|
+
let a = s, o = n.renderer[a], p = i[a];
|
|
29785
|
+
i[a] = (...u) => {
|
|
29786
|
+
let c = o.apply(i, u);
|
|
29787
|
+
return c === false && (c = p.apply(i, u)), c || "";
|
|
29670
29788
|
};
|
|
29671
29789
|
}
|
|
29672
29790
|
r.renderer = i;
|
|
@@ -29676,10 +29794,10 @@ var B = class {
|
|
|
29676
29794
|
for (let s in n.tokenizer) {
|
|
29677
29795
|
if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
|
|
29678
29796
|
if (["options", "rules", "lexer"].includes(s)) continue;
|
|
29679
|
-
let
|
|
29680
|
-
i[
|
|
29681
|
-
let c =
|
|
29682
|
-
return c === false && (c =
|
|
29797
|
+
let a = s, o = n.tokenizer[a], p = i[a];
|
|
29798
|
+
i[a] = (...u) => {
|
|
29799
|
+
let c = o.apply(i, u);
|
|
29800
|
+
return c === false && (c = p.apply(i, u)), c;
|
|
29683
29801
|
};
|
|
29684
29802
|
}
|
|
29685
29803
|
r.tokenizer = i;
|
|
@@ -29689,23 +29807,30 @@ var B = class {
|
|
|
29689
29807
|
for (let s in n.hooks) {
|
|
29690
29808
|
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
29691
29809
|
if (["options", "block"].includes(s)) continue;
|
|
29692
|
-
let
|
|
29693
|
-
S.passThroughHooks.has(s) ? i[
|
|
29694
|
-
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return
|
|
29695
|
-
|
|
29696
|
-
|
|
29697
|
-
|
|
29698
|
-
let c =
|
|
29699
|
-
return
|
|
29810
|
+
let a = s, o = n.hooks[a], p = i[a];
|
|
29811
|
+
S.passThroughHooks.has(s) ? i[a] = (u) => {
|
|
29812
|
+
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
29813
|
+
let g = await o.call(i, u);
|
|
29814
|
+
return p.call(i, g);
|
|
29815
|
+
})();
|
|
29816
|
+
let c = o.call(i, u);
|
|
29817
|
+
return p.call(i, c);
|
|
29818
|
+
} : i[a] = (...u) => {
|
|
29819
|
+
if (this.defaults.async) return (async () => {
|
|
29820
|
+
let g = await o.apply(i, u);
|
|
29821
|
+
return g === false && (g = await p.apply(i, u)), g;
|
|
29822
|
+
})();
|
|
29823
|
+
let c = o.apply(i, u);
|
|
29824
|
+
return c === false && (c = p.apply(i, u)), c;
|
|
29700
29825
|
};
|
|
29701
29826
|
}
|
|
29702
29827
|
r.hooks = i;
|
|
29703
29828
|
}
|
|
29704
29829
|
if (n.walkTokens) {
|
|
29705
29830
|
let i = this.defaults.walkTokens, s = n.walkTokens;
|
|
29706
|
-
r.walkTokens = function(
|
|
29707
|
-
let
|
|
29708
|
-
return
|
|
29831
|
+
r.walkTokens = function(a) {
|
|
29832
|
+
let o = [];
|
|
29833
|
+
return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
|
|
29709
29834
|
};
|
|
29710
29835
|
}
|
|
29711
29836
|
this.defaults = { ...this.defaults, ...r };
|
|
@@ -29715,28 +29840,31 @@ var B = class {
|
|
|
29715
29840
|
return this.defaults = { ...this.defaults, ...e }, this;
|
|
29716
29841
|
}
|
|
29717
29842
|
lexer(e, t) {
|
|
29718
|
-
return
|
|
29843
|
+
return x.lex(e, t ?? this.defaults);
|
|
29719
29844
|
}
|
|
29720
29845
|
parser(e, t) {
|
|
29721
|
-
return
|
|
29846
|
+
return b.parse(e, t ?? this.defaults);
|
|
29722
29847
|
}
|
|
29723
29848
|
parseMarkdown(e) {
|
|
29724
29849
|
return (n, r) => {
|
|
29725
|
-
let i = { ...r }, s = { ...this.defaults, ...i },
|
|
29726
|
-
if (this.defaults.async === true && i.async === false) return
|
|
29727
|
-
if (typeof n > "u" || n === null) return
|
|
29728
|
-
if (typeof n != "string") return
|
|
29729
|
-
s.hooks && (s.hooks.options = s, s.hooks.block = e)
|
|
29730
|
-
|
|
29731
|
-
|
|
29850
|
+
let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
|
|
29851
|
+
if (this.defaults.async === true && i.async === false) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
29852
|
+
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
29853
|
+
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
29854
|
+
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
29855
|
+
let o = s.hooks ? await s.hooks.preprocess(n) : n, u = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(u) : u;
|
|
29856
|
+
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
29857
|
+
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
|
|
29858
|
+
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
29859
|
+
})().catch(a);
|
|
29732
29860
|
try {
|
|
29733
29861
|
s.hooks && (n = s.hooks.preprocess(n));
|
|
29734
|
-
let p =
|
|
29862
|
+
let p = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
29735
29863
|
s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
|
|
29736
|
-
let c =
|
|
29864
|
+
let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
|
|
29737
29865
|
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
29738
|
-
} catch (
|
|
29739
|
-
return o
|
|
29866
|
+
} catch (o) {
|
|
29867
|
+
return a(o);
|
|
29740
29868
|
}
|
|
29741
29869
|
};
|
|
29742
29870
|
}
|
|
@@ -29753,38 +29881,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
29753
29881
|
}
|
|
29754
29882
|
};
|
|
29755
29883
|
var _ = new B();
|
|
29756
|
-
function
|
|
29884
|
+
function k(l3, e) {
|
|
29757
29885
|
return _.parse(l3, e);
|
|
29758
29886
|
}
|
|
29759
|
-
|
|
29760
|
-
return _.setOptions(l3),
|
|
29887
|
+
k.options = k.setOptions = function(l3) {
|
|
29888
|
+
return _.setOptions(l3), k.defaults = _.defaults, G(k.defaults), k;
|
|
29761
29889
|
};
|
|
29762
|
-
|
|
29763
|
-
|
|
29764
|
-
|
|
29765
|
-
return _.use(...l3),
|
|
29890
|
+
k.getDefaults = L;
|
|
29891
|
+
k.defaults = T;
|
|
29892
|
+
k.use = function(...l3) {
|
|
29893
|
+
return _.use(...l3), k.defaults = _.defaults, G(k.defaults), k;
|
|
29766
29894
|
};
|
|
29767
|
-
|
|
29895
|
+
k.walkTokens = function(l3, e) {
|
|
29768
29896
|
return _.walkTokens(l3, e);
|
|
29769
29897
|
};
|
|
29770
|
-
|
|
29771
|
-
|
|
29772
|
-
|
|
29773
|
-
|
|
29774
|
-
|
|
29775
|
-
|
|
29776
|
-
|
|
29777
|
-
|
|
29778
|
-
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29782
|
-
|
|
29783
|
-
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
|
|
29787
|
-
|
|
29898
|
+
k.parseInline = _.parseInline;
|
|
29899
|
+
k.Parser = b;
|
|
29900
|
+
k.parser = b.parse;
|
|
29901
|
+
k.Renderer = P;
|
|
29902
|
+
k.TextRenderer = $;
|
|
29903
|
+
k.Lexer = x;
|
|
29904
|
+
k.lexer = x.lex;
|
|
29905
|
+
k.Tokenizer = y;
|
|
29906
|
+
k.Hooks = S;
|
|
29907
|
+
k.parse = k;
|
|
29908
|
+
k.options;
|
|
29909
|
+
k.setOptions;
|
|
29910
|
+
k.use;
|
|
29911
|
+
k.walkTokens;
|
|
29912
|
+
k.parseInline;
|
|
29913
|
+
b.parse;
|
|
29914
|
+
x.lex;
|
|
29915
|
+
k.use({
|
|
29788
29916
|
breaks: false,
|
|
29789
29917
|
// Use proper paragraphs, not <br> tags
|
|
29790
29918
|
gfm: true
|
|
@@ -29795,7 +29923,7 @@ function createDocFromMarkdown(markdown, editor, options = {}) {
|
|
|
29795
29923
|
return createDocFromHTML(html, editor, options);
|
|
29796
29924
|
}
|
|
29797
29925
|
function convertMarkdownToHTML(markdown) {
|
|
29798
|
-
let html =
|
|
29926
|
+
let html = k.parse(markdown, { async: false });
|
|
29799
29927
|
return html.replace(/<\/p>\n<ul>/g, "</p>\n<p> </p>\n<ul>").replace(/<\/p>\n<ol>/g, "</p>\n<p> </p>\n<ol>").replace(/<\/ul>\n<h/g, "</ul>\n<p> </p>\n<h").replace(/<\/ol>\n<h/g, "</ol>\n<p> </p>\n<h");
|
|
29800
29928
|
}
|
|
29801
29929
|
function processContent({ content, type: type2, editor }) {
|
|
@@ -29914,8 +30042,8 @@ const translateImageNode = (params) => {
|
|
|
29914
30042
|
const leftMargin = tableCell.attrs.cellMargins?.left || 8;
|
|
29915
30043
|
const rightMargin = tableCell.attrs.cellMargins?.right || 8;
|
|
29916
30044
|
const maxWidthEmu = pixelsToEmu(colwidthSum - (leftMargin + rightMargin));
|
|
29917
|
-
const { width: w2, height:
|
|
29918
|
-
if (w2 &&
|
|
30045
|
+
const { width: w2, height: h } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
|
|
30046
|
+
if (w2 && h) size = { w: w2, h };
|
|
29919
30047
|
}
|
|
29920
30048
|
if (imageId) {
|
|
29921
30049
|
const docx = params.converter?.convertedXml || {};
|
|
@@ -30366,32 +30494,32 @@ function translateAnchorNode(params) {
|
|
|
30366
30494
|
elements: [...anchorElements, ...elementsWithWrap]
|
|
30367
30495
|
};
|
|
30368
30496
|
}
|
|
30369
|
-
const XML_NODE_NAME$
|
|
30370
|
-
const SD_NODE_NAME$
|
|
30497
|
+
const XML_NODE_NAME$f = "wp:anchor";
|
|
30498
|
+
const SD_NODE_NAME$d = ["image", "shapeGroup", "vectorShape", "contentBlock"];
|
|
30371
30499
|
const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
30372
|
-
function encode$
|
|
30500
|
+
function encode$l(params) {
|
|
30373
30501
|
const { node } = params.extraParams;
|
|
30374
30502
|
if (!node || !node.name) {
|
|
30375
30503
|
return null;
|
|
30376
30504
|
}
|
|
30377
30505
|
return handleAnchorNode(params);
|
|
30378
30506
|
}
|
|
30379
|
-
function decode$
|
|
30507
|
+
function decode$n(params) {
|
|
30380
30508
|
const { node } = params;
|
|
30381
30509
|
if (!node || !node.type) {
|
|
30382
30510
|
return null;
|
|
30383
30511
|
}
|
|
30384
30512
|
return translateAnchorNode(params);
|
|
30385
30513
|
}
|
|
30386
|
-
const config$
|
|
30387
|
-
xmlName: XML_NODE_NAME$
|
|
30388
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
30514
|
+
const config$e = {
|
|
30515
|
+
xmlName: XML_NODE_NAME$f,
|
|
30516
|
+
sdNodeOrKeyName: SD_NODE_NAME$d,
|
|
30389
30517
|
type: NodeTranslator.translatorTypes.NODE,
|
|
30390
|
-
encode: encode$
|
|
30391
|
-
decode: decode$
|
|
30518
|
+
encode: encode$l,
|
|
30519
|
+
decode: decode$n,
|
|
30392
30520
|
attributes: validXmlAttributes$8
|
|
30393
30521
|
};
|
|
30394
|
-
const translator$
|
|
30522
|
+
const translator$u = NodeTranslator.from(config$e);
|
|
30395
30523
|
function handleInlineNode(params) {
|
|
30396
30524
|
const { node } = params.extraParams;
|
|
30397
30525
|
if (node.name !== "wp:inline") {
|
|
@@ -30407,41 +30535,41 @@ function translateInlineNode(params) {
|
|
|
30407
30535
|
elements: nodeElements.elements
|
|
30408
30536
|
};
|
|
30409
30537
|
}
|
|
30410
|
-
const XML_NODE_NAME$
|
|
30411
|
-
const SD_NODE_NAME$
|
|
30538
|
+
const XML_NODE_NAME$e = "wp:inline";
|
|
30539
|
+
const SD_NODE_NAME$c = ["image", "shapeGroup", "vectorShape", "contentBlock"];
|
|
30412
30540
|
const validXmlAttributes$7 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
30413
|
-
function encode$
|
|
30541
|
+
function encode$k(params) {
|
|
30414
30542
|
const { node } = params.extraParams;
|
|
30415
30543
|
if (!node || !node.name) {
|
|
30416
30544
|
return null;
|
|
30417
30545
|
}
|
|
30418
30546
|
return handleInlineNode(params);
|
|
30419
30547
|
}
|
|
30420
|
-
function decode$
|
|
30548
|
+
function decode$m(params) {
|
|
30421
30549
|
const { node } = params;
|
|
30422
30550
|
if (!node || !node.type) {
|
|
30423
30551
|
return null;
|
|
30424
30552
|
}
|
|
30425
30553
|
return translateInlineNode(params);
|
|
30426
30554
|
}
|
|
30427
|
-
const config$
|
|
30428
|
-
xmlName: XML_NODE_NAME$
|
|
30429
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
30555
|
+
const config$d = {
|
|
30556
|
+
xmlName: XML_NODE_NAME$e,
|
|
30557
|
+
sdNodeOrKeyName: SD_NODE_NAME$c,
|
|
30430
30558
|
type: NodeTranslator.translatorTypes.NODE,
|
|
30431
|
-
encode: encode$
|
|
30432
|
-
decode: decode$
|
|
30559
|
+
encode: encode$k,
|
|
30560
|
+
decode: decode$m,
|
|
30433
30561
|
attributes: validXmlAttributes$7
|
|
30434
30562
|
};
|
|
30435
|
-
const translator$
|
|
30436
|
-
const XML_NODE_NAME$
|
|
30437
|
-
const SD_NODE_NAME$
|
|
30563
|
+
const translator$t = NodeTranslator.from(config$d);
|
|
30564
|
+
const XML_NODE_NAME$d = "w:drawing";
|
|
30565
|
+
const SD_NODE_NAME$b = [];
|
|
30438
30566
|
const validXmlAttributes$6 = [];
|
|
30439
|
-
function encode$
|
|
30567
|
+
function encode$j(params) {
|
|
30440
30568
|
const nodes = params.nodes;
|
|
30441
30569
|
const node = nodes[0];
|
|
30442
30570
|
const translatorByChildName = {
|
|
30443
|
-
"wp:anchor": translator$
|
|
30444
|
-
"wp:inline": translator$
|
|
30571
|
+
"wp:anchor": translator$u,
|
|
30572
|
+
"wp:inline": translator$t
|
|
30445
30573
|
};
|
|
30446
30574
|
return node.elements.reduce((acc, child) => {
|
|
30447
30575
|
if (acc) return acc;
|
|
@@ -30450,12 +30578,12 @@ function encode$h(params) {
|
|
|
30450
30578
|
return translator2.encode({ ...params, extraParams: { node: child } }) || acc;
|
|
30451
30579
|
}, null);
|
|
30452
30580
|
}
|
|
30453
|
-
function decode$
|
|
30581
|
+
function decode$l(params) {
|
|
30454
30582
|
const { node } = params;
|
|
30455
30583
|
if (!node || !node.type) {
|
|
30456
30584
|
return null;
|
|
30457
30585
|
}
|
|
30458
|
-
const childTranslator = node.attrs.isAnchor ? translator$
|
|
30586
|
+
const childTranslator = node.attrs.isAnchor ? translator$u : translator$t;
|
|
30459
30587
|
const resultNode = childTranslator.decode(params);
|
|
30460
30588
|
return wrapTextInRun(
|
|
30461
30589
|
{
|
|
@@ -30465,15 +30593,68 @@ function decode$j(params) {
|
|
|
30465
30593
|
[]
|
|
30466
30594
|
);
|
|
30467
30595
|
}
|
|
30468
|
-
const config$
|
|
30469
|
-
xmlName: XML_NODE_NAME$
|
|
30470
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
30596
|
+
const config$c = {
|
|
30597
|
+
xmlName: XML_NODE_NAME$d,
|
|
30598
|
+
sdNodeOrKeyName: SD_NODE_NAME$b,
|
|
30471
30599
|
type: NodeTranslator.translatorTypes.NODE,
|
|
30472
|
-
encode: encode$
|
|
30473
|
-
decode: decode$
|
|
30600
|
+
encode: encode$j,
|
|
30601
|
+
decode: decode$l,
|
|
30474
30602
|
attributes: validXmlAttributes$6
|
|
30475
30603
|
};
|
|
30476
|
-
const translator$
|
|
30604
|
+
const translator$s = NodeTranslator.from(config$c);
|
|
30605
|
+
function getTextNodeForExport(text, marks, params) {
|
|
30606
|
+
const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text);
|
|
30607
|
+
const space = hasLeadingOrTrailingSpace ? "preserve" : null;
|
|
30608
|
+
const nodeAttrs = space ? { "xml:space": space } : null;
|
|
30609
|
+
const textNodes = [];
|
|
30610
|
+
const textRunProperties = decodeRPrFromMarks(marks || []);
|
|
30611
|
+
const parentRunProperties = params.extraParams?.runProperties || {};
|
|
30612
|
+
const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
|
|
30613
|
+
const rPrNode = translator$1N.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
|
|
30614
|
+
textNodes.push({
|
|
30615
|
+
name: "w:t",
|
|
30616
|
+
elements: [{ text, type: "text" }],
|
|
30617
|
+
attributes: nodeAttrs
|
|
30618
|
+
});
|
|
30619
|
+
if (params) {
|
|
30620
|
+
const { editor } = params;
|
|
30621
|
+
const customMarks = editor.extensionService.extensions.filter((e) => e.isExternal === true);
|
|
30622
|
+
marks.forEach((mark) => {
|
|
30623
|
+
const isCustomMark = customMarks.some((customMark) => {
|
|
30624
|
+
const customMarkName = customMark.name;
|
|
30625
|
+
return mark.type === customMarkName;
|
|
30626
|
+
});
|
|
30627
|
+
if (!isCustomMark) return;
|
|
30628
|
+
let attrsString = "";
|
|
30629
|
+
Object.entries(mark.attrs).forEach(([key, value]) => {
|
|
30630
|
+
if (value) {
|
|
30631
|
+
attrsString += `${key}=${value};`;
|
|
30632
|
+
}
|
|
30633
|
+
});
|
|
30634
|
+
if (isCustomMark) {
|
|
30635
|
+
textNodes.unshift({
|
|
30636
|
+
type: "element",
|
|
30637
|
+
name: "w:bookmarkStart",
|
|
30638
|
+
attributes: {
|
|
30639
|
+
"w:id": "5000",
|
|
30640
|
+
"w:name": mark.type + ";" + attrsString
|
|
30641
|
+
}
|
|
30642
|
+
});
|
|
30643
|
+
textNodes.push({
|
|
30644
|
+
type: "element",
|
|
30645
|
+
name: "w:bookmarkEnd",
|
|
30646
|
+
attributes: {
|
|
30647
|
+
"w:id": "5000"
|
|
30648
|
+
}
|
|
30649
|
+
});
|
|
30650
|
+
}
|
|
30651
|
+
});
|
|
30652
|
+
}
|
|
30653
|
+
return {
|
|
30654
|
+
name: "w:r",
|
|
30655
|
+
elements: rPrNode ? [rPrNode, ...textNodes] : textNodes
|
|
30656
|
+
};
|
|
30657
|
+
}
|
|
30477
30658
|
var he$2 = { exports: {} };
|
|
30478
30659
|
/*! https://mths.be/he v1.2.0 by @mathias | MIT license */
|
|
30479
30660
|
var he$1 = he$2.exports;
|
|
@@ -30820,7 +31001,7 @@ function prepareTextAnnotation(params) {
|
|
|
30820
31001
|
return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params);
|
|
30821
31002
|
}
|
|
30822
31003
|
function prepareImageAnnotation(params, imageSize) {
|
|
30823
|
-
return translator$
|
|
31004
|
+
return translator$s.decode({
|
|
30824
31005
|
...params,
|
|
30825
31006
|
imageSize
|
|
30826
31007
|
});
|
|
@@ -30880,18 +31061,31 @@ function prepareUrlAnnotation(params) {
|
|
|
30880
31061
|
node: { attrs = {}, marks = [] }
|
|
30881
31062
|
} = params;
|
|
30882
31063
|
if (!attrs.linkUrl) return prepareTextAnnotation(params);
|
|
30883
|
-
const
|
|
30884
|
-
|
|
30885
|
-
|
|
30886
|
-
|
|
30887
|
-
|
|
30888
|
-
|
|
30889
|
-
|
|
30890
|
-
|
|
30891
|
-
|
|
30892
|
-
|
|
30893
|
-
|
|
31064
|
+
const linkTextNode = {
|
|
31065
|
+
type: "text",
|
|
31066
|
+
text: attrs.linkUrl,
|
|
31067
|
+
marks: [
|
|
31068
|
+
...marks,
|
|
31069
|
+
{
|
|
31070
|
+
type: "link",
|
|
31071
|
+
attrs: {
|
|
31072
|
+
href: attrs.linkUrl,
|
|
31073
|
+
history: true,
|
|
31074
|
+
text: attrs.linkUrl
|
|
31075
|
+
}
|
|
31076
|
+
},
|
|
31077
|
+
{
|
|
31078
|
+
type: "textStyle",
|
|
31079
|
+
attrs: {
|
|
31080
|
+
color: "#467886"
|
|
31081
|
+
}
|
|
31082
|
+
}
|
|
31083
|
+
]
|
|
30894
31084
|
};
|
|
31085
|
+
return translator$10.decode({
|
|
31086
|
+
...params,
|
|
31087
|
+
node: linkTextNode
|
|
31088
|
+
});
|
|
30895
31089
|
}
|
|
30896
31090
|
function translateFieldAttrsToMarks(attrs = {}) {
|
|
30897
31091
|
const { fontFamily, fontSize, bold, underline, italic, textColor, textHighlight } = attrs;
|
|
@@ -31084,6 +31278,46 @@ function translateDocumentPartObj(params) {
|
|
|
31084
31278
|
};
|
|
31085
31279
|
return result;
|
|
31086
31280
|
}
|
|
31281
|
+
const RUN_LEVEL_WRAPPERS = /* @__PURE__ */ new Set(["w:hyperlink", "w:ins", "w:del"]);
|
|
31282
|
+
function convertSdtContentToRuns(elements) {
|
|
31283
|
+
const normalized = Array.isArray(elements) ? elements : [elements];
|
|
31284
|
+
const runs = [];
|
|
31285
|
+
normalized.forEach((element) => {
|
|
31286
|
+
if (!element) return;
|
|
31287
|
+
if (element.name === "w:sdtPr") {
|
|
31288
|
+
return;
|
|
31289
|
+
}
|
|
31290
|
+
if (element.name === "w:r") {
|
|
31291
|
+
runs.push(element);
|
|
31292
|
+
return;
|
|
31293
|
+
}
|
|
31294
|
+
if (element.name === "w:sdt") {
|
|
31295
|
+
const sdtContent = (element.elements || []).find((child) => child?.name === "w:sdtContent");
|
|
31296
|
+
if (sdtContent?.elements) {
|
|
31297
|
+
runs.push(...convertSdtContentToRuns(sdtContent.elements));
|
|
31298
|
+
}
|
|
31299
|
+
return;
|
|
31300
|
+
}
|
|
31301
|
+
if (RUN_LEVEL_WRAPPERS.has(element.name)) {
|
|
31302
|
+
const wrapperElements = convertSdtContentToRuns(element.elements || []);
|
|
31303
|
+
if (wrapperElements.length) {
|
|
31304
|
+
runs.push({
|
|
31305
|
+
...element,
|
|
31306
|
+
elements: wrapperElements
|
|
31307
|
+
});
|
|
31308
|
+
}
|
|
31309
|
+
return;
|
|
31310
|
+
}
|
|
31311
|
+
if (element.name) {
|
|
31312
|
+
runs.push({
|
|
31313
|
+
name: "w:r",
|
|
31314
|
+
type: "element",
|
|
31315
|
+
elements: element.elements || [element]
|
|
31316
|
+
});
|
|
31317
|
+
}
|
|
31318
|
+
});
|
|
31319
|
+
return runs.filter((run2) => Array.isArray(run2.elements) && run2.elements.length > 0);
|
|
31320
|
+
}
|
|
31087
31321
|
function translateStructuredContent(params) {
|
|
31088
31322
|
const { node, isFinalDoc } = params;
|
|
31089
31323
|
const childContent = translateChildNodes({ ...params, node });
|
|
@@ -31144,10 +31378,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
|
|
|
31144
31378
|
};
|
|
31145
31379
|
return result;
|
|
31146
31380
|
}
|
|
31147
|
-
const XML_NODE_NAME$
|
|
31148
|
-
const SD_NODE_NAME$
|
|
31381
|
+
const XML_NODE_NAME$c = "w:sdt";
|
|
31382
|
+
const SD_NODE_NAME$a = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
|
|
31149
31383
|
const validXmlAttributes$5 = [];
|
|
31150
|
-
function encode$
|
|
31384
|
+
function encode$i(params) {
|
|
31151
31385
|
const nodes = params.nodes;
|
|
31152
31386
|
const node = nodes[0];
|
|
31153
31387
|
const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
|
|
@@ -31157,7 +31391,7 @@ function encode$g(params) {
|
|
|
31157
31391
|
const result = handler2(params);
|
|
31158
31392
|
return result;
|
|
31159
31393
|
}
|
|
31160
|
-
function decode$
|
|
31394
|
+
function decode$k(params) {
|
|
31161
31395
|
const { node } = params;
|
|
31162
31396
|
if (!node || !node.type) {
|
|
31163
31397
|
return null;
|
|
@@ -31175,15 +31409,15 @@ function decode$i(params) {
|
|
|
31175
31409
|
const result = decoder();
|
|
31176
31410
|
return result;
|
|
31177
31411
|
}
|
|
31178
|
-
const config$
|
|
31179
|
-
xmlName: XML_NODE_NAME$
|
|
31180
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
31412
|
+
const config$b = {
|
|
31413
|
+
xmlName: XML_NODE_NAME$c,
|
|
31414
|
+
sdNodeOrKeyName: SD_NODE_NAME$a,
|
|
31181
31415
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31182
|
-
encode: encode$
|
|
31183
|
-
decode: decode$
|
|
31416
|
+
encode: encode$i,
|
|
31417
|
+
decode: decode$k,
|
|
31184
31418
|
attributes: validXmlAttributes$5
|
|
31185
31419
|
};
|
|
31186
|
-
const translator$
|
|
31420
|
+
const translator$r = NodeTranslator.from(config$b);
|
|
31187
31421
|
function preProcessVerticalMergeCells(table, { editorSchema }) {
|
|
31188
31422
|
if (!table || !Array.isArray(table.content)) {
|
|
31189
31423
|
return table;
|
|
@@ -31224,17 +31458,17 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
|
|
|
31224
31458
|
}
|
|
31225
31459
|
return table;
|
|
31226
31460
|
}
|
|
31227
|
-
const translator$
|
|
31461
|
+
const translator$q = NodeTranslator.from({
|
|
31228
31462
|
xmlName: "w:bidiVisual",
|
|
31229
31463
|
sdNodeOrKeyName: "rightToLeft",
|
|
31230
31464
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
31231
31465
|
decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
|
|
31232
31466
|
});
|
|
31233
|
-
const translator$
|
|
31234
|
-
const translator$
|
|
31235
|
-
const translator$
|
|
31236
|
-
const translator$
|
|
31237
|
-
const translator$
|
|
31467
|
+
const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
|
|
31468
|
+
const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
|
|
31469
|
+
const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
|
|
31470
|
+
const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
|
|
31471
|
+
const translator$l = NodeTranslator.from({
|
|
31238
31472
|
xmlName: "w:tblLook",
|
|
31239
31473
|
sdNodeOrKeyName: "tblLook",
|
|
31240
31474
|
attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
|
|
@@ -31246,16 +31480,16 @@ const translator$j = NodeTranslator.from({
|
|
|
31246
31480
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
31247
31481
|
}
|
|
31248
31482
|
});
|
|
31249
|
-
const translator$
|
|
31250
|
-
const translator$
|
|
31251
|
-
const translator$
|
|
31483
|
+
const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
|
|
31484
|
+
const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
|
|
31485
|
+
const translator$i = NodeTranslator.from(
|
|
31252
31486
|
createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
|
|
31253
31487
|
);
|
|
31254
|
-
const translator$
|
|
31488
|
+
const translator$h = NodeTranslator.from(
|
|
31255
31489
|
createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
|
|
31256
31490
|
);
|
|
31257
|
-
const translator$
|
|
31258
|
-
const translator$
|
|
31491
|
+
const translator$g = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
|
|
31492
|
+
const translator$f = NodeTranslator.from({
|
|
31259
31493
|
xmlName: "w:tblpPr",
|
|
31260
31494
|
sdNodeOrKeyName: "floatingTableProperties",
|
|
31261
31495
|
attributes: ["w:leftFromText", "w:rightFromText", "w:topFromText", "w:bottomFromText", "w:tblpX", "w:tblpY"].map((attr) => createAttributeHandler(attr, null, parseInteger, integerToString)).concat(["w:horzAnchor", "w:vertAnchor", "w:tblpXSpec", "w:tblpYSpec"].map((attr) => createAttributeHandler(attr))),
|
|
@@ -31268,35 +31502,37 @@ const translator$d = NodeTranslator.from({
|
|
|
31268
31502
|
}
|
|
31269
31503
|
});
|
|
31270
31504
|
const propertyTranslators$2 = [
|
|
31271
|
-
translator$
|
|
31505
|
+
translator$1p,
|
|
31506
|
+
translator$X,
|
|
31272
31507
|
translator$V,
|
|
31273
|
-
translator$
|
|
31274
|
-
translator$
|
|
31508
|
+
translator$U,
|
|
31509
|
+
translator$1n,
|
|
31275
31510
|
translator$1l,
|
|
31276
|
-
translator$
|
|
31277
|
-
translator$
|
|
31278
|
-
translator$1h
|
|
31511
|
+
translator$T,
|
|
31512
|
+
translator$1j
|
|
31279
31513
|
];
|
|
31280
|
-
const translator$
|
|
31514
|
+
const translator$e = NodeTranslator.from(
|
|
31281
31515
|
createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
|
|
31282
31516
|
);
|
|
31283
31517
|
const propertyTranslators$1 = [
|
|
31518
|
+
translator$1o,
|
|
31519
|
+
translator$W,
|
|
31284
31520
|
translator$1m,
|
|
31285
|
-
translator$U,
|
|
31286
31521
|
translator$1k,
|
|
31287
|
-
translator$
|
|
31288
|
-
translator$
|
|
31289
|
-
translator$1g
|
|
31522
|
+
translator$S,
|
|
31523
|
+
translator$1i
|
|
31290
31524
|
];
|
|
31291
|
-
const translator$
|
|
31525
|
+
const translator$d = NodeTranslator.from(
|
|
31292
31526
|
createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$1)
|
|
31293
31527
|
);
|
|
31294
31528
|
const propertyTranslators = [
|
|
31529
|
+
translator$q,
|
|
31530
|
+
translator$1C,
|
|
31531
|
+
translator$1Q,
|
|
31532
|
+
translator$p,
|
|
31533
|
+
translator$B,
|
|
31295
31534
|
translator$o,
|
|
31296
|
-
translator$1A,
|
|
31297
|
-
translator$1O,
|
|
31298
31535
|
translator$n,
|
|
31299
|
-
translator$z,
|
|
31300
31536
|
translator$m,
|
|
31301
31537
|
translator$l,
|
|
31302
31538
|
translator$k,
|
|
@@ -31306,14 +31542,12 @@ const propertyTranslators = [
|
|
|
31306
31542
|
translator$g,
|
|
31307
31543
|
translator$f,
|
|
31308
31544
|
translator$e,
|
|
31309
|
-
translator$d
|
|
31310
|
-
translator$c,
|
|
31311
|
-
translator$b
|
|
31545
|
+
translator$d
|
|
31312
31546
|
];
|
|
31313
|
-
const translator$
|
|
31547
|
+
const translator$c = NodeTranslator.from(
|
|
31314
31548
|
createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators)
|
|
31315
31549
|
);
|
|
31316
|
-
const translator$
|
|
31550
|
+
const translator$b = NodeTranslator.from(
|
|
31317
31551
|
createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
|
|
31318
31552
|
);
|
|
31319
31553
|
const DEFAULT_COLUMN_WIDTH_PX = 100;
|
|
@@ -31363,36 +31597,37 @@ const resolveFallbackColumnWidthTwips = (params, totalColumns, cellMinWidthTwips
|
|
|
31363
31597
|
}
|
|
31364
31598
|
return Math.max(fallbackWidthTwips, cellMinWidthTwips);
|
|
31365
31599
|
};
|
|
31366
|
-
const XML_NODE_NAME$
|
|
31600
|
+
const XML_NODE_NAME$b = "w:tblGrid";
|
|
31367
31601
|
const SD_ATTR_KEY$1 = "grid";
|
|
31368
31602
|
const cellMinWidth = pixelsToTwips(10);
|
|
31369
|
-
const encode$
|
|
31603
|
+
const encode$h = (params) => {
|
|
31370
31604
|
const { nodes } = params;
|
|
31371
31605
|
const node = nodes[0];
|
|
31372
31606
|
const attributes = encodeProperties(
|
|
31373
31607
|
{ ...params, nodes: [node] },
|
|
31374
|
-
{ [translator$
|
|
31608
|
+
{ [translator$b.xmlName]: translator$b },
|
|
31375
31609
|
true
|
|
31376
31610
|
);
|
|
31377
31611
|
return {
|
|
31378
|
-
xmlName: XML_NODE_NAME$
|
|
31612
|
+
xmlName: XML_NODE_NAME$b,
|
|
31379
31613
|
sdNodeOrKeyName: SD_ATTR_KEY$1,
|
|
31380
31614
|
attributes
|
|
31381
31615
|
};
|
|
31382
31616
|
};
|
|
31383
|
-
const decode$
|
|
31617
|
+
const decode$j = (params) => {
|
|
31384
31618
|
const { grid: rawGrid } = params.node.attrs || {};
|
|
31385
31619
|
const grid = Array.isArray(rawGrid) ? rawGrid : [];
|
|
31386
31620
|
const { firstRow = {} } = params.extraParams || {};
|
|
31387
31621
|
const cellNodes = firstRow.content?.filter((n) => n.type === "tableCell") ?? [];
|
|
31388
|
-
const
|
|
31622
|
+
const colWidthsFromCellNodes = cellNodes.flatMap((cell) => {
|
|
31389
31623
|
const spanCount = Math.max(1, cell?.attrs?.colspan ?? 1);
|
|
31390
|
-
|
|
31391
|
-
|
|
31624
|
+
const colwidth = cell.attrs?.colwidth;
|
|
31625
|
+
return Array.from({ length: spanCount }).map((_2, span) => Array.isArray(colwidth) ? colwidth[span] : void 0);
|
|
31626
|
+
});
|
|
31627
|
+
const columnCountFromCells = colWidthsFromCellNodes.length;
|
|
31392
31628
|
const totalColumns = Math.max(columnCountFromCells, grid.length);
|
|
31393
31629
|
const fallbackColumnWidthTwips = resolveFallbackColumnWidthTwips(params, totalColumns, cellMinWidth);
|
|
31394
31630
|
const elements = [];
|
|
31395
|
-
let columnIndex = 0;
|
|
31396
31631
|
const pushColumn = (widthTwips, { enforceMinimum = false } = {}) => {
|
|
31397
31632
|
let numericWidth = typeof widthTwips === "string" ? parseInt(widthTwips, 10) : widthTwips;
|
|
31398
31633
|
let shouldEnforceMinimum = enforceMinimum;
|
|
@@ -31403,62 +31638,52 @@ const decode$h = (params) => {
|
|
|
31403
31638
|
const roundedWidth = Math.round(numericWidth);
|
|
31404
31639
|
const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
|
|
31405
31640
|
const safeWidth = Math.max(roundedWidth, minimumWidth);
|
|
31406
|
-
const decoded = translator$
|
|
31641
|
+
const decoded = translator$b.decode({
|
|
31407
31642
|
node: { type: (
|
|
31408
31643
|
/** @type {string} */
|
|
31409
|
-
translator$
|
|
31644
|
+
translator$b.sdNodeOrKeyName
|
|
31410
31645
|
), attrs: { col: safeWidth } }
|
|
31411
31646
|
});
|
|
31412
31647
|
if (decoded) elements.push(decoded);
|
|
31413
31648
|
};
|
|
31414
|
-
|
|
31415
|
-
const
|
|
31416
|
-
const
|
|
31417
|
-
|
|
31418
|
-
|
|
31419
|
-
|
|
31420
|
-
|
|
31421
|
-
|
|
31422
|
-
|
|
31423
|
-
|
|
31424
|
-
|
|
31425
|
-
|
|
31426
|
-
|
|
31427
|
-
|
|
31428
|
-
if (gridWidthTwips != null && gridWidthPixels != null && Math.abs(gridWidthPixels - cellWidthPixels) <= tolerance) {
|
|
31429
|
-
cellWidthTwips = gridWidthTwips;
|
|
31430
|
-
} else {
|
|
31431
|
-
cellWidthTwips = pixelsToTwips(cellWidthPixels);
|
|
31432
|
-
}
|
|
31433
|
-
} else if (gridWidthTwips != null) {
|
|
31649
|
+
for (let columnIndex = 0; columnIndex < totalColumns; ++columnIndex) {
|
|
31650
|
+
const rawWidth = colWidthsFromCellNodes[columnIndex];
|
|
31651
|
+
const cellWidthPixels = typeof rawWidth === "number" && Number.isFinite(rawWidth) ? rawWidth : Number(rawWidth);
|
|
31652
|
+
const hasCellWidth = Number.isFinite(cellWidthPixels) && cellWidthPixels > 0;
|
|
31653
|
+
const colGridAttrs = grid?.[columnIndex] || {};
|
|
31654
|
+
const gridWidthTwips = normalizeTwipWidth(colGridAttrs.col);
|
|
31655
|
+
const gridWidthPixels = gridWidthTwips != null ? twipsToPixels(gridWidthTwips) : null;
|
|
31656
|
+
let cellWidthTwips;
|
|
31657
|
+
let enforceMinimum = false;
|
|
31658
|
+
if (gridWidthTwips != null) {
|
|
31659
|
+
cellWidthTwips = gridWidthTwips;
|
|
31660
|
+
} else if (hasCellWidth) {
|
|
31661
|
+
const tolerance = 0.5;
|
|
31662
|
+
if (gridWidthTwips != null && gridWidthPixels != null && Math.abs(gridWidthPixels - cellWidthPixels) <= tolerance) {
|
|
31434
31663
|
cellWidthTwips = gridWidthTwips;
|
|
31435
31664
|
} else {
|
|
31436
|
-
cellWidthTwips =
|
|
31437
|
-
enforceMinimum = true;
|
|
31665
|
+
cellWidthTwips = pixelsToTwips(cellWidthPixels);
|
|
31438
31666
|
}
|
|
31439
|
-
|
|
31440
|
-
|
|
31667
|
+
} else {
|
|
31668
|
+
cellWidthTwips = fallbackColumnWidthTwips;
|
|
31669
|
+
enforceMinimum = true;
|
|
31441
31670
|
}
|
|
31442
|
-
|
|
31443
|
-
while (columnIndex < grid.length) {
|
|
31444
|
-
const gridWidthTwips = normalizeTwipWidth(grid[columnIndex]?.col);
|
|
31445
|
-
pushColumn(gridWidthTwips);
|
|
31446
|
-
columnIndex++;
|
|
31671
|
+
pushColumn(cellWidthTwips, { enforceMinimum });
|
|
31447
31672
|
}
|
|
31448
31673
|
const newNode = {
|
|
31449
|
-
name: XML_NODE_NAME$
|
|
31674
|
+
name: XML_NODE_NAME$b,
|
|
31450
31675
|
attributes: {},
|
|
31451
31676
|
elements
|
|
31452
31677
|
};
|
|
31453
31678
|
return newNode;
|
|
31454
31679
|
};
|
|
31455
|
-
const config$
|
|
31456
|
-
xmlName: XML_NODE_NAME$
|
|
31680
|
+
const config$a = {
|
|
31681
|
+
xmlName: XML_NODE_NAME$b,
|
|
31457
31682
|
sdNodeOrKeyName: SD_ATTR_KEY$1,
|
|
31458
|
-
encode: encode$
|
|
31459
|
-
decode: decode$
|
|
31683
|
+
encode: encode$h,
|
|
31684
|
+
decode: decode$j
|
|
31460
31685
|
};
|
|
31461
|
-
const translator$
|
|
31686
|
+
const translator$a = NodeTranslator.from(config$a);
|
|
31462
31687
|
const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
|
|
31463
31688
|
const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
|
|
31464
31689
|
const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
|
|
@@ -31521,19 +31746,21 @@ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasure
|
|
|
31521
31746
|
columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
|
|
31522
31747
|
};
|
|
31523
31748
|
};
|
|
31524
|
-
const XML_NODE_NAME$
|
|
31525
|
-
const SD_NODE_NAME$
|
|
31526
|
-
const encode$
|
|
31749
|
+
const XML_NODE_NAME$a = "w:tbl";
|
|
31750
|
+
const SD_NODE_NAME$9 = "table";
|
|
31751
|
+
const encode$g = (params, encodedAttrs) => {
|
|
31527
31752
|
const { nodes } = params;
|
|
31528
31753
|
const node = nodes[0];
|
|
31529
31754
|
const tblPr = node.elements.find((el) => el.name === "w:tblPr");
|
|
31530
31755
|
if (tblPr) {
|
|
31531
|
-
const encodedProperties = translator$
|
|
31756
|
+
const encodedProperties = translator$c.encode({ ...params, nodes: [tblPr] });
|
|
31532
31757
|
encodedAttrs["tableProperties"] = encodedProperties || {};
|
|
31758
|
+
} else {
|
|
31759
|
+
encodedAttrs["tableProperties"] || (encodedAttrs["tableProperties"] = {});
|
|
31533
31760
|
}
|
|
31534
31761
|
const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
|
|
31535
31762
|
if (tblGrid) {
|
|
31536
|
-
encodedAttrs["grid"] = translator$
|
|
31763
|
+
encodedAttrs["grid"] = translator$a.encode({ ...params, nodes: [tblGrid] }).attributes;
|
|
31537
31764
|
}
|
|
31538
31765
|
[
|
|
31539
31766
|
"tableStyleId",
|
|
@@ -31550,14 +31777,14 @@ const encode$e = (params, encodedAttrs) => {
|
|
|
31550
31777
|
key = prop;
|
|
31551
31778
|
transform = (v2) => v2;
|
|
31552
31779
|
}
|
|
31553
|
-
if (encodedAttrs.tableProperties
|
|
31780
|
+
if (encodedAttrs.tableProperties[key]) {
|
|
31554
31781
|
encodedAttrs[key] = transform(encodedAttrs.tableProperties[key]);
|
|
31555
31782
|
}
|
|
31556
31783
|
});
|
|
31557
31784
|
if (encodedAttrs.tableCellSpacing) {
|
|
31558
31785
|
encodedAttrs["borderCollapse"] = "separate";
|
|
31559
31786
|
}
|
|
31560
|
-
if (encodedAttrs.tableProperties
|
|
31787
|
+
if (encodedAttrs.tableProperties.tableWidth) {
|
|
31561
31788
|
const tableWidthMeasurement = encodedAttrs.tableProperties.tableWidth;
|
|
31562
31789
|
const widthPx = twipsToPixels(tableWidthMeasurement.value);
|
|
31563
31790
|
if (widthPx != null) {
|
|
@@ -31572,25 +31799,22 @@ const encode$e = (params, encodedAttrs) => {
|
|
|
31572
31799
|
};
|
|
31573
31800
|
}
|
|
31574
31801
|
}
|
|
31575
|
-
const
|
|
31576
|
-
const referencedStyles = _getReferencedTableStyles(encodedAttrs.tableStyleId, params);
|
|
31577
|
-
|
|
31578
|
-
|
|
31579
|
-
|
|
31580
|
-
|
|
31581
|
-
|
|
31582
|
-
}
|
|
31802
|
+
const borderProps = _processTableBorders(encodedAttrs.tableProperties.borders || {});
|
|
31803
|
+
const referencedStyles = _getReferencedTableStyles(encodedAttrs.tableStyleId, params) || {};
|
|
31804
|
+
const rowBorders = { ...referencedStyles.rowBorders, ...borderProps.rowBorders };
|
|
31805
|
+
encodedAttrs.borders = { ...referencedStyles.borders, ...borderProps.borders };
|
|
31806
|
+
encodedAttrs.tableProperties.cellMargins = referencedStyles.cellMargins = {
|
|
31807
|
+
...referencedStyles.cellMargins,
|
|
31808
|
+
...encodedAttrs.tableProperties.cellMargins
|
|
31809
|
+
};
|
|
31583
31810
|
const rows = node.elements.filter((el) => el.name === "w:tr");
|
|
31584
|
-
const borderData = Object.assign({}, referencedStyles?.borders || {}, borders || {});
|
|
31585
|
-
const borderRowData = Object.assign({}, referencedStyles?.rowBorders || {}, rowBorders || {});
|
|
31586
|
-
encodedAttrs["borders"] = borderData;
|
|
31587
31811
|
let columnWidths = Array.isArray(encodedAttrs["grid"]) ? encodedAttrs["grid"].map((item) => twipsToPixels(item.col)) : [];
|
|
31588
31812
|
if (!columnWidths.length) {
|
|
31589
31813
|
const fallback = buildFallbackGridForTable({
|
|
31590
31814
|
params,
|
|
31591
31815
|
rows,
|
|
31592
31816
|
tableWidth: encodedAttrs.tableWidth,
|
|
31593
|
-
tableWidthMeasurement: encodedAttrs.tableProperties
|
|
31817
|
+
tableWidthMeasurement: encodedAttrs.tableProperties.tableWidth
|
|
31594
31818
|
});
|
|
31595
31819
|
if (fallback) {
|
|
31596
31820
|
encodedAttrs.grid = fallback.grid;
|
|
@@ -31601,13 +31825,14 @@ const encode$e = (params, encodedAttrs) => {
|
|
|
31601
31825
|
const totalColumns = columnWidths.length;
|
|
31602
31826
|
const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
|
|
31603
31827
|
rows.forEach((row, rowIndex) => {
|
|
31604
|
-
const result = translator$
|
|
31828
|
+
const result = translator$v.encode({
|
|
31605
31829
|
...params,
|
|
31830
|
+
path: [...params.path || [], node],
|
|
31606
31831
|
nodes: [row],
|
|
31607
31832
|
extraParams: {
|
|
31608
31833
|
row,
|
|
31609
31834
|
table: node,
|
|
31610
|
-
rowBorders
|
|
31835
|
+
rowBorders,
|
|
31611
31836
|
columnWidths,
|
|
31612
31837
|
activeRowSpans: activeRowSpans.slice(),
|
|
31613
31838
|
rowIndex,
|
|
@@ -31655,13 +31880,13 @@ const encode$e = (params, encodedAttrs) => {
|
|
|
31655
31880
|
attrs: encodedAttrs
|
|
31656
31881
|
};
|
|
31657
31882
|
};
|
|
31658
|
-
const decode$
|
|
31883
|
+
const decode$i = (params, decodedAttrs) => {
|
|
31659
31884
|
params.node = preProcessVerticalMergeCells(params.node, params);
|
|
31660
31885
|
const { node } = params;
|
|
31661
31886
|
const elements = translateChildNodes(params);
|
|
31662
31887
|
const firstRow = node.content?.find((n) => n.type === "tableRow");
|
|
31663
31888
|
const properties = node.attrs.grid;
|
|
31664
|
-
const element = translator$
|
|
31889
|
+
const element = translator$a.decode({
|
|
31665
31890
|
...params,
|
|
31666
31891
|
node: { ...node, attrs: { ...node.attrs, grid: properties } },
|
|
31667
31892
|
extraParams: {
|
|
@@ -31671,7 +31896,7 @@ const decode$g = (params, decodedAttrs) => {
|
|
|
31671
31896
|
if (element) elements.unshift(element);
|
|
31672
31897
|
if (node.attrs?.tableProperties) {
|
|
31673
31898
|
const properties2 = { ...node.attrs.tableProperties };
|
|
31674
|
-
const element2 = translator$
|
|
31899
|
+
const element2 = translator$c.decode({
|
|
31675
31900
|
...params,
|
|
31676
31901
|
node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
|
|
31677
31902
|
});
|
|
@@ -31737,7 +31962,7 @@ function _getReferencedTableStyles(tableStyleReference, params) {
|
|
|
31737
31962
|
if (baseTblPr && baseTblPr.elements) {
|
|
31738
31963
|
tblPr.elements.push(...baseTblPr.elements);
|
|
31739
31964
|
}
|
|
31740
|
-
const tableProperties = translator$
|
|
31965
|
+
const tableProperties = translator$c.encode({ ...params, nodes: [tblPr] });
|
|
31741
31966
|
if (tableProperties) {
|
|
31742
31967
|
const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
|
|
31743
31968
|
if (borders) stylesToReturn.borders = borders;
|
|
@@ -31756,85 +31981,85 @@ function _getReferencedTableStyles(tableStyleReference, params) {
|
|
|
31756
31981
|
}
|
|
31757
31982
|
return stylesToReturn;
|
|
31758
31983
|
}
|
|
31759
|
-
const config$
|
|
31760
|
-
xmlName: XML_NODE_NAME$
|
|
31761
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
31984
|
+
const config$9 = {
|
|
31985
|
+
xmlName: XML_NODE_NAME$a,
|
|
31986
|
+
sdNodeOrKeyName: SD_NODE_NAME$9,
|
|
31762
31987
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31763
|
-
encode: encode$
|
|
31764
|
-
decode: decode$
|
|
31988
|
+
encode: encode$g,
|
|
31989
|
+
decode: decode$i,
|
|
31765
31990
|
attributes: []
|
|
31766
31991
|
};
|
|
31767
|
-
const translator$
|
|
31768
|
-
const encode$
|
|
31992
|
+
const translator$9 = NodeTranslator.from(config$9);
|
|
31993
|
+
const encode$f = (attributes) => {
|
|
31769
31994
|
return attributes["w:id"];
|
|
31770
31995
|
};
|
|
31771
|
-
const decode$
|
|
31996
|
+
const decode$h = (attrs) => {
|
|
31772
31997
|
return attrs.id;
|
|
31773
31998
|
};
|
|
31774
31999
|
const attrConfig$7 = Object.freeze({
|
|
31775
32000
|
xmlName: "w:id",
|
|
31776
32001
|
sdName: "id",
|
|
31777
|
-
encode: encode$
|
|
31778
|
-
decode: decode$
|
|
32002
|
+
encode: encode$f,
|
|
32003
|
+
decode: decode$h
|
|
31779
32004
|
});
|
|
31780
|
-
const encode$
|
|
32005
|
+
const encode$e = (attributes) => {
|
|
31781
32006
|
return attributes["w:name"];
|
|
31782
32007
|
};
|
|
31783
|
-
const decode$
|
|
32008
|
+
const decode$g = (attrs) => {
|
|
31784
32009
|
return attrs.name;
|
|
31785
32010
|
};
|
|
31786
32011
|
const attrConfig$6 = Object.freeze({
|
|
31787
32012
|
xmlName: "w:name",
|
|
31788
32013
|
sdName: "name",
|
|
31789
|
-
encode: encode$
|
|
31790
|
-
decode: decode$
|
|
32014
|
+
encode: encode$e,
|
|
32015
|
+
decode: decode$g
|
|
31791
32016
|
});
|
|
31792
|
-
const encode$
|
|
32017
|
+
const encode$d = (attributes) => {
|
|
31793
32018
|
return attributes["w:colFirst"];
|
|
31794
32019
|
};
|
|
31795
|
-
const decode$
|
|
32020
|
+
const decode$f = (attrs) => {
|
|
31796
32021
|
return attrs.colFirst;
|
|
31797
32022
|
};
|
|
31798
32023
|
const attrConfig$5 = Object.freeze({
|
|
31799
32024
|
xmlName: "w:colFirst",
|
|
31800
32025
|
sdName: "colFirst",
|
|
31801
|
-
encode: encode$
|
|
31802
|
-
decode: decode$
|
|
32026
|
+
encode: encode$d,
|
|
32027
|
+
decode: decode$f
|
|
31803
32028
|
});
|
|
31804
|
-
const encode$
|
|
32029
|
+
const encode$c = (attributes) => {
|
|
31805
32030
|
return attributes["w:colLast"];
|
|
31806
32031
|
};
|
|
31807
|
-
const decode$
|
|
32032
|
+
const decode$e = (attrs) => {
|
|
31808
32033
|
return attrs.colLast;
|
|
31809
32034
|
};
|
|
31810
32035
|
const attrConfig$4 = Object.freeze({
|
|
31811
32036
|
xmlName: "w:colLast",
|
|
31812
32037
|
sdName: "colLast",
|
|
31813
|
-
encode: encode$
|
|
31814
|
-
decode: decode$
|
|
32038
|
+
encode: encode$c,
|
|
32039
|
+
decode: decode$e
|
|
31815
32040
|
});
|
|
31816
|
-
const encode$
|
|
32041
|
+
const encode$b = (attributes) => {
|
|
31817
32042
|
return attributes["w:displacedByCustomXml"];
|
|
31818
32043
|
};
|
|
31819
|
-
const decode$
|
|
32044
|
+
const decode$d = (attrs) => {
|
|
31820
32045
|
return attrs.displacedByCustomXml;
|
|
31821
32046
|
};
|
|
31822
32047
|
const attrConfig$3 = Object.freeze({
|
|
31823
32048
|
xmlName: "w:displacedByCustomXml",
|
|
31824
32049
|
sdName: "displacedByCustomXml",
|
|
31825
|
-
encode: encode$
|
|
31826
|
-
decode: decode$
|
|
32050
|
+
encode: encode$b,
|
|
32051
|
+
decode: decode$d
|
|
31827
32052
|
});
|
|
31828
32053
|
const validXmlAttributes$4 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
|
|
31829
|
-
const XML_NODE_NAME$
|
|
31830
|
-
const SD_NODE_NAME$
|
|
31831
|
-
const encode$
|
|
32054
|
+
const XML_NODE_NAME$9 = "w:bookmarkStart";
|
|
32055
|
+
const SD_NODE_NAME$8 = "bookmarkStart";
|
|
32056
|
+
const encode$a = (params, encodedAttrs = {}) => {
|
|
31832
32057
|
return {
|
|
31833
32058
|
type: "bookmarkStart",
|
|
31834
32059
|
attrs: encodedAttrs
|
|
31835
32060
|
};
|
|
31836
32061
|
};
|
|
31837
|
-
const decode$
|
|
32062
|
+
const decode$c = (params, decodedAttrs = {}) => {
|
|
31838
32063
|
const result = {
|
|
31839
32064
|
name: "w:bookmarkStart",
|
|
31840
32065
|
elements: []
|
|
@@ -31844,49 +32069,49 @@ const decode$a = (params, decodedAttrs = {}) => {
|
|
|
31844
32069
|
}
|
|
31845
32070
|
return result;
|
|
31846
32071
|
};
|
|
31847
|
-
const config$
|
|
31848
|
-
xmlName: XML_NODE_NAME$
|
|
31849
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
32072
|
+
const config$8 = {
|
|
32073
|
+
xmlName: XML_NODE_NAME$9,
|
|
32074
|
+
sdNodeOrKeyName: SD_NODE_NAME$8,
|
|
31850
32075
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31851
|
-
encode: encode$
|
|
31852
|
-
decode: decode$
|
|
32076
|
+
encode: encode$a,
|
|
32077
|
+
decode: decode$c,
|
|
31853
32078
|
attributes: validXmlAttributes$4
|
|
31854
32079
|
};
|
|
31855
|
-
const translator$
|
|
31856
|
-
const encode$
|
|
32080
|
+
const translator$8 = NodeTranslator.from(config$8);
|
|
32081
|
+
const encode$9 = (attributes) => {
|
|
31857
32082
|
return attributes["w:id"];
|
|
31858
32083
|
};
|
|
31859
|
-
const decode$
|
|
32084
|
+
const decode$b = (attrs) => {
|
|
31860
32085
|
return attrs.id;
|
|
31861
32086
|
};
|
|
31862
32087
|
const attrConfig$2 = Object.freeze({
|
|
31863
32088
|
xmlName: "w:id",
|
|
31864
32089
|
sdName: "id",
|
|
31865
|
-
encode: encode$
|
|
31866
|
-
decode: decode$
|
|
32090
|
+
encode: encode$9,
|
|
32091
|
+
decode: decode$b
|
|
31867
32092
|
});
|
|
31868
|
-
const encode$
|
|
32093
|
+
const encode$8 = (attributes) => {
|
|
31869
32094
|
return attributes["w:displacedByCustomXml"];
|
|
31870
32095
|
};
|
|
31871
|
-
const decode$
|
|
32096
|
+
const decode$a = (attrs) => {
|
|
31872
32097
|
return attrs.displacedByCustomXml;
|
|
31873
32098
|
};
|
|
31874
32099
|
const attrConfig$1 = Object.freeze({
|
|
31875
32100
|
xmlName: "w:displacedByCustomXml",
|
|
31876
32101
|
sdName: "displacedByCustomXml",
|
|
31877
|
-
encode: encode$
|
|
31878
|
-
decode: decode$
|
|
32102
|
+
encode: encode$8,
|
|
32103
|
+
decode: decode$a
|
|
31879
32104
|
});
|
|
31880
32105
|
const validXmlAttributes$3 = [attrConfig$2, attrConfig$1];
|
|
31881
|
-
const XML_NODE_NAME$
|
|
31882
|
-
const SD_NODE_NAME$
|
|
31883
|
-
const encode$
|
|
32106
|
+
const XML_NODE_NAME$8 = "w:bookmarkEnd";
|
|
32107
|
+
const SD_NODE_NAME$7 = "bookmarkEnd";
|
|
32108
|
+
const encode$7 = (params, encodedAttrs = {}) => {
|
|
31884
32109
|
return {
|
|
31885
32110
|
type: "bookmarkEnd",
|
|
31886
32111
|
attrs: encodedAttrs
|
|
31887
32112
|
};
|
|
31888
32113
|
};
|
|
31889
|
-
const decode$
|
|
32114
|
+
const decode$9 = (params, decodedAttrs = {}) => {
|
|
31890
32115
|
const result = {
|
|
31891
32116
|
name: "w:bookmarkEnd",
|
|
31892
32117
|
elements: []
|
|
@@ -31896,27 +32121,27 @@ const decode$7 = (params, decodedAttrs = {}) => {
|
|
|
31896
32121
|
}
|
|
31897
32122
|
return result;
|
|
31898
32123
|
};
|
|
31899
|
-
const config$
|
|
31900
|
-
xmlName: XML_NODE_NAME$
|
|
31901
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
32124
|
+
const config$7 = {
|
|
32125
|
+
xmlName: XML_NODE_NAME$8,
|
|
32126
|
+
sdNodeOrKeyName: SD_NODE_NAME$7,
|
|
31902
32127
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31903
|
-
encode: encode$
|
|
31904
|
-
decode: decode$
|
|
32128
|
+
encode: encode$7,
|
|
32129
|
+
decode: decode$9,
|
|
31905
32130
|
attributes: validXmlAttributes$3
|
|
31906
32131
|
};
|
|
31907
|
-
const translator$
|
|
31908
|
-
const decode$
|
|
32132
|
+
const translator$7 = NodeTranslator.from(config$7);
|
|
32133
|
+
const decode$8 = (attrs) => attrs?.["w:id"];
|
|
31909
32134
|
const attrConfig = Object.freeze({
|
|
31910
32135
|
xmlName: "w:id",
|
|
31911
32136
|
sdName: "w:id",
|
|
31912
32137
|
// We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
|
|
31913
32138
|
encode: () => {
|
|
31914
32139
|
},
|
|
31915
|
-
decode: decode$
|
|
32140
|
+
decode: decode$8
|
|
31916
32141
|
});
|
|
31917
|
-
const XML_NODE_NAME$
|
|
31918
|
-
const SD_NODE_NAME$
|
|
31919
|
-
const decode$
|
|
32142
|
+
const XML_NODE_NAME$7 = "w:commentRange";
|
|
32143
|
+
const SD_NODE_NAME$6 = "commentRange";
|
|
32144
|
+
const decode$7 = (params) => {
|
|
31920
32145
|
const { node, comments, commentsExportType, exportedCommentDefs } = params;
|
|
31921
32146
|
if (!node) return;
|
|
31922
32147
|
if (!comments) return;
|
|
@@ -31959,19 +32184,19 @@ const getCommentSchema = (type2, commentIndex) => {
|
|
|
31959
32184
|
};
|
|
31960
32185
|
};
|
|
31961
32186
|
const getConfig = (type2) => ({
|
|
31962
|
-
xmlName: `${XML_NODE_NAME$
|
|
31963
|
-
sdNodeOrKeyName: `${SD_NODE_NAME$
|
|
32187
|
+
xmlName: `${XML_NODE_NAME$7}${type2}`,
|
|
32188
|
+
sdNodeOrKeyName: `${SD_NODE_NAME$6}${type2}`,
|
|
31964
32189
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31965
32190
|
encode: () => {
|
|
31966
32191
|
},
|
|
31967
|
-
decode: decode$
|
|
32192
|
+
decode: decode$7,
|
|
31968
32193
|
attributes: [attrConfig]
|
|
31969
32194
|
});
|
|
31970
32195
|
const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
|
|
31971
32196
|
const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
|
|
31972
|
-
const XML_NODE_NAME$
|
|
31973
|
-
const SD_NODE_NAME$
|
|
31974
|
-
const encode$
|
|
32197
|
+
const XML_NODE_NAME$6 = "sd:pageReference";
|
|
32198
|
+
const SD_NODE_NAME$5 = "pageReference";
|
|
32199
|
+
const encode$6 = (params) => {
|
|
31975
32200
|
const { nodes = [], nodeListHandler } = params || {};
|
|
31976
32201
|
const node = nodes[0];
|
|
31977
32202
|
const processedText = nodeListHandler.handler({
|
|
@@ -31988,7 +32213,7 @@ const encode$4 = (params) => {
|
|
|
31988
32213
|
};
|
|
31989
32214
|
return processedNode;
|
|
31990
32215
|
};
|
|
31991
|
-
const decode$
|
|
32216
|
+
const decode$6 = (params) => {
|
|
31992
32217
|
const { node } = params;
|
|
31993
32218
|
const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
|
|
31994
32219
|
const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params, node: n }));
|
|
@@ -32061,17 +32286,17 @@ const decode$4 = (params) => {
|
|
|
32061
32286
|
];
|
|
32062
32287
|
return translated;
|
|
32063
32288
|
};
|
|
32064
|
-
const config$
|
|
32065
|
-
xmlName: XML_NODE_NAME$
|
|
32066
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
32289
|
+
const config$6 = {
|
|
32290
|
+
xmlName: XML_NODE_NAME$6,
|
|
32291
|
+
sdNodeOrKeyName: SD_NODE_NAME$5,
|
|
32067
32292
|
type: NodeTranslator.translatorTypes.NODE,
|
|
32068
|
-
encode: encode$
|
|
32069
|
-
decode: decode$
|
|
32293
|
+
encode: encode$6,
|
|
32294
|
+
decode: decode$6
|
|
32070
32295
|
};
|
|
32071
|
-
const translator$
|
|
32072
|
-
const XML_NODE_NAME$
|
|
32073
|
-
const SD_NODE_NAME$
|
|
32074
|
-
const encode$
|
|
32296
|
+
const translator$6 = NodeTranslator.from(config$6);
|
|
32297
|
+
const XML_NODE_NAME$5 = "sd:tableOfContents";
|
|
32298
|
+
const SD_NODE_NAME$4 = "tableOfContents";
|
|
32299
|
+
const encode$5 = (params) => {
|
|
32075
32300
|
const { nodes = [], nodeListHandler } = params || {};
|
|
32076
32301
|
const node = nodes[0];
|
|
32077
32302
|
const processedContent = nodeListHandler.handler({
|
|
@@ -32087,7 +32312,7 @@ const encode$3 = (params) => {
|
|
|
32087
32312
|
};
|
|
32088
32313
|
return processedNode;
|
|
32089
32314
|
};
|
|
32090
|
-
const decode$
|
|
32315
|
+
const decode$5 = (params) => {
|
|
32091
32316
|
const { node } = params;
|
|
32092
32317
|
const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params, node: n }));
|
|
32093
32318
|
const tocBeginElements = [
|
|
@@ -32134,6 +32359,194 @@ const decode$3 = (params) => {
|
|
|
32134
32359
|
}
|
|
32135
32360
|
return contentNodes;
|
|
32136
32361
|
};
|
|
32362
|
+
const config$5 = {
|
|
32363
|
+
xmlName: XML_NODE_NAME$5,
|
|
32364
|
+
sdNodeOrKeyName: SD_NODE_NAME$4,
|
|
32365
|
+
type: NodeTranslator.translatorTypes.NODE,
|
|
32366
|
+
encode: encode$5,
|
|
32367
|
+
decode: decode$5
|
|
32368
|
+
};
|
|
32369
|
+
const translator$5 = NodeTranslator.from(config$5);
|
|
32370
|
+
const XML_NODE_NAME$4 = "sd:autoPageNumber";
|
|
32371
|
+
const SD_NODE_NAME$3 = "page-number";
|
|
32372
|
+
const encode$4 = (params) => {
|
|
32373
|
+
const { nodes = [] } = params || {};
|
|
32374
|
+
const node = nodes[0];
|
|
32375
|
+
const rPr = node.elements?.find((el) => el.name === "w:rPr");
|
|
32376
|
+
const marks = parseMarks(rPr || { elements: [] });
|
|
32377
|
+
const processedNode = {
|
|
32378
|
+
type: "page-number",
|
|
32379
|
+
attrs: {
|
|
32380
|
+
marksAsAttrs: marks
|
|
32381
|
+
}
|
|
32382
|
+
};
|
|
32383
|
+
return processedNode;
|
|
32384
|
+
};
|
|
32385
|
+
const decode$4 = (params) => {
|
|
32386
|
+
const { node } = params;
|
|
32387
|
+
const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
|
|
32388
|
+
const translated = [
|
|
32389
|
+
{
|
|
32390
|
+
name: "w:r",
|
|
32391
|
+
elements: [
|
|
32392
|
+
{
|
|
32393
|
+
name: "w:rPr",
|
|
32394
|
+
elements: outputMarks
|
|
32395
|
+
},
|
|
32396
|
+
{
|
|
32397
|
+
name: "w:fldChar",
|
|
32398
|
+
attributes: {
|
|
32399
|
+
"w:fldCharType": "begin"
|
|
32400
|
+
}
|
|
32401
|
+
}
|
|
32402
|
+
]
|
|
32403
|
+
},
|
|
32404
|
+
{
|
|
32405
|
+
name: "w:r",
|
|
32406
|
+
elements: [
|
|
32407
|
+
{
|
|
32408
|
+
name: "w:rPr",
|
|
32409
|
+
elements: outputMarks
|
|
32410
|
+
},
|
|
32411
|
+
{
|
|
32412
|
+
name: "w:instrText",
|
|
32413
|
+
attributes: { "xml:space": "preserve" },
|
|
32414
|
+
elements: [
|
|
32415
|
+
{
|
|
32416
|
+
type: "text",
|
|
32417
|
+
text: " PAGE"
|
|
32418
|
+
}
|
|
32419
|
+
]
|
|
32420
|
+
}
|
|
32421
|
+
]
|
|
32422
|
+
},
|
|
32423
|
+
{
|
|
32424
|
+
name: "w:r",
|
|
32425
|
+
elements: [
|
|
32426
|
+
{
|
|
32427
|
+
name: "w:rPr",
|
|
32428
|
+
elements: outputMarks
|
|
32429
|
+
},
|
|
32430
|
+
{
|
|
32431
|
+
name: "w:fldChar",
|
|
32432
|
+
attributes: {
|
|
32433
|
+
"w:fldCharType": "separate"
|
|
32434
|
+
}
|
|
32435
|
+
}
|
|
32436
|
+
]
|
|
32437
|
+
},
|
|
32438
|
+
{
|
|
32439
|
+
name: "w:r",
|
|
32440
|
+
elements: [
|
|
32441
|
+
{
|
|
32442
|
+
name: "w:rPr",
|
|
32443
|
+
elements: outputMarks
|
|
32444
|
+
},
|
|
32445
|
+
{
|
|
32446
|
+
name: "w:fldChar",
|
|
32447
|
+
attributes: {
|
|
32448
|
+
"w:fldCharType": "end"
|
|
32449
|
+
}
|
|
32450
|
+
}
|
|
32451
|
+
]
|
|
32452
|
+
}
|
|
32453
|
+
];
|
|
32454
|
+
return translated;
|
|
32455
|
+
};
|
|
32456
|
+
const config$4 = {
|
|
32457
|
+
xmlName: XML_NODE_NAME$4,
|
|
32458
|
+
sdNodeOrKeyName: SD_NODE_NAME$3,
|
|
32459
|
+
type: NodeTranslator.translatorTypes.NODE,
|
|
32460
|
+
encode: encode$4,
|
|
32461
|
+
decode: decode$4
|
|
32462
|
+
};
|
|
32463
|
+
const translator$4 = NodeTranslator.from(config$4);
|
|
32464
|
+
const XML_NODE_NAME$3 = "sd:totalPageNumber";
|
|
32465
|
+
const SD_NODE_NAME$2 = "total-page-number";
|
|
32466
|
+
const encode$3 = (params) => {
|
|
32467
|
+
const { nodes = [] } = params || {};
|
|
32468
|
+
const node = nodes[0];
|
|
32469
|
+
const rPr = node.elements?.find((el) => el.name === "w:rPr");
|
|
32470
|
+
const marks = parseMarks(rPr || { elements: [] });
|
|
32471
|
+
const processedNode = {
|
|
32472
|
+
type: "total-page-number",
|
|
32473
|
+
attrs: {
|
|
32474
|
+
marksAsAttrs: marks
|
|
32475
|
+
}
|
|
32476
|
+
};
|
|
32477
|
+
return processedNode;
|
|
32478
|
+
};
|
|
32479
|
+
const decode$3 = (params) => {
|
|
32480
|
+
const { node } = params;
|
|
32481
|
+
const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
|
|
32482
|
+
const translated = [
|
|
32483
|
+
{
|
|
32484
|
+
name: "w:r",
|
|
32485
|
+
elements: [
|
|
32486
|
+
{
|
|
32487
|
+
name: "w:rPr",
|
|
32488
|
+
elements: outputMarks
|
|
32489
|
+
},
|
|
32490
|
+
{
|
|
32491
|
+
name: "w:fldChar",
|
|
32492
|
+
attributes: {
|
|
32493
|
+
"w:fldCharType": "begin"
|
|
32494
|
+
}
|
|
32495
|
+
}
|
|
32496
|
+
]
|
|
32497
|
+
},
|
|
32498
|
+
{
|
|
32499
|
+
name: "w:r",
|
|
32500
|
+
elements: [
|
|
32501
|
+
{
|
|
32502
|
+
name: "w:rPr",
|
|
32503
|
+
elements: outputMarks
|
|
32504
|
+
},
|
|
32505
|
+
{
|
|
32506
|
+
name: "w:instrText",
|
|
32507
|
+
attributes: { "xml:space": "preserve" },
|
|
32508
|
+
elements: [
|
|
32509
|
+
{
|
|
32510
|
+
type: "text",
|
|
32511
|
+
text: " NUMPAGES"
|
|
32512
|
+
}
|
|
32513
|
+
]
|
|
32514
|
+
}
|
|
32515
|
+
]
|
|
32516
|
+
},
|
|
32517
|
+
{
|
|
32518
|
+
name: "w:r",
|
|
32519
|
+
elements: [
|
|
32520
|
+
{
|
|
32521
|
+
name: "w:rPr",
|
|
32522
|
+
elements: outputMarks
|
|
32523
|
+
},
|
|
32524
|
+
{
|
|
32525
|
+
name: "w:fldChar",
|
|
32526
|
+
attributes: {
|
|
32527
|
+
"w:fldCharType": "separate"
|
|
32528
|
+
}
|
|
32529
|
+
}
|
|
32530
|
+
]
|
|
32531
|
+
},
|
|
32532
|
+
{
|
|
32533
|
+
name: "w:r",
|
|
32534
|
+
elements: [
|
|
32535
|
+
{
|
|
32536
|
+
name: "w:rPr",
|
|
32537
|
+
elements: outputMarks
|
|
32538
|
+
},
|
|
32539
|
+
{
|
|
32540
|
+
name: "w:fldChar",
|
|
32541
|
+
attributes: {
|
|
32542
|
+
"w:fldCharType": "end"
|
|
32543
|
+
}
|
|
32544
|
+
}
|
|
32545
|
+
]
|
|
32546
|
+
}
|
|
32547
|
+
];
|
|
32548
|
+
return translated;
|
|
32549
|
+
};
|
|
32137
32550
|
const config$3 = {
|
|
32138
32551
|
xmlName: XML_NODE_NAME$3,
|
|
32139
32552
|
sdNodeOrKeyName: SD_NODE_NAME$2,
|
|
@@ -32193,7 +32606,7 @@ function handleVRectImport({ pNode, pict, params }) {
|
|
|
32193
32606
|
if (isHorizontalRule) {
|
|
32194
32607
|
schemaAttrs.horizontalRule = true;
|
|
32195
32608
|
}
|
|
32196
|
-
const pElement = translator
|
|
32609
|
+
const pElement = translator$11.encode({
|
|
32197
32610
|
...params,
|
|
32198
32611
|
nodes: [{ ...pNode, elements: pNode.elements.filter((el) => el.name !== "w:r") }]
|
|
32199
32612
|
});
|
|
@@ -32250,7 +32663,7 @@ const handleDrawingNode = (params) => {
|
|
|
32250
32663
|
if (mainNode.name === "w:drawing") node = mainNode;
|
|
32251
32664
|
else node = mainNode.elements.find((el) => el.name === "w:drawing");
|
|
32252
32665
|
if (!node) return { nodes: [], consumed: 0 };
|
|
32253
|
-
const schemaNode = translator$
|
|
32666
|
+
const schemaNode = translator$s.encode(params);
|
|
32254
32667
|
const newNodes = schemaNode ? [schemaNode] : [];
|
|
32255
32668
|
return { nodes: newNodes, consumed: 1 };
|
|
32256
32669
|
};
|
|
@@ -32365,7 +32778,7 @@ const handleTrackChangeNode = (params) => {
|
|
|
32365
32778
|
});
|
|
32366
32779
|
break;
|
|
32367
32780
|
case "w:ins":
|
|
32368
|
-
result = translator$
|
|
32781
|
+
result = translator$1w.encode({
|
|
32369
32782
|
...translatorParams,
|
|
32370
32783
|
extraParams: {
|
|
32371
32784
|
...translatorParams.extraParams,
|
|
@@ -32380,8 +32793,8 @@ const trackChangeNodeHandlerEntity = {
|
|
|
32380
32793
|
handlerName: "trackChangeNodeHandler",
|
|
32381
32794
|
handler: handleTrackChangeNode
|
|
32382
32795
|
};
|
|
32383
|
-
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$
|
|
32384
|
-
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator
|
|
32796
|
+
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$10);
|
|
32797
|
+
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$$);
|
|
32385
32798
|
const XML_NODE_NAME$1 = "w:t";
|
|
32386
32799
|
const SD_NODE_NAME$1 = "text";
|
|
32387
32800
|
const validXmlAttributes$1 = [createAttributeHandler("xml:space", "xmlSpace")];
|
|
@@ -32421,12 +32834,12 @@ const decode$1 = (params) => {
|
|
|
32421
32834
|
case "trackDelete":
|
|
32422
32835
|
return translator$2.decode(params);
|
|
32423
32836
|
case "trackInsert":
|
|
32424
|
-
return translator$
|
|
32837
|
+
return translator$1w.decode(params);
|
|
32425
32838
|
}
|
|
32426
32839
|
}
|
|
32427
32840
|
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
32428
32841
|
if (isLinkNode && !extraParams?.linkProcessed) {
|
|
32429
|
-
return translator$
|
|
32842
|
+
return translator$10.decode(params);
|
|
32430
32843
|
}
|
|
32431
32844
|
const { text, marks = [] } = node;
|
|
32432
32845
|
return getTextNodeForExport(text, marks, params);
|
|
@@ -32468,7 +32881,7 @@ const handleParagraphNode = (params) => {
|
|
|
32468
32881
|
if (nodes.length === 0 || nodes[0].name !== "w:p") {
|
|
32469
32882
|
return { nodes: [], consumed: 0 };
|
|
32470
32883
|
}
|
|
32471
|
-
const schemaNode = translator
|
|
32884
|
+
const schemaNode = translator$11.encode(params);
|
|
32472
32885
|
const newNodes = schemaNode ? [schemaNode] : [];
|
|
32473
32886
|
return { nodes: newNodes, consumed: 1 };
|
|
32474
32887
|
};
|
|
@@ -32481,7 +32894,7 @@ const handleSdtNode = (params) => {
|
|
|
32481
32894
|
if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
|
|
32482
32895
|
return { nodes: [], consumed: 0 };
|
|
32483
32896
|
}
|
|
32484
|
-
const result = translator$
|
|
32897
|
+
const result = translator$r.encode(params);
|
|
32485
32898
|
if (!result) {
|
|
32486
32899
|
return { nodes: [], consumed: 0 };
|
|
32487
32900
|
}
|
|
@@ -32622,7 +33035,7 @@ const handler = (params) => {
|
|
|
32622
33035
|
if (nodes.length === 0 || nodes[0].name !== "w:br") {
|
|
32623
33036
|
return { nodes: [], consumed: 0 };
|
|
32624
33037
|
}
|
|
32625
|
-
const result = translator$
|
|
33038
|
+
const result = translator$23.encode(params);
|
|
32626
33039
|
if (!result) return { nodes: [], consumed: 0 };
|
|
32627
33040
|
return {
|
|
32628
33041
|
nodes: [result],
|
|
@@ -32694,7 +33107,7 @@ const handleBookmarkStartNode = (params) => {
|
|
|
32694
33107
|
if (isCustomMarkBookmark(nodes[0], params.editor)) {
|
|
32695
33108
|
return handleBookmarkNode(params);
|
|
32696
33109
|
}
|
|
32697
|
-
const node = translator$
|
|
33110
|
+
const node = translator$8.encode(params);
|
|
32698
33111
|
if (!node) return { nodes: [], consumed: 0 };
|
|
32699
33112
|
return { nodes: [node], consumed: 1 };
|
|
32700
33113
|
};
|
|
@@ -32726,7 +33139,7 @@ const handleBookmarkEndNode = (params) => {
|
|
|
32726
33139
|
if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
|
|
32727
33140
|
return { nodes: [], consumed: 0 };
|
|
32728
33141
|
}
|
|
32729
|
-
const node = translator$
|
|
33142
|
+
const node = translator$7.encode(params);
|
|
32730
33143
|
if (!node) return { nodes: [], consumed: 0 };
|
|
32731
33144
|
return { nodes: [node], consumed: 1 };
|
|
32732
33145
|
};
|
|
@@ -32776,7 +33189,7 @@ const handleAlternateChoice = (params) => {
|
|
|
32776
33189
|
...currentNode,
|
|
32777
33190
|
type: "element"
|
|
32778
33191
|
};
|
|
32779
|
-
const translated = translator$
|
|
33192
|
+
const translated = translator$1M.encode({
|
|
32780
33193
|
...params,
|
|
32781
33194
|
nodes: [nodeForTranslator],
|
|
32782
33195
|
extraParams: { ...params.extraParams || {}, node: nodeForTranslator }
|
|
@@ -32802,45 +33215,9 @@ const alternateChoiceHandler = {
|
|
|
32802
33215
|
handlerName: "alternateChoiceHandler",
|
|
32803
33216
|
handler: handleAlternateChoice
|
|
32804
33217
|
};
|
|
32805
|
-
const
|
|
32806
|
-
|
|
32807
|
-
|
|
32808
|
-
return { nodes: [], consumed: 0 };
|
|
32809
|
-
}
|
|
32810
|
-
const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
|
|
32811
|
-
const marks = parseMarks(rPr || { elements: [] });
|
|
32812
|
-
const processedNode = {
|
|
32813
|
-
type: "page-number",
|
|
32814
|
-
attrs: {
|
|
32815
|
-
marksAsAttrs: marks
|
|
32816
|
-
}
|
|
32817
|
-
};
|
|
32818
|
-
return { nodes: [processedNode], consumed: 1 };
|
|
32819
|
-
};
|
|
32820
|
-
const autoPageHandlerEntity = {
|
|
32821
|
-
handlerName: "autoPageNumberHandler",
|
|
32822
|
-
handler: handleAutoPageNumber
|
|
32823
|
-
};
|
|
32824
|
-
const handleAutoTotalPageNumber = (params) => {
|
|
32825
|
-
const { nodes } = params;
|
|
32826
|
-
if (nodes.length === 0 || nodes[0].name !== "sd:totalPageNumber") {
|
|
32827
|
-
return { nodes: [], consumed: 0 };
|
|
32828
|
-
}
|
|
32829
|
-
const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
|
|
32830
|
-
const marks = parseMarks(rPr || { elements: [] });
|
|
32831
|
-
const processedNode = {
|
|
32832
|
-
type: "total-page-number",
|
|
32833
|
-
attrs: {
|
|
32834
|
-
marksAsAttrs: marks
|
|
32835
|
-
}
|
|
32836
|
-
};
|
|
32837
|
-
return { nodes: [processedNode], consumed: 1 };
|
|
32838
|
-
};
|
|
32839
|
-
const autoTotalPageCountEntity = {
|
|
32840
|
-
handlerName: "autoTotalPageCountEntity",
|
|
32841
|
-
handler: handleAutoTotalPageNumber
|
|
32842
|
-
};
|
|
32843
|
-
const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$4);
|
|
33218
|
+
const autoPageHandlerEntity = generateV2HandlerEntity("autoPageNumberHandler", translator$4);
|
|
33219
|
+
const autoTotalPageCountEntity = generateV2HandlerEntity("autoTotalPageCountEntity", translator$3);
|
|
33220
|
+
const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$6);
|
|
32844
33221
|
const handlePictNode = (params) => {
|
|
32845
33222
|
const { nodes } = params;
|
|
32846
33223
|
if (!nodes.length || nodes[0].name !== "w:p") {
|
|
@@ -33513,15 +33890,15 @@ const handleTabNode = (params) => {
|
|
|
33513
33890
|
if (!nodes.length || nodes[0].name !== "w:tab") {
|
|
33514
33891
|
return { nodes: [], consumed: 0 };
|
|
33515
33892
|
}
|
|
33516
|
-
const node = translator$
|
|
33893
|
+
const node = translator$21.encode(params);
|
|
33517
33894
|
return { nodes: [node], consumed: 1 };
|
|
33518
33895
|
};
|
|
33519
33896
|
const tabNodeEntityHandler = {
|
|
33520
33897
|
handlerName: "w:tabTranslator",
|
|
33521
33898
|
handler: handleTabNode
|
|
33522
33899
|
};
|
|
33523
|
-
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$
|
|
33524
|
-
const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$
|
|
33900
|
+
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$9);
|
|
33901
|
+
const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$5);
|
|
33525
33902
|
function preProcessPageInstruction(nodesToCombine) {
|
|
33526
33903
|
const pageNumNode = {
|
|
33527
33904
|
name: "sd:autoPageNumber",
|
|
@@ -34373,7 +34750,7 @@ function translateContentBlock(params) {
|
|
|
34373
34750
|
if (vmlAttributes || horizontalRule) {
|
|
34374
34751
|
return translateVRectContentBlock(params);
|
|
34375
34752
|
}
|
|
34376
|
-
const alternateContent = translator$
|
|
34753
|
+
const alternateContent = translator$1M.decode(params);
|
|
34377
34754
|
return wrapTextInRun(alternateContent);
|
|
34378
34755
|
}
|
|
34379
34756
|
function translateVRectContentBlock(params) {
|
|
@@ -34454,7 +34831,6 @@ const config = {
|
|
|
34454
34831
|
attributes: validXmlAttributes
|
|
34455
34832
|
};
|
|
34456
34833
|
const translator = NodeTranslator.from(config);
|
|
34457
|
-
const RUN_LEVEL_WRAPPERS = /* @__PURE__ */ new Set(["w:hyperlink", "w:ins", "w:del"]);
|
|
34458
34834
|
const DEFAULT_SECTION_PROPS_TWIPS = Object.freeze({
|
|
34459
34835
|
pageSize: Object.freeze({ width: "12240", height: "15840" }),
|
|
34460
34836
|
pageMargins: Object.freeze({
|
|
@@ -34512,64 +34888,25 @@ const ensureSectionLayoutDefaults = (sectPr, converter) => {
|
|
|
34512
34888
|
});
|
|
34513
34889
|
return sectPr;
|
|
34514
34890
|
};
|
|
34515
|
-
function convertSdtContentToRuns(elements) {
|
|
34516
|
-
const normalized = Array.isArray(elements) ? elements : [elements];
|
|
34517
|
-
const runs = [];
|
|
34518
|
-
normalized.forEach((element) => {
|
|
34519
|
-
if (!element) return;
|
|
34520
|
-
if (element.name === "w:sdtPr") {
|
|
34521
|
-
return;
|
|
34522
|
-
}
|
|
34523
|
-
if (element.name === "w:r") {
|
|
34524
|
-
runs.push(element);
|
|
34525
|
-
return;
|
|
34526
|
-
}
|
|
34527
|
-
if (element.name === "w:sdt") {
|
|
34528
|
-
const sdtContent = (element.elements || []).find((child) => child?.name === "w:sdtContent");
|
|
34529
|
-
if (sdtContent?.elements) {
|
|
34530
|
-
runs.push(...convertSdtContentToRuns(sdtContent.elements));
|
|
34531
|
-
}
|
|
34532
|
-
return;
|
|
34533
|
-
}
|
|
34534
|
-
if (RUN_LEVEL_WRAPPERS.has(element.name)) {
|
|
34535
|
-
const wrapperElements = convertSdtContentToRuns(element.elements || []);
|
|
34536
|
-
if (wrapperElements.length) {
|
|
34537
|
-
runs.push({
|
|
34538
|
-
...element,
|
|
34539
|
-
elements: wrapperElements
|
|
34540
|
-
});
|
|
34541
|
-
}
|
|
34542
|
-
return;
|
|
34543
|
-
}
|
|
34544
|
-
if (element.name) {
|
|
34545
|
-
runs.push({
|
|
34546
|
-
name: "w:r",
|
|
34547
|
-
type: "element",
|
|
34548
|
-
elements: element.elements || [element]
|
|
34549
|
-
});
|
|
34550
|
-
}
|
|
34551
|
-
});
|
|
34552
|
-
return runs.filter((run2) => Array.isArray(run2.elements) && run2.elements.length > 0);
|
|
34553
|
-
}
|
|
34554
34891
|
function exportSchemaToJson(params) {
|
|
34555
34892
|
const { type: type2 } = params.node || {};
|
|
34556
34893
|
const router = {
|
|
34557
34894
|
doc: translateDocumentNode,
|
|
34558
34895
|
body: translateBodyNode,
|
|
34559
34896
|
heading: translateHeadingNode,
|
|
34560
|
-
paragraph: translator
|
|
34561
|
-
run: translator
|
|
34897
|
+
paragraph: translator$11,
|
|
34898
|
+
run: translator$$,
|
|
34562
34899
|
text: translator$1,
|
|
34563
|
-
lineBreak: translator$
|
|
34564
|
-
table: translator$
|
|
34565
|
-
tableRow: translator$
|
|
34566
|
-
tableCell: translator$
|
|
34567
|
-
bookmarkStart: translator$
|
|
34568
|
-
bookmarkEnd: translator$
|
|
34569
|
-
fieldAnnotation: translator$
|
|
34570
|
-
tab: translator$
|
|
34571
|
-
image: translator$
|
|
34572
|
-
hardBreak: translator$
|
|
34900
|
+
lineBreak: translator$23,
|
|
34901
|
+
table: translator$9,
|
|
34902
|
+
tableRow: translator$v,
|
|
34903
|
+
tableCell: translator$G,
|
|
34904
|
+
bookmarkStart: translator$8,
|
|
34905
|
+
bookmarkEnd: translator$7,
|
|
34906
|
+
fieldAnnotation: translator$r,
|
|
34907
|
+
tab: translator$21,
|
|
34908
|
+
image: translator$s,
|
|
34909
|
+
hardBreak: translator$23,
|
|
34573
34910
|
commentRangeStart: commentRangeStartTranslator,
|
|
34574
34911
|
commentRangeEnd: commentRangeEndTranslator,
|
|
34575
34912
|
commentReference: () => null,
|
|
@@ -34578,14 +34915,14 @@ function exportSchemaToJson(params) {
|
|
|
34578
34915
|
contentBlock: translator,
|
|
34579
34916
|
vectorShape: translateVectorShape,
|
|
34580
34917
|
shapeGroup: translateShapeGroup,
|
|
34581
|
-
structuredContent: translator$
|
|
34582
|
-
structuredContentBlock: translator$
|
|
34583
|
-
documentPartObject: translator$
|
|
34584
|
-
documentSection: translator$
|
|
34585
|
-
"page-number":
|
|
34586
|
-
"total-page-number":
|
|
34587
|
-
pageReference: translator$
|
|
34588
|
-
tableOfContents: translator$
|
|
34918
|
+
structuredContent: translator$r,
|
|
34919
|
+
structuredContentBlock: translator$r,
|
|
34920
|
+
documentPartObject: translator$r,
|
|
34921
|
+
documentSection: translator$r,
|
|
34922
|
+
"page-number": translator$4,
|
|
34923
|
+
"total-page-number": translator$3,
|
|
34924
|
+
pageReference: translator$6,
|
|
34925
|
+
tableOfContents: translator$5
|
|
34589
34926
|
};
|
|
34590
34927
|
let handler2 = router[type2];
|
|
34591
34928
|
if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
|
|
@@ -34657,57 +34994,7 @@ function translateHeadingNode(params) {
|
|
|
34657
34994
|
// Maps to Heading1, Heading2, etc. in Word
|
|
34658
34995
|
}
|
|
34659
34996
|
};
|
|
34660
|
-
return
|
|
34661
|
-
}
|
|
34662
|
-
function translateParagraphNode(params) {
|
|
34663
|
-
const elements = translateChildNodes(params);
|
|
34664
|
-
const htmlAnnotationChild = elements.find((element) => element.name === "htmlAnnotation");
|
|
34665
|
-
if (htmlAnnotationChild) {
|
|
34666
|
-
return htmlAnnotationChild.elements;
|
|
34667
|
-
}
|
|
34668
|
-
const pPr = generateParagraphProperties(params);
|
|
34669
|
-
if (pPr) elements.unshift(pPr);
|
|
34670
|
-
let attributes = {};
|
|
34671
|
-
if (params.node.attrs?.rsidRDefault) {
|
|
34672
|
-
attributes["w:rsidRDefault"] = params.node.attrs.rsidRDefault;
|
|
34673
|
-
}
|
|
34674
|
-
const result = {
|
|
34675
|
-
name: "w:p",
|
|
34676
|
-
elements,
|
|
34677
|
-
attributes
|
|
34678
|
-
};
|
|
34679
|
-
return result;
|
|
34680
|
-
}
|
|
34681
|
-
function generateParagraphProperties(params) {
|
|
34682
|
-
const { node } = params;
|
|
34683
|
-
const { attrs = {} } = node;
|
|
34684
|
-
const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
|
|
34685
|
-
if (attrs.styleId !== paragraphProperties.styleId) {
|
|
34686
|
-
paragraphProperties.styleId = attrs.styleId;
|
|
34687
|
-
}
|
|
34688
|
-
["borders", "styleId", "indent", "textAlign", "keepLines", "keepNext", "spacing", "tabStops"].forEach((key) => {
|
|
34689
|
-
let propKey = key === "textAlign" ? "justification" : key;
|
|
34690
|
-
if (JSON.stringify(paragraphProperties[propKey]) !== JSON.stringify(attrs[key])) {
|
|
34691
|
-
paragraphProperties[key] = attrs[key];
|
|
34692
|
-
}
|
|
34693
|
-
});
|
|
34694
|
-
const framePr = attrs.dropcap;
|
|
34695
|
-
if (framePr) {
|
|
34696
|
-
framePr.dropCap = framePr.type;
|
|
34697
|
-
delete framePr.type;
|
|
34698
|
-
}
|
|
34699
|
-
if (JSON.stringify(paragraphProperties.framePr) !== JSON.stringify(framePr)) {
|
|
34700
|
-
paragraphProperties.framePr = framePr;
|
|
34701
|
-
}
|
|
34702
|
-
const marksProps = decodeRPrFromMarks(attrs.marksAttrs || []);
|
|
34703
|
-
const finalRunProps = combineRunProperties([paragraphProperties.runProperties || {}, marksProps]);
|
|
34704
|
-
paragraphProperties.runProperties = finalRunProps;
|
|
34705
|
-
const pPr = translator$10.decode({ node: { ...node, attrs: { paragraphProperties } } });
|
|
34706
|
-
const sectPr = node.attrs?.paragraphProperties?.sectPr;
|
|
34707
|
-
if (sectPr) {
|
|
34708
|
-
pPr.elements.push(sectPr);
|
|
34709
|
-
}
|
|
34710
|
-
return pPr;
|
|
34997
|
+
return translator$11.decode({ ...params, node: paragraphNode });
|
|
34711
34998
|
}
|
|
34712
34999
|
function translateDocumentNode(params) {
|
|
34713
35000
|
const bodyNode = {
|
|
@@ -34722,59 +35009,6 @@ function translateDocumentNode(params) {
|
|
|
34722
35009
|
};
|
|
34723
35010
|
return [node, params];
|
|
34724
35011
|
}
|
|
34725
|
-
function getTextNodeForExport(text, marks, params) {
|
|
34726
|
-
const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text);
|
|
34727
|
-
const space = hasLeadingOrTrailingSpace ? "preserve" : null;
|
|
34728
|
-
const nodeAttrs = space ? { "xml:space": space } : null;
|
|
34729
|
-
const textNodes = [];
|
|
34730
|
-
const textRunProperties = decodeRPrFromMarks(marks || []);
|
|
34731
|
-
const parentRunProperties = params.extraParams?.runProperties || {};
|
|
34732
|
-
const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
|
|
34733
|
-
const rPrNode = translator$1L.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
|
|
34734
|
-
textNodes.push({
|
|
34735
|
-
name: "w:t",
|
|
34736
|
-
elements: [{ text, type: "text" }],
|
|
34737
|
-
attributes: nodeAttrs
|
|
34738
|
-
});
|
|
34739
|
-
if (params) {
|
|
34740
|
-
const { editor } = params;
|
|
34741
|
-
const customMarks = editor.extensionService.extensions.filter((e) => e.isExternal === true);
|
|
34742
|
-
marks.forEach((mark) => {
|
|
34743
|
-
const isCustomMark = customMarks.some((customMark) => {
|
|
34744
|
-
const customMarkName = customMark.name;
|
|
34745
|
-
return mark.type === customMarkName;
|
|
34746
|
-
});
|
|
34747
|
-
if (!isCustomMark) return;
|
|
34748
|
-
let attrsString = "";
|
|
34749
|
-
Object.entries(mark.attrs).forEach(([key, value]) => {
|
|
34750
|
-
if (value) {
|
|
34751
|
-
attrsString += `${key}=${value};`;
|
|
34752
|
-
}
|
|
34753
|
-
});
|
|
34754
|
-
if (isCustomMark) {
|
|
34755
|
-
textNodes.unshift({
|
|
34756
|
-
type: "element",
|
|
34757
|
-
name: "w:bookmarkStart",
|
|
34758
|
-
attributes: {
|
|
34759
|
-
"w:id": "5000",
|
|
34760
|
-
"w:name": mark.type + ";" + attrsString
|
|
34761
|
-
}
|
|
34762
|
-
});
|
|
34763
|
-
textNodes.push({
|
|
34764
|
-
type: "element",
|
|
34765
|
-
name: "w:bookmarkEnd",
|
|
34766
|
-
attributes: {
|
|
34767
|
-
"w:id": "5000"
|
|
34768
|
-
}
|
|
34769
|
-
});
|
|
34770
|
-
}
|
|
34771
|
-
});
|
|
34772
|
-
}
|
|
34773
|
-
return {
|
|
34774
|
-
name: "w:r",
|
|
34775
|
-
elements: rPrNode ? [rPrNode, ...textNodes] : textNodes
|
|
34776
|
-
};
|
|
34777
|
-
}
|
|
34778
35012
|
function wrapTextInRun(nodeOrNodes, marks) {
|
|
34779
35013
|
let elements = [];
|
|
34780
35014
|
if (Array.isArray(nodeOrNodes)) elements = nodeOrNodes;
|
|
@@ -34803,60 +35037,6 @@ function processOutputMarks(marks = []) {
|
|
|
34803
35037
|
}
|
|
34804
35038
|
});
|
|
34805
35039
|
}
|
|
34806
|
-
function processLinkContentNode(node) {
|
|
34807
|
-
if (!node) return node;
|
|
34808
|
-
const contentNode = carbonCopy(node);
|
|
34809
|
-
if (!contentNode) return contentNode;
|
|
34810
|
-
const hyperlinkStyle = {
|
|
34811
|
-
name: "w:rStyle",
|
|
34812
|
-
attributes: { "w:val": "Hyperlink" }
|
|
34813
|
-
};
|
|
34814
|
-
const color = {
|
|
34815
|
-
name: "w:color",
|
|
34816
|
-
attributes: { "w:val": "467886" }
|
|
34817
|
-
};
|
|
34818
|
-
const underline = {
|
|
34819
|
-
name: "w:u",
|
|
34820
|
-
attributes: {
|
|
34821
|
-
"w:val": "none"
|
|
34822
|
-
}
|
|
34823
|
-
};
|
|
34824
|
-
if (contentNode.name === "w:r") {
|
|
34825
|
-
const runProps = contentNode.elements.find((el) => el.name === "w:rPr");
|
|
34826
|
-
if (runProps) {
|
|
34827
|
-
const foundColor = runProps.elements.find((el) => el.name === "w:color");
|
|
34828
|
-
const foundHyperlinkStyle = runProps.elements.find((el) => el.name === "w:rStyle");
|
|
34829
|
-
const underlineMark = runProps.elements.find((el) => el.name === "w:u");
|
|
34830
|
-
if (!foundColor) runProps.elements.unshift(color);
|
|
34831
|
-
if (!foundHyperlinkStyle) runProps.elements.unshift(hyperlinkStyle);
|
|
34832
|
-
if (!underlineMark) runProps.elements.unshift(underline);
|
|
34833
|
-
} else {
|
|
34834
|
-
const runProps2 = {
|
|
34835
|
-
name: "w:rPr",
|
|
34836
|
-
elements: [hyperlinkStyle, color]
|
|
34837
|
-
};
|
|
34838
|
-
contentNode.elements.unshift(runProps2);
|
|
34839
|
-
}
|
|
34840
|
-
}
|
|
34841
|
-
return contentNode;
|
|
34842
|
-
}
|
|
34843
|
-
function addNewLinkRelationship(params, link) {
|
|
34844
|
-
const newId = "rId" + generateDocxRandomId();
|
|
34845
|
-
if (!params.relationships || !Array.isArray(params.relationships)) {
|
|
34846
|
-
params.relationships = [];
|
|
34847
|
-
}
|
|
34848
|
-
params.relationships.push({
|
|
34849
|
-
type: "element",
|
|
34850
|
-
name: "Relationship",
|
|
34851
|
-
attributes: {
|
|
34852
|
-
Id: newId,
|
|
34853
|
-
Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
|
|
34854
|
-
Target: link,
|
|
34855
|
-
TargetMode: "External"
|
|
34856
|
-
}
|
|
34857
|
-
});
|
|
34858
|
-
return newId;
|
|
34859
|
-
}
|
|
34860
35040
|
function translateMark(mark) {
|
|
34861
35041
|
const xmlMark = SuperConverter.markTypes.find((m2) => m2.type === mark.type);
|
|
34862
35042
|
if (!xmlMark) {
|
|
@@ -34883,7 +35063,7 @@ function translateMark(mark) {
|
|
|
34883
35063
|
markElement.type = "element";
|
|
34884
35064
|
break;
|
|
34885
35065
|
case "underline": {
|
|
34886
|
-
const translated = translator$
|
|
35066
|
+
const translated = translator$1Z.decode({
|
|
34887
35067
|
node: {
|
|
34888
35068
|
attrs: {
|
|
34889
35069
|
underlineType: attrs.underlineType ?? attrs.underline ?? null,
|
|
@@ -34947,7 +35127,7 @@ function translateMark(mark) {
|
|
|
34947
35127
|
break;
|
|
34948
35128
|
case "highlight": {
|
|
34949
35129
|
const highlightValue = attrs.color ?? attrs.highlight ?? null;
|
|
34950
|
-
const translated = translator$
|
|
35130
|
+
const translated = translator$22.decode({ node: { attrs: { highlight: highlightValue } } });
|
|
34951
35131
|
return translated || {};
|
|
34952
35132
|
}
|
|
34953
35133
|
case "strike":
|
|
@@ -35029,82 +35209,6 @@ generateXml_fn = function(node) {
|
|
|
35029
35209
|
if (!selfClosing) tags.push(`</${name}>`);
|
|
35030
35210
|
return tags;
|
|
35031
35211
|
};
|
|
35032
|
-
const translatePageNumberNode = (params) => {
|
|
35033
|
-
const outputMarks = processOutputMarks(params.node.attrs?.marksAsAttrs || []);
|
|
35034
|
-
return getAutoPageJson("PAGE", outputMarks);
|
|
35035
|
-
};
|
|
35036
|
-
const translateTotalPageNumberNode = (params) => {
|
|
35037
|
-
const outputMarks = processOutputMarks(params.node.attrs?.marksAsAttrs || []);
|
|
35038
|
-
return getAutoPageJson("NUMPAGES", outputMarks);
|
|
35039
|
-
};
|
|
35040
|
-
const getAutoPageJson = (type2, outputMarks = []) => {
|
|
35041
|
-
return [
|
|
35042
|
-
{
|
|
35043
|
-
name: "w:r",
|
|
35044
|
-
elements: [
|
|
35045
|
-
{
|
|
35046
|
-
name: "w:rPr",
|
|
35047
|
-
elements: outputMarks
|
|
35048
|
-
},
|
|
35049
|
-
{
|
|
35050
|
-
name: "w:fldChar",
|
|
35051
|
-
attributes: {
|
|
35052
|
-
"w:fldCharType": "begin"
|
|
35053
|
-
}
|
|
35054
|
-
}
|
|
35055
|
-
]
|
|
35056
|
-
},
|
|
35057
|
-
{
|
|
35058
|
-
name: "w:r",
|
|
35059
|
-
elements: [
|
|
35060
|
-
{
|
|
35061
|
-
name: "w:rPr",
|
|
35062
|
-
elements: outputMarks
|
|
35063
|
-
},
|
|
35064
|
-
{
|
|
35065
|
-
name: "w:instrText",
|
|
35066
|
-
attributes: { "xml:space": "preserve" },
|
|
35067
|
-
elements: [
|
|
35068
|
-
{
|
|
35069
|
-
type: "text",
|
|
35070
|
-
text: ` ${type2}`
|
|
35071
|
-
}
|
|
35072
|
-
]
|
|
35073
|
-
}
|
|
35074
|
-
]
|
|
35075
|
-
},
|
|
35076
|
-
{
|
|
35077
|
-
name: "w:r",
|
|
35078
|
-
elements: [
|
|
35079
|
-
{
|
|
35080
|
-
name: "w:rPr",
|
|
35081
|
-
elements: outputMarks
|
|
35082
|
-
},
|
|
35083
|
-
{
|
|
35084
|
-
name: "w:fldChar",
|
|
35085
|
-
attributes: {
|
|
35086
|
-
"w:fldCharType": "separate"
|
|
35087
|
-
}
|
|
35088
|
-
}
|
|
35089
|
-
]
|
|
35090
|
-
},
|
|
35091
|
-
{
|
|
35092
|
-
name: "w:r",
|
|
35093
|
-
elements: [
|
|
35094
|
-
{
|
|
35095
|
-
name: "w:rPr",
|
|
35096
|
-
elements: outputMarks
|
|
35097
|
-
},
|
|
35098
|
-
{
|
|
35099
|
-
name: "w:fldChar",
|
|
35100
|
-
attributes: {
|
|
35101
|
-
"w:fldCharType": "end"
|
|
35102
|
-
}
|
|
35103
|
-
}
|
|
35104
|
-
]
|
|
35105
|
-
}
|
|
35106
|
-
];
|
|
35107
|
-
};
|
|
35108
35212
|
const prepareCommentParaIds = (comment) => {
|
|
35109
35213
|
const newComment = {
|
|
35110
35214
|
...comment,
|
|
@@ -35113,7 +35217,7 @@ const prepareCommentParaIds = (comment) => {
|
|
|
35113
35217
|
return newComment;
|
|
35114
35218
|
};
|
|
35115
35219
|
const getCommentDefinition = (comment, commentId, allComments, editor) => {
|
|
35116
|
-
const translatedText =
|
|
35220
|
+
const translatedText = translator$11.decode({ editor, node: comment.commentJSON });
|
|
35117
35221
|
const attributes = {
|
|
35118
35222
|
"w:id": String(commentId),
|
|
35119
35223
|
"w:author": comment.creatorName || comment.importedAuthor?.name,
|
|
@@ -35528,7 +35632,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
35528
35632
|
static getStoredSuperdocVersion(docx) {
|
|
35529
35633
|
return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35530
35634
|
}
|
|
35531
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.31.0-next.
|
|
35635
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.31.0-next.10") {
|
|
35532
35636
|
return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
35533
35637
|
}
|
|
35534
35638
|
/**
|
|
@@ -35925,7 +36029,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
|
|
|
35925
36029
|
};
|
|
35926
36030
|
exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
35927
36031
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
35928
|
-
const relationships = relsData.elements.find((
|
|
36032
|
+
const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
|
|
35929
36033
|
const newDocRels = [];
|
|
35930
36034
|
Object.entries(this.headers).forEach(([id, header], index2) => {
|
|
35931
36035
|
const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
|
|
@@ -35966,7 +36070,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
35966
36070
|
}
|
|
35967
36071
|
this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
|
|
35968
36072
|
if (params.relationships.length) {
|
|
35969
|
-
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((
|
|
36073
|
+
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
|
|
35970
36074
|
this.convertedXml[`word/_rels/${fileName}.rels`] = {
|
|
35971
36075
|
declaration: this.initialJSON?.declaration,
|
|
35972
36076
|
elements: [
|
|
@@ -36020,7 +36124,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36020
36124
|
}
|
|
36021
36125
|
this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
|
|
36022
36126
|
if (params.relationships.length) {
|
|
36023
|
-
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((
|
|
36127
|
+
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
|
|
36024
36128
|
this.convertedXml[`word/_rels/${fileName}.rels`] = {
|
|
36025
36129
|
declaration: this.initialJSON?.declaration,
|
|
36026
36130
|
elements: [
|
|
@@ -36039,7 +36143,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36039
36143
|
};
|
|
36040
36144
|
exportProcessNewRelationships_fn = function(rels = []) {
|
|
36041
36145
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
36042
|
-
const relationships = relsData.elements.find((
|
|
36146
|
+
const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
|
|
36043
36147
|
relationships.elements = mergeRelationshipElements(relationships.elements, rels);
|
|
36044
36148
|
};
|
|
36045
36149
|
exportProcessMediaFiles_fn = async function(media = {}) {
|
|
@@ -36141,7 +36245,7 @@ export {
|
|
|
36141
36245
|
comments_module_events as Z,
|
|
36142
36246
|
findMark as _,
|
|
36143
36247
|
Plugin as a,
|
|
36144
|
-
translator$
|
|
36248
|
+
translator$Y as a$,
|
|
36145
36249
|
AddMarkStep as a0,
|
|
36146
36250
|
RemoveMarkStep as a1,
|
|
36147
36251
|
twipsToLines as a2,
|
|
@@ -36165,20 +36269,20 @@ export {
|
|
|
36165
36269
|
readFromClipboard as aK,
|
|
36166
36270
|
handleClipboardPaste as aL,
|
|
36167
36271
|
getFileObject as aM,
|
|
36168
|
-
translator$
|
|
36169
|
-
translator$
|
|
36170
|
-
translator$
|
|
36171
|
-
translator$
|
|
36172
|
-
translator$
|
|
36173
|
-
translator$
|
|
36174
|
-
translator$
|
|
36175
|
-
translator$
|
|
36176
|
-
translator$
|
|
36177
|
-
translator$
|
|
36178
|
-
translator$
|
|
36179
|
-
translator$
|
|
36180
|
-
translator$
|
|
36181
|
-
translator$
|
|
36272
|
+
translator$H as aN,
|
|
36273
|
+
translator$N as aO,
|
|
36274
|
+
translator$P as aP,
|
|
36275
|
+
translator$I as aQ,
|
|
36276
|
+
translator$J as aR,
|
|
36277
|
+
translator$Q as aS,
|
|
36278
|
+
translator$R as aT,
|
|
36279
|
+
translator$17 as aU,
|
|
36280
|
+
translator$K as aV,
|
|
36281
|
+
translator$_ as aW,
|
|
36282
|
+
translator$M as aX,
|
|
36283
|
+
translator$O as aY,
|
|
36284
|
+
translator$L as aZ,
|
|
36285
|
+
translator$Z as a_,
|
|
36182
36286
|
createDocFromHTML as aa,
|
|
36183
36287
|
EditorState as ab,
|
|
36184
36288
|
hasSomeParentWithClass as ac,
|
|
@@ -36202,82 +36306,82 @@ export {
|
|
|
36202
36306
|
resolveParagraphProperties as au,
|
|
36203
36307
|
eighthPointsToPixels as av,
|
|
36204
36308
|
linesToTwips as aw,
|
|
36205
|
-
|
|
36309
|
+
convertSizeToCSS as ax,
|
|
36206
36310
|
SelectionRange as ay,
|
|
36207
36311
|
Transform as az,
|
|
36208
36312
|
Slice as b,
|
|
36209
|
-
translator$
|
|
36313
|
+
translator$8 as b$,
|
|
36210
36314
|
commentRangeEndTranslator as b0,
|
|
36211
36315
|
commentRangeStartTranslator as b1,
|
|
36212
|
-
translator$
|
|
36213
|
-
translator$
|
|
36214
|
-
translator$
|
|
36215
|
-
translator$
|
|
36216
|
-
translator$
|
|
36217
|
-
translator$
|
|
36218
|
-
translator$
|
|
36219
|
-
translator$
|
|
36220
|
-
translator$
|
|
36221
|
-
translator$
|
|
36222
|
-
translator$
|
|
36223
|
-
translator$
|
|
36224
|
-
translator$
|
|
36225
|
-
translator
|
|
36226
|
-
translator
|
|
36227
|
-
translator$
|
|
36228
|
-
translator$
|
|
36229
|
-
translator$
|
|
36230
|
-
translator$
|
|
36231
|
-
translator$
|
|
36232
|
-
translator$
|
|
36233
|
-
translator$
|
|
36234
|
-
translator$
|
|
36235
|
-
translator$
|
|
36236
|
-
translator$
|
|
36237
|
-
translator$
|
|
36238
|
-
translator$
|
|
36239
|
-
translator$
|
|
36240
|
-
translator$
|
|
36241
|
-
translator$
|
|
36242
|
-
translator$
|
|
36243
|
-
translator$
|
|
36244
|
-
translator$
|
|
36245
|
-
translator$
|
|
36246
|
-
translator$
|
|
36247
|
-
translator$
|
|
36248
|
-
translator$
|
|
36249
|
-
translator$
|
|
36250
|
-
translator$
|
|
36251
|
-
translator$
|
|
36252
|
-
translator$
|
|
36253
|
-
translator$
|
|
36254
|
-
translator$
|
|
36255
|
-
translator$
|
|
36256
|
-
translator$
|
|
36257
|
-
translator$
|
|
36258
|
-
translator$
|
|
36259
|
-
translator$
|
|
36260
|
-
translator$
|
|
36261
|
-
translator$
|
|
36262
|
-
translator$
|
|
36263
|
-
translator$
|
|
36264
|
-
translator$
|
|
36265
|
-
translator$
|
|
36266
|
-
translator$
|
|
36267
|
-
translator$
|
|
36268
|
-
translator$
|
|
36269
|
-
translator$
|
|
36270
|
-
translator$
|
|
36271
|
-
translator$
|
|
36272
|
-
translator$
|
|
36316
|
+
translator$t as b2,
|
|
36317
|
+
translator$u as b3,
|
|
36318
|
+
translator$x as b4,
|
|
36319
|
+
translator$y as b5,
|
|
36320
|
+
translator$1Z as b6,
|
|
36321
|
+
translator$w as b7,
|
|
36322
|
+
translator$z as b8,
|
|
36323
|
+
translator$v as b9,
|
|
36324
|
+
translator$r as bA,
|
|
36325
|
+
translator$1l as bB,
|
|
36326
|
+
translator$1U as bC,
|
|
36327
|
+
translator$1N as bD,
|
|
36328
|
+
translator$1V as bE,
|
|
36329
|
+
translator$$ as bF,
|
|
36330
|
+
translator$11 as bG,
|
|
36331
|
+
translator$1n as bH,
|
|
36332
|
+
translator$1C as bI,
|
|
36333
|
+
translator$U as bJ,
|
|
36334
|
+
translator$V as bK,
|
|
36335
|
+
translator$1_ as bL,
|
|
36336
|
+
translator$10 as bM,
|
|
36337
|
+
translator$22 as bN,
|
|
36338
|
+
translator$C as bO,
|
|
36339
|
+
translator$b as bP,
|
|
36340
|
+
translator$D as bQ,
|
|
36341
|
+
translator$E as bR,
|
|
36342
|
+
translator$X as bS,
|
|
36343
|
+
translator$s as bT,
|
|
36344
|
+
translator$1F as bU,
|
|
36345
|
+
translator$1W as bV,
|
|
36346
|
+
translator$1H as bW,
|
|
36347
|
+
translator$1R as bX,
|
|
36348
|
+
translator$F as bY,
|
|
36349
|
+
translator$23 as bZ,
|
|
36350
|
+
translator$1p as b_,
|
|
36351
|
+
translator$1j as ba,
|
|
36352
|
+
translator$G as bb,
|
|
36353
|
+
translator$f as bc,
|
|
36354
|
+
translator$g as bd,
|
|
36355
|
+
translator$h as be,
|
|
36356
|
+
translator$i as bf,
|
|
36357
|
+
translator$j as bg,
|
|
36358
|
+
translator$c as bh,
|
|
36359
|
+
translator$k as bi,
|
|
36360
|
+
translator$l as bj,
|
|
36361
|
+
translator$m as bk,
|
|
36362
|
+
translator$n as bl,
|
|
36363
|
+
translator$A as bm,
|
|
36364
|
+
translator$a as bn,
|
|
36365
|
+
translator$o as bo,
|
|
36366
|
+
translator$B as bp,
|
|
36367
|
+
translator$d as bq,
|
|
36368
|
+
translator$p as br,
|
|
36369
|
+
translator$e as bs,
|
|
36370
|
+
translator$9 as bt,
|
|
36371
|
+
translator$21 as bu,
|
|
36372
|
+
translator$1S as bv,
|
|
36373
|
+
translator$1T as bw,
|
|
36374
|
+
translator$1Y as bx,
|
|
36375
|
+
translator$T as by,
|
|
36376
|
+
translator$1Q as bz,
|
|
36273
36377
|
DOMParser$1 as c,
|
|
36274
|
-
translator$
|
|
36275
|
-
translator$
|
|
36276
|
-
translator$
|
|
36277
|
-
translator$
|
|
36278
|
-
translator$
|
|
36279
|
-
translator$
|
|
36280
|
-
translator$
|
|
36378
|
+
translator$7 as c0,
|
|
36379
|
+
translator$q as c1,
|
|
36380
|
+
translator$1$ as c2,
|
|
36381
|
+
translator$20 as c3,
|
|
36382
|
+
translator$5 as c4,
|
|
36383
|
+
translator$6 as c5,
|
|
36384
|
+
translator$1M as c6,
|
|
36281
36385
|
Mark as d,
|
|
36282
36386
|
dropPoint as e,
|
|
36283
36387
|
callOrGet as f,
|