[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> format-library.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["formatLibrary"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 374);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 1:
  98  /***/ (function(module, exports) {
  99  
 100  (function() { module.exports = this["wp"]["i18n"]; }());
 101  
 102  /***/ }),
 103  
 104  /***/ 12:
 105  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 106  
 107  "use strict";
 108  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 109  function _extends() {
 110    _extends = Object.assign || function (target) {
 111      for (var i = 1; i < arguments.length; i++) {
 112        var source = arguments[i];
 113  
 114        for (var key in source) {
 115          if (Object.prototype.hasOwnProperty.call(source, key)) {
 116            target[key] = source[key];
 117          }
 118        }
 119      }
 120  
 121      return target;
 122    };
 123  
 124    return _extends.apply(this, arguments);
 125  }
 126  
 127  /***/ }),
 128  
 129  /***/ 13:
 130  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 131  
 132  "use strict";
 133  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 134  function _defineProperties(target, props) {
 135    for (var i = 0; i < props.length; i++) {
 136      var descriptor = props[i];
 137      descriptor.enumerable = descriptor.enumerable || false;
 138      descriptor.configurable = true;
 139      if ("value" in descriptor) descriptor.writable = true;
 140      Object.defineProperty(target, descriptor.key, descriptor);
 141    }
 142  }
 143  
 144  function _createClass(Constructor, protoProps, staticProps) {
 145    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 146    if (staticProps) _defineProperties(Constructor, staticProps);
 147    return Constructor;
 148  }
 149  
 150  /***/ }),
 151  
 152  /***/ 14:
 153  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 154  
 155  "use strict";
 156  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 157  function _classCallCheck(instance, Constructor) {
 158    if (!(instance instanceof Constructor)) {
 159      throw new TypeError("Cannot call a class as a function");
 160    }
 161  }
 162  
 163  /***/ }),
 164  
 165  /***/ 15:
 166  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 167  
 168  "use strict";
 169  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 170  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32);
 171  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 172  
 173  
 174  function _possibleConstructorReturn(self, call) {
 175    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 176      return call;
 177    }
 178  
 179    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 180  }
 181  
 182  /***/ }),
 183  
 184  /***/ 16:
 185  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 186  
 187  "use strict";
 188  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 189  function _getPrototypeOf(o) {
 190    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 191      return o.__proto__ || Object.getPrototypeOf(o);
 192    };
 193    return _getPrototypeOf(o);
 194  }
 195  
 196  /***/ }),
 197  
 198  /***/ 17:
 199  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 200  
 201  "use strict";
 202  
 203  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 204  function _setPrototypeOf(o, p) {
 205    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 206      o.__proto__ = p;
 207      return o;
 208    };
 209  
 210    return _setPrototypeOf(o, p);
 211  }
 212  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 213  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
 214  
 215  function _inherits(subClass, superClass) {
 216    if (typeof superClass !== "function" && superClass !== null) {
 217      throw new TypeError("Super expression must either be null or a function");
 218    }
 219  
 220    subClass.prototype = Object.create(superClass && superClass.prototype, {
 221      constructor: {
 222        value: subClass,
 223        writable: true,
 224        configurable: true
 225      }
 226    });
 227    if (superClass) _setPrototypeOf(subClass, superClass);
 228  }
 229  
 230  /***/ }),
 231  
 232  /***/ 19:
 233  /***/ (function(module, exports) {
 234  
 235  (function() { module.exports = this["wp"]["keycodes"]; }());
 236  
 237  /***/ }),
 238  
 239  /***/ 2:
 240  /***/ (function(module, exports) {
 241  
 242  (function() { module.exports = this["lodash"]; }());
 243  
 244  /***/ }),
 245  
 246  /***/ 20:
 247  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 248  
 249  "use strict";
 250  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 251  /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
 252  
 253  function _objectWithoutProperties(source, excluded) {
 254    if (source == null) return {};
 255    var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 256    var key, i;
 257  
 258    if (Object.getOwnPropertySymbols) {
 259      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 260  
 261      for (i = 0; i < sourceSymbolKeys.length; i++) {
 262        key = sourceSymbolKeys[i];
 263        if (excluded.indexOf(key) >= 0) continue;
 264        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 265        target[key] = source[key];
 266      }
 267    }
 268  
 269    return target;
 270  }
 271  
 272  /***/ }),
 273  
 274  /***/ 24:
 275  /***/ (function(module, exports) {
 276  
 277  (function() { module.exports = this["wp"]["richText"]; }());
 278  
 279  /***/ }),
 280  
 281  /***/ 25:
 282  /***/ (function(module, exports) {
 283  
 284  (function() { module.exports = this["wp"]["url"]; }());
 285  
 286  /***/ }),
 287  
 288  /***/ 3:
 289  /***/ (function(module, exports) {
 290  
 291  (function() { module.exports = this["wp"]["components"]; }());
 292  
 293  /***/ }),
 294  
 295  /***/ 32:
 296  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 297  
 298  "use strict";
 299  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 300  function _typeof(obj) {
 301    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
 302      _typeof = function _typeof(obj) {
 303        return typeof obj;
 304      };
 305    } else {
 306      _typeof = function _typeof(obj) {
 307        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
 308      };
 309    }
 310  
 311    return _typeof(obj);
 312  }
 313  
 314  /***/ }),
 315  
 316  /***/ 374:
 317  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 318  
 319  "use strict";
 320  __webpack_require__.r(__webpack_exports__);
 321  
 322  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
 323  var objectWithoutProperties = __webpack_require__(20);
 324  
 325  // EXTERNAL MODULE: external {"this":["wp","richText"]}
 326  var external_this_wp_richText_ = __webpack_require__(24);
 327  
 328  // EXTERNAL MODULE: external {"this":["wp","element"]}
 329  var external_this_wp_element_ = __webpack_require__(0);
 330  
 331  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
 332  var external_this_wp_i18n_ = __webpack_require__(1);
 333  
 334  // EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
 335  var external_this_wp_blockEditor_ = __webpack_require__(5);
 336  
 337  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/bold/index.js
 338  
 339  
 340  /**
 341   * WordPress dependencies
 342   */
 343  
 344  
 345  
 346  var bold_name = 'core/bold';
 347  
 348  var title = Object(external_this_wp_i18n_["__"])('Bold');
 349  
 350  var bold = {
 351    name: bold_name,
 352    title: title,
 353    tagName: 'strong',
 354    className: null,
 355    edit: function edit(_ref) {
 356      var isActive = _ref.isActive,
 357          value = _ref.value,
 358          onChange = _ref.onChange;
 359  
 360      var onToggle = function onToggle() {
 361        return onChange(Object(external_this_wp_richText_["toggleFormat"])(value, {
 362          type: bold_name
 363        }));
 364      };
 365  
 366      return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextShortcut"], {
 367        type: "primary",
 368        character: "b",
 369        onUse: onToggle
 370      }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextToolbarButton"], {
 371        name: "bold",
 372        icon: "editor-bold",
 373        title: title,
 374        onClick: onToggle,
 375        isActive: isActive,
 376        shortcutType: "primary",
 377        shortcutCharacter: "b"
 378      }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["__unstableRichTextInputEvent"], {
 379        inputType: "formatBold",
 380        onInput: onToggle
 381      }));
 382    }
 383  };
 384  
 385  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/code/index.js
 386  
 387  
 388  /**
 389   * WordPress dependencies
 390   */
 391  
 392  
 393  
 394  var code_name = 'core/code';
 395  
 396  var code_title = Object(external_this_wp_i18n_["__"])('Inline Code');
 397  
 398  var code = {
 399    name: code_name,
 400    title: code_title,
 401    tagName: 'code',
 402    className: null,
 403    __unstableInputRule: function __unstableInputRule(value) {
 404      var BACKTICK = '`';
 405      var _value = value,
 406          start = _value.start,
 407          text = _value.text;
 408      var characterBefore = text.slice(start - 1, start); // Quick check the text for the necessary character.
 409  
 410      if (characterBefore !== BACKTICK) {
 411        return value;
 412      }
 413  
 414      var textBefore = text.slice(0, start - 1);
 415      var indexBefore = textBefore.lastIndexOf(BACKTICK);
 416  
 417      if (indexBefore === -1) {
 418        return value;
 419      }
 420  
 421      var startIndex = indexBefore;
 422      var endIndex = start - 2;
 423  
 424      if (startIndex === endIndex) {
 425        return value;
 426      }
 427  
 428      value = Object(external_this_wp_richText_["remove"])(value, startIndex, startIndex + 1);
 429      value = Object(external_this_wp_richText_["remove"])(value, endIndex, endIndex + 1);
 430      value = Object(external_this_wp_richText_["applyFormat"])(value, {
 431        type: code_name
 432      }, startIndex, endIndex);
 433      return value;
 434    },
 435    edit: function edit(_ref) {
 436      var value = _ref.value,
 437          onChange = _ref.onChange,
 438          isActive = _ref.isActive;
 439  
 440      var onToggle = function onToggle() {
 441        return onChange(Object(external_this_wp_richText_["toggleFormat"])(value, {
 442          type: code_name
 443        }));
 444      };
 445  
 446      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextToolbarButton"], {
 447        icon: "editor-code",
 448        title: code_title,
 449        onClick: onToggle,
 450        isActive: isActive
 451      });
 452    }
 453  };
 454  
 455  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js
 456  var objectSpread = __webpack_require__(6);
 457  
 458  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
 459  var classCallCheck = __webpack_require__(14);
 460  
 461  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
 462  var createClass = __webpack_require__(13);
 463  
 464  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
 465  var possibleConstructorReturn = __webpack_require__(15);
 466  
 467  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
 468  var getPrototypeOf = __webpack_require__(16);
 469  
 470  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
 471  var assertThisInitialized = __webpack_require__(7);
 472  
 473  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
 474  var inherits = __webpack_require__(17);
 475  
 476  // EXTERNAL MODULE: external {"this":["wp","components"]}
 477  var external_this_wp_components_ = __webpack_require__(3);
 478  
 479  // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
 480  var external_this_wp_keycodes_ = __webpack_require__(19);
 481  
 482  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/image/index.js
 483  
 484  
 485  
 486  
 487  
 488  
 489  
 490  
 491  
 492  /**
 493   * WordPress dependencies
 494   */
 495  
 496  
 497  
 498  
 499  
 500  
 501  var ALLOWED_MEDIA_TYPES = ['image'];
 502  var image_name = 'core/image';
 503  
 504  var image_title = Object(external_this_wp_i18n_["__"])('Inline image');
 505  
 506  var stopKeyPropagation = function stopKeyPropagation(event) {
 507    return event.stopPropagation();
 508  };
 509  
 510  function getRange() {
 511    var selection = window.getSelection();
 512    return selection.rangeCount ? selection.getRangeAt(0) : null;
 513  }
 514  
 515  var image_image = {
 516    name: image_name,
 517    title: image_title,
 518    keywords: [Object(external_this_wp_i18n_["__"])('photo'), Object(external_this_wp_i18n_["__"])('media')],
 519    object: true,
 520    tagName: 'img',
 521    className: null,
 522    attributes: {
 523      className: 'class',
 524      style: 'style',
 525      url: 'src',
 526      alt: 'alt'
 527    },
 528    edit:
 529    /*#__PURE__*/
 530    function (_Component) {
 531      Object(inherits["a" /* default */])(ImageEdit, _Component);
 532  
 533      function ImageEdit() {
 534        var _this;
 535  
 536        Object(classCallCheck["a" /* default */])(this, ImageEdit);
 537  
 538        _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(ImageEdit).apply(this, arguments));
 539        _this.onChange = _this.onChange.bind(Object(assertThisInitialized["a" /* default */])(_this));
 540        _this.onKeyDown = _this.onKeyDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
 541        _this.openModal = _this.openModal.bind(Object(assertThisInitialized["a" /* default */])(_this));
 542        _this.closeModal = _this.closeModal.bind(Object(assertThisInitialized["a" /* default */])(_this));
 543        _this.state = {
 544          modal: false
 545        };
 546        return _this;
 547      }
 548  
 549      Object(createClass["a" /* default */])(ImageEdit, [{
 550        key: "onChange",
 551        value: function onChange(width) {
 552          this.setState({
 553            width: width
 554          });
 555        }
 556      }, {
 557        key: "onKeyDown",
 558        value: function onKeyDown(event) {
 559          if ([external_this_wp_keycodes_["LEFT"], external_this_wp_keycodes_["DOWN"], external_this_wp_keycodes_["RIGHT"], external_this_wp_keycodes_["UP"], external_this_wp_keycodes_["BACKSPACE"], external_this_wp_keycodes_["ENTER"]].indexOf(event.keyCode) > -1) {
 560            // Stop the key event from propagating up to ObserveTyping.startTypingInTextField.
 561            event.stopPropagation();
 562          }
 563        }
 564      }, {
 565        key: "openModal",
 566        value: function openModal() {
 567          this.setState({
 568            modal: true
 569          });
 570        }
 571      }, {
 572        key: "closeModal",
 573        value: function closeModal() {
 574          this.setState({
 575            modal: false
 576          });
 577        }
 578      }, {
 579        key: "render",
 580        value: function render() {
 581          var _this2 = this;
 582  
 583          var _this$props = this.props,
 584              value = _this$props.value,
 585              onChange = _this$props.onChange,
 586              isObjectActive = _this$props.isObjectActive,
 587              activeObjectAttributes = _this$props.activeObjectAttributes;
 588          return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUploadCheck"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextToolbarButton"], {
 589            icon: Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
 590              xmlns: "http://www.w3.org/2000/svg",
 591              viewBox: "0 0 24 24"
 592            }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 593              d: "M4 16h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2zM4 5h10v9H4V5zm14 9v2h4v-2h-4zM2 20h20v-2H2v2zm6.4-8.8L7 9.4 5 12h8l-2.6-3.4-2 2.6z"
 594            })),
 595            title: image_title,
 596            onClick: this.openModal,
 597            isActive: isObjectActive
 598          }), this.state.modal && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUpload"], {
 599            allowedTypes: ALLOWED_MEDIA_TYPES,
 600            onSelect: function onSelect(_ref) {
 601              var id = _ref.id,
 602                  url = _ref.url,
 603                  alt = _ref.alt,
 604                  width = _ref.width;
 605  
 606              _this2.closeModal();
 607  
 608              onChange(Object(external_this_wp_richText_["insertObject"])(value, {
 609                type: image_name,
 610                attributes: {
 611                  className: "wp-image-".concat(id),
 612                  style: "width: ".concat(Math.min(width, 150), "px;"),
 613                  url: url,
 614                  alt: alt
 615                }
 616              }));
 617            },
 618            onClose: this.closeModal,
 619            render: function render(_ref2) {
 620              var open = _ref2.open;
 621              open();
 622              return null;
 623            }
 624          }), isObjectActive && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Popover"], {
 625            position: "bottom center",
 626            focusOnMount: false,
 627            anchorRef: getRange()
 628          }, Object(external_this_wp_element_["createElement"])("form", {
 629            className: "editor-format-toolbar__image-container-content block-editor-format-toolbar__image-container-content",
 630            onKeyPress: stopKeyPropagation,
 631            onKeyDown: this.onKeyDown,
 632            onSubmit: function onSubmit(event) {
 633              var newReplacements = value.replacements.slice();
 634              newReplacements[value.start] = {
 635                type: image_name,
 636                attributes: Object(objectSpread["a" /* default */])({}, activeObjectAttributes, {
 637                  style: "width: ".concat(_this2.state.width, "px;")
 638                })
 639              };
 640              onChange(Object(objectSpread["a" /* default */])({}, value, {
 641                replacements: newReplacements
 642              }));
 643              event.preventDefault();
 644            }
 645          }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
 646            className: "editor-format-toolbar__image-container-value block-editor-format-toolbar__image-container-value",
 647            type: "number",
 648            label: Object(external_this_wp_i18n_["__"])('Width'),
 649            value: this.state.width,
 650            min: 1,
 651            onChange: this.onChange
 652          }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 653            icon: "editor-break",
 654            label: Object(external_this_wp_i18n_["__"])('Apply'),
 655            type: "submit"
 656          }))));
 657        }
 658      }], [{
 659        key: "getDerivedStateFromProps",
 660        value: function getDerivedStateFromProps(props, state) {
 661          var style = props.activeObjectAttributes.style;
 662  
 663          if (style === state.previousStyle) {
 664            return null;
 665          }
 666  
 667          if (!style) {
 668            return {
 669              width: undefined,
 670              previousStyle: style
 671            };
 672          }
 673  
 674          return {
 675            width: style.replace(/\D/g, ''),
 676            previousStyle: style
 677          };
 678        }
 679      }]);
 680  
 681      return ImageEdit;
 682    }(external_this_wp_element_["Component"])
 683  };
 684  
 685  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/italic/index.js
 686  
 687  
 688  /**
 689   * WordPress dependencies
 690   */
 691  
 692  
 693  
 694  var italic_name = 'core/italic';
 695  
 696  var italic_title = Object(external_this_wp_i18n_["__"])('Italic');
 697  
 698  var italic = {
 699    name: italic_name,
 700    title: italic_title,
 701    tagName: 'em',
 702    className: null,
 703    edit: function edit(_ref) {
 704      var isActive = _ref.isActive,
 705          value = _ref.value,
 706          onChange = _ref.onChange;
 707  
 708      var onToggle = function onToggle() {
 709        return onChange(Object(external_this_wp_richText_["toggleFormat"])(value, {
 710          type: italic_name
 711        }));
 712      };
 713  
 714      return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextShortcut"], {
 715        type: "primary",
 716        character: "i",
 717        onUse: onToggle
 718      }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextToolbarButton"], {
 719        name: "italic",
 720        icon: "editor-italic",
 721        title: italic_title,
 722        onClick: onToggle,
 723        isActive: isActive,
 724        shortcutType: "primary",
 725        shortcutCharacter: "i"
 726      }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["__unstableRichTextInputEvent"], {
 727        inputType: "formatItalic",
 728        onInput: onToggle
 729      }));
 730    }
 731  };
 732  
 733  // EXTERNAL MODULE: external {"this":["wp","url"]}
 734  var external_this_wp_url_ = __webpack_require__(25);
 735  
 736  // EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
 737  var external_this_wp_htmlEntities_ = __webpack_require__(54);
 738  
 739  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
 740  var esm_extends = __webpack_require__(12);
 741  
 742  // EXTERNAL MODULE: external {"this":"lodash"}
 743  var external_this_lodash_ = __webpack_require__(2);
 744  
 745  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/utils.js
 746  /**
 747   * External dependencies
 748   */
 749  
 750  /**
 751   * WordPress dependencies
 752   */
 753  
 754  
 755  
 756  /**
 757   * Check for issues with the provided href.
 758   *
 759   * @param {string} href The href.
 760   *
 761   * @return {boolean} Is the href invalid?
 762   */
 763  
 764  function isValidHref(href) {
 765    if (!href) {
 766      return false;
 767    }
 768  
 769    var trimmedHref = href.trim();
 770  
 771    if (!trimmedHref) {
 772      return false;
 773    } // Does the href start with something that looks like a URL protocol?
 774  
 775  
 776    if (/^\S+:/.test(trimmedHref)) {
 777      var protocol = Object(external_this_wp_url_["getProtocol"])(trimmedHref);
 778  
 779      if (!Object(external_this_wp_url_["isValidProtocol"])(protocol)) {
 780        return false;
 781      } // Add some extra checks for http(s) URIs, since these are the most common use-case.
 782      // This ensures URIs with an http protocol have exactly two forward slashes following the protocol.
 783  
 784  
 785      if (Object(external_this_lodash_["startsWith"])(protocol, 'http') && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
 786        return false;
 787      }
 788  
 789      var authority = Object(external_this_wp_url_["getAuthority"])(trimmedHref);
 790  
 791      if (!Object(external_this_wp_url_["isValidAuthority"])(authority)) {
 792        return false;
 793      }
 794  
 795      var path = Object(external_this_wp_url_["getPath"])(trimmedHref);
 796  
 797      if (path && !Object(external_this_wp_url_["isValidPath"])(path)) {
 798        return false;
 799      }
 800  
 801      var queryString = Object(external_this_wp_url_["getQueryString"])(trimmedHref);
 802  
 803      if (queryString && !Object(external_this_wp_url_["isValidQueryString"])(queryString)) {
 804        return false;
 805      }
 806  
 807      var fragment = Object(external_this_wp_url_["getFragment"])(trimmedHref);
 808  
 809      if (fragment && !Object(external_this_wp_url_["isValidFragment"])(fragment)) {
 810        return false;
 811      }
 812    } // Validate anchor links.
 813  
 814  
 815    if (Object(external_this_lodash_["startsWith"])(trimmedHref, '#') && !Object(external_this_wp_url_["isValidFragment"])(trimmedHref)) {
 816      return false;
 817    }
 818  
 819    return true;
 820  }
 821  /**
 822   * Generates the format object that will be applied to the link text.
 823   *
 824   * @param {Object}  options
 825   * @param {string}  options.url              The href of the link.
 826   * @param {boolean} options.opensInNewWindow Whether this link will open in a new window.
 827   * @param {Object}  options.text             The text that is being hyperlinked.
 828   *
 829   * @return {Object} The final format object.
 830   */
 831  
 832  function createLinkFormat(_ref) {
 833    var url = _ref.url,
 834        opensInNewWindow = _ref.opensInNewWindow,
 835        text = _ref.text;
 836    var format = {
 837      type: 'core/link',
 838      attributes: {
 839        url: url
 840      }
 841    };
 842  
 843    if (opensInNewWindow) {
 844      // translators: accessibility label for external links, where the argument is the link text
 845      var label = Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('%s (opens in a new tab)'), text);
 846      format.attributes.target = '_blank';
 847      format.attributes.rel = 'noreferrer noopener';
 848      format.attributes['aria-label'] = label;
 849    }
 850  
 851    return format;
 852  }
 853  
 854  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/inline.js
 855  
 856  
 857  
 858  
 859  
 860  
 861  
 862  
 863  
 864  
 865  /**
 866   * WordPress dependencies
 867   */
 868  
 869  
 870  
 871  
 872  
 873  
 874  
 875  /**
 876   * Internal dependencies
 877   */
 878  
 879  
 880  
 881  var inline_stopKeyPropagation = function stopKeyPropagation(event) {
 882    return event.stopPropagation();
 883  };
 884  
 885  function isShowingInput(props, state) {
 886    return props.addingLink || state.editLink;
 887  }
 888  
 889  var inline_URLPopoverAtLink = function URLPopoverAtLink(_ref) {
 890    var isActive = _ref.isActive,
 891        addingLink = _ref.addingLink,
 892        value = _ref.value,
 893        props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isActive", "addingLink", "value"]);
 894  
 895    var anchorRef = Object(external_this_wp_element_["useMemo"])(function () {
 896      var selection = window.getSelection();
 897  
 898      if (!selection.rangeCount) {
 899        return;
 900      }
 901  
 902      var range = selection.getRangeAt(0);
 903  
 904      if (addingLink) {
 905        return range;
 906      }
 907  
 908      var element = range.startContainer; // If the caret is right before the element, select the next element.
 909  
 910      element = element.nextElementSibling || element;
 911  
 912      while (element.nodeType !== window.Node.ELEMENT_NODE) {
 913        element = element.parentNode;
 914      }
 915  
 916      return element.closest('a');
 917    }, [isActive, addingLink, value.start, value.end]);
 918  
 919    if (!anchorRef) {
 920      return null;
 921    }
 922  
 923    return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["URLPopover"], Object(esm_extends["a" /* default */])({
 924      anchorRef: anchorRef
 925    }, props));
 926  };
 927  
 928  var inline_InlineLinkUI =
 929  /*#__PURE__*/
 930  function (_Component) {
 931    Object(inherits["a" /* default */])(InlineLinkUI, _Component);
 932  
 933    function InlineLinkUI() {
 934      var _this;
 935  
 936      Object(classCallCheck["a" /* default */])(this, InlineLinkUI);
 937  
 938      _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(InlineLinkUI).apply(this, arguments));
 939      _this.editLink = _this.editLink.bind(Object(assertThisInitialized["a" /* default */])(_this));
 940      _this.submitLink = _this.submitLink.bind(Object(assertThisInitialized["a" /* default */])(_this));
 941      _this.onKeyDown = _this.onKeyDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
 942      _this.onChangeInputValue = _this.onChangeInputValue.bind(Object(assertThisInitialized["a" /* default */])(_this));
 943      _this.setLinkTarget = _this.setLinkTarget.bind(Object(assertThisInitialized["a" /* default */])(_this));
 944      _this.onFocusOutside = _this.onFocusOutside.bind(Object(assertThisInitialized["a" /* default */])(_this));
 945      _this.resetState = _this.resetState.bind(Object(assertThisInitialized["a" /* default */])(_this));
 946      _this.autocompleteRef = Object(external_this_wp_element_["createRef"])();
 947      _this.state = {
 948        opensInNewWindow: false,
 949        inputValue: ''
 950      };
 951      return _this;
 952    }
 953  
 954    Object(createClass["a" /* default */])(InlineLinkUI, [{
 955      key: "onKeyDown",
 956      value: function onKeyDown(event) {
 957        if ([external_this_wp_keycodes_["LEFT"], external_this_wp_keycodes_["DOWN"], external_this_wp_keycodes_["RIGHT"], external_this_wp_keycodes_["UP"], external_this_wp_keycodes_["BACKSPACE"], external_this_wp_keycodes_["ENTER"]].indexOf(event.keyCode) > -1) {
 958          // Stop the key event from propagating up to ObserveTyping.startTypingInTextField.
 959          event.stopPropagation();
 960        }
 961      }
 962    }, {
 963      key: "onChangeInputValue",
 964      value: function onChangeInputValue(inputValue) {
 965        this.setState({
 966          inputValue: inputValue
 967        });
 968      }
 969    }, {
 970      key: "setLinkTarget",
 971      value: function setLinkTarget(opensInNewWindow) {
 972        var _this$props = this.props,
 973            _this$props$activeAtt = _this$props.activeAttributes.url,
 974            url = _this$props$activeAtt === void 0 ? '' : _this$props$activeAtt,
 975            value = _this$props.value,
 976            onChange = _this$props.onChange;
 977        this.setState({
 978          opensInNewWindow: opensInNewWindow
 979        }); // Apply now if URL is not being edited.
 980  
 981        if (!isShowingInput(this.props, this.state)) {
 982          var selectedText = Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["slice"])(value));
 983          onChange(Object(external_this_wp_richText_["applyFormat"])(value, createLinkFormat({
 984            url: url,
 985            opensInNewWindow: opensInNewWindow,
 986            text: selectedText
 987          })));
 988        }
 989      }
 990    }, {
 991      key: "editLink",
 992      value: function editLink(event) {
 993        this.setState({
 994          editLink: true
 995        });
 996        event.preventDefault();
 997      }
 998    }, {
 999      key: "submitLink",
1000      value: function submitLink(event) {
1001        var _this$props2 = this.props,
1002            isActive = _this$props2.isActive,
1003            value = _this$props2.value,
1004            onChange = _this$props2.onChange,
1005            speak = _this$props2.speak;
1006        var _this$state = this.state,
1007            inputValue = _this$state.inputValue,
1008            opensInNewWindow = _this$state.opensInNewWindow;
1009        var url = Object(external_this_wp_url_["prependHTTP"])(inputValue);
1010        var selectedText = Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["slice"])(value));
1011        var format = createLinkFormat({
1012          url: url,
1013          opensInNewWindow: opensInNewWindow,
1014          text: selectedText
1015        });
1016        event.preventDefault();
1017  
1018        if (Object(external_this_wp_richText_["isCollapsed"])(value) && !isActive) {
1019          var toInsert = Object(external_this_wp_richText_["applyFormat"])(Object(external_this_wp_richText_["create"])({
1020            text: url
1021          }), format, 0, url.length);
1022          onChange(Object(external_this_wp_richText_["insert"])(value, toInsert));
1023        } else {
1024          onChange(Object(external_this_wp_richText_["applyFormat"])(value, format));
1025        }
1026  
1027        this.resetState();
1028  
1029        if (!isValidHref(url)) {
1030          speak(Object(external_this_wp_i18n_["__"])('Warning: the link has been inserted but may have errors. Please test it.'), 'assertive');
1031        } else if (isActive) {
1032          speak(Object(external_this_wp_i18n_["__"])('Link edited.'), 'assertive');
1033        } else {
1034          speak(Object(external_this_wp_i18n_["__"])('Link inserted.'), 'assertive');
1035        }
1036      }
1037    }, {
1038      key: "onFocusOutside",
1039      value: function onFocusOutside() {
1040        // The autocomplete suggestions list renders in a separate popover (in a portal),
1041        // so onFocusOutside fails to detect that a click on a suggestion occurred in the
1042        // LinkContainer. Detect clicks on autocomplete suggestions using a ref here, and
1043        // return to avoid the popover being closed.
1044        var autocompleteElement = this.autocompleteRef.current;
1045  
1046        if (autocompleteElement && autocompleteElement.contains(document.activeElement)) {
1047          return;
1048        }
1049  
1050        this.resetState();
1051      }
1052    }, {
1053      key: "resetState",
1054      value: function resetState() {
1055        this.props.stopAddingLink();
1056        this.setState({
1057          editLink: false
1058        });
1059      }
1060    }, {
1061      key: "render",
1062      value: function render() {
1063        var _this2 = this;
1064  
1065        var _this$props3 = this.props,
1066            isActive = _this$props3.isActive,
1067            url = _this$props3.activeAttributes.url,
1068            addingLink = _this$props3.addingLink,
1069            value = _this$props3.value;
1070  
1071        if (!isActive && !addingLink) {
1072          return null;
1073        }
1074  
1075        var _this$state2 = this.state,
1076            inputValue = _this$state2.inputValue,
1077            opensInNewWindow = _this$state2.opensInNewWindow;
1078        var showInput = isShowingInput(this.props, this.state);
1079        return Object(external_this_wp_element_["createElement"])(inline_URLPopoverAtLink, {
1080          value: value,
1081          isActive: isActive,
1082          addingLink: addingLink,
1083          onFocusOutside: this.onFocusOutside,
1084          onClose: this.resetState,
1085          focusOnMount: showInput ? 'firstElement' : false,
1086          renderSettings: function renderSettings() {
1087            return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToggleControl"], {
1088              label: Object(external_this_wp_i18n_["__"])('Open in New Tab'),
1089              checked: opensInNewWindow,
1090              onChange: _this2.setLinkTarget
1091            });
1092          }
1093        }, showInput ? Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["URLPopover"].LinkEditor, {
1094          className: "editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",
1095          value: inputValue,
1096          onChangeInputValue: this.onChangeInputValue,
1097          onKeyDown: this.onKeyDown,
1098          onKeyPress: inline_stopKeyPropagation,
1099          onSubmit: this.submitLink,
1100          autocompleteRef: this.autocompleteRef
1101        }) : Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["URLPopover"].LinkViewer, {
1102          className: "editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",
1103          onKeyPress: inline_stopKeyPropagation,
1104          url: url,
1105          onEditLinkClick: this.editLink,
1106          linkClassName: isValidHref(Object(external_this_wp_url_["prependHTTP"])(url)) ? undefined : 'has-invalid-link'
1107        }));
1108      }
1109    }], [{
1110      key: "getDerivedStateFromProps",
1111      value: function getDerivedStateFromProps(props, state) {
1112        var _props$activeAttribut = props.activeAttributes,
1113            url = _props$activeAttribut.url,
1114            target = _props$activeAttribut.target;
1115        var opensInNewWindow = target === '_blank';
1116  
1117        if (!isShowingInput(props, state)) {
1118          var update = {};
1119  
1120          if (url !== state.inputValue) {
1121            update.inputValue = url;
1122          }
1123  
1124          if (opensInNewWindow !== state.opensInNewWindow) {
1125            update.opensInNewWindow = opensInNewWindow;
1126          }
1127  
1128          return Object.keys(update).length ? update : null;
1129        }
1130  
1131        return null;
1132      }
1133    }]);
1134  
1135    return InlineLinkUI;
1136  }(external_this_wp_element_["Component"]);
1137  
1138  /* harmony default export */ var inline = (Object(external_this_wp_components_["withSpokenMessages"])(inline_InlineLinkUI));
1139  
1140  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/index.js
1141  
1142  
1143  
1144  
1145  
1146  
1147  
1148  
1149  /**
1150   * WordPress dependencies
1151   */
1152  
1153  
1154  
1155  
1156  
1157  
1158  
1159  /**
1160   * Internal dependencies
1161   */
1162  
1163  
1164  var link_name = 'core/link';
1165  
1166  var link_title = Object(external_this_wp_i18n_["__"])('Link');
1167  
1168  var link_link = {
1169    name: link_name,
1170    title: link_title,
1171    tagName: 'a',
1172    className: null,
1173    attributes: {
1174      url: 'href',
1175      target: 'target'
1176    },
1177    __unstablePasteRule: function __unstablePasteRule(value, _ref) {
1178      var html = _ref.html,
1179          plainText = _ref.plainText;
1180  
1181      if (Object(external_this_wp_richText_["isCollapsed"])(value)) {
1182        return value;
1183      }
1184  
1185      var pastedText = (html || plainText).replace(/<[^>]+>/g, '').trim(); // A URL was pasted, turn the selection into a link
1186  
1187      if (!Object(external_this_wp_url_["isURL"])(pastedText)) {
1188        return value;
1189      } // Allows us to ask for this information when we get a report.
1190  
1191  
1192      window.console.log('Created link:\n\n', pastedText);
1193      return Object(external_this_wp_richText_["applyFormat"])(value, {
1194        type: link_name,
1195        attributes: {
1196          url: Object(external_this_wp_htmlEntities_["decodeEntities"])(pastedText)
1197        }
1198      });
1199    },
1200    edit: Object(external_this_wp_components_["withSpokenMessages"])(
1201    /*#__PURE__*/
1202    function (_Component) {
1203      Object(inherits["a" /* default */])(LinkEdit, _Component);
1204  
1205      function LinkEdit() {
1206        var _this;
1207  
1208        Object(classCallCheck["a" /* default */])(this, LinkEdit);
1209  
1210        _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(LinkEdit).apply(this, arguments));
1211        _this.addLink = _this.addLink.bind(Object(assertThisInitialized["a" /* default */])(_this));
1212        _this.stopAddingLink = _this.stopAddingLink.bind(Object(assertThisInitialized["a" /* default */])(_this));
1213        _this.onRemoveFormat = _this.onRemoveFormat.bind(Object(assertThisInitialized["a" /* default */])(_this));
1214        _this.state = {
1215          addingLink: false
1216        };
1217        return _this;
1218      }
1219  
1220      Object(createClass["a" /* default */])(LinkEdit, [{
1221        key: "addLink",
1222        value: function addLink() {
1223          var _this$props = this.props,
1224              value = _this$props.value,
1225              onChange = _this$props.onChange;
1226          var text = Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["slice"])(value));
1227  
1228          if (text && Object(external_this_wp_url_["isURL"])(text)) {
1229            onChange(Object(external_this_wp_richText_["applyFormat"])(value, {
1230              type: link_name,
1231              attributes: {
1232                url: text
1233              }
1234            }));
1235          } else if (text && Object(external_this_wp_url_["isEmail"])(text)) {
1236            onChange(Object(external_this_wp_richText_["applyFormat"])(value, {
1237              type: link_name,
1238              attributes: {
1239                url: "mailto:".concat(text)
1240              }
1241            }));
1242          } else {
1243            this.setState({
1244              addingLink: true
1245            });
1246          }
1247        }
1248      }, {
1249        key: "stopAddingLink",
1250        value: function stopAddingLink() {
1251          this.setState({
1252            addingLink: false
1253          });
1254        }
1255      }, {
1256        key: "onRemoveFormat",
1257        value: function onRemoveFormat() {
1258          var _this$props2 = this.props,
1259              value = _this$props2.value,
1260              onChange = _this$props2.onChange,
1261              speak = _this$props2.speak;
1262          onChange(Object(external_this_wp_richText_["removeFormat"])(value, link_name));
1263          speak(Object(external_this_wp_i18n_["__"])('Link removed.'), 'assertive');
1264        }
1265      }, {
1266        key: "render",
1267        value: function render() {
1268          var _this$props3 = this.props,
1269              isActive = _this$props3.isActive,
1270              activeAttributes = _this$props3.activeAttributes,
1271              value = _this$props3.value,
1272              onChange = _this$props3.onChange;
1273          return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextShortcut"], {
1274            type: "primary",
1275            character: "k",
1276            onUse: this.addLink
1277          }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextShortcut"], {
1278            type: "primaryShift",
1279            character: "k",
1280            onUse: this.onRemoveFormat
1281          }), isActive && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextToolbarButton"], {
1282            name: "link",
1283            icon: "editor-unlink",
1284            title: Object(external_this_wp_i18n_["__"])('Unlink'),
1285            onClick: this.onRemoveFormat,
1286            isActive: isActive,
1287            shortcutType: "primaryShift",
1288            shortcutCharacter: "k"
1289          }), !isActive && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextToolbarButton"], {
1290            name: "link",
1291            icon: "admin-links",
1292            title: link_title,
1293            onClick: this.addLink,
1294            isActive: isActive,
1295            shortcutType: "primary",
1296            shortcutCharacter: "k"
1297          }), Object(external_this_wp_element_["createElement"])(inline, {
1298            key: isActive // Make sure link UI state resets when switching between links.
1299            ,
1300            addingLink: this.state.addingLink,
1301            stopAddingLink: this.stopAddingLink,
1302            isActive: isActive,
1303            activeAttributes: activeAttributes,
1304            value: value,
1305            onChange: onChange
1306          }));
1307        }
1308      }]);
1309  
1310      return LinkEdit;
1311    }(external_this_wp_element_["Component"]))
1312  };
1313  
1314  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/strikethrough/index.js
1315  
1316  
1317  /**
1318   * WordPress dependencies
1319   */
1320  
1321  
1322  
1323  var strikethrough_name = 'core/strikethrough';
1324  
1325  var strikethrough_title = Object(external_this_wp_i18n_["__"])('Strikethrough');
1326  
1327  var strikethrough = {
1328    name: strikethrough_name,
1329    title: strikethrough_title,
1330    tagName: 's',
1331    className: null,
1332    edit: function edit(_ref) {
1333      var isActive = _ref.isActive,
1334          value = _ref.value,
1335          onChange = _ref.onChange;
1336  
1337      var onToggle = function onToggle() {
1338        return onChange(Object(external_this_wp_richText_["toggleFormat"])(value, {
1339          type: strikethrough_name
1340        }));
1341      };
1342  
1343      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextToolbarButton"], {
1344        icon: "editor-strikethrough",
1345        title: strikethrough_title,
1346        onClick: onToggle,
1347        isActive: isActive
1348      });
1349    }
1350  };
1351  
1352  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/underline/index.js
1353  
1354  
1355  /**
1356   * WordPress dependencies
1357   */
1358  
1359  
1360  
1361  var underline_name = 'core/underline';
1362  var underline = {
1363    name: underline_name,
1364    title: Object(external_this_wp_i18n_["__"])('Underline'),
1365    tagName: 'span',
1366    className: null,
1367    attributes: {
1368      style: 'style'
1369    },
1370    edit: function edit(_ref) {
1371      var value = _ref.value,
1372          onChange = _ref.onChange;
1373  
1374      var onToggle = function onToggle() {
1375        onChange(Object(external_this_wp_richText_["toggleFormat"])(value, {
1376          type: underline_name,
1377          attributes: {
1378            style: 'text-decoration: underline;'
1379          }
1380        }));
1381      };
1382  
1383      return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichTextShortcut"], {
1384        type: "primary",
1385        character: "u",
1386        onUse: onToggle
1387      }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["__unstableRichTextInputEvent"], {
1388        inputType: "formatUnderline",
1389        onInput: onToggle
1390      }));
1391    }
1392  };
1393  
1394  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/default-formats.js
1395  /**
1396   * Internal dependencies
1397   */
1398  
1399  
1400  
1401  
1402  
1403  
1404  
1405  /* harmony default export */ var default_formats = ([bold, code, image_image, italic, link_link, strikethrough, underline]);
1406  
1407  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/index.js
1408  
1409  
1410  /**
1411   * WordPress dependencies
1412   */
1413  
1414  /**
1415   * Internal dependencies
1416   */
1417  
1418  
1419  default_formats.forEach(function (_ref) {
1420    var name = _ref.name,
1421        settings = Object(objectWithoutProperties["a" /* default */])(_ref, ["name"]);
1422  
1423    return Object(external_this_wp_richText_["registerFormatType"])(name, settings);
1424  });
1425  
1426  
1427  /***/ }),
1428  
1429  /***/ 40:
1430  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1431  
1432  "use strict";
1433  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
1434  function _objectWithoutPropertiesLoose(source, excluded) {
1435    if (source == null) return {};
1436    var target = {};
1437    var sourceKeys = Object.keys(source);
1438    var key, i;
1439  
1440    for (i = 0; i < sourceKeys.length; i++) {
1441      key = sourceKeys[i];
1442      if (excluded.indexOf(key) >= 0) continue;
1443      target[key] = source[key];
1444    }
1445  
1446    return target;
1447  }
1448  
1449  /***/ }),
1450  
1451  /***/ 5:
1452  /***/ (function(module, exports) {
1453  
1454  (function() { module.exports = this["wp"]["blockEditor"]; }());
1455  
1456  /***/ }),
1457  
1458  /***/ 54:
1459  /***/ (function(module, exports) {
1460  
1461  (function() { module.exports = this["wp"]["htmlEntities"]; }());
1462  
1463  /***/ }),
1464  
1465  /***/ 6:
1466  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1467  
1468  "use strict";
1469  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
1470  /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
1471  
1472  function _objectSpread(target) {
1473    for (var i = 1; i < arguments.length; i++) {
1474      var source = arguments[i] != null ? Object(arguments[i]) : {};
1475      var ownKeys = Object.keys(source);
1476  
1477      if (typeof Object.getOwnPropertySymbols === 'function') {
1478        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
1479          return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1480        }));
1481      }
1482  
1483      ownKeys.forEach(function (key) {
1484        Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
1485      });
1486    }
1487  
1488    return target;
1489  }
1490  
1491  /***/ }),
1492  
1493  /***/ 7:
1494  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1495  
1496  "use strict";
1497  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
1498  function _assertThisInitialized(self) {
1499    if (self === void 0) {
1500      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1501    }
1502  
1503    return self;
1504  }
1505  
1506  /***/ }),
1507  
1508  /***/ 9:
1509  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1510  
1511  "use strict";
1512  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
1513  function _defineProperty(obj, key, value) {
1514    if (key in obj) {
1515      Object.defineProperty(obj, key, {
1516        value: value,
1517        enumerable: true,
1518        configurable: true,
1519        writable: true
1520      });
1521    } else {
1522      obj[key] = value;
1523    }
1524  
1525    return obj;
1526  }
1527  
1528  /***/ })
1529  
1530  /******/ });


Generated: Fri Jan 24 01:00:03 2020 Cross-referenced by PHPXref 0.7.1