@hkyhy/marsun-components-core 0.1.89 → 0.1.98
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/components/Audit/AuditLogList.d.ts +27 -0
- package/dist/components/Audit/AuditLogList.js +272 -0
- package/dist/components/Audit/AuditLogList.js.map +1 -0
- package/dist/components/Audit/formatAuditCurl.d.ts +27 -0
- package/dist/components/Audit/formatAuditCurl.js +115 -0
- package/dist/components/Audit/formatAuditCurl.js.map +1 -0
- package/dist/components/Audit/formatAuditJson.d.ts +15 -0
- package/dist/components/Audit/formatAuditJson.js +135 -0
- package/dist/components/Audit/formatAuditJson.js.map +1 -0
- package/dist/components/Audit/index.d.ts +3 -0
- package/dist/components/Audit/style.module.scss.js +30 -0
- package/dist/components/Audit/style.module.scss.js.map +1 -0
- package/dist/components/Audit/types.d.ts +39 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.d.ts +24 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.js +93 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.js.map +1 -0
- package/dist/components/Editor/RichTextEditor/index.d.ts +2 -0
- package/dist/components/Editor/RichTextEditor/style.module.scss.js +11 -0
- package/dist/components/Editor/RichTextEditor/style.module.scss.js.map +1 -0
- package/dist/components/Editor/VariablePicker.d.ts +19 -0
- package/dist/components/Editor/VariablePicker.js +55 -0
- package/dist/components/Editor/VariablePicker.js.map +1 -0
- package/dist/components/Editor/index.d.ts +7 -0
- package/dist/components/Editor/index.js +21 -0
- package/dist/components/Editor/index.js.map +1 -0
- package/dist/components/Editor/msgVarTokenPlugin.d.ts +13 -0
- package/dist/components/Editor/msgVarTokenPlugin.js +94 -0
- package/dist/components/Editor/msgVarTokenPlugin.js.map +1 -0
- package/dist/components/Editor/variableMention.d.ts +37 -0
- package/dist/components/Editor/variableMention.js +64 -0
- package/dist/components/Editor/variableMention.js.map +1 -0
- package/dist/components/FormInfo/RichTextField/index.d.ts +21 -0
- package/dist/components/FormInfo/RichTextField/index.js +82 -0
- package/dist/components/FormInfo/RichTextField/index.js.map +1 -0
- package/dist/components/FormInfo/RichTextField/style.module.scss.js +9 -0
- package/dist/components/FormInfo/RichTextField/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/VariableMentionInput/index.d.ts +17 -0
- package/dist/components/FormInfo/VariableMentionInput/index.js +73 -0
- package/dist/components/FormInfo/VariableMentionInput/index.js.map +1 -0
- package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js +11 -0
- package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/fields.d.ts +5 -0
- package/dist/components/FormInfo/fields.js +32 -23
- package/dist/components/FormInfo/fields.js.map +1 -1
- package/dist/components/FormInfo/index.d.ts +4 -0
- package/dist/components/StateBar/StateBar.d.ts +19 -6
- package/dist/components/StateBar/StateBar.js +87 -50
- package/dist/components/StateBar/StateBar.js.map +1 -1
- package/dist/components/StateBar/style.module.scss.js +13 -10
- package/dist/components/StateBar/style.module.scss.js.map +1 -1
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.d.ts +45 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js +156 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -0
- package/dist/components/Tools/Inbox/InboxBell/index.d.ts +2 -0
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js +30 -0
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js.map +1 -0
- package/dist/components/Tools/Inbox/index.d.ts +2 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js +56 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +216 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.d.ts +26 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js +190 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +3 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js +12 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +76 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js +26 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -0
- package/dist/components/Tools/MessageCenter/index.d.ts +3 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.js +25 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.js.map +1 -0
- package/dist/components/Tools/index.d.ts +5 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/editor.d.ts +5 -0
- package/dist/editor.js +21 -0
- package/dist/editor.js.map +1 -0
- package/dist/form-info.js +33 -29
- package/dist/form-info.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +805 -773
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +4 -1
- package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +301 -0
- package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1256 -0
- package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2107 -0
- package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +259 -0
- package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +23990 -0
- package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +249 -0
- package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +47 -0
- package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js +100 -0
- package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +31 -0
- package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js +194 -0
- package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js +2042 -0
- package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +9 -0
- package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +167 -0
- package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js +471 -0
- package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +139 -0
- package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +755 -0
- package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +7838 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js +422 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js +33 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js +47 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js +156 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +313 -0
- package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +2942 -0
- package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +892 -0
- package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1047 -0
- package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js.map +1 -0
- package/dist/node_modules/color-parse/node_modules/color-name/index.js +153 -0
- package/dist/node_modules/color-parse/node_modules/color-name/index.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +30 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js +17 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js +13 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js +17 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js +102 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +33 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js +39 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js +21 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js +33 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js +10 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js +53 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js +10 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/set.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/set.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js +31 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +81 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +23 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js +19 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/times.js +11 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/times.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js +37 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toString.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toString.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/after.js +11 -0
- package/dist/node_modules/es-toolkit/dist/function/after.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/debounce.js +30 -0
- package/dist/node_modules/es-toolkit/dist/function/debounce.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/identity.js +7 -0
- package/dist/node_modules/es-toolkit/dist/function/identity.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js +6 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js +27 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +8 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +121 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/mapValues.js +12 -0
- package/dist/node_modules/es-toolkit/dist/object/mapValues.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js +8 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js +9 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js +110 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js +9 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js.map +1 -0
- package/dist/styles/global.css +4 -1
- package/dist/utils/copyText.d.ts +4 -0
- package/dist/utils/copyText.js +21 -0
- package/dist/utils/copyText.js.map +1 -0
- package/package.json +9 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@ckeditor/ckeditor5-typing/dist/index.js"],"sourcesContent":["/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nimport { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { EventInfo, ObservableMixin, count, env, isInsideCombinedSymbol, isInsideEmojiSequence, isInsideSurrogatePair, keyCodes } from \"@ckeditor/ckeditor5-utils\";\nimport { BubblingEventInfo, FocusObserver, ModelLiveRange, MouseObserver, Observer, TouchObserver, ViewDocumentDomEventData, _tryFixingModelRange } from \"@ckeditor/ckeditor5-engine\";\nimport { debounce, escapeRegExp } from \"es-toolkit/compat\";\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* Change buffer allows to group atomic changes (like characters that have been typed) into\n* {@link module:engine/model/batch~Batch batches}.\n*\n* Batches represent single undo steps, hence changes added to one single batch are undone together.\n*\n* The buffer has a configurable limit of atomic changes that it can accommodate. After the limit was\n* exceeded (see {@link ~TypingChangeBuffer#input}), a new batch is created in {@link ~TypingChangeBuffer#batch}.\n*\n* To use the change buffer you need to let it know about the number of changes that were added to the batch:\n*\n* ```ts\n* const buffer = new ChangeBuffer( model, LIMIT );\n*\n* // Later on in your feature:\n* buffer.batch.insert( pos, insertedCharacters );\n* buffer.input( insertedCharacters.length );\n* ```\n*/\nvar TypingChangeBuffer = class {\n\t/**\n\t* The model instance.\n\t*/\n\tmodel;\n\t/**\n\t* The maximum number of atomic changes which can be contained in one batch.\n\t*/\n\tlimit;\n\t/**\n\t* Whether the buffer is locked. A locked buffer cannot be reset unless it gets unlocked.\n\t*/\n\t_isLocked;\n\t/**\n\t* The number of atomic changes in the buffer. Once it exceeds the {@link #limit},\n\t* the {@link #batch batch} is set to a new one.\n\t*/\n\t_size;\n\t/**\n\t* The current batch instance.\n\t*/\n\t_batch = null;\n\t/**\n\t* The callback to document the change event which later needs to be removed.\n\t*/\n\t_changeCallback;\n\t/**\n\t* The callback to document selection `change:attribute` and `change:range` events which resets the buffer.\n\t*/\n\t_selectionChangeCallback;\n\t/**\n\t* Creates a new instance of the change buffer.\n\t*\n\t* @param limit The maximum number of atomic changes which can be contained in one batch.\n\t*/\n\tconstructor(model, limit = 20) {\n\t\tthis.model = model;\n\t\tthis._size = 0;\n\t\tthis.limit = limit;\n\t\tthis._isLocked = false;\n\t\tthis._changeCallback = (evt, batch) => {\n\t\t\tif (batch.isLocal && batch.isUndoable && batch !== this._batch) this._reset(true);\n\t\t};\n\t\tthis._selectionChangeCallback = () => {\n\t\t\tthis._reset();\n\t\t};\n\t\tthis.model.document.on(\"change\", this._changeCallback);\n\t\tthis.model.document.selection.on(\"change:range\", this._selectionChangeCallback);\n\t\tthis.model.document.selection.on(\"change:attribute\", this._selectionChangeCallback);\n\t}\n\t/**\n\t* The current batch to which a feature should add its operations. Once the {@link #size}\n\t* is reached or exceeds the {@link #limit}, the batch is set to a new instance and the size is reset.\n\t*/\n\tget batch() {\n\t\tif (!this._batch) this._batch = this.model.createBatch({ isTyping: true });\n\t\treturn this._batch;\n\t}\n\t/**\n\t* The number of atomic changes in the buffer. Once it exceeds the {@link #limit},\n\t* the {@link #batch batch} is set to a new one.\n\t*/\n\tget size() {\n\t\treturn this._size;\n\t}\n\t/**\n\t* The input number of changes into the buffer. Once the {@link #size} is\n\t* reached or exceeds the {@link #limit}, the batch is set to a new instance and the size is reset.\n\t*\n\t* @param changeCount The number of atomic changes to input.\n\t*/\n\tinput(changeCount) {\n\t\tthis._size += changeCount;\n\t\tif (this._size >= this.limit) this._reset(true);\n\t}\n\t/**\n\t* Whether the buffer is locked. A locked buffer cannot be reset unless it gets unlocked.\n\t*/\n\tget isLocked() {\n\t\treturn this._isLocked;\n\t}\n\t/**\n\t* Locks the buffer.\n\t*/\n\tlock() {\n\t\tthis._isLocked = true;\n\t}\n\t/**\n\t* Unlocks the buffer.\n\t*/\n\tunlock() {\n\t\tthis._isLocked = false;\n\t}\n\t/**\n\t* Destroys the buffer.\n\t*/\n\tdestroy() {\n\t\tthis.model.document.off(\"change\", this._changeCallback);\n\t\tthis.model.document.selection.off(\"change:range\", this._selectionChangeCallback);\n\t\tthis.model.document.selection.off(\"change:attribute\", this._selectionChangeCallback);\n\t}\n\t/**\n\t* Resets the change buffer.\n\t*\n\t* @param ignoreLock Whether internal lock {@link #isLocked} should be ignored.\n\t*/\n\t_reset(ignoreLock = false) {\n\t\tif (!this.isLocked || ignoreLock) {\n\t\t\tthis._batch = null;\n\t\t\tthis._size = 0;\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/inserttextcommand\n*/\n/**\n* The insert text command. Used by the {@link module:typing/input~Input input feature} to handle typing.\n*/\nvar InsertTextCommand = class extends Command {\n\t/**\n\t* Typing's change buffer used to group subsequent changes into batches.\n\t*/\n\t_buffer;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param undoStepSize The maximum number of atomic changes\n\t* which can be contained in one batch in the command buffer.\n\t*/\n\tconstructor(editor, undoStepSize) {\n\t\tsuper(editor);\n\t\tthis._buffer = new TypingChangeBuffer(editor.model, undoStepSize);\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\t/**\n\t* The current change buffer.\n\t*/\n\tget buffer() {\n\t\treturn this._buffer;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._buffer.destroy();\n\t}\n\t/**\n\t* Executes the input command. It replaces the content within the given range with the given text.\n\t* Replacing is a two step process, first the content within the range is removed and then the new text is inserted\n\t* at the beginning of the range (which after the removal is a collapsed range).\n\t*\n\t* @fires execute\n\t* @param options The command options.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst text = options.text || \"\";\n\t\tconst textInsertions = text.length;\n\t\tlet selection = doc.selection;\n\t\tif (options.selection) selection = options.selection;\n\t\telse if (options.range) selection = model.createSelection(options.range);\n\t\tif (!model.canEditAt(selection)) return;\n\t\tconst resultRange = options.resultRange;\n\t\tmodel.enqueueChange(this._buffer.batch, (writer) => {\n\t\t\tthis._buffer.lock();\n\t\t\tconst selectionAttributes = Array.from(doc.selection.getAttributes());\n\t\t\tmodel.deleteContent(selection);\n\t\t\tif (text) model.insertContent(writer.createText(text, selectionAttributes), selection);\n\t\t\tif (resultRange) writer.setSelection(resultRange);\n\t\t\telse if (!selection.is(\"documentSelection\")) writer.setSelection(selection);\n\t\t\tthis._buffer.unlock();\n\t\t\tthis._buffer.input(textInsertions);\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/inserttextobserver\n*/\nconst TYPING_INPUT_TYPES = [\"insertText\", \"insertReplacementText\"];\nconst TYPING_INPUT_TYPES_ANDROID = [...TYPING_INPUT_TYPES, \"insertCompositionText\"];\n/**\n* Text insertion observer introduces the {@link module:engine/view/document~ViewDocument#event:insertText} event.\n*/\nvar InsertTextObserver = class extends Observer {\n\t/**\n\t* Instance of the focus observer. Insert text observer calls\n\t* {@link module:engine/view/observer/focusobserver~FocusObserver#flush} to mark the latest focus change as complete.\n\t*/\n\tfocusObserver;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tthis.focusObserver = view.getObserver(FocusObserver);\n\t\tconst typingInputTypes = env.isAndroid ? TYPING_INPUT_TYPES_ANDROID : TYPING_INPUT_TYPES;\n\t\tconst viewDocument = view.document;\n\t\tviewDocument.on(\"beforeinput\", (evt, data) => {\n\t\t\tif (!this.isEnabled) return;\n\t\t\tconst { data: text, targetRanges, inputType, domEvent, isComposing } = data;\n\t\t\tif (!typingInputTypes.includes(inputType)) return;\n\t\t\tthis.focusObserver.flush();\n\t\t\tconst eventInfo = new EventInfo(viewDocument, \"insertText\");\n\t\t\tviewDocument.fire(eventInfo, new ViewDocumentDomEventData(view, domEvent, {\n\t\t\t\ttext,\n\t\t\t\tselection: view.createSelection(targetRanges),\n\t\t\t\tisComposing\n\t\t\t}));\n\t\t\tif (eventInfo.stop.called) evt.stop();\n\t\t});\n\t\tif (!env.isAndroid) viewDocument.on(\"compositionend\", (evt, { data, domEvent }) => {\n\t\t\tif (!this.isEnabled) return;\n\t\t\tif (!data) return;\n\t\t\tviewDocument.fire(\"insertText\", new ViewDocumentDomEventData(view, domEvent, {\n\t\t\t\ttext: data,\n\t\t\t\tisComposing: true\n\t\t\t}));\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving() {}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/input\n*/\n/**\n* Handles text input coming from the keyboard or other input methods.\n*/\nvar Input = class extends Plugin {\n\t/**\n\t* The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n\t*/\n\t_typingQueue;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Input\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst modelSelection = model.document.selection;\n\t\tthis._typingQueue = new TypingQueue(editor);\n\t\tview.addObserver(InsertTextObserver);\n\t\tconst insertTextCommand = new InsertTextCommand(editor, editor.config.get(\"typing.undoStep\") || 20);\n\t\teditor.commands.add(\"insertText\", insertTextCommand);\n\t\teditor.commands.add(\"input\", insertTextCommand);\n\t\tthis.listenTo(view.document, \"beforeinput\", () => {\n\t\t\tthis._typingQueue.flush(\"next beforeinput\");\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(view.document, \"insertText\", (evt, data) => {\n\t\t\tconst { text, selection: viewSelection } = data;\n\t\t\tif (view.document.selection.isFake && viewSelection && view.document.selection.isSimilar(viewSelection)) data.preventDefault();\n\t\t\tif (viewSelection && Array.from(viewSelection.getRanges()).some((range) => !range.isCollapsed)) data.preventDefault();\n\t\t\tif (!insertTextCommand.isEnabled) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet modelRanges;\n\t\t\tif (viewSelection) modelRanges = Array.from(viewSelection.getRanges()).filter((viewRange) => {\n\t\t\t\treturn viewRange.root.is(\"rootElement\");\n\t\t\t}).map((viewRange) => mapper.toModelRange(viewRange)).map((modelRange) => _tryFixingModelRange(modelRange, model.schema) || modelRange);\n\t\t\tif (!modelRanges || !modelRanges.length) modelRanges = Array.from(modelSelection.getRanges());\n\t\t\tlet insertText = text;\n\t\t\tif (env.isAndroid) {\n\t\t\t\tconst selectedText = Array.from(modelRanges[0].getItems()).reduce((rangeText, node) => {\n\t\t\t\t\treturn rangeText + (node.is(\"$textProxy\") ? node.data : \"\");\n\t\t\t\t}, \"\");\n\t\t\t\tif (selectedText) {\n\t\t\t\t\tif (selectedText.length <= insertText.length) {\n\t\t\t\t\t\tif (insertText.startsWith(selectedText)) {\n\t\t\t\t\t\t\tinsertText = insertText.substring(selectedText.length);\n\t\t\t\t\t\t\tmodelRanges[0].start = modelRanges[0].start.getShiftedBy(selectedText.length);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (selectedText.startsWith(insertText)) {\n\t\t\t\t\t\tmodelRanges[0].start = modelRanges[0].start.getShiftedBy(insertText.length);\n\t\t\t\t\t\tinsertText = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (insertText.length == 0 && modelRanges[0].isCollapsed) return;\n\t\t\t}\n\t\t\tconst commandData = {\n\t\t\t\ttext: insertText,\n\t\t\t\tselection: model.createSelection(modelRanges)\n\t\t\t};\n\t\t\tthis._typingQueue.push(commandData, Boolean(data.isComposing));\n\t\t\tif (data.domEvent.defaultPrevented) this._typingQueue.flush(\"beforeinput default prevented\");\n\t\t});\n\t\tif (env.isAndroid) this.listenTo(view.document, \"keydown\", (evt, data) => {\n\t\t\tif (modelSelection.isCollapsed || data.keyCode != 229 || !view.document.isComposing) return;\n\t\t\tdeleteSelectionContent(model, insertTextCommand);\n\t\t});\n\t\telse this.listenTo(view.document, \"compositionstart\", () => {\n\t\t\tif (modelSelection.isCollapsed) return;\n\t\t\tdeleteSelectionContent(model, insertTextCommand);\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(view.document, \"mutations\", (evt, { mutations }) => {\n\t\t\tif (this._typingQueue.hasAffectedElements()) for (const { node } of mutations) {\n\t\t\t\tconst viewElement = findMappedViewAncestor(node, mapper);\n\t\t\t\tconst modelElement = mapper.toModelElement(viewElement);\n\t\t\t\tif (this._typingQueue.isElementAffected(modelElement)) {\n\t\t\t\t\tthis._typingQueue.flush(\"mutations\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(view.document, \"compositionend\", () => {\n\t\t\tthis._typingQueue.flush(\"before composition end\");\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(view.document, \"compositionend\", () => {\n\t\t\tthis._typingQueue.flush(\"after composition end\");\n\t\t\tconst mutations = [];\n\t\t\tif (this._typingQueue.hasAffectedElements()) for (const element of this._typingQueue.flushAffectedElements()) {\n\t\t\t\tconst viewElement = mapper.toViewElement(element);\n\t\t\t\tif (!viewElement) continue;\n\t\t\t\tmutations.push({\n\t\t\t\t\ttype: \"children\",\n\t\t\t\t\tnode: viewElement\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (mutations.length || !env.isAndroid) view.document.fire(\"mutations\", { mutations });\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._typingQueue.destroy();\n\t}\n};\n/**\n* The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n*/\nvar TypingQueue = class {\n\t/**\n\t* The editor instance.\n\t*/\n\teditor;\n\t/**\n\t* Debounced queue flush as a safety mechanism for cases of mutation observer not triggering.\n\t*/\n\tflushDebounced = debounce(() => this.flush(\"timeout\"), 50);\n\t/**\n\t* The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n\t*/\n\t_queue = [];\n\t/**\n\t* Whether there is any composition enqueued or plain typing only.\n\t*/\n\t_isComposing = false;\n\t/**\n\t* A set of model elements. The typing happened in those elements. It's used for mutations check.\n\t*/\n\t_affectedElements = /* @__PURE__ */ new Set();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tthis.editor = editor;\n\t}\n\t/**\n\t* Destroys the helper object.\n\t*/\n\tdestroy() {\n\t\tthis.flushDebounced.cancel();\n\t\tthis._affectedElements.clear();\n\t\twhile (this._queue.length) this.shift();\n\t}\n\t/**\n\t* Returns the size of the queue.\n\t*/\n\tget length() {\n\t\treturn this._queue.length;\n\t}\n\t/**\n\t* Push next insertText command data to the queue.\n\t*/\n\tpush(commandData, isComposing) {\n\t\tconst commandLiveData = { text: commandData.text };\n\t\tif (commandData.selection) {\n\t\t\tcommandLiveData.selectionRanges = [];\n\t\t\tfor (const range of commandData.selection.getRanges()) {\n\t\t\t\tcommandLiveData.selectionRanges.push(ModelLiveRange.fromRange(range));\n\t\t\t\tthis._affectedElements.add(range.start.parent);\n\t\t\t}\n\t\t}\n\t\tthis._queue.push(commandLiveData);\n\t\tthis._isComposing ||= isComposing;\n\t\tthis.flushDebounced();\n\t}\n\t/**\n\t* Shift the first item from the insertText command data queue.\n\t*/\n\tshift() {\n\t\tconst commandLiveData = this._queue.shift();\n\t\tconst commandData = { text: commandLiveData.text };\n\t\tif (commandLiveData.selectionRanges) {\n\t\t\tconst ranges = commandLiveData.selectionRanges.map((liveRange) => detachLiveRange(liveRange)).filter((range) => !!range);\n\t\t\tif (ranges.length) commandData.selection = this.editor.model.createSelection(ranges);\n\t\t}\n\t\treturn commandData;\n\t}\n\t/**\n\t* Applies all queued insertText command executions.\n\t*\n\t* @param reason Used only for debugging.\n\t*/\n\tflush(reason) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tthis.flushDebounced.cancel();\n\t\tif (!this._queue.length) return;\n\t\tconst buffer = editor.commands.get(\"insertText\").buffer;\n\t\tmodel.enqueueChange(buffer.batch, () => {\n\t\t\tbuffer.lock();\n\t\t\twhile (this._queue.length) {\n\t\t\t\tconst commandData = this.shift();\n\t\t\t\teditor.execute(\"insertText\", commandData);\n\t\t\t}\n\t\t\tbuffer.unlock();\n\t\t\tif (!this._isComposing) this._affectedElements.clear();\n\t\t\tthis._isComposing = false;\n\t\t});\n\t\tview.scrollToTheSelection();\n\t}\n\t/**\n\t* Returns `true` if the given model element is related to recent typing.\n\t*/\n\tisElementAffected(element) {\n\t\treturn this._affectedElements.has(element);\n\t}\n\t/**\n\t* Returns `true` if there are any affected elements in the queue.\n\t*/\n\thasAffectedElements() {\n\t\treturn this._affectedElements.size > 0;\n\t}\n\t/**\n\t* Returns an array of typing-related elements and clears the internal list.\n\t*/\n\tflushAffectedElements() {\n\t\tconst result = Array.from(this._affectedElements);\n\t\tthis._affectedElements.clear();\n\t\treturn result;\n\t}\n};\n/**\n* Deletes the content selected by the document selection at the start of composition.\n*/\nfunction deleteSelectionContent(model, insertTextCommand) {\n\tif (!insertTextCommand.isEnabled) return;\n\tconst buffer = insertTextCommand.buffer;\n\tbuffer.lock();\n\tmodel.enqueueChange(buffer.batch, () => {\n\t\tmodel.deleteContent(model.document.selection);\n\t});\n\tbuffer.unlock();\n}\n/**\n* Detaches a ModelLiveRange and returns the static range from it.\n*/\nfunction detachLiveRange(liveRange) {\n\tconst range = liveRange.toRange();\n\tliveRange.detach();\n\tif (range.root.rootName == \"$graveyard\") return null;\n\treturn range;\n}\n/**\n* For the given `viewNode`, finds and returns the closest ancestor of this node that has a mapping to the model.\n*/\nfunction findMappedViewAncestor(viewNode, mapper) {\n\tlet node = viewNode.is(\"$text\") ? viewNode.parent : viewNode;\n\twhile (!mapper.toModelElement(node)) node = node.parent;\n\treturn node;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/deletecommand\n*/\n/**\n* The delete command. Used by the {@link module:typing/delete~Delete delete feature} to handle the <kbd>Delete</kbd> and\n* <kbd>Backspace</kbd> keys.\n*/\nvar DeleteCommand = class extends Command {\n\t/**\n\t* The directionality of the delete describing in what direction it should\n\t* consume the content when the selection is collapsed.\n\t*/\n\tdirection;\n\t/**\n\t* Delete's change buffer used to group subsequent changes into batches.\n\t*/\n\t_buffer;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param direction The directionality of the delete describing in what direction it\n\t* should consume the content when the selection is collapsed.\n\t*/\n\tconstructor(editor, direction) {\n\t\tsuper(editor);\n\t\tthis.direction = direction;\n\t\tthis._buffer = new TypingChangeBuffer(editor.model, editor.config.get(\"typing.undoStep\"));\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\t/**\n\t* The current change buffer.\n\t*/\n\tget buffer() {\n\t\treturn this._buffer;\n\t}\n\t/**\n\t* Executes the delete command. Depending on whether the selection is collapsed or not, deletes its content\n\t* or a piece of content in the {@link #direction defined direction}.\n\t*\n\t* @fires execute\n\t* @param options The command options.\n\t* @param options.unit See {@link module:engine/model/utils/modifyselection~modifySelection}'s options.\n\t* @param options.sequence A number describing which subsequent delete event it is without the key being released.\n\t* See the {@link module:engine/view/document~ViewDocument#event:delete} event data.\n\t* @param options.selection Selection to remove. If not set, current model selection will be used.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tmodel.enqueueChange(this._buffer.batch, (writer) => {\n\t\t\tthis._buffer.lock();\n\t\t\tconst selection = writer.createSelection(options.selection || doc.selection);\n\t\t\tif (!model.canEditAt(selection)) return;\n\t\t\tconst sequence = options.sequence || 1;\n\t\t\tconst doNotResetEntireContent = selection.isCollapsed;\n\t\t\tif (selection.isCollapsed) model.modifySelection(selection, {\n\t\t\t\tdirection: this.direction,\n\t\t\t\tunit: options.unit,\n\t\t\t\ttreatEmojiAsSingleUnit: true\n\t\t\t});\n\t\t\tif (this._shouldEntireContentBeReplacedWithParagraph(sequence)) {\n\t\t\t\tthis._replaceEntireContentWithParagraph(writer);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._shouldReplaceFirstBlockWithParagraph(selection, sequence)) {\n\t\t\t\tthis.editor.execute(\"paragraph\", { selection });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (selection.isCollapsed) return;\n\t\t\tlet changeCount = 0;\n\t\t\tselection.getFirstRange().getMinimalFlatRanges().forEach((range) => {\n\t\t\t\tchangeCount += count(range.getWalker({\n\t\t\t\t\tsingleCharacters: true,\n\t\t\t\t\tignoreElementEnd: true,\n\t\t\t\t\tshallow: true\n\t\t\t\t}));\n\t\t\t});\n\t\t\tmodel.deleteContent(selection, {\n\t\t\t\tdoNotResetEntireContent,\n\t\t\t\tdirection: this.direction\n\t\t\t});\n\t\t\tthis._buffer.input(changeCount);\n\t\t\twriter.setSelection(selection);\n\t\t\tthis._buffer.unlock();\n\t\t});\n\t}\n\t/**\n\t* If the user keeps <kbd>Backspace</kbd> or <kbd>Delete</kbd> key pressed, the content of the current\n\t* editable will be cleared. However, this will not yet lead to resetting the remaining block to a paragraph\n\t* (which happens e.g. when the user does <kbd>Ctrl</kbd> + <kbd>A</kbd>, <kbd>Backspace</kbd>).\n\t*\n\t* But, if the user pressed the key in an empty editable for the first time,\n\t* we want to replace the entire content with a paragraph if:\n\t*\n\t* * the current limit element is empty,\n\t* * the paragraph is allowed in the limit element,\n\t* * the limit doesn't already have a paragraph inside.\n\t*\n\t* See https://github.com/ckeditor/ckeditor5-typing/issues/61.\n\t*\n\t* @param sequence A number describing which subsequent delete event it is without the key being released.\n\t*/\n\t_shouldEntireContentBeReplacedWithParagraph(sequence) {\n\t\tif (sequence > 1) return false;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst limitElement = model.schema.getLimitElement(selection);\n\t\tif (!(selection.isCollapsed && selection.containsEntireContent(limitElement))) return false;\n\t\tif (!model.schema.checkChild(limitElement, \"paragraph\")) return false;\n\t\tconst limitElementFirstChild = limitElement.getChild(0);\n\t\tif (limitElementFirstChild && limitElementFirstChild.is(\"element\", \"paragraph\")) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* The entire content is replaced with the paragraph. Selection is moved inside the paragraph.\n\t*\n\t* @param writer The model writer.\n\t*/\n\t_replaceEntireContentWithParagraph(writer) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst limitElement = model.schema.getLimitElement(selection);\n\t\tconst paragraph = writer.createElement(\"paragraph\");\n\t\twriter.remove(writer.createRangeIn(limitElement));\n\t\twriter.insert(paragraph, limitElement);\n\t\twriter.setSelection(paragraph, 0);\n\t}\n\t/**\n\t* Checks if the selection is inside an empty element that is the first child of the limit element\n\t* and should be replaced with a paragraph.\n\t*\n\t* @param selection The selection.\n\t* @param sequence A number describing which subsequent delete event it is without the key being released.\n\t*/\n\t_shouldReplaceFirstBlockWithParagraph(selection, sequence) {\n\t\tconst model = this.editor.model;\n\t\tif (sequence > 1 || this.direction != \"backward\") return false;\n\t\tif (!selection.isCollapsed) return false;\n\t\tconst position = selection.getFirstPosition();\n\t\tconst limitElement = model.schema.getLimitElement(position);\n\t\tconst limitElementFirstChild = limitElement.getChild(0);\n\t\tif (position.parent != limitElementFirstChild) return false;\n\t\tif (!selection.containsEntireContent(limitElementFirstChild)) return false;\n\t\tif (!model.schema.checkChild(limitElement, \"paragraph\")) return false;\n\t\tif (limitElementFirstChild.name == \"paragraph\") return false;\n\t\treturn true;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/deleteobserver\n*/\nconst DELETE_CHARACTER = \"character\";\nconst DELETE_WORD = \"word\";\nconst DELETE_CODE_POINT = \"codePoint\";\nconst DELETE_SELECTION = \"selection\";\nconst DELETE_BACKWARD = \"backward\";\nconst DELETE_FORWARD = \"forward\";\nconst DELETE_EVENT_TYPES = {\n\tdeleteContent: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteContentBackward: {\n\t\tunit: DELETE_CODE_POINT,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteWordBackward: {\n\t\tunit: DELETE_WORD,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteHardLineBackward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteSoftLineBackward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteContentForward: {\n\t\tunit: DELETE_CHARACTER,\n\t\tdirection: DELETE_FORWARD\n\t},\n\tdeleteWordForward: {\n\t\tunit: DELETE_WORD,\n\t\tdirection: DELETE_FORWARD\n\t},\n\tdeleteHardLineForward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_FORWARD\n\t},\n\tdeleteSoftLineForward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_FORWARD\n\t}\n};\n/**\n* Delete observer introduces the {@link module:engine/view/document~ViewDocument#event:delete} event.\n*\n* @internal\n*/\nvar DeleteObserver = class extends Observer {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tconst document = view.document;\n\t\tlet sequence = 0;\n\t\tdocument.on(\"keydown\", () => {\n\t\t\tsequence++;\n\t\t});\n\t\tdocument.on(\"keyup\", () => {\n\t\t\tsequence = 0;\n\t\t});\n\t\tdocument.on(\"beforeinput\", (evt, data) => {\n\t\t\tif (!this.isEnabled) return;\n\t\t\tconst { targetRanges, domEvent, inputType } = data;\n\t\t\tconst deleteEventSpec = DELETE_EVENT_TYPES[inputType];\n\t\t\tif (!deleteEventSpec) return;\n\t\t\tconst deleteData = {\n\t\t\t\tdirection: deleteEventSpec.direction,\n\t\t\t\tunit: deleteEventSpec.unit,\n\t\t\t\tsequence\n\t\t\t};\n\t\t\tif (deleteData.unit == DELETE_SELECTION) deleteData.selectionToRemove = view.createSelection(targetRanges[0]);\n\t\t\tif (inputType === \"deleteContentBackward\") {\n\t\t\t\tif (env.isAndroid) deleteData.sequence = 1;\n\t\t\t\tif (shouldUseTargetRanges(targetRanges)) {\n\t\t\t\t\tdeleteData.unit = DELETE_SELECTION;\n\t\t\t\t\tdeleteData.selectionToRemove = view.createSelection(targetRanges);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst eventInfo = new BubblingEventInfo(document, \"delete\", targetRanges[0]);\n\t\t\tdocument.fire(eventInfo, new ViewDocumentDomEventData(view, domEvent, deleteData));\n\t\t\tif (eventInfo.stop.called) evt.stop();\n\t\t});\n\t\tif (env.isBlink) enableChromeWorkaround(this);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving() {}\n};\n/**\n* Enables workaround for the issue https://github.com/ckeditor/ckeditor5/issues/11904.\n*/\nfunction enableChromeWorkaround(observer) {\n\tconst view = observer.view;\n\tconst document = view.document;\n\tlet pressedKeyCode = null;\n\tlet beforeInputReceived = false;\n\tdocument.on(\"keydown\", (evt, { keyCode }) => {\n\t\tpressedKeyCode = keyCode;\n\t\tbeforeInputReceived = false;\n\t});\n\tdocument.on(\"keyup\", (evt, { keyCode, domEvent }) => {\n\t\tconst selection = document.selection;\n\t\tconst shouldFireDeleteEvent = observer.isEnabled && keyCode == pressedKeyCode && isDeleteKeyCode(keyCode) && !selection.isCollapsed && !beforeInputReceived;\n\t\tpressedKeyCode = null;\n\t\tif (shouldFireDeleteEvent) {\n\t\t\tconst targetRange = selection.getFirstRange();\n\t\t\tconst eventInfo = new BubblingEventInfo(document, \"delete\", targetRange);\n\t\t\tconst deleteData = {\n\t\t\t\tunit: DELETE_SELECTION,\n\t\t\t\tdirection: getDeleteDirection(keyCode),\n\t\t\t\tselectionToRemove: selection\n\t\t\t};\n\t\t\tdocument.fire(eventInfo, new ViewDocumentDomEventData(view, domEvent, deleteData));\n\t\t}\n\t});\n\tdocument.on(\"beforeinput\", (evt, { inputType }) => {\n\t\tconst deleteEventSpec = DELETE_EVENT_TYPES[inputType];\n\t\tif (isDeleteKeyCode(pressedKeyCode) && deleteEventSpec && deleteEventSpec.direction == getDeleteDirection(pressedKeyCode)) beforeInputReceived = true;\n\t}, { priority: \"high\" });\n\tdocument.on(\"beforeinput\", (evt, { inputType, data }) => {\n\t\tif (pressedKeyCode == keyCodes.delete && inputType == \"insertText\" && data == \"\") evt.stop();\n\t}, { priority: \"high\" });\n\tfunction isDeleteKeyCode(keyCode) {\n\t\treturn keyCode == keyCodes.backspace || keyCode == keyCodes.delete;\n\t}\n\tfunction getDeleteDirection(keyCode) {\n\t\treturn keyCode == keyCodes.backspace ? DELETE_BACKWARD : DELETE_FORWARD;\n\t}\n}\n/**\n* Verifies whether the given target ranges cover more than a single character and should be used instead of a single code-point deletion.\n*/\nfunction shouldUseTargetRanges(targetRanges) {\n\tif (targetRanges.length != 1 || targetRanges[0].isCollapsed) return false;\n\tconst walker = targetRanges[0].getWalker({\n\t\tdirection: \"backward\",\n\t\tsingleCharacters: true,\n\t\tignoreElementEnd: true\n\t});\n\tlet count = 0;\n\tfor (const { nextPosition, item } of walker) {\n\t\tif (nextPosition.parent.is(\"$text\")) {\n\t\t\tconst data = nextPosition.parent.data;\n\t\t\tconst offset = nextPosition.offset;\n\t\t\tif (isInsideSurrogatePair(data, offset) || isInsideCombinedSymbol(data, offset) || isInsideEmojiSequence(data, offset)) continue;\n\t\t\tcount++;\n\t\t} else if (item.is(\"containerElement\") || item.is(\"emptyElement\")) count++;\n\t\tif (count > 1) return true;\n\t}\n\treturn false;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/delete\n*/\n/**\n* The delete and backspace feature. Handles keys such as <kbd>Delete</kbd> and <kbd>Backspace</kbd>, other\n* keystrokes and user actions that result in deleting content in the editor.\n*/\nvar Delete = class extends Plugin {\n\t/**\n\t* Whether pressing backspace should trigger undo action\n\t*/\n\t_undoOnBackspace;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Delete\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst modelDocument = editor.model.document;\n\t\tview.addObserver(DeleteObserver);\n\t\tthis._undoOnBackspace = false;\n\t\tconst deleteForwardCommand = new DeleteCommand(editor, \"forward\");\n\t\teditor.commands.add(\"deleteForward\", deleteForwardCommand);\n\t\teditor.commands.add(\"forwardDelete\", deleteForwardCommand);\n\t\teditor.commands.add(\"delete\", new DeleteCommand(editor, \"backward\"));\n\t\tthis.listenTo(viewDocument, \"delete\", (evt, data) => {\n\t\t\tif (!viewDocument.isComposing) data.preventDefault();\n\t\t\tconst { direction, sequence, selectionToRemove, unit } = data;\n\t\t\tconst commandName = direction === \"forward\" ? \"deleteForward\" : \"delete\";\n\t\t\tconst commandData = { sequence };\n\t\t\tif (unit == \"selection\") {\n\t\t\t\tconst modelRanges = Array.from(selectionToRemove.getRanges()).map((viewRange) => editor.editing.mapper.toModelRange(viewRange)).map((modelRange) => _tryFixingModelRange(modelRange, editor.model.schema) || modelRange);\n\t\t\t\tcommandData.selection = editor.model.createSelection(modelRanges);\n\t\t\t} else commandData.unit = unit;\n\t\t\teditor.execute(commandName, commandData);\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(viewDocument, \"keydown\", (evt, data) => {\n\t\t\tif (viewDocument.isComposing || data.keyCode != keyCodes.backspace || !modelDocument.selection.isCollapsed) return;\n\t\t\tconst ancestorLimit = editor.model.schema.getLimitElement(modelDocument.selection);\n\t\t\tconst limitStartPosition = editor.model.createPositionAt(ancestorLimit, 0);\n\t\t\tif (limitStartPosition.isTouching(modelDocument.selection.getFirstPosition())) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tconst modelRange = editor.model.schema.getNearestSelectionRange(limitStartPosition, \"forward\");\n\t\t\t\tif (!modelRange) return;\n\t\t\t\tconst viewSelection = view.createSelection(editor.editing.mapper.toViewRange(modelRange));\n\t\t\t\tconst targetRange = viewSelection.getFirstRange();\n\t\t\t\tconst eventInfo = new BubblingEventInfo(document, \"delete\", targetRange);\n\t\t\t\tconst deleteData = {\n\t\t\t\t\tunit: \"selection\",\n\t\t\t\t\tdirection: \"backward\",\n\t\t\t\t\tselectionToRemove: viewSelection\n\t\t\t\t};\n\t\t\t\tviewDocument.fire(eventInfo, new ViewDocumentDomEventData(view, data.domEvent, deleteData));\n\t\t\t}\n\t\t});\n\t\tif (this.editor.plugins.has(\"UndoEditing\")) {\n\t\t\tthis.listenTo(viewDocument, \"delete\", (evt, data) => {\n\t\t\t\tif (this._undoOnBackspace && data.direction == \"backward\" && data.sequence == 1 && data.unit == \"codePoint\") {\n\t\t\t\t\tthis._undoOnBackspace = false;\n\t\t\t\t\teditor.execute(\"undo\");\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t}, { context: \"$capture\" });\n\t\t\tthis.listenTo(modelDocument, \"change\", () => {\n\t\t\t\tthis._undoOnBackspace = false;\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* If the next user action after calling this method is pressing backspace, it would undo the last change.\n\t*\n\t* Requires {@link module:undo/undoediting~UndoEditing} plugin. If not loaded, does nothing.\n\t*/\n\trequestUndoOnBackspace() {\n\t\tif (this.editor.plugins.has(\"UndoEditing\")) this._undoOnBackspace = true;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/typing\n*/\n/**\n* The typing feature. It handles typing.\n*\n* This is a \"glue\" plugin which loads the {@link module:typing/input~Input} and {@link module:typing/delete~Delete}\n* plugins.\n*/\nvar Typing = class extends Plugin {\n\tstatic get requires() {\n\t\treturn [Input, Delete];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Typing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* Returns the last text line from the given range.\n*\n* \"The last text line\" is understood as text (from one or more text nodes) which is limited either by a parent block\n* or by inline elements (e.g. `<softBreak>`).\n*\n* ```ts\n* const rangeToCheck = model.createRange(\n* \tmodel.createPositionAt( paragraph, 0 ),\n* \tmodel.createPositionAt( paragraph, 'end' )\n* );\n*\n* const { text, range } = getLastTextLine( rangeToCheck, model );\n* ```\n*\n* For model below, the returned `text` will be \"Foo bar baz\" and `range` will be set on whole `<paragraph>` content:\n*\n* ```xml\n* <paragraph>Foo bar baz<paragraph>\n* ```\n*\n* However, in below case, `text` will be set to \"baz\" and `range` will be set only on \"baz\".\n*\n* ```xml\n* <paragraph>Foo<softBreak></softBreak>bar<softBreak></softBreak>baz<paragraph>\n* ```\n*/\nfunction getLastTextLine(range, model) {\n\tlet start = range.start;\n\treturn {\n\t\ttext: Array.from(range.getWalker({ ignoreElementEnd: false })).reduce((rangeText, { item }) => {\n\t\t\tif (!(item.is(\"$text\") || item.is(\"$textProxy\"))) {\n\t\t\t\tstart = model.createPositionAfter(item);\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\treturn rangeText + item.data;\n\t\t}, \"\"),\n\t\trange: model.createRange(start, range.end)\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/textwatcher\n*/\nconst TextWatcherBase = /* #__PURE__ */ ObservableMixin();\n/**\n* The text watcher feature.\n*\n* Fires the {@link module:typing/textwatcher~TextWatcher#event:matched:data `matched:data`},\n* {@link module:typing/textwatcher~TextWatcher#event:matched:selection `matched:selection`} and\n* {@link module:typing/textwatcher~TextWatcher#event:unmatched `unmatched`} events on typing or selection changes.\n*/\nvar TextWatcher = class extends TextWatcherBase {\n\t/**\n\t* The editor's model.\n\t*/\n\tmodel;\n\t/**\n\t* The function used to match the text.\n\t*\n\t* The test callback can return 3 values:\n\t*\n\t* * `false` if there is no match,\n\t* * `true` if there is a match,\n\t* * an object if there is a match and we want to pass some additional information to the {@link #event:matched:data} event.\n\t*/\n\ttestCallback;\n\t/**\n\t* Whether there is a match currently.\n\t*/\n\t_hasMatch;\n\t/**\n\t* Creates a text watcher instance.\n\t*\n\t* @param testCallback See {@link module:typing/textwatcher~TextWatcher#testCallback}.\n\t*/\n\tconstructor(model, testCallback) {\n\t\tsuper();\n\t\tthis.model = model;\n\t\tthis.testCallback = testCallback;\n\t\tthis._hasMatch = false;\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.on(\"change:isEnabled\", () => {\n\t\t\tif (this.isEnabled) this._startListening();\n\t\t\telse {\n\t\t\t\tthis.stopListening(model.document.selection);\n\t\t\t\tthis.stopListening(model.document);\n\t\t\t}\n\t\t});\n\t\tthis._startListening();\n\t}\n\t/**\n\t* Flag indicating whether there is a match currently.\n\t*/\n\tget hasMatch() {\n\t\treturn this._hasMatch;\n\t}\n\t/**\n\t* Starts listening to the editor for typing and selection events.\n\t*/\n\t_startListening() {\n\t\tconst document = this.model.document;\n\t\tthis.listenTo(document.selection, \"change:range\", (evt, { directChange }) => {\n\t\t\tif (!directChange) return;\n\t\t\tif (!document.selection.isCollapsed) {\n\t\t\t\tif (this.hasMatch) {\n\t\t\t\t\tthis.fire(\"unmatched\");\n\t\t\t\t\tthis._hasMatch = false;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._evaluateTextBeforeSelection(\"selection\");\n\t\t});\n\t\tthis.listenTo(document, \"change:data\", (evt, batch) => {\n\t\t\tif (batch.isUndo || !batch.isLocal) return;\n\t\t\tthis._evaluateTextBeforeSelection(\"data\", { batch });\n\t\t});\n\t}\n\t/**\n\t* Checks the editor content for matched text.\n\t*\n\t* @fires matched:data\n\t* @fires matched:selection\n\t* @fires unmatched\n\t*\n\t* @param suffix A suffix used for generating the event name.\n\t* @param data Data object for event.\n\t*/\n\t_evaluateTextBeforeSelection(suffix, data = {}) {\n\t\tconst model = this.model;\n\t\tconst selection = model.document.selection;\n\t\tconst rangeBeforeSelection = model.createRange(model.createPositionAt(selection.focus.parent, 0), selection.focus);\n\t\tconst { text, range } = getLastTextLine(rangeBeforeSelection, model);\n\t\tconst testResult = this.testCallback(text);\n\t\tif (!testResult && this.hasMatch) this.fire(\"unmatched\");\n\t\tthis._hasMatch = !!testResult;\n\t\tif (testResult) {\n\t\t\tconst eventData = Object.assign(data, {\n\t\t\t\ttext,\n\t\t\t\trange\n\t\t\t});\n\t\t\tif (typeof testResult == \"object\") Object.assign(eventData, testResult);\n\t\t\tthis.fire(`matched:${suffix}`, eventData);\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/twostepcaretmovement\n*/\n/**\n* This plugin enables the two-step caret (phantom) movement behavior for\n* {@link module:typing/twostepcaretmovement~TwoStepCaretMovement#registerAttribute registered attributes}\n* on arrow right (<kbd>→</kbd>) and left (<kbd>←</kbd>) key press.\n*\n* Thanks to this (phantom) caret movement the user is able to type before/after as well as at the\n* beginning/end of an attribute.\n*\n* **Note:** This plugin support right–to–left (Arabic, Hebrew, etc.) content by mirroring its behavior\n* but for the sake of simplicity examples showcase only left–to–right use–cases.\n*\n* # Forward movement\n*\n* ## \"Entering\" an attribute:\n*\n* When this plugin is enabled and registered for the `a` attribute and the selection is right before it\n* (at the attribute boundary), pressing the right arrow key will not move the selection but update its\n* attributes accordingly:\n*\n* * When enabled:\n*\n* ```xml\n* foo{}<$text a=\"true\">bar</$text>\n* ```\n*\n* \t<kbd>→</kbd>\n*\n* ```xml\n* foo<$text a=\"true\">{}bar</$text>\n* ```\n*\n* * When disabled:\n*\n* ```xml\n* foo{}<$text a=\"true\">bar</$text>\n* ```\n*\n* \t<kbd>→</kbd>\n*\n* ```xml\n* foo<$text a=\"true\">b{}ar</$text>\n* ```\n*\n*\n* ## \"Leaving\" an attribute:\n*\n* * When enabled:\n*\n* ```xml\n* <$text a=\"true\">bar{}</$text>baz\n* ```\n*\n* \t<kbd>→</kbd>\n*\n* ```xml\n* <$text a=\"true\">bar</$text>{}baz\n* ```\n*\n* * When disabled:\n*\n* ```xml\n* <$text a=\"true\">bar{}</$text>baz\n* ```\n*\n* \t<kbd>→</kbd>\n*\n* ```xml\n* <$text a=\"true\">bar</$text>b{}az\n* ```\n*\n* # Backward movement\n*\n* * When enabled:\n*\n* ```xml\n* <$text a=\"true\">bar</$text>{}baz\n* ```\n*\n* \t<kbd>←</kbd>\n*\n* ```xml\n* <$text a=\"true\">bar{}</$text>baz\n* ```\n*\n* * When disabled:\n*\n* ```xml\n* <$text a=\"true\">bar</$text>{}baz\n* ```\n*\n* \t<kbd>←</kbd>\n*\n* ```xml\n* <$text a=\"true\">ba{}r</$text>b{}az\n* ```\n*\n* # Multiple attributes\n*\n* * When enabled and many attributes starts or ends at the same position:\n*\n* ```xml\n* <$text a=\"true\" b=\"true\">bar</$text>{}baz\n* ```\n*\n* \t<kbd>←</kbd>\n*\n* ```xml\n* <$text a=\"true\" b=\"true\">bar{}</$text>baz\n* ```\n*\n* * When enabled and one procedes another:\n*\n* ```xml\n* <$text a=\"true\">bar</$text><$text b=\"true\">{}bar</$text>\n* ```\n*\n* \t<kbd>←</kbd>\n*\n* ```xml\n* <$text a=\"true\">bar{}</$text><$text b=\"true\">bar</$text>\n* ```\n*\n*/\nvar TwoStepCaretMovement = class extends Plugin {\n\t/**\n\t* A set of attributes to handle.\n\t*/\n\tattributes;\n\t/**\n\t* The current UID of the overridden gravity, as returned by\n\t* {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity}.\n\t*/\n\t_overrideUid;\n\t/**\n\t* A flag indicating that the automatic gravity restoration should not happen upon the next\n\t* gravity restoration.\n\t* {@link module:engine/model/selection~ModelSelection#event:change:range} event.\n\t*/\n\t_isNextGravityRestorationSkipped = false;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TwoStepCaretMovement\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.attributes = /* @__PURE__ */ new Set();\n\t\tthis._overrideUid = null;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst locale = editor.locale;\n\t\tconst modelSelection = model.document.selection;\n\t\tthis.listenTo(view.document, \"arrowKey\", (evt, data) => {\n\t\t\tif (!modelSelection.isCollapsed) return;\n\t\t\tif (data.shiftKey || data.altKey || data.ctrlKey) return;\n\t\t\tconst arrowRightPressed = data.keyCode == keyCodes.arrowright;\n\t\t\tconst arrowLeftPressed = data.keyCode == keyCodes.arrowleft;\n\t\t\tif (!arrowRightPressed && !arrowLeftPressed) return;\n\t\t\tconst contentDirection = locale.contentLanguageDirection;\n\t\t\tlet isMovementHandled;\n\t\t\tif (contentDirection === \"ltr\" && arrowRightPressed || contentDirection === \"rtl\" && arrowLeftPressed) isMovementHandled = this._handleForwardMovement(data);\n\t\t\telse isMovementHandled = this._handleBackwardMovement(data);\n\t\t\tif (isMovementHandled === true) evt.stop();\n\t\t}, {\n\t\t\tcontext: \"$text\",\n\t\t\tpriority: \"highest\"\n\t\t});\n\t\tthis.listenTo(modelSelection, \"change:range\", (evt, data) => {\n\t\t\tif (this._isNextGravityRestorationSkipped) {\n\t\t\t\tthis._isNextGravityRestorationSkipped = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._isGravityOverridden) return;\n\t\t\tif (!data.directChange && isBetweenDifferentAttributes(modelSelection.getFirstPosition(), this.attributes)) return;\n\t\t\tthis._restoreGravity();\n\t\t});\n\t\tthis._enableClickingAfterNode();\n\t\tthis._enableInsertContentSelectionAttributesFixer();\n\t\tthis._handleDeleteContentAfterNode();\n\t}\n\t/**\n\t* Registers a given attribute for the two-step caret movement.\n\t*\n\t* @param attribute Name of the attribute to handle.\n\t*/\n\tregisterAttribute(attribute) {\n\t\tthis.attributes.add(attribute);\n\t}\n\t/**\n\t* Updates the document selection and the view according to the two–step caret movement state\n\t* when moving **forwards**. Executed upon `keypress` in the {@link module:engine/view/view~EditingView}.\n\t*\n\t* @internal\n\t* @param eventData Data of the key press.\n\t* @returns `true` when the handler prevented caret movement.\n\t*/\n\t_handleForwardMovement(eventData) {\n\t\tconst attributes = this.attributes;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst position = selection.getFirstPosition();\n\t\tif (this._isGravityOverridden) return false;\n\t\tif (position.isAtStart && hasAnyAttribute(selection, attributes)) return false;\n\t\tif (isBetweenDifferentAttributes(position, attributes)) {\n\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\tif (hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes, true)) clearSelectionAttributes(model, attributes);\n\t\t\telse this._overrideGravity();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Updates the document selection and the view according to the two–step caret movement state\n\t* when moving **backwards**. Executed upon `keypress` in the {@link module:engine/view/view~EditingView}.\n\t*\n\t* @internal\n\t* @param eventData Data of the key press.\n\t* @returns `true` when the handler prevented caret movement\n\t*/\n\t_handleBackwardMovement(eventData) {\n\t\tconst attributes = this.attributes;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst position = selection.getFirstPosition();\n\t\tif (this._isGravityOverridden) {\n\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\tthis._restoreGravity();\n\t\t\tif (isBetweenDifferentAttributes(position, attributes, true)) clearSelectionAttributes(model, attributes);\n\t\t\telse setSelectionAttributesFromTheNodeBefore(model, attributes, position);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (position.isAtStart) {\n\t\t\t\tif (hasAnyAttribute(selection, attributes)) {\n\t\t\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\t\t\tsetSelectionAttributesFromTheNodeBefore(model, attributes, position);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes, true)) {\n\t\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\t\tsetSelectionAttributesFromTheNodeBefore(model, attributes, position);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (isStepAfterAnyAttributeBoundary(position, attributes)) {\n\t\t\t\tif (position.isAtEnd && !hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes)) {\n\t\t\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\t\t\tsetSelectionAttributesFromTheNodeBefore(model, attributes, position);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tthis._isNextGravityRestorationSkipped = true;\n\t\t\t\tthis._overrideGravity();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Starts listening to {@link module:engine/view/document~ViewDocument#event:mousedown} and\n\t* {@link module:engine/view/document~ViewDocument#event:selectionChange} and puts the selection before/after a 2-step node\n\t* if clicked at the beginning/ending of the 2-step node.\n\t*\n\t* The purpose of this action is to allow typing around the 2-step node directly after a click.\n\t*\n\t* See https://github.com/ckeditor/ckeditor5/issues/1016.\n\t*/\n\t_enableClickingAfterNode() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst document = editor.editing.view.document;\n\t\teditor.editing.view.addObserver(MouseObserver);\n\t\teditor.editing.view.addObserver(TouchObserver);\n\t\tlet touched = false;\n\t\tlet clicked = false;\n\t\tthis.listenTo(document, \"touchstart\", () => {\n\t\t\tclicked = false;\n\t\t\ttouched = true;\n\t\t});\n\t\tthis.listenTo(document, \"mousedown\", () => {\n\t\t\tclicked = true;\n\t\t});\n\t\tthis.listenTo(document, \"selectionChange\", () => {\n\t\t\tconst attributes = this.attributes;\n\t\t\tif (!clicked && !touched) return;\n\t\t\tclicked = false;\n\t\t\ttouched = false;\n\t\t\tif (!selection.isCollapsed) return;\n\t\t\tif (!hasAnyAttribute(selection, attributes)) return;\n\t\t\tconst position = selection.getFirstPosition();\n\t\t\tif (!isBetweenDifferentAttributes(position, attributes)) return;\n\t\t\tif (position.isAtStart || isBetweenDifferentAttributes(position, attributes, true)) clearSelectionAttributes(model, attributes);\n\t\t\telse if (!this._isGravityOverridden) this._overrideGravity();\n\t\t});\n\t}\n\t/**\n\t* Starts listening to {@link module:engine/model/model~Model#event:insertContent} and corrects the model\n\t* selection attributes if the selection is at the end of a two-step node after inserting the content.\n\t*\n\t* The purpose of this action is to improve the overall UX because the user is no longer \"trapped\" by the\n\t* two-step attribute of the selection, and they can type a \"clean\" (`linkHref`–less) text right away.\n\t*\n\t* See https://github.com/ckeditor/ckeditor5/issues/6053.\n\t*/\n\t_enableInsertContentSelectionAttributesFixer() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst attributes = this.attributes;\n\t\tthis.listenTo(model, \"insertContent\", () => {\n\t\t\tconst position = selection.getFirstPosition();\n\t\t\tif (hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes)) clearSelectionAttributes(model, attributes);\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether\n\t* removing a content right after the tow-step attribute.\n\t*\n\t* If so, the selection should not preserve the two-step attribute. However, if\n\t* the {@link module:typing/twostepcaretmovement~TwoStepCaretMovement} plugin is active and\n\t* the selection has the two-step attribute due to overridden gravity (at the end), the two-step attribute should stay untouched.\n\t*\n\t* The purpose of this action is to allow removing the link text and keep the selection outside the link.\n\t*\n\t* See https://github.com/ckeditor/ckeditor5/issues/7521.\n\t*/\n\t_handleDeleteContentAfterNode() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst view = editor.editing.view;\n\t\tlet isBackspace = false;\n\t\tlet shouldPreserveAttributes = false;\n\t\tthis.listenTo(view.document, \"delete\", (evt, data) => {\n\t\t\tisBackspace = data.direction === \"backward\";\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(model, \"deleteContent\", () => {\n\t\t\tif (!isBackspace) return;\n\t\t\tconst position = selection.getFirstPosition();\n\t\t\tshouldPreserveAttributes = hasAnyAttribute(selection, this.attributes) && !isStepAfterAnyAttributeBoundary(position, this.attributes);\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(model, \"deleteContent\", () => {\n\t\t\tif (!isBackspace) return;\n\t\t\tisBackspace = false;\n\t\t\tif (shouldPreserveAttributes) return;\n\t\t\teditor.model.enqueueChange(() => {\n\t\t\t\tconst position = selection.getFirstPosition();\n\t\t\t\tif (hasAnyAttribute(selection, this.attributes) && isBetweenDifferentAttributes(position, this.attributes)) {\n\t\t\t\t\tif (position.isAtStart || isBetweenDifferentAttributes(position, this.attributes, true)) clearSelectionAttributes(model, this.attributes);\n\t\t\t\t\telse if (!this._isGravityOverridden) this._overrideGravity();\n\t\t\t\t}\n\t\t\t});\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* `true` when the gravity is overridden for the plugin.\n\t*/\n\tget _isGravityOverridden() {\n\t\treturn !!this._overrideUid;\n\t}\n\t/**\n\t* Overrides the gravity using the {@link module:engine/model/writer~ModelWriter model writer}\n\t* and stores the information about this fact in the {@link #_overrideUid}.\n\t*\n\t* A shorthand for {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity}.\n\t*/\n\t_overrideGravity() {\n\t\tthis._overrideUid = this.editor.model.change((writer) => {\n\t\t\treturn writer.overrideSelectionGravity();\n\t\t});\n\t}\n\t/**\n\t* Restores the gravity using the {@link module:engine/model/writer~ModelWriter model writer}.\n\t*\n\t* A shorthand for {@link module:engine/model/writer~ModelWriter#restoreSelectionGravity}.\n\t*/\n\t_restoreGravity() {\n\t\tthis.editor.model.change((writer) => {\n\t\t\twriter.restoreSelectionGravity(this._overrideUid);\n\t\t\tthis._overrideUid = null;\n\t\t});\n\t}\n};\n/**\n* Checks whether the selection has any of given attributes.\n*/\nfunction hasAnyAttribute(selection, attributes) {\n\tfor (const observedAttribute of attributes) if (selection.hasAttribute(observedAttribute)) return true;\n\treturn false;\n}\n/**\n* Applies the given attributes to the current selection using using the\n* values from the node before the current position. Uses\n* the {@link module:engine/model/writer~ModelWriter model writer}.\n*/\nfunction setSelectionAttributesFromTheNodeBefore(model, attributes, position) {\n\tconst nodeBefore = position.nodeBefore;\n\tmodel.change((writer) => {\n\t\tif (nodeBefore) {\n\t\t\tconst attributes = [];\n\t\t\tconst isInlineObject = model.schema.isObject(nodeBefore) && model.schema.isInline(nodeBefore);\n\t\t\tfor (const [key, value] of nodeBefore.getAttributes()) if (model.schema.checkAttribute(\"$text\", key) && (!isInlineObject || model.schema.getAttributeProperties(key).copyFromObject !== false)) attributes.push([key, value]);\n\t\t\twriter.setSelectionAttribute(attributes);\n\t\t} else writer.removeSelectionAttribute(attributes);\n\t});\n}\n/**\n* Removes 2-SCM attributes from the selection.\n*/\nfunction clearSelectionAttributes(model, attributes) {\n\tmodel.change((writer) => {\n\t\twriter.removeSelectionAttribute(attributes);\n\t});\n}\n/**\n* Prevents the caret movement in the view by calling `preventDefault` on the event data.\n*\n* @alias data.preventDefault\n*/\nfunction preventCaretMovement(data) {\n\tdata.preventDefault();\n}\n/**\n* Checks whether the step before `isBetweenDifferentAttributes()`.\n*/\nfunction isStepAfterAnyAttributeBoundary(position, attributes) {\n\treturn isBetweenDifferentAttributes(position.getShiftedBy(-1), attributes);\n}\n/**\n* Checks whether the given position is between different values of given attributes.\n*/\nfunction isBetweenDifferentAttributes(position, attributes, isStrict = false) {\n\tconst { nodeBefore, nodeAfter } = position;\n\tfor (const observedAttribute of attributes) {\n\t\tconst attrBefore = nodeBefore ? nodeBefore.getAttribute(observedAttribute) : void 0;\n\t\tconst attrAfter = nodeAfter ? nodeAfter.getAttribute(observedAttribute) : void 0;\n\t\tif (isStrict && (attrBefore === void 0 || attrAfter === void 0)) continue;\n\t\tif (attrAfter !== attrBefore) return true;\n\t}\n\treturn false;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/texttransformation\n*/\nconst TRANSFORMATIONS = {\n\tcopyright: {\n\t\tfrom: \"(c)\",\n\t\tto: \"©\"\n\t},\n\tregisteredTrademark: {\n\t\tfrom: \"(r)\",\n\t\tto: \"®\"\n\t},\n\ttrademark: {\n\t\tfrom: \"(tm)\",\n\t\tto: \"™\"\n\t},\n\toneHalf: {\n\t\tfrom: /(^|[^/a-z0-9])(1\\/2)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"½\",\n\t\t\tnull\n\t\t]\n\t},\n\toneThird: {\n\t\tfrom: /(^|[^/a-z0-9])(1\\/3)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"⅓\",\n\t\t\tnull\n\t\t]\n\t},\n\ttwoThirds: {\n\t\tfrom: /(^|[^/a-z0-9])(2\\/3)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"⅔\",\n\t\t\tnull\n\t\t]\n\t},\n\toneForth: {\n\t\tfrom: /(^|[^/a-z0-9])(1\\/4)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"¼\",\n\t\t\tnull\n\t\t]\n\t},\n\tthreeQuarters: {\n\t\tfrom: /(^|[^/a-z0-9])(3\\/4)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"¾\",\n\t\t\tnull\n\t\t]\n\t},\n\tlessThanOrEqual: {\n\t\tfrom: \"<=\",\n\t\tto: \"≤\"\n\t},\n\tgreaterThanOrEqual: {\n\t\tfrom: \">=\",\n\t\tto: \"≥\"\n\t},\n\tnotEqual: {\n\t\tfrom: \"!=\",\n\t\tto: \"≠\"\n\t},\n\tarrowLeft: {\n\t\tfrom: \"<-\",\n\t\tto: \"←\"\n\t},\n\tarrowRight: {\n\t\tfrom: \"->\",\n\t\tto: \"→\"\n\t},\n\thorizontalEllipsis: {\n\t\tfrom: \"...\",\n\t\tto: \"…\"\n\t},\n\tenDash: {\n\t\tfrom: /(^| )(--)( )$/,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"–\",\n\t\t\tnull\n\t\t]\n\t},\n\temDash: {\n\t\tfrom: /(^| )(---)( )$/,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"—\",\n\t\t\tnull\n\t\t]\n\t},\n\tquotesPrimary: {\n\t\tfrom: buildQuotesRegExp(\"\\\"\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"“\",\n\t\t\tnull,\n\t\t\t\"”\"\n\t\t]\n\t},\n\tquotesSecondary: {\n\t\tfrom: buildQuotesRegExp(\"'\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"‘\",\n\t\t\tnull,\n\t\t\t\"’\"\n\t\t]\n\t},\n\tquotesPrimaryEnGb: {\n\t\tfrom: buildQuotesRegExp(\"'\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"‘\",\n\t\t\tnull,\n\t\t\t\"’\"\n\t\t]\n\t},\n\tquotesSecondaryEnGb: {\n\t\tfrom: buildQuotesRegExp(\"\\\"\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"“\",\n\t\t\tnull,\n\t\t\t\"”\"\n\t\t]\n\t},\n\tquotesPrimaryPl: {\n\t\tfrom: buildQuotesRegExp(\"\\\"\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"„\",\n\t\t\tnull,\n\t\t\t\"”\"\n\t\t]\n\t},\n\tquotesSecondaryPl: {\n\t\tfrom: buildQuotesRegExp(\"'\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"‚\",\n\t\t\tnull,\n\t\t\t\"’\"\n\t\t]\n\t}\n};\nconst TRANSFORMATION_GROUPS = {\n\tsymbols: [\n\t\t\"copyright\",\n\t\t\"registeredTrademark\",\n\t\t\"trademark\"\n\t],\n\tmathematical: [\n\t\t\"oneHalf\",\n\t\t\"oneThird\",\n\t\t\"twoThirds\",\n\t\t\"oneForth\",\n\t\t\"threeQuarters\",\n\t\t\"lessThanOrEqual\",\n\t\t\"greaterThanOrEqual\",\n\t\t\"notEqual\",\n\t\t\"arrowLeft\",\n\t\t\"arrowRight\"\n\t],\n\ttypography: [\n\t\t\"horizontalEllipsis\",\n\t\t\"enDash\",\n\t\t\"emDash\"\n\t],\n\tquotes: [\"quotesPrimary\", \"quotesSecondary\"]\n};\nconst DEFAULT_TRANSFORMATIONS = [\n\t\"symbols\",\n\t\"mathematical\",\n\t\"typography\",\n\t\"quotes\"\n];\n/**\n* The text transformation plugin.\n*/\nvar TextTransformation = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Delete, Input];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TextTransformation\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"typing\", { transformations: { include: DEFAULT_TRANSFORMATIONS } });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst modelSelection = this.editor.model.document.selection;\n\t\tmodelSelection.on(\"change:range\", () => {\n\t\t\tconst anchor = modelSelection.anchor;\n\t\t\tconst isInCodeBlock = !!anchor && anchor.parent.is(\"element\", \"codeBlock\");\n\t\t\tconst isInInlineCode = modelSelection.hasAttribute(\"code\");\n\t\t\tthis.isEnabled = !(isInCodeBlock || isInInlineCode);\n\t\t});\n\t\tthis._enableTransformationWatchers();\n\t}\n\t/**\n\t* Create new TextWatcher listening to the editor for typing and selection events.\n\t*/\n\t_enableTransformationWatchers() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst deletePlugin = editor.plugins.get(\"Delete\");\n\t\tconst normalizedTransformations = normalizeTransformations(editor.config.get(\"typing.transformations\"));\n\t\tconst testCallback = (text) => {\n\t\t\tfor (const normalizedTransformation of normalizedTransformations) if (normalizedTransformation.from.test(text)) return { normalizedTransformation };\n\t\t};\n\t\tconst watcher = new TextWatcher(editor.model, testCallback);\n\t\twatcher.on(\"matched:data\", (evt, data) => {\n\t\t\tif (!data.batch.isTyping) return;\n\t\t\tconst { from, to } = data.normalizedTransformation;\n\t\t\tconst matches = from.exec(data.text);\n\t\t\tconst replaces = to(matches.slice(1));\n\t\t\tconst matchedRange = data.range;\n\t\t\tlet changeIndex = matches.index;\n\t\t\tmodel.enqueueChange((writer) => {\n\t\t\t\tfor (let i = 1; i < matches.length; i++) {\n\t\t\t\t\tconst match = matches[i];\n\t\t\t\t\tconst replaceWith = replaces[i - 1];\n\t\t\t\t\tif (replaceWith == null) {\n\t\t\t\t\t\tchangeIndex += match.length;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst replacePosition = matchedRange.start.getShiftedBy(changeIndex);\n\t\t\t\t\tconst replaceRange = model.createRange(replacePosition, replacePosition.getShiftedBy(match.length));\n\t\t\t\t\tconst attributes = getTextAttributesAfterPosition(replacePosition);\n\t\t\t\t\tmodel.insertContent(writer.createText(replaceWith, attributes), replaceRange);\n\t\t\t\t\tchangeIndex += replaceWith.length;\n\t\t\t\t}\n\t\t\t\tmodel.enqueueChange(() => {\n\t\t\t\t\tdeletePlugin.requestUndoOnBackspace();\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\twatcher.bind(\"isEnabled\").to(this);\n\t}\n};\n/**\n* Normalizes the configuration `from` parameter value.\n* The normalized value for the `from` parameter is a RegExp instance. If the passed `from` is already a RegExp instance,\n* it is returned unchanged.\n*/\nfunction normalizeFrom(from) {\n\tif (typeof from == \"string\") return new RegExp(`(${escapeRegExp(from)})$`);\n\treturn from;\n}\n/**\n* Normalizes the configuration `to` parameter value.\n* The normalized value for the `to` parameter is a function that takes an array and returns an array. See more in the\n* configuration description. If the passed `to` is already a function, it is returned unchanged.\n*/\nfunction normalizeTo(to) {\n\tif (typeof to == \"string\") return () => [to];\n\telse if (to instanceof Array) return () => to;\n\treturn to;\n}\n/**\n* For given `position` returns attributes for the text that is after that position.\n* The text can be in the same text node as the position (`foo[]bar`) or in the next text node (`foo[]<$text bold=\"true\">bar</$text>`).\n*/\nfunction getTextAttributesAfterPosition(position) {\n\treturn (position.textNode ? position.textNode : position.nodeAfter).getAttributes();\n}\n/**\n* Returns a RegExp pattern string that detects a sentence inside a quote.\n*\n* @param quoteCharacter The character to create a pattern for.\n*/\nfunction buildQuotesRegExp(quoteCharacter) {\n\treturn new RegExp(`(^|\\\\s)(${quoteCharacter})([^${quoteCharacter}]*)(${quoteCharacter})$`);\n}\n/**\n* Reads text transformation config and returns normalized array of transformations objects.\n*/\nfunction normalizeTransformations(config) {\n\tconst extra = config.extra || [];\n\tconst remove = config.remove || [];\n\tconst isNotRemoved = (transformation) => !remove.includes(transformation);\n\treturn expandGroupsAndRemoveDuplicates(config.include.concat(extra).filter(isNotRemoved)).filter(isNotRemoved).map((transformation) => typeof transformation == \"string\" && TRANSFORMATIONS[transformation] ? TRANSFORMATIONS[transformation] : transformation).filter((transformation) => typeof transformation === \"object\").map((transformation) => ({\n\t\tfrom: normalizeFrom(transformation.from),\n\t\tto: normalizeTo(transformation.to)\n\t}));\n}\n/**\n* Reads definitions and expands named groups if needed to transformation names.\n* This method also removes duplicated named transformations if any.\n*/\nfunction expandGroupsAndRemoveDuplicates(definitions) {\n\tconst definedTransformations = /* @__PURE__ */ new Set();\n\tfor (const transformationOrGroup of definitions) if (typeof transformationOrGroup == \"string\" && TRANSFORMATION_GROUPS[transformationOrGroup]) for (const transformation of TRANSFORMATION_GROUPS[transformationOrGroup]) definedTransformations.add(transformation);\n\telse definedTransformations.add(transformationOrGroup);\n\treturn Array.from(definedTransformations);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* Returns a model range that covers all consecutive nodes with the same `attributeName` and its `value`\n* that intersect the given `position`.\n*\n* It can be used e.g. to get the entire range on which the `linkHref` attribute needs to be changed when having a\n* selection inside a link.\n*\n* @param position The start position.\n* @param attributeName The attribute name.\n* @param value The attribute value.\n* @param model The model instance.\n* @returns The link range.\n*/\nfunction findAttributeRange(position, attributeName, value, model) {\n\treturn model.createRange(findAttributeRangeBound(position, attributeName, value, true, model), findAttributeRangeBound(position, attributeName, value, false, model));\n}\n/**\n* Walks forward or backward (depends on the `lookBack` flag), node by node, as long as they have the same attribute value\n* and returns a position just before or after (depends on the `lookBack` flag) the last matched node.\n*\n* @param position The start position.\n* @param attributeName The attribute name.\n* @param value The attribute value.\n* @param lookBack Whether the walk direction is forward (`false`) or backward (`true`).\n* @returns The position just before the last matched node.\n*/\nfunction findAttributeRangeBound(position, attributeName, value, lookBack, model) {\n\tlet node = position.textNode || (lookBack ? position.nodeBefore : position.nodeAfter);\n\tlet lastNode = null;\n\twhile (node && node.getAttribute(attributeName) == value) {\n\t\tlastNode = node;\n\t\tnode = lookBack ? node.previousSibling : node.nextSibling;\n\t}\n\treturn lastNode ? model.createPositionAt(lastNode, lookBack ? \"before\" : \"after\") : position;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module typing/utils/inlinehighlight\n*/\n/**\n* Adds a visual highlight style to an attribute element in which the selection is anchored.\n* Together with two-step caret movement, they indicate that the user is typing inside the element.\n*\n* Highlight is turned on by adding the given class to the attribute element in the view:\n*\n* * The class is removed before the conversion has started, as callbacks added with the `'highest'` priority\n* to {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} events.\n* * The class is added in the view post fixer, after other changes in the model tree were converted to the view.\n*\n* This way, adding and removing the highlight does not interfere with conversion.\n*\n* Usage:\n*\n* ```ts\n* import { inlineHighlight } from '@ckeditor/ckeditor5-typing/src/utils/inlinehighlight';\n*\n* // Make `ck-link_selected` class be applied on an `a` element\n* // whenever the corresponding `linkHref` attribute element is selected.\n* inlineHighlight( editor, 'linkHref', 'a', 'ck-link_selected' );\n* ```\n*\n* @param editor The editor instance.\n* @param attributeName The attribute name to check.\n* @param tagName The tagName of a view item.\n* @param className The class name to apply in the view.\n*/\nfunction inlineHighlight(editor, attributeName, tagName, className) {\n\tconst view = editor.editing.view;\n\tconst highlightedElements = /* @__PURE__ */ new Set();\n\tview.document.registerPostFixer((writer) => {\n\t\tconst selection = editor.model.document.selection;\n\t\tlet changed = false;\n\t\tif (selection.hasAttribute(attributeName)) {\n\t\t\tconst modelRange = findAttributeRange(selection.getFirstPosition(), attributeName, selection.getAttribute(attributeName), editor.model);\n\t\t\tconst viewRange = editor.editing.mapper.toViewRange(modelRange);\n\t\t\tfor (const item of viewRange.getItems()) if (item.is(\"element\", tagName) && !item.hasClass(className)) {\n\t\t\t\twriter.addClass(className, item);\n\t\t\t\thighlightedElements.add(item);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t});\n\teditor.conversion.for(\"editingDowncast\").add((dispatcher) => {\n\t\tdispatcher.on(\"insert\", removeHighlight, { priority: \"highest\" });\n\t\tdispatcher.on(\"remove\", removeHighlight, { priority: \"highest\" });\n\t\tdispatcher.on(\"attribute\", removeHighlight, { priority: \"highest\" });\n\t\tdispatcher.on(\"selection\", removeHighlight, { priority: \"highest\" });\n\t\tfunction removeHighlight() {\n\t\t\tview.change((writer) => {\n\t\t\t\tfor (const item of highlightedElements.values()) {\n\t\t\t\t\twriter.removeClass(className, item);\n\t\t\t\t\thighlightedElements.delete(item);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n\nexport { Delete, DeleteCommand, Input, InsertTextCommand, InsertTextObserver, TextTransformation, TextWatcher, TwoStepCaretMovement, Typing, TypingChangeBuffer, DeleteObserver as _DeleteObserver, findAttributeRange, findAttributeRangeBound, getLastTextLine, inlineHighlight };\n//# sourceMappingURL=index.js.map"],"names":["TypingChangeBuffer","model","limit","__publicField","evt","batch","changeCount","ignoreLock","InsertTextCommand","Command","editor","undoStepSize","options","doc","text","textInsertions","selection","resultRange","writer","selectionAttributes","TYPING_INPUT_TYPES","TYPING_INPUT_TYPES_ANDROID","InsertTextObserver","Observer","view","FocusObserver","typingInputTypes","env","viewDocument","data","targetRanges","inputType","domEvent","isComposing","eventInfo","EventInfo","ViewDocumentDomEventData","Input","Plugin","mapper","modelSelection","TypingQueue","insertTextCommand","viewSelection","range","modelRanges","viewRange","modelRange","_tryFixingModelRange","insertText","selectedText","rangeText","node","commandData","deleteSelectionContent","mutations","viewElement","findMappedViewAncestor","modelElement","element","debounce","commandLiveData","ModelLiveRange","ranges","liveRange","detachLiveRange","reason","buffer","result","viewNode","DeleteCommand","direction","sequence","doNotResetEntireContent","count","limitElement","limitElementFirstChild","paragraph","position","DELETE_CHARACTER","DELETE_WORD","DELETE_CODE_POINT","DELETE_SELECTION","DELETE_BACKWARD","DELETE_FORWARD","DELETE_EVENT_TYPES","DeleteObserver","document","deleteEventSpec","deleteData","shouldUseTargetRanges","BubblingEventInfo","enableChromeWorkaround","observer","pressedKeyCode","beforeInputReceived","keyCode","shouldFireDeleteEvent","isDeleteKeyCode","targetRange","getDeleteDirection","keyCodes","walker","nextPosition","item","offset","isInsideSurrogatePair","isInsideCombinedSymbol","isInsideEmojiSequence","Delete","modelDocument","deleteForwardCommand","selectionToRemove","unit","commandName","ancestorLimit","limitStartPosition","Typing"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AASA;AAAA;AAAA;AAAA;AAuBG,IAACA,IAAqB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmC9B,YAAYC,GAAOC,IAAQ,IAAI;AA/B/B;AAAA;AAAA;AAAA,IAAAC,EAAA;AAIA;AAAA;AAAA;AAAA,IAAAA,EAAA;AAIA;AAAA;AAAA;AAAA,IAAAA,EAAA;AAKA;AAAA;AAAA;AAAA;AAAA,IAAAA,EAAA;AAIA;AAAA;AAAA;AAAA,IAAAA,EAAA,gBAAS;AAIT;AAAA;AAAA;AAAA,IAAAA,EAAA;AAIA;AAAA;AAAA;AAAA,IAAAA,EAAA;AAOC,SAAK,QAAQF,GACb,KAAK,QAAQ,GACb,KAAK,QAAQC,GACb,KAAK,YAAY,IACjB,KAAK,kBAAkB,CAACE,GAAKC,MAAU;AACtC,MAAIA,EAAM,WAAWA,EAAM,cAAcA,MAAU,KAAK,UAAQ,KAAK,OAAO,EAAI;AAAA,IACjF,GACA,KAAK,2BAA2B,MAAM;AACrC,WAAK,OAAM;AAAA,IACZ,GACA,KAAK,MAAM,SAAS,GAAG,UAAU,KAAK,eAAe,GACrD,KAAK,MAAM,SAAS,UAAU,GAAG,gBAAgB,KAAK,wBAAwB,GAC9E,KAAK,MAAM,SAAS,UAAU,GAAG,oBAAoB,KAAK,wBAAwB;AAAA,EACnF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,QAAQ;AACX,WAAK,KAAK,WAAQ,KAAK,SAAS,KAAK,MAAM,YAAY,EAAE,UAAU,GAAI,CAAE,IAClE,KAA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