jodit 4.19.5 → 4.19.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +19 -6
  4. package/es2015/jodit.js +355 -55
  5. package/es2015/jodit.min.js +16 -3
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +16 -3
  13. package/es2018/jodit.min.js +16 -3
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +17 -4
  18. package/es2021/jodit.js +352 -55
  19. package/es2021/jodit.min.js +17 -4
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +19 -6
  28. package/es2021.en/jodit.js +352 -55
  29. package/es2021.en/jodit.min.js +19 -6
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +371 -61
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/config.d.ts +31 -0
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/selection/helpers/move-node-inside-start.js +5 -2
  53. package/esm/plugins/link/config.d.ts +31 -0
  54. package/esm/plugins/link/config.js +3 -0
  55. package/esm/plugins/link/link.d.ts +27 -0
  56. package/esm/plugins/link/link.js +144 -2
  57. package/esm/plugins/link/tlds.d.ts +18 -0
  58. package/esm/plugins/link/tlds.js +33 -0
  59. package/esm/plugins/link/typed-link.d.ts +23 -0
  60. package/esm/plugins/link/typed-link.js +92 -0
  61. package/package.json +1 -1
  62. package/types/config.d.ts +31 -0
  63. package/types/plugins/link/config.d.ts +31 -0
  64. package/types/plugins/link/link.d.ts +27 -0
  65. package/types/plugins/link/tlds.d.ts +18 -0
  66. package/types/plugins/link/typed-link.d.ts +23 -0
package/es5/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.19.5
4
+ * Version: v4.19.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -2154,7 +2154,7 @@ __webpack_require__.r(__webpack_exports__);
2154
2154
  * @packageDocumentation
2155
2155
  * @module constants
2156
2156
  */
2157
- var APP_VERSION = "4.19.5";
2157
+ var APP_VERSION = "4.19.6";
2158
2158
  // prettier-ignore
2159
2159
  var ES = "es5";
2160
2160
  var IS_ES_MODERN = false;
@@ -12725,7 +12725,13 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
12725
12725
  * When the cursor is positioned in its place, it must be inside the element and not outside its border.
12726
12726
  * @private
12727
12727
  */ function moveNodeInsideStart(j, node, start) {
12728
- var sibling = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, start), anotherSibling = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, !start);
12728
+ // A text node of non-breaking spaces trims to nothing, but it's text the
12729
+ // node mustn't move past
12730
+ var isContent = function isContent(n) {
12731
+ var _n_nodeValue;
12732
+ return !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(n) || Boolean((_n_nodeValue = n.nodeValue) === null || _n_nodeValue === void 0 ? void 0 : _n_nodeValue.includes(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
12733
+ };
12734
+ var sibling = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, start, isContent), anotherSibling = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, !start, isContent);
12729
12735
  while(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(sibling) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(sibling, j.editor) && (!anotherSibling || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement, j.editor))){
12730
12736
  if (start || !sibling.firstChild) {
12731
12737
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(sibling, node);
@@ -48317,6 +48323,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
48317
48323
  followOnDblClick: false,
48318
48324
  processVideoLink: true,
48319
48325
  processPastedLink: true,
48326
+ processTypedLink: false,
48327
+ typedLinkTlds: [],
48328
+ typedLinkFileEndings: [
48329
+ 'zip',
48330
+ 'mov',
48331
+ 'md',
48332
+ 'py',
48333
+ 'sh',
48334
+ 'pub'
48335
+ ],
48320
48336
  deriveUrlFromText: false,
48321
48337
  noFollowCheckbox: true,
48322
48338
  openInNewTabCheckbox: true,
@@ -48371,14 +48387,18 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48371
48387
  /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
48372
48388
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
48373
48389
  /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34918);
48374
- /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31635);
48375
- /* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38574);
48376
- /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(84839);
48377
- /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(27795);
48378
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28077);
48379
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(65946);
48380
- /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(91206);
48381
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(65230);
48390
+ /* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50684);
48391
+ /* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42395);
48392
+ /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
48393
+ /* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38574);
48394
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(81937);
48395
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(84839);
48396
+ /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(27795);
48397
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(28077);
48398
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65946);
48399
+ /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(91206);
48400
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(65230);
48401
+ /* harmony import */ var _typed_link__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(99763);
48382
48402
  /*!
48383
48403
  * Jodit Editor (https://xdsoft.net/jodit/)
48384
48404
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -48400,6 +48420,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48400
48420
 
48401
48421
 
48402
48422
 
48423
+
48424
+
48425
+
48426
+
48403
48427
  /**
48404
48428
  * Process link. Insert, dblclick or remove format
48405
48429
  */ var link = /*#__PURE__*/ function(Plugin) {
@@ -48413,7 +48437,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48413
48437
  name: 'link',
48414
48438
  group: 'insert'
48415
48439
  }
