jodit-pro 4.19.3 → 4.19.4
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +16 -3
- package/es2015/jodit.js +355 -54
- package/es2015/jodit.min.js +53 -40
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/chart/chart.css +1 -1
- package/es2015/plugins/chart/chart.js +1 -1
- package/es2015/plugins/chart/chart.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/math/math.css +1 -1
- package/es2015/plugins/math/math.js +1 -1
- package/es2015/plugins/math/math.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.js +16 -3
- package/es2018/jodit.min.js +24 -11
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/chart/chart.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/math/math.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +17 -4
- package/es2021/jodit.js +355 -54
- package/es2021/jodit.min.js +30 -17
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/chart/chart.css +1 -1
- package/es2021/plugins/chart/chart.js +1 -1
- package/es2021/plugins/chart/chart.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/math/math.css +1 -1
- package/es2021/plugins/math/math.js +1 -1
- package/es2021/plugins/math/math.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +17 -4
- package/es2021.en/jodit.js +355 -54
- package/es2021.en/jodit.min.js +29 -16
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/chart/chart.css +1 -1
- package/es2021.en/plugins/chart/chart.js +1 -1
- package/es2021.en/plugins/chart/chart.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/math/math.css +1 -1
- package/es2021.en/plugins/math/math.js +1 -1
- package/es2021.en/plugins/math/math.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +421 -54
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/chart/chart.css +1 -1
- package/es5/plugins/chart/chart.js +1 -1
- package/es5/plugins/chart/chart.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/math/math.css +1 -1
- package/es5/plugins/math/math.js +1 -1
- package/es5/plugins/math/math.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/package.json +1 -1
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.19.
|
|
4
|
+
* Version: v4.19.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -2333,7 +2333,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
2333
2333
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2334
2334
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
2335
2335
|
}
|
|
2336
|
-
var APP_VERSION = "4.19.
|
|
2336
|
+
var APP_VERSION = "4.19.4";
|
|
2337
2337
|
// prettier-ignore
|
|
2338
2338
|
var ES = "es5";
|
|
2339
2339
|
var IS_ES_MODERN = false;
|
|
@@ -14358,7 +14358,13 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
14358
14358
|
* When the cursor is positioned in its place, it must be inside the element and not outside its border.
|
|
14359
14359
|
* @private
|
|
14360
14360
|
*/ function moveNodeInsideStart(j, node, start) {
|
|
14361
|
-
|
|
14361
|
+
// A text node of non-breaking spaces trims to nothing, but it's text the
|
|
14362
|
+
// node mustn't move past
|
|
14363
|
+
var isContent = function isContent(n) {
|
|
14364
|
+
var _a;
|
|
14365
|
+
return !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(n) || Boolean((_a = n.nodeValue) === null || _a === void 0 ? void 0 : _a.includes(_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
|
|
14366
|
+
};
|
|
14367
|
+
var sibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, start, isContent), anotherSibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, !start, isContent);
|
|
14362
14368
|
while(_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(sibling) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(sibling, j.editor) && (!anotherSibling || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement, j.editor))){
|
|
14363
14369
|
if (start || !sibling.firstChild) {
|
|
14364
14370
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(sibling, node);
|
|
@@ -64991,6 +64997,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
|
|
|
64991
64997
|
followOnDblClick: false,
|
|
64992
64998
|
processVideoLink: true,
|
|
64993
64999
|
processPastedLink: true,
|
|
65000
|
+
processTypedLink: false,
|
|
65001
|
+
typedLinkTlds: [],
|
|
65002
|
+
typedLinkFileEndings: [
|
|
65003
|
+
'zip',
|
|
65004
|
+
'mov',
|
|
65005
|
+
'md',
|
|
65006
|
+
'py',
|
|
65007
|
+
'sh',
|
|
65008
|
+
'pub'
|
|
65009
|
+
],
|
|
64994
65010
|
deriveUrlFromText: false,
|
|
64995
65011
|
noFollowCheckbox: true,
|
|
64996
65012
|
openInNewTabCheckbox: true,
|
|
@@ -65055,12 +65071,25 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
65055
65071
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
65056
65072
|
|
|
65057
65073
|
/* unused harmony export link */
|
|
65058
|
-
/* harmony import */ var
|
|
65059
|
-
/* harmony import */ var
|
|
65060
|
-
/* harmony import */ var
|
|
65061
|
-
/* harmony import */ var
|
|
65062
|
-
/* harmony import */ var
|
|
65063
|
-
/* harmony import */ var
|
|
65074
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
65075
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
65076
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
|
|
65077
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
65078
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
65079
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
65080
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5827);
|
|
65081
|
+
/* harmony import */ var _typed_link_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58970);
|
|
65082
|
+
function _array_like_to_array(arr, len) {
|
|
65083
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
65084
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
65085
|
+
return arr2;
|
|
65086
|
+
}
|
|
65087
|
+
function _array_with_holes(arr) {
|
|
65088
|
+
if (Array.isArray(arr)) return arr;
|
|
65089
|
+
}
|
|
65090
|
+
function _array_without_holes(arr) {
|
|
65091
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
65092
|
+
}
|
|
65064
65093
|
function _assert_this_initialized(self) {
|
|
65065
65094
|
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
65066
65095
|
return self;
|
|
@@ -65132,6 +65161,41 @@ function _is_native_reflect_construct() {
|
|
|
65132
65161
|
return !!result;
|
|
65133
65162
|
})();
|
|
65134
65163
|
}
|
|
65164
|
+
function _iterable_to_array(iter) {
|
|
65165
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
65166
|
+
return Array.from(iter);
|
|
65167
|
+
}
|
|
65168
|
+
}
|
|
65169
|
+
function _iterable_to_array_limit(arr, i) {
|
|
65170
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
65171
|
+
if (_i == null) return;
|
|
65172
|
+
var _arr = [];
|
|
65173
|
+
var _n = true;
|
|
65174
|
+
var _d = false;
|
|
65175
|
+
var _s, _e;
|
|
65176
|
+
try {
|
|
65177
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
65178
|
+
_arr.push(_s.value);
|
|
65179
|
+
if (i && _arr.length === i) break;
|
|
65180
|
+
}
|
|
65181
|
+
} catch (err) {
|
|
65182
|
+
_d = true;
|
|
65183
|
+
_e = err;
|
|
65184
|
+
} finally{
|
|
65185
|
+
try {
|
|
65186
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
65187
|
+
} finally{
|
|
65188
|
+
if (_d) throw _e;
|
|
65189
|
+
}
|
|
65190
|
+
}
|
|
65191
|
+
return _arr;
|
|
65192
|
+
}
|
|
65193
|
+
function _non_iterable_rest() {
|
|
65194
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
65195
|
+
}
|
|
65196
|
+
function _non_iterable_spread() {
|
|
65197
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
65198
|
+
}
|
|
65135
65199
|
function _possible_constructor_return(self, call) {
|
|
65136
65200
|
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
65137
65201
|
return _assert_this_initialized(self);
|
|
@@ -65143,10 +65207,24 @@ function _set_prototype_of(o, p) {
|
|
|
65143
65207
|
};
|
|
65144
65208
|
return _set_prototype_of(o, p);
|
|
65145
65209
|
}
|
|
65210
|
+
function _sliced_to_array(arr, i) {
|
|
65211
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
65212
|
+
}
|
|
65213
|
+
function _to_consumable_array(arr) {
|
|
65214
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
65215
|
+
}
|
|
65146
65216
|
function _type_of(obj) {
|
|
65147
65217
|
"@swc/helpers - typeof";
|
|
65148
65218
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
65149
65219
|
}
|
|
65220
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
65221
|
+
if (!o) return;
|
|
65222
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
65223
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
65224
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
65225
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
65226
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
65227
|
+
}
|
|
65150
65228
|
function _wrap_native_super(Class) {
|
|
65151
65229
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
65152
65230
|
_wrap_native_super = function(Class) {
|
|
@@ -65187,6 +65265,8 @@ function _wrap_native_super(Class) {
|
|
|
65187
65265
|
|
|
65188
65266
|
|
|
65189
65267
|
|
|
65268
|
+
|
|
65269
|
+
|
|
65190
65270
|
/**
|
|
65191
65271
|
* Process link. Insert, dblclick or remove format
|
|
65192
65272
|
*/ var link = /*#__PURE__*/ function(Plugin) {
|
|
@@ -65202,6 +65282,16 @@ function _wrap_native_super(Class) {
|
|
|
65202
65282
|
group: 'insert'
|
|
65203
65283
|
}
|
|
65204
65284
|
];
|
|
65285
|
+
/**
|
|
65286
|
+
* Where the caret was when Enter was pressed. Enter splits the line in a
|
|
65287
|
+
* history transaction, so the link waits until it's over
|
|
65288
|
+
*/ _this.__enteredAt = null;
|
|
65289
|
+
_this.__linkAfterEnter = function() {};
|
|
65290
|
+
/**
|
|
65291
|
+
* The link just made, which Backspace straight after takes off again, as
|
|
65292
|
+
* in CKEditor 5. Any other key but a modifier, a click or a command
|
|
65293
|
+
* forgets it
|
|
65294
|
+
*/ _this.__justLinked = null;
|
|
65205
65295
|
return _this;
|
|
65206
65296
|
}
|
|
65207
65297
|
_create_class(link, [
|
|
@@ -65216,6 +65306,14 @@ function _wrap_native_super(Class) {
|
|
|
65216
65306
|
if (jodit.o.link.processPastedLink) {
|
|
65217
65307
|
jodit.e.on('processPaste.link', this.onProcessPasteLink);
|
|
65218
65308
|
}
|
|
65309
|
+
if (jodit.o.link.processTypedLink) {
|
|
65310
|
+
this.__linkAfterEnter = jodit.async.microDebounce(this.__linkTyped);
|
|
65311
|
+
jodit.e.on('input.link', this.__onTypedSpace).on('beforeEnter.link', this.__onBeforeEnter).on('afterEnter.link', this.__onAfterEnter).on('mousedown.link blur.link beforeCommand.link', this.__forgetLink)// Without a namespace it runs ahead of table navigation,
|
|
65312
|
+
// which moves the caret on Tab, and of the backspace plugin
|
|
65313
|
+
.on('keydown', this.__onKeyDown, {
|
|
65314
|
+
top: true
|
|
65315
|
+
});
|
|
65316
|
+
}
|
|
65219
65317
|
jodit.e.on('generateLinkForm.link', this.__generateForm);
|
|
65220
65318
|
jodit.registerCommand('openLinkDialog', {
|
|
65221
65319
|
exec: function exec() {
|
|
@@ -65229,7 +65327,7 @@ function _wrap_native_super(Class) {
|
|
|
65229
65327
|
dialog.setContent(htmlForm);
|
|
65230
65328
|
dialog.open();
|
|
65231
65329
|
jodit.async.requestIdleCallback(function() {
|
|
65232
|
-
var url_input = (0,
|
|
65330
|
+
var url_input = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm.container).url_input;
|
|
65233
65331
|
url_input === null || url_input === void 0 ? void 0 : url_input.focus();
|
|
65234
65332
|
});
|
|
65235
65333
|
},
|
|
@@ -65240,10 +65338,10 @@ function _wrap_native_super(Class) {
|
|
|
65240
65338
|
{
|
|
65241
65339
|
key: "__onDblClickOnLink",
|
|
65242
65340
|
value: function __onDblClickOnLink(e) {
|
|
65243
|
-
if (!
|
|
65341
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
65244
65342
|
return;
|
|
65245
65343
|
}
|
|
65246
|
-
var href = (0,
|
|
65344
|
+
var href = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(e.target, 'href');
|
|
65247
65345
|
if (href) {
|
|
65248
65346
|
location.href = href;
|
|
65249
65347
|
e.preventDefault();
|
|
@@ -65255,23 +65353,23 @@ function _wrap_native_super(Class) {
|
|
|
65255
65353
|
value: function onProcessPasteLink(ignore, html) {
|
|
65256
65354
|
var _a, _b, _c, _d;
|
|
65257
65355
|
var jodit = this.jodit;
|
|
65258
|
-
if (!(0,
|
|
65356
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
65259
65357
|
return;
|
|
65260
65358
|
}
|
|
65261
65359
|
jodit.e.stopPropagation('processPaste');
|
|
65262
65360
|
if (jodit.o.link.processVideoLink) {
|
|
65263
|
-
var embed = (0,
|
|
65361
|
+
var embed = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.convertMediaUrlToVideoEmbed, html, {
|
|
65264
65362
|
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
65265
65363
|
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
65266
65364
|
});
|
|
65267
65365
|
if (embed !== html) {
|
|
65268
|
-
var media = (0,
|
|
65269
|
-
return (0,
|
|
65366
|
+
var media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.prepareEmbedCode)(jodit, embed);
|
|
65367
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
|
|
65270
65368
|
}
|
|
65271
65369
|
}
|
|
65272
65370
|
if (jodit.s.isCollapsed()) {
|
|
65273
65371
|
var a = jodit.createInside.element('a');
|
|
65274
|
-
(0,
|
|
65372
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', html);
|
|
65275
65373
|
a.textContent = html;
|
|
65276
65374
|
jodit.e.fire('applyLink', jodit, a, null);
|
|
65277
65375
|
return a;
|
|
@@ -65292,16 +65390,16 @@ function _wrap_native_super(Class) {
|
|
|
65292
65390
|
var i18n = jodit.i18n.bind(jodit);
|
|
65293
65391
|
var _jodit_o_link = jodit.o.link, openInNewTabCheckbox = _jodit_o_link.openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked = _jodit_o_link.openInNewTabCheckboxDefaultChecked, noFollowCheckbox = _jodit_o_link.noFollowCheckbox, formTemplate = _jodit_o_link.formTemplate, formClassName = _jodit_o_link.formClassName, modeClassName = _jodit_o_link.modeClassName;
|
|
65294
65392
|
var html = formTemplate(jodit);
|
|
65295
|
-
var form = (0,
|
|
65393
|
+
var form = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(html) ? jodit.c.fromHTML(html, {
|
|
65296
65394
|
target_checkbox_box: openInNewTabCheckbox,
|
|
65297
65395
|
nofollow_checkbox_box: noFollowCheckbox
|
|
65298
65396
|
}) : html;
|
|
65299
|
-
var htmlForm =
|
|
65300
|
-
var elements = (0,
|
|
65397
|
+
var htmlForm = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form) ? form : form.container;
|
|
65398
|
+
var elements = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm);
|
|
65301
65399
|
var insert = elements.insert, unlink = elements.unlink, content_input_box = elements.content_input_box;
|
|
65302
65400
|
var target_checkbox = elements.target_checkbox, nofollow_checkbox = elements.nofollow_checkbox, url_input = elements.url_input;
|
|
65303
65401
|
var currentElement = current;
|
|
65304
|
-
var isImageContent =
|
|
65402
|
+
var isImageContent = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(currentElement);
|
|
65305
65403
|
var content_input = elements.content_input;
|
|
65306
65404
|
var className_input = elements.className_input, className_select = elements.className_select, aria_label_input = elements.aria_label_input;
|
|
65307
65405
|
if (!content_input) {
|
|
@@ -65314,14 +65412,14 @@ function _wrap_native_super(Class) {
|
|
|
65314
65412
|
htmlForm.classList.add(formClassName);
|
|
65315
65413
|
}
|
|
65316
65414
|
if (isImageContent) {
|
|
65317
|
-
|
|
65415
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(content_input_box);
|
|
65318
65416
|
}
|
|
65319
65417
|
var _$link;
|
|
65320
65418
|
var getSelectionText = function getSelectionText() {
|
|
65321
|
-
return _$link ? _$link.innerText : (0,
|
|
65419
|
+
return _$link ? _$link.innerText : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
|
|
65322
65420
|
};
|
|
65323
|
-
if (current &&
|
|
65324
|
-
_$link =
|
|
65421
|
+
if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor)) {
|
|
65422
|
+
_$link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor);
|
|
65325
65423
|
} else {
|
|
65326
65424
|
_$link = false;
|
|
65327
65425
|
}
|
|
@@ -65329,22 +65427,22 @@ function _wrap_native_super(Class) {
|
|
|
65329
65427
|
content_input.value = getSelectionText();
|
|
65330
65428
|
}
|
|
65331
65429
|
if (aria_label_input) {
|
|
65332
|
-
aria_label_input.value = _$link ? (0,
|
|
65430
|
+
aria_label_input.value = _$link ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(_$link, 'aria-label') || '' : '';
|
|
65333
65431
|
}
|
|
65334
65432
|
if (_$link) {
|
|
65335
|
-
url_input.value = (0,
|
|
65433
|
+
url_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(_$link, 'href') || '';
|
|
65336
65434
|
if (modeClassName) {
|
|
65337
65435
|
readClassnames(modeClassName, className_input, _$link, className_select);
|
|
65338
65436
|
}
|
|
65339
65437
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
65340
|
-
target_checkbox.checked = (0,
|
|
65438
|
+
target_checkbox.checked = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(_$link, 'target') === '_blank';
|
|
65341
65439
|
}
|
|
65342
65440
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
65343
|
-
nofollow_checkbox.checked = ((0,
|
|
65441
|
+
nofollow_checkbox.checked = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(_$link, 'rel') || '').split(/\s+/).includes('nofollow');
|
|
65344
65442
|
}
|
|
65345
65443
|
insert.textContent = i18n('Update');
|
|
65346
65444
|
} else {
|
|
65347
|
-
|
|
65445
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(unlink);
|
|
65348
65446
|
if (jodit.o.link.deriveUrlFromText && url_input && !isImageContent && !url_input.value.trim()) {
|
|
65349
65447
|
url_input.value = guessUrlFromText(content_input.value);
|
|
65350
65448
|
}
|
|
@@ -65359,7 +65457,7 @@ function _wrap_native_super(Class) {
|
|
|
65359
65457
|
jodit.s.restore();
|
|
65360
65458
|
jodit.history.snapshot.restore(snapshot);
|
|
65361
65459
|
if (_$link) {
|
|
65362
|
-
|
|
65460
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(_$link);
|
|
65363
65461
|
}
|
|
65364
65462
|
jodit.synchronizeValues();
|
|
65365
65463
|
close();
|
|
@@ -65380,12 +65478,12 @@ function _wrap_native_super(Class) {
|
|
|
65380
65478
|
var textWasChanged = getSelectionText() !== content_input.value.trim();
|
|
65381
65479
|
var ci = jodit.createInside;
|
|
65382
65480
|
var caretAfter = null;
|
|
65383
|
-
if (!_$link || !
|
|
65481
|
+
if (!_$link || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, _$link)) {
|
|
65384
65482
|
if (!jodit.s.isCollapsed()) {
|
|
65385
65483
|
var node = jodit.s.current();
|
|
65386
|
-
if (
|
|
65484
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'img')) {
|
|
65387
65485
|
links = [
|
|
65388
|
-
|
|
65486
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.wrap(node, 'a', ci)
|
|
65389
65487
|
];
|
|
65390
65488
|
} else {
|
|
65391
65489
|
links = jodit.s.wrapInTag('a');
|
|
@@ -65407,27 +65505,27 @@ function _wrap_native_super(Class) {
|
|
|
65407
65505
|
];
|
|
65408
65506
|
}
|
|
65409
65507
|
links.forEach(function(a) {
|
|
65410
|
-
;(0,
|
|
65508
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', url_input.value);
|
|
65411
65509
|
writeClasses(modeClassName, className_input, className_select, a);
|
|
65412
65510
|
if (!isImageContent) {
|
|
65413
65511
|
writeImage(a, content_input, textWasChanged, url_input);
|
|
65414
65512
|
}
|
|
65415
65513
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
65416
|
-
(0,
|
|
65514
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
|
|
65417
65515
|
}
|
|
65418
65516
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
65419
|
-
var relParts = ((0,
|
|
65517
|
+
var relParts = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
|
|
65420
65518
|
var hasNofollow = relParts.includes('nofollow');
|
|
65421
65519
|
if (nofollow_checkbox.checked && !hasNofollow) {
|
|
65422
65520
|
relParts.push('nofollow');
|
|
65423
65521
|
} else if (!nofollow_checkbox.checked && hasNofollow) {
|
|
65424
65522
|
relParts.splice(relParts.indexOf('nofollow'), 1);
|
|
65425
65523
|
}
|
|
65426
|
-
;(0,
|
|
65524
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
65427
65525
|
}
|
|
65428
65526
|
if (aria_label_input) {
|
|
65429
65527
|
var ariaLabel = aria_label_input.value.trim();
|
|
65430
|
-
(0,
|
|
65528
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'aria-label', ariaLabel || null);
|
|
65431
65529
|
}
|
|
65432
65530
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
65433
65531
|
});
|
|
@@ -65442,7 +65540,7 @@ function _wrap_native_super(Class) {
|
|
|
65442
65540
|
close();
|
|
65443
65541
|
return false;
|
|
65444
65542
|
};
|
|
65445
|
-
if (
|
|
65543
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form)) {
|
|
65446
65544
|
jodit.e.on(form, 'submit', function(event) {
|
|
65447
65545
|
event.preventDefault();
|
|
65448
65546
|
event.stopImmediatePropagation();
|
|
@@ -65458,34 +65556,170 @@ function _wrap_native_super(Class) {
|
|
|
65458
65556
|
{
|
|
65459
65557
|
/** @override */ key: "beforeDestruct",
|
|
65460
65558
|
value: function beforeDestruct(jodit) {
|
|
65461
|
-
jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink);
|
|
65559
|
+
jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink).off('input.link', this.__onTypedSpace).off('beforeEnter.link', this.__onBeforeEnter).off('afterEnter.link', this.__onAfterEnter).off('mousedown.link blur.link beforeCommand.link', this.__forgetLink).off('keydown', this.__onKeyDown);
|
|
65560
|
+
}
|
|
65561
|
+
},
|
|
65562
|
+
{
|
|
65563
|
+
key: "__onTypedSpace",
|
|
65564
|
+
value: function __onTypedSpace(event) {
|
|
65565
|
+
if (event.inputType !== 'insertText' || !event.data || /\S/.test(event.data)) {
|
|
65566
|
+
return;
|
|
65567
|
+
}
|
|
65568
|
+
var range = this.j.s.range;
|
|
65569
|
+
if (range.collapsed) {
|
|
65570
|
+
this.__linkTyped(range.startContainer, range.startOffset - event.data.length);
|
|
65571
|
+
}
|
|
65572
|
+
}
|
|
65573
|
+
},
|
|
65574
|
+
{
|
|
65575
|
+
key: "__onBeforeEnter",
|
|
65576
|
+
value: function __onBeforeEnter() {
|
|
65577
|
+
var range = this.j.s.range;
|
|
65578
|
+
this.__enteredAt = range.collapsed ? [
|
|
65579
|
+
range.startContainer,
|
|
65580
|
+
range.startOffset
|
|
65581
|
+
] : null;
|
|
65582
|
+
}
|
|
65583
|
+
},
|
|
65584
|
+
{
|
|
65585
|
+
key: "__onAfterEnter",
|
|
65586
|
+
value: function __onAfterEnter() {
|
|
65587
|
+
if (this.__enteredAt) {
|
|
65588
|
+
this.__linkAfterEnter.apply(this, _to_consumable_array(this.__enteredAt));
|
|
65589
|
+
this.__enteredAt = null;
|
|
65590
|
+
}
|
|
65591
|
+
}
|
|
65592
|
+
},
|
|
65593
|
+
{
|
|
65594
|
+
key: "__forgetLink",
|
|
65595
|
+
value: function __forgetLink() {
|
|
65596
|
+
this.__justLinked = null;
|
|
65597
|
+
}
|
|
65598
|
+
},
|
|
65599
|
+
{
|
|
65600
|
+
key: "__onKeyDown",
|
|
65601
|
+
value: function __onKeyDown(event) {
|
|
65602
|
+
var jodit = this.jodit;
|
|
65603
|
+
if (jodit.o.readonly) {
|
|
65604
|
+
return;
|
|
65605
|
+
}
|
|
65606
|
+
var _$link = this.__justLinked;
|
|
65607
|
+
var modified = event.ctrlKey || event.metaKey || event.altKey;
|
|
65608
|
+
if (!MODIFIER_KEYS.has(event.key)) {
|
|
65609
|
+
this.__justLinked = null;
|
|
65610
|
+
}
|
|
65611
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE && !modified && (_$link === null || _$link === void 0 ? void 0 : _$link.isConnected)) {
|
|
65612
|
+
this.__recordStep();
|
|
65613
|
+
jodit.s.save();
|
|
65614
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(_$link);
|
|
65615
|
+
jodit.s.restore();
|
|
65616
|
+
this.__recordStep();
|
|
65617
|
+
// Or the backspace plugin takes a character too
|
|
65618
|
+
jodit.e.stopPropagation('keydown');
|
|
65619
|
+
return false;
|
|
65620
|
+
}
|
|
65621
|
+
var range = jodit.s.range;
|
|
65622
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !modified && range.collapsed) {
|
|
65623
|
+
this.__linkTyped(range.startContainer, range.startOffset);
|
|
65624
|
+
}
|
|
65625
|
+
}
|
|
65626
|
+
},
|
|
65627
|
+
{
|
|
65628
|
+
/**
|
|
65629
|
+
* Links the address that ends at `end` in a text node, as a step of its
|
|
65630
|
+
* own in the history, so Undo straight after takes the link off and
|
|
65631
|
+
* leaves the text
|
|
65632
|
+
*/ key: "__linkTyped",
|
|
65633
|
+
value: function __linkTyped(node, end) {
|
|
65634
|
+
var jodit = this.jodit;
|
|
65635
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) || !node.isConnected || end < 0 || end > node.length || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, NO_TYPED_LINKS, jodit.editor)) {
|
|
65636
|
+
return;
|
|
65637
|
+
}
|
|
65638
|
+
var found = (0,_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.findTypedLink)(node.data, end, jodit.o.link.typedLinkTlds, jodit.o.link.typedLinkFileEndings);
|
|
65639
|
+
if (!found) {
|
|
65640
|
+
return;
|
|
65641
|
+
}
|
|
65642
|
+
var _found = _sliced_to_array(found, 3), start = _found[0], stop = _found[1], href = _found[2];
|
|
65643
|
+
this.__recordStep();
|
|
65644
|
+
// The text round the caret splits, and WebKit doesn't keep the caret
|
|
65645
|
+
// where it was
|
|
65646
|
+
jodit.s.save();
|
|
65647
|
+
var range = jodit.ed.createRange();
|
|
65648
|
+
range.setStart(node, start);
|
|
65649
|
+
range.setEnd(node, stop);
|
|
65650
|
+
var a = jodit.createInside.element('a');
|
|
65651
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', href);
|
|
65652
|
+
range.surroundContents(a);
|
|
65653
|
+
jodit.s.restore();
|
|
65654
|
+
jodit.e.fire('applyLink', jodit, a, null);
|
|
65655
|
+
this.__recordStep();
|
|
65656
|
+
this.__justLinked = a;
|
|
65657
|
+
}
|
|
65658
|
+
},
|
|
65659
|
+
{
|
|
65660
|
+
/**
|
|
65661
|
+
* Reports what's changed and makes it a history step of its own
|
|
65662
|
+
*/ key: "__recordStep",
|
|
65663
|
+
value: function __recordStep() {
|
|
65664
|
+
this.j.setEditorValue();
|
|
65665
|
+
this.j.e.fire('internalChange');
|
|
65462
65666
|
}
|
|
65463
65667
|
},
|
|
65464
65668
|
{
|
|
65465
65669
|
key: "__onClickReadOnlyLink",
|
|
65466
65670
|
value: function __onClickReadOnlyLink(e) {
|
|
65467
65671
|
var jodit = this.jodit;
|
|
65468
|
-
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation &&
|
|
65672
|
+
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
65469
65673
|
e.preventDefault();
|
|
65470
65674
|
}
|
|
65471
65675
|
}
|
|
65472
65676
|
}
|
|
65473
65677
|
]);
|
|
65474
65678
|
return link;
|
|
65475
|
-
}(_wrap_native_super(
|
|
65679
|
+
}(_wrap_native_super(_core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin));
|
|
65476
65680
|
__decorate([
|
|
65477
|
-
|
|
65681
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65478
65682
|
], link.prototype, "__onDblClickOnLink", null);
|
|
65479
65683
|
__decorate([
|
|
65480
|
-
|
|
65684
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65481
65685
|
], link.prototype, "onProcessPasteLink", null);
|
|
65482
65686
|
__decorate([
|
|
65483
|
-
|
|
65687
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65484
65688
|
], link.prototype, "__generateForm", null);
|
|
65485
65689
|
__decorate([
|
|
65486
|
-
|
|
65690
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65691
|
+
], link.prototype, "__onTypedSpace", null);
|
|
65692
|
+
__decorate([
|
|
65693
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65694
|
+
], link.prototype, "__onBeforeEnter", null);
|
|
65695
|
+
__decorate([
|
|
65696
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65697
|
+
], link.prototype, "__onAfterEnter", null);
|
|
65698
|
+
__decorate([
|
|
65699
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65700
|
+
], link.prototype, "__forgetLink", null);
|
|
65701
|
+
__decorate([
|
|
65702
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65703
|
+
], link.prototype, "__onKeyDown", null);
|
|
65704
|
+
__decorate([
|
|
65705
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65706
|
+
], link.prototype, "__linkTyped", null);
|
|
65707
|
+
__decorate([
|
|
65708
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65487
65709
|
], link.prototype, "__onClickReadOnlyLink", null);
|
|
65488
|
-
|
|
65710
|
+
var NO_TYPED_LINKS = new Set([
|
|
65711
|
+
'a',
|
|
65712
|
+
'pre',
|
|
65713
|
+
'code'
|
|
65714
|
+
]);
|
|
65715
|
+
var MODIFIER_KEYS = new Set([
|
|
65716
|
+
'Shift',
|
|
65717
|
+
'Control',
|
|
65718
|
+
'Alt',
|
|
65719
|
+
'Meta',
|
|
65720
|
+
'CapsLock'
|
|
65721
|
+
]);
|
|
65722
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('link', link);
|
|
65489
65723
|
/**
|
|
65490
65724
|
* Guess a usable `href` from the selected text for the link dialog.
|
|
65491
65725
|
* Returns an empty string when the text is not a plausible URL/email,
|
|
@@ -65500,7 +65734,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('link', link);
|
|
|
65500
65734
|
return value;
|
|
65501
65735
|
}
|
|
65502
65736
|
// email address -> mailto:
|
|
65503
|
-
if (
|
|
65737
|
+
if (_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.EMAIL.test(value)) {
|
|
65504
65738
|
return "mailto:".concat(value);
|
|
65505
65739
|
}
|
|
65506
65740
|
// bare domain like example.com or www.example.com/path -> https://
|
|
@@ -65514,14 +65748,14 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
65514
65748
|
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
65515
65749
|
if (modeClassName === 'input') {
|
|
65516
65750
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
65517
|
-
(0,
|
|
65751
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
65518
65752
|
}
|
|
65519
65753
|
if (className_input.value !== '') {
|
|
65520
|
-
(0,
|
|
65754
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', className_input.value);
|
|
65521
65755
|
}
|
|
65522
65756
|
} else if (modeClassName === 'select') {
|
|
65523
65757
|
if (a.hasAttribute('class')) {
|
|
65524
|
-
(0,
|
|
65758
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
65525
65759
|
}
|
|
65526
65760
|
for(var i = 0; i < className_select.selectedOptions.length; i++){
|
|
65527
65761
|
var className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
@@ -65540,7 +65774,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
65540
65774
|
switch(modeClassName){
|
|
65541
65775
|
case 'input':
|
|
65542
65776
|
if (className_input) {
|
|
65543
|
-
className_input.value = (0,
|
|
65777
|
+
className_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
65544
65778
|
}
|
|
65545
65779
|
break;
|
|
65546
65780
|
case 'select':
|
|
@@ -65551,7 +65785,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
65551
65785
|
option.selected = false;
|
|
65552
65786
|
}
|
|
65553
65787
|
}
|
|
65554
|
-
var classNames = (0,
|
|
65788
|
+
var classNames = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
65555
65789
|
classNames.split(/\s+/).filter(function(cn) {
|
|
65556
65790
|
return cn.trim().length > 0;
|
|
65557
65791
|
}).forEach(function(className) {
|
|
@@ -65682,6 +65916,139 @@ var formTemplate = function formTemplate(editor) {
|
|
|
65682
65916
|
};
|
|
65683
65917
|
|
|
65684
65918
|
|
|
65919
|
+
/***/ }),
|
|
65920
|
+
|
|
65921
|
+
/***/ 67272:
|
|
65922
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
65923
|
+
|
|
65924
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
65925
|
+
/* harmony export */ TLDS: function() { return /* binding */ TLDS; }
|
|
65926
|
+
/* harmony export */ });
|
|
65927
|
+
/*!
|
|
65928
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
65929
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
65930
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
65931
|
+
*/ /**
|
|
65932
|
+
* @module plugins/link
|
|
65933
|
+
*/ /**
|
|
65934
|
+
* The endings a bare domain links with, besides those `link.typedLinkTlds`
|
|
65935
|
+
* adds: the generic ones of at least 1 in 1,000 of the sites in Tranco's top
|
|
65936
|
+
* million (list GQ38K, https://tranco-list.eu/list/GQ38K), then every
|
|
65937
|
+
* two-letter one in IANA's list (version 2026102900,
|
|
65938
|
+
* https://data.iana.org/TLD/tlds-alpha-by-domain.txt). Together they're the
|
|
65939
|
+
* endings of 96% of those sites
|
|
65940
|
+
* @private
|
|
65941
|
+
*/ var TLDS = new Set("\n app biz casino click cloud club com dev edu gov info live net online org pro\n shop site space store tech top vip xyz\n ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi\n bj bm bn bo br bs bt bv bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu\n cv cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga\n gb gd ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id\n ie il im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la\n lb lc li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms\n mt mu mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph\n pk pl pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sj sk\n sl sm sn so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt\n tv tw tz ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw\n".trim().split(/\s+/));
|
|
65942
|
+
|
|
65943
|
+
|
|
65944
|
+
/***/ }),
|
|
65945
|
+
|
|
65946
|
+
/***/ 58970:
|
|
65947
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
65948
|
+
|
|
65949
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
65950
|
+
/* harmony export */ EMAIL: function() { return /* binding */ EMAIL; },
|
|
65951
|
+
/* harmony export */ findTypedLink: function() { return /* binding */ findTypedLink; }
|
|
65952
|
+
/* harmony export */ });
|
|
65953
|
+
/* harmony import */ var _core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26049);
|
|
65954
|
+
/* harmony import */ var _tlds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67272);
|
|
65955
|
+
/*!
|
|
65956
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
65957
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
65958
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
65959
|
+
*/ /**
|
|
65960
|
+
* @module plugins/link
|
|
65961
|
+
*/
|
|
65962
|
+
|
|
65963
|
+
/**
|
|
65964
|
+
* An email address, for `mailto:`
|
|
65965
|
+
* @private
|
|
65966
|
+
*/ var EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
65967
|
+
var OPENING = new Set([
|
|
65968
|
+
'(',
|
|
65969
|
+
'[',
|
|
65970
|
+
'"',
|
|
65971
|
+
"'",
|
|
65972
|
+
'“',
|
|
65973
|
+
'‘',
|
|
65974
|
+
'<'
|
|
65975
|
+
]);
|
|
65976
|
+
var CLOSING = new Set([
|
|
65977
|
+
'.',
|
|
65978
|
+
',',
|
|
65979
|
+
';',
|
|
65980
|
+
':',
|
|
65981
|
+
'!',
|
|
65982
|
+
'?',
|
|
65983
|
+
'"',
|
|
65984
|
+
"'",
|
|
65985
|
+
'”',
|
|
65986
|
+
'’',
|
|
65987
|
+
'>'
|
|
65988
|
+
]);
|
|
65989
|
+
var BRACKETS = {
|
|
65990
|
+
')': '(',
|
|
65991
|
+
']': '['
|
|
65992
|
+
};
|
|
65993
|
+
var LABEL = /^[a-z\d][a-z\d-]{0,62}$/i;
|
|
65994
|
+
/**
|
|
65995
|
+
* The address that ends at `end` in a line of text typed, back to the
|
|
65996
|
+
* whitespace before it, as `[start, end, href]`. Punctuation round it, such as
|
|
65997
|
+
* a sentence's full stop or a bracket the address doesn't open, stays out.
|
|
65998
|
+
* An address counts with a scheme, with `www.`, as an email address, or as a
|
|
65999
|
+
* bare domain that `isBareDomain` accepts, so `Node.js` or `e.g.` don't
|
|
66000
|
+
* @private
|
|
66001
|
+
*/ function findTypedLink(text, end, tlds, fileEndings) {
|
|
66002
|
+
var start = end;
|
|
66003
|
+
while(start > 0 && !/\s/.test(text[start - 1])){
|
|
66004
|
+
start -= 1;
|
|
66005
|
+
}
|
|
66006
|
+
while(start < end && OPENING.has(text[start])){
|
|
66007
|
+
start += 1;
|
|
66008
|
+
}
|
|
66009
|
+
while(end > start){
|
|
66010
|
+
var char = text[end - 1];
|
|
66011
|
+
var opening = BRACKETS[char];
|
|
66012
|
+
if (CLOSING.has(char) || opening && !text.slice(start, end - 1).includes(opening)) {
|
|
66013
|
+
end -= 1;
|
|
66014
|
+
} else {
|
|
66015
|
+
break;
|
|
66016
|
+
}
|
|
66017
|
+
}
|
|
66018
|
+
var href = typedLinkHref(text.slice(start, end), tlds, fileEndings);
|
|
66019
|
+
return href ? [
|
|
66020
|
+
start,
|
|
66021
|
+
end,
|
|
66022
|
+
href
|
|
66023
|
+
] : null;
|
|
66024
|
+
}
|
|
66025
|
+
function typedLinkHref(address, tlds, fileEndings) {
|
|
66026
|
+
var email = address.replace(/^mailto:/i, '');
|
|
66027
|
+
if (EMAIL.test(email)) {
|
|
66028
|
+
return "mailto:".concat(email);
|
|
66029
|
+
}
|
|
66030
|
+
if (/^www\.[^\s.]+\.\S+$/i.test(address) || isBareDomain(address, tlds, fileEndings)) {
|
|
66031
|
+
return "https://".concat(address);
|
|
66032
|
+
}
|
|
66033
|
+
return /^[a-z][a-z\d+.-]*:\/\//i.test(address) && (0,_core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__.isURL)(address) ? address : '';
|
|
66034
|
+
}
|
|
66035
|
+
/**
|
|
66036
|
+
* A domain typed without a scheme or `www.`, as `example.com`, `elections.nz`
|
|
66037
|
+
* or `bit.ly/enrol`. Its ending has to be in `TLDS` or `tlds`, typed in lower
|
|
66038
|
+
* case, so `Node.js` and a sentence run on, as in `home.It`, don't count, and
|
|
66039
|
+
* not in `fileEndings`, as in `photos.zip`. The first part has a letter,
|
|
66040
|
+
* which leaves out a time or a numbered step such as `11.am`
|
|
66041
|
+
*/ function isBareDomain(address, tlds, fileEndings) {
|
|
66042
|
+
var cut = address.search(/[/?#]/);
|
|
66043
|
+
var host = cut < 0 ? address : address.slice(0, cut);
|
|
66044
|
+
var labels = host.split('.');
|
|
66045
|
+
var ending = labels[labels.length - 1];
|
|
66046
|
+
return labels.length > 1 && labels.every(function(label) {
|
|
66047
|
+
return LABEL.test(label) && !label.endsWith('-');
|
|
66048
|
+
}) && (_tlds_js__WEBPACK_IMPORTED_MODULE_1__.TLDS.has(ending) || tlds.includes(ending)) && !fileEndings.includes(ending) && /[a-z]/i.test(labels[0]);
|
|
66049
|
+
}
|
|
66050
|
+
|
|
66051
|
+
|
|
65685
66052
|
/***/ }),
|
|
65686
66053
|
|
|
65687
66054
|
/***/ 757:
|