balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

nux.js (24517B)


      1 this["wp"] = this["wp"] || {}; this["wp"]["nux"] =
      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 = "51Wn");
     86 /******/ })
     87 /************************************************************************/
     88 /******/ ({
     89 
     90 /***/ "1ZqX":
     91 /***/ (function(module, exports) {
     92 
     93 (function() { module.exports = window["wp"]["data"]; }());
     94 
     95 /***/ }),
     96 
     97 /***/ "51Wn":
     98 /***/ (function(module, __webpack_exports__, __webpack_require__) {
     99 
    100 "use strict";
    101 // ESM COMPAT FLAG
    102 __webpack_require__.r(__webpack_exports__);
    103 
    104 // EXPORTS
    105 __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
    106 __webpack_require__.d(__webpack_exports__, "DotTip", function() { return /* reexport */ dot_tip; });
    107 
    108 // NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/actions.js
    109 var actions_namespaceObject = {};
    110 __webpack_require__.r(actions_namespaceObject);
    111 __webpack_require__.d(actions_namespaceObject, "triggerGuide", function() { return triggerGuide; });
    112 __webpack_require__.d(actions_namespaceObject, "dismissTip", function() { return dismissTip; });
    113 __webpack_require__.d(actions_namespaceObject, "disableTips", function() { return disableTips; });
    114 __webpack_require__.d(actions_namespaceObject, "enableTips", function() { return enableTips; });
    115 
    116 // NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/selectors.js
    117 var selectors_namespaceObject = {};
    118 __webpack_require__.r(selectors_namespaceObject);
    119 __webpack_require__.d(selectors_namespaceObject, "getAssociatedGuide", function() { return getAssociatedGuide; });
    120 __webpack_require__.d(selectors_namespaceObject, "isTipVisible", function() { return isTipVisible; });
    121 __webpack_require__.d(selectors_namespaceObject, "areTipsEnabled", function() { return selectors_areTipsEnabled; });
    122 
    123 // EXTERNAL MODULE: external ["wp","deprecated"]
    124 var external_wp_deprecated_ = __webpack_require__("NMb1");
    125 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
    126 
    127 // EXTERNAL MODULE: external ["wp","data"]
    128 var external_wp_data_ = __webpack_require__("1ZqX");
    129 
    130 // CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/reducer.js
    131 /**
    132  * WordPress dependencies
    133  */
    134 
    135 /**
    136  * Reducer that tracks which tips are in a guide. Each guide is represented by
    137  * an array which contains the tip identifiers contained within that guide.
    138  *
    139  * @param {Array} state  Current state.
    140  * @param {Object} action Dispatched action.
    141  *
    142  * @return {Array} Updated state.
    143  */
    144 
    145 function guides(state = [], action) {
    146   switch (action.type) {
    147     case 'TRIGGER_GUIDE':
    148       return [...state, action.tipIds];
    149   }
    150 
    151   return state;
    152 }
    153 /**
    154  * Reducer that tracks whether or not tips are globally enabled.
    155  *
    156  * @param {boolean} state Current state.
    157  * @param {Object} action Dispatched action.
    158  *
    159  * @return {boolean} Updated state.
    160  */
    161 
    162 function areTipsEnabled(state = true, action) {
    163   switch (action.type) {
    164     case 'DISABLE_TIPS':
    165       return false;
    166 
    167     case 'ENABLE_TIPS':
    168       return true;
    169   }
    170 
    171   return state;
    172 }
    173 /**
    174  * Reducer that tracks which tips have been dismissed. If the state object
    175  * contains a tip identifier, then that tip is dismissed.
    176  *
    177  * @param {Object} state  Current state.
    178  * @param {Object} action Dispatched action.
    179  *
    180  * @return {Object} Updated state.
    181  */
    182 
    183 function dismissedTips(state = {}, action) {
    184   switch (action.type) {
    185     case 'DISMISS_TIP':
    186       return { ...state,
    187         [action.id]: true
    188       };
    189 
    190     case 'ENABLE_TIPS':
    191       return {};
    192   }
    193 
    194   return state;
    195 }
    196 const preferences = Object(external_wp_data_["combineReducers"])({
    197   areTipsEnabled,
    198   dismissedTips
    199 });
    200 /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({
    201   guides,
    202   preferences
    203 }));
    204 
    205 // CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/actions.js
    206 /**
    207  * Returns an action object that, when dispatched, presents a guide that takes
    208  * the user through a series of tips step by step.
    209  *
    210  * @param {string[]} tipIds Which tips to show in the guide.
    211  *
    212  * @return {Object} Action object.
    213  */
    214 function triggerGuide(tipIds) {
    215   return {
    216     type: 'TRIGGER_GUIDE',
    217     tipIds
    218   };
    219 }
    220 /**
    221  * Returns an action object that, when dispatched, dismisses the given tip. A
    222  * dismissed tip will not show again.
    223  *
    224  * @param {string} id The tip to dismiss.
    225  *
    226  * @return {Object} Action object.
    227  */
    228 
    229 function dismissTip(id) {
    230   return {
    231     type: 'DISMISS_TIP',
    232     id
    233   };
    234 }
    235 /**
    236  * Returns an action object that, when dispatched, prevents all tips from
    237  * showing again.
    238  *
    239  * @return {Object} Action object.
    240  */
    241 
    242 function disableTips() {
    243   return {
    244     type: 'DISABLE_TIPS'
    245   };
    246 }
    247 /**
    248  * Returns an action object that, when dispatched, makes all tips show again.
    249  *
    250  * @return {Object} Action object.
    251  */
    252 
    253 function enableTips() {
    254   return {
    255     type: 'ENABLE_TIPS'
    256   };
    257 }
    258 
    259 // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
    260 var rememo = __webpack_require__("pPDe");
    261 
    262 // EXTERNAL MODULE: external "lodash"
    263 var external_lodash_ = __webpack_require__("YLtl");
    264 
    265 // CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/selectors.js
    266 /**
    267  * External dependencies
    268  */
    269 
    270 
    271 /**
    272  * An object containing information about a guide.
    273  *
    274  * @typedef {Object} NUXGuideInfo
    275  * @property {string[]} tipIds       Which tips the guide contains.
    276  * @property {?string}  currentTipId The guide's currently showing tip.
    277  * @property {?string}  nextTipId    The guide's next tip to show.
    278  */
    279 
    280 /**
    281  * Returns an object describing the guide, if any, that the given tip is a part
    282  * of.
    283  *
    284  * @param {Object} state Global application state.
    285  * @param {string} tipId The tip to query.
    286  *
    287  * @return {?NUXGuideInfo} Information about the associated guide.
    288  */
    289 
    290 const getAssociatedGuide = Object(rememo["a" /* default */])((state, tipId) => {
    291   for (const tipIds of state.guides) {
    292     if (Object(external_lodash_["includes"])(tipIds, tipId)) {
    293       const nonDismissedTips = Object(external_lodash_["difference"])(tipIds, Object(external_lodash_["keys"])(state.preferences.dismissedTips));
    294       const [currentTipId = null, nextTipId = null] = nonDismissedTips;
    295       return {
    296         tipIds,
    297         currentTipId,
    298         nextTipId
    299       };
    300     }
    301   }
    302 
    303   return null;
    304 }, state => [state.guides, state.preferences.dismissedTips]);
    305 /**
    306  * Determines whether or not the given tip is showing. Tips are hidden if they
    307  * are disabled, have been dismissed, or are not the current tip in any
    308  * guide that they have been added to.
    309  *
    310  * @param {Object} state Global application state.
    311  * @param {string} tipId The tip to query.
    312  *
    313  * @return {boolean} Whether or not the given tip is showing.
    314  */
    315 
    316 function isTipVisible(state, tipId) {
    317   if (!state.preferences.areTipsEnabled) {
    318     return false;
    319   }
    320 
    321   if (Object(external_lodash_["has"])(state.preferences.dismissedTips, [tipId])) {
    322     return false;
    323   }
    324 
    325   const associatedGuide = getAssociatedGuide(state, tipId);
    326 
    327   if (associatedGuide && associatedGuide.currentTipId !== tipId) {
    328     return false;
    329   }
    330 
    331   return true;
    332 }
    333 /**
    334  * Returns whether or not tips are globally enabled.
    335  *
    336  * @param {Object} state Global application state.
    337  *
    338  * @return {boolean} Whether tips are globally enabled.
    339  */
    340 
    341 function selectors_areTipsEnabled(state) {
    342   return state.preferences.areTipsEnabled;
    343 }
    344 
    345 // CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/index.js
    346 /**
    347  * WordPress dependencies
    348  */
    349 
    350 /**
    351  * Internal dependencies
    352  */
    353 
    354 
    355 
    356 
    357 const STORE_NAME = 'core/nux';
    358 /**
    359  * Store definition for the nux namespace.
    360  *
    361  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
    362  *
    363  * @type {Object}
    364  */
    365 
    366 const store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, {
    367   reducer: reducer,
    368   actions: actions_namespaceObject,
    369   selectors: selectors_namespaceObject,
    370   persist: ['preferences']
    371 }); // Once we build a more generic persistence plugin that works across types of stores
    372 // we'd be able to replace this with a register call.
    373 
    374 Object(external_wp_data_["registerStore"])(STORE_NAME, {
    375   reducer: reducer,
    376   actions: actions_namespaceObject,
    377   selectors: selectors_namespaceObject,
    378   persist: ['preferences']
    379 });
    380 
    381 // EXTERNAL MODULE: external ["wp","element"]
    382 var external_wp_element_ = __webpack_require__("GRId");
    383 
    384 // EXTERNAL MODULE: external ["wp","compose"]
    385 var external_wp_compose_ = __webpack_require__("K9lf");
    386 
    387 // EXTERNAL MODULE: external ["wp","components"]
    388 var external_wp_components_ = __webpack_require__("tI+e");
    389 
    390 // EXTERNAL MODULE: external ["wp","i18n"]
    391 var external_wp_i18n_ = __webpack_require__("l3Sj");
    392 
    393 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
    394 var library_close = __webpack_require__("w95h");
    395 
    396 // CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/components/dot-tip/index.js
    397 
    398 
    399 /**
    400  * WordPress dependencies
    401  */
    402 
    403 
    404 
    405 
    406 
    407 
    408 
    409 function onClick(event) {
    410   // Tips are often nested within buttons. We stop propagation so that clicking
    411   // on a tip doesn't result in the button being clicked.
    412   event.stopPropagation();
    413 }
    414 
    415 function DotTip({
    416   position = 'middle right',
    417   children,
    418   isVisible,
    419   hasNextTip,
    420   onDismiss,
    421   onDisable
    422 }) {
    423   const anchorParent = Object(external_wp_element_["useRef"])(null);
    424   const onFocusOutsideCallback = Object(external_wp_element_["useCallback"])(event => {
    425     if (!anchorParent.current) {
    426       return;
    427     }
    428 
    429     if (anchorParent.current.contains(event.relatedTarget)) {
    430       return;
    431     }
    432 
    433     onDisable();
    434   }, [onDisable, anchorParent]);
    435 
    436   if (!isVisible) {
    437     return null;
    438   }
    439 
    440   return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
    441     className: "nux-dot-tip",
    442     position: position,
    443     noArrow: true,
    444     focusOnMount: "container",
    445     shouldAnchorIncludePadding: true,
    446     role: "dialog",
    447     "aria-label": Object(external_wp_i18n_["__"])('Editor tips'),
    448     onClick: onClick,
    449     onFocusOutside: onFocusOutsideCallback
    450   }, Object(external_wp_element_["createElement"])("p", null, children), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
    451     isLink: true,
    452     onClick: onDismiss
    453   }, hasNextTip ? Object(external_wp_i18n_["__"])('See next tip') : Object(external_wp_i18n_["__"])('Got it'))), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
    454     className: "nux-dot-tip__disable",
    455     icon: library_close["a" /* default */],
    456     label: Object(external_wp_i18n_["__"])('Disable tips'),
    457     onClick: onDisable
    458   }));
    459 }
    460 /* harmony default export */ var dot_tip = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])((select, {
    461   tipId
    462 }) => {
    463   const {
    464     isTipVisible,
    465     getAssociatedGuide
    466   } = select('core/nux');
    467   const associatedGuide = getAssociatedGuide(tipId);
    468   return {
    469     isVisible: isTipVisible(tipId),
    470     hasNextTip: !!(associatedGuide && associatedGuide.nextTipId)
    471   };
    472 }), Object(external_wp_data_["withDispatch"])((dispatch, {
    473   tipId
    474 }) => {
    475   const {
    476     dismissTip,
    477     disableTips
    478   } = dispatch('core/nux');
    479   return {
    480     onDismiss() {
    481       dismissTip(tipId);
    482     },
    483 
    484     onDisable() {
    485       disableTips();
    486     }
    487 
    488   };
    489 }))(DotTip));
    490 
    491 // CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/index.js
    492 /**
    493  * WordPress dependencies
    494  */
    495 
    496 
    497 
    498 external_wp_deprecated_default()('wp.nux', {
    499   since: '5.4',
    500   hint: 'wp.components.Guide can be used to show a user guide.'
    501 });
    502 
    503 
    504 /***/ }),
    505 
    506 /***/ "GRId":
    507 /***/ (function(module, exports) {
    508 
    509 (function() { module.exports = window["wp"]["element"]; }());
    510 
    511 /***/ }),
    512 
    513 /***/ "K9lf":
    514 /***/ (function(module, exports) {
    515 
    516 (function() { module.exports = window["wp"]["compose"]; }());
    517 
    518 /***/ }),
    519 
    520 /***/ "NMb1":
    521 /***/ (function(module, exports) {
    522 
    523 (function() { module.exports = window["wp"]["deprecated"]; }());
    524 
    525 /***/ }),
    526 
    527 /***/ "Tqx9":
    528 /***/ (function(module, exports) {
    529 
    530 (function() { module.exports = window["wp"]["primitives"]; }());
    531 
    532 /***/ }),
    533 
    534 /***/ "YLtl":
    535 /***/ (function(module, exports) {
    536 
    537 (function() { module.exports = window["lodash"]; }());
    538 
    539 /***/ }),
    540 
    541 /***/ "l3Sj":
    542 /***/ (function(module, exports) {
    543 
    544 (function() { module.exports = window["wp"]["i18n"]; }());
    545 
    546 /***/ }),
    547 
    548 /***/ "pPDe":
    549 /***/ (function(module, __webpack_exports__, __webpack_require__) {
    550 
    551 "use strict";
    552 
    553 
    554 var LEAF_KEY, hasWeakMap;
    555 
    556 /**
    557  * Arbitrary value used as key for referencing cache object in WeakMap tree.
    558  *
    559  * @type {Object}
    560  */
    561 LEAF_KEY = {};
    562 
    563 /**
    564  * Whether environment supports WeakMap.
    565  *
    566  * @type {boolean}
    567  */
    568 hasWeakMap = typeof WeakMap !== 'undefined';
    569 
    570 /**
    571  * Returns the first argument as the sole entry in an array.
    572  *
    573  * @param {*} value Value to return.
    574  *
    575  * @return {Array} Value returned as entry in array.
    576  */
    577 function arrayOf( value ) {
    578 	return [ value ];
    579 }
    580 
    581 /**
    582  * Returns true if the value passed is object-like, or false otherwise. A value
    583  * is object-like if it can support property assignment, e.g. object or array.
    584  *
    585  * @param {*} value Value to test.
    586  *
    587  * @return {boolean} Whether value is object-like.
    588  */
    589 function isObjectLike( value ) {
    590 	return !! value && 'object' === typeof value;
    591 }
    592 
    593 /**
    594  * Creates and returns a new cache object.
    595  *
    596  * @return {Object} Cache object.
    597  */
    598 function createCache() {
    599 	var cache = {
    600 		clear: function() {
    601 			cache.head = null;
    602 		},
    603 	};
    604 
    605 	return cache;
    606 }
    607 
    608 /**
    609  * Returns true if entries within the two arrays are strictly equal by
    610  * reference from a starting index.
    611  *
    612  * @param {Array}  a         First array.
    613  * @param {Array}  b         Second array.
    614  * @param {number} fromIndex Index from which to start comparison.
    615  *
    616  * @return {boolean} Whether arrays are shallowly equal.
    617  */
    618 function isShallowEqual( a, b, fromIndex ) {
    619 	var i;
    620 
    621 	if ( a.length !== b.length ) {
    622 		return false;
    623 	}
    624 
    625 	for ( i = fromIndex; i < a.length; i++ ) {
    626 		if ( a[ i ] !== b[ i ] ) {
    627 			return false;
    628 		}
    629 	}
    630 
    631 	return true;
    632 }
    633 
    634 /**
    635  * Returns a memoized selector function. The getDependants function argument is
    636  * called before the memoized selector and is expected to return an immutable
    637  * reference or array of references on which the selector depends for computing
    638  * its own return value. The memoize cache is preserved only as long as those
    639  * dependant references remain the same. If getDependants returns a different
    640  * reference(s), the cache is cleared and the selector value regenerated.
    641  *
    642  * @param {Function} selector      Selector function.
    643  * @param {Function} getDependants Dependant getter returning an immutable
    644  *                                 reference or array of reference used in
    645  *                                 cache bust consideration.
    646  *
    647  * @return {Function} Memoized selector.
    648  */
    649 /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
    650 	var rootCache, getCache;
    651 
    652 	// Use object source as dependant if getter not provided
    653 	if ( ! getDependants ) {
    654 		getDependants = arrayOf;
    655 	}
    656 
    657 	/**
    658 	 * Returns the root cache. If WeakMap is supported, this is assigned to the
    659 	 * root WeakMap cache set, otherwise it is a shared instance of the default
    660 	 * cache object.
    661 	 *
    662 	 * @return {(WeakMap|Object)} Root cache object.
    663 	 */
    664 	function getRootCache() {
    665 		return rootCache;
    666 	}
    667 
    668 	/**
    669 	 * Returns the cache for a given dependants array. When possible, a WeakMap
    670 	 * will be used to create a unique cache for each set of dependants. This
    671 	 * is feasible due to the nature of WeakMap in allowing garbage collection
    672 	 * to occur on entries where the key object is no longer referenced. Since
    673 	 * WeakMap requires the key to be an object, this is only possible when the
    674 	 * dependant is object-like. The root cache is created as a hierarchy where
    675 	 * each top-level key is the first entry in a dependants set, the value a
    676 	 * WeakMap where each key is the next dependant, and so on. This continues
    677 	 * so long as the dependants are object-like. If no dependants are object-
    678 	 * like, then the cache is shared across all invocations.
    679 	 *
    680 	 * @see isObjectLike
    681 	 *
    682 	 * @param {Array} dependants Selector dependants.
    683 	 *
    684 	 * @return {Object} Cache object.
    685 	 */
    686 	function getWeakMapCache( dependants ) {
    687 		var caches = rootCache,
    688 			isUniqueByDependants = true,
    689 			i, dependant, map, cache;
    690 
    691 		for ( i = 0; i < dependants.length; i++ ) {
    692 			dependant = dependants[ i ];
    693 
    694 			// Can only compose WeakMap from object-like key.
    695 			if ( ! isObjectLike( dependant ) ) {
    696 				isUniqueByDependants = false;
    697 				break;
    698 			}
    699 
    700 			// Does current segment of cache already have a WeakMap?
    701 			if ( caches.has( dependant ) ) {
    702 				// Traverse into nested WeakMap.
    703 				caches = caches.get( dependant );
    704 			} else {
    705 				// Create, set, and traverse into a new one.
    706 				map = new WeakMap();
    707 				caches.set( dependant, map );
    708 				caches = map;
    709 			}
    710 		}
    711 
    712 		// We use an arbitrary (but consistent) object as key for the last item
    713 		// in the WeakMap to serve as our running cache.
    714 		if ( ! caches.has( LEAF_KEY ) ) {
    715 			cache = createCache();
    716 			cache.isUniqueByDependants = isUniqueByDependants;
    717 			caches.set( LEAF_KEY, cache );
    718 		}
    719 
    720 		return caches.get( LEAF_KEY );
    721 	}
    722 
    723 	// Assign cache handler by availability of WeakMap
    724 	getCache = hasWeakMap ? getWeakMapCache : getRootCache;
    725 
    726 	/**
    727 	 * Resets root memoization cache.
    728 	 */
    729 	function clear() {
    730 		rootCache = hasWeakMap ? new WeakMap() : createCache();
    731 	}
    732 
    733 	// eslint-disable-next-line jsdoc/check-param-names
    734 	/**
    735 	 * The augmented selector call, considering first whether dependants have
    736 	 * changed before passing it to underlying memoize function.
    737 	 *
    738 	 * @param {Object} source    Source object for derivation.
    739 	 * @param {...*}   extraArgs Additional arguments to pass to selector.
    740 	 *
    741 	 * @return {*} Selector result.
    742 	 */
    743 	function callSelector( /* source, ...extraArgs */ ) {
    744 		var len = arguments.length,
    745 			cache, node, i, args, dependants;
    746 
    747 		// Create copy of arguments (avoid leaking deoptimization).
    748 		args = new Array( len );
    749 		for ( i = 0; i < len; i++ ) {
    750 			args[ i ] = arguments[ i ];
    751 		}
    752 
    753 		dependants = getDependants.apply( null, args );
    754 		cache = getCache( dependants );
    755 
    756 		// If not guaranteed uniqueness by dependants (primitive type or lack
    757 		// of WeakMap support), shallow compare against last dependants and, if
    758 		// references have changed, destroy cache to recalculate result.
    759 		if ( ! cache.isUniqueByDependants ) {
    760 			if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
    761 				cache.clear();
    762 			}
    763 
    764 			cache.lastDependants = dependants;
    765 		}
    766 
    767 		node = cache.head;
    768 		while ( node ) {
    769 			// Check whether node arguments match arguments
    770 			if ( ! isShallowEqual( node.args, args, 1 ) ) {
    771 				node = node.next;
    772 				continue;
    773 			}
    774 
    775 			// At this point we can assume we've found a match
    776 
    777 			// Surface matched node to head if not already
    778 			if ( node !== cache.head ) {
    779 				// Adjust siblings to point to each other.
    780 				node.prev.next = node.next;
    781 				if ( node.next ) {
    782 					node.next.prev = node.prev;
    783 				}
    784 
    785 				node.next = cache.head;
    786 				node.prev = null;
    787 				cache.head.prev = node;
    788 				cache.head = node;
    789 			}
    790 
    791 			// Return immediately
    792 			return node.val;
    793 		}
    794 
    795 		// No cached value found. Continue to insertion phase:
    796 
    797 		node = {
    798 			// Generate the result from original function
    799 			val: selector.apply( null, args ),
    800 		};
    801 
    802 		// Avoid including the source object in the cache.
    803 		args[ 0 ] = null;
    804 		node.args = args;
    805 
    806 		// Don't need to check whether node is already head, since it would
    807 		// have been returned above already if it was
    808 
    809 		// Shift existing head down list
    810 		if ( cache.head ) {
    811 			cache.head.prev = node;
    812 			node.next = cache.head;
    813 		}
    814 
    815 		cache.head = node;
    816 
    817 		return node.val;
    818 	}
    819 
    820 	callSelector.getDependants = getDependants;
    821 	callSelector.clear = clear;
    822 	clear();
    823 
    824 	return callSelector;
    825 });
    826 
    827 
    828 /***/ }),
    829 
    830 /***/ "tI+e":
    831 /***/ (function(module, exports) {
    832 
    833 (function() { module.exports = window["wp"]["components"]; }());
    834 
    835 /***/ }),
    836 
    837 /***/ "w95h":
    838 /***/ (function(module, __webpack_exports__, __webpack_require__) {
    839 
    840 "use strict";
    841 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
    842 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
    843 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
    844 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
    845 
    846 
    847 /**
    848  * WordPress dependencies
    849  */
    850 
    851 const close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
    852   xmlns: "http://www.w3.org/2000/svg",
    853   viewBox: "0 0 24 24"
    854 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
    855   d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
    856 }));
    857 /* harmony default export */ __webpack_exports__["a"] = (close);
    858 
    859 
    860 /***/ })
    861 
    862 /******/ });