48416
- ]);
48440
+ ]), /**
48441
+ * Where the caret was when Enter was pressed. Enter splits the line in a
48442
+ * history transaction, so the link waits until it's over
48443
+ */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__enteredAt", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__linkAfterEnter", function() {}), /**
48444
+ * The link just made, which Backspace straight after takes off again, as
48445
+ * in CKEditor 5. Any other key but a modifier, a click or a command
48446
+ * forgets it
48447
+ */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__justLinked", null);
48417
48448
  return _this;
48418
48449
  }
48419
48450
  ;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(link, [
@@ -48428,6 +48459,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48428
48459
  if (jodit.o.link.processPastedLink) {
48429
48460
  jodit.e.on('processPaste.link', this.onProcessPasteLink);
48430
48461
  }
48462
+ if (jodit.o.link.processTypedLink) {
48463
+ this.__linkAfterEnter = jodit.async.microDebounce(this.__linkTyped);
48464
+ 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,
48465
+ // which moves the caret on Tab, and of the backspace plugin
48466
+ .on('keydown', this.__onKeyDown, {
48467
+ top: true
48468
+ });
48469
+ }
48431
48470
  jodit.e.on('generateLinkForm.link', this.__generateForm);
48432
48471
  jodit.registerCommand('openLinkDialog', {
48433
48472
  exec: function exec() {
@@ -48441,7 +48480,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48441
48480
  dialog.setContent(htmlForm);
48442
48481
  dialog.open();
48443
48482
  jodit.async.requestIdleCallback(function() {
48444
- var url_input = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.refs)(htmlForm.container).url_input;
48483
+ var url_input = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.refs)(htmlForm.container).url_input;
48445
48484
  url_input === null || url_input === void 0 ? void 0 : url_input.focus();
48446
48485
  });
48447
48486
  },
@@ -48452,10 +48491,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48452
48491
  {
48453
48492
  key: "__onDblClickOnLink",
48454
48493
  value: function __onDblClickOnLink(e) {
48455
- if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isTag(e.target, 'a')) {
48494
+ if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isTag(e.target, 'a')) {
48456
48495
  return;
48457
48496
  }
48458
- var href = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(e.target, 'href');
48497
+ var href = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(e.target, 'href');
48459
48498
  if (href) {
48460
48499
  location.href = href;
48461
48500
  e.preventDefault();
@@ -48466,25 +48505,25 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48466
48505
  key: "onProcessPasteLink",
48467
48506
  value: function onProcessPasteLink(ignore, html) {
48468
48507
  var jodit = this.jodit;
48469
- if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.isURL)(html) || !jodit.o.link.processPastedLink) {
48508
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.isURL)(html) || !jodit.o.link.processPastedLink) {
48470
48509
  return;
48471
48510
  }
48472
48511
  jodit.e.stopPropagation('processPaste');
48473
48512
  if (jodit.o.link.processVideoLink) {
48474
48513
  var _ref;
48475
48514
  var _jodit_o_video, _jodit_o_video1, _jodit_o_video2;
48476
- var embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.call)((_ref = (_jodit_o_video = jodit.o.video) === null || _jodit_o_video === void 0 ? void 0 : _jodit_o_video.parseUrlToVideoEmbed) !== null && _ref !== void 0 ? _ref : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.convertMediaUrlToVideoEmbed, html, {
48515
+ var embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.call)((_ref = (_jodit_o_video = jodit.o.video) === null || _jodit_o_video === void 0 ? void 0 : _jodit_o_video.parseUrlToVideoEmbed) !== null && _ref !== void 0 ? _ref : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.convertMediaUrlToVideoEmbed, html, {
48477
48516
  width: (_jodit_o_video1 = jodit.o.video) === null || _jodit_o_video1 === void 0 ? void 0 : _jodit_o_video1.defaultWidth,
48478
48517
  height: (_jodit_o_video2 = jodit.o.video) === null || _jodit_o_video2 === void 0 ? void 0 : _jodit_o_video2.defaultHeight
48479
48518
  });
48480
48519
  if (embed !== html) {
48481
- var media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.prepareEmbedCode)(jodit, embed);
48482
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
48520
+ var media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.prepareEmbedCode)(jodit, embed);
48521
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
48483
48522
  }
48484
48523
  }
