[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

   1  this["wp"] = this["wp"] || {}; this["wp"]["components"] =
   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 = 264);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ([
  89  /* 0 */
  90  /***/ (function(module, exports) {
  91  
  92  (function() { module.exports = window["wp"]["element"]; }());
  93  
  94  /***/ }),
  95  /* 1 */
  96  /***/ (function(module, exports) {
  97  
  98  (function() { module.exports = window["wp"]["i18n"]; }());
  99  
 100  /***/ }),
 101  /* 2 */
 102  /***/ (function(module, exports) {
 103  
 104  (function() { module.exports = window["lodash"]; }());
 105  
 106  /***/ }),
 107  /* 3 */,
 108  /* 4 */,
 109  /* 5 */
 110  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 111  
 112  "use strict";
 113  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
 114  function _defineProperty(obj, key, value) {
 115    if (key in obj) {
 116      Object.defineProperty(obj, key, {
 117        value: value,
 118        enumerable: true,
 119        configurable: true,
 120        writable: true
 121      });
 122    } else {
 123      obj[key] = value;
 124    }
 125  
 126    return obj;
 127  }
 128  
 129  /***/ }),
 130  /* 6 */,
 131  /* 7 */
 132  /***/ (function(module, exports) {
 133  
 134  (function() { module.exports = window["wp"]["primitives"]; }());
 135  
 136  /***/ }),
 137  /* 8 */
 138  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 139  
 140  "use strict";
 141  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 142  function _extends() {
 143    _extends = Object.assign || function (target) {
 144      for (var i = 1; i < arguments.length; i++) {
 145        var source = arguments[i];
 146  
 147        for (var key in source) {
 148          if (Object.prototype.hasOwnProperty.call(source, key)) {
 149            target[key] = source[key];
 150          }
 151        }
 152      }
 153  
 154      return target;
 155    };
 156  
 157    return _extends.apply(this, arguments);
 158  }
 159  
 160  /***/ }),
 161  /* 9 */,
 162  /* 10 */
 163  /***/ (function(module, exports, __webpack_require__) {
 164  
 165  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 166    Copyright (c) 2017 Jed Watson.
 167    Licensed under the MIT License (MIT), see
 168    http://jedwatson.github.io/classnames
 169  */
 170  /* global define */
 171  
 172  (function () {
 173      'use strict';
 174  
 175      var hasOwn = {}.hasOwnProperty;
 176  
 177  	function classNames () {
 178          var classes = [];
 179  
 180          for (var i = 0; i < arguments.length; i++) {
 181              var arg = arguments[i];
 182              if (!arg) continue;
 183  
 184              var argType = typeof arg;
 185  
 186              if (argType === 'string' || argType === 'number') {
 187                  classes.push(arg);
 188              } else if (Array.isArray(arg) && arg.length) {
 189                  var inner = classNames.apply(null, arg);
 190                  if (inner) {
 191                      classes.push(inner);
 192                  }
 193              } else if (argType === 'object') {
 194                  for (var key in arg) {
 195                      if (hasOwn.call(arg, key) && arg[key]) {
 196                          classes.push(key);
 197                      }
 198                  }
 199              }
 200          }
 201  
 202          return classes.join(' ');
 203      }
 204  
 205      if ( true && module.exports) {
 206          classNames.default = classNames;
 207          module.exports = classNames;
 208      } else if (true) {
 209          // register as 'classnames', consistent with npm package name
 210          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 211              return classNames;
 212          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 213                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 214      } else {}
 215  }());
 216  
 217  
 218  /***/ }),
 219  /* 11 */
 220  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 221  
 222  "use strict";
 223  
 224  // EXPORTS
 225  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 226  
 227  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 228  var arrayWithHoles = __webpack_require__(38);
 229  
 230  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 231  function _iterableToArrayLimit(arr, i) {
 232    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 233    var _arr = [];
 234    var _n = true;
 235    var _d = false;
 236    var _e = undefined;
 237  
 238    try {
 239      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 240        _arr.push(_s.value);
 241  
 242        if (i && _arr.length === i) break;
 243      }
 244    } catch (err) {
 245      _d = true;
 246      _e = err;
 247    } finally {
 248      try {
 249        if (!_n && _i["return"] != null) _i["return"]();
 250      } finally {
 251        if (_d) throw _e;
 252      }
 253    }
 254  
 255    return _arr;
 256  }
 257  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 258  var unsupportedIterableToArray = __webpack_require__(32);
 259  
 260  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 261  var nonIterableRest = __webpack_require__(39);
 262  
 263  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 264  
 265  
 266  
 267  
 268  function _slicedToArray(arr, i) {
 269    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 270  }
 271  
 272  /***/ }),
 273  /* 12 */
 274  /***/ (function(module, exports) {
 275  
 276  (function() { module.exports = window["wp"]["compose"]; }());
 277  
 278  /***/ }),
 279  /* 13 */
 280  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 281  
 282  "use strict";
 283  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 284  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
 285  
 286  function _objectWithoutProperties(source, excluded) {
 287    if (source == null) return {};
 288    var target = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 289    var key, i;
 290  
 291    if (Object.getOwnPropertySymbols) {
 292      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 293  
 294      for (i = 0; i < sourceSymbolKeys.length; i++) {
 295        key = sourceSymbolKeys[i];
 296        if (excluded.indexOf(key) >= 0) continue;
 297        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 298        target[key] = source[key];
 299      }
 300    }
 301  
 302    return target;
 303  }
 304  
 305  /***/ }),
 306  /* 14 */
 307  /***/ (function(module, exports) {
 308  
 309  (function() { module.exports = window["React"]; }());
 310  
 311  /***/ }),
 312  /* 15 */
 313  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 314  
 315  "use strict";
 316  
 317  // EXPORTS
 318  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 319  
 320  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 321  var arrayLikeToArray = __webpack_require__(24);
 322  
 323  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 324  
 325  function _arrayWithoutHoles(arr) {
 326    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 327  }
 328  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 329  var iterableToArray = __webpack_require__(37);
 330  
 331  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 332  var unsupportedIterableToArray = __webpack_require__(32);
 333  
 334  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 335  function _nonIterableSpread() {
 336    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 337  }
 338  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 339  
 340  
 341  
 342  
 343  function _toConsumableArray(arr) {
 344    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 345  }
 346  
 347  /***/ }),
 348  /* 16 */
 349  /***/ (function(module, exports) {
 350  
 351  (function() { module.exports = window["wp"]["keycodes"]; }());
 352  
 353  /***/ }),
 354  /* 17 */
 355  /***/ (function(module, exports) {
 356  
 357  (function() { module.exports = window["regeneratorRuntime"]; }());
 358  
 359  /***/ }),
 360  /* 18 */
 361  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 362  
 363  "use strict";
 364  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 365  function _assertThisInitialized(self) {
 366    if (self === void 0) {
 367      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 368    }
 369  
 370    return self;
 371  }
 372  
 373  /***/ }),
 374  /* 19 */
 375  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 376  
 377  "use strict";
 378  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 379  function _getPrototypeOf(o) {
 380    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 381      return o.__proto__ || Object.getPrototypeOf(o);
 382    };
 383    return _getPrototypeOf(o);
 384  }
 385  
 386  /***/ }),
 387  /* 20 */
 388  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 389  
 390  "use strict";
 391  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
 392  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectSpread2; });
 393  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _createForOfIteratorHelperLoose; });
 394  function _defineProperty(obj, key, value) {
 395    if (key in obj) {
 396      Object.defineProperty(obj, key, {
 397        value: value,
 398        enumerable: true,
 399        configurable: true,
 400        writable: true
 401      });
 402    } else {
 403      obj[key] = value;
 404    }
 405  
 406    return obj;
 407  }
 408  
 409  function ownKeys(object, enumerableOnly) {
 410    var keys = Object.keys(object);
 411  
 412    if (Object.getOwnPropertySymbols) {
 413      var symbols = Object.getOwnPropertySymbols(object);
 414      if (enumerableOnly) symbols = symbols.filter(function (sym) {
 415        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
 416      });
 417      keys.push.apply(keys, symbols);
 418    }
 419  
 420    return keys;
 421  }
 422  
 423  function _objectSpread2(target) {
 424    for (var i = 1; i < arguments.length; i++) {
 425      var source = arguments[i] != null ? arguments[i] : {};
 426  
 427      if (i % 2) {
 428        ownKeys(Object(source), true).forEach(function (key) {
 429          _defineProperty(target, key, source[key]);
 430        });
 431      } else if (Object.getOwnPropertyDescriptors) {
 432        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
 433      } else {
 434        ownKeys(Object(source)).forEach(function (key) {
 435          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
 436        });
 437      }
 438    }
 439  
 440    return target;
 441  }
 442  
 443  function _objectWithoutPropertiesLoose(source, excluded) {
 444    if (source == null) return {};
 445    var target = {};
 446    var sourceKeys = Object.keys(source);
 447    var key, i;
 448  
 449    for (i = 0; i < sourceKeys.length; i++) {
 450      key = sourceKeys[i];
 451      if (excluded.indexOf(key) >= 0) continue;
 452      target[key] = source[key];
 453    }
 454  
 455    return target;
 456  }
 457  
 458  function _unsupportedIterableToArray(o, minLen) {
 459    if (!o) return;
 460    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
 461    var n = Object.prototype.toString.call(o).slice(8, -1);
 462    if (n === "Object" && o.constructor) n = o.constructor.name;
 463    if (n === "Map" || n === "Set") return Array.from(o);
 464    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
 465  }
 466  
 467  function _arrayLikeToArray(arr, len) {
 468    if (len == null || len > arr.length) len = arr.length;
 469  
 470    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
 471  
 472    return arr2;
 473  }
 474  
 475  function _createForOfIteratorHelperLoose(o, allowArrayLike) {
 476    var it;
 477  
 478    if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
 479      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
 480        if (it) o = it;
 481        var i = 0;
 482        return function () {
 483          if (i >= o.length) return {
 484            done: true
 485          };
 486          return {
 487            done: false,
 488            value: o[i++]
 489          };
 490        };
 491      }
 492  
 493      throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 494    }
 495  
 496    it = o[Symbol.iterator]();
 497    return it.next.bind(it);
 498  }
 499  
 500  
 501  
 502  
 503  /***/ }),
 504  /* 21 */
 505  /***/ (function(module, exports) {
 506  
 507  (function() { module.exports = window["wp"]["richText"]; }());
 508  
 509  /***/ }),
 510  /* 22 */,
 511  /* 23 */,
 512  /* 24 */
 513  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 514  
 515  "use strict";
 516  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 517  function _arrayLikeToArray(arr, len) {
 518    if (len == null || len > arr.length) len = arr.length;
 519  
 520    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 521      arr2[i] = arr[i];
 522    }
 523  
 524    return arr2;
 525  }
 526  
 527  /***/ }),
 528  /* 25 */
 529  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 530  
 531  "use strict";
 532  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 533  function _classCallCheck(instance, Constructor) {
 534    if (!(instance instanceof Constructor)) {
 535      throw new TypeError("Cannot call a class as a function");
 536    }
 537  }
 538  
 539  /***/ }),
 540  /* 26 */
 541  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 542  
 543  "use strict";
 544  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 545  function _defineProperties(target, props) {
 546    for (var i = 0; i < props.length; i++) {
 547      var descriptor = props[i];
 548      descriptor.enumerable = descriptor.enumerable || false;
 549      descriptor.configurable = true;
 550      if ("value" in descriptor) descriptor.writable = true;
 551      Object.defineProperty(target, descriptor.key, descriptor);
 552    }
 553  }
 554  
 555  function _createClass(Constructor, protoProps, staticProps) {
 556    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 557    if (staticProps) _defineProperties(Constructor, staticProps);
 558    return Constructor;
 559  }
 560  
 561  /***/ }),
 562  /* 27 */
 563  /***/ (function(module, exports) {
 564  
 565  (function() { module.exports = window["wp"]["dom"]; }());
 566  
 567  /***/ }),
 568  /* 28 */
 569  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 570  
 571  "use strict";
 572  
 573  // EXPORTS
 574  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
 575  
 576  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 577  function _setPrototypeOf(o, p) {
 578    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 579      o.__proto__ = p;
 580      return o;
 581    };
 582  
 583    return _setPrototypeOf(o, p);
 584  }
 585  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 586  
 587  function _inherits(subClass, superClass) {
 588    if (typeof superClass !== "function" && superClass !== null) {
 589      throw new TypeError("Super expression must either be null or a function");
 590    }
 591  
 592    subClass.prototype = Object.create(superClass && superClass.prototype, {
 593      constructor: {
 594        value: subClass,
 595        writable: true,
 596        configurable: true
 597      }
 598    });
 599    if (superClass) _setPrototypeOf(subClass, superClass);
 600  }
 601  
 602  /***/ }),
 603  /* 29 */
 604  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 605  
 606  "use strict";
 607  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 608  /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
 609  /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
 610  
 611  
 612  function _possibleConstructorReturn(self, call) {
 613    if (call && (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 614      return call;
 615    }
 616  
 617    return Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 618  }
 619  
 620  /***/ }),
 621  /* 30 */
 622  /***/ (function(module, exports, __webpack_require__) {
 623  
 624  /**
 625   * Copyright (c) 2013-present, Facebook, Inc.
 626   *
 627   * This source code is licensed under the MIT license found in the
 628   * LICENSE file in the root directory of this source tree.
 629   */
 630  
 631  if (false) { var throwOnDirectAccess, ReactIs; } else {
 632    // By explicitly using `prop-types` you are opting into new production behavior.
 633    // http://fb.me/prop-types-in-prod
 634    module.exports = __webpack_require__(133)();
 635  }
 636  
 637  
 638  /***/ }),
 639  /* 31 */,
 640  /* 32 */
 641  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 642  
 643  "use strict";
 644  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
 645  /* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
 646  
 647  function _unsupportedIterableToArray(o, minLen) {
 648    if (!o) return;
 649    if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 650    var n = Object.prototype.toString.call(o).slice(8, -1);
 651    if (n === "Object" && o.constructor) n = o.constructor.name;
 652    if (n === "Map" || n === "Set") return Array.from(o);
 653    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 654  }
 655  
 656  /***/ }),
 657  /* 33 */,
 658  /* 34 */
 659  /***/ (function(module, exports) {
 660  
 661  (function() { module.exports = window["wp"]["hooks"]; }());
 662  
 663  /***/ }),
 664  /* 35 */
 665  /***/ (function(module, exports) {
 666  
 667  (function() { module.exports = window["wp"]["deprecated"]; }());
 668  
 669  /***/ }),
 670  /* 36 */
 671  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 672  
 673  "use strict";
 674  /* unused harmony export Button */
 675  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
 676  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
 677  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
 678  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
 679  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
 680  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
 681  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
 682  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);
 683  /* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35);
 684  /* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__);
 685  /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(75);
 686  /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(72);
 687  
 688  
 689  
 690  
 691  function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
 692  
 693  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
 694  
 695  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
 696  
 697  /**
 698   * External dependencies
 699   */
 700  
 701  
 702  /**
 703   * WordPress dependencies
 704   */
 705  
 706  
 707  
 708  /**
 709   * Internal dependencies
 710   */
 711  
 712  
 713  
 714  var disabledEventsOnDisabledButton = ['onMouseDown', 'onClick'];
 715  function Button(props, ref) {
 716    var href = props.href,
 717        target = props.target,
 718        isPrimary = props.isPrimary,
 719        isSmall = props.isSmall,
 720        isTertiary = props.isTertiary,
 721        isPressed = props.isPressed,
 722        isBusy = props.isBusy,
 723        isDefault = props.isDefault,
 724        isSecondary = props.isSecondary,
 725        isLink = props.isLink,
 726        isDestructive = props.isDestructive,
 727        className = props.className,
 728        disabled = props.disabled,
 729        icon = props.icon,
 730        _props$iconPosition = props.iconPosition,
 731        iconPosition = _props$iconPosition === void 0 ? 'left' : _props$iconPosition,
 732        iconSize = props.iconSize,
 733        showTooltip = props.showTooltip,
 734        tooltipPosition = props.tooltipPosition,
 735        shortcut = props.shortcut,
 736        label = props.label,
 737        children = props.children,
 738        text = props.text,
 739        isFocusable = props.__experimentalIsFocusable,
 740        additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(props, ["href", "target", "isPrimary", "isSmall", "isTertiary", "isPressed", "isBusy", "isDefault", "isSecondary", "isLink", "isDestructive", "className", "disabled", "icon", "iconPosition", "iconSize", "showTooltip", "tooltipPosition", "shortcut", "label", "children", "text", "__experimentalIsFocusable"]);
 741  
 742    if (isDefault) {
 743      _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default()('Button isDefault prop', {
 744        alternative: 'isSecondary'
 745      });
 746    }
 747  
 748    var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('components-button', className, {
 749      'is-secondary': isDefault || isSecondary,
 750      'is-primary': isPrimary,
 751      'is-small': isSmall,
 752      'is-tertiary': isTertiary,
 753      'is-pressed': isPressed,
 754      'is-busy': isBusy,
 755      'is-link': isLink,
 756      'is-destructive': isDestructive,
 757      'has-text': !!icon && !!children,
 758      'has-icon': !!icon
 759    });
 760    var trulyDisabled = disabled && !isFocusable;
 761    var Tag = href !== undefined && !trulyDisabled ? 'a' : 'button';
 762    var tagProps = Tag === 'a' ? {
 763      href: href,
 764      target: target
 765    } : {
 766      type: 'button',
 767      disabled: trulyDisabled,
 768      'aria-pressed': isPressed
 769    };
 770  
 771    if (disabled && isFocusable) {
 772      // In this case, the button will be disabled, but still focusable and
 773      // perceivable by screen reader users.
 774      tagProps['aria-disabled'] = true;
 775  
 776      var _iterator = _createForOfIteratorHelper(disabledEventsOnDisabledButton),
 777          _step;
 778  
 779      try {
 780        for (_iterator.s(); !(_step = _iterator.n()).done;) {
 781          var disabledEvent = _step.value;
 782  
 783          additionalProps[disabledEvent] = function (event) {
 784            event.stopPropagation();
 785            event.preventDefault();
 786          };
 787        }
 788      } catch (err) {
 789        _iterator.e(err);
 790      } finally {
 791        _iterator.f();
 792      }
 793    } // Should show the tooltip if...
 794  
 795  
 796    var shouldShowTooltip = !trulyDisabled && ( // an explicit tooltip is passed or...
 797    showTooltip && label || // there's a shortcut or...
 798    shortcut || // there's a label and...
 799    !!label && ( // the children are empty and...
 800    !children || Object(lodash__WEBPACK_IMPORTED_MODULE_4__["isArray"])(children) && !children.length) && // the tooltip is not explicitly disabled.
 801    false !== showTooltip);
 802    var element = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(Tag, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, tagProps, additionalProps, {
 803      className: classes,
 804      "aria-label": additionalProps['aria-label'] || label,
 805      ref: ref
 806    }), icon && iconPosition === 'left' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_icon__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], {
 807      icon: icon,
 808      size: iconSize
 809    }), text && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, text), icon && iconPosition === 'right' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_icon__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], {
 810      icon: icon,
 811      size: iconSize
 812    }), children);
 813  
 814    if (!shouldShowTooltip) {
 815      return element;
 816    }
 817  
 818    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_tooltip__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
 819      text: label,
 820      shortcut: shortcut,
 821      position: tooltipPosition
 822    }, element);
 823  }
 824  /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["forwardRef"])(Button));
 825  
 826  
 827  /***/ }),
 828  /* 37 */
 829  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 830  
 831  "use strict";
 832  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
 833  function _iterableToArray(iter) {
 834    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
 835  }
 836  
 837  /***/ }),
 838  /* 38 */
 839  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 840  
 841  "use strict";
 842  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 843  function _arrayWithHoles(arr) {
 844    if (Array.isArray(arr)) return arr;
 845  }
 846  
 847  /***/ }),
 848  /* 39 */
 849  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 850  
 851  "use strict";
 852  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 853  function _nonIterableRest() {
 854    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 855  }
 856  
 857  /***/ }),
 858  /* 40 */,
 859  /* 41 */,
 860  /* 42 */
 861  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 862  
 863  "use strict";
 864  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 865  function _typeof(obj) {
 866    "@babel/helpers - typeof";
 867  
 868    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
 869      _typeof = function _typeof(obj) {
 870        return typeof obj;
 871      };
 872    } else {
 873      _typeof = function _typeof(obj) {
 874        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
 875      };
 876    }
 877  
 878    return _typeof(obj);
 879  }
 880  
 881  /***/ }),
 882  /* 43 */
 883  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 884  
 885  "use strict";
 886  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
 887  function _objectWithoutPropertiesLoose(source, excluded) {
 888    if (source == null) return {};
 889    var target = {};
 890    var sourceKeys = Object.keys(source);
 891    var key, i;
 892  
 893    for (i = 0; i < sourceKeys.length; i++) {
 894      key = sourceKeys[i];
 895      if (excluded.indexOf(key) >= 0) continue;
 896      target[key] = source[key];
 897    }
 898  
 899    return target;
 900  }
 901  
 902  /***/ }),
 903  /* 44 */
 904  /***/ (function(module, exports) {
 905  
 906  (function() { module.exports = window["moment"]; }());
 907  
 908  /***/ }),
 909  /* 45 */,
 910  /* 46 */
 911  /***/ (function(module, exports) {
 912  
 913  (function() { module.exports = window["wp"]["a11y"]; }());
 914  
 915  /***/ }),
 916  /* 47 */
 917  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 918  
 919  "use strict";
 920  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
 921  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
 922    try {
 923      var info = gen[key](arg);
 924      var value = info.value;
 925    } catch (error) {
 926      reject(error);
 927      return;
 928    }
 929  
 930    if (info.done) {
 931      resolve(value);
 932    } else {
 933      Promise.resolve(value).then(_next, _throw);
 934    }
 935  }
 936  
 937  function _asyncToGenerator(fn) {
 938    return function () {
 939      var self = this,
 940          args = arguments;
 941      return new Promise(function (resolve, reject) {
 942        var gen = fn.apply(self, args);
 943  
 944        function _next(value) {
 945          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
 946        }
 947  
 948        function _throw(err) {
 949          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
 950        }
 951  
 952        _next(undefined);
 953      });
 954    };
 955  }
 956  
 957  /***/ }),
 958  /* 48 */,
 959  /* 49 */,
 960  /* 50 */,
 961  /* 51 */
 962  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 963  
 964  "use strict";
 965  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useLiveRef; });
 966  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
 967  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
 968  /* harmony import */ var _useIsomorphicEffect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68);
 969  
 970  
 971  
 972  
 973  
 974  
 975  /**
 976   * A `React.Ref` that keeps track of the passed `value`.
 977   */
 978  
 979  function useLiveRef(value) {
 980    var ref = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(value);
 981    Object(_useIsomorphicEffect_js__WEBPACK_IMPORTED_MODULE_1__[/* useIsomorphicEffect */ "a"])(function () {
 982      ref.current = value;
 983    });
 984    return ref;
 985  }
 986  
 987  
 988  
 989  
 990  /***/ }),
 991  /* 52 */
 992  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 993  
 994  "use strict";
 995  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDocument; });
 996  /**
 997   * Returns `element.ownerDocument || document`.
 998   */
 999  function getDocument(element) {
1000    return element ? element.ownerDocument || element : document;
1001  }
1002  
1003  
1004  
1005  
1006  /***/ }),
1007  /* 53 */
1008  /***/ (function(module, exports, __webpack_require__) {
1009  
1010  "use strict";
1011  
1012  
1013  /* globals
1014      AggregateError,
1015      Atomics,
1016      FinalizationRegistry,
1017      SharedArrayBuffer,
1018      WeakRef,
1019  */
1020  
1021  var undefined;
1022  
1023  var $SyntaxError = SyntaxError;
1024  var $Function = Function;
1025  var $TypeError = TypeError;
1026  
1027  // eslint-disable-next-line consistent-return
1028  var getEvalledConstructor = function (expressionSyntax) {
1029      try {
1030          // eslint-disable-next-line no-new-func
1031          return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1032      } catch (e) {}
1033  };
1034  
1035  var $gOPD = Object.getOwnPropertyDescriptor;
1036  if ($gOPD) {
1037      try {
1038          $gOPD({}, '');
1039      } catch (e) {
1040          $gOPD = null; // this is IE 8, which has a broken gOPD
1041      }
1042  }
1043  
1044  var throwTypeError = function () {
1045      throw new $TypeError();
1046  };
1047  var ThrowTypeError = $gOPD
1048      ? (function () {
1049          try {
1050              // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
1051              arguments.callee; // IE 8 does not throw here
1052              return throwTypeError;
1053          } catch (calleeThrows) {
1054              try {
1055                  // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1056                  return $gOPD(arguments, 'callee').get;
1057              } catch (gOPDthrows) {
1058                  return throwTypeError;
1059              }
1060          }
1061      }())
1062      : throwTypeError;
1063  
1064  var hasSymbols = __webpack_require__(317)();
1065  
1066  var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
1067  
1068  var asyncGenFunction = getEvalledConstructor('async function* () {}');
1069  var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
1070  var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;
1071  
1072  var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
1073  
1074  var INTRINSICS = {
1075      '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
1076      '%Array%': Array,
1077      '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
1078      '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
1079      '%AsyncFromSyncIteratorPrototype%': undefined,
1080      '%AsyncFunction%': getEvalledConstructor('async function () {}'),
1081      '%AsyncGenerator%': asyncGenFunctionPrototype,
1082      '%AsyncGeneratorFunction%': asyncGenFunction,
1083      '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
1084      '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
1085      '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
1086      '%Boolean%': Boolean,
1087      '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
1088      '%Date%': Date,
1089      '%decodeURI%': decodeURI,
1090      '%decodeURIComponent%': decodeURIComponent,
1091      '%encodeURI%': encodeURI,
1092      '%encodeURIComponent%': encodeURIComponent,
1093      '%Error%': Error,
1094      '%eval%': eval, // eslint-disable-line no-eval
1095      '%EvalError%': EvalError,
1096      '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
1097      '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
1098      '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
1099      '%Function%': $Function,
1100      '%GeneratorFunction%': getEvalledConstructor('function* () {}'),
1101      '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
1102      '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
1103      '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
1104      '%isFinite%': isFinite,
1105      '%isNaN%': isNaN,
1106      '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
1107      '%JSON%': typeof JSON === 'object' ? JSON : undefined,
1108      '%Map%': typeof Map === 'undefined' ? undefined : Map,
1109      '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
1110      '%Math%': Math,
1111      '%Number%': Number,
1112      '%Object%': Object,
1113      '%parseFloat%': parseFloat,
1114      '%parseInt%': parseInt,
1115      '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
1116      '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
1117      '%RangeError%': RangeError,
1118      '%ReferenceError%': ReferenceError,
1119      '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
1120      '%RegExp%': RegExp,
1121      '%Set%': typeof Set === 'undefined' ? undefined : Set,
1122      '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
1123      '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
1124      '%String%': String,
1125      '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
1126      '%Symbol%': hasSymbols ? Symbol : undefined,
1127      '%SyntaxError%': $SyntaxError,
1128      '%ThrowTypeError%': ThrowTypeError,
1129      '%TypedArray%': TypedArray,
1130      '%TypeError%': $TypeError,
1131      '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
1132      '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
1133      '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
1134      '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
1135      '%URIError%': URIError,
1136      '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
1137      '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
1138      '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
1139  };
1140  
1141  var LEGACY_ALIASES = {
1142      '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1143      '%ArrayPrototype%': ['Array', 'prototype'],
1144      '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1145      '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1146      '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1147      '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1148      '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1149      '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1150      '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1151      '%BooleanPrototype%': ['Boolean', 'prototype'],
1152      '%DataViewPrototype%': ['DataView', 'prototype'],
1153      '%DatePrototype%': ['Date', 'prototype'],
1154      '%ErrorPrototype%': ['Error', 'prototype'],
1155      '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1156      '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1157      '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1158      '%FunctionPrototype%': ['Function', 'prototype'],
1159      '%Generator%': ['GeneratorFunction', 'prototype'],
1160      '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1161      '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1162      '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1163      '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1164      '%JSONParse%': ['JSON', 'parse'],
1165      '%JSONStringify%': ['JSON', 'stringify'],
1166      '%MapPrototype%': ['Map', 'prototype'],
1167      '%NumberPrototype%': ['Number', 'prototype'],
1168      '%ObjectPrototype%': ['Object', 'prototype'],
1169      '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1170      '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1171      '%PromisePrototype%': ['Promise', 'prototype'],
1172      '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1173      '%Promise_all%': ['Promise', 'all'],
1174      '%Promise_reject%': ['Promise', 'reject'],
1175      '%Promise_resolve%': ['Promise', 'resolve'],
1176      '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1177      '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1178      '%RegExpPrototype%': ['RegExp', 'prototype'],
1179      '%SetPrototype%': ['Set', 'prototype'],
1180      '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1181      '%StringPrototype%': ['String', 'prototype'],
1182      '%SymbolPrototype%': ['Symbol', 'prototype'],
1183      '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1184      '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1185      '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1186      '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1187      '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1188      '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1189      '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1190      '%URIErrorPrototype%': ['URIError', 'prototype'],
1191      '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1192      '%WeakSetPrototype%': ['WeakSet', 'prototype']
1193  };
1194  
1195  var bind = __webpack_require__(116);
1196  var hasOwn = __webpack_require__(77);
1197  var $concat = bind.call(Function.call, Array.prototype.concat);
1198  var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
1199  var $replace = bind.call(Function.call, String.prototype.replace);
1200  var $strSlice = bind.call(Function.call, String.prototype.slice);
1201  
1202  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1203  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1204  var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1205  var stringToPath = function stringToPath(string) {
1206      var first = $strSlice(string, 0, 1);
1207      var last = $strSlice(string, -1);
1208      if (first === '%' && last !== '%') {
1209          throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
1210      } else if (last === '%' && first !== '%') {
1211          throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
1212      }
1213      var result = [];
1214      $replace(string, rePropName, function (match, number, quote, subString) {
1215          result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
1216      });
1217      return result;
1218  };
1219  /* end adaptation */
1220  
1221  var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1222      var intrinsicName = name;
1223      var alias;
1224      if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
1225          alias = LEGACY_ALIASES[intrinsicName];
1226          intrinsicName = '%' + alias[0] + '%';
1227      }
1228  
1229      if (hasOwn(INTRINSICS, intrinsicName)) {
1230          var value = INTRINSICS[intrinsicName];
1231          if (typeof value === 'undefined' && !allowMissing) {
1232              throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1233          }
1234  
1235          return {
1236              alias: alias,
1237              name: intrinsicName,
1238              value: value
1239          };
1240      }
1241  
1242      throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
1243  };
1244  
1245  module.exports = function GetIntrinsic(name, allowMissing) {
1246      if (typeof name !== 'string' || name.length === 0) {
1247          throw new $TypeError('intrinsic name must be a non-empty string');
1248      }
1249      if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1250          throw new $TypeError('"allowMissing" argument must be a boolean');
1251      }
1252  
1253      var parts = stringToPath(name);
1254      var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1255  
1256      var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1257      var intrinsicRealName = intrinsic.name;
1258      var value = intrinsic.value;
1259      var skipFurtherCaching = false;
1260  
1261      var alias = intrinsic.alias;
1262      if (alias) {
1263          intrinsicBaseName = alias[0];
1264          $spliceApply(parts, $concat([0, 1], alias));
1265      }
1266  
1267      for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1268          var part = parts[i];
1269          var first = $strSlice(part, 0, 1);
1270          var last = $strSlice(part, -1);
1271          if (
1272              (
1273                  (first === '"' || first === "'" || first === '`')
1274                  || (last === '"' || last === "'" || last === '`')
1275              )
1276              && first !== last
1277          ) {
1278              throw new $SyntaxError('property names with quotes must have matching quotes');
1279          }
1280          if (part === 'constructor' || !isOwn) {
1281              skipFurtherCaching = true;
1282          }
1283  
1284          intrinsicBaseName += '.' + part;
1285          intrinsicRealName = '%' + intrinsicBaseName + '%';
1286  
1287          if (hasOwn(INTRINSICS, intrinsicRealName)) {
1288              value = INTRINSICS[intrinsicRealName];
1289          } else if (value != null) {
1290              if (!(part in value)) {
1291                  if (!allowMissing) {
1292                      throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
1293                  }
1294                  return void undefined;
1295              }
1296              if ($gOPD && (i + 1) >= parts.length) {
1297                  var desc = $gOPD(value, part);
1298                  isOwn = !!desc;
1299  
1300                  // By convention, when a data property is converted to an accessor
1301                  // property to emulate a data property that does not suffer from
1302                  // the override mistake, that accessor's getter is marked with
1303                  // an `originalValue` property. Here, when we detect this, we
1304                  // uphold the illusion by pretending to see that original data
1305                  // property, i.e., returning the value rather than the getter
1306                  // itself.
1307                  if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1308                      value = desc.get;
1309                  } else {
1310                      value = value[part];
1311                  }
1312              } else {
1313                  isOwn = hasOwn(value, part);
1314                  value = value[part];
1315              }
1316  
1317              if (isOwn && !skipFurtherCaching) {
1318                  INTRINSICS[intrinsicRealName] = value;
1319              }
1320          }
1321      }
1322      return value;
1323  };
1324  
1325  
1326  /***/ }),
1327  /* 54 */
1328  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1329  
1330  "use strict";
1331  
1332  // EXPORTS
1333  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createHook; });
1334  
1335  // EXTERNAL MODULE: external "React"
1336  var external_React_ = __webpack_require__(14);
1337  
1338  // EXTERNAL MODULE: ./node_modules/reakit-system/es/SystemContext.js
1339  var SystemContext = __webpack_require__(106);
1340  
1341  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useToken.js
1342  
1343  
1344  
1345  /**
1346   * React custom hook that returns the value of any token defined in the
1347   * SystemContext. It's mainly used internally in [`useOptions`](#useoptions)
1348   * and [`useProps`](#useprops).
1349   *
1350   * @example
1351   * import { SystemProvider, useToken } from "reakit-system";
1352   *
1353   * const system = {
1354   *   token: "value",
1355   * };
1356   *
1357   * function Component(props) {
1358   *   const token = useToken("token", "default value");
1359   *   return <div {...props}>{token}</div>;
1360   * }
1361   *
1362   * function App() {
1363   *   return (
1364   *     <SystemProvider unstable_system={system}>
1365   *       <Component />
1366   *     </SystemProvider>
1367   *   );
1368   * }
1369   */
1370  
1371  function useToken(token, defaultValue) {
1372    Object(external_React_["useDebugValue"])(token);
1373    var context = Object(external_React_["useContext"])(SystemContext["a" /* SystemContext */]);
1374    return context[token] != null ? context[token] : defaultValue;
1375  }
1376  
1377  
1378  
1379  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useProps.js
1380  
1381  
1382  
1383  
1384  /**
1385   * React custom hook that returns the props returned by a given
1386   * `use${name}Props` in the SystemContext.
1387   *
1388   * @example
1389   * import { SystemProvider, useProps } from "reakit-system";
1390   *
1391   * const system = {
1392   *   useAProps(options, htmlProps) {
1393   *     return {
1394   *       ...htmlProps,
1395   *       href: options.url,
1396   *     };
1397   *   },
1398   * };
1399   *
1400   * function A({ url, ...htmlProps }) {
1401   *   const props = useProps("A", { url }, htmlProps);
1402   *   return <a {...props} />;
1403   * }
1404   *
1405   * function App() {
1406   *   return (
1407   *     <SystemProvider unstable_system={system}>
1408   *       <A url="url">It will convert url into href in useAProps</A>
1409   *     </SystemProvider>
1410   *   );
1411   * }
1412   */
1413  
1414  function useProps(name, options, htmlProps) {
1415    if (options === void 0) {
1416      options = {};
1417    }
1418  
1419    if (htmlProps === void 0) {
1420      htmlProps = {};
1421    }
1422  
1423    var hookName = "use" + name + "Props";
1424    Object(external_React_["useDebugValue"])(hookName);
1425    var useHook = useToken(hookName);
1426  
1427    if (useHook) {
1428      return useHook(options, htmlProps);
1429    }
1430  
1431    return htmlProps;
1432  }
1433  
1434  
1435  
1436  // EXTERNAL MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js
1437  var _rollupPluginBabelHelpers_0c84a174 = __webpack_require__(73);
1438  
1439  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useOptions.js
1440  
1441  
1442  
1443  
1444  
1445  /**
1446   * React custom hook that returns the options returned by a given
1447   * `use${name}Options` in the SystemContext.
1448   *
1449   * @example
1450   * import React from "react";
1451   * import { SystemProvider, useOptions } from "reakit-system";
1452   *
1453   * const system = {
1454   *   useAOptions(options, htmlProps) {
1455   *     return {
1456   *       ...options,
1457   *       url: htmlProps.href,
1458   *     };
1459   *   },
1460   * };
1461   *
1462   * function A({ url, ...htmlProps }) {
1463   *   const options = useOptions("A", { url }, htmlProps);
1464   *   return <a href={options.url} {...htmlProps} />;
1465   * }
1466   *
1467   * function App() {
1468   *   return (
1469   *     <SystemProvider unstable_system={system}>
1470   *       <A href="url">
1471   *         It will convert href into url in useAOptions and then url into href in A
1472   *       </A>
1473   *     </SystemProvider>
1474   *   );
1475   * }
1476   */
1477  
1478  function useOptions(name, options, htmlProps) {
1479    if (options === void 0) {
1480      options = {};
1481    }
1482  
1483    if (htmlProps === void 0) {
1484      htmlProps = {};
1485    }
1486  
1487    var hookName = "use" + name + "Options";
1488    Object(external_React_["useDebugValue"])(hookName);
1489    var useHook = useToken(hookName);
1490  
1491    if (useHook) {
1492      return Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, options), useHook(options, htmlProps));
1493    }
1494  
1495    return options;
1496  }
1497  
1498  
1499  
1500  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/shallowEqual.js
1501  var shallowEqual = __webpack_require__(66);
1502  
1503  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/toArray.js
1504  /**
1505   * Transforms `arg` into an array if it's not already.
1506   *
1507   * @example
1508   * import { toArray } from "reakit-utils";
1509   *
1510   * toArray("a"); // ["a"]
1511   * toArray(["a"]); // ["a"]
1512   */
1513  function toArray(arg) {
1514    if (Array.isArray(arg)) {
1515      return arg;
1516    }
1517  
1518    return typeof arg !== "undefined" ? [arg] : [];
1519  }
1520  
1521  
1522  
1523  // CONCATENATED MODULE: ./node_modules/reakit-system/es/createHook.js
1524  
1525  
1526  
1527  
1528  
1529  
1530  
1531  
1532  
1533  /**
1534   * Creates a React custom hook that will return component props.
1535   *
1536   * @example
1537   * import { createHook } from "reakit-system";
1538   *
1539   * const useA = createHook({
1540   *   name: "A",
1541   *   keys: ["url"], // custom props/options keys
1542   *   useProps(options, htmlProps) {
1543   *     return {
1544   *       ...htmlProps,
1545   *       href: options.url,
1546   *     };
1547   *   },
1548   * });
1549   *
1550   * function A({ url, ...htmlProps }) {
1551   *   const props = useA({ url }, htmlProps);
1552   *   return <a {...props} />;
1553   * }
1554   *
1555   * @param options
1556   */
1557  function createHook(options) {
1558    var _options$useState, _composedHooks$;
1559  
1560    var composedHooks = toArray(options.compose);
1561  
1562    var __useOptions = function __useOptions(hookOptions, htmlProps) {
1563      // Call the current hook's useOptions first
1564      if (options.useOptions) {
1565        hookOptions = options.useOptions(hookOptions, htmlProps);
1566      } // If there's name, call useOptions from the system context
1567  
1568  
1569      if (options.name) {
1570        hookOptions = useOptions(options.name, hookOptions, htmlProps);
1571      } // Run composed hooks useOptions
1572  
1573  
1574      if (options.compose) {
1575        for (var _iterator = Object(_rollupPluginBabelHelpers_0c84a174["c" /* b */])(composedHooks), _step; !(_step = _iterator()).done;) {
1576          var hook = _step.value;
1577          hookOptions = hook.__useOptions(hookOptions, htmlProps);
1578        }
1579      }
1580  
1581      return hookOptions;
1582    };
1583  
1584    var useHook = function useHook(hookOptions, htmlProps, unstable_ignoreUseOptions) {
1585      if (hookOptions === void 0) {
1586        hookOptions = {};
1587      }
1588  
1589      if (htmlProps === void 0) {
1590        htmlProps = {};
1591      }
1592  
1593      if (unstable_ignoreUseOptions === void 0) {
1594        unstable_ignoreUseOptions = false;
1595      }
1596  
1597      // This won't execute when useHook was called from within another useHook
1598      if (!unstable_ignoreUseOptions) {
1599        hookOptions = __useOptions(hookOptions, htmlProps);
1600      } // Call the current hook's useProps
1601  
1602  
1603      if (options.useProps) {
1604        htmlProps = options.useProps(hookOptions, htmlProps);
1605      } // If there's name, call useProps from the system context
1606  
1607  
1608      if (options.name) {
1609        htmlProps = useProps(options.name, hookOptions, htmlProps);
1610      }
1611  
1612      if (options.compose) {
1613        if (options.useComposeOptions) {
1614          hookOptions = options.useComposeOptions(hookOptions, htmlProps);
1615        }
1616  
1617        if (options.useComposeProps) {
1618          htmlProps = options.useComposeProps(hookOptions, htmlProps);
1619        } else {
1620          for (var _iterator2 = Object(_rollupPluginBabelHelpers_0c84a174["c" /* b */])(composedHooks), _step2; !(_step2 = _iterator2()).done;) {
1621            var hook = _step2.value;
1622            htmlProps = hook(hookOptions, htmlProps, true);
1623          }
1624        }
1625      } // Remove undefined values from htmlProps
1626  
1627  
1628      var finalHTMLProps = {};
1629      var definedHTMLProps = htmlProps || {};
1630  
1631      for (var prop in definedHTMLProps) {
1632        if (definedHTMLProps[prop] !== undefined) {
1633          finalHTMLProps[prop] = definedHTMLProps[prop];
1634        }
1635      }
1636  
1637      return finalHTMLProps;
1638    };
1639  
1640    useHook.__useOptions = __useOptions;
1641    var composedKeys = composedHooks.reduce(function (keys, hook) {
1642      keys.push.apply(keys, hook.__keys || []);
1643      return keys;
1644    }, []); // It's used by createComponent to split option props (keys) and html props
1645  
1646    useHook.__keys = [].concat(composedKeys, ((_options$useState = options.useState) === null || _options$useState === void 0 ? void 0 : _options$useState.__keys) || [], options.keys || []);
1647    useHook.unstable_propsAreEqual = options.propsAreEqual || ((_composedHooks$ = composedHooks[0]) === null || _composedHooks$ === void 0 ? void 0 : _composedHooks$.unstable_propsAreEqual) || shallowEqual["a" /* shallowEqual */];
1648  
1649    if (false) {}
1650  
1651    return useHook;
1652  }
1653  
1654  
1655  
1656  
1657  /***/ }),
1658  /* 55 */
1659  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1660  
1661  "use strict";
1662  
1663  // EXPORTS
1664  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createComponent; });
1665  
1666  // EXTERNAL MODULE: external "React"
1667  var external_React_ = __webpack_require__(14);
1668  
1669  // EXTERNAL MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js
1670  var _rollupPluginBabelHelpers_0c84a174 = __webpack_require__(73);
1671  
1672  // EXTERNAL MODULE: ./node_modules/reakit-system/es/useCreateElement.js
1673  var useCreateElement = __webpack_require__(111);
1674  
1675  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/_rollupPluginBabelHelpers-1f0bf8c2.js
1676  var _rollupPluginBabelHelpers_1f0bf8c2 = __webpack_require__(83);
1677  
1678  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/isObject.js
1679  var isObject = __webpack_require__(118);
1680  
1681  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPlainObject.js
1682  
1683  
1684  /**
1685   * Checks whether `arg` is a plain object or not.
1686   *
1687   * @returns {boolean}
1688   */
1689  
1690  function isPlainObject(arg) {
1691    var _proto$constructor;
1692  
1693    if (!Object(isObject["a" /* isObject */])(arg)) return false;
1694    var proto = Object.getPrototypeOf(arg);
1695    if (proto == null) return true;
1696    return ((_proto$constructor = proto.constructor) === null || _proto$constructor === void 0 ? void 0 : _proto$constructor.toString()) === Object.toString();
1697  }
1698  
1699  
1700  
1701  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/splitProps.js
1702  
1703  
1704  
1705  
1706  /**
1707   * Splits an object (`props`) into a tuple where the first item is an object
1708   * with the passed `keys`, and the second item is an object with these keys
1709   * omitted.
1710   *
1711   * @deprecated will be removed in version 2
1712   *
1713   * @example
1714   * import { splitProps } from "reakit-utils";
1715   *
1716   * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }]
1717   */
1718  
1719  function __deprecatedSplitProps(props, keys) {
1720    var propsKeys = Object.keys(props);
1721    var picked = {};
1722    var omitted = {};
1723  
1724    for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) {
1725      var key = _propsKeys[_i];
1726  
1727      if (keys.indexOf(key) >= 0) {
1728        picked[key] = props[key];
1729      } else {
1730        omitted[key] = props[key];
1731      }
1732    }
1733  
1734    return [picked, omitted];
1735  }
1736  /**
1737   * Splits an object (`props`) into a tuple where the first item
1738   * is the `state` property, and the second item is the rest of the properties.
1739   *
1740   * It is also backward compatible with version 1. If `keys` are passed then
1741   * splits an object (`props`) into a tuple where the first item is an object
1742   * with the passed `keys`, and the second item is an object with these keys
1743   * omitted.
1744   *
1745   * @example
1746   * import { splitProps } from "reakit-utils";
1747   *
1748   * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }]
1749   *
1750   * @example
1751   * import { splitProps } from "reakit-utils";
1752   *
1753   * splitProps({ state: { a: "a" }, b: "b" }); // [{ a: "a" }, { b: "b" }]
1754   */
1755  
1756  
1757  function splitProps(props, keys) {
1758    if (keys === void 0) {
1759      keys = [];
1760    }
1761  
1762    if (!isPlainObject(props.state)) {
1763      return __deprecatedSplitProps(props, keys);
1764    }
1765  
1766    var _deprecatedSplitProp = __deprecatedSplitProps(props, [].concat(keys, ["state"])),
1767        picked = _deprecatedSplitProp[0],
1768        omitted = _deprecatedSplitProp[1];
1769  
1770    var state = picked.state,
1771        restPicked = Object(_rollupPluginBabelHelpers_1f0bf8c2["a" /* _ */])(picked, ["state"]);
1772  
1773    return [Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, state), restPicked), omitted];
1774  }
1775  
1776  
1777  
1778  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/shallowEqual.js
1779  var shallowEqual = __webpack_require__(66);
1780  
1781  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/normalizePropsAreEqual.js
1782  
1783  
1784  
1785  
1786  /**
1787   * This higher order functions take `propsAreEqual` function and
1788   * returns a new function which normalizes the props.
1789   *
1790   * Normalizing in our case is making sure the `propsAreEqual` works with
1791   * both version 1 (object spreading) and version 2 (state object) state passing.
1792   *
1793   * To achieve this, the returned function in case of a state object
1794   * will spread the state object in both `prev` and `next props.
1795   *
1796   * Other case it just returns the function as is which makes sure
1797   * that we are still backward compatible
1798   */
1799  function normalizePropsAreEqual(propsAreEqual) {
1800    if (propsAreEqual.name === "normalizePropsAreEqualInner") {
1801      return propsAreEqual;
1802    }
1803  
1804    return function normalizePropsAreEqualInner(prev, next) {
1805      if (!isPlainObject(prev.state) || !isPlainObject(next.state)) {
1806        return propsAreEqual(prev, next);
1807      }
1808  
1809      return propsAreEqual(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, prev.state), prev), Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, next.state), next));
1810    };
1811  }
1812  
1813  
1814  
1815  // CONCATENATED MODULE: ./node_modules/reakit-system/es/createComponent.js
1816  
1817  
1818  
1819  
1820  
1821  
1822  
1823  
1824  function forwardRef(component) {
1825    return /*#__PURE__*/Object(external_React_["forwardRef"])(component);
1826  }
1827  
1828  function memo(component, propsAreEqual) {
1829    return /*#__PURE__*/Object(external_React_["memo"])(component, propsAreEqual);
1830  }
1831  
1832  /**
1833   * Creates a React component.
1834   *
1835   * @example
1836   * import { createComponent } from "reakit-system";
1837   *
1838   * const A = createComponent({ as: "a" });
1839   *
1840   * @param options
1841   */
1842  function createComponent(_ref) {
1843    var type = _ref.as,
1844        useHook = _ref.useHook,
1845        shouldMemo = _ref.memo,
1846        _ref$propsAreEqual = _ref.propsAreEqual,
1847        propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual,
1848        _ref$keys = _ref.keys,
1849        keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys,
1850        _ref$useCreateElement = _ref.useCreateElement,
1851        useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement["a" /* useCreateElement */] : _ref$useCreateElement;
1852  
1853    var Comp = function Comp(_ref2, ref) {
1854      var _ref2$as = _ref2.as,
1855          as = _ref2$as === void 0 ? type : _ref2$as,
1856          props = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_ref2, ["as"]);
1857  
1858      if (useHook) {
1859        var _as$render;
1860  
1861        var _splitProps = splitProps(props, keys),
1862            _options = _splitProps[0],
1863            htmlProps = _splitProps[1];
1864  
1865        var _useHook = useHook(_options, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
1866          ref: ref
1867        }, htmlProps)),
1868            wrapElement = _useHook.wrapElement,
1869            elementProps = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_useHook, ["wrapElement"]); // @ts-ignore
1870  
1871  
1872        var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys;
1873        var asOptions = asKeys && splitProps(props, asKeys)[0];
1874        var allProps = asOptions ? Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, elementProps), asOptions) : elementProps;
1875  
1876        var _element = useCreateElement$1(as, allProps);
1877  
1878        if (wrapElement) {
1879          return wrapElement(_element);
1880        }
1881  
1882        return _element;
1883      }
1884  
1885      return useCreateElement$1(as, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
1886        ref: ref
1887      }, props));
1888    };
1889  
1890    if (false) {}
1891  
1892    Comp = forwardRef(Comp);
1893  
1894    if (shouldMemo) {
1895      Comp = memo(Comp, propsAreEqual && normalizePropsAreEqual(propsAreEqual));
1896    }
1897  
1898    Comp.__keys = keys;
1899    Comp.unstable_propsAreEqual = normalizePropsAreEqual(propsAreEqual || shallowEqual["a" /* shallowEqual */]);
1900    return Comp;
1901  }
1902  
1903  
1904  
1905  
1906  /***/ }),
1907  /* 56 */,
1908  /* 57 */,
1909  /* 58 */
1910  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1911  
1912  "use strict";
1913  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findFirstEnabledItem; });
1914  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCurrentId; });
1915  function findFirstEnabledItem(items, excludeId) {
1916    if (excludeId) {
1917      return items.find(function (item) {
1918        return !item.disabled && item.id !== excludeId;
1919      });
1920    }
1921  
1922    return items.find(function (item) {
1923      return !item.disabled;
1924    });
1925  }
1926  
1927  function getCurrentId(options, passedId) {
1928    var _findFirstEnabledItem;
1929  
1930    if (passedId || passedId === null) {
1931      return passedId;
1932    }
1933  
1934    if (options.currentId || options.currentId === null) {
1935      return options.currentId;
1936    }
1937  
1938    return (_findFirstEnabledItem = findFirstEnabledItem(options.items || [])) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id;
1939  }
1940  
1941  
1942  
1943  
1944  /***/ }),
1945  /* 59 */
1946  /***/ (function(module, exports) {
1947  
1948  (function() { module.exports = window["wp"]["isShallowEqual"]; }());
1949  
1950  /***/ }),
1951  /* 60 */,
1952  /* 61 */
1953  /***/ (function(module, exports, __webpack_require__) {
1954  
1955  var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.2
1956  // https://github.com/bgrins/TinyColor
1957  // Brian Grinstead, MIT License
1958  
1959  (function(Math) {
1960  
1961  var trimLeft = /^\s+/,
1962      trimRight = /\s+$/,
1963      tinyCounter = 0,
1964      mathRound = Math.round,
1965      mathMin = Math.min,
1966      mathMax = Math.max,
1967      mathRandom = Math.random;
1968  
1969  function tinycolor (color, opts) {
1970  
1971      color = (color) ? color : '';
1972      opts = opts || { };
1973  
1974      // If input is already a tinycolor, return itself
1975      if (color instanceof tinycolor) {
1976         return color;
1977      }
1978      // If we are called as a function, call using new instead
1979      if (!(this instanceof tinycolor)) {
1980          return new tinycolor(color, opts);
1981      }
1982  
1983      var rgb = inputToRGB(color);
1984      this._originalInput = color,
1985      this._r = rgb.r,
1986      this._g = rgb.g,
1987      this._b = rgb.b,
1988      this._a = rgb.a,
1989      this._roundA = mathRound(100*this._a) / 100,
1990      this._format = opts.format || rgb.format;
1991      this._gradientType = opts.gradientType;
1992  
1993      // Don't let the range of [0,255] come back in [0,1].
1994      // Potentially lose a little bit of precision here, but will fix issues where
1995      // .5 gets interpreted as half of the total, instead of half of 1
1996      // If it was supposed to be 128, this was already taken care of by `inputToRgb`
1997      if (this._r < 1) { this._r = mathRound(this._r); }
1998      if (this._g < 1) { this._g = mathRound(this._g); }
1999      if (this._b < 1) { this._b = mathRound(this._b); }
2000  
2001      this._ok = rgb.ok;
2002      this._tc_id = tinyCounter++;
2003  }
2004  
2005  tinycolor.prototype = {
2006      isDark: function() {
2007          return this.getBrightness() < 128;
2008      },
2009      isLight: function() {
2010          return !this.isDark();
2011      },
2012      isValid: function() {
2013          return this._ok;
2014      },
2015      getOriginalInput: function() {
2016        return this._originalInput;
2017      },
2018      getFormat: function() {
2019          return this._format;
2020      },
2021      getAlpha: function() {
2022          return this._a;
2023      },
2024      getBrightness: function() {
2025          //http://www.w3.org/TR/AERT#color-contrast
2026          var rgb = this.toRgb();
2027          return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
2028      },
2029      getLuminance: function() {
2030          //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
2031          var rgb = this.toRgb();
2032          var RsRGB, GsRGB, BsRGB, R, G, B;
2033          RsRGB = rgb.r/255;
2034          GsRGB = rgb.g/255;
2035          BsRGB = rgb.b/255;
2036  
2037          if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
2038          if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
2039          if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
2040          return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
2041      },
2042      setAlpha: function(value) {
2043          this._a = boundAlpha(value);
2044          this._roundA = mathRound(100*this._a) / 100;
2045          return this;
2046      },
2047      toHsv: function() {
2048          var hsv = rgbToHsv(this._r, this._g, this._b);
2049          return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
2050      },
2051      toHsvString: function() {
2052          var hsv = rgbToHsv(this._r, this._g, this._b);
2053          var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
2054          return (this._a == 1) ?
2055            "hsv("  + h + ", " + s + "%, " + v + "%)" :
2056            "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
2057      },
2058      toHsl: function() {
2059          var hsl = rgbToHsl(this._r, this._g, this._b);
2060          return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
2061      },
2062      toHslString: function() {
2063          var hsl = rgbToHsl(this._r, this._g, this._b);
2064          var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
2065          return (this._a == 1) ?
2066            "hsl("  + h + ", " + s + "%, " + l + "%)" :
2067            "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
2068      },
2069      toHex: function(allow3Char) {
2070          return rgbToHex(this._r, this._g, this._b, allow3Char);
2071      },
2072      toHexString: function(allow3Char) {
2073          return '#' + this.toHex(allow3Char);
2074      },
2075      toHex8: function(allow4Char) {
2076          return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
2077      },
2078      toHex8String: function(allow4Char) {
2079          return '#' + this.toHex8(allow4Char);
2080      },
2081      toRgb: function() {
2082          return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
2083      },
2084      toRgbString: function() {
2085          return (this._a == 1) ?
2086            "rgb("  + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
2087            "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
2088      },
2089      toPercentageRgb: function() {
2090          return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
2091      },
2092      toPercentageRgbString: function() {
2093          return (this._a == 1) ?
2094            "rgb("  + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
2095            "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
2096      },
2097      toName: function() {
2098          if (this._a === 0) {
2099              return "transparent";
2100          }
2101  
2102          if (this._a < 1) {
2103              return false;
2104          }
2105  
2106          return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
2107      },
2108      toFilter: function(secondColor) {
2109          var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
2110          var secondHex8String = hex8String;
2111          var gradientType = this._gradientType ? "GradientType = 1, " : "";
2112  
2113          if (secondColor) {
2114              var s = tinycolor(secondColor);
2115              secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
2116          }
2117  
2118          return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
2119      },
2120      toString: function(format) {
2121          var formatSet = !!format;
2122          format = format || this._format;
2123  
2124          var formattedString = false;
2125          var hasAlpha = this._a < 1 && this._a >= 0;
2126          var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
2127  
2128          if (needsAlphaFormat) {
2129              // Special case for "transparent", all other non-alpha formats
2130              // will return rgba when there is transparency.
2131              if (format === "name" && this._a === 0) {
2132                  return this.toName();
2133              }
2134              return this.toRgbString();
2135          }
2136          if (format === "rgb") {
2137              formattedString = this.toRgbString();
2138          }
2139          if (format === "prgb") {
2140              formattedString = this.toPercentageRgbString();
2141          }
2142          if (format === "hex" || format === "hex6") {
2143              formattedString = this.toHexString();
2144          }
2145          if (format === "hex3") {
2146              formattedString = this.toHexString(true);
2147          }
2148          if (format === "hex4") {
2149              formattedString = this.toHex8String(true);
2150          }
2151          if (format === "hex8") {
2152              formattedString = this.toHex8String();
2153          }
2154          if (format === "name") {
2155              formattedString = this.toName();
2156          }
2157          if (format === "hsl") {
2158              formattedString = this.toHslString();
2159          }
2160          if (format === "hsv") {
2161              formattedString = this.toHsvString();
2162          }
2163  
2164          return formattedString || this.toHexString();
2165      },
2166      clone: function() {
2167          return tinycolor(this.toString());
2168      },
2169  
2170      _applyModification: function(fn, args) {
2171          var color = fn.apply(null, [this].concat([].slice.call(args)));
2172          this._r = color._r;
2173          this._g = color._g;
2174          this._b = color._b;
2175          this.setAlpha(color._a);
2176          return this;
2177      },
2178      lighten: function() {
2179          return this._applyModification(lighten, arguments);
2180      },
2181      brighten: function() {
2182          return this._applyModification(brighten, arguments);
2183      },
2184      darken: function() {
2185          return this._applyModification(darken, arguments);
2186      },
2187      desaturate: function() {
2188          return this._applyModification(desaturate, arguments);
2189      },
2190      saturate: function() {
2191          return this._applyModification(saturate, arguments);
2192      },
2193      greyscale: function() {
2194          return this._applyModification(greyscale, arguments);
2195      },
2196      spin: function() {
2197          return this._applyModification(spin, arguments);
2198      },
2199  
2200      _applyCombination: function(fn, args) {
2201          return fn.apply(null, [this].concat([].slice.call(args)));
2202      },
2203      analogous: function() {
2204          return this._applyCombination(analogous, arguments);
2205      },
2206      complement: function() {
2207          return this._applyCombination(complement, arguments);
2208      },
2209      monochromatic: function() {
2210          return this._applyCombination(monochromatic, arguments);
2211      },
2212      splitcomplement: function() {
2213          return this._applyCombination(splitcomplement, arguments);
2214      },
2215      triad: function() {
2216          return this._applyCombination(triad, arguments);
2217      },
2218      tetrad: function() {
2219          return this._applyCombination(tetrad, arguments);
2220      }
2221  };
2222  
2223  // If input is an object, force 1 into "1.0" to handle ratios properly
2224  // String input requires "1.0" as input, so 1 will be treated as 1
2225  tinycolor.fromRatio = function(color, opts) {
2226      if (typeof color == "object") {
2227          var newColor = {};
2228          for (var i in color) {
2229              if (color.hasOwnProperty(i)) {
2230                  if (i === "a") {
2231                      newColor[i] = color[i];
2232                  }
2233                  else {
2234                      newColor[i] = convertToPercentage(color[i]);
2235                  }
2236              }
2237          }
2238          color = newColor;
2239      }
2240  
2241      return tinycolor(color, opts);
2242  };
2243  
2244  // Given a string or object, convert that input to RGB
2245  // Possible string inputs:
2246  //
2247  //     "red"
2248  //     "#f00" or "f00"
2249  //     "#ff0000" or "ff0000"
2250  //     "#ff000000" or "ff000000"
2251  //     "rgb 255 0 0" or "rgb (255, 0, 0)"
2252  //     "rgb 1.0 0 0" or "rgb (1, 0, 0)"
2253  //     "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
2254  //     "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
2255  //     "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
2256  //     "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
2257  //     "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
2258  //
2259  function inputToRGB(color) {
2260  
2261      var rgb = { r: 0, g: 0, b: 0 };
2262      var a = 1;
2263      var s = null;
2264      var v = null;
2265      var l = null;
2266      var ok = false;
2267      var format = false;
2268  
2269      if (typeof color == "string") {
2270          color = stringInputToObject(color);
2271      }
2272  
2273      if (typeof color == "object") {
2274          if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
2275              rgb = rgbToRgb(color.r, color.g, color.b);
2276              ok = true;
2277              format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
2278          }
2279          else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
2280              s = convertToPercentage(color.s);
2281              v = convertToPercentage(color.v);
2282              rgb = hsvToRgb(color.h, s, v);
2283              ok = true;
2284              format = "hsv";
2285          }
2286          else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
2287              s = convertToPercentage(color.s);
2288              l = convertToPercentage(color.l);
2289              rgb = hslToRgb(color.h, s, l);
2290              ok = true;
2291              format = "hsl";
2292          }
2293  
2294          if (color.hasOwnProperty("a")) {
2295              a = color.a;
2296          }
2297      }
2298  
2299      a = boundAlpha(a);
2300  
2301      return {
2302          ok: ok,
2303          format: color.format || format,
2304          r: mathMin(255, mathMax(rgb.r, 0)),
2305          g: mathMin(255, mathMax(rgb.g, 0)),
2306          b: mathMin(255, mathMax(rgb.b, 0)),
2307          a: a
2308      };
2309  }
2310  
2311  
2312  // Conversion Functions
2313  // --------------------
2314  
2315  // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
2316  // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
2317  
2318  // `rgbToRgb`
2319  // Handle bounds / percentage checking to conform to CSS color spec
2320  // <http://www.w3.org/TR/css3-color/>
2321  // *Assumes:* r, g, b in [0, 255] or [0, 1]
2322  // *Returns:* { r, g, b } in [0, 255]
2323  function rgbToRgb(r, g, b){
2324      return {
2325          r: bound01(r, 255) * 255,
2326          g: bound01(g, 255) * 255,
2327          b: bound01(b, 255) * 255
2328      };
2329  }
2330  
2331  // `rgbToHsl`
2332  // Converts an RGB color value to HSL.
2333  // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
2334  // *Returns:* { h, s, l } in [0,1]
2335  function rgbToHsl(r, g, b) {
2336  
2337      r = bound01(r, 255);
2338      g = bound01(g, 255);
2339      b = bound01(b, 255);
2340  
2341      var max = mathMax(r, g, b), min = mathMin(r, g, b);
2342      var h, s, l = (max + min) / 2;
2343  
2344      if(max == min) {
2345          h = s = 0; // achromatic
2346      }
2347      else {
2348          var d = max - min;
2349          s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
2350          switch(max) {
2351              case r: h = (g - b) / d + (g < b ? 6 : 0); break;
2352              case g: h = (b - r) / d + 2; break;
2353              case b: h = (r - g) / d + 4; break;
2354          }
2355  
2356          h /= 6;
2357      }
2358  
2359      return { h: h, s: s, l: l };
2360  }
2361  
2362  // `hslToRgb`
2363  // Converts an HSL color value to RGB.
2364  // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
2365  // *Returns:* { r, g, b } in the set [0, 255]
2366  function hslToRgb(h, s, l) {
2367      var r, g, b;
2368  
2369      h = bound01(h, 360);
2370      s = bound01(s, 100);
2371      l = bound01(l, 100);
2372  
2373      function hue2rgb(p, q, t) {
2374          if(t < 0) t += 1;
2375          if(t > 1) t -= 1;
2376          if(t < 1/6) return p + (q - p) * 6 * t;
2377          if(t < 1/2) return q;
2378          if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
2379          return p;
2380      }
2381  
2382      if(s === 0) {
2383          r = g = b = l; // achromatic
2384      }
2385      else {
2386          var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
2387          var p = 2 * l - q;
2388          r = hue2rgb(p, q, h + 1/3);
2389          g = hue2rgb(p, q, h);
2390          b = hue2rgb(p, q, h - 1/3);
2391      }
2392  
2393      return { r: r * 255, g: g * 255, b: b * 255 };
2394  }
2395  
2396  // `rgbToHsv`
2397  // Converts an RGB color value to HSV
2398  // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
2399  // *Returns:* { h, s, v } in [0,1]
2400  function rgbToHsv(r, g, b) {
2401  
2402      r = bound01(r, 255);
2403      g = bound01(g, 255);
2404      b = bound01(b, 255);
2405  
2406      var max = mathMax(r, g, b), min = mathMin(r, g, b);
2407      var h, s, v = max;
2408  
2409      var d = max - min;
2410      s = max === 0 ? 0 : d / max;
2411  
2412      if(max == min) {
2413          h = 0; // achromatic
2414      }
2415      else {
2416          switch(max) {
2417              case r: h = (g - b) / d + (g < b ? 6 : 0); break;
2418              case g: h = (b - r) / d + 2; break;
2419              case b: h = (r - g) / d + 4; break;
2420          }
2421          h /= 6;
2422      }
2423      return { h: h, s: s, v: v };
2424  }
2425  
2426  // `hsvToRgb`
2427  // Converts an HSV color value to RGB.
2428  // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
2429  // *Returns:* { r, g, b } in the set [0, 255]
2430   function hsvToRgb(h, s, v) {
2431  
2432      h = bound01(h, 360) * 6;
2433      s = bound01(s, 100);
2434      v = bound01(v, 100);
2435  
2436      var i = Math.floor(h),
2437          f = h - i,
2438          p = v * (1 - s),
2439          q = v * (1 - f * s),
2440          t = v * (1 - (1 - f) * s),
2441          mod = i % 6,
2442          r = [v, q, p, p, t, v][mod],
2443          g = [t, v, v, q, p, p][mod],
2444          b = [p, p, t, v, v, q][mod];
2445  
2446      return { r: r * 255, g: g * 255, b: b * 255 };
2447  }
2448  
2449  // `rgbToHex`
2450  // Converts an RGB color to hex
2451  // Assumes r, g, and b are contained in the set [0, 255]
2452  // Returns a 3 or 6 character hex
2453  function rgbToHex(r, g, b, allow3Char) {
2454  
2455      var hex = [
2456          pad2(mathRound(r).toString(16)),
2457          pad2(mathRound(g).toString(16)),
2458          pad2(mathRound(b).toString(16))
2459      ];
2460  
2461      // Return a 3 character hex if possible
2462      if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
2463          return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
2464      }
2465  
2466      return hex.join("");
2467  }
2468  
2469  // `rgbaToHex`
2470  // Converts an RGBA color plus alpha transparency to hex
2471  // Assumes r, g, b are contained in the set [0, 255] and
2472  // a in [0, 1]. Returns a 4 or 8 character rgba hex
2473  function rgbaToHex(r, g, b, a, allow4Char) {
2474  
2475      var hex = [
2476          pad2(mathRound(r).toString(16)),
2477          pad2(mathRound(g).toString(16)),
2478          pad2(mathRound(b).toString(16)),
2479          pad2(convertDecimalToHex(a))
2480      ];
2481  
2482      // Return a 4 character hex if possible
2483      if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
2484          return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
2485      }
2486  
2487      return hex.join("");
2488  }
2489  
2490  // `rgbaToArgbHex`
2491  // Converts an RGBA color to an ARGB Hex8 string
2492  // Rarely used, but required for "toFilter()"
2493  function rgbaToArgbHex(r, g, b, a) {
2494  
2495      var hex = [
2496          pad2(convertDecimalToHex(a)),
2497          pad2(mathRound(r).toString(16)),
2498          pad2(mathRound(g).toString(16)),
2499          pad2(mathRound(b).toString(16))
2500      ];
2501  
2502      return hex.join("");
2503  }
2504  
2505  // `equals`
2506  // Can be called with any tinycolor input
2507  tinycolor.equals = function (color1, color2) {
2508      if (!color1 || !color2) { return false; }
2509      return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
2510  };
2511  
2512  tinycolor.random = function() {
2513      return tinycolor.fromRatio({
2514          r: mathRandom(),
2515          g: mathRandom(),
2516          b: mathRandom()
2517      });
2518  };
2519  
2520  
2521  // Modification Functions
2522  // ----------------------
2523  // Thanks to less.js for some of the basics here
2524  // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
2525  
2526  function desaturate(color, amount) {
2527      amount = (amount === 0) ? 0 : (amount || 10);
2528      var hsl = tinycolor(color).toHsl();
2529      hsl.s -= amount / 100;
2530      hsl.s = clamp01(hsl.s);
2531      return tinycolor(hsl);
2532  }
2533  
2534  function saturate(color, amount) {
2535      amount = (amount === 0) ? 0 : (amount || 10);
2536      var hsl = tinycolor(color).toHsl();
2537      hsl.s += amount / 100;
2538      hsl.s = clamp01(hsl.s);
2539      return tinycolor(hsl);
2540  }
2541  
2542  function greyscale(color) {
2543      return tinycolor(color).desaturate(100);
2544  }
2545  
2546  function lighten (color, amount) {
2547      amount = (amount === 0) ? 0 : (amount || 10);
2548      var hsl = tinycolor(color).toHsl();
2549      hsl.l += amount / 100;
2550      hsl.l = clamp01(hsl.l);
2551      return tinycolor(hsl);
2552  }
2553  
2554  function brighten(color, amount) {
2555      amount = (amount === 0) ? 0 : (amount || 10);
2556      var rgb = tinycolor(color).toRgb();
2557      rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
2558      rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
2559      rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
2560      return tinycolor(rgb);
2561  }
2562  
2563  function darken (color, amount) {
2564      amount = (amount === 0) ? 0 : (amount || 10);
2565      var hsl = tinycolor(color).toHsl();
2566      hsl.l -= amount / 100;
2567      hsl.l = clamp01(hsl.l);
2568      return tinycolor(hsl);
2569  }
2570  
2571  // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
2572  // Values outside of this range will be wrapped into this range.
2573  function spin(color, amount) {
2574      var hsl = tinycolor(color).toHsl();
2575      var hue = (hsl.h + amount) % 360;
2576      hsl.h = hue < 0 ? 360 + hue : hue;
2577      return tinycolor(hsl);
2578  }
2579  
2580  // Combination Functions
2581  // ---------------------
2582  // Thanks to jQuery xColor for some of the ideas behind these
2583  // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
2584  
2585  function complement(color) {
2586      var hsl = tinycolor(color).toHsl();
2587      hsl.h = (hsl.h + 180) % 360;
2588      return tinycolor(hsl);
2589  }
2590  
2591  function triad(color) {
2592      var hsl = tinycolor(color).toHsl();
2593      var h = hsl.h;
2594      return [
2595          tinycolor(color),
2596          tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
2597          tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
2598      ];
2599  }
2600  
2601  function tetrad(color) {
2602      var hsl = tinycolor(color).toHsl();
2603      var h = hsl.h;
2604      return [
2605          tinycolor(color),
2606          tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
2607          tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
2608          tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
2609      ];
2610  }
2611  
2612  function splitcomplement(color) {
2613      var hsl = tinycolor(color).toHsl();
2614      var h = hsl.h;
2615      return [
2616          tinycolor(color),
2617          tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
2618          tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
2619      ];
2620  }
2621  
2622  function analogous(color, results, slices) {
2623      results = results || 6;
2624      slices = slices || 30;
2625  
2626      var hsl = tinycolor(color).toHsl();
2627      var part = 360 / slices;
2628      var ret = [tinycolor(color)];
2629  
2630      for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
2631          hsl.h = (hsl.h + part) % 360;
2632          ret.push(tinycolor(hsl));
2633      }
2634      return ret;
2635  }
2636  
2637  function monochromatic(color, results) {
2638      results = results || 6;
2639      var hsv = tinycolor(color).toHsv();
2640      var h = hsv.h, s = hsv.s, v = hsv.v;
2641      var ret = [];
2642      var modification = 1 / results;
2643  
2644      while (results--) {
2645          ret.push(tinycolor({ h: h, s: s, v: v}));
2646          v = (v + modification) % 1;
2647      }
2648  
2649      return ret;
2650  }
2651  
2652  // Utility Functions
2653  // ---------------------
2654  
2655  tinycolor.mix = function(color1, color2, amount) {
2656      amount = (amount === 0) ? 0 : (amount || 50);
2657  
2658      var rgb1 = tinycolor(color1).toRgb();
2659      var rgb2 = tinycolor(color2).toRgb();
2660  
2661      var p = amount / 100;
2662  
2663      var rgba = {
2664          r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
2665          g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
2666          b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
2667          a: ((rgb2.a - rgb1.a) * p) + rgb1.a
2668      };
2669  
2670      return tinycolor(rgba);
2671  };
2672  
2673  
2674  // Readability Functions
2675  // ---------------------
2676  // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
2677  
2678  // `contrast`
2679  // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
2680  tinycolor.readability = function(color1, color2) {
2681      var c1 = tinycolor(color1);
2682      var c2 = tinycolor(color2);
2683      return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
2684  };
2685  
2686  // `isReadable`
2687  // Ensure that foreground and background color combinations meet WCAG2 guidelines.
2688  // The third argument is an optional Object.
2689  //      the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
2690  //      the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
2691  // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
2692  
2693  // *Example*
2694  //    tinycolor.isReadable("#000", "#111") => false
2695  //    tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
2696  tinycolor.isReadable = function(color1, color2, wcag2) {
2697      var readability = tinycolor.readability(color1, color2);
2698      var wcag2Parms, out;
2699  
2700      out = false;
2701  
2702      wcag2Parms = validateWCAG2Parms(wcag2);
2703      switch (wcag2Parms.level + wcag2Parms.size) {
2704          case "AAsmall":
2705          case "AAAlarge":
2706              out = readability >= 4.5;
2707              break;
2708          case "AAlarge":
2709              out = readability >= 3;
2710              break;
2711          case "AAAsmall":
2712              out = readability >= 7;
2713              break;
2714      }
2715      return out;
2716  
2717  };
2718  
2719  // `mostReadable`
2720  // Given a base color and a list of possible foreground or background
2721  // colors for that base, returns the most readable color.
2722  // Optionally returns Black or White if the most readable color is unreadable.
2723  // *Example*
2724  //    tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
2725  //    tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString();  // "#ffffff"
2726  //    tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
2727  //    tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
2728  tinycolor.mostReadable = function(baseColor, colorList, args) {
2729      var bestColor = null;
2730      var bestScore = 0;
2731      var readability;
2732      var includeFallbackColors, level, size ;
2733      args = args || {};
2734      includeFallbackColors = args.includeFallbackColors ;
2735      level = args.level;
2736      size = args.size;
2737  
2738      for (var i= 0; i < colorList.length ; i++) {
2739          readability = tinycolor.readability(baseColor, colorList[i]);
2740          if (readability > bestScore) {
2741              bestScore = readability;
2742              bestColor = tinycolor(colorList[i]);
2743          }
2744      }
2745  
2746      if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
2747          return bestColor;
2748      }
2749      else {
2750          args.includeFallbackColors=false;
2751          return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
2752      }
2753  };
2754  
2755  
2756  // Big List of Colors
2757  // ------------------
2758  // <http://www.w3.org/TR/css3-color/#svg-color>
2759  var names = tinycolor.names = {
2760      aliceblue: "f0f8ff",
2761      antiquewhite: "faebd7",
2762      aqua: "0ff",
2763      aquamarine: "7fffd4",
2764      azure: "f0ffff",
2765      beige: "f5f5dc",
2766      bisque: "ffe4c4",
2767      black: "000",
2768      blanchedalmond: "ffebcd",
2769      blue: "00f",
2770      blueviolet: "8a2be2",
2771      brown: "a52a2a",
2772      burlywood: "deb887",
2773      burntsienna: "ea7e5d",
2774      cadetblue: "5f9ea0",
2775      chartreuse: "7fff00",
2776      chocolate: "d2691e",
2777      coral: "ff7f50",
2778      cornflowerblue: "6495ed",
2779      cornsilk: "fff8dc",
2780      crimson: "dc143c",
2781      cyan: "0ff",
2782      darkblue: "00008b",
2783      darkcyan: "008b8b",
2784      darkgoldenrod: "b8860b",
2785      darkgray: "a9a9a9",
2786      darkgreen: "006400",
2787      darkgrey: "a9a9a9",
2788      darkkhaki: "bdb76b",
2789      darkmagenta: "8b008b",
2790      darkolivegreen: "556b2f",
2791      darkorange: "ff8c00",
2792      darkorchid: "9932cc",
2793      darkred: "8b0000",
2794      darksalmon: "e9967a",
2795      darkseagreen: "8fbc8f",
2796      darkslateblue: "483d8b",
2797      darkslategray: "2f4f4f",
2798      darkslategrey: "2f4f4f",
2799      darkturquoise: "00ced1",
2800      darkviolet: "9400d3",
2801      deeppink: "ff1493",
2802      deepskyblue: "00bfff",
2803      dimgray: "696969",
2804      dimgrey: "696969",
2805      dodgerblue: "1e90ff",
2806      firebrick: "b22222",
2807      floralwhite: "fffaf0",
2808      forestgreen: "228b22",
2809      fuchsia: "f0f",
2810      gainsboro: "dcdcdc",
2811      ghostwhite: "f8f8ff",
2812      gold: "ffd700",
2813      goldenrod: "daa520",
2814      gray: "808080",
2815      green: "008000",
2816      greenyellow: "adff2f",
2817      grey: "808080",
2818      honeydew: "f0fff0",
2819      hotpink: "ff69b4",
2820      indianred: "cd5c5c",
2821      indigo: "4b0082",
2822      ivory: "fffff0",
2823      khaki: "f0e68c",
2824      lavender: "e6e6fa",
2825      lavenderblush: "fff0f5",
2826      lawngreen: "7cfc00",
2827      lemonchiffon: "fffacd",
2828      lightblue: "add8e6",
2829      lightcoral: "f08080",
2830      lightcyan: "e0ffff",
2831      lightgoldenrodyellow: "fafad2",
2832      lightgray: "d3d3d3",
2833      lightgreen: "90ee90",
2834      lightgrey: "d3d3d3",
2835      lightpink: "ffb6c1",
2836      lightsalmon: "ffa07a",
2837      lightseagreen: "20b2aa",
2838      lightskyblue: "87cefa",
2839      lightslategray: "789",
2840      lightslategrey: "789",
2841      lightsteelblue: "b0c4de",
2842      lightyellow: "ffffe0",
2843      lime: "0f0",
2844      limegreen: "32cd32",
2845      linen: "faf0e6",
2846      magenta: "f0f",
2847      maroon: "800000",
2848      mediumaquamarine: "66cdaa",
2849      mediumblue: "0000cd",
2850      mediumorchid: "ba55d3",
2851      mediumpurple: "9370db",
2852      mediumseagreen: "3cb371",
2853      mediumslateblue: "7b68ee",
2854      mediumspringgreen: "00fa9a",
2855      mediumturquoise: "48d1cc",
2856      mediumvioletred: "c71585",
2857      midnightblue: "191970",
2858      mintcream: "f5fffa",
2859      mistyrose: "ffe4e1",
2860      moccasin: "ffe4b5",
2861      navajowhite: "ffdead",
2862      navy: "000080",
2863      oldlace: "fdf5e6",
2864      olive: "808000",
2865      olivedrab: "6b8e23",
2866      orange: "ffa500",
2867      orangered: "ff4500",
2868      orchid: "da70d6",
2869      palegoldenrod: "eee8aa",
2870      palegreen: "98fb98",
2871      paleturquoise: "afeeee",
2872      palevioletred: "db7093",
2873      papayawhip: "ffefd5",
2874      peachpuff: "ffdab9",
2875      peru: "cd853f",
2876      pink: "ffc0cb",
2877      plum: "dda0dd",
2878      powderblue: "b0e0e6",
2879      purple: "800080",
2880      rebeccapurple: "663399",
2881      red: "f00",
2882      rosybrown: "bc8f8f",
2883      royalblue: "4169e1",
2884      saddlebrown: "8b4513",
2885      salmon: "fa8072",
2886      sandybrown: "f4a460",
2887      seagreen: "2e8b57",
2888      seashell: "fff5ee",
2889      sienna: "a0522d",
2890      silver: "c0c0c0",
2891      skyblue: "87ceeb",
2892      slateblue: "6a5acd",
2893      slategray: "708090",
2894      slategrey: "708090",
2895      snow: "fffafa",
2896      springgreen: "00ff7f",
2897      steelblue: "4682b4",
2898      tan: "d2b48c",
2899      teal: "008080",
2900      thistle: "d8bfd8",
2901      tomato: "ff6347",
2902      turquoise: "40e0d0",
2903      violet: "ee82ee",
2904      wheat: "f5deb3",
2905      white: "fff",
2906      whitesmoke: "f5f5f5",
2907      yellow: "ff0",
2908      yellowgreen: "9acd32"
2909  };
2910  
2911  // Make it easy to access colors via `hexNames[hex]`
2912  var hexNames = tinycolor.hexNames = flip(names);
2913  
2914  
2915  // Utilities
2916  // ---------
2917  
2918  // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
2919  function flip(o) {
2920      var flipped = { };
2921      for (var i in o) {
2922          if (o.hasOwnProperty(i)) {
2923              flipped[o[i]] = i;
2924          }
2925      }
2926      return flipped;
2927  }
2928  
2929  // Return a valid alpha value [0,1] with all invalid values being set to 1
2930  function boundAlpha(a) {
2931      a = parseFloat(a);
2932  
2933      if (isNaN(a) || a < 0 || a > 1) {
2934          a = 1;
2935      }
2936  
2937      return a;
2938  }
2939  
2940  // Take input from [0, n] and return it as [0, 1]
2941  function bound01(n, max) {
2942      if (isOnePointZero(n)) { n = "100%"; }
2943  
2944      var processPercent = isPercentage(n);
2945      n = mathMin(max, mathMax(0, parseFloat(n)));
2946  
2947      // Automatically convert percentage into number
2948      if (processPercent) {
2949          n = parseInt(n * max, 10) / 100;
2950      }
2951  
2952      // Handle floating point rounding errors
2953      if ((Math.abs(n - max) < 0.000001)) {
2954          return 1;
2955      }
2956  
2957      // Convert into [0, 1] range if it isn't already
2958      return (n % max) / parseFloat(max);
2959  }
2960  
2961  // Force a number between 0 and 1
2962  function clamp01(val) {
2963      return mathMin(1, mathMax(0, val));
2964  }
2965  
2966  // Parse a base-16 hex value into a base-10 integer
2967  function parseIntFromHex(val) {
2968      return parseInt(val, 16);
2969  }
2970  
2971  // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
2972  // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
2973  function isOnePointZero(n) {
2974      return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
2975  }
2976  
2977  // Check to see if string passed in is a percentage
2978  function isPercentage(n) {
2979      return typeof n === "string" && n.indexOf('%') != -1;
2980  }
2981  
2982  // Force a hex value to have 2 characters
2983  function pad2(c) {
2984      return c.length == 1 ? '0' + c : '' + c;
2985  }
2986  
2987  // Replace a decimal with it's percentage value
2988  function convertToPercentage(n) {
2989      if (n <= 1) {
2990          n = (n * 100) + "%";
2991      }
2992  
2993      return n;
2994  }
2995  
2996  // Converts a decimal to a hex value
2997  function convertDecimalToHex(d) {
2998      return Math.round(parseFloat(d) * 255).toString(16);
2999  }
3000  // Converts a hex value to a decimal
3001  function convertHexToDecimal(h) {
3002      return (parseIntFromHex(h) / 255);
3003  }
3004  
3005  var matchers = (function() {
3006  
3007      // <http://www.w3.org/TR/css3-values/#integers>
3008      var CSS_INTEGER = "[-\\+]?\\d+%?";
3009  
3010      // <http://www.w3.org/TR/css3-values/#number-value>
3011      var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
3012  
3013      // Allow positive/negative integer/number.  Don't capture the either/or, just the entire outcome.
3014      var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
3015  
3016      // Actual matching.
3017      // Parentheses and commas are optional, but not required.
3018      // Whitespace can take the place of commas or opening paren
3019      var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
3020      var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
3021  
3022      return {
3023          CSS_UNIT: new RegExp(CSS_UNIT),
3024          rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
3025          rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
3026          hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
3027          hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
3028          hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
3029          hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
3030          hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
3031          hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
3032          hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
3033          hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
3034      };
3035  })();
3036  
3037  // `isValidCSSUnit`
3038  // Take in a single string / number and check to see if it looks like a CSS unit
3039  // (see `matchers` above for definition).
3040  function isValidCSSUnit(color) {
3041      return !!matchers.CSS_UNIT.exec(color);
3042  }
3043  
3044  // `stringInputToObject`
3045  // Permissive string parsing.  Take in a number of formats, and output an object
3046  // based on detected format.  Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
3047  function stringInputToObject(color) {
3048  
3049      color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
3050      var named = false;
3051      if (names[color]) {
3052          color = names[color];
3053          named = true;
3054      }
3055      else if (color == 'transparent') {
3056          return { r: 0, g: 0, b: 0, a: 0, format: "name" };
3057      }
3058  
3059      // Try to match string input using regular expressions.
3060      // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
3061      // Just return an object and let the conversion functions handle that.
3062      // This way the result will be the same whether the tinycolor is initialized with string or object.
3063      var match;
3064      if ((match = matchers.rgb.exec(color))) {
3065          return { r: match[1], g: match[2], b: match[3] };
3066      }
3067      if ((match = matchers.rgba.exec(color))) {
3068          return { r: match[1], g: match[2], b: match[3], a: match[4] };
3069      }
3070      if ((match = matchers.hsl.exec(color))) {
3071          return { h: match[1], s: match[2], l: match[3] };
3072      }
3073      if ((match = matchers.hsla.exec(color))) {
3074          return { h: match[1], s: match[2], l: match[3], a: match[4] };
3075      }
3076      if ((match = matchers.hsv.exec(color))) {
3077          return { h: match[1], s: match[2], v: match[3] };
3078      }
3079      if ((match = matchers.hsva.exec(color))) {
3080          return { h: match[1], s: match[2], v: match[3], a: match[4] };
3081      }
3082      if ((match = matchers.hex8.exec(color))) {
3083          return {
3084              r: parseIntFromHex(match[1]),
3085              g: parseIntFromHex(match[2]),
3086              b: parseIntFromHex(match[3]),
3087              a: convertHexToDecimal(match[4]),
3088              format: named ? "name" : "hex8"
3089          };
3090      }
3091      if ((match = matchers.hex6.exec(color))) {
3092          return {
3093              r: parseIntFromHex(match[1]),
3094              g: parseIntFromHex(match[2]),
3095              b: parseIntFromHex(match[3]),
3096              format: named ? "name" : "hex"
3097          };
3098      }
3099      if ((match = matchers.hex4.exec(color))) {
3100          return {
3101              r: parseIntFromHex(match[1] + '' + match[1]),
3102              g: parseIntFromHex(match[2] + '' + match[2]),
3103              b: parseIntFromHex(match[3] + '' + match[3]),
3104              a: convertHexToDecimal(match[4] + '' + match[4]),
3105              format: named ? "name" : "hex8"
3106          };
3107      }
3108      if ((match = matchers.hex3.exec(color))) {
3109          return {
3110              r: parseIntFromHex(match[1] + '' + match[1]),
3111              g: parseIntFromHex(match[2] + '' + match[2]),
3112              b: parseIntFromHex(match[3] + '' + match[3]),
3113              format: named ? "name" : "hex"
3114          };
3115      }
3116  
3117      return false;
3118  }
3119  
3120  function validateWCAG2Parms(parms) {
3121      // return valid WCAG2 parms for isReadable.
3122      // If input parms are invalid, return {"level":"AA", "size":"small"}
3123      var level, size;
3124      parms = parms || {"level":"AA", "size":"small"};
3125      level = (parms.level || "AA").toUpperCase();
3126      size = (parms.size || "small").toLowerCase();
3127      if (level !== "AA" && level !== "AAA") {
3128          level = "AA";
3129      }
3130      if (size !== "small" && size !== "large") {
3131          size = "small";
3132      }
3133      return {"level":level, "size":size};
3134  }
3135  
3136  // Node: Export function
3137  if ( true && module.exports) {
3138      module.exports = tinycolor;
3139  }
3140  // AMD/requirejs: Define the module
3141  else if (true) {
3142      !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module),
3143                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
3144  }
3145  // Browser: Expose to window
3146  else {}
3147  
3148  })(Math);
3149  
3150  
3151  /***/ }),
3152  /* 62 */,
3153  /* 63 */,
3154  /* 64 */
3155  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3156  
3157  "use strict";
3158  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getActiveElement; });
3159  /* harmony import */ var _getDocument_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52);
3160  
3161  
3162  /**
3163   * Returns `element.ownerDocument.activeElement`.
3164   */
3165  
3166  function getActiveElement(element) {
3167    var _getDocument = Object(_getDocument_js__WEBPACK_IMPORTED_MODULE_0__[/* getDocument */ "a"])(element),
3168        activeElement = _getDocument.activeElement;
3169  
3170    if (!(activeElement !== null && activeElement !== void 0 && activeElement.nodeName)) {
3171      // In IE11, activeElement might be an empty object if we're interacting
3172      // with elements inside of an iframe.
3173      return null;
3174    }
3175  
3176    return activeElement;
3177  }
3178  
3179  
3180  
3181  
3182  /***/ }),
3183  /* 65 */
3184  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3185  
3186  "use strict";
3187  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isSelfTarget; });
3188  /**
3189   * Returns `true` if `event.target` and `event.currentTarget` are the same.
3190   */
3191  function isSelfTarget(event) {
3192    return event.target === event.currentTarget;
3193  }
3194  
3195  
3196  
3197  
3198  /***/ }),
3199  /* 66 */
3200  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3201  
3202  "use strict";
3203  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return shallowEqual; });
3204  /**
3205   * Compares two objects.
3206   *
3207   * @example
3208   * import { shallowEqual } from "reakit-utils";
3209   *
3210   * shallowEqual({ a: "a" }, {}); // false
3211   * shallowEqual({ a: "a" }, { b: "b" }); // false
3212   * shallowEqual({ a: "a" }, { a: "a" }); // true
3213   * shallowEqual({ a: "a" }, { a: "a", b: "b" }); // false
3214   */
3215  function shallowEqual(objA, objB) {
3216    if (objA === objB) return true;
3217    if (!objA) return false;
3218    if (!objB) return false;
3219    if (typeof objA !== "object") return false;
3220    if (typeof objB !== "object") return false;
3221    var aKeys = Object.keys(objA);
3222    var bKeys = Object.keys(objB);
3223    var length = aKeys.length;
3224    if (bKeys.length !== length) return false;
3225  
3226    for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) {
3227      var key = _aKeys[_i];
3228  
3229      if (objA[key] !== objB[key]) {
3230        return false;
3231      }
3232    }
3233  
3234    return true;
3235  }
3236  
3237  
3238  
3239  
3240  /***/ }),
3241  /* 67 */
3242  /***/ (function(module, exports) {
3243  
3244  (function() { module.exports = window["wp"]["date"]; }());
3245  
3246  /***/ }),
3247  /* 68 */
3248  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3249  
3250  "use strict";
3251  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useIsomorphicEffect; });
3252  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
3253  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3254  /* harmony import */ var _canUseDOM_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87);
3255  
3256  
3257  
3258  
3259  
3260  /**
3261   * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side
3262   * rendering.
3263   */
3264  
3265  var useIsomorphicEffect = !_canUseDOM_js__WEBPACK_IMPORTED_MODULE_1__[/* canUseDOM */ "a"] ? react__WEBPACK_IMPORTED_MODULE_0__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"];
3266  
3267  
3268  
3269  
3270  /***/ }),
3271  /* 69 */,
3272  /* 70 */
3273  /***/ (function(module, exports, __webpack_require__) {
3274  
3275  "use strict";
3276  
3277  
3278  Object.defineProperty(exports, "__esModule", {
3279    value: true
3280  });
3281  var DISPLAY_FORMAT = exports.DISPLAY_FORMAT = 'L';
3282  var ISO_FORMAT = exports.ISO_FORMAT = 'YYYY-MM-DD';
3283  var ISO_MONTH_FORMAT = exports.ISO_MONTH_FORMAT = 'YYYY-MM';
3284  
3285  var START_DATE = exports.START_DATE = 'startDate';
3286  var END_DATE = exports.END_DATE = 'endDate';
3287  
3288  var HORIZONTAL_ORIENTATION = exports.HORIZONTAL_ORIENTATION = 'horizontal';
3289  var VERTICAL_ORIENTATION = exports.VERTICAL_ORIENTATION = 'vertical';
3290  var VERTICAL_SCROLLABLE = exports.VERTICAL_SCROLLABLE = 'verticalScrollable';
3291  
3292  var ICON_BEFORE_POSITION = exports.ICON_BEFORE_POSITION = 'before';
3293  var ICON_AFTER_POSITION = exports.ICON_AFTER_POSITION = 'after';
3294  
3295  var INFO_POSITION_TOP = exports.INFO_POSITION_TOP = 'top';
3296  var INFO_POSITION_BOTTOM = exports.INFO_POSITION_BOTTOM = 'bottom';
3297  var INFO_POSITION_BEFORE = exports.INFO_POSITION_BEFORE = 'before';
3298  var INFO_POSITION_AFTER = exports.INFO_POSITION_AFTER = 'after';
3299  
3300  var ANCHOR_LEFT = exports.ANCHOR_LEFT = 'left';
3301  var ANCHOR_RIGHT = exports.ANCHOR_RIGHT = 'right';
3302  
3303  var OPEN_DOWN = exports.OPEN_DOWN = 'down';
3304  var OPEN_UP = exports.OPEN_UP = 'up';
3305  
3306  var DAY_SIZE = exports.DAY_SIZE = 39;
3307  var BLOCKED_MODIFIER = exports.BLOCKED_MODIFIER = 'blocked';
3308  var WEEKDAYS = exports.WEEKDAYS = [0, 1, 2, 3, 4, 5, 6];
3309  
3310  var FANG_WIDTH_PX = exports.FANG_WIDTH_PX = 20;
3311  var FANG_HEIGHT_PX = exports.FANG_HEIGHT_PX = 10;
3312  var DEFAULT_VERTICAL_SPACING = exports.DEFAULT_VERTICAL_SPACING = 22;
3313  
3314  var MODIFIER_KEY_NAMES = exports.MODIFIER_KEY_NAMES = new Set(['Shift', 'Control', 'Alt', 'Meta']);
3315  
3316  /***/ }),
3317  /* 71 */
3318  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3319  
3320  "use strict";
3321  /* unused harmony export Role */
3322  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useRole; });
3323  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
3324  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55);
3325  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54);
3326  /* harmony import */ var reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66);
3327  
3328  
3329  
3330  
3331  
3332  // Automatically generated
3333  var ROLE_KEYS = ["unstable_system"];
3334  
3335  var useRole = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
3336    name: "Role",
3337    keys: ROLE_KEYS,
3338    propsAreEqual: function propsAreEqual(prev, next) {
3339      var prevSystem = prev.unstable_system,
3340          prevProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(prev, ["unstable_system"]);
3341  
3342      var nextSystem = next.unstable_system,
3343          nextProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(next, ["unstable_system"]);
3344  
3345      if (prevSystem !== nextSystem && !Object(reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[/* shallowEqual */ "a"])(prevSystem, nextSystem)) {
3346        return false;
3347      }
3348  
3349      return Object(reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[/* shallowEqual */ "a"])(prevProps, nextProps);
3350    }
3351  });
3352  var Role = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
3353    as: "div",
3354    useHook: useRole
3355  });
3356  
3357  
3358  
3359  
3360  /***/ }),
3361  /* 72 */
3362  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3363  
3364  "use strict";
3365  /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
3366  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
3367  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
3368  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
3369  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
3370  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
3371  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__);
3372  /* harmony import */ var _dashicon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(142);
3373  
3374  
3375  
3376  
3377  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
3378  
3379  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
3380  
3381  /**
3382   * WordPress dependencies
3383   */
3384  
3385  
3386  /**
3387   * Internal dependencies
3388   */
3389  
3390  
3391  
3392  function Icon(_ref) {
3393    var _ref$icon = _ref.icon,
3394        icon = _ref$icon === void 0 ? null : _ref$icon,
3395        size = _ref.size,
3396        additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref, ["icon", "size"]);
3397  
3398    if ('string' === typeof icon) {
3399      return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_dashicon__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({
3400        icon: icon
3401      }, additionalProps));
3402    }
3403  
3404    if (icon && _dashicon__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"] === icon.type) {
3405      return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(icon, _objectSpread({}, additionalProps));
3406    } // Icons should be 24x24 by default.
3407  
3408  
3409    var iconSize = size || 24;
3410  
3411    if ('function' === typeof icon) {
3412      if (icon.prototype instanceof _wordpress_element__WEBPACK_IMPORTED_MODULE_3__["Component"]) {
3413        return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(icon, _objectSpread({
3414          size: iconSize
3415        }, additionalProps));
3416      }
3417  
3418      return icon(_objectSpread({
3419        size: iconSize
3420      }, additionalProps));
3421    }
3422  
3423    if (icon && (icon.type === 'svg' || icon.type === _wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__["SVG"])) {
3424      var appliedProps = _objectSpread(_objectSpread({
3425        width: iconSize,
3426        height: iconSize
3427      }, icon.props), additionalProps);
3428  
3429      return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__["SVG"], appliedProps);
3430    }
3431  
3432    if (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["isValidElement"])(icon)) {
3433      return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(icon, _objectSpread({
3434        size: iconSize
3435      }, additionalProps));
3436    }
3437  
3438    return icon;
3439  }
3440  
3441  /* harmony default export */ __webpack_exports__["a"] = (Icon);
3442  
3443  
3444  /***/ }),
3445  /* 73 */
3446  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3447  
3448  "use strict";
3449  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; });
3450  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectWithoutPropertiesLoose; });
3451  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _createForOfIteratorHelperLoose; });
3452  function _defineProperty(obj, key, value) {
3453    if (key in obj) {
3454      Object.defineProperty(obj, key, {
3455        value: value,
3456        enumerable: true,
3457        configurable: true,
3458        writable: true
3459      });
3460    } else {
3461      obj[key] = value;
3462    }
3463  
3464    return obj;
3465  }
3466  
3467  function ownKeys(object, enumerableOnly) {
3468    var keys = Object.keys(object);
3469  
3470    if (Object.getOwnPropertySymbols) {
3471      var symbols = Object.getOwnPropertySymbols(object);
3472      if (enumerableOnly) symbols = symbols.filter(function (sym) {
3473        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3474      });
3475      keys.push.apply(keys, symbols);
3476    }
3477  
3478    return keys;
3479  }
3480  
3481  function _objectSpread2(target) {
3482    for (var i = 1; i < arguments.length; i++) {
3483      var source = arguments[i] != null ? arguments[i] : {};
3484  
3485      if (i % 2) {
3486        ownKeys(Object(source), true).forEach(function (key) {
3487          _defineProperty(target, key, source[key]);
3488        });
3489      } else if (Object.getOwnPropertyDescriptors) {
3490        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3491      } else {
3492        ownKeys(Object(source)).forEach(function (key) {
3493          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3494        });
3495      }
3496    }
3497  
3498    return target;
3499  }
3500  
3501  function _objectWithoutPropertiesLoose(source, excluded) {
3502    if (source == null) return {};
3503    var target = {};
3504    var sourceKeys = Object.keys(source);
3505    var key, i;
3506  
3507    for (i = 0; i < sourceKeys.length; i++) {
3508      key = sourceKeys[i];
3509      if (excluded.indexOf(key) >= 0) continue;
3510      target[key] = source[key];
3511    }
3512  
3513    return target;
3514  }
3515  
3516  function _unsupportedIterableToArray(o, minLen) {
3517    if (!o) return;
3518    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
3519    var n = Object.prototype.toString.call(o).slice(8, -1);
3520    if (n === "Object" && o.constructor) n = o.constructor.name;
3521    if (n === "Map" || n === "Set") return Array.from(o);
3522    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
3523  }
3524  
3525  function _arrayLikeToArray(arr, len) {
3526    if (len == null || len > arr.length) len = arr.length;
3527  
3528    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
3529  
3530    return arr2;
3531  }
3532  
3533  function _createForOfIteratorHelperLoose(o, allowArrayLike) {
3534    var it;
3535  
3536    if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
3537      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
3538        if (it) o = it;
3539        var i = 0;
3540        return function () {
3541          if (i >= o.length) return {
3542            done: true
3543          };
3544          return {
3545            done: false,
3546            value: o[i++]
3547          };
3548        };
3549      }
3550  
3551      throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3552    }
3553  
3554    it = o[Symbol.iterator]();
3555    return it.next.bind(it);
3556  }
3557  
3558  
3559  
3560  
3561  /***/ }),
3562  /* 74 */
3563  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3564  
3565  "use strict";
3566  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useForkRef; });
3567  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
3568  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3569  
3570  
3571  // https://github.com/mui-org/material-ui/blob/2bcc874cf07b81202968f769cb9c2398c7c11311/packages/material-ui/src/utils/useForkRef.js
3572  
3573  function setRef(ref, value) {
3574    if (value === void 0) {
3575      value = null;
3576    }
3577  
3578    if (!ref) return;
3579  
3580    if (typeof ref === "function") {
3581      ref(value);
3582    } else {
3583      ref.current = value;
3584    }
3585  }
3586  /**
3587   * Merges up to two React Refs into a single memoized function React Ref so you
3588   * can pass it to an element.
3589   *
3590   * @example
3591   * import React from "react";
3592   * import { useForkRef } from "reakit-utils";
3593   *
3594   * const Component = React.forwardRef((props, ref) => {
3595   *   const internalRef = React.useRef();
3596   *   return <div {...props} ref={useForkRef(internalRef, ref)} />;
3597   * });
3598   */
3599  
3600  
3601  function useForkRef(refA, refB) {
3602    return Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () {
3603      if (refA == null && refB == null) {
3604        return null;
3605      }
3606  
3607      return function (value) {
3608        setRef(refA, value);
3609        setRef(refB, value);
3610      };
3611    }, [refA, refB]);
3612  }
3613  
3614  
3615  
3616  
3617  /***/ }),
3618  /* 75 */
3619  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3620  
3621  "use strict";
3622  /* unused harmony export TOOLTIP_DELAY */
3623  /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
3624  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
3625  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
3626  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
3627  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
3628  /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(107);
3629  /* harmony import */ var _shortcut__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(170);
3630  /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12);
3631  /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__);
3632  
3633  
3634  
3635  /**
3636   * External dependencies
3637   */
3638  
3639  /**
3640   * WordPress dependencies
3641   */
3642  
3643  
3644  /**
3645   * Internal dependencies
3646   */
3647  
3648  
3649  
3650  
3651  /**
3652   * Time over children to wait before showing tooltip
3653   *
3654   * @type {number}
3655   */
3656  
3657  var TOOLTIP_DELAY = 700;
3658  
3659  var emitToChild = function emitToChild(children, eventName, event) {
3660    if (_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Children"].count(children) !== 1) {
3661      return;
3662    }
3663  
3664    var child = _wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Children"].only(children);
3665  
3666    if (typeof child.props[eventName] === 'function') {
3667      child.props[eventName](event);
3668    }
3669  };
3670  
3671  function Tooltip(_ref) {
3672    var children = _ref.children,
3673        position = _ref.position,
3674        text = _ref.text,
3675        shortcut = _ref.shortcut;
3676  
3677    /**
3678     * Whether a mouse is currently pressed, used in determining whether
3679     * to handle a focus event as displaying the tooltip immediately.
3680     *
3681     * @type {boolean}
3682     */
3683    var _useState = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(false),
3684        _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState, 2),
3685        isMouseDown = _useState2[0],
3686        setIsMouseDown = _useState2[1];
3687  
3688    var _useState3 = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(false),
3689        _useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState3, 2),
3690        isOver = _useState4[0],
3691        setIsOver = _useState4[1];
3692  
3693    var delayedSetIsOver = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["useDebounce"])(setIsOver, TOOLTIP_DELAY);
3694  
3695    var createMouseDown = function createMouseDown(event) {
3696      // Preserve original child callback behavior
3697      emitToChild(children, 'onMouseDown', event); // On mouse down, the next `mouseup` should revert the value of the
3698      // instance property and remove its own event handler. The bind is
3699      // made on the document since the `mouseup` might not occur within
3700      // the bounds of the element.
3701  
3702      document.addEventListener('mouseup', cancelIsMouseDown);
3703      setIsMouseDown(true);
3704    };
3705  
3706    var createMouseUp = function createMouseUp(event) {
3707      emitToChild(children, 'onMouseUp', event);
3708      document.removeEventListener('mouseup', cancelIsMouseDown);
3709      setIsMouseDown(false);
3710    };
3711  
3712    var createMouseEvent = function createMouseEvent(type) {
3713      if (type === 'mouseUp') return createMouseUp;
3714      if (type === 'mouseDown') return createMouseDown;
3715    };
3716    /**
3717     * Prebound `isInMouseDown` handler, created as a constant reference to
3718     * assure ability to remove in component unmount.
3719     *
3720     * @type {Function}
3721     */
3722  
3723  
3724    var cancelIsMouseDown = createMouseEvent('mouseUp');
3725  
3726    var createToggleIsOver = function createToggleIsOver(eventName, isDelayed) {
3727      return function (event) {
3728        // Preserve original child callback behavior
3729        emitToChild(children, eventName, event); // Mouse events behave unreliably in React for disabled elements,
3730        // firing on mouseenter but not mouseleave.  Further, the default
3731        // behavior for disabled elements in some browsers is to ignore
3732        // mouse events. Don't bother trying to to handle them.
3733        //
3734        // See: https://github.com/facebook/react/issues/4251
3735  
3736        if (event.currentTarget.disabled) {
3737          return;
3738        } // A focus event will occur as a result of a mouse click, but it
3739        // should be disambiguated between interacting with the button and
3740        // using an explicit focus shift as a cue to display the tooltip.
3741  
3742  
3743        if ('focus' === event.type && isMouseDown) {
3744          return;
3745        } // Needed in case unsetting is over while delayed set pending, i.e.
3746        // quickly blur/mouseleave before delayedSetIsOver is called
3747  
3748  
3749        delayedSetIsOver.cancel();
3750  
3751        var _isOver = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["includes"])(['focus', 'mouseenter'], event.type);
3752  
3753        if (_isOver === isOver) {
3754          return;
3755        }
3756  
3757        if (isDelayed) {
3758          delayedSetIsOver(_isOver);
3759        } else {
3760          setIsOver(_isOver);
3761        }
3762      };
3763    };
3764  
3765    var clearOnUnmount = function clearOnUnmount() {
3766      delayedSetIsOver.cancel();
3767    };
3768  
3769    Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () {
3770      return clearOnUnmount;
3771    }, []);
3772  
3773    if (_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Children"].count(children) !== 1) {
3774      if (false) {}
3775  
3776      return children;
3777    }
3778  
3779    var child = _wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Children"].only(children);
3780    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["cloneElement"])(child, {
3781      onMouseEnter: createToggleIsOver('onMouseEnter', true),
3782      onMouseLeave: createToggleIsOver('onMouseLeave'),
3783      onClick: createToggleIsOver('onClick'),
3784      onFocus: createToggleIsOver('onFocus'),
3785      onBlur: createToggleIsOver('onBlur'),
3786      onMouseDown: createMouseEvent('mouseDown'),
3787      children: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["concatChildren"])(child.props.children, isOver && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_popover__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], {
3788        focusOnMount: false,
3789        position: position,
3790        className: "components-tooltip",
3791        "aria-hidden": "true",
3792        animate: false,
3793        noArrow: true
3794      }, text, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_shortcut__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], {
3795        className: "components-tooltip__shortcut",
3796        shortcut: shortcut
3797      })))
3798    });
3799  }
3800  
3801  /* harmony default export */ __webpack_exports__["a"] = (Tooltip);
3802  
3803  
3804  /***/ }),
3805  /* 76 */,
3806  /* 77 */
3807  /***/ (function(module, exports, __webpack_require__) {
3808  
3809  "use strict";
3810  
3811  
3812  var bind = __webpack_require__(116);
3813  
3814  module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
3815  
3816  
3817  /***/ }),
3818  /* 78 */
3819  /***/ (function(module, exports, __webpack_require__) {
3820  
3821  "use strict";
3822  
3823  
3824  var ES5Type = __webpack_require__(322);
3825  
3826  // https://ecma-international.org/ecma-262/11.0/#sec-ecmascript-data-types-and-values
3827  
3828  module.exports = function Type(x) {
3829      if (typeof x === 'symbol') {
3830          return 'Symbol';
3831      }
3832      if (typeof x === 'bigint') {
3833          return 'BigInt';
3834      }
3835      return ES5Type(x);
3836  };
3837  
3838  
3839  /***/ }),
3840  /* 79 */
3841  /***/ (function(module, exports, __webpack_require__) {
3842  
3843  module.exports =  true ? __webpack_require__(369) : undefined;
3844  
3845  
3846  
3847  /***/ }),
3848  /* 80 */
3849  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3850  
3851  "use strict";
3852  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isUA; });
3853  /* harmony import */ var _canUseDOM_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87);
3854  
3855  
3856  
3857  
3858  /**
3859   * Checks if a given string exists in the user agent string.
3860   */
3861  
3862  function isUA(string) {
3863    if (!_canUseDOM_js__WEBPACK_IMPORTED_MODULE_0__[/* canUseDOM */ "a"]) return false;
3864    return window.navigator.userAgent.indexOf(string) !== -1;
3865  }
3866  
3867  
3868  
3869  
3870  /***/ }),
3871  /* 81 */
3872  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3873  
3874  "use strict";
3875  function mergeRefs(refs) {
3876    return function (value) {
3877      refs.forEach(function (ref) {
3878        if (typeof ref === "function") {
3879          ref(value);
3880        } else if (ref != null) {
3881          ref.current = value;
3882        }
3883      });
3884    };
3885  }
3886  
3887  /* harmony default export */ __webpack_exports__["a"] = (mergeRefs);
3888  
3889  
3890  /***/ }),
3891  /* 82 */
3892  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3893  
3894  "use strict";
3895  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3896  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
3897  /**
3898   * WordPress dependencies
3899   */
3900  
3901  var ToolbarContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createContext"])();
3902  /* harmony default export */ __webpack_exports__["a"] = (ToolbarContext);
3903  
3904  
3905  /***/ }),
3906  /* 83 */
3907  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3908  
3909  "use strict";
3910  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
3911  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectSpread2; });
3912  /* unused harmony export b */
3913  function _defineProperty(obj, key, value) {
3914    if (key in obj) {
3915      Object.defineProperty(obj, key, {
3916        value: value,
3917        enumerable: true,
3918        configurable: true,
3919        writable: true
3920      });
3921    } else {
3922      obj[key] = value;
3923    }
3924  
3925    return obj;
3926  }
3927  
3928  function ownKeys(object, enumerableOnly) {
3929    var keys = Object.keys(object);
3930  
3931    if (Object.getOwnPropertySymbols) {
3932      var symbols = Object.getOwnPropertySymbols(object);
3933      if (enumerableOnly) symbols = symbols.filter(function (sym) {
3934        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3935      });
3936      keys.push.apply(keys, symbols);
3937    }
3938  
3939    return keys;
3940  }
3941  
3942  function _objectSpread2(target) {
3943    for (var i = 1; i < arguments.length; i++) {
3944      var source = arguments[i] != null ? arguments[i] : {};
3945  
3946      if (i % 2) {
3947        ownKeys(Object(source), true).forEach(function (key) {
3948          _defineProperty(target, key, source[key]);
3949        });
3950      } else if (Object.getOwnPropertyDescriptors) {
3951        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3952      } else {
3953        ownKeys(Object(source)).forEach(function (key) {
3954          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3955        });
3956      }
3957    }
3958  
3959    return target;
3960  }
3961  
3962  function _objectWithoutPropertiesLoose(source, excluded) {
3963    if (source == null) return {};
3964    var target = {};
3965    var sourceKeys = Object.keys(source);
3966    var key, i;
3967  
3968    for (i = 0; i < sourceKeys.length; i++) {
3969      key = sourceKeys[i];
3970      if (excluded.indexOf(key) >= 0) continue;
3971      target[key] = source[key];
3972    }
3973  
3974    return target;
3975  }
3976  
3977  function _unsupportedIterableToArray(o, minLen) {
3978    if (!o) return;
3979    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
3980    var n = Object.prototype.toString.call(o).slice(8, -1);
3981    if (n === "Object" && o.constructor) n = o.constructor.name;
3982    if (n === "Map" || n === "Set") return Array.from(o);
3983    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
3984  }
3985  
3986  function _arrayLikeToArray(arr, len) {
3987    if (len == null || len > arr.length) len = arr.length;
3988  
3989    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
3990  
3991    return arr2;
3992  }
3993  
3994  function _createForOfIteratorHelperLoose(o, allowArrayLike) {
3995    var it;
3996  
3997    if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
3998      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
3999        if (it) o = it;
4000        var i = 0;
4001        return function () {
4002          if (i >= o.length) return {
4003            done: true
4004          };
4005          return {
4006            done: false,
4007            value: o[i++]
4008          };
4009        };
4010      }
4011  
4012      throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4013    }
4014  
4015    it = o[Symbol.iterator]();
4016    return it.next.bind(it);
4017  }
4018  
4019  
4020  
4021  
4022  /***/ }),
4023  /* 84 */,
4024  /* 85 */
4025  /***/ (function(module, exports, __webpack_require__) {
4026  
4027  "use strict";
4028  
4029  
4030  var defineProperties = __webpack_require__(95);
4031  
4032  var implementation = __webpack_require__(232);
4033  var getPolyfill = __webpack_require__(233);
4034  var shim = __webpack_require__(366);
4035  
4036  var polyfill = getPolyfill();
4037  
4038  defineProperties(polyfill, {
4039      getPolyfill: getPolyfill,
4040      implementation: implementation,
4041      shim: shim
4042  });
4043  
4044  module.exports = polyfill;
4045  
4046  
4047  /***/ }),
4048  /* 86 */
4049  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4050  
4051  "use strict";
4052  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_IdContext; });
4053  /* unused harmony export unstable_IdProvider */
4054  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
4055  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4056  
4057  
4058  var defaultPrefix = "id";
4059  function generateRandomString(prefix) {
4060    if (prefix === void 0) {
4061      prefix = defaultPrefix;
4062    }
4063  
4064    return "" + (prefix ? prefix + "-" : "") + Math.random().toString(32).substr(2, 6);
4065  }
4066  
4067  var unstable_IdContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(generateRandomString);
4068  function unstable_IdProvider(_ref) {
4069    var children = _ref.children,
4070        _ref$prefix = _ref.prefix,
4071        prefix = _ref$prefix === void 0 ? defaultPrefix : _ref$prefix;
4072    var count = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(0);
4073    var generateId = Object(react__WEBPACK_IMPORTED_MODULE_0__["useCallback"])(function (localPrefix) {
4074      if (localPrefix === void 0) {
4075        localPrefix = prefix;
4076      }
4077  
4078      return "" + (localPrefix ? localPrefix + "-" : "") + ++count.current;
4079    }, [prefix]);
4080    return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(unstable_IdContext.Provider, {
4081      value: generateId
4082    }, children);
4083  }
4084  
4085  
4086  
4087  
4088  /***/ }),
4089  /* 87 */
4090  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4091  
4092  "use strict";
4093  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return canUseDOM; });
4094  /* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(105);
4095  
4096  
4097  
4098  function checkIsBrowser() {
4099    var _window = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[/* getWindow */ "a"])();
4100  
4101    return Boolean(typeof _window !== "undefined" && _window.document && _window.document.createElement);
4102  }
4103  /**
4104   * It's `true` if it is running in a browser environment or `false` if it is not (SSR).
4105   *
4106   * @example
4107   * import { canUseDOM } from "reakit-utils";
4108   *
4109   * const title = canUseDOM ? document.title : "";
4110   */
4111  
4112  
4113  var canUseDOM = checkIsBrowser();
4114  
4115  
4116  
4117  
4118  /***/ }),
4119  /* 88 */,
4120  /* 89 */
4121  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4122  
4123  "use strict";
4124  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasUserFocus; });
4125  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return setUserFocus; });
4126  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return userFocus; });
4127  function userFocus(element) {
4128    element.userFocus = true;
4129    element.focus();
4130    element.userFocus = false;
4131  }
4132  function hasUserFocus(element) {
4133    return !!element.userFocus;
4134  }
4135  function setUserFocus(element, value) {
4136    element.userFocus = value;
4137  }
4138  
4139  
4140  
4141  
4142  /***/ }),
4143  /* 90 */
4144  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4145  
4146  "use strict";
4147  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasFocusWithin; });
4148  /* harmony import */ var _getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64);
4149  /* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
4150  
4151  
4152  
4153  
4154  /**
4155   * Checks if `element` has focus within. Elements that are referenced by
4156   * `aria-activedescendant` are also considered.
4157   *
4158   * @example
4159   * import { hasFocusWithin } from "reakit-utils";
4160   *
4161   * hasFocusWithin(document.getElementById("id"));
4162   */
4163  
4164  function hasFocusWithin(element) {
4165    var activeElement = Object(_getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__[/* getActiveElement */ "a"])(element);
4166    if (!activeElement) return false;
4167    if (Object(_contains_js__WEBPACK_IMPORTED_MODULE_1__[/* contains */ "a"])(element, activeElement)) return true;
4168    var activeDescendant = activeElement.getAttribute("aria-activedescendant");
4169    if (!activeDescendant) return false;
4170    if (activeDescendant === element.id) return true;
4171    return !!element.querySelector("#" + activeDescendant);
4172  }
4173  
4174  
4175  
4176  
4177  /***/ }),
4178  /* 91 */
4179  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4180  
4181  "use strict";
4182  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isPortalEvent; });
4183  /* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
4184  
4185  
4186  /**
4187   * Returns `true` if `event` has been fired within a React Portal element.
4188   */
4189  
4190  function isPortalEvent(event) {
4191    return !Object(_contains_js__WEBPACK_IMPORTED_MODULE_0__[/* contains */ "a"])(event.currentTarget, event.target);
4192  }
4193  
4194  
4195  
4196  
4197  /***/ }),
4198  /* 92 */
4199  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4200  
4201  "use strict";
4202  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isButton; });
4203  var buttonInputTypes = ["button", "color", "file", "image", "reset", "submit"];
4204  /**
4205   * Checks whether `element` is a native HTML button element.
4206   *
4207   * @example
4208   * import { isButton } from "reakit-utils";
4209   *
4210   * isButton(document.querySelector("button")); // true
4211   * isButton(document.querySelector("input[type='button']")); // true
4212   * isButton(document.querySelector("div")); // false
4213   * isButton(document.querySelector("input[type='text']")); // false
4214   * isButton(document.querySelector("div[role='button']")); // false
4215   *
4216   * @returns {boolean}
4217   */
4218  
4219  function isButton(element) {
4220    if (element.tagName === "BUTTON") return true;
4221  
4222    if (element.tagName === "INPUT") {
4223      var input = element;
4224      return buttonInputTypes.indexOf(input.type) !== -1;
4225    }
4226  
4227    return false;
4228  }
4229  
4230  
4231  
4232  
4233  /***/ }),
4234  /* 93 */
4235  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4236  
4237  "use strict";
4238  /* unused harmony export Tabbable */
4239  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useTabbable; });
4240  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
4241  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55);
4242  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54);
4243  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
4244  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
4245  /* harmony import */ var reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74);
4246  /* harmony import */ var reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(92);
4247  /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(104);
4248  /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(51);
4249  /* harmony import */ var reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(68);
4250  /* harmony import */ var reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(90);
4251  /* harmony import */ var reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(91);
4252  /* harmony import */ var reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(64);
4253  /* harmony import */ var reakit_utils_dom__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(80);
4254  /* harmony import */ var reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(96);
4255  /* harmony import */ var _Role_Role_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(71);
4256  
4257  
4258  
4259  
4260  
4261  
4262  
4263  
4264  
4265  
4266  
4267  
4268  
4269  
4270  
4271  
4272  
4273  // Automatically generated
4274  var TABBABLE_KEYS = ["disabled", "focusable"];
4275  
4276  var isSafariOrFirefoxOnMac = Object(reakit_utils_dom__WEBPACK_IMPORTED_MODULE_12__[/* isUA */ "a"])("Mac") && !Object(reakit_utils_dom__WEBPACK_IMPORTED_MODULE_12__[/* isUA */ "a"])("Chrome") && (Object(reakit_utils_dom__WEBPACK_IMPORTED_MODULE_12__[/* isUA */ "a"])("Safari") || Object(reakit_utils_dom__WEBPACK_IMPORTED_MODULE_12__[/* isUA */ "a"])("Firefox"));
4277  
4278  function focusIfNeeded(element) {
4279    if (!Object(reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_9__[/* hasFocusWithin */ "a"])(element)) {
4280      element.focus();
4281    }
4282  } // Safari and Firefox on MacOS don't focus on buttons on mouse down like other
4283  // browsers/platforms. Instead, they focus on the closest focusable ancestor
4284  // element, which is ultimately the body element. So we make sure to give focus
4285  // to the tabbable element on mouse down so it works consistently across
4286  // browsers.
4287  // istanbul ignore next
4288  
4289  
4290  function useFocusOnMouseDown() {
4291    if (!isSafariOrFirefoxOnMac) return undefined;
4292  
4293    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(null),
4294        tabbable = _React$useState[0],
4295        scheduleFocus = _React$useState[1];
4296  
4297    Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(function () {
4298      if (!tabbable) return;
4299      focusIfNeeded(tabbable);
4300      scheduleFocus(null);
4301    }, [tabbable]);
4302    var onMouseDown = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
4303      var element = event.currentTarget;
4304      if (Object(reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_10__[/* isPortalEvent */ "a"])(event)) return;
4305      if (!Object(reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_5__[/* isButton */ "a"])(element)) return;
4306      var activeElement = Object(reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_11__[/* getActiveElement */ "a"])(element);
4307      if (!activeElement) return;
4308      var activeElementIsBody = activeElement.tagName === "BODY";
4309      var focusableAncestor = Object(reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_13__[/* getClosestFocusable */ "a"])(element.parentElement);
4310  
4311      if (activeElement === focusableAncestor || activeElementIsBody && !focusableAncestor) {
4312        // When the active element is the focusable ancestor, it'll not emit
4313        // focus/blur events. After all, it's already focused. So we can't
4314        // listen to those events to focus this tabbable element.
4315        // When the active element is body and there's no focusable ancestor,
4316        // we also don't have any other event to listen to since body never
4317        // emits focus/blur events on itself.
4318        // In both of these cases, we have to schedule focus on this tabbable
4319        // element.
4320        scheduleFocus(element);
4321      } else if (focusableAncestor) {
4322        // Clicking (mouse down) on the tabbable element on Safari and Firefox
4323        // on MacOS will fire focus on the focusable ancestor element if
4324        // there's any and if it's not the current active element. So we wait
4325        // for this event to happen before moving focus to this element.
4326        // Instead of moving focus right away, we have to schedule it,
4327        // otherwise it's gonna prevent drag events from happening.
4328        var onFocus = function onFocus() {
4329          return scheduleFocus(element);
4330        };
4331  
4332        focusableAncestor.addEventListener("focusin", onFocus, {
4333          once: true
4334        });
4335      } else {
4336        // Finally, if there's no focsuable ancestor and there's another
4337        // element with focus, we wait for that element to get blurred before
4338        // focusing this one.
4339        var onBlur = function onBlur() {
4340          return focusIfNeeded(element);
4341        };
4342  
4343        activeElement.addEventListener("blur", onBlur, {
4344          once: true
4345        });
4346      }
4347    }, []);
4348    return onMouseDown;
4349  }
4350  
4351  function isNativeTabbable(element) {
4352    return element.tagName === "BUTTON" || element.tagName === "INPUT" || element.tagName === "SELECT" || element.tagName === "TEXTAREA" || element.tagName === "A";
4353  }
4354  
4355  function supportsDisabledAttribute(element) {
4356    return element.tagName === "BUTTON" || element.tagName === "INPUT" || element.tagName === "SELECT" || element.tagName === "TEXTAREA";
4357  }
4358  
4359  function getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex) {
4360    if (trulyDisabled) {
4361      if (nativeTabbable && !supportsDisabled) {
4362        // Anchor, audio and video tags don't support the `disabled` attribute.
4363        // We must pass tabIndex={-1} so they don't receive focus on tab.
4364        return -1;
4365      } // Elements that support the `disabled` attribute don't need tabIndex.
4366  
4367  
4368      return undefined;
4369    }
4370  
4371    if (nativeTabbable) {
4372      // If the element is enabled and it's natively tabbable, we don't need to
4373      // specify a tabIndex attribute unless it's explicitly set by the user.
4374      return htmlTabIndex;
4375    } // If the element is enabled and is not natively tabbable, we have to
4376    // fallback tabIndex={0}.
4377  
4378  
4379    return htmlTabIndex || 0;
4380  }
4381  
4382  function useDisableEvent(htmlEventRef, disabled) {
4383    return Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
4384      var _htmlEventRef$current;
4385  
4386      (_htmlEventRef$current = htmlEventRef.current) === null || _htmlEventRef$current === void 0 ? void 0 : _htmlEventRef$current.call(htmlEventRef, event);
4387      if (event.defaultPrevented) return;
4388  
4389      if (disabled) {
4390        event.stopPropagation();
4391        event.preventDefault();
4392      }
4393    }, [htmlEventRef, disabled]);
4394  }
4395  
4396  var useTabbable = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
4397    name: "Tabbable",
4398    compose: _Role_Role_js__WEBPACK_IMPORTED_MODULE_14__[/* useRole */ "a"],
4399    keys: TABBABLE_KEYS,
4400    useOptions: function useOptions(options, _ref) {
4401      var disabled = _ref.disabled;
4402      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4403        disabled: disabled
4404      }, options);
4405    },
4406    useProps: function useProps(options, _ref2) {
4407      var htmlRef = _ref2.ref,
4408          htmlTabIndex = _ref2.tabIndex,
4409          htmlOnClickCapture = _ref2.onClickCapture,
4410          htmlOnMouseDownCapture = _ref2.onMouseDownCapture,
4411          htmlOnMouseDown = _ref2.onMouseDown,
4412          htmlOnKeyPressCapture = _ref2.onKeyPressCapture,
4413          htmlStyle = _ref2.style,
4414          htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref2, ["ref", "tabIndex", "onClickCapture", "onMouseDownCapture", "onMouseDown", "onKeyPressCapture", "style"]);
4415  
4416      var ref = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(null);
4417      var onClickCaptureRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlOnClickCapture);
4418      var onMouseDownCaptureRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlOnMouseDownCapture);
4419      var onMouseDownRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlOnMouseDown);
4420      var onKeyPressCaptureRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlOnKeyPressCapture);
4421      var trulyDisabled = !!options.disabled && !options.focusable;
4422  
4423      var _React$useState2 = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(true),
4424          nativeTabbable = _React$useState2[0],
4425          setNativeTabbable = _React$useState2[1];
4426  
4427      var _React$useState3 = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(true),
4428          supportsDisabled = _React$useState3[0],
4429          setSupportsDisabled = _React$useState3[1];
4430  
4431      var style = options.disabled ? Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4432        pointerEvents: "none"
4433      }, htmlStyle) : htmlStyle;
4434      var focusOnMouseDown = useFocusOnMouseDown();
4435      Object(reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_8__[/* useIsomorphicEffect */ "a"])(function () {
4436        var tabbable = ref.current;
4437  
4438        if (!tabbable) {
4439           false ? undefined : void 0;
4440          return;
4441        }
4442  
4443        if (!isNativeTabbable(tabbable)) {
4444          setNativeTabbable(false);
4445        }
4446  
4447        if (!supportsDisabledAttribute(tabbable)) {
4448          setSupportsDisabled(false);
4449        }
4450      }, []);
4451      var onClickCapture = useDisableEvent(onClickCaptureRef, options.disabled);
4452      var onMouseDownCapture = useDisableEvent(onMouseDownCaptureRef, options.disabled);
4453      var onKeyPressCapture = useDisableEvent(onKeyPressCaptureRef, options.disabled);
4454      var onMouseDown = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
4455        var _onMouseDownRef$curre;
4456  
4457        (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event);
4458        if (event.defaultPrevented) return;
4459        focusOnMouseDown === null || focusOnMouseDown === void 0 ? void 0 : focusOnMouseDown(event);
4460      }, [options.disabled, focusOnMouseDown]);
4461      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4462        ref: Object(reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[/* useForkRef */ "a"])(ref, htmlRef),
4463        style: style,
4464        tabIndex: getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex),
4465        disabled: trulyDisabled && supportsDisabled ? true : undefined,
4466        "aria-disabled": options.disabled ? true : undefined,
4467        onClickCapture: onClickCapture,
4468        onMouseDownCapture: onMouseDownCapture,
4469        onMouseDown: onMouseDown,
4470        onKeyPressCapture: onKeyPressCapture
4471      }, htmlProps);
4472    }
4473  });
4474  var Tabbable = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
4475    as: "div",
4476    useHook: useTabbable
4477  });
4478  
4479  
4480  
4481  
4482  /***/ }),
4483  /* 94 */
4484  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4485  
4486  "use strict";
4487  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return COMPOSITE_KEYS; });
4488  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return COMPOSITE_GROUP_KEYS; });
4489  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return COMPOSITE_ITEM_KEYS; });
4490  /* unused harmony export c */
4491  // Automatically generated
4492  var COMPOSITE_STATE_KEYS = ["baseId", "unstable_idCountRef", "setBaseId", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget"];
4493  var COMPOSITE_KEYS = COMPOSITE_STATE_KEYS;
4494  var COMPOSITE_GROUP_KEYS = COMPOSITE_KEYS;
4495  var COMPOSITE_ITEM_KEYS = COMPOSITE_GROUP_KEYS;
4496  var COMPOSITE_ITEM_WIDGET_KEYS = COMPOSITE_ITEM_KEYS;
4497  
4498  
4499  
4500  
4501  /***/ }),
4502  /* 95 */
4503  /***/ (function(module, exports, __webpack_require__) {
4504  
4505  "use strict";
4506  
4507  
4508  var keys = __webpack_require__(185);
4509  var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
4510  
4511  var toStr = Object.prototype.toString;
4512  var concat = Array.prototype.concat;
4513  var origDefineProperty = Object.defineProperty;
4514  
4515  var isFunction = function (fn) {
4516      return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
4517  };
4518  
4519  var arePropertyDescriptorsSupported = function () {
4520      var obj = {};
4521      try {
4522          origDefineProperty(obj, 'x', { enumerable: false, value: obj });
4523          // eslint-disable-next-line no-unused-vars, no-restricted-syntax
4524          for (var _ in obj) { // jscs:ignore disallowUnusedVariables
4525              return false;
4526          }
4527          return obj.x === obj;
4528      } catch (e) { /* this is IE 8. */
4529          return false;
4530      }
4531  };
4532  var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
4533  
4534  var defineProperty = function (object, name, value, predicate) {
4535      if (name in object && (!isFunction(predicate) || !predicate())) {
4536          return;
4537      }
4538      if (supportsDescriptors) {
4539          origDefineProperty(object, name, {
4540              configurable: true,
4541              enumerable: false,
4542              value: value,
4543              writable: true
4544          });
4545      } else {
4546          object[name] = value;
4547      }
4548  };
4549  
4550  var defineProperties = function (object, map) {
4551      var predicates = arguments.length > 2 ? arguments[2] : {};
4552      var props = keys(map);
4553      if (hasSymbols) {
4554          props = concat.call(props, Object.getOwnPropertySymbols(map));
4555      }
4556      for (var i = 0; i < props.length; i += 1) {
4557          defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
4558      }
4559  };
4560  
4561  defineProperties.supportsDescriptors = !!supportsDescriptors;
4562  
4563  module.exports = defineProperties;
4564  
4565  
4566  /***/ }),
4567  /* 96 */
4568  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4569  
4570  "use strict";
4571  
4572  // EXPORTS
4573  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ getClosestFocusable; });
4574  
4575  // UNUSED EXPORTS: getAllFocusableIn, getAllTabbableIn, getFirstFocusableIn, getFirstTabbableIn, getLastTabbableIn, getNextTabbableIn, getPreviousTabbableIn, isFocusable, isTabbable
4576  
4577  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/matches.js
4578  /**
4579   * Ponyfill for `Element.prototype.matches`
4580   *
4581   * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
4582   */
4583  function matches(element, selectors) {
4584    if ("matches" in element) {
4585      return element.matches(selectors);
4586    }
4587  
4588    if ("msMatchesSelector" in element) {
4589      return element.msMatchesSelector(selectors);
4590    }
4591  
4592    return element.webkitMatchesSelector(selectors);
4593  }
4594  
4595  
4596  
4597  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/closest.js
4598  
4599  
4600  /**
4601   * Ponyfill for `Element.prototype.closest`
4602   *
4603   * @example
4604   * import { closest } from "reakit-utils";
4605   *
4606   * closest(document.getElementById("id"), "div");
4607   * // same as
4608   * document.getElementById("id").closest("div");
4609   */
4610  function closest(element, selectors) {
4611    if ("closest" in element) return element.closest(selectors);
4612  
4613    do {
4614      if (matches(element, selectors)) return element;
4615      element = element.parentElement || element.parentNode;
4616    } while (element !== null && element.nodeType === 1);
4617  
4618    return null;
4619  }
4620  
4621  
4622  
4623  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/getActiveElement.js
4624  var getActiveElement = __webpack_require__(64);
4625  
4626  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/tabbable.js
4627  
4628  
4629  
4630  
4631  
4632  /** @module tabbable */
4633  var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), " + "textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], " + "iframe, object, embed, area[href], audio[controls], video[controls], " + "[contenteditable]:not([contenteditable='false'])";
4634  
4635  function isVisible(element) {
4636    var htmlElement = element;
4637    return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;
4638  }
4639  
4640  function hasNegativeTabIndex(element) {
4641    var tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10);
4642    return tabIndex < 0;
4643  }
4644  /**
4645   * Checks whether `element` is focusable or not.
4646   *
4647   * @memberof tabbable
4648   *
4649   * @example
4650   * import { isFocusable } from "reakit-utils";
4651   *
4652   * isFocusable(document.querySelector("input")); // true
4653   * isFocusable(document.querySelector("input[tabindex='-1']")); // true
4654   * isFocusable(document.querySelector("input[hidden]")); // false
4655   * isFocusable(document.querySelector("input:disabled")); // false
4656   */
4657  
4658  
4659  function isFocusable(element) {
4660    return matches(element, selector) && isVisible(element);
4661  }
4662  /**
4663   * Checks whether `element` is tabbable or not.
4664   *
4665   * @memberof tabbable
4666   *
4667   * @example
4668   * import { isTabbable } from "reakit-utils";
4669   *
4670   * isTabbable(document.querySelector("input")); // true
4671   * isTabbable(document.querySelector("input[tabindex='-1']")); // false
4672   * isTabbable(document.querySelector("input[hidden]")); // false
4673   * isTabbable(document.querySelector("input:disabled")); // false
4674   */
4675  
4676  function isTabbable(element) {
4677    return isFocusable(element) && !hasNegativeTabIndex(element);
4678  }
4679  /**
4680   * Returns all the focusable elements in `container`.
4681   *
4682   * @memberof tabbable
4683   *
4684   * @param {Element} container
4685   *
4686   * @returns {Element[]}
4687   */
4688  
4689  function getAllFocusableIn(container) {
4690    var allFocusable = Array.from(container.querySelectorAll(selector));
4691    allFocusable.unshift(container);
4692    return allFocusable.filter(isFocusable);
4693  }
4694  /**
4695   * Returns the first focusable element in `container`.
4696   *
4697   * @memberof tabbable
4698   *
4699   * @param {Element} container
4700   *
4701   * @returns {Element|null}
4702   */
4703  
4704  function getFirstFocusableIn(container) {
4705    var _getAllFocusableIn = getAllFocusableIn(container),
4706        first = _getAllFocusableIn[0];
4707  
4708    return first || null;
4709  }
4710  /**
4711   * Returns all the tabbable elements in `container`, including the container
4712   * itself.
4713   *
4714   * @memberof tabbable
4715   *
4716   * @param {Element} container
4717   * @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones.
4718   *
4719   * @returns {Element[]}
4720   */
4721  
4722  function getAllTabbableIn(container, fallbackToFocusable) {
4723    var allFocusable = Array.from(container.querySelectorAll(selector));
4724    var allTabbable = allFocusable.filter(isTabbable);
4725  
4726    if (isTabbable(container)) {
4727      allTabbable.unshift(container);
4728    }
4729  
4730    if (!allTabbable.length && fallbackToFocusable) {
4731      return allFocusable;
4732    }
4733  
4734    return allTabbable;
4735  }
4736  /**
4737   * Returns the first tabbable element in `container`, including the container
4738   * itself if it's tabbable.
4739   *
4740   * @memberof tabbable
4741   *
4742   * @param {Element} container
4743   * @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones.
4744   *
4745   * @returns {Element|null}
4746   */
4747  
4748  function getFirstTabbableIn(container, fallbackToFocusable) {
4749    var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable),
4750        first = _getAllTabbableIn[0];
4751  
4752    return first || null;
4753  }
4754  /**
4755   * Returns the last tabbable element in `container`, including the container
4756   * itself if it's tabbable.
4757   *
4758   * @memberof tabbable
4759   *
4760   * @param {Element} container
4761   * @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones.
4762   *
4763   * @returns {Element|null}
4764   */
4765  
4766  function getLastTabbableIn(container, fallbackToFocusable) {
4767    var allTabbable = getAllTabbableIn(container, fallbackToFocusable);
4768    return allTabbable[allTabbable.length - 1] || null;
4769  }
4770  /**
4771   * Returns the next tabbable element in `container`.
4772   *
4773   * @memberof tabbable
4774   *
4775   * @param {Element} container
4776   * @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones.
4777   *
4778   * @returns {Element|null}
4779   */
4780  
4781  function getNextTabbableIn(container, fallbackToFocusable) {
4782    var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
4783    var allFocusable = getAllFocusableIn(container);
4784    var index = allFocusable.indexOf(activeElement);
4785    var slice = allFocusable.slice(index + 1);
4786    return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
4787  }
4788  /**
4789   * Returns the previous tabbable element in `container`.
4790   *
4791   * @memberof tabbable
4792   *
4793   * @param {Element} container
4794   * @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones.
4795   *
4796   * @returns {Element|null}
4797   */
4798  
4799  function getPreviousTabbableIn(container, fallbackToFocusable) {
4800    var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
4801    var allFocusable = getAllFocusableIn(container).reverse();
4802    var index = allFocusable.indexOf(activeElement);
4803    var slice = allFocusable.slice(index + 1);
4804    return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
4805  }
4806  /**
4807   * Returns the closest focusable element.
4808   *
4809   * @memberof tabbable
4810   *
4811   * @param {Element} container
4812   *
4813   * @returns {Element|null}
4814   */
4815  
4816  function getClosestFocusable(element) {
4817    while (element && !isFocusable(element)) {
4818      element = closest(element, selector);
4819    }
4820  
4821    return element;
4822  }
4823  
4824  
4825  
4826  
4827  /***/ }),
4828  /* 97 */
4829  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4830  
4831  "use strict";
4832  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getAnimateClassName; });
4833  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Animate; });
4834  /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
4835  /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
4836  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
4837  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
4838  
4839  
4840  
4841  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
4842  
4843  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4844  
4845  /**
4846   * External dependencies
4847   */
4848  
4849  /**
4850   * @typedef {'top' | 'top left' | 'top right' | 'middle' | 'middle left' | 'middle right' | 'bottom' | 'bottom left' | 'bottom right'} AppearOrigin
4851   * @typedef {'left' | 'right'} SlideInOrigin
4852   * @typedef {{ type: 'appear'; origin?: AppearOrigin }} AppearOptions
4853   * @typedef {{ type: 'slide-in'; origin?: SlideInOrigin }} SlideInOptions
4854   * @typedef {{ type: 'loading'; }} LoadingOptions
4855   * @typedef {AppearOptions | SlideInOptions | LoadingOptions} GetAnimateOptions
4856   */
4857  
4858  /* eslint-disable jsdoc/valid-types */
4859  
4860  /**
4861   * @param {GetAnimateOptions['type']} type The animation type
4862   * @return {'top' | 'left'} Default origin
4863   */
4864  
4865  function getDefaultOrigin(type) {
4866    return type === 'appear' ? 'top' : 'left';
4867  }
4868  /* eslint-enable jsdoc/valid-types */
4869  
4870  /**
4871   * @param {GetAnimateOptions} options
4872   *
4873   * @return {string | void} ClassName that applies the animations
4874   */
4875  
4876  
4877  function getAnimateClassName(options) {
4878    if (options.type === 'loading') {
4879      return classnames__WEBPACK_IMPORTED_MODULE_2___default()('components-animate__loading');
4880    }
4881  
4882    var type = options.type,
4883        _options$origin = options.origin,
4884        origin = _options$origin === void 0 ? getDefaultOrigin(type) : _options$origin;
4885  
4886    if (type === 'appear') {
4887      var _classnames;
4888  
4889      var _origin$split = origin.split(' '),
4890          _origin$split2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_origin$split, 2),
4891          yAxis = _origin$split2[0],
4892          _origin$split2$ = _origin$split2[1],
4893          xAxis = _origin$split2$ === void 0 ? 'center' : _origin$split2$;
4894  
4895      return classnames__WEBPACK_IMPORTED_MODULE_2___default()('components-animate__appear', (_classnames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classnames, 'is-from-' + xAxis, xAxis !== 'center'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classnames, 'is-from-' + yAxis, yAxis !== 'middle'), _classnames));
4896    }
4897  
4898    if (type === 'slide-in') {
4899      return classnames__WEBPACK_IMPORTED_MODULE_2___default()('components-animate__slide-in', 'is-from-' + origin);
4900    }
4901  } // @ts-ignore Reason: Planned for deprecation
4902  
4903  function Animate(_ref) {
4904    var type = _ref.type,
4905        _ref$options = _ref.options,
4906        options = _ref$options === void 0 ? {} : _ref$options,
4907        children = _ref.children;
4908    return children({
4909      className: getAnimateClassName(_objectSpread({
4910        type: type
4911      }, options))
4912    });
4913  }
4914  
4915  
4916  /***/ }),
4917  /* 98 */
4918  /***/ (function(module, exports) {
4919  
4920  (function() { module.exports = window["wp"]["warning"]; }());
4921  
4922  /***/ }),
4923  /* 99 */,
4924  /* 100 */,
4925  /* 101 */
4926  /***/ (function(module, exports, __webpack_require__) {
4927  
4928  "use strict";
4929  
4930  
4931  Object.defineProperty(exports, "__esModule", {
4932    value: true
4933  });
4934  var calendarLabel = 'Calendar';
4935  var closeDatePicker = 'Close';
4936  var focusStartDate = 'Interact with the calendar and add the check-in date for your trip.';
4937  var clearDate = 'Clear Date';
4938  var clearDates = 'Clear Dates';
4939  var jumpToPrevMonth = 'Move backward to switch to the previous month.';
4940  var jumpToNextMonth = 'Move forward to switch to the next month.';
4941  var keyboardShortcuts = 'Keyboard Shortcuts';
4942  var showKeyboardShortcutsPanel = 'Open the keyboard shortcuts panel.';
4943  var hideKeyboardShortcutsPanel = 'Close the shortcuts panel.';
4944  var openThisPanel = 'Open this panel.';
4945  var enterKey = 'Enter key';
4946  var leftArrowRightArrow = 'Right and left arrow keys';
4947  var upArrowDownArrow = 'up and down arrow keys';
4948  var pageUpPageDown = 'page up and page down keys';
4949  var homeEnd = 'Home and end keys';
4950  var escape = 'Escape key';
4951  var questionMark = 'Question mark';
4952  var selectFocusedDate = 'Select the date in focus.';
4953  var moveFocusByOneDay = 'Move backward (left) and forward (right) by one day.';
4954  var moveFocusByOneWeek = 'Move backward (up) and forward (down) by one week.';
4955  var moveFocusByOneMonth = 'Switch months.';
4956  var moveFocustoStartAndEndOfWeek = 'Go to the first or last day of a week.';
4957  var returnFocusToInput = 'Return to the date input field.';
4958  var keyboardNavigationInstructions = 'Press the down arrow key to interact with the calendar and\n  select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';
4959  
4960  var chooseAvailableStartDate = function chooseAvailableStartDate(_ref) {
4961    var date = _ref.date;
4962    return 'Choose ' + String(date) + ' as your check-in date. It\u2019s available.';
4963  };
4964  var chooseAvailableEndDate = function chooseAvailableEndDate(_ref2) {
4965    var date = _ref2.date;
4966    return 'Choose ' + String(date) + ' as your check-out date. It\u2019s available.';
4967  };
4968  var chooseAvailableDate = function chooseAvailableDate(_ref3) {
4969    var date = _ref3.date;
4970    return date;
4971  };
4972  var dateIsUnavailable = function dateIsUnavailable(_ref4) {
4973    var date = _ref4.date;
4974    return 'Not available. ' + String(date);
4975  };
4976  var dateIsSelected = function dateIsSelected(_ref5) {
4977    var date = _ref5.date;
4978    return 'Selected. ' + String(date);
4979  };
4980  
4981  exports['default'] = {
4982    calendarLabel: calendarLabel,
4983    closeDatePicker: closeDatePicker,
4984    focusStartDate: focusStartDate,
4985    clearDate: clearDate,
4986    clearDates: clearDates,
4987    jumpToPrevMonth: jumpToPrevMonth,
4988    jumpToNextMonth: jumpToNextMonth,
4989    keyboardShortcuts: keyboardShortcuts,
4990    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
4991    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
4992    openThisPanel: openThisPanel,
4993    enterKey: enterKey,
4994    leftArrowRightArrow: leftArrowRightArrow,
4995    upArrowDownArrow: upArrowDownArrow,
4996    pageUpPageDown: pageUpPageDown,
4997    homeEnd: homeEnd,
4998    escape: escape,
4999    questionMark: questionMark,
5000    selectFocusedDate: selectFocusedDate,
5001    moveFocusByOneDay: moveFocusByOneDay,
5002    moveFocusByOneWeek: moveFocusByOneWeek,
5003    moveFocusByOneMonth: moveFocusByOneMonth,
5004    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
5005    returnFocusToInput: returnFocusToInput,
5006    keyboardNavigationInstructions: keyboardNavigationInstructions,
5007  
5008    chooseAvailableStartDate: chooseAvailableStartDate,
5009    chooseAvailableEndDate: chooseAvailableEndDate,
5010    dateIsUnavailable: dateIsUnavailable,
5011    dateIsSelected: dateIsSelected
5012  };
5013  var DateRangePickerPhrases = exports.DateRangePickerPhrases = {
5014    calendarLabel: calendarLabel,
5015    closeDatePicker: closeDatePicker,
5016    clearDates: clearDates,
5017    focusStartDate: focusStartDate,
5018    jumpToPrevMonth: jumpToPrevMonth,
5019    jumpToNextMonth: jumpToNextMonth,
5020    keyboardShortcuts: keyboardShortcuts,
5021    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
5022    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
5023    openThisPanel: openThisPanel,
5024    enterKey: enterKey,
5025    leftArrowRightArrow: leftArrowRightArrow,
5026    upArrowDownArrow: upArrowDownArrow,
5027    pageUpPageDown: pageUpPageDown,
5028    homeEnd: homeEnd,
5029    escape: escape,
5030    questionMark: questionMark,
5031    selectFocusedDate: selectFocusedDate,
5032    moveFocusByOneDay: moveFocusByOneDay,
5033    moveFocusByOneWeek: moveFocusByOneWeek,
5034    moveFocusByOneMonth: moveFocusByOneMonth,
5035    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
5036    returnFocusToInput: returnFocusToInput,
5037    keyboardNavigationInstructions: keyboardNavigationInstructions,
5038    chooseAvailableStartDate: chooseAvailableStartDate,
5039    chooseAvailableEndDate: chooseAvailableEndDate,
5040    dateIsUnavailable: dateIsUnavailable,
5041    dateIsSelected: dateIsSelected
5042  };
5043  
5044  var DateRangePickerInputPhrases = exports.DateRangePickerInputPhrases = {
5045    focusStartDate: focusStartDate,
5046    clearDates: clearDates,
5047    keyboardNavigationInstructions: keyboardNavigationInstructions
5048  };
5049  
5050  var SingleDatePickerPhrases = exports.SingleDatePickerPhrases = {
5051    calendarLabel: calendarLabel,
5052    closeDatePicker: closeDatePicker,
5053    clearDate: clearDate,
5054    jumpToPrevMonth: jumpToPrevMonth,
5055    jumpToNextMonth: jumpToNextMonth,
5056    keyboardShortcuts: keyboardShortcuts,
5057    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
5058    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
5059    openThisPanel: openThisPanel,
5060    enterKey: enterKey,
5061    leftArrowRightArrow: leftArrowRightArrow,
5062    upArrowDownArrow: upArrowDownArrow,
5063    pageUpPageDown: pageUpPageDown,
5064    homeEnd: homeEnd,
5065    escape: escape,
5066    questionMark: questionMark,
5067    selectFocusedDate: selectFocusedDate,
5068    moveFocusByOneDay: moveFocusByOneDay,
5069    moveFocusByOneWeek: moveFocusByOneWeek,
5070    moveFocusByOneMonth: moveFocusByOneMonth,
5071    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
5072    returnFocusToInput: returnFocusToInput,
5073    keyboardNavigationInstructions: keyboardNavigationInstructions,
5074    chooseAvailableDate: chooseAvailableDate,
5075    dateIsUnavailable: dateIsUnavailable,
5076    dateIsSelected: dateIsSelected
5077  };
5078  
5079  var SingleDatePickerInputPhrases = exports.SingleDatePickerInputPhrases = {
5080    clearDate: clearDate,
5081    keyboardNavigationInstructions: keyboardNavigationInstructions
5082  };
5083  
5084  var DayPickerPhrases = exports.DayPickerPhrases = {
5085    calendarLabel: calendarLabel,
5086    jumpToPrevMonth: jumpToPrevMonth,
5087    jumpToNextMonth: jumpToNextMonth,
5088    keyboardShortcuts: keyboardShortcuts,
5089    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
5090    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
5091    openThisPanel: openThisPanel,
5092    enterKey: enterKey,
5093    leftArrowRightArrow: leftArrowRightArrow,
5094    upArrowDownArrow: upArrowDownArrow,
5095    pageUpPageDown: pageUpPageDown,
5096    homeEnd: homeEnd,
5097    escape: escape,
5098    questionMark: questionMark,
5099    selectFocusedDate: selectFocusedDate,
5100    moveFocusByOneDay: moveFocusByOneDay,
5101    moveFocusByOneWeek: moveFocusByOneWeek,
5102    moveFocusByOneMonth: moveFocusByOneMonth,
5103    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
5104    returnFocusToInput: returnFocusToInput,
5105    chooseAvailableStartDate: chooseAvailableStartDate,
5106    chooseAvailableEndDate: chooseAvailableEndDate,
5107    chooseAvailableDate: chooseAvailableDate,
5108    dateIsUnavailable: dateIsUnavailable,
5109    dateIsSelected: dateIsSelected
5110  };
5111  
5112  var DayPickerKeyboardShortcutsPhrases = exports.DayPickerKeyboardShortcutsPhrases = {
5113    keyboardShortcuts: keyboardShortcuts,
5114    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
5115    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
5116    openThisPanel: openThisPanel,
5117    enterKey: enterKey,
5118    leftArrowRightArrow: leftArrowRightArrow,
5119    upArrowDownArrow: upArrowDownArrow,
5120    pageUpPageDown: pageUpPageDown,
5121    homeEnd: homeEnd,
5122    escape: escape,
5123    questionMark: questionMark,
5124    selectFocusedDate: selectFocusedDate,
5125    moveFocusByOneDay: moveFocusByOneDay,
5126    moveFocusByOneWeek: moveFocusByOneWeek,
5127    moveFocusByOneMonth: moveFocusByOneMonth,
5128    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
5129    returnFocusToInput: returnFocusToInput
5130  };
5131  
5132  var DayPickerNavigationPhrases = exports.DayPickerNavigationPhrases = {
5133    jumpToPrevMonth: jumpToPrevMonth,
5134    jumpToNextMonth: jumpToNextMonth
5135  };
5136  
5137  var CalendarDayPhrases = exports.CalendarDayPhrases = {
5138    chooseAvailableDate: chooseAvailableDate,
5139    dateIsUnavailable: dateIsUnavailable,
5140    dateIsSelected: dateIsSelected
5141  };
5142  
5143  /***/ }),
5144  /* 102 */
5145  /***/ (function(module, exports, __webpack_require__) {
5146  
5147  "use strict";
5148  
5149  
5150  Object.defineProperty(exports, "__esModule", {
5151    value: true
5152  });
5153  exports['default'] = getPhrasePropTypes;
5154  
5155  var _object = __webpack_require__(85);
5156  
5157  var _object2 = _interopRequireDefault(_object);
5158  
5159  var _propTypes = __webpack_require__(30);
5160  
5161  var _propTypes2 = _interopRequireDefault(_propTypes);
5162  
5163  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
5164  
5165  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5166  
5167  function getPhrasePropTypes(defaultPhrases) {
5168    return Object.keys(defaultPhrases).reduce(function (phrases, key) {
5169      return (0, _object2['default'])({}, phrases, _defineProperty({}, key, _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].func, _propTypes2['default'].node])));
5170    }, {});
5171  }
5172  
5173  /***/ }),
5174  /* 103 */
5175  /***/ (function(module, exports, __webpack_require__) {
5176  
5177  "use strict";
5178  
5179  
5180  Object.defineProperty(exports, "__esModule", {
5181    value: true
5182  });
5183  exports.withStylesPropTypes = exports.css = undefined;
5184  
5185  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
5186  
5187  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
5188  
5189  exports.withStyles = withStyles;
5190  
5191  var _object = __webpack_require__(85);
5192  
5193  var _object2 = _interopRequireDefault(_object);
5194  
5195  var _react = __webpack_require__(14);
5196  
5197  var _react2 = _interopRequireDefault(_react);
5198  
5199  var _propTypes = __webpack_require__(30);
5200  
5201  var _propTypes2 = _interopRequireDefault(_propTypes);
5202  
5203  var _hoistNonReactStatics = __webpack_require__(382);
5204  
5205  var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
5206  
5207  var _constants = __webpack_require__(385);
5208  
5209  var _brcast = __webpack_require__(386);
5210  
5211  var _brcast2 = _interopRequireDefault(_brcast);
5212  
5213  var _ThemedStyleSheet = __webpack_require__(230);
5214  
5215  var _ThemedStyleSheet2 = _interopRequireDefault(_ThemedStyleSheet);
5216  
5217  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
5218  
5219  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5220  
5221  function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
5222  
5223  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
5224  
5225  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /* eslint react/forbid-foreign-prop-types: off */
5226  
5227  // Add some named exports to assist in upgrading and for convenience
5228  var css = exports.css = _ThemedStyleSheet2['default'].resolveLTR;
5229  var withStylesPropTypes = exports.withStylesPropTypes = {
5230    styles: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types
5231    theme: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types
5232    css: _propTypes2['default'].func.isRequired
5233  };
5234  
5235  var EMPTY_STYLES = {};
5236  var EMPTY_STYLES_FN = function EMPTY_STYLES_FN() {
5237    return EMPTY_STYLES;
5238  };
5239  
5240  var START_MARK = 'react-with-styles.createStyles.start';
5241  var END_MARK = 'react-with-styles.createStyles.end';
5242  
5243  function baseClass(pureComponent) {
5244    if (pureComponent) {
5245      if (!_react2['default'].PureComponent) {
5246        throw new ReferenceError('withStyles() pureComponent option requires React 15.3.0 or later');
5247      }
5248  
5249      return _react2['default'].PureComponent;
5250    }
5251  
5252    return _react2['default'].Component;
5253  }
5254  
5255  var contextTypes = _defineProperty({}, _constants.CHANNEL, _brcast2['default']);
5256  
5257  var defaultDirection = _constants.DIRECTIONS.LTR;
5258  
5259  function withStyles(styleFn) {
5260    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
5261        _ref$stylesPropName = _ref.stylesPropName,
5262        stylesPropName = _ref$stylesPropName === undefined ? 'styles' : _ref$stylesPropName,
5263        _ref$themePropName = _ref.themePropName,
5264        themePropName = _ref$themePropName === undefined ? 'theme' : _ref$themePropName,
5265        _ref$cssPropName = _ref.cssPropName,
5266        cssPropName = _ref$cssPropName === undefined ? 'css' : _ref$cssPropName,
5267        _ref$flushBefore = _ref.flushBefore,
5268        flushBefore = _ref$flushBefore === undefined ? false : _ref$flushBefore,
5269        _ref$pureComponent = _ref.pureComponent,
5270        pureComponent = _ref$pureComponent === undefined ? false : _ref$pureComponent;
5271  
5272    var styleDefLTR = void 0;
5273    var styleDefRTL = void 0;
5274    var currentThemeLTR = void 0;
5275    var currentThemeRTL = void 0;
5276    var BaseClass = baseClass(pureComponent);
5277  
5278    function getResolveMethod(direction) {
5279      return direction === _constants.DIRECTIONS.LTR ? _ThemedStyleSheet2['default'].resolveLTR : _ThemedStyleSheet2['default'].resolveRTL;
5280    }
5281  
5282    function getCurrentTheme(direction) {
5283      return direction === _constants.DIRECTIONS.LTR ? currentThemeLTR : currentThemeRTL;
5284    }
5285  
5286    function getStyleDef(direction, wrappedComponentName) {
5287      var currentTheme = getCurrentTheme(direction);
5288      var styleDef = direction === _constants.DIRECTIONS.LTR ? styleDefLTR : styleDefRTL;
5289  
5290      var registeredTheme = _ThemedStyleSheet2['default'].get();
5291  
5292      // Return the existing styles if they've already been defined
5293      // and if the theme used to create them corresponds to the theme
5294      // registered with ThemedStyleSheet
5295      if (styleDef && currentTheme === registeredTheme) {
5296        return styleDef;
5297      }
5298  
5299      if (false) {}
5300  
5301      var isRTL = direction === _constants.DIRECTIONS.RTL;
5302  
5303      if (isRTL) {
5304        styleDefRTL = styleFn ? _ThemedStyleSheet2['default'].createRTL(styleFn) : EMPTY_STYLES_FN;
5305  
5306        currentThemeRTL = registeredTheme;
5307        styleDef = styleDefRTL;
5308      } else {
5309        styleDefLTR = styleFn ? _ThemedStyleSheet2['default'].createLTR(styleFn) : EMPTY_STYLES_FN;
5310  
5311        currentThemeLTR = registeredTheme;
5312        styleDef = styleDefLTR;
5313      }
5314  
5315      if (false) { var measureName; }
5316  
5317      return styleDef;
5318    }
5319  
5320    function getState(direction, wrappedComponentName) {
5321      return {
5322        resolveMethod: getResolveMethod(direction),
5323        styleDef: getStyleDef(direction, wrappedComponentName)
5324      };
5325    }
5326  
5327    return function () {
5328      function withStylesHOC(WrappedComponent) {
5329        var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
5330  
5331        // NOTE: Use a class here so components are ref-able if need be:
5332        // eslint-disable-next-line react/prefer-stateless-function
5333  
5334        var WithStyles = function (_BaseClass) {
5335          _inherits(WithStyles, _BaseClass);
5336  
5337          function WithStyles(props, context) {
5338            _classCallCheck(this, WithStyles);
5339  
5340            var _this = _possibleConstructorReturn(this, (WithStyles.__proto__ || Object.getPrototypeOf(WithStyles)).call(this, props, context));
5341  
5342            var direction = _this.context[_constants.CHANNEL] ? _this.context[_constants.CHANNEL].getState() : defaultDirection;
5343  
5344            _this.state = getState(direction, wrappedComponentName);
5345            return _this;
5346          }
5347  
5348          _createClass(WithStyles, [{
5349            key: 'componentDidMount',
5350            value: function () {
5351              function componentDidMount() {
5352                var _this2 = this;
5353  
5354                if (this.context[_constants.CHANNEL]) {
5355                  // subscribe to future direction changes
5356                  this.channelUnsubscribe = this.context[_constants.CHANNEL].subscribe(function (direction) {
5357                    _this2.setState(getState(direction, wrappedComponentName));
5358                  });
5359                }
5360              }
5361  
5362              return componentDidMount;
5363            }()
5364          }, {
5365            key: 'componentWillUnmount',
5366            value: function () {
5367              function componentWillUnmount() {
5368                if (this.channelUnsubscribe) {
5369                  this.channelUnsubscribe();
5370                }
5371              }
5372  
5373              return componentWillUnmount;
5374            }()
5375          }, {
5376            key: 'render',
5377            value: function () {
5378              function render() {
5379                var _ref2;
5380  
5381                // As some components will depend on previous styles in
5382                // the component tree, we provide the option of flushing the
5383                // buffered styles (i.e. to a style tag) **before** the rendering
5384                // cycle begins.
5385                //
5386                // The interfaces provide the optional "flush" method which
5387                // is run in turn by ThemedStyleSheet.flush.
5388                if (flushBefore) {
5389                  _ThemedStyleSheet2['default'].flush();
5390                }
5391  
5392                var _state = this.state,
5393                    resolveMethod = _state.resolveMethod,
5394                    styleDef = _state.styleDef;
5395  
5396  
5397                return _react2['default'].createElement(WrappedComponent, _extends({}, this.props, (_ref2 = {}, _defineProperty(_ref2, themePropName, _ThemedStyleSheet2['default'].get()), _defineProperty(_ref2, stylesPropName, styleDef()), _defineProperty(_ref2, cssPropName, resolveMethod), _ref2)));
5398              }
5399  
5400              return render;
5401            }()
5402          }]);
5403  
5404          return WithStyles;
5405        }(BaseClass);
5406  
5407        WithStyles.WrappedComponent = WrappedComponent;
5408        WithStyles.displayName = 'withStyles(' + String(wrappedComponentName) + ')';
5409        WithStyles.contextTypes = contextTypes;
5410        if (WrappedComponent.propTypes) {
5411          WithStyles.propTypes = (0, _object2['default'])({}, WrappedComponent.propTypes);
5412          delete WithStyles.propTypes[stylesPropName];
5413          delete WithStyles.propTypes[themePropName];
5414          delete WithStyles.propTypes[cssPropName];
5415        }
5416        if (WrappedComponent.defaultProps) {
5417          WithStyles.defaultProps = (0, _object2['default'])({}, WrappedComponent.defaultProps);
5418        }
5419  
5420        return (0, _hoistNonReactStatics2['default'])(WithStyles, WrappedComponent);
5421      }
5422  
5423      return withStylesHOC;
5424    }();
5425  }
5426  
5427  /***/ }),
5428  /* 104 */
5429  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5430  
5431  "use strict";
5432  
5433  // UNUSED EXPORTS: warning, useWarning
5434  
5435  // EXTERNAL MODULE: ./node_modules/reakit-warning/es/warning.js
5436  var warning = __webpack_require__(156);
5437  
5438  // EXTERNAL MODULE: external "React"
5439  var external_React_ = __webpack_require__(14);
5440  
5441  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/isObject.js
5442  var isObject = __webpack_require__(118);
5443  
5444  // CONCATENATED MODULE: ./node_modules/reakit-warning/es/useWarning.js
5445  
5446  
5447  
5448  
5449  
5450  function isRefObject(ref) {
5451    return Object(isObject["a" /* isObject */])(ref) && "current" in ref;
5452  }
5453  /**
5454   * Logs `messages` to the console using `console.warn` based on a `condition`.
5455   * This should be used inside components.
5456   */
5457  
5458  
5459  function useWarning(condition) {
5460    for (var _len = arguments.length, messages = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5461      messages[_key - 1] = arguments[_key];
5462    }
5463  
5464    if (false) {}
5465  }
5466  
5467  
5468  
5469  // CONCATENATED MODULE: ./node_modules/reakit-warning/es/index.js
5470  
5471  
5472  
5473  
5474  
5475  
5476  
5477  /***/ }),
5478  /* 105 */
5479  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5480  
5481  "use strict";
5482  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindow; });
5483  /* harmony import */ var _getDocument_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52);
5484  
5485  
5486  // Thanks to Fluent UI for doing the [research on IE11 memery leak](https://github.com/microsoft/fluentui/pull/9010#issuecomment-490768427)
5487  
5488  var _window; // Note: Accessing "window" in IE11 is somewhat expensive, and calling "typeof window"
5489  // hits a memory leak, whereas aliasing it and calling "typeof _window" does not.
5490  // Caching the window value at the file scope lets us minimize the impact.
5491  
5492  
5493  try {
5494    _window = window;
5495  } catch (e) {
5496    /* no-op */
5497  }
5498  /**
5499   * Returns `element.ownerDocument.defaultView || window`.
5500   */
5501  
5502  
5503  function getWindow(element) {
5504    if (!element) {
5505      return _window;
5506    }
5507  
5508    return Object(_getDocument_js__WEBPACK_IMPORTED_MODULE_0__[/* getDocument */ "a"])(element).defaultView || _window;
5509  }
5510  
5511  
5512  
5513  
5514  /***/ }),
5515  /* 106 */
5516  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5517  
5518  "use strict";
5519  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SystemContext; });
5520  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
5521  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
5522  
5523  
5524  var SystemContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({});
5525  
5526  
5527  
5528  
5529  /***/ }),
5530  /* 107 */
5531  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5532  
5533  "use strict";
5534  
5535  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
5536  var esm_extends = __webpack_require__(8);
5537  
5538  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
5539  var slicedToArray = __webpack_require__(11);
5540  
5541  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
5542  var objectWithoutProperties = __webpack_require__(13);
5543  
5544  // EXTERNAL MODULE: external ["wp","element"]
5545  var external_wp_element_ = __webpack_require__(0);
5546  
5547  // EXTERNAL MODULE: ./node_modules/classnames/index.js
5548  var classnames = __webpack_require__(10);
5549  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
5550  
5551  // EXTERNAL MODULE: ./node_modules/react-merge-refs/dist/react-merge-refs.esm.js
5552  var react_merge_refs_esm = __webpack_require__(81);
5553  
5554  // EXTERNAL MODULE: external ["wp","dom"]
5555  var external_wp_dom_ = __webpack_require__(27);
5556  
5557  // EXTERNAL MODULE: external ["wp","keycodes"]
5558  var external_wp_keycodes_ = __webpack_require__(16);
5559  
5560  // EXTERNAL MODULE: external ["wp","deprecated"]
5561  var external_wp_deprecated_ = __webpack_require__(35);
5562  var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
5563  
5564  // EXTERNAL MODULE: external ["wp","compose"]
5565  var external_wp_compose_ = __webpack_require__(12);
5566  
5567  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
5568  var library_close = __webpack_require__(154);
5569  
5570  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
5571  var defineProperty = __webpack_require__(5);
5572  
5573  // EXTERNAL MODULE: external ["wp","i18n"]
5574  var external_wp_i18n_ = __webpack_require__(1);
5575  
5576  // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/popover/utils.js
5577  
5578  
5579  
5580  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5581  
5582  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5583  
5584  /**
5585   * WordPress dependencies
5586   */
5587  
5588  /**
5589   * Module constants
5590   */
5591  
5592  var HEIGHT_OFFSET = 10; // used by the arrow and a bit of empty space
5593  
5594  /**
5595   * Utility used to compute the popover position over the xAxis
5596   *
5597   * @param {Object}  anchorRect            Anchor Rect.
5598   * @param {Object}  contentSize           Content Size.
5599   * @param {string}  xAxis                 Desired xAxis.
5600   * @param {string}  corner                Desired corner.
5601   * @param {boolean} stickyBoundaryElement The boundary element to use when
5602   *                                        switching between sticky and normal
5603   *                                        position.
5604   * @param {string}  chosenYAxis           yAxis to be used.
5605   * @param {Element} boundaryElement       Boundary element.
5606   * @param {boolean} forcePosition         Don't adjust position based on anchor.
5607   *
5608   * @return {Object} Popover xAxis position and constraints.
5609   */
5610  
5611  function computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, stickyBoundaryElement, chosenYAxis, boundaryElement, forcePosition) {
5612    var width = contentSize.width; // Correct xAxis for RTL support
5613  
5614    if (xAxis === 'left' && Object(external_wp_i18n_["isRTL"])()) {
5615      xAxis = 'right';
5616    } else if (xAxis === 'right' && Object(external_wp_i18n_["isRTL"])()) {
5617      xAxis = 'left';
5618    }
5619  
5620    if (corner === 'left' && Object(external_wp_i18n_["isRTL"])()) {
5621      corner = 'right';
5622    } else if (corner === 'right' && Object(external_wp_i18n_["isRTL"])()) {
5623      corner = 'left';
5624    } // x axis alignment choices
5625  
5626  
5627    var anchorMidPoint = Math.round(anchorRect.left + anchorRect.width / 2);
5628    var centerAlignment = {
5629      popoverLeft: anchorMidPoint,
5630      contentWidth: (anchorMidPoint - width / 2 > 0 ? width / 2 : anchorMidPoint) + (anchorMidPoint + width / 2 > window.innerWidth ? window.innerWidth - anchorMidPoint : width / 2)
5631    };
5632    var leftAlignmentX = anchorRect.left;
5633  
5634    if (corner === 'right') {
5635      leftAlignmentX = anchorRect.right;
5636    } else if (chosenYAxis !== 'middle') {
5637      leftAlignmentX = anchorMidPoint;
5638    }
5639  
5640    var rightAlignmentX = anchorRect.right;
5641  
5642    if (corner === 'left') {
5643      rightAlignmentX = anchorRect.left;
5644    } else if (chosenYAxis !== 'middle') {
5645      rightAlignmentX = anchorMidPoint;
5646    }
5647  
5648    var leftAlignment = {
5649      popoverLeft: leftAlignmentX,
5650      contentWidth: leftAlignmentX - width > 0 ? width : leftAlignmentX
5651    };
5652    var rightAlignment = {
5653      popoverLeft: rightAlignmentX,
5654      contentWidth: rightAlignmentX + width > window.innerWidth ? window.innerWidth - rightAlignmentX : width
5655    }; // Choosing the x axis
5656  
5657    var chosenXAxis = xAxis;
5658    var contentWidth = null;
5659  
5660    if (!stickyBoundaryElement && !forcePosition) {
5661      if (xAxis === 'center' && centerAlignment.contentWidth === width) {
5662        chosenXAxis = 'center';
5663      } else if (xAxis === 'left' && leftAlignment.contentWidth === width) {
5664        chosenXAxis = 'left';
5665      } else if (xAxis === 'right' && rightAlignment.contentWidth === width) {
5666        chosenXAxis = 'right';
5667      } else {
5668        chosenXAxis = leftAlignment.contentWidth > rightAlignment.contentWidth ? 'left' : 'right';
5669        var chosenWidth = chosenXAxis === 'left' ? leftAlignment.contentWidth : rightAlignment.contentWidth; // Limit width of the content to the viewport width
5670  
5671        if (width > window.innerWidth) {
5672          contentWidth = window.innerWidth;
5673        } // If we can't find any alignment options that could fit
5674        // our content, then let's fallback to the center of the viewport.
5675  
5676  
5677        if (chosenWidth !== width) {
5678          chosenXAxis = 'center';
5679          centerAlignment.popoverLeft = window.innerWidth / 2;
5680        }
5681      }
5682    }
5683  
5684    var popoverLeft;
5685  
5686    if (chosenXAxis === 'center') {
5687      popoverLeft = centerAlignment.popoverLeft;
5688    } else if (chosenXAxis === 'left') {
5689      popoverLeft = leftAlignment.popoverLeft;
5690    } else {
5691      popoverLeft = rightAlignment.popoverLeft;
5692    }
5693  
5694    if (boundaryElement) {
5695      var boundaryRect = boundaryElement.getBoundingClientRect();
5696      popoverLeft = Math.min(popoverLeft, boundaryRect.right - width);
5697    }
5698  
5699    return {
5700      xAxis: chosenXAxis,
5701      popoverLeft: popoverLeft,
5702      contentWidth: contentWidth
5703    };
5704  }
5705  /**
5706   * Utility used to compute the popover position over the yAxis
5707   *
5708   * @param {Object}  anchorRect            Anchor Rect.
5709   * @param {Object}  contentSize           Content Size.
5710   * @param {string}  yAxis                 Desired yAxis.
5711   * @param {string}  corner                Desired corner.
5712   * @param {boolean} stickyBoundaryElement The boundary element to use when
5713   *                                        switching between sticky and normal
5714   *                                        position.
5715   * @param {Element} anchorRef             The anchor element.
5716   * @param {Element} relativeOffsetTop     If applicable, top offset of the
5717   *                                        relative positioned parent container.
5718   * @param {boolean} forcePosition         Don't adjust position based on anchor.
5719   *
5720   * @return {Object} Popover xAxis position and constraints.
5721   */
5722  
5723  function computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corner, stickyBoundaryElement, anchorRef, relativeOffsetTop, forcePosition) {
5724    var height = contentSize.height;
5725  
5726    if (stickyBoundaryElement) {
5727      var stickyRect = stickyBoundaryElement.getBoundingClientRect();
5728      var stickyPosition = stickyRect.top + height - relativeOffsetTop;
5729  
5730      if (anchorRect.top <= stickyPosition) {
5731        return {
5732          yAxis: yAxis,
5733          popoverTop: Math.min(anchorRect.bottom, stickyPosition)
5734        };
5735      }
5736    } // y axis alignment choices
5737  
5738  
5739    var anchorMidPoint = anchorRect.top + anchorRect.height / 2;
5740  
5741    if (corner === 'bottom') {
5742      anchorMidPoint = anchorRect.bottom;
5743    } else if (corner === 'top') {
5744      anchorMidPoint = anchorRect.top;
5745    }
5746  
5747    var middleAlignment = {
5748      popoverTop: anchorMidPoint,
5749      contentHeight: (anchorMidPoint - height / 2 > 0 ? height / 2 : anchorMidPoint) + (anchorMidPoint + height / 2 > window.innerHeight ? window.innerHeight - anchorMidPoint : height / 2)
5750    };
5751    var topAlignment = {
5752      popoverTop: anchorRect.top,
5753      contentHeight: anchorRect.top - HEIGHT_OFFSET - height > 0 ? height : anchorRect.top - HEIGHT_OFFSET
5754    };
5755    var bottomAlignment = {
5756      popoverTop: anchorRect.bottom,
5757      contentHeight: anchorRect.bottom + HEIGHT_OFFSET + height > window.innerHeight ? window.innerHeight - HEIGHT_OFFSET - anchorRect.bottom : height
5758    }; // Choosing the y axis
5759  
5760    var chosenYAxis = yAxis;
5761    var contentHeight = null;
5762  
5763    if (!stickyBoundaryElement && !forcePosition) {
5764      if (yAxis === 'middle' && middleAlignment.contentHeight === height) {
5765        chosenYAxis = 'middle';
5766      } else if (yAxis === 'top' && topAlignment.contentHeight === height) {
5767        chosenYAxis = 'top';
5768      } else if (yAxis === 'bottom' && bottomAlignment.contentHeight === height) {
5769        chosenYAxis = 'bottom';
5770      } else {
5771        chosenYAxis = topAlignment.contentHeight > bottomAlignment.contentHeight ? 'top' : 'bottom';
5772        var chosenHeight = chosenYAxis === 'top' ? topAlignment.contentHeight : bottomAlignment.contentHeight;
5773        contentHeight = chosenHeight !== height ? chosenHeight : null;
5774      }
5775    }
5776  
5777    var popoverTop;
5778  
5779    if (chosenYAxis === 'middle') {
5780      popoverTop = middleAlignment.popoverTop;
5781    } else if (chosenYAxis === 'top') {
5782      popoverTop = topAlignment.popoverTop;
5783    } else {
5784      popoverTop = bottomAlignment.popoverTop;
5785    }
5786  
5787    return {
5788      yAxis: chosenYAxis,
5789      popoverTop: popoverTop,
5790      contentHeight: contentHeight
5791    };
5792  }
5793  /**
5794   * Utility used to compute the popover position and the content max width/height
5795   * for a popover given its anchor rect and its content size.
5796   *
5797   * @param {Object}  anchorRect            Anchor Rect.
5798   * @param {Object}  contentSize           Content Size.
5799   * @param {string}  position              Position.
5800   * @param {boolean} stickyBoundaryElement The boundary element to use when
5801   *                                        switching between sticky and normal
5802   *                                        position.
5803   * @param {Element} anchorRef             The anchor element.
5804   * @param {number}  relativeOffsetTop     If applicable, top offset of the
5805   *                                        relative positioned parent container.
5806   * @param {Element} boundaryElement       Boundary element.
5807   * @param {boolean} forcePosition         Don't adjust position based on anchor.
5808   *
5809   * @return {Object} Popover position and constraints.
5810   */
5811  
5812  function computePopoverPosition(anchorRect, contentSize) {
5813    var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'top';
5814    var stickyBoundaryElement = arguments.length > 3 ? arguments[3] : undefined;
5815    var anchorRef = arguments.length > 4 ? arguments[4] : undefined;
5816    var relativeOffsetTop = arguments.length > 5 ? arguments[5] : undefined;
5817    var boundaryElement = arguments.length > 6 ? arguments[6] : undefined;
5818    var forcePosition = arguments.length > 7 ? arguments[7] : undefined;
5819  
5820    var _position$split = position.split(' '),
5821        _position$split2 = Object(slicedToArray["a" /* default */])(_position$split, 3),
5822        yAxis = _position$split2[0],
5823        _position$split2$ = _position$split2[1],
5824        xAxis = _position$split2$ === void 0 ? 'center' : _position$split2$,
5825        corner = _position$split2[2];
5826  
5827    var yAxisPosition = computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corner, stickyBoundaryElement, anchorRef, relativeOffsetTop, forcePosition);
5828    var xAxisPosition = computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, stickyBoundaryElement, yAxisPosition.yAxis, boundaryElement, forcePosition);
5829    return _objectSpread(_objectSpread({}, xAxisPosition), yAxisPosition);
5830  }
5831  
5832  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/button/index.js
5833  var build_module_button = __webpack_require__(36);
5834  
5835  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/scroll-lock/index.js
5836  var scroll_lock = __webpack_require__(162);
5837  
5838  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/use-slot.js
5839  var use_slot = __webpack_require__(161);
5840  
5841  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/index.js + 6 modules
5842  var slot_fill = __webpack_require__(119);
5843  
5844  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/animate/index.js
5845  var build_module_animate = __webpack_require__(97);
5846  
5847  // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/popover/index.js
5848  
5849  
5850  
5851  
5852  
5853  /**
5854   * External dependencies
5855   */
5856  
5857  
5858  /**
5859   * WordPress dependencies
5860   */
5861  
5862  
5863  
5864  
5865  
5866  
5867  
5868  /**
5869   * Internal dependencies
5870   */
5871  
5872  
5873  
5874  
5875  
5876  
5877  /**
5878   * Name of slot in which popover should fill.
5879   *
5880   * @type {string}
5881   */
5882  
5883  var SLOT_NAME = 'Popover';
5884  
5885  function offsetIframe(rect, ownerDocument) {
5886    var defaultView = ownerDocument.defaultView;
5887    var frameElement = defaultView.frameElement;
5888  
5889    if (!frameElement) {
5890      return rect;
5891    }
5892  
5893    var iframeRect = frameElement.getBoundingClientRect();
5894    return new defaultView.DOMRect(rect.left + iframeRect.left, rect.top + iframeRect.top, rect.width, rect.height);
5895  }
5896  
5897  function computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect) {
5898    var anchorRef = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
5899    var shouldAnchorIncludePadding = arguments.length > 4 ? arguments[4] : undefined;
5900  
5901    if (anchorRect) {
5902      return anchorRect;
5903    }
5904  
5905    if (getAnchorRect) {
5906      if (!anchorRefFallback.current) {
5907        return;
5908      }
5909  
5910      return getAnchorRect(anchorRefFallback.current);
5911    }
5912  
5913    if (anchorRef !== false) {
5914      if (!anchorRef || !window.Range || !window.Element || !window.DOMRect) {
5915        return;
5916      } // Duck-type to check if `anchorRef` is an instance of Range
5917      // `anchorRef instanceof window.Range` checks will break across document boundaries
5918      // such as in an iframe
5919  
5920  
5921      if (typeof (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.cloneRange) === 'function') {
5922        return offsetIframe(Object(external_wp_dom_["getRectangleFromRange"])(anchorRef), anchorRef.endContainer.ownerDocument);
5923      } // Duck-type to check if `anchorRef` is an instance of Element
5924      // `anchorRef instanceof window.Element` checks will break across document boundaries
5925      // such as in an iframe
5926  
5927  
5928      if (typeof (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.getBoundingClientRect) === 'function') {
5929        var _rect2 = offsetIframe(anchorRef.getBoundingClientRect(), anchorRef.ownerDocument);
5930  
5931        if (shouldAnchorIncludePadding) {
5932          return _rect2;
5933        }
5934  
5935        return withoutPadding(_rect2, anchorRef);
5936      }
5937  
5938      var top = anchorRef.top,
5939          bottom = anchorRef.bottom;
5940      var topRect = top.getBoundingClientRect();
5941      var bottomRect = bottom.getBoundingClientRect();
5942  
5943      var _rect = offsetIframe(new window.DOMRect(topRect.left, topRect.top, topRect.width, bottomRect.bottom - topRect.top), top.ownerDocument);
5944  
5945      if (shouldAnchorIncludePadding) {
5946        return _rect;
5947      }
5948  
5949      return withoutPadding(_rect, anchorRef);
5950    }
5951  
5952    if (!anchorRefFallback.current) {
5953      return;
5954    }
5955  
5956    var parentNode = anchorRefFallback.current.parentNode;
5957    var rect = parentNode.getBoundingClientRect();
5958  
5959    if (shouldAnchorIncludePadding) {
5960      return rect;
5961    }
5962  
5963    return withoutPadding(rect, parentNode);
5964  }
5965  
5966  function getComputedStyle(node) {
5967    return node.ownerDocument.defaultView.getComputedStyle(node);
5968  }
5969  
5970  function withoutPadding(rect, element) {
5971    var _getComputedStyle = getComputedStyle(element),
5972        paddingTop = _getComputedStyle.paddingTop,
5973        paddingBottom = _getComputedStyle.paddingBottom,
5974        paddingLeft = _getComputedStyle.paddingLeft,
5975        paddingRight = _getComputedStyle.paddingRight;
5976  
5977    var top = paddingTop ? parseInt(paddingTop, 10) : 0;
5978    var bottom = paddingBottom ? parseInt(paddingBottom, 10) : 0;
5979    var left = paddingLeft ? parseInt(paddingLeft, 10) : 0;
5980    var right = paddingRight ? parseInt(paddingRight, 10) : 0;
5981    return {
5982      x: rect.left + left,
5983      y: rect.top + top,
5984      width: rect.width - left - right,
5985      height: rect.height - top - bottom,
5986      left: rect.left + left,
5987      right: rect.right - right,
5988      top: rect.top + top,
5989      bottom: rect.bottom - bottom
5990    };
5991  }
5992  /**
5993   * Sets or removes an element attribute.
5994   *
5995   * @param {Element} element The element to modify.
5996   * @param {string}  name    The attribute name to set or remove.
5997   * @param {?string} value   The value to set. A falsy value will remove the
5998   *                          attribute.
5999   */
6000  
6001  
6002  function setAttribute(element, name, value) {
6003    if (!value) {
6004      if (element.hasAttribute(name)) {
6005        element.removeAttribute(name);
6006      }
6007    } else if (element.getAttribute(name) !== value) {
6008      element.setAttribute(name, value);
6009    }
6010  }
6011  /**
6012   * Sets or removes an element style property.
6013   *
6014   * @param {Element} element  The element to modify.
6015   * @param {string}  property The property to set or remove.
6016   * @param {?string} value    The value to set. A falsy value will remove the
6017   *                           property.
6018   */
6019  
6020  
6021  function setStyle(element, property) {
6022    var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
6023  
6024    if (element.style[property] !== value) {
6025      element.style[property] = value;
6026    }
6027  }
6028  /**
6029   * Sets or removes an element class.
6030   *
6031   * @param {Element} element The element to modify.
6032   * @param {string}  name    The class to set or remove.
6033   * @param {boolean} toggle  True to set the class, false to remove.
6034   */
6035  
6036  
6037  function setClass(element, name, toggle) {
6038    if (toggle) {
6039      if (!element.classList.contains(name)) {
6040        element.classList.add(name);
6041      }
6042    } else if (element.classList.contains(name)) {
6043      element.classList.remove(name);
6044    }
6045  }
6046  
6047  function getAnchorDocument(anchor) {
6048    if (!anchor) {
6049      return;
6050    }
6051  
6052    if (anchor.endContainer) {
6053      return anchor.endContainer.ownerDocument;
6054    }
6055  
6056    if (anchor.top) {
6057      return anchor.top.ownerDocument;
6058    }
6059  
6060    return anchor.ownerDocument;
6061  }
6062  
6063  var popover_Popover = function Popover(_ref) {
6064    var headerTitle = _ref.headerTitle,
6065        onClose = _ref.onClose,
6066        onKeyDown = _ref.onKeyDown,
6067        children = _ref.children,
6068        className = _ref.className,
6069        _ref$noArrow = _ref.noArrow,
6070        noArrow = _ref$noArrow === void 0 ? true : _ref$noArrow,
6071        isAlternate = _ref.isAlternate,
6072        _ref$position = _ref.position,
6073        position = _ref$position === void 0 ? 'bottom right' : _ref$position,
6074        range = _ref.range,
6075        _ref$focusOnMount = _ref.focusOnMount,
6076        focusOnMount = _ref$focusOnMount === void 0 ? 'firstElement' : _ref$focusOnMount,
6077        anchorRef = _ref.anchorRef,
6078        shouldAnchorIncludePadding = _ref.shouldAnchorIncludePadding,
6079        anchorRect = _ref.anchorRect,
6080        getAnchorRect = _ref.getAnchorRect,
6081        expandOnMobile = _ref.expandOnMobile,
6082        _ref$animate = _ref.animate,
6083        animate = _ref$animate === void 0 ? true : _ref$animate,
6084        onClickOutside = _ref.onClickOutside,
6085        onFocusOutside = _ref.onFocusOutside,
6086        __unstableStickyBoundaryElement = _ref.__unstableStickyBoundaryElement,
6087        _ref$__unstableSlotNa = _ref.__unstableSlotName,
6088        __unstableSlotName = _ref$__unstableSlotNa === void 0 ? SLOT_NAME : _ref$__unstableSlotNa,
6089        __unstableObserveElement = _ref.__unstableObserveElement,
6090        __unstableBoundaryParent = _ref.__unstableBoundaryParent,
6091        __unstableForcePosition = _ref.__unstableForcePosition,
6092        contentProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["headerTitle", "onClose", "onKeyDown", "children", "className", "noArrow", "isAlternate", "position", "range", "focusOnMount", "anchorRef", "shouldAnchorIncludePadding", "anchorRect", "getAnchorRect", "expandOnMobile", "animate", "onClickOutside", "onFocusOutside", "__unstableStickyBoundaryElement", "__unstableSlotName", "__unstableObserveElement", "__unstableBoundaryParent", "__unstableForcePosition"]);
6093  
6094    var anchorRefFallback = Object(external_wp_element_["useRef"])(null);
6095    var contentRef = Object(external_wp_element_["useRef"])(null);
6096    var containerRef = Object(external_wp_element_["useRef"])();
6097    var isMobileViewport = Object(external_wp_compose_["useViewportMatch"])('medium', '<');
6098  
6099    var _useState = Object(external_wp_element_["useState"])(),
6100        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
6101        animateOrigin = _useState2[0],
6102        setAnimateOrigin = _useState2[1];
6103  
6104    var slot = Object(use_slot["a" /* default */])(__unstableSlotName);
6105    var isExpanded = expandOnMobile && isMobileViewport;
6106  
6107    var _useResizeObserver = Object(external_wp_compose_["useResizeObserver"])(),
6108        _useResizeObserver2 = Object(slicedToArray["a" /* default */])(_useResizeObserver, 2),
6109        containerResizeListener = _useResizeObserver2[0],
6110        contentSize = _useResizeObserver2[1];
6111  
6112    noArrow = isExpanded || noArrow;
6113    Object(external_wp_element_["useLayoutEffect"])(function () {
6114      if (isExpanded) {
6115        setClass(containerRef.current, 'is-without-arrow', noArrow);
6116        setClass(containerRef.current, 'is-alternate', isAlternate);
6117        setAttribute(containerRef.current, 'data-x-axis');
6118        setAttribute(containerRef.current, 'data-y-axis');
6119        setStyle(containerRef.current, 'top');
6120        setStyle(containerRef.current, 'left');
6121        setStyle(contentRef.current, 'maxHeight');
6122        setStyle(contentRef.current, 'maxWidth');
6123        return;
6124      }
6125  
6126      var refresh = function refresh() {
6127        if (!containerRef.current || !contentRef.current) {
6128          return;
6129        }
6130  
6131        var anchor = computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect, anchorRef, shouldAnchorIncludePadding);
6132  
6133        if (!anchor) {
6134          return;
6135        }
6136  
6137        var _containerRef$current = containerRef.current,
6138            offsetParent = _containerRef$current.offsetParent,
6139            ownerDocument = _containerRef$current.ownerDocument;
6140        var relativeOffsetTop = 0; // If there is a positioned ancestor element that is not the body,
6141        // subtract the position from the anchor rect. If the position of
6142        // the popover is fixed, the offset parent is null or the body
6143        // element, in which case the position is relative to the viewport.
6144        // See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
6145  
6146        if (offsetParent && offsetParent !== ownerDocument.body) {
6147          var offsetParentRect = offsetParent.getBoundingClientRect();
6148          relativeOffsetTop = offsetParentRect.top;
6149          anchor = new window.DOMRect(anchor.left - offsetParentRect.left, anchor.top - offsetParentRect.top, anchor.width, anchor.height);
6150        }
6151  
6152        var boundaryElement;
6153  
6154        if (__unstableBoundaryParent) {
6155          var _containerRef$current2;
6156  
6157          boundaryElement = (_containerRef$current2 = containerRef.current.closest('.popover-slot')) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.parentNode;
6158        }
6159  
6160        var usedContentSize = !contentSize.height ? contentRef.current.getBoundingClientRect() : contentSize;
6161  
6162        var _computePopoverPositi = computePopoverPosition(anchor, usedContentSize, position, __unstableStickyBoundaryElement, containerRef.current, relativeOffsetTop, boundaryElement, __unstableForcePosition),
6163            popoverTop = _computePopoverPositi.popoverTop,
6164            popoverLeft = _computePopoverPositi.popoverLeft,
6165            xAxis = _computePopoverPositi.xAxis,
6166            yAxis = _computePopoverPositi.yAxis,
6167            contentHeight = _computePopoverPositi.contentHeight,
6168            contentWidth = _computePopoverPositi.contentWidth;
6169  
6170        if (typeof popoverTop === 'number' && typeof popoverLeft === 'number') {
6171          setStyle(containerRef.current, 'top', popoverTop + 'px');
6172          setStyle(containerRef.current, 'left', popoverLeft + 'px');
6173        }
6174  
6175        setClass(containerRef.current, 'is-without-arrow', noArrow || xAxis === 'center' && yAxis === 'middle');
6176        setClass(containerRef.current, 'is-alternate', isAlternate);
6177        setAttribute(containerRef.current, 'data-x-axis', xAxis);
6178        setAttribute(containerRef.current, 'data-y-axis', yAxis);
6179        setStyle(contentRef.current, 'maxHeight', typeof contentHeight === 'number' ? contentHeight + 'px' : '');
6180        setStyle(contentRef.current, 'maxWidth', typeof contentWidth === 'number' ? contentWidth + 'px' : ''); // Compute the animation position
6181  
6182        var yAxisMapping = {
6183          top: 'bottom',
6184          bottom: 'top'
6185        };
6186        var xAxisMapping = {
6187          left: 'right',
6188          right: 'left'
6189        };
6190        var animateYAxis = yAxisMapping[yAxis] || 'middle';
6191        var animateXAxis = xAxisMapping[xAxis] || 'center';
6192        setAnimateOrigin(animateXAxis + ' ' + animateYAxis);
6193      };
6194  
6195      refresh();
6196      var ownerDocument = containerRef.current.ownerDocument;
6197      var defaultView = ownerDocument.defaultView;
6198      /*
6199       * There are sometimes we need to reposition or resize the popover that
6200       * are not handled by the resize/scroll window events (i.e. CSS changes
6201       * in the layout that changes the position of the anchor).
6202       *
6203       * For these situations, we refresh the popover every 0.5s
6204       */
6205  
6206      var intervalHandle = defaultView.setInterval(refresh, 500);
6207      var rafId;
6208  
6209      var refreshOnAnimationFrame = function refreshOnAnimationFrame() {
6210        defaultView.cancelAnimationFrame(rafId);
6211        rafId = defaultView.requestAnimationFrame(refresh);
6212      }; // Sometimes a click trigger a layout change that affects the popover
6213      // position. This is an opportunity to immediately refresh rather than
6214      // at the interval.
6215  
6216  
6217      defaultView.addEventListener('click', refreshOnAnimationFrame);
6218      defaultView.addEventListener('resize', refresh);
6219      defaultView.addEventListener('scroll', refresh, true);
6220      var anchorDocument = getAnchorDocument(anchorRef); // If the anchor is within an iframe, the popover position also needs
6221      // to refrest when the iframe content is scrolled or resized.
6222  
6223      if (anchorDocument && anchorDocument !== ownerDocument) {
6224        anchorDocument.defaultView.addEventListener('resize', refresh);
6225        anchorDocument.defaultView.addEventListener('scroll', refresh, true);
6226      }
6227  
6228      var observer;
6229  
6230      if (__unstableObserveElement) {
6231        observer = new defaultView.MutationObserver(refresh);
6232        observer.observe(__unstableObserveElement, {
6233          attributes: true
6234        });
6235      }
6236  
6237      return function () {
6238        defaultView.clearInterval(intervalHandle);
6239        defaultView.removeEventListener('resize', refresh);
6240        defaultView.removeEventListener('scroll', refresh, true);
6241        defaultView.removeEventListener('click', refreshOnAnimationFrame);
6242        defaultView.cancelAnimationFrame(rafId);
6243  
6244        if (anchorDocument && anchorDocument !== ownerDocument) {
6245          anchorDocument.defaultView.removeEventListener('resize', refresh);
6246          anchorDocument.defaultView.removeEventListener('scroll', refresh, true);
6247        }
6248  
6249        if (observer) {
6250          observer.disconnect();
6251        }
6252      };
6253    }, [isExpanded, anchorRect, getAnchorRect, anchorRef, shouldAnchorIncludePadding, position, contentSize, __unstableStickyBoundaryElement, __unstableObserveElement, __unstableBoundaryParent]);
6254    var constrainedTabbingRef = Object(external_wp_compose_["useConstrainedTabbing"])();
6255    var focusReturnRef = Object(external_wp_compose_["useFocusReturn"])();
6256    var focusOnMountRef = Object(external_wp_compose_["useFocusOnMount"])(focusOnMount);
6257    var focusOutsideProps = Object(external_wp_compose_["__experimentalUseFocusOutside"])(handleOnFocusOutside);
6258    var allRefs = [containerRef, focusOnMount ? constrainedTabbingRef : null, focusOnMount ? focusReturnRef : null, focusOnMount ? focusOnMountRef : null];
6259    var mergedRefs = Object(external_wp_element_["useCallback"])(Object(react_merge_refs_esm["a" /* default */])(allRefs), allRefs); // Event handlers
6260  
6261    var maybeClose = function maybeClose(event) {
6262      // Close on escape
6263      if (event.keyCode === external_wp_keycodes_["ESCAPE"] && onClose) {
6264        event.stopPropagation();
6265        onClose();
6266      } // Preserve original content prop behavior
6267  
6268  
6269      if (onKeyDown) {
6270        onKeyDown(event);
6271      }
6272    };
6273    /**
6274     * Shims an onFocusOutside callback to be compatible with a deprecated
6275     * onClickOutside prop function, if provided.
6276     *
6277     * @param {FocusEvent} event Focus event from onFocusOutside.
6278     */
6279  
6280  
6281    function handleOnFocusOutside(event) {
6282      // Defer to given `onFocusOutside` if specified. Call `onClose` only if
6283      // both `onFocusOutside` and `onClickOutside` are unspecified. Doing so
6284      // assures backwards-compatibility for prior `onClickOutside` default.
6285      if (onFocusOutside) {
6286        onFocusOutside(event);
6287        return;
6288      } else if (!onClickOutside) {
6289        if (onClose) {
6290          onClose();
6291        }
6292  
6293        return;
6294      } // Simulate MouseEvent using FocusEvent#relatedTarget as emulated click
6295      // target. MouseEvent constructor is unsupported in Internet Explorer.
6296  
6297  
6298      var clickEvent;
6299  
6300      try {
6301        clickEvent = new window.MouseEvent('click');
6302      } catch (error) {
6303        clickEvent = document.createEvent('MouseEvent');
6304        clickEvent.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
6305      }
6306  
6307      Object.defineProperty(clickEvent, 'target', {
6308        get: function get() {
6309          return event.relatedTarget;
6310        }
6311      });
6312      external_wp_deprecated_default()('Popover onClickOutside prop', {
6313        alternative: 'onFocusOutside'
6314      });
6315      onClickOutside(clickEvent);
6316    }
6317    /** @type {false | string} */
6318  
6319  
6320    var animateClassName = Boolean(animate && animateOrigin) && Object(build_module_animate["b" /* getAnimateClassName */])({
6321      type: 'appear',
6322      origin: animateOrigin
6323    }); // Disable reason: We care to capture the _bubbled_ events from inputs
6324    // within popover as inferring close intent.
6325  
6326    var content = // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
6327    // eslint-disable-next-line jsx-a11y/no-static-element-interactions
6328    Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
6329      className: classnames_default()('components-popover', className, animateClassName, {
6330        'is-expanded': isExpanded,
6331        'is-without-arrow': noArrow,
6332        'is-alternate': isAlternate
6333      })
6334    }, contentProps, {
6335      onKeyDown: maybeClose
6336    }, focusOutsideProps, {
6337      ref: mergedRefs,
6338      tabIndex: "-1"
6339    }), isExpanded && Object(external_wp_element_["createElement"])(scroll_lock["a" /* default */], null), isExpanded && Object(external_wp_element_["createElement"])("div", {
6340      className: "components-popover__header"
6341    }, Object(external_wp_element_["createElement"])("span", {
6342      className: "components-popover__header-title"
6343    }, headerTitle), Object(external_wp_element_["createElement"])(build_module_button["a" /* default */], {
6344      className: "components-popover__close",
6345      icon: library_close["a" /* default */],
6346      onClick: onClose
6347    })), Object(external_wp_element_["createElement"])("div", {
6348      ref: contentRef,
6349      className: "components-popover__content"
6350    }, Object(external_wp_element_["createElement"])("div", {
6351      style: {
6352        position: 'relative'
6353      }
6354    }, containerResizeListener, children)));
6355  
6356    if (slot.ref) {
6357      content = Object(external_wp_element_["createElement"])(slot_fill["a" /* Fill */], {
6358        name: __unstableSlotName
6359      }, content);
6360    }
6361  
6362    if (anchorRef || anchorRect) {
6363      return content;
6364    }
6365  
6366    return Object(external_wp_element_["createElement"])("span", {
6367      ref: anchorRefFallback
6368    }, content);
6369  };
6370  
6371  var PopoverContainer = popover_Popover;
6372  
6373  PopoverContainer.Slot = function (_ref2) {
6374    var _ref2$name = _ref2.name,
6375        name = _ref2$name === void 0 ? SLOT_NAME : _ref2$name;
6376    return Object(external_wp_element_["createElement"])(slot_fill["b" /* Slot */], {
6377      bubblesVirtually: true,
6378      name: name,
6379      className: "popover-slot"
6380    });
6381  };
6382  
6383  /* harmony default export */ var popover = __webpack_exports__["a"] = (PopoverContainer);
6384  
6385  
6386  /***/ }),
6387  /* 108 */
6388  /***/ (function(module, exports, __webpack_require__) {
6389  
6390  "use strict";
6391  
6392  
6393  Object.defineProperty(exports, '__esModule', { value: true });
6394  
6395  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6396  
6397  var _extends = _interopDefault(__webpack_require__(175));
6398  var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(176));
6399  var React = __webpack_require__(14);
6400  var React__default = _interopDefault(React);
6401  var _inheritsLoose = _interopDefault(__webpack_require__(152));
6402  var _assertThisInitialized = _interopDefault(__webpack_require__(177));
6403  
6404  var is = {
6405    arr: Array.isArray,
6406    obj: function obj(a) {
6407      return Object.prototype.toString.call(a) === '[object Object]';
6408    },
6409    fun: function fun(a) {
6410      return typeof a === 'function';
6411    },
6412    str: function str(a) {
6413      return typeof a === 'string';
6414    },
6415    num: function num(a) {
6416      return typeof a === 'number';
6417    },
6418    und: function und(a) {
6419      return a === void 0;
6420    },
6421    nul: function nul(a) {
6422      return a === null;
6423    },
6424    set: function set(a) {
6425      return a instanceof Set;
6426    },
6427    map: function map(a) {
6428      return a instanceof Map;
6429    },
6430    equ: function equ(a, b) {
6431      if (typeof a !== typeof b) return false;
6432      if (is.str(a) || is.num(a)) return a === b;
6433      if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
6434      var i;
6435  
6436      for (i in a) {
6437        if (!(i in b)) return false;
6438      }
6439  
6440      for (i in b) {
6441        if (a[i] !== b[i]) return false;
6442      }
6443  
6444      return is.und(i) ? a === b : true;
6445    }
6446  };
6447  function merge(target, lowercase) {
6448    if (lowercase === void 0) {
6449      lowercase = true;
6450    }
6451  
6452    return function (object) {
6453      return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
6454        var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
6455        acc[key] = target(key);
6456        return acc;
6457      }, target);
6458    };
6459  }
6460  function useForceUpdate() {
6461    var _useState = React.useState(false),
6462        f = _useState[1];
6463  
6464    var forceUpdate = React.useCallback(function () {
6465      return f(function (v) {
6466        return !v;
6467      });
6468    }, []);
6469    return forceUpdate;
6470  }
6471  function withDefault(value, defaultValue) {
6472    return is.und(value) || is.nul(value) ? defaultValue : value;
6473  }
6474  function toArray(a) {
6475    return !is.und(a) ? is.arr(a) ? a : [a] : [];
6476  }
6477  function callProp(obj) {
6478    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
6479      args[_key - 1] = arguments[_key];
6480    }
6481  
6482    return is.fun(obj) ? obj.apply(void 0, args) : obj;
6483  }
6484  
6485  function getForwardProps(props) {
6486    var to = props.to,
6487        from = props.from,
6488        config = props.config,
6489        onStart = props.onStart,
6490        onRest = props.onRest,
6491        onFrame = props.onFrame,
6492        children = props.children,
6493        reset = props.reset,
6494        reverse = props.reverse,
6495        force = props.force,
6496        immediate = props.immediate,
6497        delay = props.delay,
6498        attach = props.attach,
6499        destroyed = props.destroyed,
6500        interpolateTo = props.interpolateTo,
6501        ref = props.ref,
6502        lazy = props.lazy,
6503        forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
6504  
6505    return forward;
6506  }
6507  
6508  function interpolateTo(props) {
6509    var forward = getForwardProps(props);
6510    if (is.und(forward)) return _extends({
6511      to: forward
6512    }, props);
6513    var rest = Object.keys(props).reduce(function (a, k) {
6514      var _extends2;
6515  
6516      return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
6517    }, {});
6518    return _extends({
6519      to: forward
6520    }, rest);
6521  }
6522  function handleRef(ref, forward) {
6523    if (forward) {
6524      // If it's a function, assume it's a ref callback
6525      if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
6526        forward.current = ref;
6527      }
6528    }
6529  
6530    return ref;
6531  }
6532  
6533  var Animated =
6534  /*#__PURE__*/
6535  function () {
6536    function Animated() {
6537      this.payload = void 0;
6538      this.children = [];
6539    }
6540  
6541    var _proto = Animated.prototype;
6542  
6543    _proto.getAnimatedValue = function getAnimatedValue() {
6544      return this.getValue();
6545    };
6546  
6547    _proto.getPayload = function getPayload() {
6548      return this.payload || this;
6549    };
6550  
6551    _proto.attach = function attach() {};
6552  
6553    _proto.detach = function detach() {};
6554  
6555    _proto.getChildren = function getChildren() {
6556      return this.children;
6557    };
6558  
6559    _proto.addChild = function addChild(child) {
6560      if (this.children.length === 0) this.attach();
6561      this.children.push(child);
6562    };
6563  
6564    _proto.removeChild = function removeChild(child) {
6565      var index = this.children.indexOf(child);
6566      this.children.splice(index, 1);
6567      if (this.children.length === 0) this.detach();
6568    };
6569  
6570    return Animated;
6571  }();
6572  var AnimatedArray =
6573  /*#__PURE__*/
6574  function (_Animated) {
6575    _inheritsLoose(AnimatedArray, _Animated);
6576  
6577    function AnimatedArray() {
6578      var _this;
6579  
6580      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6581        args[_key] = arguments[_key];
6582      }
6583  
6584      _this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
6585      _this.payload = [];
6586  
6587      _this.attach = function () {
6588        return _this.payload.forEach(function (p) {
6589          return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
6590        });
6591      };
6592  
6593      _this.detach = function () {
6594        return _this.payload.forEach(function (p) {
6595          return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
6596        });
6597      };
6598  
6599      return _this;
6600    }
6601  
6602    return AnimatedArray;
6603  }(Animated);
6604  var AnimatedObject =
6605  /*#__PURE__*/
6606  function (_Animated2) {
6607    _inheritsLoose(AnimatedObject, _Animated2);
6608  
6609    function AnimatedObject() {
6610      var _this2;
6611  
6612      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
6613        args[_key3] = arguments[_key3];
6614      }
6615  
6616      _this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
6617      _this2.payload = {};
6618  
6619      _this2.attach = function () {
6620        return Object.values(_this2.payload).forEach(function (s) {
6621          return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
6622        });
6623      };
6624  
6625      _this2.detach = function () {
6626        return Object.values(_this2.payload).forEach(function (s) {
6627          return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
6628        });
6629      };
6630  
6631      return _this2;
6632    }
6633  
6634    var _proto2 = AnimatedObject.prototype;
6635  
6636    _proto2.getValue = function getValue(animated) {
6637      if (animated === void 0) {
6638        animated = false;
6639      }
6640  
6641      var payload = {};
6642  
6643      for (var _key4 in this.payload) {
6644        var value = this.payload[_key4];
6645        if (animated && !(value instanceof Animated)) continue;
6646        payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
6647      }
6648  
6649      return payload;
6650    };
6651  
6652    _proto2.getAnimatedValue = function getAnimatedValue() {
6653      return this.getValue(true);
6654    };
6655  
6656    return AnimatedObject;
6657  }(Animated);
6658  
6659  var applyAnimatedValues;
6660  function injectApplyAnimatedValues(fn, transform) {
6661    applyAnimatedValues = {
6662      fn: fn,
6663      transform: transform
6664    };
6665  }
6666  var colorNames;
6667  function injectColorNames(names) {
6668    colorNames = names;
6669  }
6670  var requestFrame = function requestFrame(cb) {
6671    return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
6672  };
6673  var cancelFrame = function cancelFrame(id) {
6674    typeof window !== 'undefined' && window.cancelAnimationFrame(id);
6675  };
6676  function injectFrame(raf, caf) {
6677    requestFrame = raf;
6678    cancelFrame = caf;
6679  }
6680  var interpolation;
6681  function injectStringInterpolator(fn) {
6682    interpolation = fn;
6683  }
6684  var now = function now() {
6685    return Date.now();
6686  };
6687  function injectNow(nowFn) {
6688    now = nowFn;
6689  }
6690  var defaultElement;
6691  function injectDefaultElement(el) {
6692    defaultElement = el;
6693  }
6694  var animatedApi = function animatedApi(node) {
6695    return node.current;
6696  };
6697  function injectAnimatedApi(fn) {
6698    animatedApi = fn;
6699  }
6700  var createAnimatedStyle;
6701  function injectCreateAnimatedStyle(factory) {
6702    createAnimatedStyle = factory;
6703  }
6704  var manualFrameloop;
6705  function injectManualFrameloop(callback) {
6706    manualFrameloop = callback;
6707  }
6708  
6709  var Globals = /*#__PURE__*/Object.freeze({
6710    get applyAnimatedValues () { return applyAnimatedValues; },
6711    injectApplyAnimatedValues: injectApplyAnimatedValues,
6712    get colorNames () { return colorNames; },
6713    injectColorNames: injectColorNames,
6714    get requestFrame () { return requestFrame; },
6715    get cancelFrame () { return cancelFrame; },
6716    injectFrame: injectFrame,
6717    get interpolation () { return interpolation; },
6718    injectStringInterpolator: injectStringInterpolator,
6719    get now () { return now; },
6720    injectNow: injectNow,
6721    get defaultElement () { return defaultElement; },
6722    injectDefaultElement: injectDefaultElement,
6723    get animatedApi () { return animatedApi; },
6724    injectAnimatedApi: injectAnimatedApi,
6725    get createAnimatedStyle () { return createAnimatedStyle; },
6726    injectCreateAnimatedStyle: injectCreateAnimatedStyle,
6727    get manualFrameloop () { return manualFrameloop; },
6728    injectManualFrameloop: injectManualFrameloop
6729  });
6730  
6731  /**
6732   * Wraps the `style` property with `AnimatedStyle`.
6733   */
6734  
6735  var AnimatedProps =
6736  /*#__PURE__*/
6737  function (_AnimatedObject) {
6738    _inheritsLoose(AnimatedProps, _AnimatedObject);
6739  
6740    function AnimatedProps(props, callback) {
6741      var _this;
6742  
6743      _this = _AnimatedObject.call(this) || this;
6744      _this.update = void 0;
6745      _this.payload = !props.style ? props : _extends({}, props, {
6746        style: createAnimatedStyle(props.style)
6747      });
6748      _this.update = callback;
6749  
6750      _this.attach();
6751  
6752      return _this;
6753    }
6754  
6755    return AnimatedProps;
6756  }(AnimatedObject);
6757  
6758  var isFunctionComponent = function isFunctionComponent(val) {
6759    return is.fun(val) && !(val.prototype instanceof React__default.Component);
6760  };
6761  
6762  var createAnimatedComponent = function createAnimatedComponent(Component) {
6763    var AnimatedComponent = React.forwardRef(function (props, ref) {
6764      var forceUpdate = useForceUpdate();
6765      var mounted = React.useRef(true);
6766      var propsAnimated = React.useRef(null);
6767      var node = React.useRef(null);
6768      var attachProps = React.useCallback(function (props) {
6769        var oldPropsAnimated = propsAnimated.current;
6770  
6771        var callback = function callback() {
6772          var didUpdate = false;
6773  
6774          if (node.current) {
6775            didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
6776          }
6777  
6778          if (!node.current || didUpdate === false) {
6779            // If no referenced node has been found, or the update target didn't have a
6780            // native-responder, then forceUpdate the animation ...
6781            forceUpdate();
6782          }
6783        };
6784  
6785        propsAnimated.current = new AnimatedProps(props, callback);
6786        oldPropsAnimated && oldPropsAnimated.detach();
6787      }, []);
6788      React.useEffect(function () {
6789        return function () {
6790          mounted.current = false;
6791          propsAnimated.current && propsAnimated.current.detach();
6792        };
6793      }, []);
6794      React.useImperativeHandle(ref, function () {
6795        return animatedApi(node, mounted, forceUpdate);
6796      });
6797      attachProps(props);
6798  
6799      var _getValue = propsAnimated.current.getValue(),
6800          scrollTop = _getValue.scrollTop,
6801          scrollLeft = _getValue.scrollLeft,
6802          animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
6803      // See: https://github.com/react-spring/react-spring/issues/569
6804  
6805  
6806      var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
6807        return node.current = handleRef(childRef, ref);
6808      };
6809      return React__default.createElement(Component, _extends({}, animatedProps, {
6810        ref: refFn
6811      }));
6812    });
6813    return AnimatedComponent;
6814  };
6815  
6816  var active = false;
6817  var controllers = new Set();
6818  
6819  var update = function update() {
6820    if (!active) return false;
6821    var time = now();
6822  
6823    for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
6824      var _ref;
6825  
6826      if (_isArray) {
6827        if (_i >= _iterator.length) break;
6828        _ref = _iterator[_i++];
6829      } else {
6830        _i = _iterator.next();
6831        if (_i.done) break;
6832        _ref = _i.value;
6833      }
6834  
6835      var controller = _ref;
6836      var isActive = false;
6837  
6838      for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
6839        var config = controller.configs[configIdx];
6840        var endOfAnimation = void 0,
6841            lastTime = void 0;
6842  
6843        for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
6844          var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
6845  
6846          if (animation.done) continue;
6847          var from = config.fromValues[valIdx];
6848          var to = config.toValues[valIdx];
6849          var position = animation.lastPosition;
6850          var isAnimated = to instanceof Animated;
6851          var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
6852          if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
6853  
6854          if (config.immediate) {
6855            animation.setValue(to);
6856            animation.done = true;
6857            continue;
6858          } // Break animation when string values are involved
6859  
6860  
6861          if (typeof from === 'string' || typeof to === 'string') {
6862            animation.setValue(to);
6863            animation.done = true;
6864            continue;
6865          }
6866  
6867          if (config.duration !== void 0) {
6868            /** Duration easing */
6869            position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
6870            endOfAnimation = time >= animation.startTime + config.duration;
6871          } else if (config.decay) {
6872            /** Decay easing */
6873            position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
6874            endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
6875            if (endOfAnimation) to = position;
6876          } else {
6877            /** Spring easing */
6878            lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
6879            velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
6880  
6881            if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
6882  
6883            var numSteps = Math.floor(time - lastTime);
6884  
6885            for (var i = 0; i < numSteps; ++i) {
6886              var force = -config.tension * (position - to);
6887              var damping = -config.friction * velocity;
6888              var acceleration = (force + damping) / config.mass;
6889              velocity = velocity + acceleration * 1 / 1000;
6890              position = position + velocity * 1 / 1000;
6891            } // Conditions for stopping the spring animation
6892  
6893  
6894            var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
6895            var isVelocity = Math.abs(velocity) <= config.precision;
6896            var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
6897            endOfAnimation = isOvershooting || isVelocity && isDisplacement;
6898            animation.lastVelocity = velocity;
6899            animation.lastTime = time;
6900          } // Trails aren't done until their parents conclude
6901  
6902  
6903          if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
6904  
6905          if (endOfAnimation) {
6906            // Ensure that we end up with a round value
6907            if (animation.value !== to) position = to;
6908            animation.done = true;
6909          } else isActive = true;
6910  
6911          animation.setValue(position);
6912          animation.lastPosition = position;
6913        } // Keep track of updated values only when necessary
6914  
6915  
6916        if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
6917      } // Update callbacks in the end of the frame
6918  
6919  
6920      if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
6921  
6922      if (!isActive) {
6923        controllers.delete(controller);
6924        controller.stop(true);
6925      }
6926    } // Loop over as long as there are controllers ...
6927  
6928  
6929    if (controllers.size) {
6930      if (manualFrameloop) manualFrameloop();else requestFrame(update);
6931    } else {
6932      active = false;
6933    }
6934  
6935    return active;
6936  };
6937  
6938  var start = function start(controller) {
6939    if (!controllers.has(controller)) controllers.add(controller);
6940  
6941    if (!active) {
6942      active = true;
6943      if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
6944    }
6945  };
6946  
6947  var stop = function stop(controller) {
6948    if (controllers.has(controller)) controllers.delete(controller);
6949  };
6950  
6951  function createInterpolator(range, output, extrapolate) {
6952    if (typeof range === 'function') {
6953      return range;
6954    }
6955  
6956    if (Array.isArray(range)) {
6957      return createInterpolator({
6958        range: range,
6959        output: output,
6960        extrapolate: extrapolate
6961      });
6962    }
6963  
6964    if (interpolation && typeof range.output[0] === 'string') {
6965      return interpolation(range);
6966    }
6967  
6968    var config = range;
6969    var outputRange = config.output;
6970    var inputRange = config.range || [0, 1];
6971    var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
6972    var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
6973  
6974    var easing = config.easing || function (t) {
6975      return t;
6976    };
6977  
6978    return function (input) {
6979      var range = findRange(input, inputRange);
6980      return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
6981    };
6982  }
6983  
6984  function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
6985    var result = map ? map(input) : input; // Extrapolate
6986  
6987    if (result < inputMin) {
6988      if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
6989    }
6990  
6991    if (result > inputMax) {
6992      if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
6993    }
6994  
6995    if (outputMin === outputMax) return outputMin;
6996    if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
6997  
6998    if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
6999  
7000    result = easing(result); // Output Range
7001  
7002    if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
7003    return result;
7004  }
7005  
7006  function findRange(input, inputRange) {
7007    for (var i = 1; i < inputRange.length - 1; ++i) {
7008      if (inputRange[i] >= input) break;
7009    }
7010  
7011    return i - 1;
7012  }
7013  
7014  var AnimatedInterpolation =
7015  /*#__PURE__*/
7016  function (_AnimatedArray) {
7017    _inheritsLoose(AnimatedInterpolation, _AnimatedArray);
7018  
7019    function AnimatedInterpolation(parents, range, output, extrapolate) {
7020      var _this;
7021  
7022      _this = _AnimatedArray.call(this) || this;
7023      _this.calc = void 0;
7024      _this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
7025      _this.calc = createInterpolator(range, output, extrapolate);
7026      return _this;
7027    }
7028  
7029    var _proto = AnimatedInterpolation.prototype;
7030  
7031    _proto.getValue = function getValue() {
7032      return this.calc.apply(this, this.payload.map(function (value) {
7033        return value.getValue();
7034      }));
7035    };
7036  
7037    _proto.updateConfig = function updateConfig(range, output, extrapolate) {
7038      this.calc = createInterpolator(range, output, extrapolate);
7039    };
7040  
7041    _proto.interpolate = function interpolate(range, output, extrapolate) {
7042      return new AnimatedInterpolation(this, range, output, extrapolate);
7043    };
7044  
7045    return AnimatedInterpolation;
7046  }(AnimatedArray);
7047  
7048  var interpolate$1 = function interpolate(parents, range, output) {
7049    return parents && new AnimatedInterpolation(parents, range, output);
7050  };
7051  
7052  var config = {
7053    default: {
7054      tension: 170,
7055      friction: 26
7056    },
7057    gentle: {
7058      tension: 120,
7059      friction: 14
7060    },
7061    wobbly: {
7062      tension: 180,
7063      friction: 12
7064    },
7065    stiff: {
7066      tension: 210,
7067      friction: 20
7068    },
7069    slow: {
7070      tension: 280,
7071      friction: 60
7072    },
7073    molasses: {
7074      tension: 280,
7075      friction: 120
7076    }
7077  };
7078  
7079  /** API
7080   *  useChain(references, timeSteps, timeFrame)
7081   */
7082  
7083  function useChain(refs, timeSteps, timeFrame) {
7084    if (timeFrame === void 0) {
7085      timeFrame = 1000;
7086    }
7087  
7088    var previous = React.useRef();
7089    React.useEffect(function () {
7090      if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
7091        var current = _ref.current;
7092        return current && current.start();
7093      });else if (timeSteps) {
7094        refs.forEach(function (_ref2, index) {
7095          var current = _ref2.current;
7096  
7097          if (current) {
7098            var ctrls = current.controllers;
7099  
7100            if (ctrls.length) {
7101              var t = timeFrame * timeSteps[index];
7102              ctrls.forEach(function (ctrl) {
7103                ctrl.queue = ctrl.queue.map(function (e) {
7104                  return _extends({}, e, {
7105                    delay: e.delay + t
7106                  });
7107                });
7108                ctrl.start();
7109              });
7110            }
7111          }
7112        });
7113      } else refs.reduce(function (q, _ref3, rI) {
7114        var current = _ref3.current;
7115        return q = q.then(function () {
7116          return current.start();
7117        });
7118      }, Promise.resolve());
7119      previous.current = refs;
7120    });
7121  }
7122  
7123  /**
7124   * Animated works by building a directed acyclic graph of dependencies
7125   * transparently when you render your Animated components.
7126   *
7127   *               new Animated.Value(0)
7128   *     .interpolate()        .interpolate()    new Animated.Value(1)
7129   *         opacity               translateY      scale
7130   *          style                         transform
7131   *         View#234                         style
7132   *                                         View#123
7133   *
7134   * A) Top Down phase
7135   * When an AnimatedValue is updated, we recursively go down through this
7136   * graph in order to find leaf nodes: the views that we flag as needing
7137   * an update.
7138   *
7139   * B) Bottom Up phase
7140   * When a view is flagged as needing an update, we recursively go back up
7141   * in order to build the new value that it needs. The reason why we need
7142   * this two-phases process is to deal with composite props such as
7143   * transform which can receive values from multiple parents.
7144   */
7145  function addAnimatedStyles(node, styles) {
7146    if ('update' in node) {
7147      styles.add(node);
7148    } else {
7149      node.getChildren().forEach(function (child) {
7150        return addAnimatedStyles(child, styles);
7151      });
7152    }
7153  }
7154  
7155  var AnimatedValue =
7156  /*#__PURE__*/
7157  function (_Animated) {
7158    _inheritsLoose(AnimatedValue, _Animated);
7159  
7160    function AnimatedValue(_value) {
7161      var _this;
7162  
7163      _this = _Animated.call(this) || this;
7164      _this.animatedStyles = new Set();
7165      _this.value = void 0;
7166      _this.startPosition = void 0;
7167      _this.lastPosition = void 0;
7168      _this.lastVelocity = void 0;
7169      _this.startTime = void 0;
7170      _this.lastTime = void 0;
7171      _this.done = false;
7172  
7173      _this.setValue = function (value, flush) {
7174        if (flush === void 0) {
7175          flush = true;
7176        }
7177  
7178        _this.value = value;
7179        if (flush) _this.flush();
7180      };
7181  
7182      _this.value = _value;
7183      _this.startPosition = _value;
7184      _this.lastPosition = _value;
7185      return _this;
7186    }
7187  
7188    var _proto = AnimatedValue.prototype;
7189  
7190    _proto.flush = function flush() {
7191      if (this.animatedStyles.size === 0) {
7192        addAnimatedStyles(this, this.animatedStyles);
7193      }
7194  
7195      this.animatedStyles.forEach(function (animatedStyle) {
7196        return animatedStyle.update();
7197      });
7198    };
7199  
7200    _proto.clearStyles = function clearStyles() {
7201      this.animatedStyles.clear();
7202    };
7203  
7204    _proto.getValue = function getValue() {
7205      return this.value;
7206    };
7207  
7208    _proto.interpolate = function interpolate(range, output, extrapolate) {
7209      return new AnimatedInterpolation(this, range, output, extrapolate);
7210    };
7211  
7212    return AnimatedValue;
7213  }(Animated);
7214  
7215  var AnimatedValueArray =
7216  /*#__PURE__*/
7217  function (_AnimatedArray) {
7218    _inheritsLoose(AnimatedValueArray, _AnimatedArray);
7219  
7220    function AnimatedValueArray(values) {
7221      var _this;
7222  
7223      _this = _AnimatedArray.call(this) || this;
7224      _this.payload = values.map(function (n) {
7225        return new AnimatedValue(n);
7226      });
7227      return _this;
7228    }
7229  
7230    var _proto = AnimatedValueArray.prototype;
7231  
7232    _proto.setValue = function setValue(value, flush) {
7233      var _this2 = this;
7234  
7235      if (flush === void 0) {
7236        flush = true;
7237      }
7238  
7239      if (Array.isArray(value)) {
7240        if (value.length === this.payload.length) {
7241          value.forEach(function (v, i) {
7242            return _this2.payload[i].setValue(v, flush);
7243          });
7244        }
7245      } else {
7246        this.payload.forEach(function (p) {
7247          return p.setValue(value, flush);
7248        });
7249      }
7250    };
7251  
7252    _proto.getValue = function getValue() {
7253      return this.payload.map(function (v) {
7254        return v.getValue();
7255      });
7256    };
7257  
7258    _proto.interpolate = function interpolate(range, output) {
7259      return new AnimatedInterpolation(this, range, output);
7260    };
7261  
7262    return AnimatedValueArray;
7263  }(AnimatedArray);
7264  
7265  var G = 0;
7266  
7267  var Controller =
7268  /*#__PURE__*/
7269  function () {
7270    function Controller() {
7271      var _this = this;
7272  
7273      this.id = void 0;
7274      this.idle = true;
7275      this.hasChanged = false;
7276      this.guid = 0;
7277      this.local = 0;
7278      this.props = {};
7279      this.merged = {};
7280      this.animations = {};
7281      this.interpolations = {};
7282      this.values = {};
7283      this.configs = [];
7284      this.listeners = [];
7285      this.queue = [];
7286      this.localQueue = void 0;
7287  
7288      this.getValues = function () {
7289        return _this.interpolations;
7290      };
7291  
7292      this.id = G++;
7293    }
7294    /** update(props)
7295     *  This function filters input props and creates an array of tasks which are executed in .start()
7296     *  Each task is allowed to carry a delay, which means it can execute asnychroneously */
7297  
7298  
7299    var _proto = Controller.prototype;
7300  
7301    _proto.update = function update$$1(args) {
7302      //this._id = n + this.id
7303      if (!args) return this; // Extract delay and the to-prop from props
7304  
7305      var _ref = interpolateTo(args),
7306          _ref$delay = _ref.delay,
7307          delay = _ref$delay === void 0 ? 0 : _ref$delay,
7308          to = _ref.to,
7309          props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]);
7310  
7311      if (is.arr(to) || is.fun(to)) {
7312        // If config is either a function or an array queue it up as is
7313        this.queue.push(_extends({}, props, {
7314          delay: delay,
7315          to: to
7316        }));
7317      } else if (to) {
7318        // Otherwise go through each key since it could be delayed individually
7319        var ops = {};
7320        Object.entries(to).forEach(function (_ref2) {
7321          var _to;
7322  
7323          var k = _ref2[0],
7324              v = _ref2[1];
7325  
7326          // Fetch delay and create an entry, consisting of the to-props, the delay, and basic props
7327          var entry = _extends({
7328            to: (_to = {}, _to[k] = v, _to),
7329            delay: callProp(delay, k)
7330          }, props);
7331  
7332          var previous = ops[entry.delay] && ops[entry.delay].to;
7333          ops[entry.delay] = _extends({}, ops[entry.delay], entry, {
7334            to: _extends({}, previous, entry.to)
7335          });
7336        });
7337        this.queue = Object.values(ops);
7338      } // Sort queue, so that async calls go last
7339  
7340  
7341      this.queue = this.queue.sort(function (a, b) {
7342        return a.delay - b.delay;
7343      }); // Diff the reduced props immediately (they'll contain the from-prop and some config)
7344  
7345      this.diff(props);
7346      return this;
7347    }
7348    /** start(onEnd)
7349     *  This function either executes a queue, if present, or starts the frameloop, which animates */
7350    ;
7351  
7352    _proto.start = function start$$1(onEnd) {
7353      var _this2 = this;
7354  
7355      // If a queue is present we must excecute it
7356      if (this.queue.length) {
7357        this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values
7358  
7359        if (this.localQueue) {
7360          this.localQueue.forEach(function (_ref3) {
7361            var _ref3$from = _ref3.from,
7362                from = _ref3$from === void 0 ? {} : _ref3$from,
7363                _ref3$to = _ref3.to,
7364                to = _ref3$to === void 0 ? {} : _ref3$to;
7365            if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
7366            if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
7367          });
7368        } // The guid helps us tracking frames, a new queue over an old one means an override
7369        // We discard async calls in that caseÍ
7370  
7371  
7372        var local = this.local = ++this.guid;
7373        var queue = this.localQueue = this.queue;
7374        this.queue = []; // Go through each entry and execute it
7375  
7376        queue.forEach(function (_ref4, index) {
7377          var delay = _ref4.delay,
7378              props = _objectWithoutPropertiesLoose(_ref4, ["delay"]);
7379  
7380          var cb = function cb(finished) {
7381            if (index === queue.length - 1 && local === _this2.guid && finished) {
7382              _this2.idle = true;
7383              if (_this2.props.onRest) _this2.props.onRest(_this2.merged);
7384            }
7385  
7386            if (onEnd) onEnd();
7387          }; // Entries can be delayed, ansyc or immediate
7388  
7389  
7390          var async = is.arr(props.to) || is.fun(props.to);
7391  
7392          if (delay) {
7393            setTimeout(function () {
7394              if (local === _this2.guid) {
7395                if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
7396              }
7397            }, delay);
7398          } else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
7399        });
7400      } // Otherwise we kick of the frameloop
7401      else {
7402          if (is.fun(onEnd)) this.listeners.push(onEnd);
7403          if (this.props.onStart) this.props.onStart();
7404  
7405          start(this);
7406        }
7407  
7408      return this;
7409    };
7410  
7411    _proto.stop = function stop$$1(finished) {
7412      this.listeners.forEach(function (onEnd) {
7413        return onEnd(finished);
7414      });
7415      this.listeners = [];
7416      return this;
7417    }
7418    /** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
7419    ;
7420  
7421    _proto.pause = function pause(finished) {
7422      this.stop(true);
7423      if (finished) stop(this);
7424      return this;
7425    };
7426  
7427    _proto.runAsync = function runAsync(_ref5, onEnd) {
7428      var _this3 = this;
7429  
7430      var delay = _ref5.delay,
7431          props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
7432  
7433      var local = this.local; // If "to" is either a function or an array it will be processed async, therefor "to" should be empty right now
7434      // If the view relies on certain values "from" has to be present
7435  
7436      var queue = Promise.resolve(undefined);
7437  
7438      if (is.arr(props.to)) {
7439        var _loop = function _loop(i) {
7440          var index = i;
7441  
7442          var fresh = _extends({}, props, interpolateTo(props.to[index]));
7443  
7444          if (is.arr(fresh.config)) fresh.config = fresh.config[index];
7445          queue = queue.then(function () {
7446            //this.stop()
7447            if (local === _this3.guid) return new Promise(function (r) {
7448              return _this3.diff(fresh).start(r);
7449            });
7450          });
7451        };
7452  
7453        for (var i = 0; i < props.to.length; i++) {
7454          _loop(i);
7455        }
7456      } else if (is.fun(props.to)) {
7457        var index = 0;
7458        var last;
7459        queue = queue.then(function () {
7460          return props.to( // next(props)
7461          function (p) {
7462            var fresh = _extends({}, props, interpolateTo(p));
7463  
7464            if (is.arr(fresh.config)) fresh.config = fresh.config[index];
7465            index++; //this.stop()
7466  
7467            if (local === _this3.guid) return last = new Promise(function (r) {
7468              return _this3.diff(fresh).start(r);
7469            });
7470            return;
7471          }, // cancel()
7472          function (finished) {
7473            if (finished === void 0) {
7474              finished = true;
7475            }
7476  
7477            return _this3.stop(finished);
7478          }).then(function () {
7479            return last;
7480          });
7481        });
7482      }
7483  
7484      queue.then(onEnd);
7485    };
7486  
7487    _proto.diff = function diff(props) {
7488      var _this4 = this;
7489  
7490      this.props = _extends({}, this.props, props);
7491      var _this$props = this.props,
7492          _this$props$from = _this$props.from,
7493          from = _this$props$from === void 0 ? {} : _this$props$from,
7494          _this$props$to = _this$props.to,
7495          to = _this$props$to === void 0 ? {} : _this$props$to,
7496          _this$props$config = _this$props.config,
7497          config = _this$props$config === void 0 ? {} : _this$props$config,
7498          reverse = _this$props.reverse,
7499          attach = _this$props.attach,
7500          reset = _this$props.reset,
7501          immediate = _this$props.immediate; // Reverse values when requested
7502  
7503      if (reverse) {
7504        var _ref6 = [to, from];
7505        from = _ref6[0];
7506        to = _ref6[1];
7507      } // This will collect all props that were ever set, reset merged props when necessary
7508  
7509  
7510      this.merged = _extends({}, from, this.merged, to);
7511      this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
7512  
7513      var target = attach && attach(this); // Reduces input { name: value } pairs into animated values
7514  
7515      this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) {
7516        var name = _ref7[0],
7517            value = _ref7[1];
7518        // Issue cached entries, except on reset
7519        var entry = acc[name] || {}; // Figure out what the value is supposed to be
7520  
7521        var isNumber = is.num(value);
7522        var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value];
7523        var isArray = is.arr(value);
7524        var isInterpolation = !isNumber && !isArray && !isString;
7525        var fromValue = !is.und(from[name]) ? from[name] : value;
7526        var toValue = isNumber || isArray ? value : isString ? value : 1;
7527        var toConfig = callProp(config, name);
7528        if (target) toValue = target.animations[name].parent;
7529        var parent = entry.parent,
7530            interpolation$$1 = entry.interpolation,
7531            toValues = toArray(target ? toValue.getPayload() : toValue),
7532            animatedValues;
7533        var newValue = value;
7534        if (isInterpolation) newValue = interpolation({
7535          range: [0, 1],
7536          output: [value, value]
7537        })(1);
7538        var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
7539  
7540        var isFirst = is.und(parent);
7541        var isActive = !isFirst && entry.animatedValues.some(function (v) {
7542          return !v.done;
7543        });
7544        var currentValueDiffersFromGoal = !is.equ(newValue, currentValue);
7545        var hasNewGoal = !is.equ(newValue, entry.previous);
7546        var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one)
7547        // and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?)
7548  
7549        if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) {
7550          var _extends2;
7551  
7552          // Convert regular values into animated values, ALWAYS re-use if possible
7553          if (isNumber || isString) parent = interpolation$$1 = entry.parent || new AnimatedValue(fromValue);else if (isArray) parent = interpolation$$1 = entry.parent || new AnimatedValueArray(fromValue);else if (isInterpolation) {
7554            var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value);
7555            prev = prev !== void 0 && !reset ? prev : fromValue;
7556  
7557            if (entry.parent) {
7558              parent = entry.parent;
7559              parent.setValue(0, false);
7560            } else parent = new AnimatedValue(0);
7561  
7562            var range = {
7563              output: [prev, value]
7564            };
7565  
7566            if (entry.interpolation) {
7567              interpolation$$1 = entry.interpolation;
7568              entry.interpolation.updateConfig(range);
7569            } else interpolation$$1 = parent.interpolate(range);
7570          }
7571          toValues = toArray(target ? toValue.getPayload() : toValue);
7572          animatedValues = toArray(parent.getPayload());
7573          if (reset && !isInterpolation) parent.setValue(fromValue, false);
7574          _this4.hasChanged = true; // Reset animated values
7575  
7576          animatedValues.forEach(function (value) {
7577            value.startPosition = value.value;
7578            value.lastPosition = value.value;
7579            value.lastVelocity = isActive ? value.lastVelocity : undefined;
7580            value.lastTime = isActive ? value.lastTime : undefined;
7581            value.startTime = now();
7582            value.done = false;
7583            value.animatedStyles.clear();
7584          }); // Set immediate values
7585  
7586          if (callProp(immediate, name)) {
7587            parent.setValue(isInterpolation ? toValue : value, false);
7588          }
7589  
7590          return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, {
7591            name: name,
7592            parent: parent,
7593            interpolation: interpolation$$1,
7594            animatedValues: animatedValues,
7595            toValues: toValues,
7596            previous: newValue,
7597            config: toConfig,
7598            fromValues: toArray(parent.getValue()),
7599            immediate: callProp(immediate, name),
7600            initialVelocity: withDefault(toConfig.velocity, 0),
7601            clamp: withDefault(toConfig.clamp, false),
7602            precision: withDefault(toConfig.precision, 0.01),
7603            tension: withDefault(toConfig.tension, 170),
7604            friction: withDefault(toConfig.friction, 26),
7605            mass: withDefault(toConfig.mass, 1),
7606            duration: toConfig.duration,
7607            easing: withDefault(toConfig.easing, function (t) {
7608              return t;
7609            }),
7610            decay: toConfig.decay
7611          }), _extends2));
7612        } else {
7613          if (!currentValueDiffersFromGoal) {
7614            var _extends3;
7615  
7616            // So ... the current target value (newValue) appears to be different from the previous value,
7617            // which normally constitutes an update, but the actual value (currentValue) matches the target!
7618            // In order to resolve this without causing an animation update we silently flag the animation as done,
7619            // which it technically is. Interpolations also needs a config update with their target set to 1.
7620            if (isInterpolation) {
7621              parent.setValue(1, false);
7622              interpolation$$1.updateConfig({
7623                output: [newValue, newValue]
7624              });
7625            }
7626  
7627            parent.done = true;
7628            _this4.hasChanged = true;
7629            return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
7630              previous: newValue
7631            }), _extends3));
7632          }
7633  
7634          return acc;
7635        }
7636      }, this.animations);
7637  
7638      if (this.hasChanged) {
7639        // Make animations available to frameloop
7640        this.configs = Object.values(this.animations);
7641        this.values = {};
7642        this.interpolations = {};
7643  
7644        for (var key in this.animations) {
7645          this.interpolations[key] = this.animations[key].interpolation;
7646          this.values[key] = this.animations[key].interpolation.getValue();
7647        }
7648      }
7649  
7650      return this;
7651    };
7652  
7653    _proto.destroy = function destroy() {
7654      this.stop();
7655      this.props = {};
7656      this.merged = {};
7657      this.animations = {};
7658      this.interpolations = {};
7659      this.values = {};
7660      this.configs = [];
7661      this.local = 0;
7662    };
7663  
7664    return Controller;
7665  }();
7666  
7667  /** API
7668   * const props = useSprings(number, [{ ... }, { ... }, ...])
7669   * const [props, set] = useSprings(number, (i, controller) => ({ ... }))
7670   */
7671  
7672  var useSprings = function useSprings(length, props) {
7673    var mounted = React.useRef(false);
7674    var ctrl = React.useRef();
7675    var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
7676  
7677    var _useMemo = React.useMemo(function () {
7678      // Remove old controllers
7679      if (ctrl.current) {
7680        ctrl.current.map(function (c) {
7681          return c.destroy();
7682        });
7683        ctrl.current = undefined;
7684      }
7685  
7686      var ref;
7687      return [new Array(length).fill().map(function (_, i) {
7688        var ctrl = new Controller();
7689        var newProps = isFn ? callProp(props, i, ctrl) : props[i];
7690        if (i === 0) ref = newProps.ref;
7691        ctrl.update(newProps);
7692        if (!ref) ctrl.start();
7693        return ctrl;
7694      }), ref];
7695    }, [length]),
7696        controllers = _useMemo[0],
7697        ref = _useMemo[1];
7698  
7699    ctrl.current = controllers; // The hooks reference api gets defined here ...
7700  
7701    var api = React.useImperativeHandle(ref, function () {
7702      return {
7703        start: function start() {
7704          return Promise.all(ctrl.current.map(function (c) {
7705            return new Promise(function (r) {
7706              return c.start(r);
7707            });
7708          }));
7709        },
7710        stop: function stop(finished) {
7711          return ctrl.current.forEach(function (c) {
7712            return c.stop(finished);
7713          });
7714        },
7715  
7716        get controllers() {
7717          return ctrl.current;
7718        }
7719  
7720      };
7721    }); // This function updates the controllers
7722  
7723    var updateCtrl = React.useMemo(function () {
7724      return function (updateProps) {
7725        return ctrl.current.map(function (c, i) {
7726          c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
7727          if (!ref) c.start();
7728        });
7729      };
7730    }, [length]); // Update controller if props aren't functional
7731  
7732    React.useEffect(function () {
7733      if (mounted.current) {
7734        if (!isFn) updateCtrl(props);
7735      } else if (!ref) ctrl.current.forEach(function (c) {
7736        return c.start();
7737      });
7738    }); // Update mounted flag and destroy controller on unmount
7739  
7740    React.useEffect(function () {
7741      return mounted.current = true, function () {
7742        return ctrl.current.forEach(function (c) {
7743          return c.destroy();
7744        });
7745      };
7746    }, []); // Return animated props, or, anim-props + the update-setter above
7747  
7748    var propValues = ctrl.current.map(function (c) {
7749      return c.getValues();
7750    });
7751    return isFn ? [propValues, updateCtrl, function (finished) {
7752      return ctrl.current.forEach(function (c) {
7753        return c.pause(finished);
7754      });
7755    }] : propValues;
7756  };
7757  
7758  /** API
7759   * const props = useSpring({ ... })
7760   * const [props, set] = useSpring(() => ({ ... }))
7761   */
7762  
7763  var useSpring = function useSpring(props) {
7764    var isFn = is.fun(props);
7765  
7766    var _useSprings = useSprings(1, isFn ? props : [props]),
7767        result = _useSprings[0],
7768        set = _useSprings[1],
7769        pause = _useSprings[2];
7770  
7771    return isFn ? [result[0], set, pause] : result;
7772  };
7773  
7774  /** API
7775   * const trails = useTrail(number, { ... })
7776   * const [trails, set] = useTrail(number, () => ({ ... }))
7777   */
7778  
7779  var useTrail = function useTrail(length, props) {
7780    var mounted = React.useRef(false);
7781    var isFn = is.fun(props);
7782    var updateProps = callProp(props);
7783    var instances = React.useRef();
7784  
7785    var _useSprings = useSprings(length, function (i, ctrl) {
7786      if (i === 0) instances.current = [];
7787      instances.current.push(ctrl);
7788      return _extends({}, updateProps, {
7789        config: callProp(updateProps.config, i),
7790        attach: i > 0 && function () {
7791          return instances.current[i - 1];
7792        }
7793      });
7794    }),
7795        result = _useSprings[0],
7796        set = _useSprings[1],
7797        pause = _useSprings[2]; // Set up function to update controller
7798  
7799  
7800    var updateCtrl = React.useMemo(function () {
7801      return function (props) {
7802        return set(function (i, ctrl) {
7803          var last = props.reverse ? i === 0 : length - 1 === i;
7804          var attachIdx = props.reverse ? i + 1 : i - 1;
7805          var attachController = instances.current[attachIdx];
7806          return _extends({}, props, {
7807            config: callProp(props.config || updateProps.config, i),
7808            attach: attachController && function () {
7809              return attachController;
7810            }
7811          });
7812        });
7813      };
7814    }, [length, updateProps.reverse]); // Update controller if props aren't functional
7815  
7816    React.useEffect(function () {
7817      return void (mounted.current && !isFn && updateCtrl(props));
7818    }); // Update mounted flag and destroy controller on unmount
7819  
7820    React.useEffect(function () {
7821      return void (mounted.current = true);
7822    }, []);
7823    return isFn ? [result, updateCtrl, pause] : result;
7824  };
7825  
7826  /** API
7827   * const transitions = useTransition(items, itemKeys, { ... })
7828   * const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
7829   */
7830  
7831  var guid = 0;
7832  var ENTER = 'enter';
7833  var LEAVE = 'leave';
7834  var UPDATE = 'update';
7835  
7836  var mapKeys = function mapKeys(items, keys) {
7837    return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
7838  };
7839  
7840  var get = function get(props) {
7841    var items = props.items,
7842        _props$keys = props.keys,
7843        keys = _props$keys === void 0 ? function (item) {
7844      return item;
7845    } : _props$keys,
7846        rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
7847  
7848    items = toArray(items !== void 0 ? items : null);
7849    return _extends({
7850      items: items,
7851      keys: mapKeys(items, keys)
7852    }, rest);
7853  };
7854  
7855  function useTransition(input, keyTransform, config) {
7856    var props = _extends({
7857      items: input,
7858      keys: keyTransform || function (i) {
7859        return i;
7860      }
7861    }, config);
7862  
7863    var _get = get(props),
7864        _get$lazy = _get.lazy,
7865        lazy = _get$lazy === void 0 ? false : _get$lazy,
7866        _get$unique = _get.unique,
7867        _get$reset = _get.reset,
7868        reset = _get$reset === void 0 ? false : _get$reset,
7869        enter = _get.enter,
7870        leave = _get.leave,
7871        update = _get.update,
7872        onDestroyed = _get.onDestroyed,
7873        keys = _get.keys,
7874        items = _get.items,
7875        onFrame = _get.onFrame,
7876        _onRest = _get.onRest,
7877        onStart = _get.onStart,
7878        ref = _get.ref,
7879        extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
7880  
7881    var forceUpdate = useForceUpdate();
7882    var mounted = React.useRef(false);
7883    var state = React.useRef({
7884      mounted: false,
7885      first: true,
7886      deleted: [],
7887      current: {},
7888      transitions: [],
7889      prevProps: {},
7890      paused: !!props.ref,
7891      instances: !mounted.current && new Map(),
7892      forceUpdate: forceUpdate
7893    });
7894    React.useImperativeHandle(props.ref, function () {
7895      return {
7896        start: function start() {
7897          return Promise.all(Array.from(state.current.instances).map(function (_ref) {
7898            var c = _ref[1];
7899            return new Promise(function (r) {
7900              return c.start(r);
7901            });
7902          }));
7903        },
7904        stop: function stop(finished) {
7905          return Array.from(state.current.instances).forEach(function (_ref2) {
7906            var c = _ref2[1];
7907            return c.stop(finished);
7908          });
7909        },
7910  
7911        get controllers() {
7912          return Array.from(state.current.instances).map(function (_ref3) {
7913            var c = _ref3[1];
7914            return c;
7915          });
7916        }
7917  
7918      };
7919    }); // Update state
7920  
7921    state.current = diffItems(state.current, props);
7922  
7923    if (state.current.changed) {
7924      // Update state
7925      state.current.transitions.forEach(function (transition) {
7926        var slot = transition.slot,
7927            from = transition.from,
7928            to = transition.to,
7929            config = transition.config,
7930            trail = transition.trail,
7931            key = transition.key,
7932            item = transition.item;
7933        if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object
7934  
7935        var ctrl = state.current.instances.get(key);
7936  
7937        var newProps = _extends({}, extra, {
7938          to: to,
7939          from: from,
7940          config: config,
7941          ref: ref,
7942          onRest: function onRest(values) {
7943            if (state.current.mounted) {
7944              if (transition.destroyed) {
7945                // If no ref is given delete destroyed items immediately
7946                if (!ref && !lazy) cleanUp(state, key);
7947                if (onDestroyed) onDestroyed(item);
7948              } // A transition comes to rest once all its springs conclude
7949  
7950  
7951              var curInstances = Array.from(state.current.instances);
7952              var active = curInstances.some(function (_ref4) {
7953                var c = _ref4[1];
7954                return !c.idle;
7955              });
7956              if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state);
7957              if (_onRest) _onRest(item, slot, values);
7958            }
7959          },
7960          onStart: onStart && function () {
7961            return onStart(item, slot);
7962          },
7963          onFrame: onFrame && function (values) {
7964            return onFrame(item, slot, values);
7965          },
7966          delay: trail,
7967          reset: reset && slot === ENTER // Update controller
7968  
7969        });
7970  
7971        ctrl.update(newProps);
7972        if (!state.current.paused) ctrl.start();
7973      });
7974    }
7975  
7976    React.useEffect(function () {
7977      state.current.mounted = mounted.current = true;
7978      return function () {
7979        state.current.mounted = mounted.current = false;
7980        Array.from(state.current.instances).map(function (_ref5) {
7981          var c = _ref5[1];
7982          return c.destroy();
7983        });
7984        state.current.instances.clear();
7985      };
7986    }, []);
7987    return state.current.transitions.map(function (_ref6) {
7988      var item = _ref6.item,
7989          slot = _ref6.slot,
7990          key = _ref6.key;
7991      return {
7992        item: item,
7993        key: key,
7994        state: slot,
7995        props: state.current.instances.get(key).getValues()
7996      };
7997    });
7998  }
7999  
8000  function cleanUp(state, filterKey) {
8001    var deleted = state.current.deleted;
8002  
8003    var _loop = function _loop() {
8004      if (_isArray) {
8005        if (_i >= _iterator.length) return "break";
8006        _ref8 = _iterator[_i++];
8007      } else {
8008        _i = _iterator.next();
8009        if (_i.done) return "break";
8010        _ref8 = _i.value;
8011      }
8012  
8013      var _ref7 = _ref8;
8014      var key = _ref7.key;
8015  
8016      var filter = function filter(t) {
8017        return t.key !== key;
8018      };
8019  
8020      if (is.und(filterKey) || filterKey === key) {
8021        state.current.instances.delete(key);
8022        state.current.transitions = state.current.transitions.filter(filter);
8023        state.current.deleted = state.current.deleted.filter(filter);
8024      }
8025    };
8026  
8027    for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
8028      var _ref8;
8029  
8030      var _ret = _loop();
8031  
8032      if (_ret === "break") break;
8033    }
8034  
8035    state.current.forceUpdate();
8036  }
8037  
8038  function diffItems(_ref9, props) {
8039    var first = _ref9.first,
8040        prevProps = _ref9.prevProps,
8041        state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]);
8042  
8043    var _get2 = get(props),
8044        items = _get2.items,
8045        keys = _get2.keys,
8046        initial = _get2.initial,
8047        from = _get2.from,
8048        enter = _get2.enter,
8049        leave = _get2.leave,
8050        update = _get2.update,
8051        _get2$trail = _get2.trail,
8052        trail = _get2$trail === void 0 ? 0 : _get2$trail,
8053        unique = _get2.unique,
8054        config = _get2.config,
8055        _get2$order = _get2.order,
8056        order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order;
8057  
8058    var _get3 = get(prevProps),
8059        _keys = _get3.keys,
8060        _items = _get3.items;
8061  
8062    var current = _extends({}, state.current);
8063  
8064    var deleted = [].concat(state.deleted); // Compare next keys with current keys
8065  
8066    var currentKeys = Object.keys(current);
8067    var currentSet = new Set(currentKeys);
8068    var nextSet = new Set(keys);
8069    var added = keys.filter(function (item) {
8070      return !currentSet.has(item);
8071    });
8072    var removed = state.transitions.filter(function (item) {
8073      return !item.destroyed && !nextSet.has(item.originalKey);
8074    }).map(function (i) {
8075      return i.originalKey;
8076    });
8077    var updated = keys.filter(function (item) {
8078      return currentSet.has(item);
8079    });
8080    var delay = -trail;
8081  
8082    while (order.length) {
8083      var changeType = order.shift();
8084  
8085      switch (changeType) {
8086        case ENTER:
8087          {
8088            added.forEach(function (key, index) {
8089              // In unique mode, remove fading out transitions if their key comes in again
8090              if (unique && deleted.find(function (d) {
8091                return d.originalKey === key;
8092              })) deleted = deleted.filter(function (t) {
8093                return t.originalKey !== key;
8094              });
8095              var keyIndex = keys.indexOf(key);
8096              var item = items[keyIndex];
8097              var slot = first && initial !== void 0 ? 'initial' : ENTER;
8098              current[key] = {
8099                slot: slot,
8100                originalKey: key,
8101                key: unique ? String(key) : guid++,
8102                item: item,
8103                trail: delay = delay + trail,
8104                config: callProp(config, item, slot),
8105                from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item),
8106                to: callProp(enter, item)
8107              };
8108            });
8109            break;
8110          }
8111  
8112        case LEAVE:
8113          {
8114            removed.forEach(function (key) {
8115              var keyIndex = _keys.indexOf(key);
8116  
8117              var item = _items[keyIndex];
8118              var slot = LEAVE;
8119              deleted.unshift(_extends({}, current[key], {
8120                slot: slot,
8121                destroyed: true,
8122                left: _keys[Math.max(0, keyIndex - 1)],
8123                right: _keys[Math.min(_keys.length, keyIndex + 1)],
8124                trail: delay = delay + trail,
8125                config: callProp(config, item, slot),
8126                to: callProp(leave, item)
8127              }));
8128              delete current[key];
8129            });
8130            break;
8131          }
8132  
8133        case UPDATE:
8134          {
8135            updated.forEach(function (key) {
8136              var keyIndex = keys.indexOf(key);
8137              var item = items[keyIndex];
8138              var slot = UPDATE;
8139              current[key] = _extends({}, current[key], {
8140                item: item,
8141                slot: slot,
8142                trail: delay = delay + trail,
8143                config: callProp(config, item, slot),
8144                to: callProp(update, item)
8145              });
8146            });
8147            break;
8148          }
8149      }
8150    }
8151  
8152    var out = keys.map(function (key) {
8153      return current[key];
8154    }); // This tries to restore order for deleted items by finding their last known siblings
8155    // only using the left sibling to keep order placement consistent for all deleted items
8156  
8157    deleted.forEach(function (_ref10) {
8158      var left = _ref10.left,
8159          right = _ref10.right,
8160          item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]);
8161  
8162      var pos; // Was it the element on the left, if yes, move there ...
8163  
8164      if ((pos = out.findIndex(function (t) {
8165        return t.originalKey === left;
8166      })) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯
8167  
8168      pos = Math.max(0, pos);
8169      out = [].concat(out.slice(0, pos), [item], out.slice(pos));
8170    });
8171    return _extends({}, state, {
8172      changed: added.length || removed.length || updated.length,
8173      first: first && added.length === 0,
8174      transitions: out,
8175      current: current,
8176      deleted: deleted,
8177      prevProps: props
8178    });
8179  }
8180  
8181  var AnimatedStyle =
8182  /*#__PURE__*/
8183  function (_AnimatedObject) {
8184    _inheritsLoose(AnimatedStyle, _AnimatedObject);
8185  
8186    function AnimatedStyle(style) {
8187      var _this;
8188  
8189      if (style === void 0) {
8190        style = {};
8191      }
8192  
8193      _this = _AnimatedObject.call(this) || this;
8194  
8195      if (style.transform && !(style.transform instanceof Animated)) {
8196        style = applyAnimatedValues.transform(style);
8197      }
8198  
8199      _this.payload = style;
8200      return _this;
8201    }
8202  
8203    return AnimatedStyle;
8204  }(AnimatedObject);
8205  
8206  // http://www.w3.org/TR/css3-color/#svg-color
8207  var colors = {
8208    transparent: 0x00000000,
8209    aliceblue: 0xf0f8ffff,
8210    antiquewhite: 0xfaebd7ff,
8211    aqua: 0x00ffffff,
8212    aquamarine: 0x7fffd4ff,
8213    azure: 0xf0ffffff,
8214    beige: 0xf5f5dcff,
8215    bisque: 0xffe4c4ff,
8216    black: 0x000000ff,
8217    blanchedalmond: 0xffebcdff,
8218    blue: 0x0000ffff,
8219    blueviolet: 0x8a2be2ff,
8220    brown: 0xa52a2aff,
8221    burlywood: 0xdeb887ff,
8222    burntsienna: 0xea7e5dff,
8223    cadetblue: 0x5f9ea0ff,
8224    chartreuse: 0x7fff00ff,
8225    chocolate: 0xd2691eff,
8226    coral: 0xff7f50ff,
8227    cornflowerblue: 0x6495edff,
8228    cornsilk: 0xfff8dcff,
8229    crimson: 0xdc143cff,
8230    cyan: 0x00ffffff,
8231    darkblue: 0x00008bff,
8232    darkcyan: 0x008b8bff,
8233    darkgoldenrod: 0xb8860bff,
8234    darkgray: 0xa9a9a9ff,
8235    darkgreen: 0x006400ff,
8236    darkgrey: 0xa9a9a9ff,
8237    darkkhaki: 0xbdb76bff,
8238    darkmagenta: 0x8b008bff,
8239    darkolivegreen: 0x556b2fff,
8240    darkorange: 0xff8c00ff,
8241    darkorchid: 0x9932ccff,
8242    darkred: 0x8b0000ff,
8243    darksalmon: 0xe9967aff,
8244    darkseagreen: 0x8fbc8fff,
8245    darkslateblue: 0x483d8bff,
8246    darkslategray: 0x2f4f4fff,
8247    darkslategrey: 0x2f4f4fff,
8248    darkturquoise: 0x00ced1ff,
8249    darkviolet: 0x9400d3ff,
8250    deeppink: 0xff1493ff,
8251    deepskyblue: 0x00bfffff,
8252    dimgray: 0x696969ff,
8253    dimgrey: 0x696969ff,
8254    dodgerblue: 0x1e90ffff,
8255    firebrick: 0xb22222ff,
8256    floralwhite: 0xfffaf0ff,
8257    forestgreen: 0x228b22ff,
8258    fuchsia: 0xff00ffff,
8259    gainsboro: 0xdcdcdcff,
8260    ghostwhite: 0xf8f8ffff,
8261    gold: 0xffd700ff,
8262    goldenrod: 0xdaa520ff,
8263    gray: 0x808080ff,
8264    green: 0x008000ff,
8265    greenyellow: 0xadff2fff,
8266    grey: 0x808080ff,
8267    honeydew: 0xf0fff0ff,
8268    hotpink: 0xff69b4ff,
8269    indianred: 0xcd5c5cff,
8270    indigo: 0x4b0082ff,
8271    ivory: 0xfffff0ff,
8272    khaki: 0xf0e68cff,
8273    lavender: 0xe6e6faff,
8274    lavenderblush: 0xfff0f5ff,
8275    lawngreen: 0x7cfc00ff,
8276    lemonchiffon: 0xfffacdff,
8277    lightblue: 0xadd8e6ff,
8278    lightcoral: 0xf08080ff,
8279    lightcyan: 0xe0ffffff,
8280    lightgoldenrodyellow: 0xfafad2ff,
8281    lightgray: 0xd3d3d3ff,
8282    lightgreen: 0x90ee90ff,
8283    lightgrey: 0xd3d3d3ff,
8284    lightpink: 0xffb6c1ff,
8285    lightsalmon: 0xffa07aff,
8286    lightseagreen: 0x20b2aaff,
8287    lightskyblue: 0x87cefaff,
8288    lightslategray: 0x778899ff,
8289    lightslategrey: 0x778899ff,
8290    lightsteelblue: 0xb0c4deff,
8291    lightyellow: 0xffffe0ff,
8292    lime: 0x00ff00ff,
8293    limegreen: 0x32cd32ff,
8294    linen: 0xfaf0e6ff,
8295    magenta: 0xff00ffff,
8296