[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> compose.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["compose"] =
   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 = 391);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 11:
  98  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99  
 100  "use strict";
 101  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 102  function _defineProperties(target, props) {
 103    for (var i = 0; i < props.length; i++) {
 104      var descriptor = props[i];
 105      descriptor.enumerable = descriptor.enumerable || false;
 106      descriptor.configurable = true;
 107      if ("value" in descriptor) descriptor.writable = true;
 108      Object.defineProperty(target, descriptor.key, descriptor);
 109    }
 110  }
 111  
 112  function _createClass(Constructor, protoProps, staticProps) {
 113    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 114    if (staticProps) _defineProperties(Constructor, staticProps);
 115    return Constructor;
 116  }
 117  
 118  /***/ }),
 119  
 120  /***/ 115:
 121  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 122  
 123  "use strict";
 124  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useMediaQuery; });
 125  /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
 126  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
 127  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
 128  
 129  
 130  /**
 131   * WordPress dependencies
 132   */
 133  
 134  /**
 135   * Runs a media query and returns its value when it changes.
 136   *
 137   * @param {string} query Media Query.
 138   * @return {boolean} return value of the media query.
 139   */
 140  
 141  function useMediaQuery(query) {
 142    var _useState = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(false),
 143        _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState, 2),
 144        match = _useState2[0],
 145        setMatch = _useState2[1];
 146  
 147    Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () {
 148      var updateMatch = function updateMatch() {
 149        return setMatch(window.matchMedia(query).matches);
 150      };
 151  
 152      updateMatch();
 153      var list = window.matchMedia(query);
 154      list.addListener(updateMatch);
 155      return function () {
 156        list.removeListener(updateMatch);
 157      };
 158    }, [query]);
 159    return match;
 160  }
 161  
 162  
 163  /***/ }),
 164  
 165  /***/ 12:
 166  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 167  
 168  "use strict";
 169  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 170  function _classCallCheck(instance, Constructor) {
 171    if (!(instance instanceof Constructor)) {
 172      throw new TypeError("Cannot call a class as a function");
 173    }
 174  }
 175  
 176  /***/ }),
 177  
 178  /***/ 13:
 179  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 180  
 181  "use strict";
 182  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 183  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
 184  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
 185  
 186  
 187  function _possibleConstructorReturn(self, call) {
 188    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 189      return call;
 190    }
 191  
 192    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 193  }
 194  
 195  /***/ }),
 196  
 197  /***/ 14:
 198  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 199  
 200  "use strict";
 201  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 202  function _getPrototypeOf(o) {
 203    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 204      return o.__proto__ || Object.getPrototypeOf(o);
 205    };
 206    return _getPrototypeOf(o);
 207  }
 208  
 209  /***/ }),
 210  
 211  /***/ 15:
 212  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 213  
 214  "use strict";
 215  
 216  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 217  function _setPrototypeOf(o, p) {
 218    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 219      o.__proto__ = p;
 220      return o;
 221    };
 222  
 223    return _setPrototypeOf(o, p);
 224  }
 225  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 226  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
 227  
 228  function _inherits(subClass, superClass) {
 229    if (typeof superClass !== "function" && superClass !== null) {
 230      throw new TypeError("Super expression must either be null or a function");
 231    }
 232  
 233    subClass.prototype = Object.create(superClass && superClass.prototype, {
 234      constructor: {
 235        value: subClass,
 236        writable: true,
 237        configurable: true
 238      }
 239    });
 240    if (superClass) _setPrototypeOf(subClass, superClass);
 241  }
 242  
 243  /***/ }),
 244  
 245  /***/ 18:
 246  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 247  
 248  "use strict";
 249  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 250  function _extends() {
 251    _extends = Object.assign || function (target) {
 252      for (var i = 1; i < arguments.length; i++) {
 253        var source = arguments[i];
 254  
 255        for (var key in source) {
 256          if (Object.prototype.hasOwnProperty.call(source, key)) {
 257            target[key] = source[key];
 258          }
 259        }
 260      }
 261  
 262      return target;
 263    };
 264  
 265    return _extends.apply(this, arguments);
 266  }
 267  
 268  /***/ }),
 269  
 270  /***/ 2:
 271  /***/ (function(module, exports) {
 272  
 273  (function() { module.exports = this["lodash"]; }());
 274  
 275  /***/ }),
 276  
 277  /***/ 215:
 278  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 279  
 280  "use strict";
 281  /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var _use_media_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(115);
 282  /**
 283   * Internal dependencies
 284   */
 285  
 286  /**
 287   * Whether or not the user agent is Internet Explorer.
 288   *
 289   * @type {boolean}
 290   */
 291  
 292  var IS_IE = typeof window !== 'undefined' && window.navigator.userAgent.indexOf('Trident') >= 0;
 293  /**
 294   * Hook returning whether the user has a preference for reduced motion.
 295   *
 296   * @return {boolean} Reduced motion preference value.
 297   */
 298  
 299  var useReducedMotion = process.env.FORCE_REDUCED_MOTION || IS_IE ? function () {
 300    return true;
 301  } : function () {
 302    return Object(_use_media_query__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])('(prefers-reduced-motion: reduce)');
 303  };
 304  /* harmony default export */ __webpack_exports__["a"] = (useReducedMotion);
 305  
 306  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(96)))
 307  
 308  /***/ }),
 309  
 310  /***/ 23:
 311  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 312  
 313  "use strict";
 314  
 315  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 316  var arrayWithHoles = __webpack_require__(38);
 317  
 318  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 319  function _iterableToArrayLimit(arr, i) {
 320    var _arr = [];
 321    var _n = true;
 322    var _d = false;
 323    var _e = undefined;
 324  
 325    try {
 326      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 327        _arr.push(_s.value);
 328  
 329        if (i && _arr.length === i) break;
 330      }
 331    } catch (err) {
 332      _d = true;
 333      _e = err;
 334    } finally {
 335      try {
 336        if (!_n && _i["return"] != null) _i["return"]();
 337      } finally {
 338        if (_d) throw _e;
 339      }
 340    }
 341  
 342    return _arr;
 343  }
 344  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 345  var nonIterableRest = __webpack_require__(39);
 346  
 347  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 348  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
 349  
 350  
 351  
 352  function _slicedToArray(arr, i) {
 353    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(nonIterableRest["a" /* default */])();
 354  }
 355  
 356  /***/ }),
 357  
 358  /***/ 31:
 359  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 360  
 361  "use strict";
 362  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 363  function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
 364  
 365  function _typeof(obj) {
 366    if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
 367      _typeof = function _typeof(obj) {
 368        return _typeof2(obj);
 369      };
 370    } else {
 371      _typeof = function _typeof(obj) {
 372        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
 373      };
 374    }
 375  
 376    return _typeof(obj);
 377  }
 378  
 379  /***/ }),
 380  
 381  /***/ 38:
 382  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 383  
 384  "use strict";
 385  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 386  function _arrayWithHoles(arr) {
 387    if (Array.isArray(arr)) return arr;
 388  }
 389  
 390  /***/ }),
 391  
 392  /***/ 39:
 393  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 394  
 395  "use strict";
 396  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 397  function _nonIterableRest() {
 398    throw new TypeError("Invalid attempt to destructure non-iterable instance");
 399  }
 400  
 401  /***/ }),
 402  
 403  /***/ 391:
 404  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 405  
 406  "use strict";
 407  __webpack_require__.r(__webpack_exports__);
 408  
 409  // EXTERNAL MODULE: external "lodash"
 410  var external_lodash_ = __webpack_require__(2);
 411  
 412  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/utils/create-higher-order-component/index.js
 413  /**
 414   * External dependencies
 415   */
 416  
 417  /**
 418   * Given a function mapping a component to an enhanced component and modifier
 419   * name, returns the enhanced component augmented with a generated displayName.
 420   *
 421   * @param {Function} mapComponentToEnhancedComponent Function mapping component
 422   *                                                   to enhanced component.
 423   * @param {string}   modifierName                    Seed name from which to
 424   *                                                   generated display name.
 425   *
 426   * @return {WPComponent} Component class with generated display name assigned.
 427   */
 428  
 429  function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
 430    return function (OriginalComponent) {
 431      var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);
 432      var _OriginalComponent$di = OriginalComponent.displayName,
 433          displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di;
 434      EnhancedComponent.displayName = "".concat(Object(external_lodash_["upperFirst"])(Object(external_lodash_["camelCase"])(modifierName)), "(").concat(displayName, ")");
 435      return EnhancedComponent;
 436    };
 437  }
 438  
 439  /* harmony default export */ var create_higher_order_component = (createHigherOrderComponent);
 440  
 441  // EXTERNAL MODULE: external {"this":["wp","element"]}
 442  var external_this_wp_element_ = __webpack_require__(0);
 443  
 444  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/if-condition/index.js
 445  
 446  
 447  /**
 448   * Internal dependencies
 449   */
 450  
 451  /**
 452   * Higher-order component creator, creating a new component which renders if
 453   * the given condition is satisfied or with the given optional prop name.
 454   *
 455   * @param {Function} predicate Function to test condition.
 456   *
 457   * @return {Function} Higher-order component.
 458   */
 459  
 460  var if_condition_ifCondition = function ifCondition(predicate) {
 461    return create_higher_order_component(function (WrappedComponent) {
 462      return function (props) {
 463        if (!predicate(props)) {
 464          return null;
 465        }
 466  
 467        return Object(external_this_wp_element_["createElement"])(WrappedComponent, props);
 468      };
 469    }, 'ifCondition');
 470  };
 471  
 472  /* harmony default export */ var if_condition = (if_condition_ifCondition);
 473  
 474  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
 475  var classCallCheck = __webpack_require__(12);
 476  
 477  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
 478  var createClass = __webpack_require__(11);
 479  
 480  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
 481  var possibleConstructorReturn = __webpack_require__(13);
 482  
 483  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
 484  var getPrototypeOf = __webpack_require__(14);
 485  
 486  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
 487  var inherits = __webpack_require__(15);
 488  
 489  // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
 490  var external_this_wp_isShallowEqual_ = __webpack_require__(41);
 491  var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
 492  
 493  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/pure/index.js
 494  
 495  
 496  
 497  
 498  
 499  
 500  
 501  /**
 502   * WordPress dependencies
 503   */
 504  
 505  
 506  /**
 507   * Internal dependencies
 508   */
 509  
 510  
 511  /**
 512   * Given a component returns the enhanced component augmented with a component
 513   * only rerendering when its props/state change
 514   *
 515   * @param {Function} mapComponentToEnhancedComponent Function mapping component
 516   *                                                   to enhanced component.
 517   * @param {string}   modifierName                    Seed name from which to
 518   *                                                   generated display name.
 519   *
 520   * @return {WPComponent} Component class with generated display name assigned.
 521   */
 522  
 523  var pure = create_higher_order_component(function (Wrapped) {
 524    if (Wrapped.prototype instanceof external_this_wp_element_["Component"]) {
 525      return (
 526        /*#__PURE__*/
 527        function (_Wrapped) {
 528          Object(inherits["a" /* default */])(_class, _Wrapped);
 529  
 530          function _class() {
 531            Object(classCallCheck["a" /* default */])(this, _class);
 532  
 533            return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class).apply(this, arguments));
 534          }
 535  
 536          Object(createClass["a" /* default */])(_class, [{
 537            key: "shouldComponentUpdate",
 538            value: function shouldComponentUpdate(nextProps, nextState) {
 539              return !external_this_wp_isShallowEqual_default()(nextProps, this.props) || !external_this_wp_isShallowEqual_default()(nextState, this.state);
 540            }
 541          }]);
 542  
 543          return _class;
 544        }(Wrapped)
 545      );
 546    }
 547  
 548    return (
 549      /*#__PURE__*/
 550      function (_Component) {
 551        Object(inherits["a" /* default */])(_class2, _Component);
 552  
 553        function _class2() {
 554          Object(classCallCheck["a" /* default */])(this, _class2);
 555  
 556          return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class2).apply(this, arguments));
 557        }
 558  
 559        Object(createClass["a" /* default */])(_class2, [{
 560          key: "shouldComponentUpdate",
 561          value: function shouldComponentUpdate(nextProps) {
 562            return !external_this_wp_isShallowEqual_default()(nextProps, this.props);
 563          }
 564        }, {
 565          key: "render",
 566          value: function render() {
 567            return Object(external_this_wp_element_["createElement"])(Wrapped, this.props);
 568          }
 569        }]);
 570  
 571        return _class2;
 572      }(external_this_wp_element_["Component"])
 573    );
 574  }, 'pure');
 575  /* harmony default export */ var higher_order_pure = (pure);
 576  
 577  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
 578  var esm_extends = __webpack_require__(18);
 579  
 580  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
 581  var assertThisInitialized = __webpack_require__(5);
 582  
 583  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/listener.js
 584  
 585  
 586  
 587  /**
 588   * External dependencies
 589   */
 590  
 591  /**
 592   * Class responsible for orchestrating event handling on the global window,
 593   * binding a single event to be shared across all handling instances, and
 594   * removing the handler when no instances are listening for the event.
 595   */
 596  
 597  var listener_Listener =
 598  /*#__PURE__*/
 599  function () {
 600    function Listener() {
 601      Object(classCallCheck["a" /* default */])(this, Listener);
 602  
 603      this.listeners = {};
 604      this.handleEvent = this.handleEvent.bind(this);
 605    }
 606  
 607    Object(createClass["a" /* default */])(Listener, [{
 608      key: "add",
 609      value: function add(eventType, instance) {
 610        if (!this.listeners[eventType]) {
 611          // Adding first listener for this type, so bind event.
 612          window.addEventListener(eventType, this.handleEvent);
 613          this.listeners[eventType] = [];
 614        }
 615  
 616        this.listeners[eventType].push(instance);
 617      }
 618    }, {
 619      key: "remove",
 620      value: function remove(eventType, instance) {
 621        this.listeners[eventType] = Object(external_lodash_["without"])(this.listeners[eventType], instance);
 622  
 623        if (!this.listeners[eventType].length) {
 624          // Removing last listener for this type, so unbind event.
 625          window.removeEventListener(eventType, this.handleEvent);
 626          delete this.listeners[eventType];
 627        }
 628      }
 629    }, {
 630      key: "handleEvent",
 631      value: function handleEvent(event) {
 632        Object(external_lodash_["forEach"])(this.listeners[event.type], function (instance) {
 633          instance.handleEvent(event);
 634        });
 635      }
 636    }]);
 637  
 638    return Listener;
 639  }();
 640  
 641  /* harmony default export */ var listener = (listener_Listener);
 642  
 643  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/index.js
 644  
 645  
 646  
 647  
 648  
 649  
 650  
 651  
 652  
 653  /**
 654   * External dependencies
 655   */
 656  
 657  /**
 658   * WordPress dependencies
 659   */
 660  
 661  
 662  /**
 663   * Internal dependencies
 664   */
 665  
 666  
 667  
 668  /**
 669   * Listener instance responsible for managing document event handling.
 670   *
 671   * @type {Listener}
 672   */
 673  
 674  var with_global_events_listener = new listener();
 675  /**
 676   * Higher-order component creator which, given an object of DOM event types and
 677   * values corresponding to a callback function name on the component, will
 678   * create or update a window event handler to invoke the callback when an event
 679   * occurs. On behalf of the consuming developer, the higher-order component
 680   * manages unbinding when the component unmounts, and binding at most a single
 681   * event handler for the entire application.
 682   *
 683   * @param {Object<string,string>} eventTypesToHandlers Object with keys of DOM
 684   *                                                     event type, the value a
 685   *                                                     name of the function on
 686   *                                                     the original component's
 687   *                                                     instance which handles
 688   *                                                     the event.
 689   *
 690   * @return {Function} Higher-order component.
 691   */
 692  
 693  function withGlobalEvents(eventTypesToHandlers) {
 694    return create_higher_order_component(function (WrappedComponent) {
 695      var Wrapper =
 696      /*#__PURE__*/
 697      function (_Component) {
 698        Object(inherits["a" /* default */])(Wrapper, _Component);
 699  
 700        function Wrapper() {
 701          var _this;
 702  
 703          Object(classCallCheck["a" /* default */])(this, Wrapper);
 704  
 705          _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(Wrapper).apply(this, arguments));
 706          _this.handleEvent = _this.handleEvent.bind(Object(assertThisInitialized["a" /* default */])(_this));
 707          _this.handleRef = _this.handleRef.bind(Object(assertThisInitialized["a" /* default */])(_this));
 708          return _this;
 709        }
 710  
 711        Object(createClass["a" /* default */])(Wrapper, [{
 712          key: "componentDidMount",
 713          value: function componentDidMount() {
 714            var _this2 = this;
 715  
 716            Object(external_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) {
 717              with_global_events_listener.add(eventType, _this2);
 718            });
 719          }
 720        }, {
 721          key: "componentWillUnmount",
 722          value: function componentWillUnmount() {
 723            var _this3 = this;
 724  
 725            Object(external_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) {
 726              with_global_events_listener.remove(eventType, _this3);
 727            });
 728          }
 729        }, {
 730          key: "handleEvent",
 731          value: function handleEvent(event) {
 732            var handler = eventTypesToHandlers[event.type];
 733  
 734            if (typeof this.wrappedRef[handler] === 'function') {
 735              this.wrappedRef[handler](event);
 736            }
 737          }
 738        }, {
 739          key: "handleRef",
 740          value: function handleRef(el) {
 741            this.wrappedRef = el; // Any component using `withGlobalEvents` that is not setting a `ref`
 742            // will cause `this.props.forwardedRef` to be `null`, so we need this
 743            // check.
 744  
 745            if (this.props.forwardedRef) {
 746              this.props.forwardedRef(el);
 747            }
 748          }
 749        }, {
 750          key: "render",
 751          value: function render() {
 752            return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props.ownProps, {
 753              ref: this.handleRef
 754            }));
 755          }
 756        }]);
 757  
 758        return Wrapper;
 759      }(external_this_wp_element_["Component"]);
 760  
 761      return Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
 762        return Object(external_this_wp_element_["createElement"])(Wrapper, {
 763          ownProps: props,
 764          forwardedRef: ref
 765        });
 766      });
 767    }, 'withGlobalEvents');
 768  }
 769  
 770  /* harmony default export */ var with_global_events = (withGlobalEvents);
 771  
 772  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-instance-id/index.js
 773  
 774  
 775  
 776  
 777  
 778  
 779  
 780  
 781  /**
 782   * WordPress dependencies
 783   */
 784  
 785  /**
 786   * Internal dependencies
 787   */
 788  
 789  
 790  /**
 791   * A Higher Order Component used to be provide a unique instance ID by
 792   * component.
 793   *
 794   * @param {WPElement} WrappedComponent The wrapped component.
 795   *
 796   * @return {Component} Component with an instanceId prop.
 797   */
 798  
 799  /* harmony default export */ var with_instance_id = (create_higher_order_component(function (WrappedComponent) {
 800    var instances = 0;
 801    return (
 802      /*#__PURE__*/
 803      function (_Component) {
 804        Object(inherits["a" /* default */])(_class, _Component);
 805  
 806        function _class() {
 807          var _this;
 808  
 809          Object(classCallCheck["a" /* default */])(this, _class);
 810  
 811          _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class).apply(this, arguments));
 812          _this.instanceId = instances++;
 813          return _this;
 814        }
 815  
 816        Object(createClass["a" /* default */])(_class, [{
 817          key: "render",
 818          value: function render() {
 819            return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props, {
 820              instanceId: this.instanceId
 821            }));
 822          }
 823        }]);
 824  
 825        return _class;
 826      }(external_this_wp_element_["Component"])
 827    );
 828  }, 'withInstanceId'));
 829  
 830  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-safe-timeout/index.js
 831  
 832  
 833  
 834  
 835  
 836  
 837  
 838  
 839  
 840  /**
 841   * External dependencies
 842   */
 843  
 844  /**
 845   * WordPress dependencies
 846   */
 847  
 848  
 849  /**
 850   * Internal dependencies
 851   */
 852  
 853  
 854  /**
 855   * A higher-order component used to provide and manage delayed function calls
 856   * that ought to be bound to a component's lifecycle.
 857   *
 858   * @param {Component} OriginalComponent Component requiring setTimeout
 859   *
 860   * @return {Component}                  Wrapped component.
 861   */
 862  
 863  var withSafeTimeout = create_higher_order_component(function (OriginalComponent) {
 864    return (
 865      /*#__PURE__*/
 866      function (_Component) {
 867        Object(inherits["a" /* default */])(WrappedComponent, _Component);
 868  
 869        function WrappedComponent() {
 870          var _this;
 871  
 872          Object(classCallCheck["a" /* default */])(this, WrappedComponent);
 873  
 874          _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(WrappedComponent).apply(this, arguments));
 875          _this.timeouts = [];
 876          _this.setTimeout = _this.setTimeout.bind(Object(assertThisInitialized["a" /* default */])(_this));
 877          _this.clearTimeout = _this.clearTimeout.bind(Object(assertThisInitialized["a" /* default */])(_this));
 878          return _this;
 879        }
 880  
 881        Object(createClass["a" /* default */])(WrappedComponent, [{
 882          key: "componentWillUnmount",
 883          value: function componentWillUnmount() {
 884            this.timeouts.forEach(clearTimeout);
 885          }
 886        }, {
 887          key: "setTimeout",
 888          value: function (_setTimeout) {
 889            function setTimeout(_x, _x2) {
 890              return _setTimeout.apply(this, arguments);
 891            }
 892  
 893            setTimeout.toString = function () {
 894              return _setTimeout.toString();
 895            };
 896  
 897            return setTimeout;
 898          }(function (fn, delay) {
 899            var _this2 = this;
 900  
 901            var id = setTimeout(function () {
 902              fn();
 903  
 904              _this2.clearTimeout(id);
 905            }, delay);
 906            this.timeouts.push(id);
 907            return id;
 908          })
 909        }, {
 910          key: "clearTimeout",
 911          value: function (_clearTimeout) {
 912            function clearTimeout(_x3) {
 913              return _clearTimeout.apply(this, arguments);
 914            }
 915  
 916            clearTimeout.toString = function () {
 917              return _clearTimeout.toString();
 918            };
 919  
 920            return clearTimeout;
 921          }(function (id) {
 922            clearTimeout(id);
 923            this.timeouts = Object(external_lodash_["without"])(this.timeouts, id);
 924          })
 925        }, {
 926          key: "render",
 927          value: function render() {
 928            return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, {
 929              setTimeout: this.setTimeout,
 930              clearTimeout: this.clearTimeout
 931            }));
 932          }
 933        }]);
 934  
 935        return WrappedComponent;
 936      }(external_this_wp_element_["Component"])
 937    );
 938  }, 'withSafeTimeout');
 939  /* harmony default export */ var with_safe_timeout = (withSafeTimeout);
 940  
 941  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-state/index.js
 942  
 943  
 944  
 945  
 946  
 947  
 948  
 949  
 950  
 951  /**
 952   * WordPress dependencies
 953   */
 954  
 955  /**
 956   * Internal dependencies
 957   */
 958  
 959  
 960  /**
 961   * A Higher Order Component used to provide and manage internal component state
 962   * via props.
 963   *
 964   * @param {?Object} initialState Optional initial state of the component.
 965   *
 966   * @return {Component} Wrapped component.
 967   */
 968  
 969  function withState() {
 970    var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 971    return create_higher_order_component(function (OriginalComponent) {
 972      return (
 973        /*#__PURE__*/
 974        function (_Component) {
 975          Object(inherits["a" /* default */])(WrappedComponent, _Component);
 976  
 977          function WrappedComponent() {
 978            var _this;
 979  
 980            Object(classCallCheck["a" /* default */])(this, WrappedComponent);
 981  
 982            _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(WrappedComponent).apply(this, arguments));
 983            _this.setState = _this.setState.bind(Object(assertThisInitialized["a" /* default */])(_this));
 984            _this.state = initialState;
 985            return _this;
 986          }
 987  
 988          Object(createClass["a" /* default */])(WrappedComponent, [{
 989            key: "render",
 990            value: function render() {
 991              return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, this.state, {
 992                setState: this.setState
 993              }));
 994            }
 995          }]);
 996  
 997          return WrappedComponent;
 998        }(external_this_wp_element_["Component"])
 999      );