48485
48524
  if (jodit.s.isCollapsed()) {
48486
48525
  var a = jodit.createInside.element('a');
48487
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'href', html);
48526
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'href', html);
48488
48527
  a.textContent = html;
48489
48528
  jodit.e.fire('applyLink', jodit, a, null);
48490
48529
  return a;
@@ -48505,16 +48544,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48505
48544
  var i18n = jodit.i18n.bind(jodit);
48506
48545
  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;
48507
48546
  var html = formTemplate(jodit);
48508
- var form = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.isString)(html) ? jodit.c.fromHTML(html, {
48547
+ var form = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.isString)(html) ? jodit.c.fromHTML(html, {
48509
48548
  target_checkbox_box: openInNewTabCheckbox,
48510
48549
  nofollow_checkbox_box: noFollowCheckbox
48511
48550
  }) : html;
48512
- var htmlForm = jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isElement(form) ? form : form.container;
48513
- var elements = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.refs)(htmlForm);
48551
+ var htmlForm = jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isElement(form) ? form : form.container;
48552
+ var elements = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.refs)(htmlForm);
48514
48553
  var insert = elements.insert, unlink = elements.unlink, content_input_box = elements.content_input_box;
48515
48554
  var target_checkbox = elements.target_checkbox, nofollow_checkbox = elements.nofollow_checkbox, url_input = elements.url_input;
48516
48555
  var currentElement = current;
48517
- var isImageContent = jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isImage(currentElement);
48556
+ var isImageContent = jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isImage(currentElement);
48518
48557
  var content_input = elements.content_input;
48519
48558
  var className_input = elements.className_input, className_select = elements.className_select, aria_label_input = elements.aria_label_input;
48520
48559
  if (!content_input) {
@@ -48527,14 +48566,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48527
48566
  htmlForm.classList.add(formClassName);
48528
48567
  }
48529
48568
  if (isImageContent) {
48530
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.hide(content_input_box);
48569
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.hide(content_input_box);
48531
48570
  }
48532
48571
  var _$link;
48533
48572
  var getSelectionText = function getSelectionText() {
48534
- return _$link ? _$link.innerText : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
48573
+ return _$link ? _$link.innerText : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
48535
48574
  };
48536
- if (current && jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.closest(current, 'a', jodit.editor)) {
48537
- _$link = jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.closest(current, 'a', jodit.editor);
48575
+ if (current && jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.closest(current, 'a', jodit.editor)) {
48576
+ _$link = jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.closest(current, 'a', jodit.editor);
48538
48577
  } else {
48539
48578
  _$link = false;
48540
48579
  }
@@ -48542,22 +48581,22 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48542
48581
  content_input.value = getSelectionText();
48543
48582
  }
