@guodun/antdv 1.5.3 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +1 -1
- package/dist/es/components/contract-signing-location/src/template-source.mjs +16 -16
- package/dist/es/components/dept-selector/index.mjs +1 -1
- package/dist/es/components/dept-selector/src/DeptSelector.mjs +5 -0
- package/dist/es/components/dept-selector/src/DeptSelector.vue.mjs +90 -0
- package/dist/es/components/dept-selector/src/style/index.mjs +1 -0
- package/dist/es/components/dept-selector/src/types.mjs +4 -0
- package/dist/es/components/index.mjs +5 -3
- package/dist/es/components/plus-upload/apis/plus-upload.api.mjs +19 -9
- package/dist/es/components/plus-upload/hook/usePlusUpload.mjs +9 -9
- package/dist/es/components/plus-upload/src/plus-upload.vue.mjs +1 -1
- package/dist/es/components/plus-upload/src/types.mjs +4 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +2 -2
- package/dist/es/components/pro-contract-template-designer/src/{ContractTemplatePreviewSigningLayer.mjs → ContractTemplateAuthoringBar.mjs} +2 -2
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.mjs +168 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.mjs +120 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +382 -459
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.mjs +278 -122
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.mjs +415 -288
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +76 -75
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFindReplace.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.mjs +164 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.mjs +380 -393
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.mjs +108 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.mjs +73 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.mjs +109 -53
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.mjs +52 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.mjs +10 -14
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +49 -58
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.mjs +119 -196
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.mjs +115 -0
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +241 -290
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1169 -1324
- package/dist/es/components/pro-contract-template-designer/src/{SigningPlacementInspector.mjs → SigningLayoutCustomModal.mjs} +2 -2
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.mjs +110 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.mjs +98 -0
- package/dist/es/components/pro-contract-template-designer/src/{SigningPlacementLayer.mjs → SigningLayoutPreview.mjs} +2 -2
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPreview.vue.mjs +51 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-designer-files.mjs +1 -2
- package/dist/es/components/pro-contract-template-designer/src/composables/use-draft-cache-session.mjs +2 -3
- package/dist/es/components/pro-contract-template-designer/src/composables/use-page-authoring.mjs +43 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-authoring.mjs +99 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +128 -168
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-draft-cache.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-files.mjs +7 -11
- package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/constants.mjs +36 -25
- package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.mjs +192 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue_vue_type_style_index_0_scoped_a2a8e01a_lang.css +1 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/authoring-search.mjs +43 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +137 -93
- package/dist/es/components/pro-contract-template-designer/src/extensions/signing-mark.mjs +92 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/authoring-search.mjs +59 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/authoring-shortcuts.mjs +14 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/clause-snippets.mjs +56 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/document-outline.mjs +45 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/panel-search.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-layout-presets.mjs +235 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-mark.mjs +152 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +22 -20
- package/dist/es/components/pro-contract-template-designer/src/utils/toolbar-overflow.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/components/pro-dynamic-tags/src/index.vue.mjs +74 -48
- package/dist/es/components/pro-selector/index.mjs +6 -5
- package/dist/es/components/pro-selector/src/ProUserSelector.mjs +5 -0
- package/dist/es/components/pro-selector/src/ProUserSelector.vue.mjs +95 -0
- package/dist/es/components/pro-selector/src/ProUserSelectorDrilldown.mjs +5 -0
- package/dist/es/components/pro-selector/src/ProUserSelectorDrilldown.vue.mjs +20 -0
- package/dist/es/components/pro-selector/src/components/user.mjs +38 -52
- package/dist/es/components/pro-selector/src/types.mjs +9 -0
- package/dist/es/components/pro-selector/style/index.mjs +1 -0
- package/dist/es/components/pro-selector-group/index.mjs +1 -1
- package/dist/es/components/pro-selector-group/src/index.vue.mjs +71 -142
- package/dist/es/components/pro-selector-group/src/style/index.mjs +1 -0
- package/dist/es/components/pro-selector-group/src/utils/index.mjs +16 -28
- package/dist/es/components/role-selector/index.mjs +2 -2
- package/dist/es/components/role-selector/src/RoleSelector.mjs +5 -0
- package/dist/es/components/role-selector/src/RoleSelector.vue.mjs +90 -0
- package/dist/es/components/role-selector/src/style/index.mjs +1 -0
- package/dist/es/components/role-selector/src/types.mjs +4 -0
- package/dist/es/components/selector-core/components/DepartmentTree.mjs +5 -0
- package/dist/es/components/selector-core/components/DepartmentTree.vue.mjs +141 -0
- package/dist/es/components/selector-core/components/EntityRow.mjs +5 -0
- package/dist/es/components/selector-core/components/EntityRow.vue.mjs +84 -0
- package/dist/es/components/selector-core/components/HighlightText.mjs +5 -0
- package/dist/es/components/selector-core/components/HighlightText.vue.mjs +19 -0
- package/dist/es/components/selector-core/components/PanelFeedback.mjs +5 -0
- package/dist/es/components/selector-core/components/PanelFeedback.vue.mjs +61 -0
- package/dist/es/components/selector-core/components/PeoplePane.mjs +5 -0
- package/dist/es/components/selector-core/components/PeoplePane.vue.mjs +237 -0
- package/dist/es/components/selector-core/components/RolePane.mjs +5 -0
- package/dist/es/components/selector-core/components/RolePane.vue.mjs +87 -0
- package/dist/es/components/selector-core/components/SelectionSummary.mjs +5 -0
- package/dist/es/components/selector-core/components/SelectionSummary.vue.mjs +73 -0
- package/dist/es/components/selector-core/components/SelectorDialog.mjs +5 -0
- package/dist/es/components/selector-core/components/SelectorDialog.vue.mjs +351 -0
- package/dist/es/components/selector-core/model.mjs +114 -0
- package/dist/es/components/selector-core/useSelectorData.mjs +87 -0
- package/dist/es/index.mjs +82 -80
- package/dist/es/node_modules/@tiptap/pm/dist/history/index.mjs +1 -0
- package/dist/es/node_modules/orderedmap/dist/index.mjs +67 -0
- package/dist/es/node_modules/prosemirror-history/dist/index.mjs +226 -0
- package/dist/es/node_modules/prosemirror-model/dist/index.mjs +1128 -0
- package/dist/es/node_modules/prosemirror-state/dist/index.mjs +325 -0
- package/dist/es/node_modules/prosemirror-transform/dist/index.mjs +1055 -0
- package/dist/es/node_modules/rope-sequence/dist/index.mjs +83 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
- package/dist/lib/components/dept-selector/index.cjs +1 -1
- package/dist/lib/components/dept-selector/src/DeptSelector.cjs +1 -0
- package/dist/lib/components/dept-selector/src/DeptSelector.vue.cjs +1 -0
- package/dist/lib/components/dept-selector/src/style/index.cjs +1 -1
- package/dist/lib/components/dept-selector/src/types.cjs +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/plus-upload/apis/plus-upload.api.cjs +1 -1
- package/dist/lib/components/plus-upload/hook/usePlusUpload.cjs +1 -1
- package/dist/lib/components/plus-upload/src/plus-upload.vue.cjs +1 -1
- package/dist/lib/components/plus-upload/src/types.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFindReplace.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutCustomModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPreview.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPreview.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-designer-files.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-draft-cache-session.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-page-authoring.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-authoring.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-draft-cache.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-files.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue_vue_type_style_index_0_scoped_a2a8e01a_lang.css +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/authoring-search.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/signing-mark.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/authoring-search.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/authoring-shortcuts.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/clause-snippets.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/document-outline.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/panel-search.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-layout-presets.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-mark.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/toolbar-overflow.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/components/pro-dynamic-tags/src/index.vue.cjs +1 -1
- package/dist/lib/components/pro-selector/index.cjs +1 -1
- package/dist/lib/components/pro-selector/src/ProUserSelector.cjs +1 -0
- package/dist/lib/components/pro-selector/src/ProUserSelector.vue.cjs +1 -0
- package/dist/lib/components/pro-selector/src/ProUserSelectorDrilldown.cjs +1 -0
- package/dist/lib/components/pro-selector/src/ProUserSelectorDrilldown.vue.cjs +1 -0
- package/dist/lib/components/pro-selector/src/components/user.cjs +1 -1
- package/dist/lib/components/pro-selector/src/types.cjs +1 -1
- package/dist/lib/components/pro-selector/style/index.cjs +1 -1
- package/dist/lib/components/pro-selector-group/index.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/index.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/style/index.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/utils/index.cjs +1 -1
- package/dist/lib/components/role-selector/index.cjs +1 -1
- package/dist/lib/components/role-selector/src/RoleSelector.cjs +1 -0
- package/dist/lib/components/role-selector/src/RoleSelector.vue.cjs +1 -0
- package/dist/lib/components/role-selector/src/style/index.cjs +1 -1
- package/dist/lib/components/role-selector/src/types.cjs +1 -1
- package/dist/lib/components/selector-core/components/DepartmentTree.cjs +1 -0
- package/dist/lib/components/selector-core/components/DepartmentTree.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/EntityRow.cjs +1 -0
- package/dist/lib/components/selector-core/components/EntityRow.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/HighlightText.cjs +1 -0
- package/dist/lib/components/selector-core/components/HighlightText.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/PanelFeedback.cjs +1 -0
- package/dist/lib/components/selector-core/components/PanelFeedback.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/PeoplePane.cjs +1 -0
- package/dist/lib/components/selector-core/components/PeoplePane.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/RolePane.cjs +1 -0
- package/dist/lib/components/selector-core/components/RolePane.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectionSummary.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectionSummary.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectorDialog.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectorDialog.vue.cjs +1 -0
- package/dist/lib/components/selector-core/model.cjs +1 -0
- package/dist/lib/components/selector-core/useSelectorData.cjs +1 -0
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/node_modules/@tiptap/pm/dist/history/index.cjs +1 -0
- package/dist/lib/node_modules/orderedmap/dist/index.cjs +1 -0
- package/dist/lib/node_modules/prosemirror-history/dist/index.cjs +1 -0
- package/dist/lib/node_modules/prosemirror-model/dist/index.cjs +2 -0
- package/dist/lib/node_modules/prosemirror-state/dist/index.cjs +1 -0
- package/dist/lib/node_modules/prosemirror-transform/dist/index.cjs +2 -0
- package/dist/lib/node_modules/rope-sequence/dist/index.cjs +1 -0
- package/dist/theme/dept-selector.css +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-dynamic-tags.css +1 -1
- package/dist/theme/pro-modal.css +1 -1
- package/dist/theme/pro-selector-group.css +1 -1
- package/dist/theme/pro-selector.css +1 -1
- package/dist/theme/role-selector.css +1 -1
- package/dist/theme/selector-core.css +1 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +3 -3
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +2 -2
- package/dist/types/components/dept-selector/index.d.ts +156 -45
- package/dist/types/components/dept-selector/src/{dept.d.ts → DeptSelector.vue.d.ts} +38 -15
- package/dist/types/components/dept-selector/src/types.d.ts +10 -2
- package/dist/types/components/plus-upload/apis/plus-upload.api.d.ts +15 -0
- package/dist/types/components/plus-upload/hook/usePlusUpload.d.ts +1 -1
- package/dist/types/components/plus-upload/index.d.ts +21 -3
- package/dist/types/components/plus-upload/src/plus-upload.vue.d.ts +11 -1
- package/dist/types/components/plus-upload/src/types.d.ts +4 -0
- package/dist/types/components/pro-contract-template-designer/index.d.ts +2 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.d.ts +106 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.d.ts +18 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +5 -42
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.d.ts +9 -11
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +42 -4
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +18 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.d.ts +37 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.d.ts +29 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.d.ts +16 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.d.ts +15 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.d.ts +1 -4
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +1 -2
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.d.ts +1 -29
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.d.ts +14 -0
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +13 -29
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +260 -121
- package/dist/types/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.d.ts +15 -0
- package/dist/types/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.d.ts +19 -0
- package/dist/types/components/pro-contract-template-designer/src/{ContractTemplatePreviewSigningLayer.vue.d.ts → SigningLayoutPreview.vue.d.ts} +2 -3
- package/dist/types/components/pro-contract-template-designer/src/composables/use-designer-files.d.ts +1 -4
- package/dist/types/components/pro-contract-template-designer/src/composables/use-draft-cache-session.d.ts +1 -5
- package/dist/types/components/pro-contract-template-designer/src/composables/use-page-authoring.d.ts +13 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-authoring.d.ts +44 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +4 -20
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +1 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts +1 -2
- package/dist/types/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.d.ts +1 -1
- package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +20 -1
- package/dist/types/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.d.ts +5 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/authoring-search.d.ts +12 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/signing-mark.d.ts +16 -0
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +64 -77
- package/dist/types/components/pro-contract-template-designer/src/utils/authoring-search.d.ts +23 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/authoring-shortcuts.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/clause-snippets.d.ts +10 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/document-outline.d.ts +20 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/panel-search.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-layout-presets.d.ts +49 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-mark.d.ts +57 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/template-tool-icons.d.ts +4 -4
- package/dist/types/components/pro-contract-template-designer/src/utils/toolbar-overflow.d.ts +2 -2
- package/dist/types/components/pro-dynamic-tags/src/index.vue.d.ts +1 -0
- package/dist/types/components/pro-dynamic-tags/src/types.d.ts +9 -0
- package/dist/types/components/pro-menu-tree/index.d.ts +2 -2
- package/dist/types/components/pro-menu-tree/src/pro-menu-tree.d.ts +2 -2
- package/dist/types/components/pro-selector/index.d.ts +851 -13
- package/dist/types/components/pro-selector/src/{pro-user.d.ts → ProUserSelector.vue.d.ts} +50 -12
- package/dist/types/components/pro-selector/src/ProUserSelectorDrilldown.vue.d.ts +447 -0
- package/dist/types/components/pro-selector/src/components/user.d.ts +2 -2
- package/dist/types/components/pro-selector/src/types.d.ts +16 -0
- package/dist/types/components/pro-selector-group/index.d.ts +63 -13
- package/dist/types/components/pro-selector-group/src/index.vue.d.ts +21 -4
- package/dist/types/components/pro-selector-group/src/types.d.ts +6 -0
- package/dist/types/components/pro-selector-group/src/utils/index.d.ts +4 -2
- package/dist/types/components/role-selector/index.d.ts +276 -86
- package/dist/types/components/role-selector/src/{role.d.ts → RoleSelector.vue.d.ts} +37 -13
- package/dist/types/components/role-selector/src/types.d.ts +10 -2
- package/dist/types/components/selector-core/components/DepartmentTree.vue.d.ts +22 -0
- package/dist/types/components/selector-core/components/EntityRow.vue.d.ts +21 -0
- package/dist/types/components/selector-core/components/HighlightText.vue.d.ts +6 -0
- package/dist/types/components/selector-core/components/PanelFeedback.vue.d.ts +28 -0
- package/dist/types/components/selector-core/components/PeoplePane.vue.d.ts +31 -0
- package/dist/types/components/selector-core/components/RolePane.vue.d.ts +19 -0
- package/dist/types/components/selector-core/components/SelectionSummary.vue.d.ts +14 -0
- package/dist/types/components/selector-core/components/SelectorDialog.vue.d.ts +48 -0
- package/dist/types/components/selector-core/model.d.ts +75 -0
- package/dist/types/components/selector-core/useSelectorData.d.ts +104 -0
- package/global.d.ts +4 -0
- package/package.json +5 -3
- package/dist/es/components/dept-selector/src/dept.mjs +0 -294
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.mjs +0 -42
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.mjs +0 -141
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.mjs +0 -151
- package/dist/es/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.mjs +0 -79
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +0 -293
- package/dist/es/components/pro-selector/src/components/org-tree.mjs +0 -223
- package/dist/es/components/pro-selector/src/pro-user.mjs +0 -167
- package/dist/es/components/pro-selector/src/utils/orgTree.mjs +0 -50
- package/dist/es/components/pro-selector-group/src/compoents/dept-tree.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue.mjs +0 -127
- package/dist/es/components/pro-selector-group/src/compoents/dept.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/dept.vue.mjs +0 -52
- package/dist/es/components/pro-selector-group/src/compoents/index.mjs +0 -3
- package/dist/es/components/pro-selector-group/src/compoents/role.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/role.vue.mjs +0 -120
- package/dist/es/components/pro-selector-group/src/compoents/select-box.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/select-box.vue.mjs +0 -59
- package/dist/es/components/pro-selector-group/src/compoents/user.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/user.vue.mjs +0 -154
- package/dist/es/components/pro-selector-group/src/hooks/useApi.mjs +0 -76
- package/dist/es/components/role-selector/src/role.mjs +0 -217
- package/dist/lib/components/dept-selector/src/dept.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-placement.cjs +0 -1
- package/dist/lib/components/pro-selector/src/components/org-tree.cjs +0 -1
- package/dist/lib/components/pro-selector/src/pro-user.cjs +0 -1
- package/dist/lib/components/pro-selector/src/utils/orgTree.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/index.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/role.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/role.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/select-box.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/user.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/user.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/hooks/useApi.cjs +0 -1
- package/dist/lib/components/role-selector/src/role.cjs +0 -1
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts +0 -17
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.d.ts +0 -19
- package/dist/types/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.d.ts +0 -49
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-placement.d.ts +0 -105
- package/dist/types/components/pro-selector/src/components/org-tree.d.ts +0 -45
- package/dist/types/components/pro-selector/src/util.d.ts +0 -26
- package/dist/types/components/pro-selector-group/src/compoents/dept-tree.vue.d.ts +0 -12
- package/dist/types/components/pro-selector-group/src/compoents/dept.vue.d.ts +0 -11
- package/dist/types/components/pro-selector-group/src/compoents/index.d.ts +0 -3
- package/dist/types/components/pro-selector-group/src/compoents/role.vue.d.ts +0 -11
- package/dist/types/components/pro-selector-group/src/compoents/select-box.vue.d.ts +0 -15
- package/dist/types/components/pro-selector-group/src/compoents/user.vue.d.ts +0 -12
- package/dist/types/components/pro-selector-group/src/hooks/useApi.d.ts +0 -112
|
@@ -0,0 +1,1128 @@
|
|
|
1
|
+
import "../../orderedmap/dist/index.mjs";
|
|
2
|
+
//#region ../../node_modules/prosemirror-model/dist/index.js
|
|
3
|
+
function e(t, i, a) {
|
|
4
|
+
for (let o = 0;; o++) {
|
|
5
|
+
if (o == t.childCount || o == i.childCount) return t.childCount == i.childCount ? null : a;
|
|
6
|
+
let s = t.child(o), c = i.child(o);
|
|
7
|
+
if (s == c) {
|
|
8
|
+
a += s.nodeSize;
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
if (!s.sameMarkup(c)) return a;
|
|
12
|
+
if (s.isText && s.text != c.text) {
|
|
13
|
+
let e = s.text, t = c.text, i = 0;
|
|
14
|
+
for (; e[i] == t[i]; i++) a++;
|
|
15
|
+
return i && i < e.length && i < t.length && r(e.charCodeAt(i - 1)) && n(e.charCodeAt(i)) && a--, a;
|
|
16
|
+
}
|
|
17
|
+
if (s.content.size || c.content.size) {
|
|
18
|
+
let t = e(s.content, c.content, a + 1);
|
|
19
|
+
if (t != null) return t;
|
|
20
|
+
}
|
|
21
|
+
a += s.nodeSize;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function t(e, i, a, o) {
|
|
25
|
+
for (let s = e.childCount, c = i.childCount;;) {
|
|
26
|
+
if (s == 0 || c == 0) return s == c ? null : {
|
|
27
|
+
a,
|
|
28
|
+
b: o
|
|
29
|
+
};
|
|
30
|
+
let l = e.child(--s), u = i.child(--c), d = l.nodeSize;
|
|
31
|
+
if (l == u) {
|
|
32
|
+
a -= d, o -= d;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (!l.sameMarkup(u)) return {
|
|
36
|
+
a,
|
|
37
|
+
b: o
|
|
38
|
+
};
|
|
39
|
+
if (l.isText && l.text != u.text) {
|
|
40
|
+
let e = l.text, t = u.text, i = e.length, s = t.length;
|
|
41
|
+
for (; i > 0 && s > 0 && e[i - 1] == t[s - 1];) i--, s--, a--, o--;
|
|
42
|
+
return i && s && i < e.length && r(e.charCodeAt(i - 1)) && n(e.charCodeAt(i)) && (a++, o++), {
|
|
43
|
+
a,
|
|
44
|
+
b: o
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (l.content.size || u.content.size) {
|
|
48
|
+
let e = t(l.content, u.content, a - 1, o - 1);
|
|
49
|
+
if (e) return e;
|
|
50
|
+
}
|
|
51
|
+
a -= d, o -= d;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function n(e) {
|
|
55
|
+
return e >= 56320 && e < 57344;
|
|
56
|
+
}
|
|
57
|
+
function r(e) {
|
|
58
|
+
return e >= 55296 && e < 56320;
|
|
59
|
+
}
|
|
60
|
+
var i = class n {
|
|
61
|
+
constructor(e, t) {
|
|
62
|
+
if (this.content = e, this.size = t || 0, t == null) for (let t = 0; t < e.length; t++) this.size += e[t].nodeSize;
|
|
63
|
+
}
|
|
64
|
+
nodesBetween(e, t, n, r = 0, i) {
|
|
65
|
+
for (let a = 0, o = 0; o < t; a++) {
|
|
66
|
+
let s = this.content[a], c = o + s.nodeSize;
|
|
67
|
+
if (c > e && n(s, r + o, i || null, a) !== !1 && s.content.size) {
|
|
68
|
+
let i = o + 1;
|
|
69
|
+
s.nodesBetween(Math.max(0, e - i), Math.min(s.content.size, t - i), n, r + i);
|
|
70
|
+
}
|
|
71
|
+
o = c;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
descendants(e) {
|
|
75
|
+
this.nodesBetween(0, this.size, e);
|
|
76
|
+
}
|
|
77
|
+
textBetween(e, t, n, r) {
|
|
78
|
+
let i = "", a = !0;
|
|
79
|
+
return this.nodesBetween(e, t, (o, s) => {
|
|
80
|
+
let c = o.isText ? o.text.slice(Math.max(e, s) - s, t - s) : o.isLeaf ? r ? typeof r == "function" ? r(o) : r : o.type.spec.leafText ? o.type.spec.leafText(o) : "" : "";
|
|
81
|
+
o.isBlock && (o.isLeaf && c || o.isTextblock) && n && (a ? a = !1 : i += n), i += c;
|
|
82
|
+
}, 0), i;
|
|
83
|
+
}
|
|
84
|
+
append(e) {
|
|
85
|
+
if (!e.size) return this;
|
|
86
|
+
if (!this.size) return e;
|
|
87
|
+
let t = this.lastChild, r = e.firstChild, i = this.content.slice(), a = 0;
|
|
88
|
+
for (t.isText && t.sameMarkup(r) && (i[i.length - 1] = t.withText(t.text + r.text), a = 1); a < e.content.length; a++) i.push(e.content[a]);
|
|
89
|
+
return new n(i, this.size + e.size);
|
|
90
|
+
}
|
|
91
|
+
cut(e, t = this.size) {
|
|
92
|
+
if (e == 0 && t == this.size) return this;
|
|
93
|
+
let r = [], i = 0;
|
|
94
|
+
if (t > e) for (let n = 0, a = 0; a < t; n++) {
|
|
95
|
+
let o = this.content[n], s = a + o.nodeSize;
|
|
96
|
+
s > e && ((a < e || s > t) && (o = o.isText ? o.cut(Math.max(0, e - a), Math.min(o.text.length, t - a)) : o.cut(Math.max(0, e - a - 1), Math.min(o.content.size, t - a - 1))), r.push(o), i += o.nodeSize), a = s;
|
|
97
|
+
}
|
|
98
|
+
return new n(r, i);
|
|
99
|
+
}
|
|
100
|
+
cutByIndex(e, t) {
|
|
101
|
+
return e == t ? n.empty : e == 0 && t == this.content.length ? this : new n(this.content.slice(e, t));
|
|
102
|
+
}
|
|
103
|
+
replaceChild(e, t) {
|
|
104
|
+
let r = this.content[e];
|
|
105
|
+
if (r == t) return this;
|
|
106
|
+
let i = this.content.slice(), a = this.size + t.nodeSize - r.nodeSize;
|
|
107
|
+
return i[e] = t, new n(i, a);
|
|
108
|
+
}
|
|
109
|
+
addToStart(e) {
|
|
110
|
+
return new n([e].concat(this.content), this.size + e.nodeSize);
|
|
111
|
+
}
|
|
112
|
+
addToEnd(e) {
|
|
113
|
+
return new n(this.content.concat(e), this.size + e.nodeSize);
|
|
114
|
+
}
|
|
115
|
+
eq(e) {
|
|
116
|
+
if (this.content.length != e.content.length) return !1;
|
|
117
|
+
for (let t = 0; t < this.content.length; t++) if (!this.content[t].eq(e.content[t])) return !1;
|
|
118
|
+
return !0;
|
|
119
|
+
}
|
|
120
|
+
get firstChild() {
|
|
121
|
+
return this.content.length ? this.content[0] : null;
|
|
122
|
+
}
|
|
123
|
+
get lastChild() {
|
|
124
|
+
return this.content.length ? this.content[this.content.length - 1] : null;
|
|
125
|
+
}
|
|
126
|
+
get childCount() {
|
|
127
|
+
return this.content.length;
|
|
128
|
+
}
|
|
129
|
+
child(e) {
|
|
130
|
+
let t = this.content[e];
|
|
131
|
+
if (!t) throw RangeError("Index " + e + " out of range for " + this);
|
|
132
|
+
return t;
|
|
133
|
+
}
|
|
134
|
+
maybeChild(e) {
|
|
135
|
+
return this.content[e] || null;
|
|
136
|
+
}
|
|
137
|
+
forEach(e) {
|
|
138
|
+
for (let t = 0, n = 0; t < this.content.length; t++) {
|
|
139
|
+
let r = this.content[t];
|
|
140
|
+
e(r, n, t), n += r.nodeSize;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
findDiffStart(t, n = 0) {
|
|
144
|
+
return e(this, t, n);
|
|
145
|
+
}
|
|
146
|
+
findDiffEnd(e, n = this.size, r = e.size) {
|
|
147
|
+
return t(this, e, n, r);
|
|
148
|
+
}
|
|
149
|
+
findIndex(e) {
|
|
150
|
+
if (e == 0) return o(0, e);
|
|
151
|
+
if (e == this.size) return o(this.content.length, e);
|
|
152
|
+
if (e > this.size || e < 0) throw RangeError(`Position ${e} outside of fragment (${this})`);
|
|
153
|
+
for (let t = 0, n = 0;; t++) {
|
|
154
|
+
let r = this.child(t), i = n + r.nodeSize;
|
|
155
|
+
if (i >= e) return i == e ? o(t + 1, i) : o(t, n);
|
|
156
|
+
n = i;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
toString() {
|
|
160
|
+
return "<" + this.toStringInner() + ">";
|
|
161
|
+
}
|
|
162
|
+
toStringInner() {
|
|
163
|
+
return this.content.join(", ");
|
|
164
|
+
}
|
|
165
|
+
toJSON() {
|
|
166
|
+
return this.content.length ? this.content.map((e) => e.toJSON()) : null;
|
|
167
|
+
}
|
|
168
|
+
static fromJSON(e, t) {
|
|
169
|
+
if (!t) return n.empty;
|
|
170
|
+
if (!Array.isArray(t)) throw RangeError("Invalid input for Fragment.fromJSON");
|
|
171
|
+
return n.fromArray(t.map(e.nodeFromJSON));
|
|
172
|
+
}
|
|
173
|
+
static fromArray(e) {
|
|
174
|
+
if (!e.length) return n.empty;
|
|
175
|
+
let t, r = 0;
|
|
176
|
+
for (let n = 0; n < e.length; n++) {
|
|
177
|
+
let i = e[n];
|
|
178
|
+
r += i.nodeSize, n && i.isText && e[n - 1].sameMarkup(i) ? (t ||= e.slice(0, n), t[t.length - 1] = i.withText(t[t.length - 1].text + i.text)) : t && t.push(i);
|
|
179
|
+
}
|
|
180
|
+
return new n(t || e, r);
|
|
181
|
+
}
|
|
182
|
+
static from(e) {
|
|
183
|
+
if (!e) return n.empty;
|
|
184
|
+
if (e instanceof n) return e;
|
|
185
|
+
if (Array.isArray(e)) return this.fromArray(e);
|
|
186
|
+
if (e.attrs) return new n([e], e.nodeSize);
|
|
187
|
+
throw RangeError("Can not convert " + e + " to a Fragment" + (e.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
i.empty = new i([], 0);
|
|
191
|
+
var a = {
|
|
192
|
+
index: 0,
|
|
193
|
+
offset: 0
|
|
194
|
+
};
|
|
195
|
+
function o(e, t) {
|
|
196
|
+
return a.index = e, a.offset = t, a;
|
|
197
|
+
}
|
|
198
|
+
function s(e, t) {
|
|
199
|
+
if (e === t) return !0;
|
|
200
|
+
if (!(e && typeof e == "object") || !(t && typeof t == "object")) return !1;
|
|
201
|
+
let n = Array.isArray(e);
|
|
202
|
+
if (Array.isArray(t) != n) return !1;
|
|
203
|
+
if (n) {
|
|
204
|
+
if (e.length != t.length) return !1;
|
|
205
|
+
for (let n = 0; n < e.length; n++) if (!s(e[n], t[n])) return !1;
|
|
206
|
+
} else {
|
|
207
|
+
for (let n in e) if (!(n in t) || !s(e[n], t[n])) return !1;
|
|
208
|
+
for (let n in t) if (!(n in e)) return !1;
|
|
209
|
+
}
|
|
210
|
+
return !0;
|
|
211
|
+
}
|
|
212
|
+
var c = class e {
|
|
213
|
+
constructor(e, t) {
|
|
214
|
+
this.type = e, this.attrs = t;
|
|
215
|
+
}
|
|
216
|
+
addToSet(e) {
|
|
217
|
+
let t, n = !1;
|
|
218
|
+
for (let r = 0; r < e.length; r++) {
|
|
219
|
+
let i = e[r];
|
|
220
|
+
if (this.eq(i)) return e;
|
|
221
|
+
if (this.type.excludes(i.type)) t ||= e.slice(0, r);
|
|
222
|
+
else if (i.type.excludes(this.type)) return e;
|
|
223
|
+
else !n && i.type.rank > this.type.rank && (t ||= e.slice(0, r), t.push(this), n = !0), t && t.push(i);
|
|
224
|
+
}
|
|
225
|
+
return t ||= e.slice(), n || t.push(this), t;
|
|
226
|
+
}
|
|
227
|
+
removeFromSet(e) {
|
|
228
|
+
for (let t = 0; t < e.length; t++) if (this.eq(e[t])) return e.slice(0, t).concat(e.slice(t + 1));
|
|
229
|
+
return e;
|
|
230
|
+
}
|
|
231
|
+
isInSet(e) {
|
|
232
|
+
for (let t = 0; t < e.length; t++) if (this.eq(e[t])) return !0;
|
|
233
|
+
return !1;
|
|
234
|
+
}
|
|
235
|
+
eq(e) {
|
|
236
|
+
return this == e || this.type == e.type && s(this.attrs, e.attrs);
|
|
237
|
+
}
|
|
238
|
+
toJSON() {
|
|
239
|
+
let e = { type: this.type.name };
|
|
240
|
+
for (let t in this.attrs) {
|
|
241
|
+
e.attrs = this.attrs;
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
return e;
|
|
245
|
+
}
|
|
246
|
+
static fromJSON(e, t) {
|
|
247
|
+
if (!t) throw RangeError("Invalid input for Mark.fromJSON");
|
|
248
|
+
let n = e.marks[t.type];
|
|
249
|
+
if (!n) throw RangeError(`There is no mark type ${t.type} in this schema`);
|
|
250
|
+
let r = n.create(t.attrs);
|
|
251
|
+
return n.checkAttrs(r.attrs), r;
|
|
252
|
+
}
|
|
253
|
+
static sameSet(e, t) {
|
|
254
|
+
if (e == t) return !0;
|
|
255
|
+
if (e.length != t.length) return !1;
|
|
256
|
+
for (let n = 0; n < e.length; n++) if (!e[n].eq(t[n])) return !1;
|
|
257
|
+
return !0;
|
|
258
|
+
}
|
|
259
|
+
static setFrom(t) {
|
|
260
|
+
if (!t || Array.isArray(t) && t.length == 0) return e.none;
|
|
261
|
+
if (t instanceof e) return [t];
|
|
262
|
+
let n = t.slice();
|
|
263
|
+
return n.sort((e, t) => e.type.rank - t.type.rank), n;
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
c.none = [];
|
|
267
|
+
var l = class extends Error {}, u = class e {
|
|
268
|
+
constructor(e, t, n) {
|
|
269
|
+
this.content = e, this.openStart = t, this.openEnd = n;
|
|
270
|
+
}
|
|
271
|
+
get size() {
|
|
272
|
+
return this.content.size - this.openStart - this.openEnd;
|
|
273
|
+
}
|
|
274
|
+
insertAt(t, n) {
|
|
275
|
+
let r = f(this.content, t + this.openStart, n, this.openStart + 1, this.openEnd + 1);
|
|
276
|
+
return r && new e(r, this.openStart, this.openEnd);
|
|
277
|
+
}
|
|
278
|
+
removeBetween(t, n) {
|
|
279
|
+
return new e(d(this.content, t + this.openStart, n + this.openStart), this.openStart, this.openEnd);
|
|
280
|
+
}
|
|
281
|
+
eq(e) {
|
|
282
|
+
return this.content.eq(e.content) && this.openStart == e.openStart && this.openEnd == e.openEnd;
|
|
283
|
+
}
|
|
284
|
+
toString() {
|
|
285
|
+
return this.content + "(" + this.openStart + "," + this.openEnd + ")";
|
|
286
|
+
}
|
|
287
|
+
toJSON() {
|
|
288
|
+
if (!this.content.size) return null;
|
|
289
|
+
let e = { content: this.content.toJSON() };
|
|
290
|
+
return this.openStart > 0 && (e.openStart = this.openStart), this.openEnd > 0 && (e.openEnd = this.openEnd), e;
|
|
291
|
+
}
|
|
292
|
+
static fromJSON(t, n) {
|
|
293
|
+
if (!n) return e.empty;
|
|
294
|
+
let r = n.openStart || 0, a = n.openEnd || 0;
|
|
295
|
+
if (typeof r != "number" || typeof a != "number") throw RangeError("Invalid input for Slice.fromJSON");
|
|
296
|
+
return new e(i.fromJSON(t, n.content), r, a);
|
|
297
|
+
}
|
|
298
|
+
static maxOpen(t, n = !0) {
|
|
299
|
+
let r = 0, i = 0;
|
|
300
|
+
for (let e = t.firstChild; e && !e.isLeaf && (n || !e.type.spec.isolating); e = e.firstChild) r++;
|
|
301
|
+
for (let e = t.lastChild; e && !e.isLeaf && (n || !e.type.spec.isolating); e = e.lastChild) i++;
|
|
302
|
+
return new e(t, r, i);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
u.empty = new u(i.empty, 0, 0);
|
|
306
|
+
function d(e, t, n) {
|
|
307
|
+
let { index: r, offset: i } = e.findIndex(t), a = e.maybeChild(r), { index: o, offset: s } = e.findIndex(n);
|
|
308
|
+
if (i == t || a.isText) {
|
|
309
|
+
if (s != n && !e.child(o).isText) throw RangeError("Removing non-flat range");
|
|
310
|
+
return e.cut(0, t).append(e.cut(n));
|
|
311
|
+
}
|
|
312
|
+
if (r != o) throw RangeError("Removing non-flat range");
|
|
313
|
+
return e.replaceChild(r, a.copy(d(a.content, t - i - 1, n - i - 1)));
|
|
314
|
+
}
|
|
315
|
+
function f(e, t, n, r, i, a) {
|
|
316
|
+
let { index: o, offset: s } = e.findIndex(t), c = e.maybeChild(o);
|
|
317
|
+
if (s == t || c.isText) return a && r <= 0 && i <= 0 && !a.canReplace(o, o, n) ? null : e.cut(0, t).append(n).append(e.cut(t));
|
|
318
|
+
let l = f(c.content, t - s - 1, n, o == 0 ? r - 1 : 0, o == e.childCount - 1 ? i - 1 : 0, c);
|
|
319
|
+
return l && e.replaceChild(o, c.copy(l));
|
|
320
|
+
}
|
|
321
|
+
function p(e, t, n) {
|
|
322
|
+
if (n.openStart > e.depth) throw new l("Inserted content deeper than insertion position");
|
|
323
|
+
if (e.depth - n.openStart != t.depth - n.openEnd) throw new l("Inconsistent open depths");
|
|
324
|
+
return m(e, t, n, 0);
|
|
325
|
+
}
|
|
326
|
+
function m(e, t, n, r) {
|
|
327
|
+
let i = e.index(r), a = e.node(r);
|
|
328
|
+
if (i == t.index(r) && r < e.depth - n.openStart) {
|
|
329
|
+
let o = m(e, t, n, r + 1);
|
|
330
|
+
return a.copy(a.content.replaceChild(i, o));
|
|
331
|
+
} else if (!n.content.size) return y(a, x(e, t, r));
|
|
332
|
+
else if (!n.openStart && !n.openEnd && e.depth == r && t.depth == r) {
|
|
333
|
+
let r = e.parent, i = r.content;
|
|
334
|
+
return y(r, i.cut(0, e.parentOffset).append(n.content).append(i.cut(t.parentOffset)));
|
|
335
|
+
} else {
|
|
336
|
+
let { start: i, end: o } = S(n, e);
|
|
337
|
+
return y(a, b(e, i, o, t, r));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function h(e, t) {
|
|
341
|
+
if (!t.type.compatibleContent(e.type)) throw new l("Cannot join " + t.type.name + " onto " + e.type.name);
|
|
342
|
+
}
|
|
343
|
+
function g(e, t, n) {
|
|
344
|
+
let r = e.node(n);
|
|
345
|
+
return h(r, t.node(n)), r;
|
|
346
|
+
}
|
|
347
|
+
function _(e, t) {
|
|
348
|
+
let n = t.length - 1;
|
|
349
|
+
n >= 0 && e.isText && e.sameMarkup(t[n]) ? t[n] = e.withText(t[n].text + e.text) : t.push(e);
|
|
350
|
+
}
|
|
351
|
+
function v(e, t, n, r) {
|
|
352
|
+
let i = (t || e).node(n), a = 0, o = t ? t.index(n) : i.childCount;
|
|
353
|
+
e && (a = e.index(n), e.depth > n ? a++ : e.textOffset && (_(e.nodeAfter, r), a++));
|
|
354
|
+
for (let e = a; e < o; e++) _(i.child(e), r);
|
|
355
|
+
t && t.depth == n && t.textOffset && _(t.nodeBefore, r);
|
|
356
|
+
}
|
|
357
|
+
function y(e, t) {
|
|
358
|
+
if (!e.type.validContent(t)) throw new l("Invalid content for node " + e.type.name);
|
|
359
|
+
return e.copy(t);
|
|
360
|
+
}
|
|
361
|
+
function b(e, t, n, r, a) {
|
|
362
|
+
let o = e.depth > a && g(e, t, a + 1), s = r.depth > a && g(n, r, a + 1), c = [];
|
|
363
|
+
return v(null, e, a, c), o && s && t.index(a) == n.index(a) ? (h(o, s), _(y(o, b(e, t, n, r, a + 1)), c)) : (o && _(y(o, x(e, t, a + 1)), c), v(t, n, a, c), s && _(y(s, x(n, r, a + 1)), c)), v(r, null, a, c), new i(c);
|
|
364
|
+
}
|
|
365
|
+
function x(e, t, n) {
|
|
366
|
+
let r = [];
|
|
367
|
+
return v(null, e, n, r), e.depth > n && _(y(g(e, t, n + 1), x(e, t, n + 1)), r), v(t, null, n, r), new i(r);
|
|
368
|
+
}
|
|
369
|
+
function S(e, t) {
|
|
370
|
+
let n = t.depth - e.openStart, r = t.node(n).copy(e.content);
|
|
371
|
+
for (let e = n - 1; e >= 0; e--) r = t.node(e).copy(i.from(r));
|
|
372
|
+
return {
|
|
373
|
+
start: r.resolveNoCache(e.openStart + n),
|
|
374
|
+
end: r.resolveNoCache(r.content.size - e.openEnd - n)
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
var C = class e {
|
|
378
|
+
constructor(e, t, n) {
|
|
379
|
+
this.pos = e, this.path = t, this.parentOffset = n, this.depth = t.length / 3 - 1;
|
|
380
|
+
}
|
|
381
|
+
resolveDepth(e) {
|
|
382
|
+
return e == null ? this.depth : e < 0 ? this.depth + e : e;
|
|
383
|
+
}
|
|
384
|
+
get parent() {
|
|
385
|
+
return this.node(this.depth);
|
|
386
|
+
}
|
|
387
|
+
get doc() {
|
|
388
|
+
return this.node(0);
|
|
389
|
+
}
|
|
390
|
+
node(e) {
|
|
391
|
+
return this.path[this.resolveDepth(e) * 3];
|
|
392
|
+
}
|
|
393
|
+
index(e) {
|
|
394
|
+
return this.path[this.resolveDepth(e) * 3 + 1];
|
|
395
|
+
}
|
|
396
|
+
indexAfter(e) {
|
|
397
|
+
return e = this.resolveDepth(e), this.index(e) + (e == this.depth && !this.textOffset ? 0 : 1);
|
|
398
|
+
}
|
|
399
|
+
start(e) {
|
|
400
|
+
return e = this.resolveDepth(e), e == 0 ? 0 : this.path[e * 3 - 1] + 1;
|
|
401
|
+
}
|
|
402
|
+
end(e) {
|
|
403
|
+
return e = this.resolveDepth(e), this.start(e) + this.node(e).content.size;
|
|
404
|
+
}
|
|
405
|
+
before(e) {
|
|
406
|
+
if (e = this.resolveDepth(e), !e) throw RangeError("There is no position before the top-level node");
|
|
407
|
+
return e == this.depth + 1 ? this.pos : this.path[e * 3 - 1];
|
|
408
|
+
}
|
|
409
|
+
after(e) {
|
|
410
|
+
if (e = this.resolveDepth(e), !e) throw RangeError("There is no position after the top-level node");
|
|
411
|
+
return e == this.depth + 1 ? this.pos : this.path[e * 3 - 1] + this.path[e * 3].nodeSize;
|
|
412
|
+
}
|
|
413
|
+
get textOffset() {
|
|
414
|
+
return this.pos - this.path[this.path.length - 1];
|
|
415
|
+
}
|
|
416
|
+
get nodeAfter() {
|
|
417
|
+
let e = this.parent, t = this.index(this.depth);
|
|
418
|
+
if (t == e.childCount) return null;
|
|
419
|
+
let n = this.pos - this.path[this.path.length - 1], r = e.child(t);
|
|
420
|
+
return n ? e.child(t).cut(n) : r;
|
|
421
|
+
}
|
|
422
|
+
get nodeBefore() {
|
|
423
|
+
let e = this.index(this.depth), t = this.pos - this.path[this.path.length - 1];
|
|
424
|
+
return t ? this.parent.child(e).cut(0, t) : e == 0 ? null : this.parent.child(e - 1);
|
|
425
|
+
}
|
|
426
|
+
posAtIndex(e, t) {
|
|
427
|
+
t = this.resolveDepth(t);
|
|
428
|
+
let n = this.path[t * 3], r = t == 0 ? 0 : this.path[t * 3 - 1] + 1;
|
|
429
|
+
for (let t = 0; t < e; t++) r += n.child(t).nodeSize;
|
|
430
|
+
return r;
|
|
431
|
+
}
|
|
432
|
+
marks() {
|
|
433
|
+
let e = this.parent, t = this.index();
|
|
434
|
+
if (e.content.size == 0) return c.none;
|
|
435
|
+
if (this.textOffset) return e.child(t).marks;
|
|
436
|
+
let n = e.maybeChild(t - 1), r = e.maybeChild(t);
|
|
437
|
+
if (!n) {
|
|
438
|
+
let e = n;
|
|
439
|
+
n = r, r = e;
|
|
440
|
+
}
|
|
441
|
+
let i = n.marks;
|
|
442
|
+
for (var a = 0; a < i.length; a++) i[a].type.spec.inclusive === !1 && (!r || !i[a].isInSet(r.marks)) && (i = i[a--].removeFromSet(i));
|
|
443
|
+
return i;
|
|
444
|
+
}
|
|
445
|
+
marksAcross(e) {
|
|
446
|
+
let t = this.parent.maybeChild(this.index());
|
|
447
|
+
if (!t || !t.isInline) return null;
|
|
448
|
+
let n = t.marks, r = e.parent.maybeChild(e.index());
|
|
449
|
+
for (var i = 0; i < n.length; i++) n[i].type.spec.inclusive === !1 && (!r || !n[i].isInSet(r.marks)) && (n = n[i--].removeFromSet(n));
|
|
450
|
+
return n;
|
|
451
|
+
}
|
|
452
|
+
sharedDepth(e) {
|
|
453
|
+
for (let t = this.depth; t > 0; t--) if (this.start(t) <= e && this.end(t) >= e) return t;
|
|
454
|
+
return 0;
|
|
455
|
+
}
|
|
456
|
+
blockRange(e = this, t) {
|
|
457
|
+
if (e.pos < this.pos) return e.blockRange(this);
|
|
458
|
+
for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--) if (e.pos <= this.end(n) && (!t || t(this.node(n)))) return new D(this, e, n);
|
|
459
|
+
return null;
|
|
460
|
+
}
|
|
461
|
+
sameParent(e) {
|
|
462
|
+
return this.pos - this.parentOffset == e.pos - e.parentOffset;
|
|
463
|
+
}
|
|
464
|
+
max(e) {
|
|
465
|
+
return e.pos > this.pos ? e : this;
|
|
466
|
+
}
|
|
467
|
+
min(e) {
|
|
468
|
+
return e.pos < this.pos ? e : this;
|
|
469
|
+
}
|
|
470
|
+
toString() {
|
|
471
|
+
let e = "";
|
|
472
|
+
for (let t = 1; t <= this.depth; t++) e += (e ? "/" : "") + this.node(t).type.name + "_" + this.index(t - 1);
|
|
473
|
+
return e + ":" + this.parentOffset;
|
|
474
|
+
}
|
|
475
|
+
static resolve(t, n) {
|
|
476
|
+
if (!(n >= 0 && n <= t.content.size)) throw RangeError("Position " + n + " out of range");
|
|
477
|
+
let r = [], i = 0, a = n;
|
|
478
|
+
for (let e = t;;) {
|
|
479
|
+
let { index: t, offset: n } = e.content.findIndex(a), o = a - n;
|
|
480
|
+
if (r.push(e, t, i + n), !o || (e = e.child(t), e.isText)) break;
|
|
481
|
+
a = o - 1, i += n + 1;
|
|
482
|
+
}
|
|
483
|
+
return new e(n, r, a);
|
|
484
|
+
}
|
|
485
|
+
static resolveCached(t, n) {
|
|
486
|
+
let r = E.get(t);
|
|
487
|
+
if (r) for (let e = 0; e < r.elts.length; e++) {
|
|
488
|
+
let t = r.elts[e];
|
|
489
|
+
if (t.pos == n) return t;
|
|
490
|
+
}
|
|
491
|
+
else E.set(t, r = new w());
|
|
492
|
+
let i = r.elts[r.i] = e.resolve(t, n);
|
|
493
|
+
return r.i = (r.i + 1) % T, i;
|
|
494
|
+
}
|
|
495
|
+
}, w = class {
|
|
496
|
+
constructor() {
|
|
497
|
+
this.elts = [], this.i = 0;
|
|
498
|
+
}
|
|
499
|
+
}, T = 12, E = /* @__PURE__ */ new WeakMap(), D = class {
|
|
500
|
+
constructor(e, t, n) {
|
|
501
|
+
this.$from = e, this.$to = t, this.depth = n;
|
|
502
|
+
}
|
|
503
|
+
get start() {
|
|
504
|
+
return this.$from.before(this.depth + 1);
|
|
505
|
+
}
|
|
506
|
+
get end() {
|
|
507
|
+
return this.$to.after(this.depth + 1);
|
|
508
|
+
}
|
|
509
|
+
get parent() {
|
|
510
|
+
return this.$from.node(this.depth);
|
|
511
|
+
}
|
|
512
|
+
get startIndex() {
|
|
513
|
+
return this.$from.index(this.depth);
|
|
514
|
+
}
|
|
515
|
+
get endIndex() {
|
|
516
|
+
return this.$to.indexAfter(this.depth);
|
|
517
|
+
}
|
|
518
|
+
}, O = Object.create(null), k = class e {
|
|
519
|
+
constructor(e, t, n, r = c.none) {
|
|
520
|
+
this.type = e, this.attrs = t, this.marks = r, this.content = n || i.empty;
|
|
521
|
+
}
|
|
522
|
+
get children() {
|
|
523
|
+
return this.content.content;
|
|
524
|
+
}
|
|
525
|
+
get nodeSize() {
|
|
526
|
+
return this.isLeaf ? 1 : 2 + this.content.size;
|
|
527
|
+
}
|
|
528
|
+
get childCount() {
|
|
529
|
+
return this.content.childCount;
|
|
530
|
+
}
|
|
531
|
+
child(e) {
|
|
532
|
+
return this.content.child(e);
|
|
533
|
+
}
|
|
534
|
+
maybeChild(e) {
|
|
535
|
+
return this.content.maybeChild(e);
|
|
536
|
+
}
|
|
537
|
+
forEach(e) {
|
|
538
|
+
this.content.forEach(e);
|
|
539
|
+
}
|
|
540
|
+
nodesBetween(e, t, n, r = 0) {
|
|
541
|
+
this.content.nodesBetween(e, t, n, r, this);
|
|
542
|
+
}
|
|
543
|
+
descendants(e) {
|
|
544
|
+
this.nodesBetween(0, this.content.size, e);
|
|
545
|
+
}
|
|
546
|
+
get textContent() {
|
|
547
|
+
return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, "");
|
|
548
|
+
}
|
|
549
|
+
textBetween(e, t, n, r) {
|
|
550
|
+
return this.content.textBetween(e, t, n, r);
|
|
551
|
+
}
|
|
552
|
+
get firstChild() {
|
|
553
|
+
return this.content.firstChild;
|
|
554
|
+
}
|
|
555
|
+
get lastChild() {
|
|
556
|
+
return this.content.lastChild;
|
|
557
|
+
}
|
|
558
|
+
eq(e) {
|
|
559
|
+
return this == e || this.sameMarkup(e) && this.content.eq(e.content);
|
|
560
|
+
}
|
|
561
|
+
sameMarkup(e) {
|
|
562
|
+
return this.hasMarkup(e.type, e.attrs, e.marks);
|
|
563
|
+
}
|
|
564
|
+
hasMarkup(e, t, n) {
|
|
565
|
+
return this.type == e && s(this.attrs, t || e.defaultAttrs || O) && c.sameSet(this.marks, n || c.none);
|
|
566
|
+
}
|
|
567
|
+
copy(t = null) {
|
|
568
|
+
return t == this.content ? this : new e(this.type, this.attrs, t, this.marks);
|
|
569
|
+
}
|
|
570
|
+
mark(t) {
|
|
571
|
+
return t == this.marks ? this : new e(this.type, this.attrs, this.content, t);
|
|
572
|
+
}
|
|
573
|
+
cut(e, t = this.content.size) {
|
|
574
|
+
return e == 0 && t == this.content.size ? this : this.copy(this.content.cut(e, t));
|
|
575
|
+
}
|
|
576
|
+
slice(e, t = this.content.size, n = !1) {
|
|
577
|
+
if (e == t) return u.empty;
|
|
578
|
+
let r = this.resolve(e), i = this.resolve(t), a = n ? 0 : r.sharedDepth(t), o = r.start(a);
|
|
579
|
+
return new u(r.node(a).content.cut(r.pos - o, i.pos - o), r.depth - a, i.depth - a);
|
|
580
|
+
}
|
|
581
|
+
replace(e, t, n) {
|
|
582
|
+
return p(this.resolve(e), this.resolve(t), n);
|
|
583
|
+
}
|
|
584
|
+
nodeAt(e) {
|
|
585
|
+
for (let t = this;;) {
|
|
586
|
+
let { index: n, offset: r } = t.content.findIndex(e);
|
|
587
|
+
if (t = t.maybeChild(n), !t) return null;
|
|
588
|
+
if (r == e || t.isText) return t;
|
|
589
|
+
e -= r + 1;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
childAfter(e) {
|
|
593
|
+
let { index: t, offset: n } = this.content.findIndex(e);
|
|
594
|
+
return {
|
|
595
|
+
node: this.content.maybeChild(t),
|
|
596
|
+
index: t,
|
|
597
|
+
offset: n
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
childBefore(e) {
|
|
601
|
+
if (e == 0) return {
|
|
602
|
+
node: null,
|
|
603
|
+
index: 0,
|
|
604
|
+
offset: 0
|
|
605
|
+
};
|
|
606
|
+
let { index: t, offset: n } = this.content.findIndex(e);
|
|
607
|
+
if (n < e) return {
|
|
608
|
+
node: this.content.child(t),
|
|
609
|
+
index: t,
|
|
610
|
+
offset: n
|
|
611
|
+
};
|
|
612
|
+
let r = this.content.child(t - 1);
|
|
613
|
+
return {
|
|
614
|
+
node: r,
|
|
615
|
+
index: t - 1,
|
|
616
|
+
offset: n - r.nodeSize
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
resolve(e) {
|
|
620
|
+
return C.resolveCached(this, e);
|
|
621
|
+
}
|
|
622
|
+
resolveNoCache(e) {
|
|
623
|
+
return C.resolve(this, e);
|
|
624
|
+
}
|
|
625
|
+
rangeHasMark(e, t, n) {
|
|
626
|
+
let r = !1;
|
|
627
|
+
return t > e && this.nodesBetween(e, t, (e) => (n.isInSet(e.marks) && (r = !0), !r)), r;
|
|
628
|
+
}
|
|
629
|
+
get isBlock() {
|
|
630
|
+
return this.type.isBlock;
|
|
631
|
+
}
|
|
632
|
+
get isTextblock() {
|
|
633
|
+
return this.type.isTextblock;
|
|
634
|
+
}
|
|
635
|
+
get inlineContent() {
|
|
636
|
+
return this.type.inlineContent;
|
|
637
|
+
}
|
|
638
|
+
get isInline() {
|
|
639
|
+
return this.type.isInline;
|
|
640
|
+
}
|
|
641
|
+
get isText() {
|
|
642
|
+
return this.type.isText;
|
|
643
|
+
}
|
|
644
|
+
get isLeaf() {
|
|
645
|
+
return this.type.isLeaf;
|
|
646
|
+
}
|
|
647
|
+
get isAtom() {
|
|
648
|
+
return this.type.isAtom;
|
|
649
|
+
}
|
|
650
|
+
toString() {
|
|
651
|
+
if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this);
|
|
652
|
+
let e = this.type.name;
|
|
653
|
+
return this.content.size && (e += "(" + this.content.toStringInner() + ")"), A(this.marks, e);
|
|
654
|
+
}
|
|
655
|
+
contentMatchAt(e) {
|
|
656
|
+
let t = this.type.contentMatch.matchFragment(this.content, 0, e);
|
|
657
|
+
if (!t) throw Error("Called contentMatchAt on a node with invalid content");
|
|
658
|
+
return t;
|
|
659
|
+
}
|
|
660
|
+
canReplace(e, t, n = i.empty, r = 0, a = n.childCount) {
|
|
661
|
+
let o = this.contentMatchAt(e).matchFragment(n, r, a), s = o && o.matchFragment(this.content, t);
|
|
662
|
+
if (!s || !s.validEnd) return !1;
|
|
663
|
+
for (let e = r; e < a; e++) if (!this.type.allowsMarks(n.child(e).marks)) return !1;
|
|
664
|
+
return !0;
|
|
665
|
+
}
|
|
666
|
+
canReplaceWith(e, t, n, r) {
|
|
667
|
+
if (r && !this.type.allowsMarks(r)) return !1;
|
|
668
|
+
let i = this.contentMatchAt(e).matchType(n), a = i && i.matchFragment(this.content, t);
|
|
669
|
+
return a ? a.validEnd : !1;
|
|
670
|
+
}
|
|
671
|
+
canAppend(e) {
|
|
672
|
+
return e.content.size ? this.canReplace(this.childCount, this.childCount, e.content) : this.type.compatibleContent(e.type);
|
|
673
|
+
}
|
|
674
|
+
check() {
|
|
675
|
+
this.type.checkContent(this.content), this.type.checkAttrs(this.attrs);
|
|
676
|
+
let e = c.none;
|
|
677
|
+
for (let t = 0; t < this.marks.length; t++) {
|
|
678
|
+
let n = this.marks[t];
|
|
679
|
+
n.type.checkAttrs(n.attrs), e = n.addToSet(e);
|
|
680
|
+
}
|
|
681
|
+
if (!c.sameSet(e, this.marks)) throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e) => e.type.name)}`);
|
|
682
|
+
this.content.forEach((e) => e.check());
|
|
683
|
+
}
|
|
684
|
+
toJSON() {
|
|
685
|
+
let e = { type: this.type.name };
|
|
686
|
+
for (let t in this.attrs) {
|
|
687
|
+
e.attrs = this.attrs;
|
|
688
|
+
break;
|
|
689
|
+
}
|
|
690
|
+
return this.content.size && (e.content = this.content.toJSON()), this.marks.length && (e.marks = this.marks.map((e) => e.toJSON())), e;
|
|
691
|
+
}
|
|
692
|
+
static fromJSON(e, t) {
|
|
693
|
+
if (!t) throw RangeError("Invalid input for Node.fromJSON");
|
|
694
|
+
let n;
|
|
695
|
+
if (t.marks) {
|
|
696
|
+
if (!Array.isArray(t.marks)) throw RangeError("Invalid mark data for Node.fromJSON");
|
|
697
|
+
n = t.marks.map(e.markFromJSON);
|
|
698
|
+
}
|
|
699
|
+
if (t.type == "text") {
|
|
700
|
+
if (typeof t.text != "string") throw RangeError("Invalid text node in JSON");
|
|
701
|
+
return e.text(t.text, n);
|
|
702
|
+
}
|
|
703
|
+
let r = i.fromJSON(e, t.content), a = e.nodeType(t.type).create(t.attrs, r, n);
|
|
704
|
+
return a.type.checkAttrs(a.attrs), a;
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
k.prototype.text = void 0;
|
|
708
|
+
function A(e, t) {
|
|
709
|
+
for (let n = e.length - 1; n >= 0; n--) t = e[n].type.name + "(" + t + ")";
|
|
710
|
+
return t;
|
|
711
|
+
}
|
|
712
|
+
var j = class e {
|
|
713
|
+
constructor(e) {
|
|
714
|
+
this.validEnd = e, this.next = [], this.wrapCache = [];
|
|
715
|
+
}
|
|
716
|
+
static parse(t, n) {
|
|
717
|
+
let r = new M(t, n);
|
|
718
|
+
if (r.next == null) return e.empty;
|
|
719
|
+
let i = N(r);
|
|
720
|
+
r.next && r.err("Unexpected trailing text");
|
|
721
|
+
let a = U(B(i));
|
|
722
|
+
return W(a, r), a;
|
|
723
|
+
}
|
|
724
|
+
matchType(e) {
|
|
725
|
+
for (let t = 0; t < this.next.length; t++) if (this.next[t].type == e) return this.next[t].next;
|
|
726
|
+
return null;
|
|
727
|
+
}
|
|
728
|
+
matchFragment(e, t = 0, n = e.childCount) {
|
|
729
|
+
let r = this;
|
|
730
|
+
for (let i = t; r && i < n; i++) r = r.matchType(e.child(i).type);
|
|
731
|
+
return r;
|
|
732
|
+
}
|
|
733
|
+
get inlineContent() {
|
|
734
|
+
return this.next.length != 0 && this.next[0].type.isInline;
|
|
735
|
+
}
|
|
736
|
+
get defaultType() {
|
|
737
|
+
for (let e = 0; e < this.next.length; e++) {
|
|
738
|
+
let { type: t } = this.next[e];
|
|
739
|
+
if (!(t.isText || t.hasRequiredAttrs())) return t;
|
|
740
|
+
}
|
|
741
|
+
return null;
|
|
742
|
+
}
|
|
743
|
+
compatible(e) {
|
|
744
|
+
for (let t = 0; t < this.next.length; t++) for (let n = 0; n < e.next.length; n++) if (this.next[t].type == e.next[n].type) return !0;
|
|
745
|
+
return !1;
|
|
746
|
+
}
|
|
747
|
+
fillBefore(e, t = !1, n = 0) {
|
|
748
|
+
let r = [this];
|
|
749
|
+
function a(o, s) {
|
|
750
|
+
let c = o.matchFragment(e, n);
|
|
751
|
+
if (c && (!t || c.validEnd)) return i.from(s.map((e) => e.createAndFill()));
|
|
752
|
+
for (let e = 0; e < o.next.length; e++) {
|
|
753
|
+
let { type: t, next: n } = o.next[e];
|
|
754
|
+
if (!(t.isText || t.hasRequiredAttrs()) && r.indexOf(n) == -1) {
|
|
755
|
+
r.push(n);
|
|
756
|
+
let e = a(n, s.concat(t));
|
|
757
|
+
if (e) return e;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
return null;
|
|
761
|
+
}
|
|
762
|
+
return a(this, []);
|
|
763
|
+
}
|
|
764
|
+
findWrapping(e) {
|
|
765
|
+
for (let t = 0; t < this.wrapCache.length; t += 2) if (this.wrapCache[t] == e) return this.wrapCache[t + 1];
|
|
766
|
+
let t = this.computeWrapping(e);
|
|
767
|
+
return this.wrapCache.push(e, t), t;
|
|
768
|
+
}
|
|
769
|
+
computeWrapping(e) {
|
|
770
|
+
let t = Object.create(null), n = [{
|
|
771
|
+
match: this,
|
|
772
|
+
type: null,
|
|
773
|
+
via: null
|
|
774
|
+
}];
|
|
775
|
+
for (; n.length;) {
|
|
776
|
+
let r = n.shift(), i = r.match;
|
|
777
|
+
if (i.matchType(e)) {
|
|
778
|
+
let e = [];
|
|
779
|
+
for (let t = r; t.type; t = t.via) e.push(t.type);
|
|
780
|
+
return e.reverse();
|
|
781
|
+
}
|
|
782
|
+
for (let e = 0; e < i.next.length; e++) {
|
|
783
|
+
let { type: a, next: o } = i.next[e];
|
|
784
|
+
!a.isLeaf && !a.hasRequiredAttrs() && !(a.name in t) && (!r.type || o.validEnd) && (n.push({
|
|
785
|
+
match: a.contentMatch,
|
|
786
|
+
type: a,
|
|
787
|
+
via: r
|
|
788
|
+
}), t[a.name] = !0);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
return null;
|
|
792
|
+
}
|
|
793
|
+
get edgeCount() {
|
|
794
|
+
return this.next.length;
|
|
795
|
+
}
|
|
796
|
+
edge(e) {
|
|
797
|
+
if (e >= this.next.length) throw RangeError(`There's no ${e}th edge in this content match`);
|
|
798
|
+
return this.next[e];
|
|
799
|
+
}
|
|
800
|
+
toString() {
|
|
801
|
+
let e = [];
|
|
802
|
+
function t(n) {
|
|
803
|
+
e.push(n);
|
|
804
|
+
for (let r = 0; r < n.next.length; r++) e.indexOf(n.next[r].next) == -1 && t(n.next[r].next);
|
|
805
|
+
}
|
|
806
|
+
return t(this), e.map((t, n) => {
|
|
807
|
+
let r = n + (t.validEnd ? "*" : " ") + " ";
|
|
808
|
+
for (let n = 0; n < t.next.length; n++) r += (n ? ", " : "") + t.next[n].type.name + "->" + e.indexOf(t.next[n].next);
|
|
809
|
+
return r;
|
|
810
|
+
}).join("\n");
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
j.empty = new j(!0);
|
|
814
|
+
var M = class {
|
|
815
|
+
constructor(e, t) {
|
|
816
|
+
this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
817
|
+
}
|
|
818
|
+
get next() {
|
|
819
|
+
return this.tokens[this.pos];
|
|
820
|
+
}
|
|
821
|
+
eat(e) {
|
|
822
|
+
return this.next == e && (this.pos++ || !0);
|
|
823
|
+
}
|
|
824
|
+
err(e) {
|
|
825
|
+
throw SyntaxError(e + " (in content expression '" + this.string + "')");
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
function N(e) {
|
|
829
|
+
let t = [];
|
|
830
|
+
do
|
|
831
|
+
t.push(P(e));
|
|
832
|
+
while (e.eat("|"));
|
|
833
|
+
return t.length == 1 ? t[0] : {
|
|
834
|
+
type: "choice",
|
|
835
|
+
exprs: t
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
function P(e) {
|
|
839
|
+
let t = [];
|
|
840
|
+
do
|
|
841
|
+
t.push(F(e));
|
|
842
|
+
while (e.next && e.next != ")" && e.next != "|");
|
|
843
|
+
return t.length == 1 ? t[0] : {
|
|
844
|
+
type: "seq",
|
|
845
|
+
exprs: t
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
function F(e) {
|
|
849
|
+
let t = z(e);
|
|
850
|
+
for (;;) if (e.eat("+")) t = {
|
|
851
|
+
type: "plus",
|
|
852
|
+
expr: t
|
|
853
|
+
};
|
|
854
|
+
else if (e.eat("*")) t = {
|
|
855
|
+
type: "star",
|
|
856
|
+
expr: t
|
|
857
|
+
};
|
|
858
|
+
else if (e.eat("?")) t = {
|
|
859
|
+
type: "opt",
|
|
860
|
+
expr: t
|
|
861
|
+
};
|
|
862
|
+
else if (e.eat("{")) t = L(e, t);
|
|
863
|
+
else break;
|
|
864
|
+
return t;
|
|
865
|
+
}
|
|
866
|
+
function I(e) {
|
|
867
|
+
/\D/.test(e.next) && e.err("Expected number, got '" + e.next + "'");
|
|
868
|
+
let t = Number(e.next);
|
|
869
|
+
return e.pos++, t;
|
|
870
|
+
}
|
|
871
|
+
function L(e, t) {
|
|
872
|
+
let n = I(e), r = n;
|
|
873
|
+
return e.eat(",") && (r = e.next == "}" ? -1 : I(e)), e.eat("}") || e.err("Unclosed braced range"), {
|
|
874
|
+
type: "range",
|
|
875
|
+
min: n,
|
|
876
|
+
max: r,
|
|
877
|
+
expr: t
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
function R(e, t) {
|
|
881
|
+
let n = e.nodeTypes, r = n[t];
|
|
882
|
+
if (r) return [r];
|
|
883
|
+
let i = [];
|
|
884
|
+
for (let e in n) {
|
|
885
|
+
let r = n[e];
|
|
886
|
+
r.isInGroup(t) && i.push(r);
|
|
887
|
+
}
|
|
888
|
+
return i.length == 0 && e.err("No node type or group '" + t + "' found"), i;
|
|
889
|
+
}
|
|
890
|
+
function z(e) {
|
|
891
|
+
if (e.eat("(")) {
|
|
892
|
+
let t = N(e);
|
|
893
|
+
return e.eat(")") || e.err("Missing closing paren"), t;
|
|
894
|
+
} else if (/\W/.test(e.next)) e.err("Unexpected token '" + e.next + "'");
|
|
895
|
+
else {
|
|
896
|
+
let t = R(e, e.next).map((t) => (e.inline == null ? e.inline = t.isInline : e.inline != t.isInline && e.err("Mixing inline and block content"), {
|
|
897
|
+
type: "name",
|
|
898
|
+
value: t
|
|
899
|
+
}));
|
|
900
|
+
return e.pos++, t.length == 1 ? t[0] : {
|
|
901
|
+
type: "choice",
|
|
902
|
+
exprs: t
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
function B(e) {
|
|
907
|
+
let t = [[]];
|
|
908
|
+
return i(a(e, 0), n()), t;
|
|
909
|
+
function n() {
|
|
910
|
+
return t.push([]) - 1;
|
|
911
|
+
}
|
|
912
|
+
function r(e, n, r) {
|
|
913
|
+
let i = {
|
|
914
|
+
term: r,
|
|
915
|
+
to: n
|
|
916
|
+
};
|
|
917
|
+
return t[e].push(i), i;
|
|
918
|
+
}
|
|
919
|
+
function i(e, t) {
|
|
920
|
+
e.forEach((e) => e.to = t);
|
|
921
|
+
}
|
|
922
|
+
function a(e, t) {
|
|
923
|
+
if (e.type == "choice") return e.exprs.reduce((e, n) => e.concat(a(n, t)), []);
|
|
924
|
+
if (e.type == "seq") for (let r = 0;; r++) {
|
|
925
|
+
let o = a(e.exprs[r], t);
|
|
926
|
+
if (r == e.exprs.length - 1) return o;
|
|
927
|
+
i(o, t = n());
|
|
928
|
+
}
|
|
929
|
+
else if (e.type == "star") {
|
|
930
|
+
let o = n();
|
|
931
|
+
return r(t, o), i(a(e.expr, o), o), [r(o)];
|
|
932
|
+
} else if (e.type == "plus") {
|
|
933
|
+
let o = n();
|
|
934
|
+
return i(a(e.expr, t), o), i(a(e.expr, o), o), [r(o)];
|
|
935
|
+
} else if (e.type == "opt") return [r(t)].concat(a(e.expr, t));
|
|
936
|
+
else if (e.type == "range") {
|
|
937
|
+
let o = t;
|
|
938
|
+
for (let t = 0; t < e.min; t++) {
|
|
939
|
+
let t = n();
|
|
940
|
+
i(a(e.expr, o), t), o = t;
|
|
941
|
+
}
|
|
942
|
+
if (e.max == -1) i(a(e.expr, o), o);
|
|
943
|
+
else for (let t = e.min; t < e.max; t++) {
|
|
944
|
+
let t = n();
|
|
945
|
+
r(o, t), i(a(e.expr, o), t), o = t;
|
|
946
|
+
}
|
|
947
|
+
return [r(o)];
|
|
948
|
+
} else if (e.type == "name") return [r(t, void 0, e.value)];
|
|
949
|
+
else throw Error("Unknown expr type");
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
function V(e, t) {
|
|
953
|
+
return t - e;
|
|
954
|
+
}
|
|
955
|
+
function H(e, t) {
|
|
956
|
+
let n = [];
|
|
957
|
+
return r(t), n.sort(V);
|
|
958
|
+
function r(t) {
|
|
959
|
+
let i = e[t];
|
|
960
|
+
if (i.length == 1 && !i[0].term) return r(i[0].to);
|
|
961
|
+
n.push(t);
|
|
962
|
+
for (let e = 0; e < i.length; e++) {
|
|
963
|
+
let { term: t, to: a } = i[e];
|
|
964
|
+
!t && n.indexOf(a) == -1 && r(a);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
function U(e) {
|
|
969
|
+
let t = Object.create(null);
|
|
970
|
+
return n(H(e, 0));
|
|
971
|
+
function n(r) {
|
|
972
|
+
let i = [];
|
|
973
|
+
r.forEach((t) => {
|
|
974
|
+
e[t].forEach(({ term: t, to: n }) => {
|
|
975
|
+
if (!t) return;
|
|
976
|
+
let r;
|
|
977
|
+
for (let e = 0; e < i.length; e++) i[e][0] == t && (r = i[e][1]);
|
|
978
|
+
H(e, n).forEach((e) => {
|
|
979
|
+
r || i.push([t, r = []]), r.indexOf(e) == -1 && r.push(e);
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
});
|
|
983
|
+
let a = t[r.join(",")] = new j(r.indexOf(e.length - 1) > -1);
|
|
984
|
+
for (let e = 0; e < i.length; e++) {
|
|
985
|
+
let r = i[e][1].sort(V);
|
|
986
|
+
a.next.push({
|
|
987
|
+
type: i[e][0],
|
|
988
|
+
next: t[r.join(",")] || n(r)
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
return a;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
function W(e, t) {
|
|
995
|
+
for (let n = 0, r = [e]; n < r.length; n++) {
|
|
996
|
+
let e = r[n], i = !e.validEnd, a = [];
|
|
997
|
+
for (let t = 0; t < e.next.length; t++) {
|
|
998
|
+
let { type: n, next: o } = e.next[t];
|
|
999
|
+
a.push(n.name), i && !(n.isText || n.hasRequiredAttrs()) && (i = !1), r.indexOf(o) == -1 && r.push(o);
|
|
1000
|
+
}
|
|
1001
|
+
i && t.err("Only non-generatable nodes (" + a.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)");
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
function G(e) {
|
|
1005
|
+
let t = Object.create(null);
|
|
1006
|
+
for (let n in e) {
|
|
1007
|
+
let r = e[n];
|
|
1008
|
+
if (!r.hasDefault) return null;
|
|
1009
|
+
t[n] = r.default;
|
|
1010
|
+
}
|
|
1011
|
+
return t;
|
|
1012
|
+
}
|
|
1013
|
+
function K(e, t) {
|
|
1014
|
+
let n = Object.create(null);
|
|
1015
|
+
for (let r in e) {
|
|
1016
|
+
let i = t && t[r];
|
|
1017
|
+
if (i === void 0) {
|
|
1018
|
+
let t = e[r];
|
|
1019
|
+
if (t.hasDefault) i = t.default;
|
|
1020
|
+
else throw RangeError("No value supplied for attribute " + r);
|
|
1021
|
+
}
|
|
1022
|
+
n[r] = i;
|
|
1023
|
+
}
|
|
1024
|
+
return n;
|
|
1025
|
+
}
|
|
1026
|
+
function q(e, t, n, r) {
|
|
1027
|
+
for (let i in t) if (!(i in e)) throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);
|
|
1028
|
+
for (let n in e) e[n].validate && e[n].validate(t[n]);
|
|
1029
|
+
}
|
|
1030
|
+
function J(e, t) {
|
|
1031
|
+
let n = Object.create(null);
|
|
1032
|
+
if (t) for (let r in t) n[r] = new X(e, r, t[r]);
|
|
1033
|
+
return n;
|
|
1034
|
+
}
|
|
1035
|
+
function Y(e, t, n) {
|
|
1036
|
+
let r = n.split("|");
|
|
1037
|
+
return (n) => {
|
|
1038
|
+
let i = n === null ? "null" : typeof n;
|
|
1039
|
+
if (r.indexOf(i) < 0) throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`);
|
|
1040
|
+
};
|
|
1041
|
+
}
|
|
1042
|
+
var X = class {
|
|
1043
|
+
constructor(e, t, n) {
|
|
1044
|
+
this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? Y(e, t, n.validate) : n.validate;
|
|
1045
|
+
}
|
|
1046
|
+
get isRequired() {
|
|
1047
|
+
return !this.hasDefault;
|
|
1048
|
+
}
|
|
1049
|
+
}, Z = class e {
|
|
1050
|
+
constructor(e, t, n, r) {
|
|
1051
|
+
this.name = e, this.rank = t, this.schema = n, this.spec = r, this.attrs = J(e, r.attrs), this.excluded = null;
|
|
1052
|
+
let i = G(this.attrs);
|
|
1053
|
+
this.instance = i ? new c(this, i) : null;
|
|
1054
|
+
}
|
|
1055
|
+
create(e = null) {
|
|
1056
|
+
return !e && this.instance ? this.instance : new c(this, K(this.attrs, e));
|
|
1057
|
+
}
|
|
1058
|
+
static compile(t, n) {
|
|
1059
|
+
let r = Object.create(null), i = 0;
|
|
1060
|
+
return t.forEach((t, a) => r[t] = new e(t, i++, n, a)), r;
|
|
1061
|
+
}
|
|
1062
|
+
removeFromSet(e) {
|
|
1063
|
+
for (var t = 0; t < e.length; t++) e[t].type == this && (e = e.slice(0, t).concat(e.slice(t + 1)), t--);
|
|
1064
|
+
return e;
|
|
1065
|
+
}
|
|
1066
|
+
isInSet(e) {
|
|
1067
|
+
for (let t = 0; t < e.length; t++) if (e[t].type == this) return e[t];
|
|
1068
|
+
}
|
|
1069
|
+
checkAttrs(e) {
|
|
1070
|
+
q(this.attrs, e, "mark", this.name);
|
|
1071
|
+
}
|
|
1072
|
+
excludes(e) {
|
|
1073
|
+
return this.excluded.indexOf(e) > -1;
|
|
1074
|
+
}
|
|
1075
|
+
}, Q = /* @__PURE__ */ new WeakMap();
|
|
1076
|
+
function $(e) {
|
|
1077
|
+
let t = Q.get(e);
|
|
1078
|
+
return t === void 0 && Q.set(e, t = ee(e)), t;
|
|
1079
|
+
}
|
|
1080
|
+
function ee(e) {
|
|
1081
|
+
let t = null;
|
|
1082
|
+
function n(e) {
|
|
1083
|
+
if (e && typeof e == "object") if (Array.isArray(e)) if (typeof e[0] == "string") t ||= [], t.push(e);
|
|
1084
|
+
else for (let t = 0; t < e.length; t++) n(e[t]);
|
|
1085
|
+
else for (let t in e) n(e[t]);
|
|
1086
|
+
}
|
|
1087
|
+
return n(e), t;
|
|
1088
|
+
}
|
|
1089
|
+
function te(e, t, n, r) {
|
|
1090
|
+
if (t.nodeType == 1) return { dom: t };
|
|
1091
|
+
if (t.dom && t.dom.nodeType == 1) return t;
|
|
1092
|
+
let i = t[0], a;
|
|
1093
|
+
if (typeof i != "string") throw RangeError("Invalid array passed to renderSpec");
|
|
1094
|
+
if (r && (a = $(r)) && a.indexOf(t) > -1) throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
|
|
1095
|
+
let o = i.indexOf(" ");
|
|
1096
|
+
o > 0 && (n = i.slice(0, o), i = i.slice(o + 1));
|
|
1097
|
+
let s, c = n ? e.createElementNS(n, i) : e.createElement(i), l = t[1], u = 1;
|
|
1098
|
+
if (l && typeof l == "object" && l.nodeType == null && !Array.isArray(l)) {
|
|
1099
|
+
u = 2;
|
|
1100
|
+
for (let e in l) if (l[e] != null) {
|
|
1101
|
+
let t = e.indexOf(" ");
|
|
1102
|
+
t > 0 ? c.setAttributeNS(e.slice(0, t), e.slice(t + 1), l[e]) : e == "style" && c.style ? c.style.cssText = l[e] : c.setAttribute(e, l[e]);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
for (let i = u; i < t.length; i++) {
|
|
1106
|
+
let a = t[i];
|
|
1107
|
+
if (a === 0) {
|
|
1108
|
+
if (i < t.length - 1 || i > u) throw RangeError("Content hole must be the only child of its parent node");
|
|
1109
|
+
return {
|
|
1110
|
+
dom: c,
|
|
1111
|
+
contentDOM: c
|
|
1112
|
+
};
|
|
1113
|
+
} else if (typeof a == "string") c.appendChild(e.createTextNode(a));
|
|
1114
|
+
else {
|
|
1115
|
+
let { dom: t, contentDOM: i } = te(e, a, n, r);
|
|
1116
|
+
if (c.appendChild(t), i) {
|
|
1117
|
+
if (s) throw RangeError("Multiple content holes");
|
|
1118
|
+
s = i;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
return {
|
|
1123
|
+
dom: c,
|
|
1124
|
+
contentDOM: s
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
//#endregion
|
|
1128
|
+
export { i as Fragment, c as Mark, Z as MarkType, k as Node, l as ReplaceError, u as Slice };
|