1000    }, 'withState');
1001  }
1002  
1003  // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-media-query/index.js
1004  var use_media_query = __webpack_require__(115);
1005  
1006  // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-reduced-motion/index.js
1007  var use_reduced_motion = __webpack_require__(215);
1008  
1009  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/index.js
1010  /* concated harmony reexport createHigherOrderComponent */__webpack_require__.d(__webpack_exports__, "createHigherOrderComponent", function() { return create_higher_order_component; });
1011  /* concated harmony reexport compose */__webpack_require__.d(__webpack_exports__, "compose", function() { return external_lodash_["flowRight"]; });
1012  /* concated harmony reexport ifCondition */__webpack_require__.d(__webpack_exports__, "ifCondition", function() { return if_condition; });
1013  /* concated harmony reexport pure */__webpack_require__.d(__webpack_exports__, "pure", function() { return higher_order_pure; });
1014  /* concated harmony reexport withGlobalEvents */__webpack_require__.d(__webpack_exports__, "withGlobalEvents", function() { return with_global_events; });
1015  /* concated harmony reexport withInstanceId */__webpack_require__.d(__webpack_exports__, "withInstanceId", function() { return with_instance_id; });
1016  /* concated harmony reexport withSafeTimeout */__webpack_require__.d(__webpack_exports__, "withSafeTimeout", function() { return with_safe_timeout; });
1017  /* concated harmony reexport withState */__webpack_require__.d(__webpack_exports__, "withState", function() { return withState; });
1018  /* concated harmony reexport useMediaQuery */__webpack_require__.d(__webpack_exports__, "useMediaQuery", function() { return use_media_query["a" /* default */]; });
1019  /* concated harmony reexport useReducedMotion */__webpack_require__.d(__webpack_exports__, "useReducedMotion", function() { return use_reduced_motion["a" /* default */]; });
1020  /**
1021   * External dependencies
1022   */
1023   // Utils
1024  
1025  
1026  /**
1027   * Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
1028   * composition, where each successive invocation is supplied the return value of the previous.
1029   *
1030   * @param {...Function} hocs The HOC functions to invoke.
1031   *
1032   * @return {Function} Returns the new composite function.
1033   */
1034  
1035   // Higher-order components
1036  
1037  
1038  
1039  
1040  
1041  
1042   // Hooks
1043  
1044  
1045  
1046  
1047  
1048  /***/ }),
1049  
1050  /***/ 41:
1051  /***/ (function(module, exports) {
1052  
1053  (function() { module.exports = this["wp"]["isShallowEqual"]; }());
1054  
1055  /***/ }),
1056  
1057  /***/ 5:
1058  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1059  
1060  "use strict";
1061  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
1062  function _assertThisInitialized(self) {
1063    if (self === void 0) {
1064      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1065    }
1066  
1067    return self;
1068  }
1069  
1070  /***/ }),
1071  
1072  /***/ 96:
1073  /***/ (function(module, exports) {
1074  
1075  // shim for using process in browser
1076  var process = module.exports = {};
1077  
1078  // cached from whatever global is present so that test runners that stub it
1079  // don't break things.  But we need to wrap it in a try catch in case it is
1080  // wrapped in strict mode code which doesn't define any globals.  It's inside a
1081  // function because try/catches deoptimize in certain engines.
1082  
1083  var cachedSetTimeout;
1084  var cachedClearTimeout;
1085  
1086  function defaultSetTimout() {
1087      throw new Error('setTimeout has not been defined');
1088  }
1089  function defaultClearTimeout () {
1090      throw new Error('clearTimeout has not been defined');
1091  }
1092  (function () {
1093      try {
1094          if (typeof setTimeout === 'function') {
1095              cachedSetTimeout = setTimeout;
1096          } else {
1097              cachedSetTimeout = defaultSetTimout;
1098          }
1099      } catch (e) {
1100          cachedSetTimeout = defaultSetTimout;
1101      }
1102      try {
1103          if (typeof clearTimeout === 'function') {
1104              cachedClearTimeout = clearTimeout;
1105          } else {
1106              cachedClearTimeout = defaultClearTimeout;
1107          }
1108      } catch (e) {
1109          cachedClearTimeout = defaultClearTimeout;
1110      }
1111  } ())
1112  function runTimeout(fun) {
1113      if (cachedSetTimeout === setTimeout) {
1114          //normal enviroments in sane situations
1115          return setTimeout(fun, 0);
1116      }
1117      // if setTimeout wasn't available but was latter defined
1118      if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
1119          cachedSetTimeout = setTimeout;
1120          return setTimeout(fun, 0);
1121      }
1122      try {
1123          // when when somebody has screwed with setTimeout but no I.E. maddness
1124          return cachedSetTimeout(fun, 0);
1125      } catch(e){
1126          try {
1127              // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
1128              return cachedSetTimeout.call(null, fun, 0);
1129          } catch(e){
1130              // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
1131              return cachedSetTimeout.call(this, fun, 0);
1132          }
1133      }
1134  
1135  
1136  }
1137  function runClearTimeout(marker) {
1138      if (cachedClearTimeout === clearTimeout) {
1139          //normal enviroments in sane situations
1140          return clearTimeout(marker);
1141      }
1142      // if clearTimeout wasn't available but was latter defined
1143      if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
1144          cachedClearTimeout = clearTimeout;
1145          return clearTimeout(marker);
1146      }
1147      try {
1148          // when when somebody has screwed with setTimeout but no I.E. maddness
1149          return cachedClearTimeout(marker);
1150      } catch (e){
1151          try {
1152              // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
1153              return cachedClearTimeout.call(null, marker);
1154          } catch (e){
1155              // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
1156              // Some versions of I.E. have different rules for clearTimeout vs setTimeout
1157              return cachedClearTimeout.call(this, marker);
1158          }
1159      }
1160  
1161  
1162  
1163  }
1164  var queue = [];
1165  var draining = false;
1166  var currentQueue;
1167  var queueIndex = -1;
1168  
1169  function cleanUpNextTick() {
1170      if (!draining || !currentQueue) {
1171          return;
1172      }
1173      draining = false;
1174      if (currentQueue.length) {
1175          queue = currentQueue.concat(queue);
1176      } else {
1177          queueIndex = -1;
1178      }
1179      if (queue.length) {
1180          drainQueue();
1181      }
1182  }
1183  
1184  function drainQueue() {
1185      if (draining) {
1186          return;
1187      }
1188      var timeout = runTimeout(cleanUpNextTick);
1189      draining = true;
1190  
1191      var len = queue.length;
1192      while(len) {
1193          currentQueue = queue;
1194          queue = [];
1195          while (++queueIndex < len) {
1196              if (currentQueue) {
1197                  currentQueue[queueIndex].run();
1198              }
1199          }
1200          queueIndex = -1;
1201          len = queue.length;
1202      }
1203      currentQueue = null;
1204      draining = false;
1205      runClearTimeout(timeout);
1206  }
1207  
1208  process.nextTick = function (fun) {
1209      var args = new Array(arguments.length - 1);
1210      if (arguments.length > 1) {
1211          for (var i = 1; i < arguments.length; i++) {
1212              args[i - 1] = arguments[i];
1213          }
1214      }
1215      queue.push(new Item(fun, args));
1216      if (queue.length === 1 && !draining) {
1217          runTimeout(drainQueue);
1218      }
1219  };
1220  
1221  // v8 likes predictible objects
1222  function Item(fun, array) {
1223      this.fun = fun;
1224      this.array = array;
1225  }
1226  Item.prototype.run = function () {
1227      this.fun.apply(null, this.array);
1228  };
1229  process.title = 'browser';
1230  process.browser = true;
1231  process.env = {};
1232  process.argv = [];
1233  process.version = ''; // empty string to avoid regexp issues
1234  process.versions = {};
1235  
1236  function noop() {}
1237  
1238  process.on = noop;
1239  process.addListener = noop;
1240  process.once = noop;
1241  process.off = noop;
1242  process.removeListener = noop;
1243  process.removeAllListeners = noop;
1244  process.emit = noop;
1245  process.prependListener = noop;
1246  process.prependOnceListener = noop;
1247  
1248  process.listeners = function (name) { return [] }
1249  
1250  process.binding = function (name) {
1251      throw new Error('process.binding is not supported');
1252  };
1253  
1254  process.cwd = function () { return '/' };
1255  process.chdir = function (dir) {
1256      throw new Error('process.chdir is not supported');
1257  };
1258  process.umask = function() { return 0; };
1259  
1260  
1261  /***/ })
1262  
1263  /******/ });


Generated: Sat Sep 21 01:00:03 2019 Cross-referenced by PHPXref 0.7.1