48544
48583
  if (aria_label_input) {
48545
- aria_label_input.value = _$link ? (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(_$link, 'aria-label') || '' : '';
48584
+ aria_label_input.value = _$link ? (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(_$link, 'aria-label') || '' : '';
48546
48585
  }
48547
48586
  if (_$link) {
48548
- url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(_$link, 'href') || '';
48587
+ url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(_$link, 'href') || '';
48549
48588
  if (modeClassName) {
48550
48589
  readClassnames(modeClassName, className_input, _$link, className_select);
48551
48590
  }
48552
48591
  if (openInNewTabCheckbox && target_checkbox) {
48553
- target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(_$link, 'target') === '_blank';
48592
+ target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(_$link, 'target') === '_blank';
48554
48593
  }
48555
48594
  if (noFollowCheckbox && nofollow_checkbox) {
48556
- nofollow_checkbox.checked = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(_$link, 'rel') || '').split(/\s+/).includes('nofollow');
48595
+ nofollow_checkbox.checked = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(_$link, 'rel') || '').split(/\s+/).includes('nofollow');
48557
48596
  }
48558
48597
  insert.textContent = i18n('Update');
48559
48598
  } else {
48560
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.hide(unlink);
48599
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.hide(unlink);
48561
48600
  if (jodit.o.link.deriveUrlFromText && url_input && !isImageContent && !url_input.value.trim()) {
48562
48601
  url_input.value = guessUrlFromText(content_input.value);
48563
48602
  }
@@ -48572,7 +48611,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48572
48611
  jodit.s.restore();
48573
48612
  jodit.history.snapshot.restore(snapshot);
48574
48613
  if (_$link) {
48575
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.unwrap(_$link);
48614
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.unwrap(_$link);
48576
48615
  }
48577
48616
  jodit.synchronizeValues();
48578
48617
  close();
@@ -48593,12 +48632,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48593
48632
  var textWasChanged = getSelectionText() !== content_input.value.trim();
48594
48633
  var ci = jodit.createInside;
48595
48634
  var caretAfter = null;
48596
- if (!_$link || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isOrContains(jodit.editor, _$link)) {
48635
+ if (!_$link || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isOrContains(jodit.editor, _$link)) {
48597
48636
  if (!jodit.s.isCollapsed()) {
48598
48637
  var node = jodit.s.current();
48599
- if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isTag(node, 'img')) {
48638
+ if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isTag(node, 'img')) {
48600
48639
  links = [
48601
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.wrap(node, 'a', ci)
48640
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.wrap(node, 'a', ci)
48602
48641
  ];
48603
48642
  } else {
48604
48643
  links = jodit.s.wrapInTag('a');
@@ -48620,27 +48659,27 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48620
48659
  ];
48621
48660
  }
48622
48661
  links.forEach(function(a) {
48623
- ;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'href', url_input.value);
48662
+ ;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'href', url_input.value);
48624
48663
  writeClasses(modeClassName, className_input, className_select, a);
48625
48664
  if (!isImageContent) {
48626
48665
  writeImage(a, content_input, textWasChanged, url_input);
48627
48666
  }
48628
48667
  if (openInNewTabCheckbox && target_checkbox) {
48629
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
48668
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
48630
48669
  }
48631
48670
  if (noFollowCheckbox && nofollow_checkbox) {
48632
- var relParts = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
48671
+ var relParts = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
48633
48672
  var hasNofollow = relParts.includes('nofollow');
48634
48673
  if (nofollow_checkbox.checked && !hasNofollow) {
48635
48674
  relParts.push('nofollow');
48636
48675
  } else if (!nofollow_checkbox.checked && hasNofollow) {
48637
48676
  relParts.splice(relParts.indexOf('nofollow'), 1);
48638
48677
  }
48639
- ;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
48678
+ ;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
48640
48679
  }
48641
48680
  if (aria_label_input) {
48642
48681
  var ariaLabel = aria_label_input.value.trim();
48643
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'aria-label', ariaLabel || null);
48682
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'aria-label', ariaLabel || null);
48644
48683
  }
48645
48684
  jodit.e.fire('applyLink', jodit, a, form);
48646
48685
  });
@@ -48655,7 +48694,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48655
48694
  close();
48656
48695
  return false;
48657
48696
  };
48658
- if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isElement(form)) {
48697
+ if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isElement(form)) {
48659
48698
  jodit.e.on(form, 'submit', function(event) {
48660
48699
  event.preventDefault();
48661
48700
  event.stopImmediatePropagation();
@@ -48671,34 +48710,170 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
48671
48710
  {
48672
48711
  key: "beforeDestruct",
48673
48712
  value: /** @override */ function beforeDestruct(jodit) {
48674
- jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink);
48713
+ 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);
48714
+ }
48715
+ },
48716
+ {
48717
+ key: "__onTypedSpace",
48718
+ value: function __onTypedSpace(event) {
48719
+ if (event.inputType !== 'insertText' || !event.data || /\S/.test(event.data)) {
48720
+ return;
48721
+ }
48722
+ var range = this.j.s.range;
48723
+ if (range.collapsed) {
48724
+ this.__linkTyped(range.startContainer, range.startOffset - event.data.length);
48725
+ }
48726
+ }
48727
+ },
48728
+ {
48729
+ key: "__onBeforeEnter",
48730
+ value: function __onBeforeEnter() {
48731
+ var range = this.j.s.range;
48732
+ this.__enteredAt = range.collapsed ? [
48733
+ range.startContainer,
48734
+ range.startOffset
48735
+ ] : null;
48736
+ }
48737
+ },
48738
+ {
48739
+ key: "__onAfterEnter",
48740
+ value: function __onAfterEnter() {
48741
+ if (this.__enteredAt) {
48742
+ this.__linkAfterEnter.apply(this, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_6__._)(this.__enteredAt));
48743
+ this.__enteredAt = null;
48744
+ }
48745
+ }
48746
+ },
48747
+ {
48748
+ key: "__forgetLink",
48749
+ value: function __forgetLink() {
48750
+ this.__justLinked = null;
48751
+ }
48752
+ },
48753
+ {
48754
+ key: "__onKeyDown",
48755
+ value: function __onKeyDown(event) {
48756
+ var jodit = this.jodit;
48757
+ if (jodit.o.readonly) {
48758
+ return;
48759
+ }
48760
+ var _$link = this.__justLinked;
48761
+ var modified = event.ctrlKey || event.metaKey || event.altKey;
48762
+ if (!MODIFIER_KEYS.has(event.key)) {
48763
+ this.__justLinked = null;
48764
+ }
48765
+ if (event.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_9__.KEY_BACKSPACE && !modified && (_$link === null || _$link === void 0 ? void 0 : _$link.isConnected)) {
48766
+ this.__recordStep();
48767
+ jodit.s.save();
48768
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.unwrap(_$link);
48769
+ jodit.s.restore();
48770
+ this.__recordStep();
48771
+ // Or the backspace plugin takes a character too
48772
+ jodit.e.stopPropagation('keydown');
48773
+ return false;
48774
+ }
48775
+ var range = jodit.s.range;
48776
+ if (event.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_9__.KEY_TAB && !modified && range.collapsed) {
48777
+ this.__linkTyped(range.startContainer, range.startOffset);
48778
+ }
48779
+ }
48780
+ },
48781
+ {
48782
+ key: "__linkTyped",
48783
+ value: /**
48784
+ * Links the address that ends at `end` in a text node, as a step of its
48785
+ * own in the history, so Undo straight after takes the link off and
48786
+ * leaves the text
48787
+ */ function __linkTyped(node, end) {
48788
+ var jodit = this.jodit;
48789
+ if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isText(node) || !node.isConnected || end < 0 || end > node.length || jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.closest(node, NO_TYPED_LINKS, jodit.editor)) {
48790
+ return;
48791
+ }
48792
+ var found = (0,_typed_link__WEBPACK_IMPORTED_MODULE_16__.findTypedLink)(node.data, end, jodit.o.link.typedLinkTlds, jodit.o.link.typedLinkFileEndings);
48793
+ if (!found) {
48794
+ return;
48795
+ }
48796
+ var _found = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_5__._)(found, 3), start = _found[0], stop = _found[1], href = _found[2];
48797
+ this.__recordStep();
48798
+ // The text round the caret splits, and WebKit doesn't keep the caret
48799
+ // where it was
48800
+ jodit.s.save();
48801
+ var range = jodit.ed.createRange();
48802
+ range.setStart(node, start);
48803
+ range.setEnd(node, stop);
48804
+ var a = jodit.createInside.element('a');
48805
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'href', href);
48806
+ range.surroundContents(a);
48807
+ jodit.s.restore();
48808
+ jodit.e.fire('applyLink', jodit, a, null);
48809
+ this.__recordStep();
48810
+ this.__justLinked = a;
48811
+ }
48812
+ },
48813
+ {
48814
+ key: "__recordStep",
48815
+ value: /**
48816
+ * Reports what's changed and makes it a history step of its own
48817
+ */ function __recordStep() {
48818
+ this.j.setEditorValue();
48819
+ this.j.e.fire('internalChange');
48675
48820
  }
48676
48821
  },
48677
48822
  {
48678
48823
  key: "__onClickReadOnlyLink",
48679
48824
  value: function __onClickReadOnlyLink(e) {
48680
48825
  var jodit = this.jodit;
48681
- if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isTag(e.target, 'a')) {
48826
+ if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && jodit_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isTag(e.target, 'a')) {
48682
48827
  e.preventDefault();
48683
48828
  }
48684
48829
  }
48685
48830
  }
48686
48831
  ]);
48687
48832
  return link;
48688
- }((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_11__.Plugin));
48689
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
48690
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
48833
+ }((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_8__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_14__.Plugin));
48834
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48835
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48691
48836
  ], link.prototype, "__onDblClickOnLink", null);
48692
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
48693
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
48837
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48838
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48694
48839
  ], link.prototype, "onProcessPasteLink", null);
48695
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
48696
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
48840
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48841
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48697
48842
  ], link.prototype, "__generateForm", null);
48698
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
48699
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
48843
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48844
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48845
+ ], link.prototype, "__onTypedSpace", null);
48846
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48847
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48848
+ ], link.prototype, "__onBeforeEnter", null);
48849
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48850
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48851
+ ], link.prototype, "__onAfterEnter", null);
48852
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48853
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48854
+ ], link.prototype, "__forgetLink", null);
48855
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48856
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48857
+ ], link.prototype, "__onKeyDown", null);
48858
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48859
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48860
+ ], link.prototype, "__linkTyped", null);
48861
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
48862
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
48700
48863
  ], link.prototype, "__onClickReadOnlyLink", null);
48701
- jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('link', link);
48864
+ var NO_TYPED_LINKS = new Set([
48865
+ 'a',
48866
+ 'pre',
48867
+ 'code'
48868
+ ]);
48869
+ var MODIFIER_KEYS = new Set([
48870
+ 'Shift',
48871
+ 'Control',
48872
+ 'Alt',
48873
+ 'Meta',
48874
+ 'CapsLock'
48875
+ ]);
48876
+ jodit_core_global__WEBPACK_IMPORTED_MODULE_12__.pluginSystem.add('link', link);
48702
48877
  /**
48703
48878
  * Guess a usable `href` from the selected text for the link dialog.
48704
48879
  * Returns an empty string when the text is not a plausible URL/email,
@@ -48713,7 +48888,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('link', link);
48713
48888
  return value;
48714
48889
  }
48715
48890
  // email address -> mailto:
48716
- if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
48891
+ if (_typed_link__WEBPACK_IMPORTED_MODULE_16__.EMAIL.test(value)) {
48717
48892
  return "mailto:".concat(value);
48718
48893
  }
48719
48894
  // bare domain like example.com or www.example.com/path -> https://
@@ -48726,14 +48901,14 @@ function writeClasses(modeClassName, className_input, className_select, a) {
48726
48901
  if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
48727
48902
  if (modeClassName === 'input') {
48728
48903
  if (className_input.value === '' && a.hasAttribute('class')) {
48729
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'class', null);
48904
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'class', null);
48730
48905
  }
48731
48906
  if (className_input.value !== '') {
48732
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'class', className_input.value);
48907
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'class', className_input.value);
48733
48908
  }
48734
48909
  } else if (modeClassName === 'select') {
48735
48910
  if (a.hasAttribute('class')) {
48736
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(a, 'class', null);
48911
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(a, 'class', null);
48737
48912
  }
48738
48913
  for(var i = 0; i < className_select.selectedOptions.length; i++){
48739
48914
  var _className_select_selectedOptions_item;
@@ -48753,7 +48928,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
48753
48928
  switch(modeClassName){
48754
48929
  case 'input':
48755
48930
  if (className_input) {
48756
- className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(link, 'class') || '';
48931
+ className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(link, 'class') || '';
48757
48932
  }
48758
48933
  break;
48759
48934
  case 'select':
@@ -48764,7 +48939,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
48764
48939
  option.selected = false;
48765
48940
  }
48766
48941
  }
48767
- var classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(link, 'class') || '';
48942
+ var classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_13__.attr)(link, 'class') || '';
48768
48943
  classNames.split(/\s+/).filter(function(cn) {
48769
48944
  return cn.trim().length > 0;
48770
48945
  }).forEach(function(className) {
@@ -48898,6 +49073,141 @@ var formTemplate = function formTemplate(editor) {
48898
49073
  };
48899
49074
 
48900
49075
 
49076
+ /***/ }),
49077
+
49078
+ /***/ 4441:
49079
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
49080
+
49081
+ "use strict";
49082
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
49083
+ /* harmony export */ TLDS: function() { return /* binding */ TLDS; }
49084
+ /* harmony export */ });
49085
+ /*!
49086
+ * Jodit Editor (https://xdsoft.net/jodit/)
49087
+ * Released under MIT see LICENSE.txt in the project root for license information.
49088
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
49089
+ */ /**
49090
+ * @module plugins/link
49091
+ */ /**
49092
+ * The endings a bare domain links with, besides those `link.typedLinkTlds`
49093
+ * adds: the generic ones of at least 1 in 1,000 of the sites in Tranco's top
49094
+ * million (list GQ38K, https://tranco-list.eu/list/GQ38K), then every
49095
+ * two-letter one in IANA's list (version 2026102900,
49096
+ * https://data.iana.org/TLD/tlds-alpha-by-domain.txt). Together they're the
49097
+ * endings of 96% of those sites
49098
+ * @private
49099
+ */ 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+/));
49100
+
49101
+
49102
+ /***/ }),
49103
+
49104
+ /***/ 99763:
49105
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
49106
+
49107
+ "use strict";
49108
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
49109
+ /* harmony export */ EMAIL: function() { return /* binding */ EMAIL; },
49110
+ /* harmony export */ findTypedLink: function() { return /* binding */ findTypedLink; }
49111
+ /* harmony export */ });
49112
+ /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91764);
49113
+ /* harmony import */ var _tlds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4441);
49114
+ /*!
49115
+ * Jodit Editor (https://xdsoft.net/jodit/)
49116
+ * Released under MIT see LICENSE.txt in the project root for license information.
49117
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
49118
+ */ /**
49119
+ * @module plugins/link
49120
+ */
49121
+
49122
+ /**
49123
+ * An email address, for `mailto:`
49124
+ * @private
49125
+ */ var EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
49126
+ var OPENING = new Set([
49127
+ '(',
49128
+ '[',
49129
+ '"',
49130
+ "'",
49131
+ '“',
49132
+ '‘',
49133
+ '<'
49134
+ ]);
49135
+ var CLOSING = new Set([
49136
+ '.',
49137
+ ',',
49138
+ ';',
49139
+ ':',
49140
+ '!',
49141
+ '?',
49142
+ '"',
49143
+ "'",
49144
+ '”',
49145
+ '’',
49146
+ '>'
49147
+ ]);
49148
+ var BRACKETS = {
49149
+ ')': '(',
49150
+ ']': '['
49151
+ };
49152
+ var LABEL = /^[a-z\d][a-z\d-]{0,62}$/i;
49153
+ /**
49154
+ * The address that ends at `end` in a line of text typed, back to the
49155
+ * whitespace before it, as `[start, end, href]`. Punctuation round it, such as
49156
+ * a sentence's full stop or a bracket the address doesn't open, stays out.
49157
+ * An address counts with a scheme, with `www.`, as an email address, or as a
49158
+ * bare domain that `isBareDomain` accepts, so `Node.js` or `e.g.` don't
49159
+ * @private
49160
+ */ function findTypedLink(text, end, tlds, fileEndings) {
49161
+ var start = end;
49162
+ while(start > 0 && !/\s/.test(text[start - 1])){
49163
+ start -= 1;
49164
+ }
49165
+ while(start < end && OPENING.has(text[start])){
49166
+ start += 1;
49167
+ }
49168
+ while(end > start){
49169
+ var char = text[end - 1];
49170
+ var opening = BRACKETS[char];
49171
+ if (CLOSING.has(char) || opening && !text.slice(start, end - 1).includes(opening)) {
49172
+ end -= 1;
49173
+ } else {
49174
+ break;
49175
+ }
49176
+ }
49177
+ var href = typedLinkHref(text.slice(start, end), tlds, fileEndings);
49178
+ return href ? [
49179
+ start,
49180
+ end,
49181
+ href
49182
+ ] : null;
49183
+ }
49184
+ function typedLinkHref(address, tlds, fileEndings) {
49185
+ var email = address.replace(/^mailto:/i, '');
49186
+ if (EMAIL.test(email)) {
49187
+ return "mailto:".concat(email);
49188
+ }
49189
+ if (/^www\.[^\s.]+\.\S+$/i.test(address) || isBareDomain(address, tlds, fileEndings)) {
49190
+ return "https://".concat(address);
49191
+ }
49192
+ return /^[a-z][a-z\d+.-]*:\/\//i.test(address) && (0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__.isURL)(address) ? address : '';
49193
+ }
49194
+ /**
49195
+ * A domain typed without a scheme or `www.`, as `example.com`, `elections.nz`
49196
+ * or `bit.ly/enrol`. Its ending has to be in `TLDS` or `tlds`, typed in lower
49197
+ * case, so `Node.js` and a sentence run on, as in `home.It`, don't count, and
49198
+ * not in `fileEndings`, as in `photos.zip`. The first part has a letter,
49199
+ * which leaves out a time or a numbered step such as `11.am`
49200
+ */ function isBareDomain(address, tlds, fileEndings) {
49201
+ var cut = address.search(/[/?#]/);
49202
+ var host = cut < 0 ? address : address.slice(0, cut);
49203
+ var labels = host.split('.');
49204
+ var ending = labels[labels.length - 1];
49205
+ return labels.length > 1 && labels.every(function(label) {
49206
+ return LABEL.test(label) && !label.endsWith('-');
49207
+ }) && (_tlds__WEBPACK_IMPORTED_MODULE_1__.TLDS.has(ending) || tlds.includes(ending)) && !fileEndings.includes(ending) && /[a-z]/i.test(labels[0]);
49208
+ }
49209
+
49210
+
48901
49211
  /***/ }),
48902
49212
 
48903
49213
  /***/ 51730: