wp/wp-includes/js/dist/block-editor.js
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    80 /******/ 	// __webpack_public_path__
    80 /******/ 	// __webpack_public_path__
    81 /******/ 	__webpack_require__.p = "";
    81 /******/ 	__webpack_require__.p = "";
    82 /******/
    82 /******/
    83 /******/
    83 /******/
    84 /******/ 	// Load entry module and return exports
    84 /******/ 	// Load entry module and return exports
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 437);
    85 /******/ 	return __webpack_require__(__webpack_require__.s = "tr0p");
    86 /******/ })
    86 /******/ })
    87 /************************************************************************/
    87 /************************************************************************/
    88 /******/ ([
    88 /******/ ({
    89 /* 0 */
    89 
       
    90 /***/ "//Lo":
       
    91 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
    92 
       
    93 "use strict";
       
    94 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
    95 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
    96 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
    97 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
    98 
       
    99 
       
   100 /**
       
   101  * WordPress dependencies
       
   102  */
       
   103 
       
   104 const blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
   105   xmlns: "http://www.w3.org/2000/svg",
       
   106   viewBox: "0 0 24 24"
       
   107 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
   108   d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
       
   109 }));
       
   110 /* harmony default export */ __webpack_exports__["a"] = (blockDefault);
       
   111 
       
   112 
       
   113 /***/ }),
       
   114 
       
   115 /***/ "16Al":
       
   116 /***/ (function(module, exports, __webpack_require__) {
       
   117 
       
   118 "use strict";
       
   119 /**
       
   120  * Copyright (c) 2013-present, Facebook, Inc.
       
   121  *
       
   122  * This source code is licensed under the MIT license found in the
       
   123  * LICENSE file in the root directory of this source tree.
       
   124  */
       
   125 
       
   126 
       
   127 
       
   128 var ReactPropTypesSecret = __webpack_require__("WbBG");
       
   129 
       
   130 function emptyFunction() {}
       
   131 function emptyFunctionWithReset() {}
       
   132 emptyFunctionWithReset.resetWarningCache = emptyFunction;
       
   133 
       
   134 module.exports = function() {
       
   135   function shim(props, propName, componentName, location, propFullName, secret) {
       
   136     if (secret === ReactPropTypesSecret) {
       
   137       // It is still safe when called from React.
       
   138       return;
       
   139     }
       
   140     var err = new Error(
       
   141       'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
       
   142       'Use PropTypes.checkPropTypes() to call them. ' +
       
   143       'Read more at http://fb.me/use-check-prop-types'
       
   144     );
       
   145     err.name = 'Invariant Violation';
       
   146     throw err;
       
   147   };
       
   148   shim.isRequired = shim;
       
   149   function getShim() {
       
   150     return shim;
       
   151   };
       
   152   // Important!
       
   153   // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
       
   154   var ReactPropTypes = {
       
   155     array: shim,
       
   156     bool: shim,
       
   157     func: shim,
       
   158     number: shim,
       
   159     object: shim,
       
   160     string: shim,
       
   161     symbol: shim,
       
   162 
       
   163     any: shim,
       
   164     arrayOf: getShim,
       
   165     element: shim,
       
   166     elementType: shim,
       
   167     instanceOf: getShim,
       
   168     node: shim,
       
   169     objectOf: getShim,
       
   170     oneOf: getShim,
       
   171     oneOfType: getShim,
       
   172     shape: getShim,
       
   173     exact: getShim,
       
   174 
       
   175     checkPropTypes: emptyFunctionWithReset,
       
   176     resetWarningCache: emptyFunction
       
   177   };
       
   178 
       
   179   ReactPropTypes.PropTypes = ReactPropTypes;
       
   180 
       
   181   return ReactPropTypes;
       
   182 };
       
   183 
       
   184 
       
   185 /***/ }),
       
   186 
       
   187 /***/ "17x9":
       
   188 /***/ (function(module, exports, __webpack_require__) {
       
   189 
       
   190 /**
       
   191  * Copyright (c) 2013-present, Facebook, Inc.
       
   192  *
       
   193  * This source code is licensed under the MIT license found in the
       
   194  * LICENSE file in the root directory of this source tree.
       
   195  */
       
   196 
       
   197 if (false) { var throwOnDirectAccess, ReactIs; } else {
       
   198   // By explicitly using `prop-types` you are opting into new production behavior.
       
   199   // http://fb.me/prop-types-in-prod
       
   200   module.exports = __webpack_require__("16Al")();
       
   201 }
       
   202 
       
   203 
       
   204 /***/ }),
       
   205 
       
   206 /***/ "1CF3":
    90 /***/ (function(module, exports) {
   207 /***/ (function(module, exports) {
    91 
   208 
    92 (function() { module.exports = this["wp"]["element"]; }());
   209 (function() { module.exports = window["wp"]["dom"]; }());
    93 
   210 
    94 /***/ }),
   211 /***/ }),
    95 /* 1 */
   212 
       
   213 /***/ "1ZqX":
    96 /***/ (function(module, exports) {
   214 /***/ (function(module, exports) {
    97 
   215 
    98 (function() { module.exports = this["wp"]["i18n"]; }());
   216 (function() { module.exports = window["wp"]["data"]; }());
    99 
   217 
   100 /***/ }),
   218 /***/ }),
   101 /* 2 */
   219 
       
   220 /***/ "1iEr":
       
   221 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   222 
       
   223 "use strict";
       
   224 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
   225 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
   226 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
   227 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
   228 
       
   229 
       
   230 /**
       
   231  * WordPress dependencies
       
   232  */
       
   233 
       
   234 const chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
   235   xmlns: "http://www.w3.org/2000/svg",
       
   236   viewBox: "0 0 24 24"
       
   237 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
   238   d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
       
   239 }));
       
   240 /* harmony default export */ __webpack_exports__["a"] = (chevronRight);
       
   241 
       
   242 
       
   243 /***/ }),
       
   244 
       
   245 /***/ "2gm7":
       
   246 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   247 
       
   248 "use strict";
       
   249 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
   250 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
   251 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
   252 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
   253 
       
   254 
       
   255 /**
       
   256  * WordPress dependencies
       
   257  */
       
   258 
       
   259 const chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
   260   xmlns: "http://www.w3.org/2000/svg",
       
   261   viewBox: "0 0 24 24"
       
   262 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
   263   d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
       
   264 }));
       
   265 /* harmony default export */ __webpack_exports__["a"] = (chevronLeft);
       
   266 
       
   267 
       
   268 /***/ }),
       
   269 
       
   270 /***/ "4eJC":
       
   271 /***/ (function(module, exports, __webpack_require__) {
       
   272 
       
   273 /**
       
   274  * Memize options object.
       
   275  *
       
   276  * @typedef MemizeOptions
       
   277  *
       
   278  * @property {number} [maxSize] Maximum size of the cache.
       
   279  */
       
   280 
       
   281 /**
       
   282  * Internal cache entry.
       
   283  *
       
   284  * @typedef MemizeCacheNode
       
   285  *
       
   286  * @property {?MemizeCacheNode|undefined} [prev] Previous node.
       
   287  * @property {?MemizeCacheNode|undefined} [next] Next node.
       
   288  * @property {Array<*>}                   args   Function arguments for cache
       
   289  *                                               entry.
       
   290  * @property {*}                          val    Function result.
       
   291  */
       
   292 
       
   293 /**
       
   294  * Properties of the enhanced function for controlling cache.
       
   295  *
       
   296  * @typedef MemizeMemoizedFunction
       
   297  *
       
   298  * @property {()=>void} clear Clear the cache.
       
   299  */
       
   300 
       
   301 /**
       
   302  * Accepts a function to be memoized, and returns a new memoized function, with
       
   303  * optional options.
       
   304  *
       
   305  * @template {Function} F
       
   306  *
       
   307  * @param {F}             fn        Function to memoize.
       
   308  * @param {MemizeOptions} [options] Options object.
       
   309  *
       
   310  * @return {F & MemizeMemoizedFunction} Memoized function.
       
   311  */
       
   312 function memize( fn, options ) {
       
   313 	var size = 0;
       
   314 
       
   315 	/** @type {?MemizeCacheNode|undefined} */
       
   316 	var head;
       
   317 
       
   318 	/** @type {?MemizeCacheNode|undefined} */
       
   319 	var tail;
       
   320 
       
   321 	options = options || {};
       
   322 
       
   323 	function memoized( /* ...args */ ) {
       
   324 		var node = head,
       
   325 			len = arguments.length,
       
   326 			args, i;
       
   327 
       
   328 		searchCache: while ( node ) {
       
   329 			// Perform a shallow equality test to confirm that whether the node
       
   330 			// under test is a candidate for the arguments passed. Two arrays
       
   331 			// are shallowly equal if their length matches and each entry is
       
   332 			// strictly equal between the two sets. Avoid abstracting to a
       
   333 			// function which could incur an arguments leaking deoptimization.
       
   334 
       
   335 			// Check whether node arguments match arguments length
       
   336 			if ( node.args.length !== arguments.length ) {
       
   337 				node = node.next;
       
   338 				continue;
       
   339 			}
       
   340 
       
   341 			// Check whether node arguments match arguments values
       
   342 			for ( i = 0; i < len; i++ ) {
       
   343 				if ( node.args[ i ] !== arguments[ i ] ) {
       
   344 					node = node.next;
       
   345 					continue searchCache;
       
   346 				}
       
   347 			}
       
   348 
       
   349 			// At this point we can assume we've found a match
       
   350 
       
   351 			// Surface matched node to head if not already
       
   352 			if ( node !== head ) {
       
   353 				// As tail, shift to previous. Must only shift if not also
       
   354 				// head, since if both head and tail, there is no previous.
       
   355 				if ( node === tail ) {
       
   356 					tail = node.prev;
       
   357 				}
       
   358 
       
   359 				// Adjust siblings to point to each other. If node was tail,
       
   360 				// this also handles new tail's empty `next` assignment.
       
   361 				/** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
       
   362 				if ( node.next ) {
       
   363 					node.next.prev = node.prev;
       
   364 				}
       
   365 
       
   366 				node.next = head;
       
   367 				node.prev = null;
       
   368 				/** @type {MemizeCacheNode} */ ( head ).prev = node;
       
   369 				head = node;
       
   370 			}
       
   371 
       
   372 			// Return immediately
       
   373 			return node.val;
       
   374 		}
       
   375 
       
   376 		// No cached value found. Continue to insertion phase:
       
   377 
       
   378 		// Create a copy of arguments (avoid leaking deoptimization)
       
   379 		args = new Array( len );
       
   380 		for ( i = 0; i < len; i++ ) {
       
   381 			args[ i ] = arguments[ i ];
       
   382 		}
       
   383 
       
   384 		node = {
       
   385 			args: args,
       
   386 
       
   387 			// Generate the result from original function
       
   388 			val: fn.apply( null, args ),
       
   389 		};
       
   390 
       
   391 		// Don't need to check whether node is already head, since it would
       
   392 		// have been returned above already if it was
       
   393 
       
   394 		// Shift existing head down list
       
   395 		if ( head ) {
       
   396 			head.prev = node;
       
   397 			node.next = head;
       
   398 		} else {
       
   399 			// If no head, follows that there's no tail (at initial or reset)
       
   400 			tail = node;
       
   401 		}
       
   402 
       
   403 		// Trim tail if we're reached max size and are pending cache insertion
       
   404 		if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
       
   405 			tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
       
   406 			/** @type {MemizeCacheNode} */ ( tail ).next = null;
       
   407 		} else {
       
   408 			size++;
       
   409 		}
       
   410 
       
   411 		head = node;
       
   412 
       
   413 		return node.val;
       
   414 	}
       
   415 
       
   416 	memoized.clear = function() {
       
   417 		head = null;
       
   418 		tail = null;
       
   419 		size = 0;
       
   420 	};
       
   421 
       
   422 	if ( false ) {}
       
   423 
       
   424 	// Ignore reason: There's not a clear solution to create an intersection of
       
   425 	// the function with additional properties, where the goal is to retain the
       
   426 	// function signature of the incoming argument and add control properties
       
   427 	// on the return value.
       
   428 
       
   429 	// @ts-ignore
       
   430 	return memoized;
       
   431 }
       
   432 
       
   433 module.exports = memize;
       
   434 
       
   435 
       
   436 /***/ }),
       
   437 
       
   438 /***/ "6fKw":
       
   439 /***/ (function(module, exports, __webpack_require__) {
       
   440 
       
   441 "use strict";
       
   442 /*
       
   443 Copyright (c) 2014, Yahoo! Inc. All rights reserved.
       
   444 Copyrights licensed under the New BSD License.
       
   445 See the accompanying LICENSE file for terms.
       
   446 */
       
   447 
       
   448 
       
   449 
       
   450 exports.match = matchQuery;
       
   451 exports.parse = parseQuery;
       
   452 
       
   453 // -----------------------------------------------------------------------------
       
   454 
       
   455 var RE_MEDIA_QUERY     = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,
       
   456     RE_MQ_EXPRESSION   = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,
       
   457     RE_MQ_FEATURE      = /^(?:(min|max)-)?(.+)/,
       
   458     RE_LENGTH_UNIT     = /(em|rem|px|cm|mm|in|pt|pc)?$/,
       
   459     RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;
       
   460 
       
   461 function matchQuery(mediaQuery, values) {
       
   462     return parseQuery(mediaQuery).some(function (query) {
       
   463         var inverse = query.inverse;
       
   464 
       
   465         // Either the parsed or specified `type` is "all", or the types must be
       
   466         // equal for a match.
       
   467         var typeMatch = query.type === 'all' || values.type === query.type;
       
   468 
       
   469         // Quit early when `type` doesn't match, but take "not" into account.
       
   470         if ((typeMatch && inverse) || !(typeMatch || inverse)) {
       
   471             return false;
       
   472         }
       
   473 
       
   474         var expressionsMatch = query.expressions.every(function (expression) {
       
   475             var feature  = expression.feature,
       
   476                 modifier = expression.modifier,
       
   477                 expValue = expression.value,
       
   478                 value    = values[feature];
       
   479 
       
   480             // Missing or falsy values don't match.
       
   481             if (!value) { return false; }
       
   482 
       
   483             switch (feature) {
       
   484                 case 'orientation':
       
   485                 case 'scan':
       
   486                     return value.toLowerCase() === expValue.toLowerCase();
       
   487 
       
   488                 case 'width':
       
   489                 case 'height':
       
   490                 case 'device-width':
       
   491                 case 'device-height':
       
   492                     expValue = toPx(expValue);
       
   493                     value    = toPx(value);
       
   494                     break;
       
   495 
       
   496                 case 'resolution':
       
   497                     expValue = toDpi(expValue);
       
   498                     value    = toDpi(value);
       
   499                     break;
       
   500 
       
   501                 case 'aspect-ratio':
       
   502                 case 'device-aspect-ratio':
       
   503                 case /* Deprecated */ 'device-pixel-ratio':
       
   504                     expValue = toDecimal(expValue);
       
   505                     value    = toDecimal(value);
       
   506                     break;
       
   507 
       
   508                 case 'grid':
       
   509                 case 'color':
       
   510                 case 'color-index':
       
   511                 case 'monochrome':
       
   512                     expValue = parseInt(expValue, 10) || 1;
       
   513                     value    = parseInt(value, 10) || 0;
       
   514                     break;
       
   515             }
       
   516 
       
   517             switch (modifier) {
       
   518                 case 'min': return value >= expValue;
       
   519                 case 'max': return value <= expValue;
       
   520                 default   : return value === expValue;
       
   521             }
       
   522         });
       
   523 
       
   524         return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);
       
   525     });
       
   526 }
       
   527 
       
   528 function parseQuery(mediaQuery) {
       
   529     return mediaQuery.split(',').map(function (query) {
       
   530         query = query.trim();
       
   531 
       
   532         var captures    = query.match(RE_MEDIA_QUERY),
       
   533             modifier    = captures[1],
       
   534             type        = captures[2],
       
   535             expressions = captures[3] || '',
       
   536             parsed      = {};
       
   537 
       
   538         parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';
       
   539         parsed.type    = type ? type.toLowerCase() : 'all';
       
   540 
       
   541         // Split expressions into a list.
       
   542         expressions = expressions.match(/\([^\)]+\)/g) || [];
       
   543 
       
   544         parsed.expressions = expressions.map(function (expression) {
       
   545             var captures = expression.match(RE_MQ_EXPRESSION),
       
   546                 feature  = captures[1].toLowerCase().match(RE_MQ_FEATURE);
       
   547 
       
   548             return {
       
   549                 modifier: feature[1],
       
   550                 feature : feature[2],
       
   551                 value   : captures[2]
       
   552             };
       
   553         });
       
   554 
       
   555         return parsed;
       
   556     });
       
   557 }
       
   558 
       
   559 // -- Utilities ----------------------------------------------------------------
       
   560 
       
   561 function toDecimal(ratio) {
       
   562     var decimal = Number(ratio),
       
   563         numbers;
       
   564 
       
   565     if (!decimal) {
       
   566         numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/);
       
   567         decimal = numbers[1] / numbers[2];
       
   568     }
       
   569 
       
   570     return decimal;
       
   571 }
       
   572 
       
   573 function toDpi(resolution) {
       
   574     var value = parseFloat(resolution),
       
   575         units = String(resolution).match(RE_RESOLUTION_UNIT)[1];
       
   576 
       
   577     switch (units) {
       
   578         case 'dpcm': return value / 2.54;
       
   579         case 'dppx': return value * 96;
       
   580         default    : return value;
       
   581     }
       
   582 }
       
   583 
       
   584 function toPx(length) {
       
   585     var value = parseFloat(length),
       
   586         units = String(length).match(RE_LENGTH_UNIT)[1];
       
   587 
       
   588     switch (units) {
       
   589         case 'em' : return value * 16;
       
   590         case 'rem': return value * 16;
       
   591         case 'cm' : return value * 96 / 2.54;
       
   592         case 'mm' : return value * 96 / 2.54 / 10;
       
   593         case 'in' : return value * 96;
       
   594         case 'pt' : return value * 72;
       
   595         case 'pc' : return value * 72 / 12;
       
   596         default   : return value;
       
   597     }
       
   598 }
       
   599 
       
   600 
       
   601 /***/ }),
       
   602 
       
   603 /***/ "7fqt":
   102 /***/ (function(module, exports) {
   604 /***/ (function(module, exports) {
   103 
   605 
   104 (function() { module.exports = this["lodash"]; }());
   606 (function() { module.exports = window["wp"]["wordcount"]; }());
   105 
   607 
   106 /***/ }),
   608 /***/ }),
   107 /* 3 */
   609 
       
   610 /***/ "8OQS":
   108 /***/ (function(module, exports) {
   611 /***/ (function(module, exports) {
   109 
   612 
   110 (function() { module.exports = this["wp"]["components"]; }());
   613 function _objectWithoutPropertiesLoose(source, excluded) {
       
   614   if (source == null) return {};
       
   615   var target = {};
       
   616   var sourceKeys = Object.keys(source);
       
   617   var key, i;
       
   618 
       
   619   for (i = 0; i < sourceKeys.length; i++) {
       
   620     key = sourceKeys[i];
       
   621     if (excluded.indexOf(key) >= 0) continue;
       
   622     target[key] = source[key];
       
   623   }
       
   624 
       
   625   return target;
       
   626 }
       
   627 
       
   628 module.exports = _objectWithoutPropertiesLoose;
       
   629 module.exports["default"] = module.exports, module.exports.__esModule = true;
   111 
   630 
   112 /***/ }),
   631 /***/ }),
   113 /* 4 */
   632 
       
   633 /***/ "9Do8":
       
   634 /***/ (function(module, exports, __webpack_require__) {
       
   635 
       
   636 "use strict";
       
   637 
       
   638 
       
   639 module.exports = __webpack_require__("zt9T");
       
   640 
       
   641 /***/ }),
       
   642 
       
   643 /***/ "B9Az":
       
   644 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   645 
       
   646 "use strict";
       
   647 
       
   648 // EXTERNAL MODULE: external ["wp","element"]
       
   649 var external_wp_element_ = __webpack_require__("GRId");
       
   650 
       
   651 // EXTERNAL MODULE: external ["wp","primitives"]
       
   652 var external_wp_primitives_ = __webpack_require__("Tqx9");
       
   653 
       
   654 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
       
   655 
       
   656 
       
   657 /**
       
   658  * WordPress dependencies
       
   659  */
       
   660 
       
   661 const pencil = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
   662   xmlns: "http://www.w3.org/2000/svg",
       
   663   viewBox: "0 0 24 24"
       
   664 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
   665   d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"
       
   666 }));
       
   667 /* harmony default export */ var library_pencil = (pencil);
       
   668 
       
   669 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
       
   670 /**
       
   671  * Internal dependencies
       
   672  */
       
   673 
       
   674 /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil);
       
   675 
       
   676 
       
   677 /***/ }),
       
   678 
       
   679 /***/ "BLeD":
   114 /***/ (function(module, exports) {
   680 /***/ (function(module, exports) {
   115 
   681 
   116 (function() { module.exports = this["wp"]["data"]; }());
   682 (function() { module.exports = window["wp"]["tokenList"]; }());
   117 
   683 
   118 /***/ }),
   684 /***/ }),
   119 /* 5 */
   685 
       
   686 /***/ "Bpkj":
   120 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   687 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   121 
   688 
   122 "use strict";
   689 "use strict";
   123 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
   690 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
   124 function _defineProperty(obj, key, value) {
   691 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
   125   if (key in obj) {
   692 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
   126     Object.defineProperty(obj, key, {
   693 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
   127       value: value,
   694 
   128       enumerable: true,
   695 
   129       configurable: true,
   696 /**
   130       writable: true
   697  * WordPress dependencies
   131     });
   698  */
   132   } else {
   699 
   133     obj[key] = value;
   700 const link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
   134   }
   701   xmlns: "http://www.w3.org/2000/svg",
   135 
   702   viewBox: "0 0 24 24"
   136   return obj;
   703 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
   137 }
   704   d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"
       
   705 }));
       
   706 /* harmony default export */ __webpack_exports__["a"] = (link);
       
   707 
   138 
   708 
   139 /***/ }),
   709 /***/ }),
   140 /* 6 */
   710 
       
   711 /***/ "CNgt":
       
   712 /***/ (function(module, exports, __webpack_require__) {
       
   713 
       
   714 "use strict";
       
   715 
       
   716 var __extends = (this && this.__extends) || (function () {
       
   717     var extendStatics = Object.setPrototypeOf ||
       
   718         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
       
   719         function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
       
   720     return function (d, b) {
       
   721         extendStatics(d, b);
       
   722         function __() { this.constructor = d; }
       
   723         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
       
   724     };
       
   725 })();
       
   726 var __assign = (this && this.__assign) || Object.assign || function(t) {
       
   727     for (var s, i = 1, n = arguments.length; i < n; i++) {
       
   728         s = arguments[i];
       
   729         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
       
   730             t[p] = s[p];
       
   731     }
       
   732     return t;
       
   733 };
       
   734 var __rest = (this && this.__rest) || function (s, e) {
       
   735     var t = {};
       
   736     for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
       
   737         t[p] = s[p];
       
   738     if (s != null && typeof Object.getOwnPropertySymbols === "function")
       
   739         for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
       
   740             t[p[i]] = s[p[i]];
       
   741     return t;
       
   742 };
       
   743 exports.__esModule = true;
       
   744 var React = __webpack_require__("cDcd");
       
   745 var PropTypes = __webpack_require__("17x9");
       
   746 var autosize = __webpack_require__("GemG");
       
   747 var _getLineHeight = __webpack_require__("Rk8H");
       
   748 var getLineHeight = _getLineHeight;
       
   749 var RESIZED = "autosize:resized";
       
   750 /**
       
   751  * A light replacement for built-in textarea component
       
   752  * which automaticaly adjusts its height to match the content
       
   753  */
       
   754 var TextareaAutosizeClass = /** @class */ (function (_super) {
       
   755     __extends(TextareaAutosizeClass, _super);
       
   756     function TextareaAutosizeClass() {
       
   757         var _this = _super !== null && _super.apply(this, arguments) || this;
       
   758         _this.state = {
       
   759             lineHeight: null
       
   760         };
       
   761         _this.textarea = null;
       
   762         _this.onResize = function (e) {
       
   763             if (_this.props.onResize) {
       
   764                 _this.props.onResize(e);
       
   765             }
       
   766         };
       
   767         _this.updateLineHeight = function () {
       
   768             if (_this.textarea) {
       
   769                 _this.setState({
       
   770                     lineHeight: getLineHeight(_this.textarea)
       
   771                 });
       
   772             }
       
   773         };
       
   774         _this.onChange = function (e) {
       
   775             var onChange = _this.props.onChange;
       
   776             _this.currentValue = e.currentTarget.value;
       
   777             onChange && onChange(e);
       
   778         };
       
   779         return _this;
       
   780     }
       
   781     TextareaAutosizeClass.prototype.componentDidMount = function () {
       
   782         var _this = this;
       
   783         var _a = this.props, maxRows = _a.maxRows, async = _a.async;
       
   784         if (typeof maxRows === "number") {
       
   785             this.updateLineHeight();
       
   786         }
       
   787         if (typeof maxRows === "number" || async) {
       
   788             /*
       
   789               the defer is needed to:
       
   790                 - force "autosize" to activate the scrollbar when this.props.maxRows is passed
       
   791                 - support StyledComponents (see #71)
       
   792             */
       
   793             setTimeout(function () { return _this.textarea && autosize(_this.textarea); });
       
   794         }
       
   795         else {
       
   796             this.textarea && autosize(this.textarea);
       
   797         }
       
   798         if (this.textarea) {
       
   799             this.textarea.addEventListener(RESIZED, this.onResize);
       
   800         }
       
   801     };
       
   802     TextareaAutosizeClass.prototype.componentWillUnmount = function () {
       
   803         if (this.textarea) {
       
   804             this.textarea.removeEventListener(RESIZED, this.onResize);
       
   805             autosize.destroy(this.textarea);
       
   806         }
       
   807     };
       
   808     TextareaAutosizeClass.prototype.render = function () {
       
   809         var _this = this;
       
   810         var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef", "children"]), lineHeight = _a.state.lineHeight;
       
   811         var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
       
   812         return (React.createElement("textarea", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) {
       
   813                 _this.textarea = element;
       
   814                 if (typeof _this.props.innerRef === 'function') {
       
   815                     _this.props.innerRef(element);
       
   816                 }
       
   817                 else if (_this.props.innerRef) {
       
   818                     _this.props.innerRef.current = element;
       
   819                 }
       
   820             } }), children));
       
   821     };
       
   822     TextareaAutosizeClass.prototype.componentDidUpdate = function () {
       
   823         this.textarea && autosize.update(this.textarea);
       
   824     };
       
   825     TextareaAutosizeClass.defaultProps = {
       
   826         rows: 1,
       
   827         async: false
       
   828     };
       
   829     TextareaAutosizeClass.propTypes = {
       
   830         rows: PropTypes.number,
       
   831         maxRows: PropTypes.number,
       
   832         onResize: PropTypes.func,
       
   833         innerRef: PropTypes.any,
       
   834         async: PropTypes.bool
       
   835     };
       
   836     return TextareaAutosizeClass;
       
   837 }(React.Component));
       
   838 exports.TextareaAutosize = React.forwardRef(function (props, ref) {
       
   839     return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref }));
       
   840 });
       
   841 
       
   842 
       
   843 /***/ }),
       
   844 
       
   845 /***/ "Civd":
       
   846 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   847 
       
   848 "use strict";
       
   849 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
   850 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
   851 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
   852 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
   853 
       
   854 
       
   855 /**
       
   856  * WordPress dependencies
       
   857  */
       
   858 
       
   859 const layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
   860   xmlns: "http://www.w3.org/2000/svg",
       
   861   viewBox: "0 0 24 24"
       
   862 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
   863   d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"
       
   864 }));
       
   865 /* harmony default export */ __webpack_exports__["a"] = (layout);
       
   866 
       
   867 
       
   868 /***/ }),
       
   869 
       
   870 /***/ "Crq9":
       
   871 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   872 
       
   873 "use strict";
       
   874 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
   875 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
   876 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
   877 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
   878 
       
   879 
       
   880 /**
       
   881  * WordPress dependencies
       
   882  */
       
   883 
       
   884 const formatStrikethrough = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
   885   xmlns: "http://www.w3.org/2000/svg",
       
   886   viewBox: "0 0 24 24"
       
   887 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
   888   d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"
       
   889 }));
       
   890 /* harmony default export */ __webpack_exports__["a"] = (formatStrikethrough);
       
   891 
       
   892 
       
   893 /***/ }),
       
   894 
       
   895 /***/ "GRId":
   141 /***/ (function(module, exports) {
   896 /***/ (function(module, exports) {
   142 
   897 
   143 (function() { module.exports = this["wp"]["primitives"]; }());
   898 (function() { module.exports = window["wp"]["element"]; }());
   144 
   899 
   145 /***/ }),
   900 /***/ }),
   146 /* 7 */,
   901 
   147 /* 8 */
   902 /***/ "GemG":
       
   903 /***/ (function(module, exports, __webpack_require__) {
       
   904 
       
   905 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
       
   906 	autosize 4.0.4
       
   907 	license: MIT
       
   908 	http://www.jacklmoore.com/autosize
       
   909 */
       
   910 (function (global, factory) {
       
   911 	if (true) {
       
   912 		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
       
   913 				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
       
   914 				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
       
   915 				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
       
   916 	} else { var mod; }
       
   917 })(this, function (module, exports) {
       
   918 	'use strict';
       
   919 
       
   920 	var map = typeof Map === "function" ? new Map() : function () {
       
   921 		var keys = [];
       
   922 		var values = [];
       
   923 
       
   924 		return {
       
   925 			has: function has(key) {
       
   926 				return keys.indexOf(key) > -1;
       
   927 			},
       
   928 			get: function get(key) {
       
   929 				return values[keys.indexOf(key)];
       
   930 			},
       
   931 			set: function set(key, value) {
       
   932 				if (keys.indexOf(key) === -1) {
       
   933 					keys.push(key);
       
   934 					values.push(value);
       
   935 				}
       
   936 			},
       
   937 			delete: function _delete(key) {
       
   938 				var index = keys.indexOf(key);
       
   939 				if (index > -1) {
       
   940 					keys.splice(index, 1);
       
   941 					values.splice(index, 1);
       
   942 				}
       
   943 			}
       
   944 		};
       
   945 	}();
       
   946 
       
   947 	var createEvent = function createEvent(name) {
       
   948 		return new Event(name, { bubbles: true });
       
   949 	};
       
   950 	try {
       
   951 		new Event('test');
       
   952 	} catch (e) {
       
   953 		// IE does not support `new Event()`
       
   954 		createEvent = function createEvent(name) {
       
   955 			var evt = document.createEvent('Event');
       
   956 			evt.initEvent(name, true, false);
       
   957 			return evt;
       
   958 		};
       
   959 	}
       
   960 
       
   961 	function assign(ta) {
       
   962 		if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
       
   963 
       
   964 		var heightOffset = null;
       
   965 		var clientWidth = null;
       
   966 		var cachedHeight = null;
       
   967 
       
   968 		function init() {
       
   969 			var style = window.getComputedStyle(ta, null);
       
   970 
       
   971 			if (style.resize === 'vertical') {
       
   972 				ta.style.resize = 'none';
       
   973 			} else if (style.resize === 'both') {
       
   974 				ta.style.resize = 'horizontal';
       
   975 			}
       
   976 
       
   977 			if (style.boxSizing === 'content-box') {
       
   978 				heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
       
   979 			} else {
       
   980 				heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
       
   981 			}
       
   982 			// Fix when a textarea is not on document body and heightOffset is Not a Number
       
   983 			if (isNaN(heightOffset)) {
       
   984 				heightOffset = 0;
       
   985 			}
       
   986 
       
   987 			update();
       
   988 		}
       
   989 
       
   990 		function changeOverflow(value) {
       
   991 			{
       
   992 				// Chrome/Safari-specific fix:
       
   993 				// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
       
   994 				// made available by removing the scrollbar. The following forces the necessary text reflow.
       
   995 				var width = ta.style.width;
       
   996 				ta.style.width = '0px';
       
   997 				// Force reflow:
       
   998 				/* jshint ignore:start */
       
   999 				ta.offsetWidth;
       
  1000 				/* jshint ignore:end */
       
  1001 				ta.style.width = width;
       
  1002 			}
       
  1003 
       
  1004 			ta.style.overflowY = value;
       
  1005 		}
       
  1006 
       
  1007 		function getParentOverflows(el) {
       
  1008 			var arr = [];
       
  1009 
       
  1010 			while (el && el.parentNode && el.parentNode instanceof Element) {
       
  1011 				if (el.parentNode.scrollTop) {
       
  1012 					arr.push({
       
  1013 						node: el.parentNode,
       
  1014 						scrollTop: el.parentNode.scrollTop
       
  1015 					});
       
  1016 				}
       
  1017 				el = el.parentNode;
       
  1018 			}
       
  1019 
       
  1020 			return arr;
       
  1021 		}
       
  1022 
       
  1023 		function resize() {
       
  1024 			if (ta.scrollHeight === 0) {
       
  1025 				// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
       
  1026 				return;
       
  1027 			}
       
  1028 
       
  1029 			var overflows = getParentOverflows(ta);
       
  1030 			var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
       
  1031 
       
  1032 			ta.style.height = '';
       
  1033 			ta.style.height = ta.scrollHeight + heightOffset + 'px';
       
  1034 
       
  1035 			// used to check if an update is actually necessary on window.resize
       
  1036 			clientWidth = ta.clientWidth;
       
  1037 
       
  1038 			// prevents scroll-position jumping
       
  1039 			overflows.forEach(function (el) {
       
  1040 				el.node.scrollTop = el.scrollTop;
       
  1041 			});
       
  1042 
       
  1043 			if (docTop) {
       
  1044 				document.documentElement.scrollTop = docTop;
       
  1045 			}
       
  1046 		}
       
  1047 
       
  1048 		function update() {
       
  1049 			resize();
       
  1050 
       
  1051 			var styleHeight = Math.round(parseFloat(ta.style.height));
       
  1052 			var computed = window.getComputedStyle(ta, null);
       
  1053 
       
  1054 			// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
       
  1055 			var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
       
  1056 
       
  1057 			// The actual height not matching the style height (set via the resize method) indicates that 
       
  1058 			// the max-height has been exceeded, in which case the overflow should be allowed.
       
  1059 			if (actualHeight < styleHeight) {
       
  1060 				if (computed.overflowY === 'hidden') {
       
  1061 					changeOverflow('scroll');
       
  1062 					resize();
       
  1063 					actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
       
  1064 				}
       
  1065 			} else {
       
  1066 				// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
       
  1067 				if (computed.overflowY !== 'hidden') {
       
  1068 					changeOverflow('hidden');
       
  1069 					resize();
       
  1070 					actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
       
  1071 				}
       
  1072 			}
       
  1073 
       
  1074 			if (cachedHeight !== actualHeight) {
       
  1075 				cachedHeight = actualHeight;
       
  1076 				var evt = createEvent('autosize:resized');
       
  1077 				try {
       
  1078 					ta.dispatchEvent(evt);
       
  1079 				} catch (err) {
       
  1080 					// Firefox will throw an error on dispatchEvent for a detached element
       
  1081 					// https://bugzilla.mozilla.org/show_bug.cgi?id=889376
       
  1082 				}
       
  1083 			}
       
  1084 		}
       
  1085 
       
  1086 		var pageResize = function pageResize() {
       
  1087 			if (ta.clientWidth !== clientWidth) {
       
  1088 				update();
       
  1089 			}
       
  1090 		};
       
  1091 
       
  1092 		var destroy = function (style) {
       
  1093 			window.removeEventListener('resize', pageResize, false);
       
  1094 			ta.removeEventListener('input', update, false);
       
  1095 			ta.removeEventListener('keyup', update, false);
       
  1096 			ta.removeEventListener('autosize:destroy', destroy, false);
       
  1097 			ta.removeEventListener('autosize:update', update, false);
       
  1098 
       
  1099 			Object.keys(style).forEach(function (key) {
       
  1100 				ta.style[key] = style[key];
       
  1101 			});
       
  1102 
       
  1103 			map.delete(ta);
       
  1104 		}.bind(ta, {
       
  1105 			height: ta.style.height,
       
  1106 			resize: ta.style.resize,
       
  1107 			overflowY: ta.style.overflowY,
       
  1108 			overflowX: ta.style.overflowX,
       
  1109 			wordWrap: ta.style.wordWrap
       
  1110 		});
       
  1111 
       
  1112 		ta.addEventListener('autosize:destroy', destroy, false);
       
  1113 
       
  1114 		// IE9 does not fire onpropertychange or oninput for deletions,
       
  1115 		// so binding to onkeyup to catch most of those events.
       
  1116 		// There is no way that I know of to detect something like 'cut' in IE9.
       
  1117 		if ('onpropertychange' in ta && 'oninput' in ta) {
       
  1118 			ta.addEventListener('keyup', update, false);
       
  1119 		}
       
  1120 
       
  1121 		window.addEventListener('resize', pageResize, false);
       
  1122 		ta.addEventListener('input', update, false);
       
  1123 		ta.addEventListener('autosize:update', update, false);
       
  1124 		ta.style.overflowX = 'hidden';
       
  1125 		ta.style.wordWrap = 'break-word';
       
  1126 
       
  1127 		map.set(ta, {
       
  1128 			destroy: destroy,
       
  1129 			update: update
       
  1130 		});
       
  1131 
       
  1132 		init();
       
  1133 	}
       
  1134 
       
  1135 	function destroy(ta) {
       
  1136 		var methods = map.get(ta);
       
  1137 		if (methods) {
       
  1138 			methods.destroy();
       
  1139 		}
       
  1140 	}
       
  1141 
       
  1142 	function update(ta) {
       
  1143 		var methods = map.get(ta);
       
  1144 		if (methods) {
       
  1145 			methods.update();
       
  1146 		}
       
  1147 	}
       
  1148 
       
  1149 	var autosize = null;
       
  1150 
       
  1151 	// Do nothing in Node.js environment and IE8 (or lower)
       
  1152 	if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
       
  1153 		autosize = function autosize(el) {
       
  1154 			return el;
       
  1155 		};
       
  1156 		autosize.destroy = function (el) {
       
  1157 			return el;
       
  1158 		};
       
  1159 		autosize.update = function (el) {
       
  1160 			return el;
       
  1161 		};
       
  1162 	} else {
       
  1163 		autosize = function autosize(el, options) {
       
  1164 			if (el) {
       
  1165 				Array.prototype.forEach.call(el.length ? el : [el], function (x) {
       
  1166 					return assign(x, options);
       
  1167 				});
       
  1168 			}
       
  1169 			return el;
       
  1170 		};
       
  1171 		autosize.destroy = function (el) {
       
  1172 			if (el) {
       
  1173 				Array.prototype.forEach.call(el.length ? el : [el], destroy);
       
  1174 			}
       
  1175 			return el;
       
  1176 		};
       
  1177 		autosize.update = function (el) {
       
  1178 			if (el) {
       
  1179 				Array.prototype.forEach.call(el.length ? el : [el], update);
       
  1180 			}
       
  1181 			return el;
       
  1182 		};
       
  1183 	}
       
  1184 
       
  1185 	exports.default = autosize;
       
  1186 	module.exports = exports['default'];
       
  1187 });
       
  1188 
       
  1189 /***/ }),
       
  1190 
       
  1191 /***/ "HSyU":
       
  1192 /***/ (function(module, exports) {
       
  1193 
       
  1194 (function() { module.exports = window["wp"]["blocks"]; }());
       
  1195 
       
  1196 /***/ }),
       
  1197 
       
  1198 /***/ "K9lf":
       
  1199 /***/ (function(module, exports) {
       
  1200 
       
  1201 (function() { module.exports = window["wp"]["compose"]; }());
       
  1202 
       
  1203 /***/ }),
       
  1204 
       
  1205 /***/ "Mmq9":
       
  1206 /***/ (function(module, exports) {
       
  1207 
       
  1208 (function() { module.exports = window["wp"]["url"]; }());
       
  1209 
       
  1210 /***/ }),
       
  1211 
       
  1212 /***/ "NMb1":
       
  1213 /***/ (function(module, exports) {
       
  1214 
       
  1215 (function() { module.exports = window["wp"]["deprecated"]; }());
       
  1216 
       
  1217 /***/ }),
       
  1218 
       
  1219 /***/ "NTP4":
   148 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1220 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   149 
  1221 
   150 "use strict";
  1222 "use strict";
   151 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
  1223 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
   152 function _extends() {
  1224 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
   153   _extends = Object.assign || function (target) {
  1225 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
   154     for (var i = 1; i < arguments.length; i++) {
  1226 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
   155       var source = arguments[i];
  1227 
   156 
  1228 
   157       for (var key in source) {
  1229 /**
   158         if (Object.prototype.hasOwnProperty.call(source, key)) {
  1230  * WordPress dependencies
   159           target[key] = source[key];
  1231  */
       
  1232 
       
  1233 const upload = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  1234   xmlns: "http://www.w3.org/2000/svg",
       
  1235   viewBox: "0 0 24 24"
       
  1236 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
  1237   d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"
       
  1238 }));
       
  1239 /* harmony default export */ __webpack_exports__["a"] = (upload);
       
  1240 
       
  1241 
       
  1242 /***/ }),
       
  1243 
       
  1244 /***/ "NWDH":
       
  1245 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1246 
       
  1247 "use strict";
       
  1248 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
  1249 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
  1250 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
  1251 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
  1252 
       
  1253 
       
  1254 /**
       
  1255  * WordPress dependencies
       
  1256  */
       
  1257 
       
  1258 const chevronDown = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  1259   viewBox: "0 0 24 24",
       
  1260   xmlns: "http://www.w3.org/2000/svg"
       
  1261 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
  1262   d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
       
  1263 }));
       
  1264 /* harmony default export */ __webpack_exports__["a"] = (chevronDown);
       
  1265 
       
  1266 
       
  1267 /***/ }),
       
  1268 
       
  1269 /***/ "O6Fj":
       
  1270 /***/ (function(module, exports, __webpack_require__) {
       
  1271 
       
  1272 "use strict";
       
  1273 
       
  1274 exports.__esModule = true;
       
  1275 var TextareaAutosize_1 = __webpack_require__("CNgt");
       
  1276 exports["default"] = TextareaAutosize_1.TextareaAutosize;
       
  1277 
       
  1278 
       
  1279 /***/ }),
       
  1280 
       
  1281 /***/ "OzlF":
       
  1282 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1283 
       
  1284 "use strict";
       
  1285 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
  1286 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
  1287 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
  1288 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
  1289 
       
  1290 
       
  1291 /**
       
  1292  * WordPress dependencies
       
  1293  */
       
  1294 
       
  1295 const listView = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  1296   viewBox: "0 0 24 24",
       
  1297   xmlns: "http://www.w3.org/2000/svg"
       
  1298 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
  1299   d: "M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"
       
  1300 }));
       
  1301 /* harmony default export */ __webpack_exports__["a"] = (listView);
       
  1302 
       
  1303 
       
  1304 /***/ }),
       
  1305 
       
  1306 /***/ "P7XM":
       
  1307 /***/ (function(module, exports) {
       
  1308 
       
  1309 if (typeof Object.create === 'function') {
       
  1310   // implementation from standard node.js 'util' module
       
  1311   module.exports = function inherits(ctor, superCtor) {
       
  1312     if (superCtor) {
       
  1313       ctor.super_ = superCtor
       
  1314       ctor.prototype = Object.create(superCtor.prototype, {
       
  1315         constructor: {
       
  1316           value: ctor,
       
  1317           enumerable: false,
       
  1318           writable: true,
       
  1319           configurable: true
   160         }
  1320         }
   161       }
  1321       })
   162     }
  1322     }
   163 
       
   164     return target;
       
   165   };
  1323   };
   166 
  1324 } else {
   167   return _extends.apply(this, arguments);
  1325   // old school shim for old browsers
   168 }
  1326   module.exports = function inherits(ctor, superCtor) {
       
  1327     if (superCtor) {
       
  1328       ctor.super_ = superCtor
       
  1329       var TempCtor = function () {}
       
  1330       TempCtor.prototype = superCtor.prototype
       
  1331       ctor.prototype = new TempCtor()
       
  1332       ctor.prototype.constructor = ctor
       
  1333     }
       
  1334   }
       
  1335 }
       
  1336 
   169 
  1337 
   170 /***/ }),
  1338 /***/ }),
   171 /* 9 */
  1339 
       
  1340 /***/ "PJYZ":
   172 /***/ (function(module, exports) {
  1341 /***/ (function(module, exports) {
   173 
  1342 
   174 (function() { module.exports = this["wp"]["compose"]; }());
  1343 function _assertThisInitialized(self) {
       
  1344   if (self === void 0) {
       
  1345     throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
       
  1346   }
       
  1347 
       
  1348   return self;
       
  1349 }
       
  1350 
       
  1351 module.exports = _assertThisInitialized;
       
  1352 module.exports["default"] = module.exports, module.exports.__esModule = true;
   175 
  1353 
   176 /***/ }),
  1354 /***/ }),
   177 /* 10 */
  1355 
       
  1356 /***/ "Q4Sy":
       
  1357 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1358 
       
  1359 "use strict";
       
  1360 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
  1361 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
  1362 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
  1363 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
  1364 
       
  1365 
       
  1366 /**
       
  1367  * WordPress dependencies
       
  1368  */
       
  1369 
       
  1370 const plus = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  1371   xmlns: "http://www.w3.org/2000/svg",
       
  1372   viewBox: "0 0 24 24"
       
  1373 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
  1374   d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
       
  1375 }));
       
  1376 /* harmony default export */ __webpack_exports__["a"] = (plus);
       
  1377 
       
  1378 
       
  1379 /***/ }),
       
  1380 
       
  1381 /***/ "RMJe":
       
  1382 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1383 
       
  1384 "use strict";
       
  1385 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
  1386 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
  1387 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
  1388 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
  1389 
       
  1390 
       
  1391 /**
       
  1392  * WordPress dependencies
       
  1393  */
       
  1394 
       
  1395 const check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  1396   xmlns: "http://www.w3.org/2000/svg",
       
  1397   viewBox: "0 0 24 24"
       
  1398 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
  1399   d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"
       
  1400 }));
       
  1401 /* harmony default export */ __webpack_exports__["a"] = (check);
       
  1402 
       
  1403 
       
  1404 /***/ }),
       
  1405 
       
  1406 /***/ "Rk8H":
       
  1407 /***/ (function(module, exports, __webpack_require__) {
       
  1408 
       
  1409 // Load in dependencies
       
  1410 var computedStyle = __webpack_require__("jTPX");
       
  1411 
       
  1412 /**
       
  1413  * Calculate the `line-height` of a given node
       
  1414  * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
       
  1415  * @returns {Number} `line-height` of the element in pixels
       
  1416  */
       
  1417 function lineHeight(node) {
       
  1418   // Grab the line-height via style
       
  1419   var lnHeightStr = computedStyle(node, 'line-height');
       
  1420   var lnHeight = parseFloat(lnHeightStr, 10);
       
  1421 
       
  1422   // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
       
  1423   if (lnHeightStr === lnHeight + '') {
       
  1424     // Save the old lineHeight style and update the em unit to the element
       
  1425     var _lnHeightStyle = node.style.lineHeight;
       
  1426     node.style.lineHeight = lnHeightStr + 'em';
       
  1427 
       
  1428     // Calculate the em based height
       
  1429     lnHeightStr = computedStyle(node, 'line-height');
       
  1430     lnHeight = parseFloat(lnHeightStr, 10);
       
  1431 
       
  1432     // Revert the lineHeight style
       
  1433     if (_lnHeightStyle) {
       
  1434       node.style.lineHeight = _lnHeightStyle;
       
  1435     } else {
       
  1436       delete node.style.lineHeight;
       
  1437     }
       
  1438   }
       
  1439 
       
  1440   // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
       
  1441   // DEV: `em` units are converted to `pt` in IE6
       
  1442   // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
       
  1443   if (lnHeightStr.indexOf('pt') !== -1) {
       
  1444     lnHeight *= 4;
       
  1445     lnHeight /= 3;
       
  1446   // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
       
  1447   } else if (lnHeightStr.indexOf('mm') !== -1) {
       
  1448     lnHeight *= 96;
       
  1449     lnHeight /= 25.4;
       
  1450   // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
       
  1451   } else if (lnHeightStr.indexOf('cm') !== -1) {
       
  1452     lnHeight *= 96;
       
  1453     lnHeight /= 2.54;
       
  1454   // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
       
  1455   } else if (lnHeightStr.indexOf('in') !== -1) {
       
  1456     lnHeight *= 96;
       
  1457   // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
       
  1458   } else if (lnHeightStr.indexOf('pc') !== -1) {
       
  1459     lnHeight *= 16;
       
  1460   }
       
  1461 
       
  1462   // Continue our computation
       
  1463   lnHeight = Math.round(lnHeight);
       
  1464 
       
  1465   // If the line-height is "normal", calculate by font-size
       
  1466   if (lnHeightStr === 'normal') {
       
  1467     // Create a temporary node
       
  1468     var nodeName = node.nodeName;
       
  1469     var _node = document.createElement(nodeName);
       
  1470     _node.innerHTML = '&nbsp;';
       
  1471 
       
  1472     // If we have a text area, reset it to only 1 row
       
  1473     // https://github.com/twolfson/line-height/issues/4
       
  1474     if (nodeName.toUpperCase() === 'TEXTAREA') {
       
  1475       _node.setAttribute('rows', '1');
       
  1476     }
       
  1477 
       
  1478     // Set the font-size of the element
       
  1479     var fontSizeStr = computedStyle(node, 'font-size');
       
  1480     _node.style.fontSize = fontSizeStr;
       
  1481 
       
  1482     // Remove default padding/border which can affect offset height
       
  1483     // https://github.com/twolfson/line-height/issues/4
       
  1484     // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
       
  1485     _node.style.padding = '0px';
       
  1486     _node.style.border = '0px';
       
  1487 
       
  1488     // Append it to the body
       
  1489     var body = document.body;
       
  1490     body.appendChild(_node);
       
  1491 
       
  1492     // Assume the line height of the element is the height
       
  1493     var height = _node.offsetHeight;
       
  1494     lnHeight = height;
       
  1495 
       
  1496     // Remove our child from the DOM
       
  1497     body.removeChild(_node);
       
  1498   }
       
  1499 
       
  1500   // Return the calculated height
       
  1501   return lnHeight;
       
  1502 }
       
  1503 
       
  1504 // Export lineHeight
       
  1505 module.exports = lineHeight;
       
  1506 
       
  1507 
       
  1508 /***/ }),
       
  1509 
       
  1510 /***/ "RxS6":
   178 /***/ (function(module, exports) {
  1511 /***/ (function(module, exports) {
   179 
  1512 
   180 (function() { module.exports = this["wp"]["blocks"]; }());
  1513 (function() { module.exports = window["wp"]["keycodes"]; }());
   181 
  1514 
   182 /***/ }),
  1515 /***/ }),
   183 /* 11 */
  1516 
       
  1517 /***/ "SVSp":
       
  1518 /***/ (function(module, exports) {
       
  1519 
       
  1520 (function() { module.exports = window["wp"]["shortcode"]; }());
       
  1521 
       
  1522 /***/ }),
       
  1523 
       
  1524 /***/ "SksO":
       
  1525 /***/ (function(module, exports) {
       
  1526 
       
  1527 function _setPrototypeOf(o, p) {
       
  1528   module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
       
  1529     o.__proto__ = p;
       
  1530     return o;
       
  1531   };
       
  1532 
       
  1533   module.exports["default"] = module.exports, module.exports.__esModule = true;
       
  1534   return _setPrototypeOf(o, p);
       
  1535 }
       
  1536 
       
  1537 module.exports = _setPrototypeOf;
       
  1538 module.exports["default"] = module.exports, module.exports.__esModule = true;
       
  1539 
       
  1540 /***/ }),
       
  1541 
       
  1542 /***/ "TSYQ":
   184 /***/ (function(module, exports, __webpack_require__) {
  1543 /***/ (function(module, exports, __webpack_require__) {
   185 
  1544 
   186 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  1545 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
   187   Copyright (c) 2017 Jed Watson.
  1546   Copyright (c) 2018 Jed Watson.
   188   Licensed under the MIT License (MIT), see
  1547   Licensed under the MIT License (MIT), see
   189   http://jedwatson.github.io/classnames
  1548   http://jedwatson.github.io/classnames
   190 */
  1549 */
   191 /* global define */
  1550 /* global define */
   192 
  1551 
   193 (function () {
  1552 (function () {
   194 	'use strict';
  1553 	'use strict';
   195 
  1554 
   196 	var hasOwn = {}.hasOwnProperty;
  1555 	var hasOwn = {}.hasOwnProperty;
   197 
  1556 
   198 	function classNames () {
  1557 	function classNames() {
   199 		var classes = [];
  1558 		var classes = [];
   200 
  1559 
   201 		for (var i = 0; i < arguments.length; i++) {
  1560 		for (var i = 0; i < arguments.length; i++) {
   202 			var arg = arguments[i];
  1561 			var arg = arguments[i];
   203 			if (!arg) continue;
  1562 			if (!arg) continue;
   204 
  1563 
   205 			var argType = typeof arg;
  1564 			var argType = typeof arg;
   206 
  1565 
   207 			if (argType === 'string' || argType === 'number') {
  1566 			if (argType === 'string' || argType === 'number') {
   208 				classes.push(arg);
  1567 				classes.push(arg);
   209 			} else if (Array.isArray(arg) && arg.length) {
  1568 			} else if (Array.isArray(arg)) {
   210 				var inner = classNames.apply(null, arg);
  1569 				if (arg.length) {
   211 				if (inner) {
  1570 					var inner = classNames.apply(null, arg);
   212 					classes.push(inner);
  1571 					if (inner) {
       
  1572 						classes.push(inner);
       
  1573 					}
   213 				}
  1574 				}
   214 			} else if (argType === 'object') {
  1575 			} else if (argType === 'object') {
   215 				for (var key in arg) {
  1576 				if (arg.toString === Object.prototype.toString) {
   216 					if (hasOwn.call(arg, key) && arg[key]) {
  1577 					for (var key in arg) {
   217 						classes.push(key);
  1578 						if (hasOwn.call(arg, key) && arg[key]) {
       
  1579 							classes.push(key);
       
  1580 						}
   218 					}
  1581 					}
       
  1582 				} else {
       
  1583 					classes.push(arg.toString());
   219 				}
  1584 				}
   220 			}
  1585 			}
   221 		}
  1586 		}
   222 
  1587 
   223 		return classes.join(' ');
  1588 		return classes.join(' ');
   235 	} else {}
  1600 	} else {}
   236 }());
  1601 }());
   237 
  1602 
   238 
  1603 
   239 /***/ }),
  1604 /***/ }),
   240 /* 12 */
  1605 
       
  1606 /***/ "Tqx9":
       
  1607 /***/ (function(module, exports) {
       
  1608 
       
  1609 (function() { module.exports = window["wp"]["primitives"]; }());
       
  1610 
       
  1611 /***/ }),
       
  1612 
       
  1613 /***/ "VKE3":
   241 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1614 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   242 
  1615 
   243 "use strict";
  1616 "use strict";
   244 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
  1617 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
   245 function _assertThisInitialized(self) {
  1618 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
   246   if (self === void 0) {
  1619 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
   247     throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1620 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
   248   }
  1621 
   249 
  1622 
   250   return self;
  1623 /**
   251 }
  1624  * WordPress dependencies
       
  1625  */
       
  1626 
       
  1627 const moreVertical = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  1628   xmlns: "http://www.w3.org/2000/svg",
       
  1629   viewBox: "0 0 24 24"
       
  1630 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
  1631   d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
       
  1632 }));
       
  1633 /* harmony default export */ __webpack_exports__["a"] = (moreVertical);
       
  1634 
   252 
  1635 
   253 /***/ }),
  1636 /***/ }),
   254 /* 13 */
  1637 
   255 /***/ (function(module, exports) {
  1638 /***/ "VbXa":
   256 
  1639 /***/ (function(module, exports, __webpack_require__) {
   257 (function() { module.exports = this["React"]; }());
  1640 
       
  1641 var setPrototypeOf = __webpack_require__("SksO");
       
  1642 
       
  1643 function _inheritsLoose(subClass, superClass) {
       
  1644   subClass.prototype = Object.create(superClass.prototype);
       
  1645   subClass.prototype.constructor = subClass;
       
  1646   setPrototypeOf(subClass, superClass);
       
  1647 }
       
  1648 
       
  1649 module.exports = _inheritsLoose;
       
  1650 module.exports["default"] = module.exports, module.exports.__esModule = true;
   258 
  1651 
   259 /***/ }),
  1652 /***/ }),
   260 /* 14 */
  1653 
   261 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1654 /***/ "WbBG":
       
  1655 /***/ (function(module, exports, __webpack_require__) {
   262 
  1656 
   263 "use strict";
  1657 "use strict";
   264 
       
   265 // EXPORTS
       
   266 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
       
   267 
       
   268 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
       
   269 var arrayWithHoles = __webpack_require__(38);
       
   270 
       
   271 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
       
   272 function _iterableToArrayLimit(arr, i) {
       
   273   if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
       
   274   var _arr = [];
       
   275   var _n = true;
       
   276   var _d = false;
       
   277   var _e = undefined;
       
   278 
       
   279   try {
       
   280     for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
       
   281       _arr.push(_s.value);
       
   282 
       
   283       if (i && _arr.length === i) break;
       
   284     }
       
   285   } catch (err) {
       
   286     _d = true;
       
   287     _e = err;
       
   288   } finally {
       
   289     try {
       
   290       if (!_n && _i["return"] != null) _i["return"]();
       
   291     } finally {
       
   292       if (_d) throw _e;
       
   293     }
       
   294   }
       
   295 
       
   296   return _arr;
       
   297 }
       
   298 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
       
   299 var unsupportedIterableToArray = __webpack_require__(29);
       
   300 
       
   301 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
       
   302 var nonIterableRest = __webpack_require__(39);
       
   303 
       
   304 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
       
   305 
       
   306 
       
   307 
       
   308 
       
   309 function _slicedToArray(arr, i) {
       
   310   return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
       
   311 }
       
   312 
       
   313 /***/ }),
       
   314 /* 15 */
       
   315 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   316 
       
   317 "use strict";
       
   318 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
       
   319 /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
       
   320 
       
   321 function _objectWithoutProperties(source, excluded) {
       
   322   if (source == null) return {};
       
   323   var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
       
   324   var key, i;
       
   325 
       
   326   if (Object.getOwnPropertySymbols) {
       
   327     var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
       
   328 
       
   329     for (i = 0; i < sourceSymbolKeys.length; i++) {
       
   330       key = sourceSymbolKeys[i];
       
   331       if (excluded.indexOf(key) >= 0) continue;
       
   332       if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
       
   333       target[key] = source[key];
       
   334     }
       
   335   }
       
   336 
       
   337   return target;
       
   338 }
       
   339 
       
   340 /***/ }),
       
   341 /* 16 */
       
   342 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   343 
       
   344 "use strict";
       
   345 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
       
   346 function _getPrototypeOf(o) {
       
   347   _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
       
   348     return o.__proto__ || Object.getPrototypeOf(o);
       
   349   };
       
   350   return _getPrototypeOf(o);
       
   351 }
       
   352 
       
   353 /***/ }),
       
   354 /* 17 */
       
   355 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   356 
       
   357 "use strict";
       
   358 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
       
   359 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectSpread2; });
       
   360 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _createForOfIteratorHelperLoose; });
       
   361 function _defineProperty(obj, key, value) {
       
   362   if (key in obj) {
       
   363     Object.defineProperty(obj, key, {
       
   364       value: value,
       
   365       enumerable: true,
       
   366       configurable: true,
       
   367       writable: true
       
   368     });
       
   369   } else {
       
   370     obj[key] = value;
       
   371   }
       
   372 
       
   373   return obj;
       
   374 }
       
   375 
       
   376 function ownKeys(object, enumerableOnly) {
       
   377   var keys = Object.keys(object);
       
   378 
       
   379   if (Object.getOwnPropertySymbols) {
       
   380     var symbols = Object.getOwnPropertySymbols(object);
       
   381     if (enumerableOnly) symbols = symbols.filter(function (sym) {
       
   382       return Object.getOwnPropertyDescriptor(object, sym).enumerable;
       
   383     });
       
   384     keys.push.apply(keys, symbols);
       
   385   }
       
   386 
       
   387   return keys;
       
   388 }
       
   389 
       
   390 function _objectSpread2(target) {
       
   391   for (var i = 1; i < arguments.length; i++) {
       
   392     var source = arguments[i] != null ? arguments[i] : {};
       
   393 
       
   394     if (i % 2) {
       
   395       ownKeys(Object(source), true).forEach(function (key) {
       
   396         _defineProperty(target, key, source[key]);
       
   397       });
       
   398     } else if (Object.getOwnPropertyDescriptors) {
       
   399       Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
       
   400     } else {
       
   401       ownKeys(Object(source)).forEach(function (key) {
       
   402         Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
       
   403       });
       
   404     }
       
   405   }
       
   406 
       
   407   return target;
       
   408 }
       
   409 
       
   410 function _objectWithoutPropertiesLoose(source, excluded) {
       
   411   if (source == null) return {};
       
   412   var target = {};
       
   413   var sourceKeys = Object.keys(source);
       
   414   var key, i;
       
   415 
       
   416   for (i = 0; i < sourceKeys.length; i++) {
       
   417     key = sourceKeys[i];
       
   418     if (excluded.indexOf(key) >= 0) continue;
       
   419     target[key] = source[key];
       
   420   }
       
   421 
       
   422   return target;
       
   423 }
       
   424 
       
   425 function _unsupportedIterableToArray(o, minLen) {
       
   426   if (!o) return;
       
   427   if (typeof o === "string") return _arrayLikeToArray(o, minLen);
       
   428   var n = Object.prototype.toString.call(o).slice(8, -1);
       
   429   if (n === "Object" && o.constructor) n = o.constructor.name;
       
   430   if (n === "Map" || n === "Set") return Array.from(o);
       
   431   if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
       
   432 }
       
   433 
       
   434 function _arrayLikeToArray(arr, len) {
       
   435   if (len == null || len > arr.length) len = arr.length;
       
   436 
       
   437   for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
       
   438 
       
   439   return arr2;
       
   440 }
       
   441 
       
   442 function _createForOfIteratorHelperLoose(o, allowArrayLike) {
       
   443   var it;
       
   444 
       
   445   if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
       
   446     if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
       
   447       if (it) o = it;
       
   448       var i = 0;
       
   449       return function () {
       
   450         if (i >= o.length) return {
       
   451           done: true
       
   452         };
       
   453         return {
       
   454           done: false,
       
   455           value: o[i++]
       
   456         };
       
   457       };
       
   458     }
       
   459 
       
   460     throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
       
   461   }
       
   462 
       
   463   it = o[Symbol.iterator]();
       
   464   return it.next.bind(it);
       
   465 }
       
   466 
       
   467 
       
   468 
       
   469 
       
   470 /***/ }),
       
   471 /* 18 */
       
   472 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   473 
       
   474 "use strict";
       
   475 
       
   476 // EXPORTS
       
   477 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
       
   478 
       
   479 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
       
   480 var arrayLikeToArray = __webpack_require__(26);
       
   481 
       
   482 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
       
   483 
       
   484 function _arrayWithoutHoles(arr) {
       
   485   if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
       
   486 }
       
   487 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
       
   488 var iterableToArray = __webpack_require__(35);
       
   489 
       
   490 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
       
   491 var unsupportedIterableToArray = __webpack_require__(29);
       
   492 
       
   493 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
       
   494 function _nonIterableSpread() {
       
   495   throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
       
   496 }
       
   497 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
       
   498 
       
   499 
       
   500 
       
   501 
       
   502 function _toConsumableArray(arr) {
       
   503   return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
       
   504 }
       
   505 
       
   506 /***/ }),
       
   507 /* 19 */
       
   508 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   509 
       
   510 "use strict";
       
   511 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
       
   512 function _defineProperties(target, props) {
       
   513   for (var i = 0; i < props.length; i++) {
       
   514     var descriptor = props[i];
       
   515     descriptor.enumerable = descriptor.enumerable || false;
       
   516     descriptor.configurable = true;
       
   517     if ("value" in descriptor) descriptor.writable = true;
       
   518     Object.defineProperty(target, descriptor.key, descriptor);
       
   519   }
       
   520 }
       
   521 
       
   522 function _createClass(Constructor, protoProps, staticProps) {
       
   523   if (protoProps) _defineProperties(Constructor.prototype, protoProps);
       
   524   if (staticProps) _defineProperties(Constructor, staticProps);
       
   525   return Constructor;
       
   526 }
       
   527 
       
   528 /***/ }),
       
   529 /* 20 */
       
   530 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   531 
       
   532 "use strict";
       
   533 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
       
   534 function _classCallCheck(instance, Constructor) {
       
   535   if (!(instance instanceof Constructor)) {
       
   536     throw new TypeError("Cannot call a class as a function");
       
   537   }
       
   538 }
       
   539 
       
   540 /***/ }),
       
   541 /* 21 */
       
   542 /***/ (function(module, exports) {
       
   543 
       
   544 (function() { module.exports = this["wp"]["keycodes"]; }());
       
   545 
       
   546 /***/ }),
       
   547 /* 22 */
       
   548 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   549 
       
   550 "use strict";
       
   551 
       
   552 // EXPORTS
       
   553 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
       
   554 
       
   555 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
       
   556 function _setPrototypeOf(o, p) {
       
   557   _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
       
   558     o.__proto__ = p;
       
   559     return o;
       
   560   };
       
   561 
       
   562   return _setPrototypeOf(o, p);
       
   563 }
       
   564 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
       
   565 
       
   566 function _inherits(subClass, superClass) {
       
   567   if (typeof superClass !== "function" && superClass !== null) {
       
   568     throw new TypeError("Super expression must either be null or a function");
       
   569   }
       
   570 
       
   571   subClass.prototype = Object.create(superClass && superClass.prototype, {
       
   572     constructor: {
       
   573       value: subClass,
       
   574       writable: true,
       
   575       configurable: true
       
   576     }
       
   577   });
       
   578   if (superClass) _setPrototypeOf(subClass, superClass);
       
   579 }
       
   580 
       
   581 /***/ }),
       
   582 /* 23 */
       
   583 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   584 
       
   585 "use strict";
       
   586 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
       
   587 /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
       
   588 /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
       
   589 
       
   590 
       
   591 function _possibleConstructorReturn(self, call) {
       
   592   if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
       
   593     return call;
       
   594   }
       
   595 
       
   596   return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
       
   597 }
       
   598 
       
   599 /***/ }),
       
   600 /* 24 */
       
   601 /***/ (function(module, exports) {
       
   602 
       
   603 (function() { module.exports = this["regeneratorRuntime"]; }());
       
   604 
       
   605 /***/ }),
       
   606 /* 25 */
       
   607 /***/ (function(module, exports) {
       
   608 
       
   609 (function() { module.exports = this["wp"]["richText"]; }());
       
   610 
       
   611 /***/ }),
       
   612 /* 26 */
       
   613 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   614 
       
   615 "use strict";
       
   616 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
       
   617 function _arrayLikeToArray(arr, len) {
       
   618   if (len == null || len > arr.length) len = arr.length;
       
   619 
       
   620   for (var i = 0, arr2 = new Array(len); i < len; i++) {
       
   621     arr2[i] = arr[i];
       
   622   }
       
   623 
       
   624   return arr2;
       
   625 }
       
   626 
       
   627 /***/ }),
       
   628 /* 27 */,
       
   629 /* 28 */
       
   630 /***/ (function(module, exports, __webpack_require__) {
       
   631 
       
   632 /**
  1658 /**
   633  * Copyright (c) 2013-present, Facebook, Inc.
  1659  * Copyright (c) 2013-present, Facebook, Inc.
   634  *
  1660  *
   635  * This source code is licensed under the MIT license found in the
  1661  * This source code is licensed under the MIT license found in the
   636  * LICENSE file in the root directory of this source tree.
  1662  * LICENSE file in the root directory of this source tree.
   637  */
  1663  */
   638 
  1664 
   639 if (false) { var throwOnDirectAccess, ReactIs; } else {
  1665 
   640   // By explicitly using `prop-types` you are opting into new production behavior.
  1666 
   641   // http://fb.me/prop-types-in-prod
  1667 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
   642   module.exports = __webpack_require__(138)();
  1668 
   643 }
  1669 module.exports = ReactPropTypesSecret;
   644 
  1670 
   645 
  1671 
   646 /***/ }),
  1672 /***/ }),
   647 /* 29 */
  1673 
       
  1674 /***/ "XgzB":
   648 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1675 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   649 
  1676 
   650 "use strict";
  1677 "use strict";
   651 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
  1678 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
   652 /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
  1679 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
   653 
  1680 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
   654 function _unsupportedIterableToArray(o, minLen) {
  1681 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
   655   if (!o) return;
  1682 
   656   if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
  1683 
   657   var n = Object.prototype.toString.call(o).slice(8, -1);
  1684 /**
   658   if (n === "Object" && o.constructor) n = o.constructor.name;
  1685  * WordPress dependencies
   659   if (n === "Map" || n === "Set") return Array.from(o);
  1686  */
   660   if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
  1687 
   661 }
  1688 const chevronUp = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  1689   viewBox: "0 0 24 24",
       
  1690   xmlns: "http://www.w3.org/2000/svg"
       
  1691 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
  1692   d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"
       
  1693 }));
       
  1694 /* harmony default export */ __webpack_exports__["a"] = (chevronUp);
       
  1695 
   662 
  1696 
   663 /***/ }),
  1697 /***/ }),
   664 /* 30 */
  1698 
       
  1699 /***/ "YLtl":
   665 /***/ (function(module, exports) {
  1700 /***/ (function(module, exports) {
   666 
  1701 
   667 (function() { module.exports = this["wp"]["dom"]; }());
  1702 (function() { module.exports = window["lodash"]; }());
   668 
  1703 
   669 /***/ }),
  1704 /***/ }),
   670 /* 31 */
  1705 
   671 /***/ (function(module, exports) {
  1706 /***/ "ZO3Q":
   672 
  1707 /***/ (function(module, exports, __webpack_require__) {
   673 (function() { module.exports = this["wp"]["url"]; }());
       
   674 
       
   675 /***/ }),
       
   676 /* 32 */
       
   677 /***/ (function(module, exports) {
       
   678 
       
   679 (function() { module.exports = this["wp"]["hooks"]; }());
       
   680 
       
   681 /***/ }),
       
   682 /* 33 */,
       
   683 /* 34 */,
       
   684 /* 35 */
       
   685 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   686 
  1708 
   687 "use strict";
  1709 "use strict";
   688 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
  1710 
   689 function _iterableToArray(iter) {
  1711 
   690   if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  1712 Object.defineProperty(exports, '__esModule', { value: true });
   691 }
  1713 
   692 
  1714 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
   693 /***/ }),
  1715 
   694 /* 36 */,
  1716 var _extends = _interopDefault(__webpack_require__("pVnL"));
   695 /* 37 */
  1717 var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__("8OQS"));
   696 /***/ (function(module, exports) {
  1718 var React = __webpack_require__("cDcd");
   697 
  1719 var React__default = _interopDefault(React);
   698 (function() { module.exports = this["wp"]["deprecated"]; }());
  1720 var _inheritsLoose = _interopDefault(__webpack_require__("VbXa"));
   699 
  1721 var _assertThisInitialized = _interopDefault(__webpack_require__("PJYZ"));
   700 /***/ }),
  1722 
   701 /* 38 */
  1723 var is = {
   702 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1724   arr: Array.isArray,
   703 
  1725   obj: function obj(a) {
   704 "use strict";
  1726     return Object.prototype.toString.call(a) === '[object Object]';
   705 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
  1727   },
   706 function _arrayWithHoles(arr) {
  1728   fun: function fun(a) {
   707   if (Array.isArray(arr)) return arr;
  1729     return typeof a === 'function';
   708 }
  1730   },
   709 
  1731   str: function str(a) {
   710 /***/ }),
  1732     return typeof a === 'string';
   711 /* 39 */
  1733   },
   712 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1734   num: function num(a) {
   713 
  1735     return typeof a === 'number';
   714 "use strict";
  1736   },
   715 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
  1737   und: function und(a) {
   716 function _nonIterableRest() {
  1738     return a === void 0;
   717   throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  1739   },
   718 }
  1740   nul: function nul(a) {
   719 
  1741     return a === null;
   720 /***/ }),
  1742   },
   721 /* 40 */
  1743   set: function set(a) {
   722 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1744     return a instanceof Set;
   723 
  1745   },
   724 "use strict";
  1746   map: function map(a) {
   725 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
  1747     return a instanceof Map;
   726 function _typeof(obj) {
  1748   },
   727   "@babel/helpers - typeof";
  1749   equ: function equ(a, b) {
   728 
  1750     if (typeof a !== typeof b) return false;
   729   if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  1751     if (is.str(a) || is.num(a)) return a === b;
   730     _typeof = function _typeof(obj) {
  1752     if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
   731       return typeof obj;
  1753     var i;
       
  1754 
       
  1755     for (i in a) {
       
  1756       if (!(i in b)) return false;
       
  1757     }
       
  1758 
       
  1759     for (i in b) {
       
  1760       if (a[i] !== b[i]) return false;
       
  1761     }
       
  1762 
       
  1763     return is.und(i) ? a === b : true;
       
  1764   }
       
  1765 };
       
  1766 function merge(target, lowercase) {
       
  1767   if (lowercase === void 0) {
       
  1768     lowercase = true;
       
  1769   }
       
  1770 
       
  1771   return function (object) {
       
  1772     return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
       
  1773       var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
       
  1774       acc[key] = target(key);
       
  1775       return acc;
       
  1776     }, target);
       
  1777   };
       
  1778 }
       
  1779 function useForceUpdate() {
       
  1780   var _useState = React.useState(false),
       
  1781       f = _useState[1];
       
  1782 
       
  1783   var forceUpdate = React.useCallback(function () {
       
  1784     return f(function (v) {
       
  1785       return !v;
       
  1786     });
       
  1787   }, []);
       
  1788   return forceUpdate;
       
  1789 }
       
  1790 function withDefault(value, defaultValue) {
       
  1791   return is.und(value) || is.nul(value) ? defaultValue : value;
       
  1792 }
       
  1793 function toArray(a) {
       
  1794   return !is.und(a) ? is.arr(a) ? a : [a] : [];
       
  1795 }
       
  1796 function callProp(obj) {
       
  1797   for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
  1798     args[_key - 1] = arguments[_key];
       
  1799   }
       
  1800 
       
  1801   return is.fun(obj) ? obj.apply(void 0, args) : obj;
       
  1802 }
       
  1803 
       
  1804 function getForwardProps(props) {
       
  1805   var to = props.to,
       
  1806       from = props.from,
       
  1807       config = props.config,
       
  1808       onStart = props.onStart,
       
  1809       onRest = props.onRest,
       
  1810       onFrame = props.onFrame,
       
  1811       children = props.children,
       
  1812       reset = props.reset,
       
  1813       reverse = props.reverse,
       
  1814       force = props.force,
       
  1815       immediate = props.immediate,
       
  1816       delay = props.delay,
       
  1817       attach = props.attach,
       
  1818       destroyed = props.destroyed,
       
  1819       interpolateTo = props.interpolateTo,
       
  1820       ref = props.ref,
       
  1821       lazy = props.lazy,
       
  1822       forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
       
  1823 
       
  1824   return forward;
       
  1825 }
       
  1826 
       
  1827 function interpolateTo(props) {
       
  1828   var forward = getForwardProps(props);
       
  1829   if (is.und(forward)) return _extends({
       
  1830     to: forward
       
  1831   }, props);
       
  1832   var rest = Object.keys(props).reduce(function (a, k) {
       
  1833     var _extends2;
       
  1834 
       
  1835     return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
       
  1836   }, {});
       
  1837   return _extends({
       
  1838     to: forward
       
  1839   }, rest);
       
  1840 }
       
  1841 function handleRef(ref, forward) {
       
  1842   if (forward) {
       
  1843     // If it's a function, assume it's a ref callback
       
  1844     if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
       
  1845       forward.current = ref;
       
  1846     }
       
  1847   }
       
  1848 
       
  1849   return ref;
       
  1850 }
       
  1851 
       
  1852 var Animated =
       
  1853 /*#__PURE__*/
       
  1854 function () {
       
  1855   function Animated() {
       
  1856     this.payload = void 0;
       
  1857     this.children = [];
       
  1858   }
       
  1859 
       
  1860   var _proto = Animated.prototype;
       
  1861 
       
  1862   _proto.getAnimatedValue = function getAnimatedValue() {
       
  1863     return this.getValue();
       
  1864   };
       
  1865 
       
  1866   _proto.getPayload = function getPayload() {
       
  1867     return this.payload || this;
       
  1868   };
       
  1869 
       
  1870   _proto.attach = function attach() {};
       
  1871 
       
  1872   _proto.detach = function detach() {};
       
  1873 
       
  1874   _proto.getChildren = function getChildren() {
       
  1875     return this.children;
       
  1876   };
       
  1877 
       
  1878   _proto.addChild = function addChild(child) {
       
  1879     if (this.children.length === 0) this.attach();
       
  1880     this.children.push(child);
       
  1881   };
       
  1882 
       
  1883   _proto.removeChild = function removeChild(child) {
       
  1884     var index = this.children.indexOf(child);
       
  1885     this.children.splice(index, 1);
       
  1886     if (this.children.length === 0) this.detach();
       
  1887   };
       
  1888 
       
  1889   return Animated;
       
  1890 }();
       
  1891 var AnimatedArray =
       
  1892 /*#__PURE__*/
       
  1893 function (_Animated) {
       
  1894   _inheritsLoose(AnimatedArray, _Animated);
       
  1895 
       
  1896   function AnimatedArray() {
       
  1897     var _this;
       
  1898 
       
  1899     for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
       
  1900       args[_key] = arguments[_key];
       
  1901     }
       
  1902 
       
  1903     _this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
       
  1904     _this.payload = [];
       
  1905 
       
  1906     _this.attach = function () {
       
  1907       return _this.payload.forEach(function (p) {
       
  1908         return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
       
  1909       });
   732     };
  1910     };
       
  1911 
       
  1912     _this.detach = function () {
       
  1913       return _this.payload.forEach(function (p) {
       
  1914         return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
       
  1915       });
       
  1916     };
       
  1917 
       
  1918     return _this;
       
  1919   }
       
  1920 
       
  1921   return AnimatedArray;
       
  1922 }(Animated);
       
  1923 var AnimatedObject =
       
  1924 /*#__PURE__*/
       
  1925 function (_Animated2) {
       
  1926   _inheritsLoose(AnimatedObject, _Animated2);
       
  1927 
       
  1928   function AnimatedObject() {
       
  1929     var _this2;
       
  1930 
       
  1931     for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
       
  1932       args[_key3] = arguments[_key3];
       
  1933     }
       
  1934 
       
  1935     _this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
       
  1936     _this2.payload = {};
       
  1937 
       
  1938     _this2.attach = function () {
       
  1939       return Object.values(_this2.payload).forEach(function (s) {
       
  1940         return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
       
  1941       });
       
  1942     };
       
  1943 
       
  1944     _this2.detach = function () {
       
  1945       return Object.values(_this2.payload).forEach(function (s) {
       
  1946         return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
       
  1947       });
       
  1948     };
       
  1949 
       
  1950     return _this2;
       
  1951   }
       
  1952 
       
  1953   var _proto2 = AnimatedObject.prototype;
       
  1954 
       
  1955   _proto2.getValue = function getValue(animated) {
       
  1956     if (animated === void 0) {
       
  1957       animated = false;
       
  1958     }
       
  1959 
       
  1960     var payload = {};
       
  1961 
       
  1962     for (var _key4 in this.payload) {
       
  1963       var value = this.payload[_key4];
       
  1964       if (animated && !(value instanceof Animated)) continue;
       
  1965       payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
       
  1966     }
       
  1967 
       
  1968     return payload;
       
  1969   };
       
  1970 
       
  1971   _proto2.getAnimatedValue = function getAnimatedValue() {
       
  1972     return this.getValue(true);
       
  1973   };
       
  1974 
       
  1975   return AnimatedObject;
       
  1976 }(Animated);
       
  1977 
       
  1978 var applyAnimatedValues;
       
  1979 function injectApplyAnimatedValues(fn, transform) {
       
  1980   applyAnimatedValues = {
       
  1981     fn: fn,
       
  1982     transform: transform
       
  1983   };
       
  1984 }
       
  1985 var colorNames;
       
  1986 function injectColorNames(names) {
       
  1987   colorNames = names;
       
  1988 }
       
  1989 var requestFrame = function requestFrame(cb) {
       
  1990   return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
       
  1991 };
       
  1992 var cancelFrame = function cancelFrame(id) {
       
  1993   typeof window !== 'undefined' && window.cancelAnimationFrame(id);
       
  1994 };
       
  1995 function injectFrame(raf, caf) {
       
  1996   requestFrame = raf;
       
  1997   cancelFrame = caf;
       
  1998 }
       
  1999 var interpolation;
       
  2000 function injectStringInterpolator(fn) {
       
  2001   interpolation = fn;
       
  2002 }
       
  2003 var now = function now() {
       
  2004   return Date.now();
       
  2005 };
       
  2006 function injectNow(nowFn) {
       
  2007   now = nowFn;
       
  2008 }
       
  2009 var defaultElement;
       
  2010 function injectDefaultElement(el) {
       
  2011   defaultElement = el;
       
  2012 }
       
  2013 var animatedApi = function animatedApi(node) {
       
  2014   return node.current;
       
  2015 };
       
  2016 function injectAnimatedApi(fn) {
       
  2017   animatedApi = fn;
       
  2018 }
       
  2019 var createAnimatedStyle;
       
  2020 function injectCreateAnimatedStyle(factory) {
       
  2021   createAnimatedStyle = factory;
       
  2022 }
       
  2023 var manualFrameloop;
       
  2024 function injectManualFrameloop(callback) {
       
  2025   manualFrameloop = callback;
       
  2026 }
       
  2027 
       
  2028 var Globals = /*#__PURE__*/Object.freeze({
       
  2029   get applyAnimatedValues () { return applyAnimatedValues; },
       
  2030   injectApplyAnimatedValues: injectApplyAnimatedValues,
       
  2031   get colorNames () { return colorNames; },
       
  2032   injectColorNames: injectColorNames,
       
  2033   get requestFrame () { return requestFrame; },
       
  2034   get cancelFrame () { return cancelFrame; },
       
  2035   injectFrame: injectFrame,
       
  2036   get interpolation () { return interpolation; },
       
  2037   injectStringInterpolator: injectStringInterpolator,
       
  2038   get now () { return now; },
       
  2039   injectNow: injectNow,
       
  2040   get defaultElement () { return defaultElement; },
       
  2041   injectDefaultElement: injectDefaultElement,
       
  2042   get animatedApi () { return animatedApi; },
       
  2043   injectAnimatedApi: injectAnimatedApi,
       
  2044   get createAnimatedStyle () { return createAnimatedStyle; },
       
  2045   injectCreateAnimatedStyle: injectCreateAnimatedStyle,
       
  2046   get manualFrameloop () { return manualFrameloop; },
       
  2047   injectManualFrameloop: injectManualFrameloop
       
  2048 });
       
  2049 
       
  2050 /**
       
  2051  * Wraps the `style` property with `AnimatedStyle`.
       
  2052  */
       
  2053 
       
  2054 var AnimatedProps =
       
  2055 /*#__PURE__*/
       
  2056 function (_AnimatedObject) {
       
  2057   _inheritsLoose(AnimatedProps, _AnimatedObject);
       
  2058 
       
  2059   function AnimatedProps(props, callback) {
       
  2060     var _this;
       
  2061 
       
  2062     _this = _AnimatedObject.call(this) || this;
       
  2063     _this.update = void 0;
       
  2064     _this.payload = !props.style ? props : _extends({}, props, {
       
  2065       style: createAnimatedStyle(props.style)
       
  2066     });
       
  2067     _this.update = callback;
       
  2068 
       
  2069     _this.attach();
       
  2070 
       
  2071     return _this;
       
  2072   }
       
  2073 
       
  2074   return AnimatedProps;
       
  2075 }(AnimatedObject);
       
  2076 
       
  2077 var isFunctionComponent = function isFunctionComponent(val) {
       
  2078   return is.fun(val) && !(val.prototype instanceof React__default.Component);
       
  2079 };
       
  2080 
       
  2081 var createAnimatedComponent = function createAnimatedComponent(Component) {
       
  2082   var AnimatedComponent = React.forwardRef(function (props, ref) {
       
  2083     var forceUpdate = useForceUpdate();
       
  2084     var mounted = React.useRef(true);
       
  2085     var propsAnimated = React.useRef(null);
       
  2086     var node = React.useRef(null);
       
  2087     var attachProps = React.useCallback(function (props) {
       
  2088       var oldPropsAnimated = propsAnimated.current;
       
  2089 
       
  2090       var callback = function callback() {
       
  2091         var didUpdate = false;
       
  2092 
       
  2093         if (node.current) {
       
  2094           didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
       
  2095         }
       
  2096 
       
  2097         if (!node.current || didUpdate === false) {
       
  2098           // If no referenced node has been found, or the update target didn't have a
       
  2099           // native-responder, then forceUpdate the animation ...
       
  2100           forceUpdate();
       
  2101         }
       
  2102       };
       
  2103 
       
  2104       propsAnimated.current = new AnimatedProps(props, callback);
       
  2105       oldPropsAnimated && oldPropsAnimated.detach();
       
  2106     }, []);
       
  2107     React.useEffect(function () {
       
  2108       return function () {
       
  2109         mounted.current = false;
       
  2110         propsAnimated.current && propsAnimated.current.detach();
       
  2111       };
       
  2112     }, []);
       
  2113     React.useImperativeHandle(ref, function () {
       
  2114       return animatedApi(node, mounted, forceUpdate);
       
  2115     });
       
  2116     attachProps(props);
       
  2117 
       
  2118     var _getValue = propsAnimated.current.getValue(),
       
  2119         scrollTop = _getValue.scrollTop,
       
  2120         scrollLeft = _getValue.scrollLeft,
       
  2121         animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
       
  2122     // See: https://github.com/react-spring/react-spring/issues/569
       
  2123 
       
  2124 
       
  2125     var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
       
  2126       return node.current = handleRef(childRef, ref);
       
  2127     };
       
  2128     return React__default.createElement(Component, _extends({}, animatedProps, {
       
  2129       ref: refFn
       
  2130     }));
       
  2131   });
       
  2132   return AnimatedComponent;
       
  2133 };
       
  2134 
       
  2135 var active = false;
       
  2136 var controllers = new Set();
       
  2137 
       
  2138 var update = function update() {
       
  2139   if (!active) return false;
       
  2140   var time = now();
       
  2141 
       
  2142   for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
       
  2143     var _ref;
       
  2144 
       
  2145     if (_isArray) {
       
  2146       if (_i >= _iterator.length) break;
       
  2147       _ref = _iterator[_i++];
       
  2148     } else {
       
  2149       _i = _iterator.next();
       
  2150       if (_i.done) break;
       
  2151       _ref = _i.value;
       
  2152     }
       
  2153 
       
  2154     var controller = _ref;
       
  2155     var isActive = false;
       
  2156 
       
  2157     for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
       
  2158       var config = controller.configs[configIdx];
       
  2159       var endOfAnimation = void 0,
       
  2160           lastTime = void 0;
       
  2161 
       
  2162       for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
       
  2163         var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
       
  2164 
       
  2165         if (animation.done) continue;
       
  2166         var from = config.fromValues[valIdx];
       
  2167         var to = config.toValues[valIdx];
       
  2168         var position = animation.lastPosition;
       
  2169         var isAnimated = to instanceof Animated;
       
  2170         var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
       
  2171         if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
       
  2172 
       
  2173         if (config.immediate) {
       
  2174           animation.setValue(to);
       
  2175           animation.done = true;
       
  2176           continue;
       
  2177         } // Break animation when string values are involved
       
  2178 
       
  2179 
       
  2180         if (typeof from === 'string' || typeof to === 'string') {
       
  2181           animation.setValue(to);
       
  2182           animation.done = true;
       
  2183           continue;
       
  2184         }
       
  2185 
       
  2186         if (config.duration !== void 0) {
       
  2187           /** Duration easing */
       
  2188           position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
       
  2189           endOfAnimation = time >= animation.startTime + config.duration;
       
  2190         } else if (config.decay) {
       
  2191           /** Decay easing */
       
  2192           position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
       
  2193           endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
       
  2194           if (endOfAnimation) to = position;
       
  2195         } else {
       
  2196           /** Spring easing */
       
  2197           lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
       
  2198           velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
       
  2199 
       
  2200           if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
       
  2201 
       
  2202           var numSteps = Math.floor(time - lastTime);
       
  2203 
       
  2204           for (var i = 0; i < numSteps; ++i) {
       
  2205             var force = -config.tension * (position - to);
       
  2206             var damping = -config.friction * velocity;
       
  2207             var acceleration = (force + damping) / config.mass;
       
  2208             velocity = velocity + acceleration * 1 / 1000;
       
  2209             position = position + velocity * 1 / 1000;
       
  2210           } // Conditions for stopping the spring animation
       
  2211 
       
  2212 
       
  2213           var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
       
  2214           var isVelocity = Math.abs(velocity) <= config.precision;
       
  2215           var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
       
  2216           endOfAnimation = isOvershooting || isVelocity && isDisplacement;
       
  2217           animation.lastVelocity = velocity;
       
  2218           animation.lastTime = time;
       
  2219         } // Trails aren't done until their parents conclude
       
  2220 
       
  2221 
       
  2222         if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
       
  2223 
       
  2224         if (endOfAnimation) {
       
  2225           // Ensure that we end up with a round value
       
  2226           if (animation.value !== to) position = to;
       
  2227           animation.done = true;
       
  2228         } else isActive = true;
       
  2229 
       
  2230         animation.setValue(position);
       
  2231         animation.lastPosition = position;
       
  2232       } // Keep track of updated values only when necessary
       
  2233 
       
  2234 
       
  2235       if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
       
  2236     } // Update callbacks in the end of the frame
       
  2237 
       
  2238 
       
  2239     if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
       
  2240 
       
  2241     if (!isActive) {
       
  2242       controllers.delete(controller);
       
  2243       controller.stop(true);
       
  2244     }
       
  2245   } // Loop over as long as there are controllers ...
       
  2246 
       
  2247 
       
  2248   if (controllers.size) {
       
  2249     if (manualFrameloop) manualFrameloop();else requestFrame(update);
   733   } else {
  2250   } else {
   734     _typeof = function _typeof(obj) {
  2251     active = false;
   735       return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  2252   }
       
  2253 
       
  2254   return active;
       
  2255 };
       
  2256 
       
  2257 var start = function start(controller) {
       
  2258   if (!controllers.has(controller)) controllers.add(controller);
       
  2259 
       
  2260   if (!active) {
       
  2261     active = true;
       
  2262     if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
       
  2263   }
       
  2264 };
       
  2265 
       
  2266 var stop = function stop(controller) {
       
  2267   if (controllers.has(controller)) controllers.delete(controller);
       
  2268 };
       
  2269 
       
  2270 function createInterpolator(range, output, extrapolate) {
       
  2271   if (typeof range === 'function') {
       
  2272     return range;
       
  2273   }
       
  2274 
       
  2275   if (Array.isArray(range)) {
       
  2276     return createInterpolator({
       
  2277       range: range,
       
  2278       output: output,
       
  2279       extrapolate: extrapolate
       
  2280     });
       
  2281   }
       
  2282 
       
  2283   if (interpolation && typeof range.output[0] === 'string') {
       
  2284     return interpolation(range);
       
  2285   }
       
  2286 
       
  2287   var config = range;
       
  2288   var outputRange = config.output;
       
  2289   var inputRange = config.range || [0, 1];
       
  2290   var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
       
  2291   var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
       
  2292 
       
  2293   var easing = config.easing || function (t) {
       
  2294     return t;
       
  2295   };
       
  2296 
       
  2297   return function (input) {
       
  2298     var range = findRange(input, inputRange);
       
  2299     return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
       
  2300   };
       
  2301 }
       
  2302 
       
  2303 function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
       
  2304   var result = map ? map(input) : input; // Extrapolate
       
  2305 
       
  2306   if (result < inputMin) {
       
  2307     if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
       
  2308   }
       
  2309 
       
  2310   if (result > inputMax) {
       
  2311     if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
       
  2312   }
       
  2313 
       
  2314   if (outputMin === outputMax) return outputMin;
       
  2315   if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
       
  2316 
       
  2317   if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
       
  2318 
       
  2319   result = easing(result); // Output Range
       
  2320 
       
  2321   if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
       
  2322   return result;
       
  2323 }
       
  2324 
       
  2325 function findRange(input, inputRange) {
       
  2326   for (var i = 1; i < inputRange.length - 1; ++i) {
       
  2327     if (inputRange[i] >= input) break;
       
  2328   }
       
  2329 
       
  2330   return i - 1;
       
  2331 }
       
  2332 
       
  2333 var AnimatedInterpolation =
       
  2334 /*#__PURE__*/
       
  2335 function (_AnimatedArray) {
       
  2336   _inheritsLoose(AnimatedInterpolation, _AnimatedArray);
       
  2337 
       
  2338   function AnimatedInterpolation(parents, range, output, extrapolate) {
       
  2339     var _this;
       
  2340 
       
  2341     _this = _AnimatedArray.call(this) || this;
       
  2342     _this.calc = void 0;
       
  2343     _this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
       
  2344     _this.calc = createInterpolator(range, output, extrapolate);
       
  2345     return _this;
       
  2346   }
       
  2347 
       
  2348   var _proto = AnimatedInterpolation.prototype;
       
  2349 
       
  2350   _proto.getValue = function getValue() {
       
  2351     return this.calc.apply(this, this.payload.map(function (value) {
       
  2352       return value.getValue();
       
  2353     }));
       
  2354   };
       
  2355 
       
  2356   _proto.updateConfig = function updateConfig(range, output, extrapolate) {
       
  2357     this.calc = createInterpolator(range, output, extrapolate);
       
  2358   };
       
  2359 
       
  2360   _proto.interpolate = function interpolate(range, output, extrapolate) {
       
  2361     return new AnimatedInterpolation(this, range, output, extrapolate);
       
  2362   };
       
  2363 
       
  2364   return AnimatedInterpolation;
       
  2365 }(AnimatedArray);
       
  2366 
       
  2367 var interpolate$1 = function interpolate(parents, range, output) {
       
  2368   return parents && new AnimatedInterpolation(parents, range, output);
       
  2369 };
       
  2370 
       
  2371 var config = {
       
  2372   default: {
       
  2373     tension: 170,
       
  2374     friction: 26
       
  2375   },
       
  2376   gentle: {
       
  2377     tension: 120,
       
  2378     friction: 14
       
  2379   },
       
  2380   wobbly: {
       
  2381     tension: 180,
       
  2382     friction: 12
       
  2383   },
       
  2384   stiff: {
       
  2385     tension: 210,
       
  2386     friction: 20
       
  2387   },
       
  2388   slow: {
       
  2389     tension: 280,
       
  2390     friction: 60
       
  2391   },
       
  2392   molasses: {
       
  2393     tension: 280,
       
  2394     friction: 120
       
  2395   }
       
  2396 };
       
  2397 
       
  2398 /** API
       
  2399  *  useChain(references, timeSteps, timeFrame)
       
  2400  */
       
  2401 
       
  2402 function useChain(refs, timeSteps, timeFrame) {
       
  2403   if (timeFrame === void 0) {
       
  2404     timeFrame = 1000;
       
  2405   }
       
  2406 
       
  2407   var previous = React.useRef();
       
  2408   React.useEffect(function () {
       
  2409     if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
       
  2410       var current = _ref.current;
       
  2411       return current && current.start();
       
  2412     });else if (timeSteps) {
       
  2413       refs.forEach(function (_ref2, index) {
       
  2414         var current = _ref2.current;
       
  2415 
       
  2416         if (current) {
       
  2417           var ctrls = current.controllers;
       
  2418 
       
  2419           if (ctrls.length) {
       
  2420             var t = timeFrame * timeSteps[index];
       
  2421             ctrls.forEach(function (ctrl) {
       
  2422               ctrl.queue = ctrl.queue.map(function (e) {
       
  2423                 return _extends({}, e, {
       
  2424                   delay: e.delay + t
       
  2425                 });
       
  2426               });
       
  2427               ctrl.start();
       
  2428             });
       
  2429           }
       
  2430         }
       
  2431       });
       
  2432     } else refs.reduce(function (q, _ref3, rI) {
       
  2433       var current = _ref3.current;
       
  2434       return q = q.then(function () {
       
  2435         return current.start();
       
  2436       });
       
  2437     }, Promise.resolve());
       
  2438     previous.current = refs;
       
  2439   });
       
  2440 }
       
  2441 
       
  2442 /**
       
  2443  * Animated works by building a directed acyclic graph of dependencies
       
  2444  * transparently when you render your Animated components.
       
  2445  *
       
  2446  *               new Animated.Value(0)
       
  2447  *     .interpolate()        .interpolate()    new Animated.Value(1)
       
  2448  *         opacity               translateY      scale
       
  2449  *          style                         transform
       
  2450  *         View#234                         style
       
  2451  *                                         View#123
       
  2452  *
       
  2453  * A) Top Down phase
       
  2454  * When an AnimatedValue is updated, we recursively go down through this
       
  2455  * graph in order to find leaf nodes: the views that we flag as needing
       
  2456  * an update.
       
  2457  *
       
  2458  * B) Bottom Up phase
       
  2459  * When a view is flagged as needing an update, we recursively go back up
       
  2460  * in order to build the new value that it needs. The reason why we need
       
  2461  * this two-phases process is to deal with composite props such as
       
  2462  * transform which can receive values from multiple parents.
       
  2463  */
       
  2464 function addAnimatedStyles(node, styles) {
       
  2465   if ('update' in node) {
       
  2466     styles.add(node);
       
  2467   } else {
       
  2468     node.getChildren().forEach(function (child) {
       
  2469       return addAnimatedStyles(child, styles);
       
  2470     });
       
  2471   }
       
  2472 }
       
  2473 
       
  2474 var AnimatedValue =
       
  2475 /*#__PURE__*/
       
  2476 function (_Animated) {
       
  2477   _inheritsLoose(AnimatedValue, _Animated);
       
  2478 
       
  2479   function AnimatedValue(_value) {
       
  2480     var _this;
       
  2481 
       
  2482     _this = _Animated.call(this) || this;
       
  2483     _this.animatedStyles = new Set();
       
  2484     _this.value = void 0;
       
  2485     _this.startPosition = void 0;
       
  2486     _this.lastPosition = void 0;
       
  2487     _this.lastVelocity = void 0;
       
  2488     _this.startTime = void 0;
       
  2489     _this.lastTime = void 0;
       
  2490     _this.done = false;
       
  2491 
       
  2492     _this.setValue = function (value, flush) {
       
  2493       if (flush === void 0) {
       
  2494         flush = true;
       
  2495       }
       
  2496 
       
  2497       _this.value = value;
       
  2498       if (flush) _this.flush();
   736     };
  2499     };
   737   }
  2500 
   738 
  2501     _this.value = _value;
   739   return _typeof(obj);
  2502     _this.startPosition = _value;
   740 }
  2503     _this.lastPosition = _value;
   741 
  2504     return _this;
   742 /***/ }),
  2505   }
   743 /* 41 */
  2506 
   744 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2507   var _proto = AnimatedValue.prototype;
   745 
  2508 
   746 "use strict";
  2509   _proto.flush = function flush() {
   747 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
  2510     if (this.animatedStyles.size === 0) {
   748 function _objectWithoutPropertiesLoose(source, excluded) {
  2511       addAnimatedStyles(this, this.animatedStyles);
   749   if (source == null) return {};
  2512     }
   750   var target = {};
  2513 
   751   var sourceKeys = Object.keys(source);
  2514     this.animatedStyles.forEach(function (animatedStyle) {
   752   var key, i;
  2515       return animatedStyle.update();
   753 
       
   754   for (i = 0; i < sourceKeys.length; i++) {
       
   755     key = sourceKeys[i];
       
   756     if (excluded.indexOf(key) >= 0) continue;
       
   757     target[key] = source[key];
       
   758   }
       
   759 
       
   760   return target;
       
   761 }
       
   762 
       
   763 /***/ }),
       
   764 /* 42 */
       
   765 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   766 
       
   767 "use strict";
       
   768 
       
   769 
       
   770 var LEAF_KEY, hasWeakMap;
       
   771 
       
   772 /**
       
   773  * Arbitrary value used as key for referencing cache object in WeakMap tree.
       
   774  *
       
   775  * @type {Object}
       
   776  */
       
   777 LEAF_KEY = {};
       
   778 
       
   779 /**
       
   780  * Whether environment supports WeakMap.
       
   781  *
       
   782  * @type {boolean}
       
   783  */
       
   784 hasWeakMap = typeof WeakMap !== 'undefined';
       
   785 
       
   786 /**
       
   787  * Returns the first argument as the sole entry in an array.
       
   788  *
       
   789  * @param {*} value Value to return.
       
   790  *
       
   791  * @return {Array} Value returned as entry in array.
       
   792  */
       
   793 function arrayOf( value ) {
       
   794 	return [ value ];
       
   795 }
       
   796 
       
   797 /**
       
   798  * Returns true if the value passed is object-like, or false otherwise. A value
       
   799  * is object-like if it can support property assignment, e.g. object or array.
       
   800  *
       
   801  * @param {*} value Value to test.
       
   802  *
       
   803  * @return {boolean} Whether value is object-like.
       
   804  */
       
   805 function isObjectLike( value ) {
       
   806 	return !! value && 'object' === typeof value;
       
   807 }
       
   808 
       
   809 /**
       
   810  * Creates and returns a new cache object.
       
   811  *
       
   812  * @return {Object} Cache object.
       
   813  */
       
   814 function createCache() {
       
   815 	var cache = {
       
   816 		clear: function() {
       
   817 			cache.head = null;
       
   818 		},
       
   819 	};
       
   820 
       
   821 	return cache;
       
   822 }
       
   823 
       
   824 /**
       
   825  * Returns true if entries within the two arrays are strictly equal by
       
   826  * reference from a starting index.
       
   827  *
       
   828  * @param {Array}  a         First array.
       
   829  * @param {Array}  b         Second array.
       
   830  * @param {number} fromIndex Index from which to start comparison.
       
   831  *
       
   832  * @return {boolean} Whether arrays are shallowly equal.
       
   833  */
       
   834 function isShallowEqual( a, b, fromIndex ) {
       
   835 	var i;
       
   836 
       
   837 	if ( a.length !== b.length ) {
       
   838 		return false;
       
   839 	}
       
   840 
       
   841 	for ( i = fromIndex; i < a.length; i++ ) {
       
   842 		if ( a[ i ] !== b[ i ] ) {
       
   843 			return false;
       
   844 		}
       
   845 	}
       
   846 
       
   847 	return true;
       
   848 }
       
   849 
       
   850 /**
       
   851  * Returns a memoized selector function. The getDependants function argument is
       
   852  * called before the memoized selector and is expected to return an immutable
       
   853  * reference or array of references on which the selector depends for computing
       
   854  * its own return value. The memoize cache is preserved only as long as those
       
   855  * dependant references remain the same. If getDependants returns a different
       
   856  * reference(s), the cache is cleared and the selector value regenerated.
       
   857  *
       
   858  * @param {Function} selector      Selector function.
       
   859  * @param {Function} getDependants Dependant getter returning an immutable
       
   860  *                                 reference or array of reference used in
       
   861  *                                 cache bust consideration.
       
   862  *
       
   863  * @return {Function} Memoized selector.
       
   864  */
       
   865 /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
       
   866 	var rootCache, getCache;
       
   867 
       
   868 	// Use object source as dependant if getter not provided
       
   869 	if ( ! getDependants ) {
       
   870 		getDependants = arrayOf;
       
   871 	}
       
   872 
       
   873 	/**
       
   874 	 * Returns the root cache. If WeakMap is supported, this is assigned to the
       
   875 	 * root WeakMap cache set, otherwise it is a shared instance of the default
       
   876 	 * cache object.
       
   877 	 *
       
   878 	 * @return {(WeakMap|Object)} Root cache object.
       
   879 	 */
       
   880 	function getRootCache() {
       
   881 		return rootCache;
       
   882 	}
       
   883 
       
   884 	/**
       
   885 	 * Returns the cache for a given dependants array. When possible, a WeakMap
       
   886 	 * will be used to create a unique cache for each set of dependants. This
       
   887 	 * is feasible due to the nature of WeakMap in allowing garbage collection
       
   888 	 * to occur on entries where the key object is no longer referenced. Since
       
   889 	 * WeakMap requires the key to be an object, this is only possible when the
       
   890 	 * dependant is object-like. The root cache is created as a hierarchy where
       
   891 	 * each top-level key is the first entry in a dependants set, the value a
       
   892 	 * WeakMap where each key is the next dependant, and so on. This continues
       
   893 	 * so long as the dependants are object-like. If no dependants are object-
       
   894 	 * like, then the cache is shared across all invocations.
       
   895 	 *
       
   896 	 * @see isObjectLike
       
   897 	 *
       
   898 	 * @param {Array} dependants Selector dependants.
       
   899 	 *
       
   900 	 * @return {Object} Cache object.
       
   901 	 */
       
   902 	function getWeakMapCache( dependants ) {
       
   903 		var caches = rootCache,
       
   904 			isUniqueByDependants = true,
       
   905 			i, dependant, map, cache;
       
   906 
       
   907 		for ( i = 0; i < dependants.length; i++ ) {
       
   908 			dependant = dependants[ i ];
       
   909 
       
   910 			// Can only compose WeakMap from object-like key.
       
   911 			if ( ! isObjectLike( dependant ) ) {
       
   912 				isUniqueByDependants = false;
       
   913 				break;
       
   914 			}
       
   915 
       
   916 			// Does current segment of cache already have a WeakMap?
       
   917 			if ( caches.has( dependant ) ) {
       
   918 				// Traverse into nested WeakMap.
       
   919 				caches = caches.get( dependant );
       
   920 			} else {
       
   921 				// Create, set, and traverse into a new one.
       
   922 				map = new WeakMap();
       
   923 				caches.set( dependant, map );
       
   924 				caches = map;
       
   925 			}
       
   926 		}
       
   927 
       
   928 		// We use an arbitrary (but consistent) object as key for the last item
       
   929 		// in the WeakMap to serve as our running cache.
       
   930 		if ( ! caches.has( LEAF_KEY ) ) {
       
   931 			cache = createCache();
       
   932 			cache.isUniqueByDependants = isUniqueByDependants;
       
   933 			caches.set( LEAF_KEY, cache );
       
   934 		}
       
   935 
       
   936 		return caches.get( LEAF_KEY );
       
   937 	}
       
   938 
       
   939 	// Assign cache handler by availability of WeakMap
       
   940 	getCache = hasWeakMap ? getWeakMapCache : getRootCache;
       
   941 
       
   942 	/**
       
   943 	 * Resets root memoization cache.
       
   944 	 */
       
   945 	function clear() {
       
   946 		rootCache = hasWeakMap ? new WeakMap() : createCache();
       
   947 	}
       
   948 
       
   949 	// eslint-disable-next-line jsdoc/check-param-names
       
   950 	/**
       
   951 	 * The augmented selector call, considering first whether dependants have
       
   952 	 * changed before passing it to underlying memoize function.
       
   953 	 *
       
   954 	 * @param {Object} source    Source object for derivation.
       
   955 	 * @param {...*}   extraArgs Additional arguments to pass to selector.
       
   956 	 *
       
   957 	 * @return {*} Selector result.
       
   958 	 */
       
   959 	function callSelector( /* source, ...extraArgs */ ) {
       
   960 		var len = arguments.length,
       
   961 			cache, node, i, args, dependants;
       
   962 
       
   963 		// Create copy of arguments (avoid leaking deoptimization).
       
   964 		args = new Array( len );
       
   965 		for ( i = 0; i < len; i++ ) {
       
   966 			args[ i ] = arguments[ i ];
       
   967 		}
       
   968 
       
   969 		dependants = getDependants.apply( null, args );
       
   970 		cache = getCache( dependants );
       
   971 
       
   972 		// If not guaranteed uniqueness by dependants (primitive type or lack
       
   973 		// of WeakMap support), shallow compare against last dependants and, if
       
   974 		// references have changed, destroy cache to recalculate result.
       
   975 		if ( ! cache.isUniqueByDependants ) {
       
   976 			if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
       
   977 				cache.clear();
       
   978 			}
       
   979 
       
   980 			cache.lastDependants = dependants;
       
   981 		}
       
   982 
       
   983 		node = cache.head;
       
   984 		while ( node ) {
       
   985 			// Check whether node arguments match arguments
       
   986 			if ( ! isShallowEqual( node.args, args, 1 ) ) {
       
   987 				node = node.next;
       
   988 				continue;
       
   989 			}
       
   990 
       
   991 			// At this point we can assume we've found a match
       
   992 
       
   993 			// Surface matched node to head if not already
       
   994 			if ( node !== cache.head ) {
       
   995 				// Adjust siblings to point to each other.
       
   996 				node.prev.next = node.next;
       
   997 				if ( node.next ) {
       
   998 					node.next.prev = node.prev;
       
   999 				}
       
  1000 
       
  1001 				node.next = cache.head;
       
  1002 				node.prev = null;
       
  1003 				cache.head.prev = node;
       
  1004 				cache.head = node;
       
  1005 			}
       
  1006 
       
  1007 			// Return immediately
       
  1008 			return node.val;
       
  1009 		}
       
  1010 
       
  1011 		// No cached value found. Continue to insertion phase:
       
  1012 
       
  1013 		node = {
       
  1014 			// Generate the result from original function
       
  1015 			val: selector.apply( null, args ),
       
  1016 		};
       
  1017 
       
  1018 		// Avoid including the source object in the cache.
       
  1019 		args[ 0 ] = null;
       
  1020 		node.args = args;
       
  1021 
       
  1022 		// Don't need to check whether node is already head, since it would
       
  1023 		// have been returned above already if it was
       
  1024 
       
  1025 		// Shift existing head down list
       
  1026 		if ( cache.head ) {
       
  1027 			cache.head.prev = node;
       
  1028 			node.next = cache.head;
       
  1029 		}
       
  1030 
       
  1031 		cache.head = node;
       
  1032 
       
  1033 		return node.val;
       
  1034 	}
       
  1035 
       
  1036 	callSelector.getDependants = getDependants;
       
  1037 	callSelector.clear = clear;
       
  1038 	clear();
       
  1039 
       
  1040 	return callSelector;
       
  1041 });
       
  1042 
       
  1043 
       
  1044 /***/ }),
       
  1045 /* 43 */,
       
  1046 /* 44 */
       
  1047 /***/ (function(module, exports) {
       
  1048 
       
  1049 (function() { module.exports = this["wp"]["blob"]; }());
       
  1050 
       
  1051 /***/ }),
       
  1052 /* 45 */,
       
  1053 /* 46 */
       
  1054 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1055 
       
  1056 "use strict";
       
  1057 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useLiveRef; });
       
  1058 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
       
  1059 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
       
  1060 /* harmony import */ var _useIsomorphicEffect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59);
       
  1061 
       
  1062 
       
  1063 
       
  1064 /**
       
  1065  * A `React.Ref` that keeps track of the passed `value`.
       
  1066  */
       
  1067 
       
  1068 function useLiveRef(value) {
       
  1069   var ref = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(value);
       
  1070   Object(_useIsomorphicEffect_js__WEBPACK_IMPORTED_MODULE_1__[/* useIsomorphicEffect */ "a"])(function () {
       
  1071     ref.current = value;
       
  1072   });
       
  1073   return ref;
       
  1074 }
       
  1075 
       
  1076 
       
  1077 
       
  1078 
       
  1079 /***/ }),
       
  1080 /* 47 */
       
  1081 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1082 
       
  1083 "use strict";
       
  1084 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDocument; });
       
  1085 /**
       
  1086  * Returns `element.ownerDocument || window.document`.
       
  1087  */
       
  1088 function getDocument(element) {
       
  1089   return element ? element.ownerDocument || element : window.document;
       
  1090 }
       
  1091 
       
  1092 
       
  1093 
       
  1094 
       
  1095 /***/ }),
       
  1096 /* 48 */
       
  1097 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1098 
       
  1099 "use strict";
       
  1100 
       
  1101 // EXPORTS
       
  1102 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createHook; });
       
  1103 
       
  1104 // EXTERNAL MODULE: external {"this":"React"}
       
  1105 var external_this_React_ = __webpack_require__(13);
       
  1106 
       
  1107 // EXTERNAL MODULE: ./node_modules/reakit-system/es/SystemContext.js
       
  1108 var SystemContext = __webpack_require__(74);
       
  1109 
       
  1110 // CONCATENATED MODULE: ./node_modules/reakit-system/es/useToken.js
       
  1111 
       
  1112 
       
  1113 
       
  1114 /**
       
  1115  * React custom hook that returns the value of any token defined in the
       
  1116  * SystemContext. It's mainly used internally in [`useOptions`](#useoptions)
       
  1117  * and [`useProps`](#useprops).
       
  1118  *
       
  1119  * @example
       
  1120  * import { SystemProvider, useToken } from "reakit-system";
       
  1121  *
       
  1122  * const system = {
       
  1123  *   token: "value",
       
  1124  * };
       
  1125  *
       
  1126  * function Component(props) {
       
  1127  *   const token = useToken("token", "default value");
       
  1128  *   return <div {...props}>{token}</div>;
       
  1129  * }
       
  1130  *
       
  1131  * function App() {
       
  1132  *   return (
       
  1133  *     <SystemProvider unstable_system={system}>
       
  1134  *       <Component />
       
  1135  *     </SystemProvider>
       
  1136  *   );
       
  1137  * }
       
  1138  */
       
  1139 
       
  1140 function useToken(token, defaultValue) {
       
  1141   Object(external_this_React_["useDebugValue"])(token);
       
  1142   var context = Object(external_this_React_["useContext"])(SystemContext["a" /* SystemContext */]);
       
  1143   return context[token] != null ? context[token] : defaultValue;
       
  1144 }
       
  1145 
       
  1146 
       
  1147 
       
  1148 // CONCATENATED MODULE: ./node_modules/reakit-system/es/useProps.js
       
  1149 
       
  1150 
       
  1151 
       
  1152 
       
  1153 /**
       
  1154  * React custom hook that returns the props returned by a given
       
  1155  * `use${name}Props` in the SystemContext.
       
  1156  *
       
  1157  * @example
       
  1158  * import { SystemProvider, useProps } from "reakit-system";
       
  1159  *
       
  1160  * const system = {
       
  1161  *   useAProps(options, htmlProps) {
       
  1162  *     return {
       
  1163  *       ...htmlProps,
       
  1164  *       href: options.url,
       
  1165  *     };
       
  1166  *   },
       
  1167  * };
       
  1168  *
       
  1169  * function A({ url, ...htmlProps }) {
       
  1170  *   const props = useProps("A", { url }, htmlProps);
       
  1171  *   return <a {...props} />;
       
  1172  * }
       
  1173  *
       
  1174  * function App() {
       
  1175  *   return (
       
  1176  *     <SystemProvider unstable_system={system}>
       
  1177  *       <A url="url">It will convert url into href in useAProps</A>
       
  1178  *     </SystemProvider>
       
  1179  *   );
       
  1180  * }
       
  1181  */
       
  1182 
       
  1183 function useProps(name, options, htmlProps) {
       
  1184   if (options === void 0) {
       
  1185     options = {};
       
  1186   }
       
  1187 
       
  1188   if (htmlProps === void 0) {
       
  1189     htmlProps = {};
       
  1190   }
       
  1191 
       
  1192   var hookName = "use" + name + "Props";
       
  1193   Object(external_this_React_["useDebugValue"])(hookName);
       
  1194   var useHook = useToken(hookName);
       
  1195 
       
  1196   if (useHook) {
       
  1197     return useHook(options, htmlProps);
       
  1198   }
       
  1199 
       
  1200   return htmlProps;
       
  1201 }
       
  1202 
       
  1203 
       
  1204 
       
  1205 // EXTERNAL MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js
       
  1206 var _rollupPluginBabelHelpers_0c84a174 = __webpack_require__(55);
       
  1207 
       
  1208 // CONCATENATED MODULE: ./node_modules/reakit-system/es/useOptions.js
       
  1209 
       
  1210 
       
  1211 
       
  1212 
       
  1213 
       
  1214 /**
       
  1215  * React custom hook that returns the options returned by a given
       
  1216  * `use${name}Options` in the SystemContext.
       
  1217  *
       
  1218  * @example
       
  1219  * import React from "react";
       
  1220  * import { SystemProvider, useOptions } from "reakit-system";
       
  1221  *
       
  1222  * const system = {
       
  1223  *   useAOptions(options, htmlProps) {
       
  1224  *     return {
       
  1225  *       ...options,
       
  1226  *       url: htmlProps.href,
       
  1227  *     };
       
  1228  *   },
       
  1229  * };
       
  1230  *
       
  1231  * function A({ url, ...htmlProps }) {
       
  1232  *   const options = useOptions("A", { url }, htmlProps);
       
  1233  *   return <a href={options.url} {...htmlProps} />;
       
  1234  * }
       
  1235  *
       
  1236  * function App() {
       
  1237  *   return (
       
  1238  *     <SystemProvider unstable_system={system}>
       
  1239  *       <A href="url">
       
  1240  *         It will convert href into url in useAOptions and then url into href in A
       
  1241  *       </A>
       
  1242  *     </SystemProvider>
       
  1243  *   );
       
  1244  * }
       
  1245  */
       
  1246 
       
  1247 function useOptions(name, options, htmlProps) {
       
  1248   if (options === void 0) {
       
  1249     options = {};
       
  1250   }
       
  1251 
       
  1252   if (htmlProps === void 0) {
       
  1253     htmlProps = {};
       
  1254   }
       
  1255 
       
  1256   var hookName = "use" + name + "Options";
       
  1257   Object(external_this_React_["useDebugValue"])(hookName);
       
  1258   var useHook = useToken(hookName);
       
  1259 
       
  1260   if (useHook) {
       
  1261     return Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, options), useHook(options, htmlProps));
       
  1262   }
       
  1263 
       
  1264   return options;
       
  1265 }
       
  1266 
       
  1267 
       
  1268 
       
  1269 // EXTERNAL MODULE: ./node_modules/reakit-utils/es/shallowEqual.js
       
  1270 var shallowEqual = __webpack_require__(56);
       
  1271 
       
  1272 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/toArray.js
       
  1273 /**
       
  1274  * Transforms `arg` into an array if it's not already.
       
  1275  *
       
  1276  * @example
       
  1277  * import { toArray } from "reakit-utils";
       
  1278  *
       
  1279  * toArray("a"); // ["a"]
       
  1280  * toArray(["a"]); // ["a"]
       
  1281  */
       
  1282 function toArray(arg) {
       
  1283   if (Array.isArray(arg)) {
       
  1284     return arg;
       
  1285   }
       
  1286 
       
  1287   return typeof arg !== "undefined" ? [arg] : [];
       
  1288 }
       
  1289 
       
  1290 
       
  1291 
       
  1292 // CONCATENATED MODULE: ./node_modules/reakit-system/es/createHook.js
       
  1293 
       
  1294 
       
  1295 
       
  1296 
       
  1297 
       
  1298 
       
  1299 
       
  1300 
       
  1301 
       
  1302 /**
       
  1303  * Creates a React custom hook that will return component props.
       
  1304  *
       
  1305  * @example
       
  1306  * import { createHook } from "reakit-system";
       
  1307  *
       
  1308  * const useA = createHook({
       
  1309  *   name: "A",
       
  1310  *   keys: ["url"], // custom props/options keys
       
  1311  *   useProps(options, htmlProps) {
       
  1312  *     return {
       
  1313  *       ...htmlProps,
       
  1314  *       href: options.url,
       
  1315  *     };
       
  1316  *   },
       
  1317  * });
       
  1318  *
       
  1319  * function A({ url, ...htmlProps }) {
       
  1320  *   const props = useA({ url }, htmlProps);
       
  1321  *   return <a {...props} />;
       
  1322  * }
       
  1323  *
       
  1324  * @param options
       
  1325  */
       
  1326 function createHook(options) {
       
  1327   var _options$useState, _composedHooks$;
       
  1328 
       
  1329   var composedHooks = toArray(options.compose);
       
  1330 
       
  1331   var __useOptions = function __useOptions(hookOptions, htmlProps) {
       
  1332     // Call the current hook's useOptions first
       
  1333     if (options.useOptions) {
       
  1334       hookOptions = options.useOptions(hookOptions, htmlProps);
       
  1335     } // If there's name, call useOptions from the system context
       
  1336 
       
  1337 
       
  1338     if (options.name) {
       
  1339       hookOptions = useOptions(options.name, hookOptions, htmlProps);
       
  1340     } // Run composed hooks useOptions
       
  1341 
       
  1342 
       
  1343     if (options.compose) {
       
  1344       for (var _iterator = Object(_rollupPluginBabelHelpers_0c84a174["c" /* b */])(composedHooks), _step; !(_step = _iterator()).done;) {
       
  1345         var hook = _step.value;
       
  1346         hookOptions = hook.__useOptions(hookOptions, htmlProps);
       
  1347       }
       
  1348     }
       
  1349 
       
  1350     return hookOptions;
       
  1351   };
       
  1352 
       
  1353   var useHook = function useHook(hookOptions, htmlProps, unstable_ignoreUseOptions) {
       
  1354     if (hookOptions === void 0) {
       
  1355       hookOptions = {};
       
  1356     }
       
  1357 
       
  1358     if (htmlProps === void 0) {
       
  1359       htmlProps = {};
       
  1360     }
       
  1361 
       
  1362     if (unstable_ignoreUseOptions === void 0) {
       
  1363       unstable_ignoreUseOptions = false;
       
  1364     }
       
  1365 
       
  1366     // This won't execute when useHook was called from within another useHook
       
  1367     if (!unstable_ignoreUseOptions) {
       
  1368       hookOptions = __useOptions(hookOptions, htmlProps);
       
  1369     } // Call the current hook's useProps
       
  1370 
       
  1371 
       
  1372     if (options.useProps) {
       
  1373       htmlProps = options.useProps(hookOptions, htmlProps);
       
  1374     } // If there's name, call useProps from the system context
       
  1375 
       
  1376 
       
  1377     if (options.name) {
       
  1378       htmlProps = useProps(options.name, hookOptions, htmlProps);
       
  1379     }
       
  1380 
       
  1381     if (options.compose) {
       
  1382       if (options.useComposeOptions) {
       
  1383         hookOptions = options.useComposeOptions(hookOptions, htmlProps);
       
  1384       }
       
  1385 
       
  1386       if (options.useComposeProps) {
       
  1387         htmlProps = options.useComposeProps(hookOptions, htmlProps);
       
  1388       } else {
       
  1389         for (var _iterator2 = Object(_rollupPluginBabelHelpers_0c84a174["c" /* b */])(composedHooks), _step2; !(_step2 = _iterator2()).done;) {
       
  1390           var hook = _step2.value;
       
  1391           htmlProps = hook(hookOptions, htmlProps, true);
       
  1392         }
       
  1393       }
       
  1394     } // Remove undefined values from htmlProps
       
  1395 
       
  1396 
       
  1397     var finalHTMLProps = {};
       
  1398     var definedHTMLProps = htmlProps || {};
       
  1399 
       
  1400     for (var prop in definedHTMLProps) {
       
  1401       if (definedHTMLProps[prop] !== undefined) {
       
  1402         finalHTMLProps[prop] = definedHTMLProps[prop];
       
  1403       }
       
  1404     }
       
  1405 
       
  1406     return finalHTMLProps;
       
  1407   };
       
  1408 
       
  1409   useHook.__useOptions = __useOptions;
       
  1410   var composedKeys = composedHooks.reduce(function (keys, hook) {
       
  1411     keys.push.apply(keys, hook.__keys || []);
       
  1412     return keys;
       
  1413   }, []); // It's used by createComponent to split option props (keys) and html props
       
  1414 
       
  1415   useHook.__keys = [].concat(composedKeys, ((_options$useState = options.useState) === null || _options$useState === void 0 ? void 0 : _options$useState.__keys) || [], options.keys || []);
       
  1416   useHook.unstable_propsAreEqual = options.propsAreEqual || ((_composedHooks$ = composedHooks[0]) === null || _composedHooks$ === void 0 ? void 0 : _composedHooks$.unstable_propsAreEqual) || shallowEqual["a" /* shallowEqual */];
       
  1417 
       
  1418   if (false) {}
       
  1419 
       
  1420   return useHook;
       
  1421 }
       
  1422 
       
  1423 
       
  1424 
       
  1425 
       
  1426 /***/ }),
       
  1427 /* 49 */
       
  1428 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1429 
       
  1430 "use strict";
       
  1431 
       
  1432 // EXPORTS
       
  1433 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createComponent; });
       
  1434 
       
  1435 // EXTERNAL MODULE: external {"this":"React"}
       
  1436 var external_this_React_ = __webpack_require__(13);
       
  1437 
       
  1438 // EXTERNAL MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js
       
  1439 var _rollupPluginBabelHelpers_0c84a174 = __webpack_require__(55);
       
  1440 
       
  1441 // EXTERNAL MODULE: ./node_modules/reakit-system/es/useCreateElement.js
       
  1442 var useCreateElement = __webpack_require__(78);
       
  1443 
       
  1444 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/splitProps.js
       
  1445 /**
       
  1446  * Splits an object (`props`) into a tuple where the first item is an object
       
  1447  * with the passed `keys`, and the second item is an object with these keys
       
  1448  * omitted.
       
  1449  *
       
  1450  * @example
       
  1451  * import { splitProps } from "reakit-utils";
       
  1452  *
       
  1453  * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }]
       
  1454  */
       
  1455 function splitProps(props, keys) {
       
  1456   var propsKeys = Object.keys(props);
       
  1457   var picked = {};
       
  1458   var omitted = {};
       
  1459 
       
  1460   for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) {
       
  1461     var key = _propsKeys[_i];
       
  1462 
       
  1463     if (keys.indexOf(key) >= 0) {
       
  1464       picked[key] = props[key];
       
  1465     } else {
       
  1466       omitted[key] = props[key];
       
  1467     }
       
  1468   }
       
  1469 
       
  1470   return [picked, omitted];
       
  1471 }
       
  1472 
       
  1473 
       
  1474 
       
  1475 // EXTERNAL MODULE: ./node_modules/reakit-utils/es/shallowEqual.js
       
  1476 var shallowEqual = __webpack_require__(56);
       
  1477 
       
  1478 // CONCATENATED MODULE: ./node_modules/reakit-system/es/createComponent.js
       
  1479 
       
  1480 
       
  1481 
       
  1482 
       
  1483 
       
  1484 
       
  1485 
       
  1486 function forwardRef(component) {
       
  1487   return /*#__PURE__*/Object(external_this_React_["forwardRef"])(component);
       
  1488 }
       
  1489 
       
  1490 function memo(component, propsAreEqual) {
       
  1491   return /*#__PURE__*/Object(external_this_React_["memo"])(component, propsAreEqual);
       
  1492 }
       
  1493 
       
  1494 /**
       
  1495  * Creates a React component.
       
  1496  *
       
  1497  * @example
       
  1498  * import { createComponent } from "reakit-system";
       
  1499  *
       
  1500  * const A = createComponent({ as: "a" });
       
  1501  *
       
  1502  * @param options
       
  1503  */
       
  1504 function createComponent(_ref) {
       
  1505   var type = _ref.as,
       
  1506       useHook = _ref.useHook,
       
  1507       shouldMemo = _ref.memo,
       
  1508       _ref$propsAreEqual = _ref.propsAreEqual,
       
  1509       propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual,
       
  1510       _ref$keys = _ref.keys,
       
  1511       keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys,
       
  1512       _ref$useCreateElement = _ref.useCreateElement,
       
  1513       useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement["a" /* useCreateElement */] : _ref$useCreateElement;
       
  1514 
       
  1515   var Comp = function Comp(_ref2, ref) {
       
  1516     var _ref2$as = _ref2.as,
       
  1517         as = _ref2$as === void 0 ? type : _ref2$as,
       
  1518         props = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_ref2, ["as"]);
       
  1519 
       
  1520     if (useHook) {
       
  1521       var _as$render;
       
  1522 
       
  1523       var _splitProps = splitProps(props, keys),
       
  1524           _options = _splitProps[0],
       
  1525           htmlProps = _splitProps[1];
       
  1526 
       
  1527       var _useHook = useHook(_options, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
       
  1528         ref: ref
       
  1529       }, htmlProps)),
       
  1530           wrapElement = _useHook.wrapElement,
       
  1531           elementProps = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_useHook, ["wrapElement"]); // @ts-ignore
       
  1532 
       
  1533 
       
  1534       var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys;
       
  1535       var asOptions = asKeys && splitProps(props, asKeys)[0];
       
  1536       var allProps = asOptions ? Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, elementProps), asOptions) : elementProps;
       
  1537 
       
  1538       var _element = useCreateElement$1(as, allProps);
       
  1539 
       
  1540       if (wrapElement) {
       
  1541         return wrapElement(_element);
       
  1542       }
       
  1543 
       
  1544       return _element;
       
  1545     }
       
  1546 
       
  1547     return useCreateElement$1(as, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
       
  1548       ref: ref
       
  1549     }, props));
       
  1550   };
       
  1551 
       
  1552   if (false) {}
       
  1553 
       
  1554   Comp = forwardRef(Comp);
       
  1555 
       
  1556   if (shouldMemo) {
       
  1557     Comp = memo(Comp, propsAreEqual);
       
  1558   }
       
  1559 
       
  1560   Comp.__keys = keys;
       
  1561   Comp.unstable_propsAreEqual = propsAreEqual || shallowEqual["a" /* shallowEqual */];
       
  1562   return Comp;
       
  1563 }
       
  1564 
       
  1565 
       
  1566 
       
  1567 
       
  1568 /***/ }),
       
  1569 /* 50 */
       
  1570 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1571 
       
  1572 "use strict";
       
  1573 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
       
  1574 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
       
  1575   try {
       
  1576     var info = gen[key](arg);
       
  1577     var value = info.value;
       
  1578   } catch (error) {
       
  1579     reject(error);
       
  1580     return;
       
  1581   }
       
  1582 
       
  1583   if (info.done) {
       
  1584     resolve(value);
       
  1585   } else {
       
  1586     Promise.resolve(value).then(_next, _throw);
       
  1587   }
       
  1588 }
       
  1589 
       
  1590 function _asyncToGenerator(fn) {
       
  1591   return function () {
       
  1592     var self = this,
       
  1593         args = arguments;
       
  1594     return new Promise(function (resolve, reject) {
       
  1595       var gen = fn.apply(self, args);
       
  1596 
       
  1597       function _next(value) {
       
  1598         asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
       
  1599       }
       
  1600 
       
  1601       function _throw(err) {
       
  1602         asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
       
  1603       }
       
  1604 
       
  1605       _next(undefined);
       
  1606     });
  2516     });
  1607   };
  2517   };
  1608 }
  2518 
  1609 
  2519   _proto.clearStyles = function clearStyles() {
  1610 /***/ }),
  2520     this.animatedStyles.clear();
  1611 /* 51 */
  2521   };
  1612 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2522 
  1613 
  2523   _proto.getValue = function getValue() {
  1614 "use strict";
  2524     return this.value;
  1615 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findFirstEnabledItem; });
  2525   };
  1616 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return flatten; });
  2526 
  1617 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return groupItems; });
  2527   _proto.interpolate = function interpolate(range, output, extrapolate) {
  1618 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return findEnabledItemById; });
  2528     return new AnimatedInterpolation(this, range, output, extrapolate);
  1619 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getCurrentId; });
  2529   };
  1620 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return reverse; });
  2530 
  1621 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return useCompositeState; });
  2531   return AnimatedValue;
  1622 /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
  2532 }(Animated);
  1623 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
  2533 
  1624 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
  2534 var AnimatedValueArray =
  1625 /* harmony import */ var reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59);
  2535 /*#__PURE__*/
  1626 /* harmony import */ var reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62);
  2536 function (_AnimatedArray) {
  1627 /* harmony import */ var reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61);
  2537   _inheritsLoose(AnimatedValueArray, _AnimatedArray);
  1628 /* harmony import */ var _Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
  2538 
  1629 
  2539   function AnimatedValueArray(values) {
  1630 
  2540     var _this;
  1631 
  2541 
  1632 
  2542     _this = _AnimatedArray.call(this) || this;
  1633 
  2543     _this.payload = values.map(function (n) {
  1634 
  2544       return new AnimatedValue(n);
  1635 
       
  1636 function reverse(array) {
       
  1637   return array.slice().reverse();
       
  1638 }
       
  1639 
       
  1640 function isElementPreceding(element1, element2) {
       
  1641   return Boolean(element2.compareDocumentPosition(element1) & Node.DOCUMENT_POSITION_PRECEDING);
       
  1642 }
       
  1643 
       
  1644 function findDOMIndex(items, item) {
       
  1645   return items.findIndex(function (currentItem) {
       
  1646     if (!currentItem.ref.current || !item.ref.current) {
       
  1647       return false;
       
  1648     }
       
  1649 
       
  1650     return isElementPreceding(item.ref.current, currentItem.ref.current);
       
  1651   });
       
  1652 }
       
  1653 
       
  1654 function findFirstEnabledItem(items, excludeId) {
       
  1655   if (excludeId) {
       
  1656     return items.find(function (item) {
       
  1657       return !item.disabled && item.id !== excludeId;
       
  1658     });
  2545     });
  1659   }
  2546     return _this;
  1660 
  2547   }
  1661   return items.find(function (item) {
  2548 
  1662     return !item.disabled;
  2549   var _proto = AnimatedValueArray.prototype;
  1663   });
  2550 
  1664 }
  2551   _proto.setValue = function setValue(value, flush) {
  1665 
  2552     var _this2 = this;
  1666 function findEnabledItemById(items, id) {
  2553 
  1667   if (!id) return undefined;
  2554     if (flush === void 0) {
  1668   return items === null || items === void 0 ? void 0 : items.find(function (item) {
  2555       flush = true;
  1669     return item.id === id && !item.disabled;
  2556     }
  1670   });
  2557 
  1671 }
  2558     if (Array.isArray(value)) {
  1672 
  2559       if (value.length === this.payload.length) {
  1673 function groupItems(items) {
  2560         value.forEach(function (v, i) {
  1674   var groups = [[]];
  2561           return _this2.payload[i].setValue(v, flush);
  1675 
       
  1676   var _loop = function _loop() {
       
  1677     var item = _step.value;
       
  1678     var group = groups.find(function (g) {
       
  1679       return !g[0] || g[0].groupId === item.groupId;
       
  1680     });
       
  1681 
       
  1682     if (group) {
       
  1683       group.push(item);
       
  1684     } else {
       
  1685       groups.push([item]);
       
  1686     }
       
  1687   };
       
  1688 
       
  1689   for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(items), _step; !(_step = _iterator()).done;) {
       
  1690     _loop();
       
  1691   }
       
  1692 
       
  1693   return groups;
       
  1694 }
       
  1695 
       
  1696 function getMaxLength(rows) {
       
  1697   var maxLength = 0;
       
  1698 
       
  1699   for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(rows), _step; !(_step = _iterator()).done;) {
       
  1700     var length = _step.value.length;
       
  1701 
       
  1702     if (length > maxLength) {
       
  1703       maxLength = length;
       
  1704     }
       
  1705   }
       
  1706 
       
  1707   return maxLength;
       
  1708 }
       
  1709 
       
  1710 /**
       
  1711  * Turns [row1, row1, row2, row2] into [row1, row2, row1, row2]
       
  1712  */
       
  1713 
       
  1714 function verticalizeItems(items) {
       
  1715   var groups = groupItems(items);
       
  1716   var maxLength = getMaxLength(groups);
       
  1717   var verticalized = [];
       
  1718 
       
  1719   for (var i = 0; i < maxLength; i += 1) {
       
  1720     for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(groups), _step; !(_step = _iterator()).done;) {
       
  1721       var group = _step.value;
       
  1722 
       
  1723       if (group[i]) {
       
  1724         verticalized.push(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, group[i]), {}, {
       
  1725           // If there's no groupId, it means that it's not a grid composite,
       
  1726           // but a single row instead. So, instead of verticalizing it, that
       
  1727           // is, assigning a different groupId based on the column index, we
       
  1728           // keep it undefined so they will be part of the same group.
       
  1729           // It's useful when using up/down on one-dimensional composites.
       
  1730           groupId: group[i].groupId ? "" + i : undefined
       
  1731         }));
       
  1732       }
       
  1733     }
       
  1734   }
       
  1735 
       
  1736   return verticalized;
       
  1737 }
       
  1738 
       
  1739 function flatten(grid) {
       
  1740   var flattened = [];
       
  1741 
       
  1742   for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(grid), _step; !(_step = _iterator()).done;) {
       
  1743     var row = _step.value;
       
  1744     flattened.push.apply(flattened, row);
       
  1745   }
       
  1746 
       
  1747   return flattened;
       
  1748 }
       
  1749 
       
  1750 /**
       
  1751  * Turns [[row1, row1], [row2]] into [[row1, row1], [row2, row2]]
       
  1752  */
       
  1753 
       
  1754 function fillGroups(groups) {
       
  1755   var maxLength = getMaxLength(groups);
       
  1756 
       
  1757   for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(groups), _step; !(_step = _iterator()).done;) {
       
  1758     var group = _step.value;
       
  1759 
       
  1760     if (group.length < maxLength) {
       
  1761       for (var i = 0; i < maxLength; i += 1) {
       
  1762         if (!group[i]) {
       
  1763           group[i] = {
       
  1764             id: "__EMPTY_ITEM__",
       
  1765             disabled: true,
       
  1766             ref: {
       
  1767               current: null
       
  1768             },
       
  1769             groupId: group[i - 1].groupId
       
  1770           };
       
  1771         }
       
  1772       }
       
  1773     }
       
  1774   }
       
  1775 
       
  1776   return groups;
       
  1777 }
       
  1778 
       
  1779 function getCurrentId(options, passedId) {
       
  1780   var _findFirstEnabledItem;
       
  1781 
       
  1782   if (passedId || passedId === null) {
       
  1783     return passedId;
       
  1784   }
       
  1785 
       
  1786   if (options.currentId || options.currentId === null) {
       
  1787     return options.currentId;
       
  1788   }
       
  1789 
       
  1790   return (_findFirstEnabledItem = findFirstEnabledItem(options.items || [])) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id;
       
  1791 }
       
  1792 
       
  1793 var nullItem = {
       
  1794   id: null,
       
  1795   ref: {
       
  1796     current: null
       
  1797   }
       
  1798 };
       
  1799 function placeItemsAfter(items, id, shouldInsertNullItem) {
       
  1800   var index = items.findIndex(function (item) {
       
  1801     return item.id === id;
       
  1802   });
       
  1803   return [].concat(items.slice(index + 1), shouldInsertNullItem ? [nullItem] : [], items.slice(0, index));
       
  1804 }
       
  1805 
       
  1806 function getItemsInGroup(items, groupId) {
       
  1807   return items.filter(function (item) {
       
  1808     return item.groupId === groupId;
       
  1809   });
       
  1810 }
       
  1811 
       
  1812 var map = {
       
  1813   horizontal: "vertical",
       
  1814   vertical: "horizontal"
       
  1815 };
       
  1816 function getOppositeOrientation(orientation) {
       
  1817   return orientation && map[orientation];
       
  1818 }
       
  1819 
       
  1820 function addItemAtIndex(array, item, index) {
       
  1821   if (!(index in array)) {
       
  1822     return [].concat(array, [item]);
       
  1823   }
       
  1824 
       
  1825   return [].concat(array.slice(0, index), [item], array.slice(index));
       
  1826 }
       
  1827 
       
  1828 function sortBasedOnDOMPosition(items) {
       
  1829   var copy = items.slice();
       
  1830   var isOrderDifferent = false;
       
  1831   copy.sort(function (a, b) {
       
  1832     var elementA = a.ref.current;
       
  1833     var elementB = b.ref.current;
       
  1834 
       
  1835     if (elementA && elementB && isElementPreceding(elementA, elementB)) {
       
  1836       isOrderDifferent = true;
       
  1837       return -1;
       
  1838     }
       
  1839 
       
  1840     return 0;
       
  1841   });
       
  1842 
       
  1843   if (isOrderDifferent) {
       
  1844     return copy;
       
  1845   }
       
  1846 
       
  1847   return items;
       
  1848 }
       
  1849 
       
  1850 function reducer(state, action) {
       
  1851   var virtual = state.unstable_virtual,
       
  1852       rtl = state.rtl,
       
  1853       orientation = state.orientation,
       
  1854       items = state.items,
       
  1855       groups = state.groups,
       
  1856       currentId = state.currentId,
       
  1857       loop = state.loop,
       
  1858       wrap = state.wrap,
       
  1859       pastIds = state.pastIds,
       
  1860       moves = state.unstable_moves,
       
  1861       initialVirtual = state.initialVirtual,
       
  1862       initialRTL = state.initialRTL,
       
  1863       initialOrientation = state.initialOrientation,
       
  1864       initialCurrentId = state.initialCurrentId,
       
  1865       initialLoop = state.initialLoop,
       
  1866       initialWrap = state.initialWrap,
       
  1867       hasSetCurrentId = state.hasSetCurrentId;
       
  1868 
       
  1869   switch (action.type) {
       
  1870     case "registerGroup":
       
  1871       {
       
  1872         var _group = action.group; // If there are no groups yet, just add it as the first one
       
  1873 
       
  1874         if (groups.length === 0) {
       
  1875           return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  1876             groups: [_group]
       
  1877           });
       
  1878         } // Finds the group index based on DOM position
       
  1879 
       
  1880 
       
  1881         var index = findDOMIndex(groups, _group);
       
  1882         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  1883           groups: addItemAtIndex(groups, _group, index)
       
  1884         });
  2562         });
  1885       }
  2563       }
  1886 
  2564     } else {
  1887     case "unregisterGroup":
  2565       this.payload.forEach(function (p) {
  1888       {
  2566         return p.setValue(value, flush);
  1889         var _id = action.id;
  2567       });
  1890         var nextGroups = groups.filter(function (group) {
  2568     }
  1891           return group.id !== _id;
  2569   };
  1892         }); // The group isn't registered, so do nothing
  2570 
  1893 
  2571   _proto.getValue = function getValue() {
  1894         if (nextGroups.length === groups.length) {
  2572     return this.payload.map(function (v) {
  1895           return state;
  2573       return v.getValue();
       
  2574     });
       
  2575   };
       
  2576 
       
  2577   _proto.interpolate = function interpolate(range, output) {
       
  2578     return new AnimatedInterpolation(this, range, output);
       
  2579   };
       
  2580 
       
  2581   return AnimatedValueArray;
       
  2582 }(AnimatedArray);
       
  2583 
       
  2584 var G = 0;
       
  2585 
       
  2586 var Controller =
       
  2587 /*#__PURE__*/
       
  2588 function () {
       
  2589   function Controller() {
       
  2590     var _this = this;
       
  2591 
       
  2592     this.id = void 0;
       
  2593     this.idle = true;
       
  2594     this.hasChanged = false;
       
  2595     this.guid = 0;
       
  2596     this.local = 0;
       
  2597     this.props = {};
       
  2598     this.merged = {};
       
  2599     this.animations = {};
       
  2600     this.interpolations = {};
       
  2601     this.values = {};
       
  2602     this.configs = [];
       
  2603     this.listeners = [];
       
  2604     this.queue = [];
       
  2605     this.localQueue = void 0;
       
  2606 
       
  2607     this.getValues = function () {
       
  2608       return _this.interpolations;
       
  2609     };
       
  2610 
       
  2611     this.id = G++;
       
  2612   }
       
  2613   /** update(props)
       
  2614    *  This function filters input props and creates an array of tasks which are executed in .start()
       
  2615    *  Each task is allowed to carry a delay, which means it can execute asnychroneously */
       
  2616 
       
  2617 
       
  2618   var _proto = Controller.prototype;
       
  2619 
       
  2620   _proto.update = function update$$1(args) {
       
  2621     //this._id = n + this.id
       
  2622     if (!args) return this; // Extract delay and the to-prop from props
       
  2623 
       
  2624     var _ref = interpolateTo(args),
       
  2625         _ref$delay = _ref.delay,
       
  2626         delay = _ref$delay === void 0 ? 0 : _ref$delay,
       
  2627         to = _ref.to,
       
  2628         props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]);
       
  2629 
       
  2630     if (is.arr(to) || is.fun(to)) {
       
  2631       // If config is either a function or an array queue it up as is
       
  2632       this.queue.push(_extends({}, props, {
       
  2633         delay: delay,
       
  2634         to: to
       
  2635       }));
       
  2636     } else if (to) {
       
  2637       // Otherwise go through each key since it could be delayed individually
       
  2638       var ops = {};
       
  2639       Object.entries(to).forEach(function (_ref2) {
       
  2640         var _to;
       
  2641 
       
  2642         var k = _ref2[0],
       
  2643             v = _ref2[1];
       
  2644 
       
  2645         // Fetch delay and create an entry, consisting of the to-props, the delay, and basic props
       
  2646         var entry = _extends({
       
  2647           to: (_to = {}, _to[k] = v, _to),
       
  2648           delay: callProp(delay, k)
       
  2649         }, props);
       
  2650 
       
  2651         var previous = ops[entry.delay] && ops[entry.delay].to;
       
  2652         ops[entry.delay] = _extends({}, ops[entry.delay], entry, {
       
  2653           to: _extends({}, previous, entry.to)
       
  2654         });
       
  2655       });
       
  2656       this.queue = Object.values(ops);
       
  2657     } // Sort queue, so that async calls go last
       
  2658 
       
  2659 
       
  2660     this.queue = this.queue.sort(function (a, b) {
       
  2661       return a.delay - b.delay;
       
  2662     }); // Diff the reduced props immediately (they'll contain the from-prop and some config)
       
  2663 
       
  2664     this.diff(props);
       
  2665     return this;
       
  2666   }
       
  2667   /** start(onEnd)
       
  2668    *  This function either executes a queue, if present, or starts the frameloop, which animates */
       
  2669   ;
       
  2670 
       
  2671   _proto.start = function start$$1(onEnd) {
       
  2672     var _this2 = this;
       
  2673 
       
  2674     // If a queue is present we must excecute it
       
  2675     if (this.queue.length) {
       
  2676       this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values
       
  2677 
       
  2678       if (this.localQueue) {
       
  2679         this.localQueue.forEach(function (_ref3) {
       
  2680           var _ref3$from = _ref3.from,
       
  2681               from = _ref3$from === void 0 ? {} : _ref3$from,
       
  2682               _ref3$to = _ref3.to,
       
  2683               to = _ref3$to === void 0 ? {} : _ref3$to;
       
  2684           if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
       
  2685           if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
       
  2686         });
       
  2687       } // The guid helps us tracking frames, a new queue over an old one means an override
       
  2688       // We discard async calls in that caseÍ
       
  2689 
       
  2690 
       
  2691       var local = this.local = ++this.guid;
       
  2692       var queue = this.localQueue = this.queue;
       
  2693       this.queue = []; // Go through each entry and execute it
       
  2694 
       
  2695       queue.forEach(function (_ref4, index) {
       
  2696         var delay = _ref4.delay,
       
  2697             props = _objectWithoutPropertiesLoose(_ref4, ["delay"]);
       
  2698 
       
  2699         var cb = function cb(finished) {
       
  2700           if (index === queue.length - 1 && local === _this2.guid && finished) {
       
  2701             _this2.idle = true;
       
  2702             if (_this2.props.onRest) _this2.props.onRest(_this2.merged);
       
  2703           }
       
  2704 
       
  2705           if (onEnd) onEnd();
       
  2706         }; // Entries can be delayed, ansyc or immediate
       
  2707 
       
  2708 
       
  2709         var async = is.arr(props.to) || is.fun(props.to);
       
  2710 
       
  2711         if (delay) {
       
  2712           setTimeout(function () {
       
  2713             if (local === _this2.guid) {
       
  2714               if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
       
  2715             }
       
  2716           }, delay);
       
  2717         } else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
       
  2718       });
       
  2719     } // Otherwise we kick of the frameloop
       
  2720     else {
       
  2721         if (is.fun(onEnd)) this.listeners.push(onEnd);
       
  2722         if (this.props.onStart) this.props.onStart();
       
  2723 
       
  2724         start(this);
       
  2725       }
       
  2726 
       
  2727     return this;
       
  2728   };
       
  2729 
       
  2730   _proto.stop = function stop$$1(finished) {
       
  2731     this.listeners.forEach(function (onEnd) {
       
  2732       return onEnd(finished);
       
  2733     });
       
  2734     this.listeners = [];
       
  2735     return this;
       
  2736   }
       
  2737   /** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
       
  2738   ;
       
  2739 
       
  2740   _proto.pause = function pause(finished) {
       
  2741     this.stop(true);
       
  2742     if (finished) stop(this);
       
  2743     return this;
       
  2744   };
       
  2745 
       
  2746   _proto.runAsync = function runAsync(_ref5, onEnd) {
       
  2747     var _this3 = this;
       
  2748 
       
  2749     var delay = _ref5.delay,
       
  2750         props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
       
  2751 
       
  2752     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
       
  2753     // If the view relies on certain values "from" has to be present
       
  2754 
       
  2755     var queue = Promise.resolve(undefined);
       
  2756 
       
  2757     if (is.arr(props.to)) {
       
  2758       var _loop = function _loop(i) {
       
  2759         var index = i;
       
  2760 
       
  2761         var fresh = _extends({}, props, interpolateTo(props.to[index]));
       
  2762 
       
  2763         if (is.arr(fresh.config)) fresh.config = fresh.config[index];
       
  2764         queue = queue.then(function () {
       
  2765           //this.stop()
       
  2766           if (local === _this3.guid) return new Promise(function (r) {
       
  2767             return _this3.diff(fresh).start(r);
       
  2768           });
       
  2769         });
       
  2770       };
       
  2771 
       
  2772       for (var i = 0; i < props.to.length; i++) {
       
  2773         _loop(i);
       
  2774       }
       
  2775     } else if (is.fun(props.to)) {
       
  2776       var index = 0;
       
  2777       var last;
       
  2778       queue = queue.then(function () {
       
  2779         return props.to( // next(props)
       
  2780         function (p) {
       
  2781           var fresh = _extends({}, props, interpolateTo(p));
       
  2782 
       
  2783           if (is.arr(fresh.config)) fresh.config = fresh.config[index];
       
  2784           index++; //this.stop()
       
  2785 
       
  2786           if (local === _this3.guid) return last = new Promise(function (r) {
       
  2787             return _this3.diff(fresh).start(r);
       
  2788           });
       
  2789           return;
       
  2790         }, // cancel()
       
  2791         function (finished) {
       
  2792           if (finished === void 0) {
       
  2793             finished = true;
       
  2794           }
       
  2795 
       
  2796           return _this3.stop(finished);
       
  2797         }).then(function () {
       
  2798           return last;
       
  2799         });
       
  2800       });
       
  2801     }
       
  2802 
       
  2803     queue.then(onEnd);
       
  2804   };
       
  2805 
       
  2806   _proto.diff = function diff(props) {
       
  2807     var _this4 = this;
       
  2808 
       
  2809     this.props = _extends({}, this.props, props);
       
  2810     var _this$props = this.props,
       
  2811         _this$props$from = _this$props.from,
       
  2812         from = _this$props$from === void 0 ? {} : _this$props$from,
       
  2813         _this$props$to = _this$props.to,
       
  2814         to = _this$props$to === void 0 ? {} : _this$props$to,
       
  2815         _this$props$config = _this$props.config,
       
  2816         config = _this$props$config === void 0 ? {} : _this$props$config,
       
  2817         reverse = _this$props.reverse,
       
  2818         attach = _this$props.attach,
       
  2819         reset = _this$props.reset,
       
  2820         immediate = _this$props.immediate; // Reverse values when requested
       
  2821 
       
  2822     if (reverse) {
       
  2823       var _ref6 = [to, from];
       
  2824       from = _ref6[0];
       
  2825       to = _ref6[1];
       
  2826     } // This will collect all props that were ever set, reset merged props when necessary
       
  2827 
       
  2828 
       
  2829     this.merged = _extends({}, from, this.merged, to);
       
  2830     this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
       
  2831 
       
  2832     var target = attach && attach(this); // Reduces input { name: value } pairs into animated values
       
  2833 
       
  2834     this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) {
       
  2835       var name = _ref7[0],
       
  2836           value = _ref7[1];
       
  2837       // Issue cached entries, except on reset
       
  2838       var entry = acc[name] || {}; // Figure out what the value is supposed to be
       
  2839 
       
  2840       var isNumber = is.num(value);
       
  2841       var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value];
       
  2842       var isArray = is.arr(value);
       
  2843       var isInterpolation = !isNumber && !isArray && !isString;
       
  2844       var fromValue = !is.und(from[name]) ? from[name] : value;
       
  2845       var toValue = isNumber || isArray ? value : isString ? value : 1;
       
  2846       var toConfig = callProp(config, name);
       
  2847       if (target) toValue = target.animations[name].parent;
       
  2848       var parent = entry.parent,
       
  2849           interpolation$$1 = entry.interpolation,
       
  2850           toValues = toArray(target ? toValue.getPayload() : toValue),
       
  2851           animatedValues;
       
  2852       var newValue = value;
       
  2853       if (isInterpolation) newValue = interpolation({
       
  2854         range: [0, 1],
       
  2855         output: [value, value]
       
  2856       })(1);
       
  2857       var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
       
  2858 
       
  2859       var isFirst = is.und(parent);
       
  2860       var isActive = !isFirst && entry.animatedValues.some(function (v) {
       
  2861         return !v.done;
       
  2862       });
       
  2863       var currentValueDiffersFromGoal = !is.equ(newValue, currentValue);
       
  2864       var hasNewGoal = !is.equ(newValue, entry.previous);
       
  2865       var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one)
       
  2866       // and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?)
       
  2867 
       
  2868       if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) {
       
  2869         var _extends2;
       
  2870 
       
  2871         // Convert regular values into animated values, ALWAYS re-use if possible
       
  2872         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) {
       
  2873           var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value);
       
  2874           prev = prev !== void 0 && !reset ? prev : fromValue;
       
  2875 
       
  2876           if (entry.parent) {
       
  2877             parent = entry.parent;
       
  2878             parent.setValue(0, false);
       
  2879           } else parent = new AnimatedValue(0);
       
  2880 
       
  2881           var range = {
       
  2882             output: [prev, value]
       
  2883           };
       
  2884 
       
  2885           if (entry.interpolation) {
       
  2886             interpolation$$1 = entry.interpolation;
       
  2887             entry.interpolation.updateConfig(range);
       
  2888           } else interpolation$$1 = parent.interpolate(range);
  1896         }
  2889         }
  1897 
  2890         toValues = toArray(target ? toValue.getPayload() : toValue);
  1898         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
  2891         animatedValues = toArray(parent.getPayload());
  1899           groups: nextGroups
  2892         if (reset && !isInterpolation) parent.setValue(fromValue, false);
       
  2893         _this4.hasChanged = true; // Reset animated values
       
  2894 
       
  2895         animatedValues.forEach(function (value) {
       
  2896           value.startPosition = value.value;
       
  2897           value.lastPosition = value.value;
       
  2898           value.lastVelocity = isActive ? value.lastVelocity : undefined;
       
  2899           value.lastTime = isActive ? value.lastTime : undefined;
       
  2900           value.startTime = now();
       
  2901           value.done = false;
       
  2902           value.animatedStyles.clear();
       
  2903         }); // Set immediate values
       
  2904 
       
  2905         if (callProp(immediate, name)) {
       
  2906           parent.setValue(isInterpolation ? toValue : value, false);
       
  2907         }
       
  2908 
       
  2909         return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, {
       
  2910           name: name,
       
  2911           parent: parent,
       
  2912           interpolation: interpolation$$1,
       
  2913           animatedValues: animatedValues,
       
  2914           toValues: toValues,
       
  2915           previous: newValue,
       
  2916           config: toConfig,
       
  2917           fromValues: toArray(parent.getValue()),
       
  2918           immediate: callProp(immediate, name),
       
  2919           initialVelocity: withDefault(toConfig.velocity, 0),
       
  2920           clamp: withDefault(toConfig.clamp, false),
       
  2921           precision: withDefault(toConfig.precision, 0.01),
       
  2922           tension: withDefault(toConfig.tension, 170),
       
  2923           friction: withDefault(toConfig.friction, 26),
       
  2924           mass: withDefault(toConfig.mass, 1),
       
  2925           duration: toConfig.duration,
       
  2926           easing: withDefault(toConfig.easing, function (t) {
       
  2927             return t;
       
  2928           }),
       
  2929           decay: toConfig.decay
       
  2930         }), _extends2));
       
  2931       } else {
       
  2932         if (!currentValueDiffersFromGoal) {
       
  2933           var _extends3;
       
  2934 
       
  2935           // So ... the current target value (newValue) appears to be different from the previous value,
       
  2936           // which normally constitutes an update, but the actual value (currentValue) matches the target!
       
  2937           // In order to resolve this without causing an animation update we silently flag the animation as done,
       
  2938           // which it technically is. Interpolations also needs a config update with their target set to 1.
       
  2939           if (isInterpolation) {
       
  2940             parent.setValue(1, false);
       
  2941             interpolation$$1.updateConfig({
       
  2942               output: [newValue, newValue]
       
  2943             });
       
  2944           }
       
  2945 
       
  2946           parent.done = true;
       
  2947           _this4.hasChanged = true;
       
  2948           return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
       
  2949             previous: newValue
       
  2950           }), _extends3));
       
  2951         }
       
  2952 
       
  2953         return acc;
       
  2954       }
       
  2955     }, this.animations);
       
  2956 
       
  2957     if (this.hasChanged) {
       
  2958       // Make animations available to frameloop
       
  2959       this.configs = Object.values(this.animations);
       
  2960       this.values = {};
       
  2961       this.interpolations = {};
       
  2962 
       
  2963       for (var key in this.animations) {
       
  2964         this.interpolations[key] = this.animations[key].interpolation;
       
  2965         this.values[key] = this.animations[key].interpolation.getValue();
       
  2966       }
       
  2967     }
       
  2968 
       
  2969     return this;
       
  2970   };
       
  2971 
       
  2972   _proto.destroy = function destroy() {
       
  2973     this.stop();
       
  2974     this.props = {};
       
  2975     this.merged = {};
       
  2976     this.animations = {};
       
  2977     this.interpolations = {};
       
  2978     this.values = {};
       
  2979     this.configs = [];
       
  2980     this.local = 0;
       
  2981   };
       
  2982 
       
  2983   return Controller;
       
  2984 }();
       
  2985 
       
  2986 /** API
       
  2987  * const props = useSprings(number, [{ ... }, { ... }, ...])
       
  2988  * const [props, set] = useSprings(number, (i, controller) => ({ ... }))
       
  2989  */
       
  2990 
       
  2991 var useSprings = function useSprings(length, props) {
       
  2992   var mounted = React.useRef(false);
       
  2993   var ctrl = React.useRef();
       
  2994   var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
       
  2995 
       
  2996   var _useMemo = React.useMemo(function () {
       
  2997     // Remove old controllers
       
  2998     if (ctrl.current) {
       
  2999       ctrl.current.map(function (c) {
       
  3000         return c.destroy();
       
  3001       });
       
  3002       ctrl.current = undefined;
       
  3003     }
       
  3004 
       
  3005     var ref;
       
  3006     return [new Array(length).fill().map(function (_, i) {
       
  3007       var ctrl = new Controller();
       
  3008       var newProps = isFn ? callProp(props, i, ctrl) : props[i];
       
  3009       if (i === 0) ref = newProps.ref;
       
  3010       ctrl.update(newProps);
       
  3011       if (!ref) ctrl.start();
       
  3012       return ctrl;
       
  3013     }), ref];
       
  3014   }, [length]),
       
  3015       controllers = _useMemo[0],
       
  3016       ref = _useMemo[1];
       
  3017 
       
  3018   ctrl.current = controllers; // The hooks reference api gets defined here ...
       
  3019 
       
  3020   var api = React.useImperativeHandle(ref, function () {
       
  3021     return {
       
  3022       start: function start() {
       
  3023         return Promise.all(ctrl.current.map(function (c) {
       
  3024           return new Promise(function (r) {
       
  3025             return c.start(r);
       
  3026           });
       
  3027         }));
       
  3028       },
       
  3029       stop: function stop(finished) {
       
  3030         return ctrl.current.forEach(function (c) {
       
  3031           return c.stop(finished);
       
  3032         });
       
  3033       },
       
  3034 
       
  3035       get controllers() {
       
  3036         return ctrl.current;
       
  3037       }
       
  3038 
       
  3039     };
       
  3040   }); // This function updates the controllers
       
  3041 
       
  3042   var updateCtrl = React.useMemo(function () {
       
  3043     return function (updateProps) {
       
  3044       return ctrl.current.map(function (c, i) {
       
  3045         c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
       
  3046         if (!ref) c.start();
       
  3047       });
       
  3048     };
       
  3049   }, [length]); // Update controller if props aren't functional
       
  3050 
       
  3051   React.useEffect(function () {
       
  3052     if (mounted.current) {
       
  3053       if (!isFn) updateCtrl(props);
       
  3054     } else if (!ref) ctrl.current.forEach(function (c) {
       
  3055       return c.start();
       
  3056     });
       
  3057   }); // Update mounted flag and destroy controller on unmount
       
  3058 
       
  3059   React.useEffect(function () {
       
  3060     return mounted.current = true, function () {
       
  3061       return ctrl.current.forEach(function (c) {
       
  3062         return c.destroy();
       
  3063       });
       
  3064     };
       
  3065   }, []); // Return animated props, or, anim-props + the update-setter above
       
  3066 
       
  3067   var propValues = ctrl.current.map(function (c) {
       
  3068     return c.getValues();
       
  3069   });
       
  3070   return isFn ? [propValues, updateCtrl, function (finished) {
       
  3071     return ctrl.current.forEach(function (c) {
       
  3072       return c.pause(finished);
       
  3073     });
       
  3074   }] : propValues;
       
  3075 };
       
  3076 
       
  3077 /** API
       
  3078  * const props = useSpring({ ... })
       
  3079  * const [props, set] = useSpring(() => ({ ... }))
       
  3080  */
       
  3081 
       
  3082 var useSpring = function useSpring(props) {
       
  3083   var isFn = is.fun(props);
       
  3084 
       
  3085   var _useSprings = useSprings(1, isFn ? props : [props]),
       
  3086       result = _useSprings[0],
       
  3087       set = _useSprings[1],
       
  3088       pause = _useSprings[2];
       
  3089 
       
  3090   return isFn ? [result[0], set, pause] : result;
       
  3091 };
       
  3092 
       
  3093 /** API
       
  3094  * const trails = useTrail(number, { ... })
       
  3095  * const [trails, set] = useTrail(number, () => ({ ... }))
       
  3096  */
       
  3097 
       
  3098 var useTrail = function useTrail(length, props) {
       
  3099   var mounted = React.useRef(false);
       
  3100   var isFn = is.fun(props);
       
  3101   var updateProps = callProp(props);
       
  3102   var instances = React.useRef();
       
  3103 
       
  3104   var _useSprings = useSprings(length, function (i, ctrl) {
       
  3105     if (i === 0) instances.current = [];
       
  3106     instances.current.push(ctrl);
       
  3107     return _extends({}, updateProps, {
       
  3108       config: callProp(updateProps.config, i),
       
  3109       attach: i > 0 && function () {
       
  3110         return instances.current[i - 1];
       
  3111       }
       
  3112     });
       
  3113   }),
       
  3114       result = _useSprings[0],
       
  3115       set = _useSprings[1],
       
  3116       pause = _useSprings[2]; // Set up function to update controller
       
  3117 
       
  3118 
       
  3119   var updateCtrl = React.useMemo(function () {
       
  3120     return function (props) {
       
  3121       return set(function (i, ctrl) {
       
  3122         var last = props.reverse ? i === 0 : length - 1 === i;
       
  3123         var attachIdx = props.reverse ? i + 1 : i - 1;
       
  3124         var attachController = instances.current[attachIdx];
       
  3125         return _extends({}, props, {
       
  3126           config: callProp(props.config || updateProps.config, i),
       
  3127           attach: attachController && function () {
       
  3128             return attachController;
       
  3129           }
       
  3130         });
       
  3131       });
       
  3132     };
       
  3133   }, [length, updateProps.reverse]); // Update controller if props aren't functional
       
  3134 
       
  3135   React.useEffect(function () {
       
  3136     return void (mounted.current && !isFn && updateCtrl(props));
       
  3137   }); // Update mounted flag and destroy controller on unmount
       
  3138 
       
  3139   React.useEffect(function () {
       
  3140     return void (mounted.current = true);
       
  3141   }, []);
       
  3142   return isFn ? [result, updateCtrl, pause] : result;
       
  3143 };
       
  3144 
       
  3145 /** API
       
  3146  * const transitions = useTransition(items, itemKeys, { ... })
       
  3147  * const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
       
  3148  */
       
  3149 
       
  3150 var guid = 0;
       
  3151 var ENTER = 'enter';
       
  3152 var LEAVE = 'leave';
       
  3153 var UPDATE = 'update';
       
  3154 
       
  3155 var mapKeys = function mapKeys(items, keys) {
       
  3156   return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
       
  3157 };
       
  3158 
       
  3159 var get = function get(props) {
       
  3160   var items = props.items,
       
  3161       _props$keys = props.keys,
       
  3162       keys = _props$keys === void 0 ? function (item) {
       
  3163     return item;
       
  3164   } : _props$keys,
       
  3165       rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
       
  3166 
       
  3167   items = toArray(items !== void 0 ? items : null);
       
  3168   return _extends({
       
  3169     items: items,
       
  3170     keys: mapKeys(items, keys)
       
  3171   }, rest);
       
  3172 };
       
  3173 
       
  3174 function useTransition(input, keyTransform, config) {
       
  3175   var props = _extends({
       
  3176     items: input,
       
  3177     keys: keyTransform || function (i) {
       
  3178       return i;
       
  3179     }
       
  3180   }, config);
       
  3181 
       
  3182   var _get = get(props),
       
  3183       _get$lazy = _get.lazy,
       
  3184       lazy = _get$lazy === void 0 ? false : _get$lazy,
       
  3185       _get$unique = _get.unique,
       
  3186       _get$reset = _get.reset,
       
  3187       reset = _get$reset === void 0 ? false : _get$reset,
       
  3188       enter = _get.enter,
       
  3189       leave = _get.leave,
       
  3190       update = _get.update,
       
  3191       onDestroyed = _get.onDestroyed,
       
  3192       keys = _get.keys,
       
  3193       items = _get.items,
       
  3194       onFrame = _get.onFrame,
       
  3195       _onRest = _get.onRest,
       
  3196       onStart = _get.onStart,
       
  3197       ref = _get.ref,
       
  3198       extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
       
  3199 
       
  3200   var forceUpdate = useForceUpdate();
       
  3201   var mounted = React.useRef(false);
       
  3202   var state = React.useRef({
       
  3203     mounted: false,
       
  3204     first: true,
       
  3205     deleted: [],
       
  3206     current: {},
       
  3207     transitions: [],
       
  3208     prevProps: {},
       
  3209     paused: !!props.ref,
       
  3210     instances: !mounted.current && new Map(),
       
  3211     forceUpdate: forceUpdate
       
  3212   });
       
  3213   React.useImperativeHandle(props.ref, function () {
       
  3214     return {
       
  3215       start: function start() {
       
  3216         return Promise.all(Array.from(state.current.instances).map(function (_ref) {
       
  3217           var c = _ref[1];
       
  3218           return new Promise(function (r) {
       
  3219             return c.start(r);
       
  3220           });
       
  3221         }));
       
  3222       },
       
  3223       stop: function stop(finished) {
       
  3224         return Array.from(state.current.instances).forEach(function (_ref2) {
       
  3225           var c = _ref2[1];
       
  3226           return c.stop(finished);
       
  3227         });
       
  3228       },
       
  3229 
       
  3230       get controllers() {
       
  3231         return Array.from(state.current.instances).map(function (_ref3) {
       
  3232           var c = _ref3[1];
       
  3233           return c;
  1900         });
  3234         });
  1901       }
  3235       }
  1902 
  3236 
  1903     case "registerItem":
  3237     };
  1904       {
  3238   }); // Update state
  1905         var _item = action.item; // Finds the item group based on the DOM hierarchy
  3239 
  1906 
  3240   state.current = diffItems(state.current, props);
  1907         var _group2 = groups.find(function (r) {
  3241 
  1908           var _r$ref$current;
  3242   if (state.current.changed) {
  1909 
  3243     // Update state
  1910           return (_r$ref$current = r.ref.current) === null || _r$ref$current === void 0 ? void 0 : _r$ref$current.contains(_item.ref.current);
  3244     state.current.transitions.forEach(function (transition) {
  1911         }); // Group will be null if it's a one-dimensional composite
  3245       var slot = transition.slot,
  1912 
  3246           from = transition.from,
  1913 
  3247           to = transition.to,
  1914         var nextItem = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
  3248           config = transition.config,
  1915           groupId: _group2 === null || _group2 === void 0 ? void 0 : _group2.id
  3249           trail = transition.trail,
  1916         }, _item);
  3250           key = transition.key,
  1917 
  3251           item = transition.item;
  1918         var _index = findDOMIndex(items, nextItem);
  3252       if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object
  1919 
  3253 
  1920         var nextState = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
  3254       var ctrl = state.current.instances.get(key);
  1921           items: addItemAtIndex(items, nextItem, _index)
  3255 
  1922         });
  3256       var newProps = _extends({}, extra, {
  1923 
  3257         to: to,
  1924         if (!hasSetCurrentId && !moves && initialCurrentId === undefined) {
  3258         from: from,
  1925           var _findFirstEnabledItem;
  3259         config: config,
  1926 
  3260         ref: ref,
  1927           // Sets currentId to the first enabled item. This runs whenever an item
  3261         onRest: function onRest(values) {
  1928           // is registered because the first enabled item may be registered
  3262           if (state.current.mounted) {
  1929           // asynchronously.
  3263             if (transition.destroyed) {
  1930           return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, nextState), {}, {
  3264               // If no ref is given delete destroyed items immediately
  1931             currentId: (_findFirstEnabledItem = findFirstEnabledItem(nextState.items)) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id
  3265               if (!ref && !lazy) cleanUp(state, key);
  1932           });
  3266               if (onDestroyed) onDestroyed(item);
  1933         }
  3267             } // A transition comes to rest once all its springs conclude
  1934 
  3268 
  1935         return nextState;
  3269 
  1936       }
  3270             var curInstances = Array.from(state.current.instances);
  1937 
  3271             var active = curInstances.some(function (_ref4) {
  1938     case "unregisterItem":
  3272               var c = _ref4[1];
  1939       {
  3273               return !c.idle;
  1940         var _id2 = action.id;
  3274             });
  1941         var nextItems = items.filter(function (item) {
  3275             if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state);
  1942           return item.id !== _id2;
  3276             if (_onRest) _onRest(item, slot, values);
  1943         }); // The item isn't registered, so do nothing
  3277           }
  1944 
  3278         },
  1945         if (nextItems.length === items.length) {
  3279         onStart: onStart && function () {
  1946           return state;
  3280           return onStart(item, slot);
  1947         } // Filters out the item that is being removed from the pastIds list
  3281         },
  1948 
  3282         onFrame: onFrame && function (values) {
  1949 
  3283           return onFrame(item, slot, values);
  1950         var nextPastIds = pastIds.filter(function (pastId) {
  3284         },
  1951           return pastId !== _id2;
  3285         delay: trail,
  1952         });
  3286         reset: reset && slot === ENTER // Update controller
  1953 
  3287 
  1954         var _nextState = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  1955           pastIds: nextPastIds,
       
  1956           items: nextItems
       
  1957         }); // If the current item is the item that is being removed, focus pastId
       
  1958 
       
  1959 
       
  1960         if (currentId && currentId === _id2) {
       
  1961           var nextId = getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState), {}, {
       
  1962             currentId: nextPastIds[0]
       
  1963           }));
       
  1964           return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState), {}, {
       
  1965             currentId: nextId
       
  1966           });
       
  1967         }
       
  1968 
       
  1969         return _nextState;
       
  1970       }
       
  1971 
       
  1972     case "move":
       
  1973       {
       
  1974         var _id3 = action.id; // move() does nothing
       
  1975 
       
  1976         if (_id3 === undefined) {
       
  1977           return state;
       
  1978         } // Removes the current item and the item that is receiving focus from the
       
  1979         // pastIds list
       
  1980 
       
  1981 
       
  1982         var filteredPastIds = pastIds.filter(function (pastId) {
       
  1983           return pastId !== currentId && pastId !== _id3;
       
  1984         }); // If there's a currentId, add it to the pastIds list so it can be focused
       
  1985         // if the new item gets removed or disabled
       
  1986 
       
  1987         var _nextPastIds = currentId ? [currentId].concat(filteredPastIds) : filteredPastIds;
       
  1988 
       
  1989         var _nextState2 = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  1990           pastIds: _nextPastIds
       
  1991         }); // move(null) will focus the composite element itself, not an item
       
  1992 
       
  1993 
       
  1994         if (_id3 === null) {
       
  1995           return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState2), {}, {
       
  1996             unstable_moves: moves + 1,
       
  1997             currentId: getCurrentId(_nextState2, _id3)
       
  1998           });
       
  1999         }
       
  2000 
       
  2001         var _item2 = findEnabledItemById(items, _id3);
       
  2002 
       
  2003         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState2), {}, {
       
  2004           unstable_moves: _item2 ? moves + 1 : moves,
       
  2005           currentId: getCurrentId(_nextState2, _item2 === null || _item2 === void 0 ? void 0 : _item2.id)
       
  2006         });
       
  2007       }
       
  2008 
       
  2009     case "next":
       
  2010       {
       
  2011         // If there's no item focused, we just move the first one
       
  2012         if (currentId == null) {
       
  2013           return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2014             type: "first"
       
  2015           }));
       
  2016         } // RTL doesn't make sense on vertical navigation
       
  2017 
       
  2018 
       
  2019         var isHorizontal = orientation !== "vertical";
       
  2020         var isRTL = rtl && isHorizontal;
       
  2021         var allItems = isRTL ? reverse(items) : items;
       
  2022         var currentItem = allItems.find(function (item) {
       
  2023           return item.id === currentId;
       
  2024         }); // If there's no item focused, we just move the first one
       
  2025 
       
  2026         if (!currentItem) {
       
  2027           return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2028             type: "first"
       
  2029           }));
       
  2030         }
       
  2031 
       
  2032         var isGrid = !!currentItem.groupId;
       
  2033         var currentIndex = allItems.indexOf(currentItem);
       
  2034 
       
  2035         var _nextItems = allItems.slice(currentIndex + 1);
       
  2036 
       
  2037         var nextItemsInGroup = getItemsInGroup(_nextItems, currentItem.groupId); // Home, End
       
  2038 
       
  2039         if (action.allTheWay) {
       
  2040           // We reverse so we can get the last enabled item in the group. If it's
       
  2041           // RTL, nextItems and nextItemsInGroup are already reversed and don't
       
  2042           // have the items before the current one anymore. So we have to get
       
  2043           // items in group again with allItems.
       
  2044           var _nextItem2 = findFirstEnabledItem(isRTL ? getItemsInGroup(allItems, currentItem.groupId) : reverse(nextItemsInGroup));
       
  2045 
       
  2046           return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2047             type: "move",
       
  2048             id: _nextItem2 === null || _nextItem2 === void 0 ? void 0 : _nextItem2.id
       
  2049           }));
       
  2050         }
       
  2051 
       
  2052         var oppositeOrientation = getOppositeOrientation( // If it's a grid and orientation is not set, it's a next/previous
       
  2053         // call, which is inherently horizontal. up/down will call next with
       
  2054         // orientation set to vertical by default (see below on up/down cases).
       
  2055         isGrid ? orientation || "horizontal" : orientation);
       
  2056         var canLoop = loop && loop !== oppositeOrientation;
       
  2057         var canWrap = isGrid && wrap && wrap !== oppositeOrientation;
       
  2058         var hasNullItem = // `previous` and `up` will set action.hasNullItem, but when calling
       
  2059         // next directly, hasNullItem will only be true if it's not a grid and
       
  2060         // loop is set to true, which means that pressing right or down keys on
       
  2061         // grids will never focus the composite element. On one-dimensional
       
  2062         // composites that don't loop, pressing right or down keys also doesn't
       
  2063         // focus the composite element.
       
  2064         action.hasNullItem || !isGrid && canLoop && initialCurrentId === null;
       
  2065 
       
  2066         if (canLoop) {
       
  2067           var loopItems = canWrap && !hasNullItem ? allItems : getItemsInGroup(allItems, currentItem.groupId); // Turns [0, 1, current, 3, 4] into [3, 4, 0, 1]
       
  2068 
       
  2069           var sortedItems = placeItemsAfter(loopItems, currentId, hasNullItem);
       
  2070 
       
  2071           var _nextItem3 = findFirstEnabledItem(sortedItems, currentId);
       
  2072 
       
  2073           return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2074             type: "move",
       
  2075             id: _nextItem3 === null || _nextItem3 === void 0 ? void 0 : _nextItem3.id
       
  2076           }));
       
  2077         }
       
  2078 
       
  2079         if (canWrap) {
       
  2080           var _nextItem4 = findFirstEnabledItem( // We can use nextItems, which contains all the next items, including
       
  2081           // items from other groups, to wrap between groups. However, if there
       
  2082           // is a null item (the composite element), we'll only use the next
       
  2083           // items in the group. So moving next from the last item will focus
       
  2084           // the composite element (null). On grid composites, horizontal
       
  2085           // navigation never focuses the composite element, only vertical.
       
  2086           hasNullItem ? nextItemsInGroup : _nextItems, currentId);
       
  2087 
       
  2088           var _nextId = hasNullItem ? (_nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id) || null : _nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id;
       
  2089 
       
  2090           return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2091             type: "move",
       
  2092             id: _nextId
       
  2093           }));
       
  2094         }
       
  2095 
       
  2096         var _nextItem = findFirstEnabledItem(nextItemsInGroup, currentId);
       
  2097 
       
  2098         if (!_nextItem && hasNullItem) {
       
  2099           return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2100             type: "move",
       
  2101             id: null
       
  2102           }));
       
  2103         }
       
  2104 
       
  2105         return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2106           type: "move",
       
  2107           id: _nextItem === null || _nextItem === void 0 ? void 0 : _nextItem.id
       
  2108         }));
       
  2109       }
       
  2110 
       
  2111     case "previous":
       
  2112       {
       
  2113         // If currentId is initially set to null, the composite element will be
       
  2114         // focusable while navigating with arrow keys. But, if it's a grid, we
       
  2115         // don't want to focus the composite element with horizontal navigation.
       
  2116         var _isGrid = !!groups.length;
       
  2117 
       
  2118         var _hasNullItem = !_isGrid && initialCurrentId === null;
       
  2119 
       
  2120         var _nextState3 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2121           items: reverse(items)
       
  2122         }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2123           type: "next",
       
  2124           hasNullItem: _hasNullItem
       
  2125         }));
       
  2126 
       
  2127         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState3), {}, {
       
  2128           items: items
       
  2129         });
       
  2130       }
       
  2131 
       
  2132     case "down":
       
  2133       {
       
  2134         // First, we make sure groups have the same number of items by filling it
       
  2135         // with disabled fake items. Then, we reorganize the items list so
       
  2136         // [1-1, 1-2, 2-1, 2-2] becomes [1-1, 2-1, 1-2, 2-2].
       
  2137         var verticalItems = verticalizeItems(flatten(fillGroups(groupItems(items))));
       
  2138 
       
  2139         var _canLoop = loop && loop !== "horizontal"; // Pressing down arrow key will only focus the composite element if loop
       
  2140         // is true or vertical.
       
  2141 
       
  2142 
       
  2143         var _hasNullItem2 = _canLoop && initialCurrentId === null;
       
  2144 
       
  2145         var _nextState4 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2146           orientation: "vertical",
       
  2147           items: verticalItems
       
  2148         }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2149           type: "next",
       
  2150           hasNullItem: _hasNullItem2
       
  2151         }));
       
  2152 
       
  2153         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState4), {}, {
       
  2154           orientation: orientation,
       
  2155           items: items
       
  2156         });
       
  2157       }
       
  2158 
       
  2159     case "up":
       
  2160       {
       
  2161         var _verticalItems = verticalizeItems(reverse(flatten(fillGroups(groupItems(items))))); // If currentId is initially set to null, we'll always focus the
       
  2162         // composite element when the up arrow key is pressed in the first row.
       
  2163 
       
  2164 
       
  2165         var _hasNullItem3 = initialCurrentId === null;
       
  2166 
       
  2167         var _nextState5 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2168           orientation: "vertical",
       
  2169           items: _verticalItems
       
  2170         }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2171           type: "next",
       
  2172           hasNullItem: _hasNullItem3
       
  2173         }));
       
  2174 
       
  2175         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState5), {}, {
       
  2176           orientation: orientation,
       
  2177           items: items
       
  2178         });
       
  2179       }
       
  2180 
       
  2181     case "first":
       
  2182       {
       
  2183         var firstItem = findFirstEnabledItem(items);
       
  2184         return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2185           type: "move",
       
  2186           id: firstItem === null || firstItem === void 0 ? void 0 : firstItem.id
       
  2187         }));
       
  2188       }
       
  2189 
       
  2190     case "last":
       
  2191       {
       
  2192         var _nextState6 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2193           items: reverse(items)
       
  2194         }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
       
  2195           type: "first"
       
  2196         }));
       
  2197 
       
  2198         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState6), {}, {
       
  2199           items: items
       
  2200         });
       
  2201       }
       
  2202 
       
  2203     case "sort":
       
  2204       {
       
  2205         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2206           items: sortBasedOnDOMPosition(items),
       
  2207           groups: sortBasedOnDOMPosition(groups)
       
  2208         });
       
  2209       }
       
  2210 
       
  2211     case "setVirtual":
       
  2212       return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2213         unstable_virtual: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.virtual, virtual)
       
  2214       });
  3288       });
  2215 
  3289 
  2216     case "setRTL":
  3290       ctrl.update(newProps);
  2217       return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
  3291       if (!state.current.paused) ctrl.start();
  2218         rtl: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.rtl, rtl)
  3292     });
       
  3293   }
       
  3294 
       
  3295   React.useEffect(function () {
       
  3296     state.current.mounted = mounted.current = true;
       
  3297     return function () {
       
  3298       state.current.mounted = mounted.current = false;
       
  3299       Array.from(state.current.instances).map(function (_ref5) {
       
  3300         var c = _ref5[1];
       
  3301         return c.destroy();
  2219       });
  3302       });
  2220 
  3303       state.current.instances.clear();
  2221     case "setOrientation":
       
  2222       return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2223         orientation: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.orientation, orientation)
       
  2224       });
       
  2225 
       
  2226     case "setCurrentId":
       
  2227       {
       
  2228         var nextCurrentId = getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2229           currentId: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.currentId, currentId)
       
  2230         }));
       
  2231         return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2232           currentId: nextCurrentId,
       
  2233           hasSetCurrentId: true
       
  2234         });
       
  2235       }
       
  2236 
       
  2237     case "setLoop":
       
  2238       return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2239         loop: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.loop, loop)
       
  2240       });
       
  2241 
       
  2242     case "setWrap":
       
  2243       return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2244         wrap: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.wrap, wrap)
       
  2245       });
       
  2246 
       
  2247     case "reset":
       
  2248       return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2249         unstable_virtual: initialVirtual,
       
  2250         rtl: initialRTL,
       
  2251         orientation: initialOrientation,
       
  2252         currentId: getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
       
  2253           currentId: initialCurrentId
       
  2254         })),
       
  2255         loop: initialLoop,
       
  2256         wrap: initialWrap,
       
  2257         unstable_moves: 0,
       
  2258         pastIds: []
       
  2259       });
       
  2260 
       
  2261     default:
       
  2262       throw new Error();
       
  2263   }
       
  2264 }
       
  2265 
       
  2266 function useAction(fn) {
       
  2267   return Object(react__WEBPACK_IMPORTED_MODULE_1__["useCallback"])(fn, []);
       
  2268 }
       
  2269 
       
  2270 function useIsUnmountedRef() {
       
  2271   var isUnmountedRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(false);
       
  2272   Object(reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_2__[/* useIsomorphicEffect */ "a"])(function () {
       
  2273     return function () {
       
  2274       isUnmountedRef.current = true;
       
  2275     };
  3304     };
  2276   }, []);
  3305   }, []);
  2277   return isUnmountedRef;
  3306   return state.current.transitions.map(function (_ref6) {
  2278 }
  3307     var item = _ref6.item,
  2279 
  3308         slot = _ref6.slot,
  2280 function useCompositeState(initialState) {
  3309         key = _ref6.key;
  2281   if (initialState === void 0) {
  3310     return {
  2282     initialState = {};
  3311       item: item,
  2283   }
  3312       key: key,
  2284 
  3313       state: slot,
  2285   var _useSealedState = Object(reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_3__[/* useSealedState */ "a"])(initialState),
  3314       props: state.current.instances.get(key).getValues()
  2286       _useSealedState$unsta = _useSealedState.unstable_virtual,
  3315     };
  2287       virtual = _useSealedState$unsta === void 0 ? false : _useSealedState$unsta,
       
  2288       _useSealedState$rtl = _useSealedState.rtl,
       
  2289       rtl = _useSealedState$rtl === void 0 ? false : _useSealedState$rtl,
       
  2290       orientation = _useSealedState.orientation,
       
  2291       currentId = _useSealedState.currentId,
       
  2292       _useSealedState$loop = _useSealedState.loop,
       
  2293       loop = _useSealedState$loop === void 0 ? false : _useSealedState$loop,
       
  2294       _useSealedState$wrap = _useSealedState.wrap,
       
  2295       wrap = _useSealedState$wrap === void 0 ? false : _useSealedState$wrap,
       
  2296       sealed = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_useSealedState, ["unstable_virtual", "rtl", "orientation", "currentId", "loop", "wrap"]);
       
  2297 
       
  2298   var _React$useReducer = Object(react__WEBPACK_IMPORTED_MODULE_1__["useReducer"])(reducer, {
       
  2299     unstable_virtual: virtual,
       
  2300     rtl: rtl,
       
  2301     orientation: orientation,
       
  2302     items: [],
       
  2303     groups: [],
       
  2304     currentId: currentId,
       
  2305     loop: loop,
       
  2306     wrap: wrap,
       
  2307     unstable_moves: 0,
       
  2308     pastIds: [],
       
  2309     initialVirtual: virtual,
       
  2310     initialRTL: rtl,
       
  2311     initialOrientation: orientation,
       
  2312     initialCurrentId: currentId,
       
  2313     initialLoop: loop,
       
  2314     initialWrap: wrap
       
  2315   }),
       
  2316       _React$useReducer$ = _React$useReducer[0],
       
  2317       pastIds = _React$useReducer$.pastIds,
       
  2318       initialVirtual = _React$useReducer$.initialVirtual,
       
  2319       initialRTL = _React$useReducer$.initialRTL,
       
  2320       initialOrientation = _React$useReducer$.initialOrientation,
       
  2321       initialCurrentId = _React$useReducer$.initialCurrentId,
       
  2322       initialLoop = _React$useReducer$.initialLoop,
       
  2323       initialWrap = _React$useReducer$.initialWrap,
       
  2324       hasSetCurrentId = _React$useReducer$.hasSetCurrentId,
       
  2325       state = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_React$useReducer$, ["pastIds", "initialVirtual", "initialRTL", "initialOrientation", "initialCurrentId", "initialLoop", "initialWrap", "hasSetCurrentId"]),
       
  2326       dispatch = _React$useReducer[1];
       
  2327 
       
  2328   var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])(false),
       
  2329       hasActiveWidget = _React$useState[0],
       
  2330       setHasActiveWidget = _React$useState[1];
       
  2331 
       
  2332   var idState = Object(_Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"])(sealed); // register/unregister may be called when this component is unmounted. We
       
  2333   // store the unmounted state here so we don't update the state if it's true.
       
  2334   // This only happens in a very specific situation.
       
  2335   // See https://github.com/reakit/reakit/issues/650
       
  2336 
       
  2337   var isUnmountedRef = useIsUnmountedRef();
       
  2338   return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, idState), state), {}, {
       
  2339     unstable_hasActiveWidget: hasActiveWidget,
       
  2340     unstable_setHasActiveWidget: setHasActiveWidget,
       
  2341     registerItem: useAction(function (item) {
       
  2342       if (isUnmountedRef.current) return;
       
  2343       dispatch({
       
  2344         type: "registerItem",
       
  2345         item: item
       
  2346       });
       
  2347     }),
       
  2348     unregisterItem: useAction(function (id) {
       
  2349       if (isUnmountedRef.current) return;
       
  2350       dispatch({
       
  2351         type: "unregisterItem",
       
  2352         id: id
       
  2353       });
       
  2354     }),
       
  2355     registerGroup: useAction(function (group) {
       
  2356       if (isUnmountedRef.current) return;
       
  2357       dispatch({
       
  2358         type: "registerGroup",
       
  2359         group: group
       
  2360       });
       
  2361     }),
       
  2362     unregisterGroup: useAction(function (id) {
       
  2363       if (isUnmountedRef.current) return;
       
  2364       dispatch({
       
  2365         type: "unregisterGroup",
       
  2366         id: id
       
  2367       });
       
  2368     }),
       
  2369     move: useAction(function (id) {
       
  2370       return dispatch({
       
  2371         type: "move",
       
  2372         id: id
       
  2373       });
       
  2374     }),
       
  2375     next: useAction(function (allTheWay) {
       
  2376       return dispatch({
       
  2377         type: "next",
       
  2378         allTheWay: allTheWay
       
  2379       });
       
  2380     }),
       
  2381     previous: useAction(function (allTheWay) {
       
  2382       return dispatch({
       
  2383         type: "previous",
       
  2384         allTheWay: allTheWay
       
  2385       });
       
  2386     }),
       
  2387     up: useAction(function (allTheWay) {
       
  2388       return dispatch({
       
  2389         type: "up",
       
  2390         allTheWay: allTheWay
       
  2391       });
       
  2392     }),
       
  2393     down: useAction(function (allTheWay) {
       
  2394       return dispatch({
       
  2395         type: "down",
       
  2396         allTheWay: allTheWay
       
  2397       });
       
  2398     }),
       
  2399     first: useAction(function () {
       
  2400       return dispatch({
       
  2401         type: "first"
       
  2402       });
       
  2403     }),
       
  2404     last: useAction(function () {
       
  2405       return dispatch({
       
  2406         type: "last"
       
  2407       });
       
  2408     }),
       
  2409     unstable_sort: useAction(function () {
       
  2410       return dispatch({
       
  2411         type: "sort"
       
  2412       });
       
  2413     }),
       
  2414     unstable_setVirtual: useAction(function (value) {
       
  2415       return dispatch({
       
  2416         type: "setVirtual",
       
  2417         virtual: value
       
  2418       });
       
  2419     }),
       
  2420     setRTL: useAction(function (value) {
       
  2421       return dispatch({
       
  2422         type: "setRTL",
       
  2423         rtl: value
       
  2424       });
       
  2425     }),
       
  2426     setOrientation: useAction(function (value) {
       
  2427       return dispatch({
       
  2428         type: "setOrientation",
       
  2429         orientation: value
       
  2430       });
       
  2431     }),
       
  2432     setCurrentId: useAction(function (value) {
       
  2433       return dispatch({
       
  2434         type: "setCurrentId",
       
  2435         currentId: value
       
  2436       });
       
  2437     }),
       
  2438     setLoop: useAction(function (value) {
       
  2439       return dispatch({
       
  2440         type: "setLoop",
       
  2441         loop: value
       
  2442       });
       
  2443     }),
       
  2444     setWrap: useAction(function (value) {
       
  2445       return dispatch({
       
  2446         type: "setWrap",
       
  2447         wrap: value
       
  2448       });
       
  2449     }),
       
  2450     reset: useAction(function () {
       
  2451       return dispatch({
       
  2452         type: "reset"
       
  2453       });
       
  2454     })
       
  2455   });
  3316   });
  2456 }
  3317 }
  2457 var keys = [].concat(_Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"].__keys, ["unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "unstable_moves", "unstable_hasActiveWidget", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "unstable_sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "reset", "unstable_setHasActiveWidget"]);
  3318 
  2458 useCompositeState.__keys = keys;
  3319 function cleanUp(state, filterKey) {
  2459 
  3320   var deleted = state.current.deleted;
  2460 
  3321 
       
  3322   var _loop = function _loop() {
       
  3323     if (_isArray) {
       
  3324       if (_i >= _iterator.length) return "break";
       
  3325       _ref8 = _iterator[_i++];
       
  3326     } else {
       
  3327       _i = _iterator.next();
       
  3328       if (_i.done) return "break";
       
  3329       _ref8 = _i.value;
       
  3330     }
       
  3331 
       
  3332     var _ref7 = _ref8;
       
  3333     var key = _ref7.key;
       
  3334 
       
  3335     var filter = function filter(t) {
       
  3336       return t.key !== key;
       
  3337     };
       
  3338 
       
  3339     if (is.und(filterKey) || filterKey === key) {
       
  3340       state.current.instances.delete(key);
       
  3341       state.current.transitions = state.current.transitions.filter(filter);
       
  3342       state.current.deleted = state.current.deleted.filter(filter);
       
  3343     }
       
  3344   };
       
  3345 
       
  3346   for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
       
  3347     var _ref8;
       
  3348 
       
  3349     var _ret = _loop();
       
  3350 
       
  3351     if (_ret === "break") break;
       
  3352   }
       
  3353 
       
  3354   state.current.forceUpdate();
       
  3355 }
       
  3356 
       
  3357 function diffItems(_ref9, props) {
       
  3358   var first = _ref9.first,
       
  3359       prevProps = _ref9.prevProps,
       
  3360       state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]);
       
  3361 
       
  3362   var _get2 = get(props),
       
  3363       items = _get2.items,
       
  3364       keys = _get2.keys,
       
  3365       initial = _get2.initial,
       
  3366       from = _get2.from,
       
  3367       enter = _get2.enter,
       
  3368       leave = _get2.leave,
       
  3369       update = _get2.update,
       
  3370       _get2$trail = _get2.trail,
       
  3371       trail = _get2$trail === void 0 ? 0 : _get2$trail,
       
  3372       unique = _get2.unique,
       
  3373       config = _get2.config,
       
  3374       _get2$order = _get2.order,
       
  3375       order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order;
       
  3376 
       
  3377   var _get3 = get(prevProps),
       
  3378       _keys = _get3.keys,
       
  3379       _items = _get3.items;
       
  3380 
       
  3381   var current = _extends({}, state.current);
       
  3382 
       
  3383   var deleted = [].concat(state.deleted); // Compare next keys with current keys
       
  3384 
       
  3385   var currentKeys = Object.keys(current);
       
  3386   var currentSet = new Set(currentKeys);
       
  3387   var nextSet = new Set(keys);
       
  3388   var added = keys.filter(function (item) {
       
  3389     return !currentSet.has(item);
       
  3390   });
       
  3391   var removed = state.transitions.filter(function (item) {
       
  3392     return !item.destroyed && !nextSet.has(item.originalKey);
       
  3393   }).map(function (i) {
       
  3394     return i.originalKey;
       
  3395   });
       
  3396   var updated = keys.filter(function (item) {
       
  3397     return currentSet.has(item);
       
  3398   });
       
  3399   var delay = -trail;
       
  3400 
       
  3401   while (order.length) {
       
  3402     var changeType = order.shift();
       
  3403 
       
  3404     switch (changeType) {
       
  3405       case ENTER:
       
  3406         {
       
  3407           added.forEach(function (key, index) {
       
  3408             // In unique mode, remove fading out transitions if their key comes in again
       
  3409             if (unique && deleted.find(function (d) {
       
  3410               return d.originalKey === key;
       
  3411             })) deleted = deleted.filter(function (t) {
       
  3412               return t.originalKey !== key;
       
  3413             });
       
  3414             var keyIndex = keys.indexOf(key);
       
  3415             var item = items[keyIndex];
       
  3416             var slot = first && initial !== void 0 ? 'initial' : ENTER;
       
  3417             current[key] = {
       
  3418               slot: slot,
       
  3419               originalKey: key,
       
  3420               key: unique ? String(key) : guid++,
       
  3421               item: item,
       
  3422               trail: delay = delay + trail,
       
  3423               config: callProp(config, item, slot),
       
  3424               from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item),
       
  3425               to: callProp(enter, item)
       
  3426             };
       
  3427           });
       
  3428           break;
       
  3429         }
       
  3430 
       
  3431       case LEAVE:
       
  3432         {
       
  3433           removed.forEach(function (key) {
       
  3434             var keyIndex = _keys.indexOf(key);
       
  3435 
       
  3436             var item = _items[keyIndex];
       
  3437             var slot = LEAVE;
       
  3438             deleted.unshift(_extends({}, current[key], {
       
  3439               slot: slot,
       
  3440               destroyed: true,
       
  3441               left: _keys[Math.max(0, keyIndex - 1)],
       
  3442               right: _keys[Math.min(_keys.length, keyIndex + 1)],
       
  3443               trail: delay = delay + trail,
       
  3444               config: callProp(config, item, slot),
       
  3445               to: callProp(leave, item)
       
  3446             }));
       
  3447             delete current[key];
       
  3448           });
       
  3449           break;
       
  3450         }
       
  3451 
       
  3452       case UPDATE:
       
  3453         {
       
  3454           updated.forEach(function (key) {
       
  3455             var keyIndex = keys.indexOf(key);
       
  3456             var item = items[keyIndex];
       
  3457             var slot = UPDATE;
       
  3458             current[key] = _extends({}, current[key], {
       
  3459               item: item,
       
  3460               slot: slot,
       
  3461               trail: delay = delay + trail,
       
  3462               config: callProp(config, item, slot),
       
  3463               to: callProp(update, item)
       
  3464             });
       
  3465           });
       
  3466           break;
       
  3467         }
       
  3468     }
       
  3469   }
       
  3470 
       
  3471   var out = keys.map(function (key) {
       
  3472     return current[key];
       
  3473   }); // This tries to restore order for deleted items by finding their last known siblings
       
  3474   // only using the left sibling to keep order placement consistent for all deleted items
       
  3475 
       
  3476   deleted.forEach(function (_ref10) {
       
  3477     var left = _ref10.left,
       
  3478         right = _ref10.right,
       
  3479         item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]);
       
  3480 
       
  3481     var pos; // Was it the element on the left, if yes, move there ...
       
  3482 
       
  3483     if ((pos = out.findIndex(function (t) {
       
  3484       return t.originalKey === left;
       
  3485     })) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯
       
  3486 
       
  3487     pos = Math.max(0, pos);
       
  3488     out = [].concat(out.slice(0, pos), [item], out.slice(pos));
       
  3489   });
       
  3490   return _extends({}, state, {
       
  3491     changed: added.length || removed.length || updated.length,
       
  3492     first: first && added.length === 0,
       
  3493     transitions: out,
       
  3494     current: current,
       
  3495     deleted: deleted,
       
  3496     prevProps: props
       
  3497   });
       
  3498 }
       
  3499 
       
  3500 var AnimatedStyle =
       
  3501 /*#__PURE__*/
       
  3502 function (_AnimatedObject) {
       
  3503   _inheritsLoose(AnimatedStyle, _AnimatedObject);
       
  3504 
       
  3505   function AnimatedStyle(style) {
       
  3506     var _this;
       
  3507 
       
  3508     if (style === void 0) {
       
  3509       style = {};
       
  3510     }
       
  3511 
       
  3512     _this = _AnimatedObject.call(this) || this;
       
  3513 
       
  3514     if (style.transform && !(style.transform instanceof Animated)) {
       
  3515       style = applyAnimatedValues.transform(style);
       
  3516     }
       
  3517 
       
  3518     _this.payload = style;
       
  3519     return _this;
       
  3520   }
       
  3521 
       
  3522   return AnimatedStyle;
       
  3523 }(AnimatedObject);
       
  3524 
       
  3525 // http://www.w3.org/TR/css3-color/#svg-color
       
  3526 var colors = {
       
  3527   transparent: 0x00000000,
       
  3528   aliceblue: 0xf0f8ffff,
       
  3529   antiquewhite: 0xfaebd7ff,
       
  3530   aqua: 0x00ffffff,
       
  3531   aquamarine: 0x7fffd4ff,
       
  3532   azure: 0xf0ffffff,
       
  3533   beige: 0xf5f5dcff,
       
  3534   bisque: 0xffe4c4ff,
       
  3535   black: 0x000000ff,
       
  3536   blanchedalmond: 0xffebcdff,
       
  3537   blue: 0x0000ffff,
       
  3538   blueviolet: 0x8a2be2ff,
       
  3539   brown: 0xa52a2aff,
       
  3540   burlywood: 0xdeb887ff,
       
  3541   burntsienna: 0xea7e5dff,
       
  3542   cadetblue: 0x5f9ea0ff,
       
  3543   chartreuse: 0x7fff00ff,
       
  3544   chocolate: 0xd2691eff,
       
  3545   coral: 0xff7f50ff,
       
  3546   cornflowerblue: 0x6495edff,
       
  3547   cornsilk: 0xfff8dcff,
       
  3548   crimson: 0xdc143cff,
       
  3549   cyan: 0x00ffffff,
       
  3550   darkblue: 0x00008bff,
       
  3551   darkcyan: 0x008b8bff,
       
  3552   darkgoldenrod: 0xb8860bff,
       
  3553   darkgray: 0xa9a9a9ff,
       
  3554   darkgreen: 0x006400ff,
       
  3555   darkgrey: 0xa9a9a9ff,
       
  3556   darkkhaki: 0xbdb76bff,
       
  3557   darkmagenta: 0x8b008bff,
       
  3558   darkolivegreen: 0x556b2fff,
       
  3559   darkorange: 0xff8c00ff,
       
  3560   darkorchid: 0x9932ccff,
       
  3561   darkred: 0x8b0000ff,
       
  3562   darksalmon: 0xe9967aff,
       
  3563   darkseagreen: 0x8fbc8fff,
       
  3564   darkslateblue: 0x483d8bff,
       
  3565   darkslategray: 0x2f4f4fff,
       
  3566   darkslategrey: 0x2f4f4fff,
       
  3567   darkturquoise: 0x00ced1ff,
       
  3568   darkviolet: 0x9400d3ff,
       
  3569   deeppink: 0xff1493ff,
       
  3570   deepskyblue: 0x00bfffff,
       
  3571   dimgray: 0x696969ff,
       
  3572   dimgrey: 0x696969ff,
       
  3573   dodgerblue: 0x1e90ffff,
       
  3574   firebrick: 0xb22222ff,
       
  3575   floralwhite: 0xfffaf0ff,
       
  3576   forestgreen: 0x228b22ff,
       
  3577   fuchsia: 0xff00ffff,
       
  3578   gainsboro: 0xdcdcdcff,
       
  3579   ghostwhite: 0xf8f8ffff,
       
  3580   gold: 0xffd700ff,
       
  3581   goldenrod: 0xdaa520ff,
       
  3582   gray: 0x808080ff,
       
  3583   green: 0x008000ff,
       
  3584   greenyellow: 0xadff2fff,
       
  3585   grey: 0x808080ff,
       
  3586   honeydew: 0xf0fff0ff,
       
  3587   hotpink: 0xff69b4ff,
       
  3588   indianred: 0xcd5c5cff,
       
  3589   indigo: 0x4b0082ff,
       
  3590   ivory: 0xfffff0ff,
       
  3591   khaki: 0xf0e68cff,
       
  3592   lavender: 0xe6e6faff,
       
  3593   lavenderblush: 0xfff0f5ff,
       
  3594   lawngreen: 0x7cfc00ff,
       
  3595   lemonchiffon: 0xfffacdff,
       
  3596   lightblue: 0xadd8e6ff,
       
  3597   lightcoral: 0xf08080ff,
       
  3598   lightcyan: 0xe0ffffff,
       
  3599   lightgoldenrodyellow: 0xfafad2ff,
       
  3600   lightgray: 0xd3d3d3ff,
       
  3601   lightgreen: 0x90ee90ff,
       
  3602   lightgrey: 0xd3d3d3ff,
       
  3603   lightpink: 0xffb6c1ff,
       
  3604   lightsalmon: 0xffa07aff,
       
  3605   lightseagreen: 0x20b2aaff,
       
  3606   lightskyblue: 0x87cefaff,
       
  3607   lightslategray: 0x778899ff,
       
  3608   lightslategrey: 0x778899ff,
       
  3609   lightsteelblue: 0xb0c4deff,
       
  3610   lightyellow: 0xffffe0ff,
       
  3611   lime: 0x00ff00ff,
       
  3612   limegreen: 0x32cd32ff,
       
  3613   linen: 0xfaf0e6ff,
       
  3614   magenta: 0xff00ffff,
       
  3615   maroon: 0x800000ff,
       
  3616   mediumaquamarine: 0x66cdaaff,
       
  3617   mediumblue: 0x0000cdff,
       
  3618   mediumorchid: 0xba55d3ff,
       
  3619   mediumpurple: 0x9370dbff,
       
  3620   mediumseagreen: 0x3cb371ff,
       
  3621   mediumslateblue: 0x7b68eeff,
       
  3622   mediumspringgreen: 0x00fa9aff,
       
  3623   mediumturquoise: 0x48d1ccff,
       
  3624   mediumvioletred: 0xc71585ff,
       
  3625   midnightblue: 0x191970ff,
       
  3626   mintcream: 0xf5fffaff,
       
  3627   mistyrose: 0xffe4e1ff,
       
  3628   moccasin: 0xffe4b5ff,
       
  3629   navajowhite: 0xffdeadff,
       
  3630   navy: 0x000080ff,
       
  3631   oldlace: 0xfdf5e6ff,
       
  3632   olive: 0x808000ff,
       
  3633   olivedrab: 0x6b8e23ff,
       
  3634   orange: 0xffa500ff,
       
  3635   orangered: 0xff4500ff,
       
  3636   orchid: 0xda70d6ff,
       
  3637   palegoldenrod: 0xeee8aaff,
       
  3638   palegreen: 0x98fb98ff,
       
  3639   paleturquoise: 0xafeeeeff,
       
  3640   palevioletred: 0xdb7093ff,
       
  3641   papayawhip: 0xffefd5ff,
       
  3642   peachpuff: 0xffdab9ff,
       
  3643   peru: 0xcd853fff,
       
  3644   pink: 0xffc0cbff,
       
  3645   plum: 0xdda0ddff,
       
  3646   powderblue: 0xb0e0e6ff,
       
  3647   purple: 0x800080ff,
       
  3648   rebeccapurple: 0x663399ff,
       
  3649   red: 0xff0000ff,
       
  3650   rosybrown: 0xbc8f8fff,
       
  3651   royalblue: 0x4169e1ff,
       
  3652   saddlebrown: 0x8b4513ff,
       
  3653   salmon: 0xfa8072ff,
       
  3654   sandybrown: 0xf4a460ff,
       
  3655   seagreen: 0x2e8b57ff,
       
  3656   seashell: 0xfff5eeff,
       
  3657   sienna: 0xa0522dff,
       
  3658   silver: 0xc0c0c0ff,
       
  3659   skyblue: 0x87ceebff,
       
  3660   slateblue: 0x6a5acdff,
       
  3661   slategray: 0x708090ff,
       
  3662   slategrey: 0x708090ff,
       
  3663   snow: 0xfffafaff,
       
  3664   springgreen: 0x00ff7fff,
       
  3665   steelblue: 0x4682b4ff,
       
  3666   tan: 0xd2b48cff,
       
  3667   teal: 0x008080ff,
       
  3668   thistle: 0xd8bfd8ff,
       
  3669   tomato: 0xff6347ff,
       
  3670   turquoise: 0x40e0d0ff,
       
  3671   violet: 0xee82eeff,
       
  3672   wheat: 0xf5deb3ff,
       
  3673   white: 0xffffffff,
       
  3674   whitesmoke: 0xf5f5f5ff,
       
  3675   yellow: 0xffff00ff,
       
  3676   yellowgreen: 0x9acd32ff
       
  3677 };
       
  3678 
       
  3679 // const INTEGER = '[-+]?\\d+';
       
  3680 var NUMBER = '[-+]?\\d*\\.?\\d+';
       
  3681 var PERCENTAGE = NUMBER + '%';
       
  3682 
       
  3683 function call() {
       
  3684   for (var _len = arguments.length, parts = new Array(_len), _key = 0; _key < _len; _key++) {
       
  3685     parts[_key] = arguments[_key];
       
  3686   }
       
  3687 
       
  3688   return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)';
       
  3689 }
       
  3690 
       
  3691 var rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));
       
  3692 var rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));
       
  3693 var hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));
       
  3694 var hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
       
  3695 var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
       
  3696 var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
       
  3697 var hex6 = /^#([0-9a-fA-F]{6})$/;
       
  3698 var hex8 = /^#([0-9a-fA-F]{8})$/;
       
  3699 
       
  3700 /*
       
  3701 https://github.com/react-community/normalize-css-color
       
  3702 
       
  3703 BSD 3-Clause License
       
  3704 
       
  3705 Copyright (c) 2016, React Community
       
  3706 All rights reserved.
       
  3707 
       
  3708 Redistribution and use in source and binary forms, with or without
       
  3709 modification, are permitted provided that the following conditions are met:
       
  3710 
       
  3711 * Redistributions of source code must retain the above copyright notice, this
       
  3712   list of conditions and the following disclaimer.
       
  3713 
       
  3714 * Redistributions in binary form must reproduce the above copyright notice,
       
  3715   this list of conditions and the following disclaimer in the documentation
       
  3716   and/or other materials provided with the distribution.
       
  3717 
       
  3718 * Neither the name of the copyright holder nor the names of its
       
  3719   contributors may be used to endorse or promote products derived from
       
  3720   this software without specific prior written permission.
       
  3721 
       
  3722 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
       
  3723 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       
  3724 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
       
  3725 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
       
  3726 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
       
  3727 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
       
  3728 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
       
  3729 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
       
  3730 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
       
  3731 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
  3732 */
       
  3733 function normalizeColor(color) {
       
  3734   var match;
       
  3735 
       
  3736   if (typeof color === 'number') {
       
  3737     return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;
       
  3738   } // Ordered based on occurrences on Facebook codebase
       
  3739 
       
  3740 
       
  3741   if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;
       
  3742   if (colors.hasOwnProperty(color)) return colors[color];
       
  3743 
       
  3744   if (match = rgb.exec(color)) {
       
  3745     return (parse255(match[1]) << 24 | // r
       
  3746     parse255(match[2]) << 16 | // g
       
  3747     parse255(match[3]) << 8 | // b
       
  3748     0x000000ff) >>> // a
       
  3749     0;
       
  3750   }
       
  3751 
       
  3752   if (match = rgba.exec(color)) {
       
  3753     return (parse255(match[1]) << 24 | // r
       
  3754     parse255(match[2]) << 16 | // g
       
  3755     parse255(match[3]) << 8 | // b
       
  3756     parse1(match[4])) >>> // a
       
  3757     0;
       
  3758   }
       
  3759 
       
  3760   if (match = hex3.exec(color)) {
       
  3761     return parseInt(match[1] + match[1] + // r
       
  3762     match[2] + match[2] + // g
       
  3763     match[3] + match[3] + // b
       
  3764     'ff', // a
       
  3765     16) >>> 0;
       
  3766   } // https://drafts.csswg.org/css-color-4/#hex-notation
       
  3767 
       
  3768 
       
  3769   if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;
       
  3770 
       
  3771   if (match = hex4.exec(color)) {
       
  3772     return parseInt(match[1] + match[1] + // r
       
  3773     match[2] + match[2] + // g
       
  3774     match[3] + match[3] + // b
       
  3775     match[4] + match[4], // a
       
  3776     16) >>> 0;
       
  3777   }
       
  3778 
       
  3779   if (match = hsl.exec(color)) {
       
  3780     return (hslToRgb(parse360(match[1]), // h
       
  3781     parsePercentage(match[2]), // s
       
  3782     parsePercentage(match[3]) // l
       
  3783     ) | 0x000000ff) >>> // a
       
  3784     0;
       
  3785   }
       
  3786 
       
  3787   if (match = hsla.exec(color)) {
       
  3788     return (hslToRgb(parse360(match[1]), // h
       
  3789     parsePercentage(match[2]), // s
       
  3790     parsePercentage(match[3]) // l
       
  3791     ) | parse1(match[4])) >>> // a
       
  3792     0;
       
  3793   }
       
  3794 
       
  3795   return null;
       
  3796 }
       
  3797 
       
  3798 function hue2rgb(p, q, t) {
       
  3799   if (t < 0) t += 1;
       
  3800   if (t > 1) t -= 1;
       
  3801   if (t < 1 / 6) return p + (q - p) * 6 * t;
       
  3802   if (t < 1 / 2) return q;
       
  3803   if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
       
  3804   return p;
       
  3805 }
       
  3806 
       
  3807 function hslToRgb(h, s, l) {
       
  3808   var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
       
  3809   var p = 2 * l - q;
       
  3810   var r = hue2rgb(p, q, h + 1 / 3);
       
  3811   var g = hue2rgb(p, q, h);
       
  3812   var b = hue2rgb(p, q, h - 1 / 3);
       
  3813   return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
       
  3814 }
       
  3815 
       
  3816 function parse255(str) {
       
  3817   var int = parseInt(str, 10);
       
  3818   if (int < 0) return 0;
       
  3819   if (int > 255) return 255;
       
  3820   return int;
       
  3821 }
       
  3822 
       
  3823 function parse360(str) {
       
  3824   var int = parseFloat(str);
       
  3825   return (int % 360 + 360) % 360 / 360;
       
  3826 }
       
  3827 
       
  3828 function parse1(str) {
       
  3829   var num = parseFloat(str);
       
  3830   if (num < 0) return 0;
       
  3831   if (num > 1) return 255;
       
  3832   return Math.round(num * 255);
       
  3833 }
       
  3834 
       
  3835 function parsePercentage(str) {
       
  3836   // parseFloat conveniently ignores the final %
       
  3837   var int = parseFloat(str);
       
  3838   if (int < 0) return 0;
       
  3839   if (int > 100) return 1;
       
  3840   return int / 100;
       
  3841 }
       
  3842 
       
  3843 function colorToRgba(input) {
       
  3844   var int32Color = normalizeColor(input);
       
  3845   if (int32Color === null) return input;
       
  3846   int32Color = int32Color || 0;
       
  3847   var r = (int32Color & 0xff000000) >>> 24;
       
  3848   var g = (int32Color & 0x00ff0000) >>> 16;
       
  3849   var b = (int32Color & 0x0000ff00) >>> 8;
       
  3850   var a = (int32Color & 0x000000ff) / 255;
       
  3851   return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
       
  3852 } // Problem: https://github.com/animatedjs/animated/pull/102
       
  3853 // Solution: https://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly/658662
       
  3854 
       
  3855 
       
  3856 var stringShapeRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; // Covers rgb, rgba, hsl, hsla
       
  3857 // Taken from https://gist.github.com/olmokramer/82ccce673f86db7cda5e
       
  3858 
       
  3859 var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; // Covers color names (transparent, blue, etc.)
       
  3860 
       
  3861 var colorNamesRegex = new RegExp("(" + Object.keys(colors).join('|') + ")", 'g');
       
  3862 /**
       
  3863  * Supports string shapes by extracting numbers so new values can be computed,
       
  3864  * and recombines those values into new strings of the same shape.  Supports
       
  3865  * things like:
       
  3866  *
       
  3867  *   rgba(123, 42, 99, 0.36)           // colors
       
  3868  *   -45deg                            // values with units
       
  3869  *   0 2px 2px 0px rgba(0, 0, 0, 0.12) // box shadows
       
  3870  */
       
  3871 
       
  3872 var createStringInterpolator = function createStringInterpolator(config) {
       
  3873   // Replace colors with rgba
       
  3874   var outputRange = config.output.map(function (rangeValue) {
       
  3875     return rangeValue.replace(colorRegex, colorToRgba);
       
  3876   }).map(function (rangeValue) {
       
  3877     return rangeValue.replace(colorNamesRegex, colorToRgba);
       
  3878   });
       
  3879   var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
       
  3880     return [];
       
  3881   });
       
  3882   outputRange.forEach(function (value) {
       
  3883     value.match(stringShapeRegex).forEach(function (number, i) {
       
  3884       return outputRanges[i].push(+number);
       
  3885     });
       
  3886   });
       
  3887   var interpolations = outputRange[0].match(stringShapeRegex).map(function (_value, i) {
       
  3888     return createInterpolator(_extends({}, config, {
       
  3889       output: outputRanges[i]
       
  3890     }));
       
  3891   });
       
  3892   return function (input) {
       
  3893     var i = 0;
       
  3894     return outputRange[0] // 'rgba(0, 100, 200, 0)'
       
  3895     // ->
       
  3896     // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'
       
  3897     .replace(stringShapeRegex, function () {
       
  3898       return interpolations[i++](input);
       
  3899     }) // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to
       
  3900     // round the opacity (4th column).
       
  3901     .replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, function (_, p1, p2, p3, p4) {
       
  3902       return "rgba(" + Math.round(p1) + ", " + Math.round(p2) + ", " + Math.round(p3) + ", " + p4 + ")";
       
  3903     });
       
  3904   };
       
  3905 };
       
  3906 
       
  3907 var isUnitlessNumber = {
       
  3908   animationIterationCount: true,
       
  3909   borderImageOutset: true,
       
  3910   borderImageSlice: true,
       
  3911   borderImageWidth: true,
       
  3912   boxFlex: true,
       
  3913   boxFlexGroup: true,
       
  3914   boxOrdinalGroup: true,
       
  3915   columnCount: true,
       
  3916   columns: true,
       
  3917   flex: true,
       
  3918   flexGrow: true,
       
  3919   flexPositive: true,
       
  3920   flexShrink: true,
       
  3921   flexNegative: true,
       
  3922   flexOrder: true,
       
  3923   gridRow: true,
       
  3924   gridRowEnd: true,
       
  3925   gridRowSpan: true,
       
  3926   gridRowStart: true,
       
  3927   gridColumn: true,
       
  3928   gridColumnEnd: true,
       
  3929   gridColumnSpan: true,
       
  3930   gridColumnStart: true,
       
  3931   fontWeight: true,
       
  3932   lineClamp: true,
       
  3933   lineHeight: true,
       
  3934   opacity: true,
       
  3935   order: true,
       
  3936   orphans: true,
       
  3937   tabSize: true,
       
  3938   widows: true,
       
  3939   zIndex: true,
       
  3940   zoom: true,
       
  3941   // SVG-related properties
       
  3942   fillOpacity: true,
       
  3943   floodOpacity: true,
       
  3944   stopOpacity: true,
       
  3945   strokeDasharray: true,
       
  3946   strokeDashoffset: true,
       
  3947   strokeMiterlimit: true,
       
  3948   strokeOpacity: true,
       
  3949   strokeWidth: true
       
  3950 };
       
  3951 
       
  3952 var prefixKey = function prefixKey(prefix, key) {
       
  3953   return prefix + key.charAt(0).toUpperCase() + key.substring(1);
       
  3954 };
       
  3955 
       
  3956 var prefixes = ['Webkit', 'Ms', 'Moz', 'O'];
       
  3957 isUnitlessNumber = Object.keys(isUnitlessNumber).reduce(function (acc, prop) {
       
  3958   prefixes.forEach(function (prefix) {
       
  3959     return acc[prefixKey(prefix, prop)] = acc[prop];
       
  3960   });
       
  3961   return acc;
       
  3962 }, isUnitlessNumber);
       
  3963 
       
  3964 function dangerousStyleValue(name, value, isCustomProperty) {
       
  3965   if (value == null || typeof value === 'boolean' || value === '') return '';
       
  3966   if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
       
  3967 
       
  3968   return ('' + value).trim();
       
  3969 }
       
  3970 
       
  3971 var attributeCache = {};
       
  3972 injectCreateAnimatedStyle(function (style) {
       
  3973   return new AnimatedStyle(style);
       
  3974 });
       
  3975 injectDefaultElement('div');
       
  3976 injectStringInterpolator(createStringInterpolator);
       
  3977 injectColorNames(colors);
       
  3978 injectApplyAnimatedValues(function (instance, props) {
       
  3979   if (instance.nodeType && instance.setAttribute !== undefined) {
       
  3980     var style = props.style,
       
  3981         children = props.children,
       
  3982         scrollTop = props.scrollTop,
       
  3983         scrollLeft = props.scrollLeft,
       
  3984         attributes = _objectWithoutPropertiesLoose(props, ["style", "children", "scrollTop", "scrollLeft"]);
       
  3985 
       
  3986     var filter = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';
       
  3987     if (scrollTop !== void 0) instance.scrollTop = scrollTop;
       
  3988     if (scrollLeft !== void 0) instance.scrollLeft = scrollLeft; // Set textContent, if children is an animatable value
       
  3989 
       
  3990     if (children !== void 0) instance.textContent = children; // Set styles ...
       
  3991 
       
  3992     for (var styleName in style) {
       
  3993       if (!style.hasOwnProperty(styleName)) continue;
       
  3994       var isCustomProperty = styleName.indexOf('--') === 0;
       
  3995       var styleValue = dangerousStyleValue(styleName, style[styleName], isCustomProperty);
       
  3996       if (styleName === 'float') styleName = 'cssFloat';
       
  3997       if (isCustomProperty) instance.style.setProperty(styleName, styleValue);else instance.style[styleName] = styleValue;
       
  3998     } // Set attributes ...
       
  3999 
       
  4000 
       
  4001     for (var name in attributes) {
       
  4002       // Attributes are written in dash case
       
  4003       var dashCase = filter ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, function (n) {
       
  4004         return '-' + n.toLowerCase();
       
  4005       }));
       
  4006       if (typeof instance.getAttribute(dashCase) !== 'undefined') instance.setAttribute(dashCase, attributes[name]);
       
  4007     }
       
  4008 
       
  4009     return;
       
  4010   } else return false;
       
  4011 }, function (style) {
       
  4012   return style;
       
  4013 });
       
  4014 
       
  4015 var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
       
  4016 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
       
  4017 // Extend animated with all the available THREE elements
       
  4018 var apply = merge(createAnimatedComponent, false);
       
  4019 var extendedAnimated = apply(domElements);
       
  4020 
       
  4021 exports.apply = apply;
       
  4022 exports.config = config;
       
  4023 exports.update = update;
       
  4024 exports.animated = extendedAnimated;
       
  4025 exports.a = extendedAnimated;
       
  4026 exports.interpolate = interpolate$1;
       
  4027 exports.Globals = Globals;
       
  4028 exports.useSpring = useSpring;
       
  4029 exports.useTrail = useTrail;
       
  4030 exports.useTransition = useTransition;
       
  4031 exports.useChain = useChain;
       
  4032 exports.useSprings = useSprings;
  2461 
  4033 
  2462 
  4034 
  2463 /***/ }),
  4035 /***/ }),
  2464 /* 52 */
  4036 
  2465 /***/ (function(module, exports) {
  4037 /***/ "Zss7":
  2466 
       
  2467 (function() { module.exports = this["wp"]["keyboardShortcuts"]; }());
       
  2468 
       
  2469 /***/ }),
       
  2470 /* 53 */
       
  2471 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2472 
       
  2473 "use strict";
       
  2474 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isSelfTarget; });
       
  2475 /**
       
  2476  * Returns `true` if `event.target` and `event.currentTarget` are the same.
       
  2477  */
       
  2478 function isSelfTarget(event) {
       
  2479   return event.target === event.currentTarget;
       
  2480 }
       
  2481 
       
  2482 
       
  2483 
       
  2484 
       
  2485 /***/ }),
       
  2486 /* 54 */
       
  2487 /***/ (function(module, exports) {
       
  2488 
       
  2489 (function() { module.exports = this["wp"]["a11y"]; }());
       
  2490 
       
  2491 /***/ }),
       
  2492 /* 55 */
       
  2493 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2494 
       
  2495 "use strict";
       
  2496 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; });
       
  2497 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectWithoutPropertiesLoose; });
       
  2498 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _createForOfIteratorHelperLoose; });
       
  2499 function _defineProperty(obj, key, value) {
       
  2500   if (key in obj) {
       
  2501     Object.defineProperty(obj, key, {
       
  2502       value: value,
       
  2503       enumerable: true,
       
  2504       configurable: true,
       
  2505       writable: true
       
  2506     });
       
  2507   } else {
       
  2508     obj[key] = value;
       
  2509   }
       
  2510 
       
  2511   return obj;
       
  2512 }
       
  2513 
       
  2514 function ownKeys(object, enumerableOnly) {
       
  2515   var keys = Object.keys(object);
       
  2516 
       
  2517   if (Object.getOwnPropertySymbols) {
       
  2518     var symbols = Object.getOwnPropertySymbols(object);
       
  2519     if (enumerableOnly) symbols = symbols.filter(function (sym) {
       
  2520       return Object.getOwnPropertyDescriptor(object, sym).enumerable;
       
  2521     });
       
  2522     keys.push.apply(keys, symbols);
       
  2523   }
       
  2524 
       
  2525   return keys;
       
  2526 }
       
  2527 
       
  2528 function _objectSpread2(target) {
       
  2529   for (var i = 1; i < arguments.length; i++) {
       
  2530     var source = arguments[i] != null ? arguments[i] : {};
       
  2531 
       
  2532     if (i % 2) {
       
  2533       ownKeys(Object(source), true).forEach(function (key) {
       
  2534         _defineProperty(target, key, source[key]);
       
  2535       });
       
  2536     } else if (Object.getOwnPropertyDescriptors) {
       
  2537       Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
       
  2538     } else {
       
  2539       ownKeys(Object(source)).forEach(function (key) {
       
  2540         Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
       
  2541       });
       
  2542     }
       
  2543   }
       
  2544 
       
  2545   return target;
       
  2546 }
       
  2547 
       
  2548 function _objectWithoutPropertiesLoose(source, excluded) {
       
  2549   if (source == null) return {};
       
  2550   var target = {};
       
  2551   var sourceKeys = Object.keys(source);
       
  2552   var key, i;
       
  2553 
       
  2554   for (i = 0; i < sourceKeys.length; i++) {
       
  2555     key = sourceKeys[i];
       
  2556     if (excluded.indexOf(key) >= 0) continue;
       
  2557     target[key] = source[key];
       
  2558   }
       
  2559 
       
  2560   return target;
       
  2561 }
       
  2562 
       
  2563 function _unsupportedIterableToArray(o, minLen) {
       
  2564   if (!o) return;
       
  2565   if (typeof o === "string") return _arrayLikeToArray(o, minLen);
       
  2566   var n = Object.prototype.toString.call(o).slice(8, -1);
       
  2567   if (n === "Object" && o.constructor) n = o.constructor.name;
       
  2568   if (n === "Map" || n === "Set") return Array.from(o);
       
  2569   if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
       
  2570 }
       
  2571 
       
  2572 function _arrayLikeToArray(arr, len) {
       
  2573   if (len == null || len > arr.length) len = arr.length;
       
  2574 
       
  2575   for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
       
  2576 
       
  2577   return arr2;
       
  2578 }
       
  2579 
       
  2580 function _createForOfIteratorHelperLoose(o, allowArrayLike) {
       
  2581   var it;
       
  2582 
       
  2583   if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
       
  2584     if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
       
  2585       if (it) o = it;
       
  2586       var i = 0;
       
  2587       return function () {
       
  2588         if (i >= o.length) return {
       
  2589           done: true
       
  2590         };
       
  2591         return {
       
  2592           done: false,
       
  2593           value: o[i++]
       
  2594         };
       
  2595       };
       
  2596     }
       
  2597 
       
  2598     throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
       
  2599   }
       
  2600 
       
  2601   it = o[Symbol.iterator]();
       
  2602   return it.next.bind(it);
       
  2603 }
       
  2604 
       
  2605 
       
  2606 
       
  2607 
       
  2608 /***/ }),
       
  2609 /* 56 */
       
  2610 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2611 
       
  2612 "use strict";
       
  2613 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return shallowEqual; });
       
  2614 /**
       
  2615  * Compares two objects.
       
  2616  *
       
  2617  * @example
       
  2618  * import { shallowEqual } from "reakit-utils";
       
  2619  *
       
  2620  * shallowEqual({ a: "a" }, {}); // false
       
  2621  * shallowEqual({ a: "a" }, { b: "b" }); // false
       
  2622  * shallowEqual({ a: "a" }, { a: "a" }); // true
       
  2623  * shallowEqual({ a: "a" }, { a: "a", b: "b" }); // false
       
  2624  */
       
  2625 function shallowEqual(objA, objB) {
       
  2626   if (objA === objB) return true;
       
  2627   if (!objA) return false;
       
  2628   if (!objB) return false;
       
  2629   if (typeof objA !== "object") return false;
       
  2630   if (typeof objB !== "object") return false;
       
  2631   var aKeys = Object.keys(objA);
       
  2632   var bKeys = Object.keys(objB);
       
  2633   var length = aKeys.length;
       
  2634   if (bKeys.length !== length) return false;
       
  2635 
       
  2636   for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) {
       
  2637     var key = _aKeys[_i];
       
  2638 
       
  2639     if (objA[key] !== objB[key]) {
       
  2640       return false;
       
  2641     }
       
  2642   }
       
  2643 
       
  2644   return true;
       
  2645 }
       
  2646 
       
  2647 
       
  2648 
       
  2649 
       
  2650 /***/ }),
       
  2651 /* 57 */
       
  2652 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2653 
       
  2654 "use strict";
       
  2655 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getActiveElement; });
       
  2656 /* harmony import */ var _getDocument_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47);
       
  2657 
       
  2658 
       
  2659 /**
       
  2660  * Returns `element.ownerDocument.activeElement`.
       
  2661  */
       
  2662 
       
  2663 function getActiveElement(element) {
       
  2664   return Object(_getDocument_js__WEBPACK_IMPORTED_MODULE_0__[/* getDocument */ "a"])(element).activeElement;
       
  2665 }
       
  2666 
       
  2667 
       
  2668 
       
  2669 
       
  2670 /***/ }),
       
  2671 /* 58 */,
       
  2672 /* 59 */
       
  2673 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2674 
       
  2675 "use strict";
       
  2676 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useIsomorphicEffect; });
       
  2677 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
       
  2678 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
       
  2679 
       
  2680 
       
  2681 /**
       
  2682  * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side
       
  2683  * rendering.
       
  2684  */
       
  2685 
       
  2686 var useIsomorphicEffect = typeof window === "undefined" ? react__WEBPACK_IMPORTED_MODULE_0__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"];
       
  2687 
       
  2688 
       
  2689 
       
  2690 
       
  2691 /***/ }),
       
  2692 /* 60 */
       
  2693 /***/ (function(module, exports, __webpack_require__) {
  4038 /***/ (function(module, exports, __webpack_require__) {
  2694 
  4039 
  2695 /**
  4040 var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.2
  2696  * Memize options object.
       
  2697  *
       
  2698  * @typedef MemizeOptions
       
  2699  *
       
  2700  * @property {number} [maxSize] Maximum size of the cache.
       
  2701  */
       
  2702 
       
  2703 /**
       
  2704  * Internal cache entry.
       
  2705  *
       
  2706  * @typedef MemizeCacheNode
       
  2707  *
       
  2708  * @property {?MemizeCacheNode|undefined} [prev] Previous node.
       
  2709  * @property {?MemizeCacheNode|undefined} [next] Next node.
       
  2710  * @property {Array<*>}                   args   Function arguments for cache
       
  2711  *                                               entry.
       
  2712  * @property {*}                          val    Function result.
       
  2713  */
       
  2714 
       
  2715 /**
       
  2716  * Properties of the enhanced function for controlling cache.
       
  2717  *
       
  2718  * @typedef MemizeMemoizedFunction
       
  2719  *
       
  2720  * @property {()=>void} clear Clear the cache.
       
  2721  */
       
  2722 
       
  2723 /**
       
  2724  * Accepts a function to be memoized, and returns a new memoized function, with
       
  2725  * optional options.
       
  2726  *
       
  2727  * @template {Function} F
       
  2728  *
       
  2729  * @param {F}             fn        Function to memoize.
       
  2730  * @param {MemizeOptions} [options] Options object.
       
  2731  *
       
  2732  * @return {F & MemizeMemoizedFunction} Memoized function.
       
  2733  */
       
  2734 function memize( fn, options ) {
       
  2735 	var size = 0;
       
  2736 
       
  2737 	/** @type {?MemizeCacheNode|undefined} */
       
  2738 	var head;
       
  2739 
       
  2740 	/** @type {?MemizeCacheNode|undefined} */
       
  2741 	var tail;
       
  2742 
       
  2743 	options = options || {};
       
  2744 
       
  2745 	function memoized( /* ...args */ ) {
       
  2746 		var node = head,
       
  2747 			len = arguments.length,
       
  2748 			args, i;
       
  2749 
       
  2750 		searchCache: while ( node ) {
       
  2751 			// Perform a shallow equality test to confirm that whether the node
       
  2752 			// under test is a candidate for the arguments passed. Two arrays
       
  2753 			// are shallowly equal if their length matches and each entry is
       
  2754 			// strictly equal between the two sets. Avoid abstracting to a
       
  2755 			// function which could incur an arguments leaking deoptimization.
       
  2756 
       
  2757 			// Check whether node arguments match arguments length
       
  2758 			if ( node.args.length !== arguments.length ) {
       
  2759 				node = node.next;
       
  2760 				continue;
       
  2761 			}
       
  2762 
       
  2763 			// Check whether node arguments match arguments values
       
  2764 			for ( i = 0; i < len; i++ ) {
       
  2765 				if ( node.args[ i ] !== arguments[ i ] ) {
       
  2766 					node = node.next;
       
  2767 					continue searchCache;
       
  2768 				}
       
  2769 			}
       
  2770 
       
  2771 			// At this point we can assume we've found a match
       
  2772 
       
  2773 			// Surface matched node to head if not already
       
  2774 			if ( node !== head ) {
       
  2775 				// As tail, shift to previous. Must only shift if not also
       
  2776 				// head, since if both head and tail, there is no previous.
       
  2777 				if ( node === tail ) {
       
  2778 					tail = node.prev;
       
  2779 				}
       
  2780 
       
  2781 				// Adjust siblings to point to each other. If node was tail,
       
  2782 				// this also handles new tail's empty `next` assignment.
       
  2783 				/** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
       
  2784 				if ( node.next ) {
       
  2785 					node.next.prev = node.prev;
       
  2786 				}
       
  2787 
       
  2788 				node.next = head;
       
  2789 				node.prev = null;
       
  2790 				/** @type {MemizeCacheNode} */ ( head ).prev = node;
       
  2791 				head = node;
       
  2792 			}
       
  2793 
       
  2794 			// Return immediately
       
  2795 			return node.val;
       
  2796 		}
       
  2797 
       
  2798 		// No cached value found. Continue to insertion phase:
       
  2799 
       
  2800 		// Create a copy of arguments (avoid leaking deoptimization)
       
  2801 		args = new Array( len );
       
  2802 		for ( i = 0; i < len; i++ ) {
       
  2803 			args[ i ] = arguments[ i ];
       
  2804 		}
       
  2805 
       
  2806 		node = {
       
  2807 			args: args,
       
  2808 
       
  2809 			// Generate the result from original function
       
  2810 			val: fn.apply( null, args ),
       
  2811 		};
       
  2812 
       
  2813 		// Don't need to check whether node is already head, since it would
       
  2814 		// have been returned above already if it was
       
  2815 
       
  2816 		// Shift existing head down list
       
  2817 		if ( head ) {
       
  2818 			head.prev = node;
       
  2819 			node.next = head;
       
  2820 		} else {
       
  2821 			// If no head, follows that there's no tail (at initial or reset)
       
  2822 			tail = node;
       
  2823 		}
       
  2824 
       
  2825 		// Trim tail if we're reached max size and are pending cache insertion
       
  2826 		if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
       
  2827 			tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
       
  2828 			/** @type {MemizeCacheNode} */ ( tail ).next = null;
       
  2829 		} else {
       
  2830 			size++;
       
  2831 		}
       
  2832 
       
  2833 		head = node;
       
  2834 
       
  2835 		return node.val;
       
  2836 	}
       
  2837 
       
  2838 	memoized.clear = function() {
       
  2839 		head = null;
       
  2840 		tail = null;
       
  2841 		size = 0;
       
  2842 	};
       
  2843 
       
  2844 	if ( false ) {}
       
  2845 
       
  2846 	// Ignore reason: There's not a clear solution to create an intersection of
       
  2847 	// the function with additional properties, where the goal is to retain the
       
  2848 	// function signature of the incoming argument and add control properties
       
  2849 	// on the return value.
       
  2850 
       
  2851 	// @ts-ignore
       
  2852 	return memoized;
       
  2853 }
       
  2854 
       
  2855 module.exports = memize;
       
  2856 
       
  2857 
       
  2858 /***/ }),
       
  2859 /* 61 */
       
  2860 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2861 
       
  2862 "use strict";
       
  2863 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyState; });
       
  2864 function isUpdater(argument) {
       
  2865   return typeof argument === "function";
       
  2866 }
       
  2867 /**
       
  2868  * Receives a `setState` argument and calls it with `currentValue` if it's a
       
  2869  * function. Otherwise return the argument as the new value.
       
  2870  *
       
  2871  * @example
       
  2872  * import { applyState } from "reakit-utils";
       
  2873  *
       
  2874  * applyState((value) => value + 1, 1); // 2
       
  2875  * applyState(2, 1); // 2
       
  2876  */
       
  2877 
       
  2878 
       
  2879 function applyState(argument, currentValue) {
       
  2880   if (isUpdater(argument)) {
       
  2881     return argument(currentValue);
       
  2882   }
       
  2883 
       
  2884   return argument;
       
  2885 }
       
  2886 
       
  2887 
       
  2888 
       
  2889 
       
  2890 /***/ }),
       
  2891 /* 62 */
       
  2892 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2893 
       
  2894 "use strict";
       
  2895 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useSealedState; });
       
  2896 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
       
  2897 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
       
  2898 
       
  2899 
       
  2900 /**
       
  2901  * React custom hook that returns the very first value passed to `initialState`,
       
  2902  * even if it changes between re-renders.
       
  2903  */
       
  2904 function useSealedState(initialState) {
       
  2905   var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(initialState),
       
  2906       sealed = _React$useState[0];
       
  2907 
       
  2908   return sealed;
       
  2909 }
       
  2910 
       
  2911 
       
  2912 
       
  2913 
       
  2914 /***/ }),
       
  2915 /* 63 */
       
  2916 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2917 
       
  2918 "use strict";
       
  2919 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useForkRef; });
       
  2920 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
       
  2921 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
       
  2922 
       
  2923 
       
  2924 // https://github.com/mui-org/material-ui/blob/2bcc874cf07b81202968f769cb9c2398c7c11311/packages/material-ui/src/utils/useForkRef.js
       
  2925 
       
  2926 function setRef(ref, value) {
       
  2927   if (value === void 0) {
       
  2928     value = null;
       
  2929   }
       
  2930 
       
  2931   if (!ref) return;
       
  2932 
       
  2933   if (typeof ref === "function") {
       
  2934     ref(value);
       
  2935   } else {
       
  2936     ref.current = value;
       
  2937   }
       
  2938 }
       
  2939 /**
       
  2940  * Merges up to two React Refs into a single memoized function React Ref so you
       
  2941  * can pass it to an element.
       
  2942  *
       
  2943  * @example
       
  2944  * import React from "react";
       
  2945  * import { useForkRef } from "reakit-utils";
       
  2946  *
       
  2947  * const Component = React.forwardRef((props, ref) => {
       
  2948  *   const internalRef = React.useRef();
       
  2949  *   return <div {...props} ref={useForkRef(internalRef, ref)} />;
       
  2950  * });
       
  2951  */
       
  2952 
       
  2953 
       
  2954 function useForkRef(refA, refB) {
       
  2955   return Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () {
       
  2956     if (refA == null && refB == null) {
       
  2957       return null;
       
  2958     }
       
  2959 
       
  2960     return function (value) {
       
  2961       setRef(refA, value);
       
  2962       setRef(refB, value);
       
  2963     };
       
  2964   }, [refA, refB]);
       
  2965 }
       
  2966 
       
  2967 
       
  2968 
       
  2969 
       
  2970 /***/ }),
       
  2971 /* 64 */
       
  2972 /***/ (function(module, exports) {
       
  2973 
       
  2974 (function() { module.exports = this["wp"]["isShallowEqual"]; }());
       
  2975 
       
  2976 /***/ }),
       
  2977 /* 65 */
       
  2978 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2979 
       
  2980 "use strict";
       
  2981 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_useIdState; });
       
  2982 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
       
  2983 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
       
  2984 /* harmony import */ var reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62);
       
  2985 /* harmony import */ var _IdProvider_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68);
       
  2986 
       
  2987 
       
  2988 
       
  2989 
       
  2990 function unstable_useIdState(initialState) {
       
  2991   if (initialState === void 0) {
       
  2992     initialState = {};
       
  2993   }
       
  2994 
       
  2995   var _useSealedState = Object(reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_1__[/* useSealedState */ "a"])(initialState),
       
  2996       initialBaseId = _useSealedState.baseId;
       
  2997 
       
  2998   var generateId = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_IdProvider_js__WEBPACK_IMPORTED_MODULE_2__[/* unstable_IdContext */ "a"]);
       
  2999   var idCountRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(0);
       
  3000 
       
  3001   var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(function () {
       
  3002     return initialBaseId || generateId();
       
  3003   }),
       
  3004       baseId = _React$useState[0],
       
  3005       setBaseId = _React$useState[1];
       
  3006 
       
  3007   return {
       
  3008     baseId: baseId,
       
  3009     unstable_setBaseId: setBaseId,
       
  3010     unstable_idCountRef: idCountRef
       
  3011   };
       
  3012 }
       
  3013 var keys = ["baseId", "unstable_setBaseId", "unstable_idCountRef"];
       
  3014 unstable_useIdState.__keys = keys;
       
  3015 
       
  3016 
       
  3017 
       
  3018 
       
  3019 /***/ }),
       
  3020 /* 66 */
       
  3021 /***/ (function(module, exports, __webpack_require__) {
       
  3022 
       
  3023 var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1
       
  3024 // https://github.com/bgrins/TinyColor
  4041 // https://github.com/bgrins/TinyColor
  3025 // Brian Grinstead, MIT License
  4042 // Brian Grinstead, MIT License
  3026 
  4043 
  3027 (function(Math) {
  4044 (function(Math) {
  3028 
  4045 
  4215 
  5232 
  4216 })(Math);
  5233 })(Math);
  4217 
  5234 
  4218 
  5235 
  4219 /***/ }),
  5236 /***/ }),
  4220 /* 67 */
  5237 
       
  5238 /***/ "b2RC":
  4221 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5239 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4222 
  5240 
  4223 "use strict";
  5241 "use strict";
  4224 /* unused harmony export Box */
  5242 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  4225 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useBox; });
  5243 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  4226 /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
  5244 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  4227 /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
  5245 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  4228 /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
  5246 
  4229 /* harmony import */ var reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56);
       
  4230 
       
  4231 
       
  4232 
       
  4233 
       
  4234 
       
  4235 var useBox = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
       
  4236   name: "Box",
       
  4237   keys: ["unstable_system"],
       
  4238   propsAreEqual: function propsAreEqual(prev, next) {
       
  4239     var prevSystem = prev.unstable_system,
       
  4240         prevProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(prev, ["unstable_system"]);
       
  4241 
       
  4242     var nextSystem = next.unstable_system,
       
  4243         nextProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(next, ["unstable_system"]);
       
  4244 
       
  4245     if (prevSystem !== nextSystem && !Object(reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[/* shallowEqual */ "a"])(prevSystem, nextSystem)) {
       
  4246       return false;
       
  4247     }
       
  4248 
       
  4249     return Object(reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[/* shallowEqual */ "a"])(prevProps, nextProps);
       
  4250   }
       
  4251 });
       
  4252 var Box = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
       
  4253   as: "div",
       
  4254   useHook: useBox
       
  4255 });
       
  4256 
       
  4257 
       
  4258 
       
  4259 
       
  4260 /***/ }),
       
  4261 /* 68 */
       
  4262 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4263 
       
  4264 "use strict";
       
  4265 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_IdContext; });
       
  4266 /* unused harmony export unstable_IdProvider */
       
  4267 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
       
  4268 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
       
  4269 
       
  4270 
       
  4271 var defaultPrefix = "id";
       
  4272 function generateRandomString(prefix) {
       
  4273   if (prefix === void 0) {
       
  4274     prefix = defaultPrefix;
       
  4275   }
       
  4276 
       
  4277   return "" + (prefix ? prefix + "-" : "") + Math.random().toString(32).substr(2, 6);
       
  4278 }
       
  4279 
       
  4280 var unstable_IdContext = Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(generateRandomString);
       
  4281 function unstable_IdProvider(_ref) {
       
  4282   var children = _ref.children,
       
  4283       _ref$prefix = _ref.prefix,
       
  4284       prefix = _ref$prefix === void 0 ? defaultPrefix : _ref$prefix;
       
  4285   var count = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(0);
       
  4286   var generateId = Object(react__WEBPACK_IMPORTED_MODULE_0__["useCallback"])(function (localPrefix) {
       
  4287     if (localPrefix === void 0) {
       
  4288       localPrefix = prefix;
       
  4289     }
       
  4290 
       
  4291     return "" + (localPrefix ? localPrefix + "-" : "") + ++count.current;
       
  4292   }, [prefix]);
       
  4293   return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(unstable_IdContext.Provider, {
       
  4294     value: generateId
       
  4295   }, children);
       
  4296 }
       
  4297 
       
  4298 
       
  4299 
       
  4300 
       
  4301 /***/ }),
       
  4302 /* 69 */
       
  4303 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4304 
       
  4305 "use strict";
       
  4306 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasFocusWithin; });
       
  4307 /* harmony import */ var _getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
       
  4308 
       
  4309 
       
  4310 
       
  4311 /**
       
  4312  * Checks if `element` has focus.
       
  4313  *
       
  4314  * @example
       
  4315  * import { hasFocusWithin } from "reakit-utils";
       
  4316  *
       
  4317  * hasFocusWithin(document.getElementById("id"));
       
  4318  */
       
  4319 
       
  4320 function hasFocusWithin(element) {
       
  4321   var activeElement = Object(_getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__[/* getActiveElement */ "a"])(element);
       
  4322   if (!activeElement) return false;
       
  4323   if (element.contains(activeElement)) return true;
       
  4324   var activeDescendant = activeElement.getAttribute("aria-activedescendant");
       
  4325   if (!activeDescendant) return false;
       
  4326   return activeDescendant === element.id || !!element.querySelector("#" + activeDescendant);
       
  4327 }
       
  4328 
       
  4329 
       
  4330 
       
  4331 
       
  4332 /***/ }),
       
  4333 /* 70 */
       
  4334 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4335 
       
  4336 "use strict";
       
  4337 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isButton; });
       
  4338 var buttonInputTypes = ["button", "color", "file", "image", "reset", "submit"];
       
  4339 /**
       
  4340  * Checks whether `element` is a native HTML button element or not.
       
  4341  *
       
  4342  * @example
       
  4343  * import { isButton } from "reakit-utils";
       
  4344  *
       
  4345  * isButton(document.querySelector("button")); // true
       
  4346  * isButton(document.querySelector("input[type='button']")); // true
       
  4347  * isButton(document.querySelector("div")); // false
       
  4348  * isButton(document.querySelector("input[type='text']")); // false
       
  4349  *
       
  4350  * @returns {boolean}
       
  4351  */
       
  4352 
       
  4353 function isButton(element) {
       
  4354   if (element.tagName === "BUTTON") return true;
       
  4355 
       
  4356   if (element.tagName === "INPUT") {
       
  4357     var input = element;
       
  4358     return buttonInputTypes.indexOf(input.type) !== -1;
       
  4359   }
       
  4360 
       
  4361   return false;
       
  4362 }
       
  4363 
       
  4364 
       
  4365 
       
  4366 
       
  4367 /***/ }),
       
  4368 /* 71 */
       
  4369 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4370 
       
  4371 "use strict";
       
  4372 
       
  4373 // EXPORTS
       
  4374 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ ensureFocus; });
       
  4375 __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ getClosestFocusable; });
       
  4376 
       
  4377 // UNUSED EXPORTS: getAllFocusableIn, getAllTabbableIn, getFirstFocusableIn, getFirstTabbableIn, getLastTabbableIn, getNextTabbableIn, getPreviousTabbableIn, isFocusable, isTabbable
       
  4378 
       
  4379 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/matches.js
       
  4380 /**
       
  4381  * Ponyfill for `Element.prototype.matches`
       
  4382  *
       
  4383  * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
       
  4384  */
       
  4385 function matches(element, selectors) {
       
  4386   if ("matches" in element) return element.matches(selectors);
       
  4387   if ("msMatchesSelector" in element) return element.msMatchesSelector(selectors);
       
  4388   return element.webkitMatchesSelector(selectors);
       
  4389 }
       
  4390 
       
  4391 
       
  4392 
       
  4393 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/closest.js
       
  4394 
       
  4395 
       
  4396 /**
       
  4397  * Ponyfill for `Element.prototype.closest`
       
  4398  *
       
  4399  * @example
       
  4400  * import { closest } from "reakit-utils";
       
  4401  *
       
  4402  * closest(document.getElementById("id"), "div");
       
  4403  * // same as
       
  4404  * document.getElementById("id").closest("div");
       
  4405  */
       
  4406 function closest(element, selectors) {
       
  4407   if ("closest" in element) return element.closest(selectors);
       
  4408 
       
  4409   do {
       
  4410     if (matches(element, selectors)) return element;
       
  4411     element = element.parentElement || element.parentNode;
       
  4412   } while (element !== null && element.nodeType === 1);
       
  4413 
       
  4414   return null;
       
  4415 }
       
  4416 
       
  4417 
       
  4418 
       
  4419 // EXTERNAL MODULE: ./node_modules/reakit-utils/es/getActiveElement.js
       
  4420 var getActiveElement = __webpack_require__(57);
       
  4421 
       
  4422 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/tabbable.js
       
  4423 
       
  4424 
       
  4425 
       
  4426 
       
  4427 
       
  4428 /** @module tabbable */
       
  4429 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'])";
       
  4430 
       
  4431 function isVisible(element) {
       
  4432   return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;
       
  4433 }
       
  4434 
       
  4435 function hasNegativeTabIndex(element) {
       
  4436   var tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10);
       
  4437   return tabIndex < 0;
       
  4438 }
       
  4439 /**
       
  4440  * Checks whether `element` is focusable or not.
       
  4441  *
       
  4442  * @memberof tabbable
       
  4443  *
       
  4444  * @example
       
  4445  * import { isFocusable } from "reakit-utils";
       
  4446  *
       
  4447  * isFocusable(document.querySelector("input")); // true
       
  4448  * isFocusable(document.querySelector("input[tabindex='-1']")); // true
       
  4449  * isFocusable(document.querySelector("input[hidden]")); // false
       
  4450  * isFocusable(document.querySelector("input:disabled")); // false
       
  4451  */
       
  4452 
       
  4453 
       
  4454 function isFocusable(element) {
       
  4455   return matches(element, selector) && isVisible(element);
       
  4456 }
       
  4457 /**
       
  4458  * Checks whether `element` is tabbable or not.
       
  4459  *
       
  4460  * @memberof tabbable
       
  4461  *
       
  4462  * @example
       
  4463  * import { isTabbable } from "reakit-utils";
       
  4464  *
       
  4465  * isTabbable(document.querySelector("input")); // true
       
  4466  * isTabbable(document.querySelector("input[tabindex='-1']")); // false
       
  4467  * isTabbable(document.querySelector("input[hidden]")); // false
       
  4468  * isTabbable(document.querySelector("input:disabled")); // false
       
  4469  */
       
  4470 
       
  4471 function isTabbable(element) {
       
  4472   return isFocusable(element) && !hasNegativeTabIndex(element);
       
  4473 }
       
  4474 /**
       
  4475  * Returns all the focusable elements in `container`.
       
  4476  *
       
  4477  * @memberof tabbable
       
  4478  *
       
  4479  * @param {Element} container
       
  4480  *
       
  4481  * @returns {Element[]}
       
  4482  */
       
  4483 
       
  4484 function getAllFocusableIn(container) {
       
  4485   var allFocusable = Array.from(container.querySelectorAll(selector));
       
  4486   allFocusable.unshift(container);
       
  4487   return allFocusable.filter(isFocusable);
       
  4488 }
       
  4489 /**
       
  4490  * Returns the first focusable element in `container`.
       
  4491  *
       
  4492  * @memberof tabbable
       
  4493  *
       
  4494  * @param {Element} container
       
  4495  *
       
  4496  * @returns {Element|null}
       
  4497  */
       
  4498 
       
  4499 function getFirstFocusableIn(container) {
       
  4500   var allFocusable = getAllFocusableIn(container);
       
  4501   return allFocusable.length ? allFocusable[0] : null;
       
  4502 }
       
  4503 /**
       
  4504  * Returns all the tabbable elements in `container`, including the container
       
  4505  * itself.
       
  4506  *
       
  4507  * @memberof tabbable
       
  4508  *
       
  4509  * @param {Element} container
       
  4510  * @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones.
       
  4511  *
       
  4512  * @returns {Element[]}
       
  4513  */
       
  4514 
       
  4515 function getAllTabbableIn(container, fallbackToFocusable) {
       
  4516   var allFocusable = Array.from(container.querySelectorAll(selector));
       
  4517   var allTabbable = allFocusable.filter(isTabbable);
       
  4518 
       
  4519   if (isTabbable(container)) {
       
  4520     allTabbable.unshift(container);
       
  4521   }
       
  4522 
       
  4523   if (!allTabbable.length && fallbackToFocusable) {
       
  4524     return allFocusable;
       
  4525   }
       
  4526 
       
  4527   return allTabbable;
       
  4528 }
       
  4529 /**
       
  4530  * Returns the first tabbable element in `container`, including the container
       
  4531  * itself if it's tabbable.
       
  4532  *
       
  4533  * @memberof tabbable
       
  4534  *
       
  4535  * @param {Element} container
       
  4536  * @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones.
       
  4537  *
       
  4538  * @returns {Element|null}
       
  4539  */
       
  4540 
       
  4541 function getFirstTabbableIn(container, fallbackToFocusable) {
       
  4542   var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable),
       
  4543       first = _getAllTabbableIn[0];
       
  4544 
       
  4545   return first || null;
       
  4546 }
       
  4547 /**
       
  4548  * Returns the last tabbable element in `container`, including the container
       
  4549  * itself if it's tabbable.
       
  4550  *
       
  4551  * @memberof tabbable
       
  4552  *
       
  4553  * @param {Element} container
       
  4554  * @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones.
       
  4555  *
       
  4556  * @returns {Element|null}
       
  4557  */
       
  4558 
       
  4559 function getLastTabbableIn(container, fallbackToFocusable) {
       
  4560   var allTabbable = getAllTabbableIn(container, fallbackToFocusable);
       
  4561   return allTabbable[allTabbable.length - 1] || null;
       
  4562 }
       
  4563 /**
       
  4564  * Returns the next tabbable element in `container`.
       
  4565  *
       
  4566  * @memberof tabbable
       
  4567  *
       
  4568  * @param {Element} container
       
  4569  * @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones.
       
  4570  *
       
  4571  * @returns {Element|null}
       
  4572  */
       
  4573 
       
  4574 function getNextTabbableIn(container, fallbackToFocusable) {
       
  4575   var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
       
  4576   var allFocusable = getAllFocusableIn(container);
       
  4577   var index = allFocusable.indexOf(activeElement);
       
  4578   var slice = allFocusable.slice(index + 1);
       
  4579   return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
       
  4580 }
       
  4581 /**
       
  4582  * Returns the previous tabbable element in `container`.
       
  4583  *
       
  4584  * @memberof tabbable
       
  4585  *
       
  4586  * @param {Element} container
       
  4587  * @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones.
       
  4588  *
       
  4589  * @returns {Element|null}
       
  4590  */
       
  4591 
       
  4592 function getPreviousTabbableIn(container, fallbackToFocusable) {
       
  4593   var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
       
  4594   var allFocusable = getAllFocusableIn(container).reverse();
       
  4595   var index = allFocusable.indexOf(activeElement);
       
  4596   var slice = allFocusable.slice(index + 1);
       
  4597   return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
       
  4598 }
       
  4599 /**
       
  4600  * Returns the closest focusable element.
       
  4601  *
       
  4602  * @memberof tabbable
       
  4603  *
       
  4604  * @param {Element} container
       
  4605  *
       
  4606  * @returns {Element|null}
       
  4607  */
       
  4608 
       
  4609 function getClosestFocusable(element) {
       
  4610   while (element && !isFocusable(element)) {
       
  4611     element = closest(element, selector);
       
  4612   }
       
  4613 
       
  4614   return element;
       
  4615 }
       
  4616 
       
  4617 function defaultIsActive(element) {
       
  4618   return Object(getActiveElement["a" /* getActiveElement */])(element) === element;
       
  4619 }
       
  4620 
       
  4621 /**
       
  4622  * Ensures `element` will receive focus if it's not already.
       
  4623  *
       
  4624  * @memberof tabbable
       
  4625  *
       
  4626  * @example
       
  4627  * import { ensureFocus } from "reakit-utils";
       
  4628  *
       
  4629  * ensureFocus(document.activeElement); // does nothing
       
  4630  *
       
  4631  * const element = document.querySelector("input");
       
  4632  *
       
  4633  * ensureFocus(element); // focuses element
       
  4634  * ensureFocus(element, { preventScroll: true }); // focuses element preventing scroll jump
       
  4635  *
       
  4636  * function isActive(el) {
       
  4637  *   return el.dataset.active === "true";
       
  4638  * }
       
  4639  *
       
  4640  * ensureFocus(document.querySelector("[data-active='true']"), { isActive }); // does nothing
       
  4641  *
       
  4642  * @returns {number} `requestAnimationFrame` call ID so it can be passed to `cancelAnimationFrame` if needed.
       
  4643  */
       
  4644 function ensureFocus(element, _temp) {
       
  4645   var _ref = _temp === void 0 ? {} : _temp,
       
  4646       _ref$isActive = _ref.isActive,
       
  4647       isActive = _ref$isActive === void 0 ? defaultIsActive : _ref$isActive,
       
  4648       preventScroll = _ref.preventScroll;
       
  4649 
       
  4650   if (isActive(element)) return -1;
       
  4651   element.focus({
       
  4652     preventScroll: preventScroll
       
  4653   });
       
  4654   if (isActive(element)) return -1;
       
  4655   return requestAnimationFrame(function () {
       
  4656     element.focus({
       
  4657       preventScroll: preventScroll
       
  4658     });
       
  4659   });
       
  4660 }
       
  4661 
       
  4662 
       
  4663 
       
  4664 
       
  4665 /***/ }),
       
  4666 /* 72 */
       
  4667 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4668 
       
  4669 "use strict";
       
  4670 
       
  4671 // EXPORTS
       
  4672 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ isPortalEvent; });
       
  4673 
       
  4674 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/contains.js
       
  4675 /**
       
  4676  * Similar to `Element.prototype.contains`.
       
  4677  */
       
  4678 function contains(parent, child) {
       
  4679   return parent === child || parent.contains(child);
       
  4680 }
       
  4681 
       
  4682 
       
  4683 
       
  4684 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPortalEvent.js
       
  4685 
       
  4686 
       
  4687 /**
       
  4688  * Returns `true` if `event` has been fired within a React Portal element.
       
  4689  */
       
  4690 
       
  4691 function isPortalEvent(event) {
       
  4692   return !contains(event.currentTarget, event.target);
       
  4693 }
       
  4694 
       
  4695 
       
  4696 
       
  4697 
       
  4698 /***/ }),
       
  4699 /* 73 */
       
  4700 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4701 
       
  4702 "use strict";
       
  4703 /* unused harmony export Tabbable */
       
  4704 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useTabbable; });
       
  4705 /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
       
  4706 /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
       
  4707 /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
       
  4708 /* harmony import */ var _Box_Box_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67);
       
  4709 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
       
  4710 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
       
  4711 /* harmony import */ var reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63);
       
  4712 /* harmony import */ var reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70);
       
  4713 /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80);
       
  4714 /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46);
       
  4715 /* harmony import */ var reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59);
       
  4716 /* harmony import */ var reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(69);
       
  4717 /* harmony import */ var reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(72);
       
  4718 /* harmony import */ var reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(57);
       
  4719 /* harmony import */ var reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(71);
       
  4720 
       
  4721 
       
  4722 
       
  4723 
       
  4724 
       
  4725 
       
  4726 
       
  4727 
       
  4728 
       
  4729 
       
  4730 
       
  4731 
       
  4732 
       
  4733 
       
  4734 
       
  4735 
       
  4736 function isUA(string) {
       
  4737   if (typeof window === "undefined") return false;
       
  4738   return window.navigator.userAgent.indexOf(string) !== -1;
       
  4739 }
       
  4740 
       
  4741 var isSafariOrFirefoxOnMac = isUA("Mac") && !isUA("Chrome") && (isUA("Safari") || isUA("Firefox"));
       
  4742 
       
  4743 function focusIfNeeded(element) {
       
  4744   if (!Object(reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_10__[/* hasFocusWithin */ "a"])(element)) {
       
  4745     element.focus();
       
  4746   }
       
  4747 } // Safari and Firefox on MacOS don't focus on buttons on mouse down like other
       
  4748 // browsers/platforms. Instead, they focus on the closest focusable ancestor
       
  4749 // element, which is ultimately the body element. So we make sure to give focus
       
  4750 // to the tabbable element on mouse down so it works consistently across
       
  4751 // browsers.
       
  4752 // istanbul ignore next
       
  4753 
       
  4754 
       
  4755 function useFocusOnMouseDown() {
       
  4756   if (!isSafariOrFirefoxOnMac) return undefined;
       
  4757 
       
  4758   var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(null),
       
  4759       tabbable = _React$useState[0],
       
  4760       scheduleFocus = _React$useState[1];
       
  4761 
       
  4762   Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
       
  4763     if (!tabbable) return;
       
  4764     focusIfNeeded(tabbable);
       
  4765     scheduleFocus(null);
       
  4766   }, [tabbable]);
       
  4767   var onMouseDown = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
       
  4768     var element = event.currentTarget;
       
  4769     if (Object(reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_11__[/* isPortalEvent */ "a"])(event)) return;
       
  4770     if (!Object(reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_6__[/* isButton */ "a"])(element)) return;
       
  4771     var activeElement = Object(reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_12__[/* getActiveElement */ "a"])(element);
       
  4772     if (!activeElement) return;
       
  4773     var activeElementIsBody = activeElement.tagName === "BODY";
       
  4774     var focusableAncestor = Object(reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_13__[/* getClosestFocusable */ "b"])(element.parentElement);
       
  4775 
       
  4776     if (activeElement === focusableAncestor || activeElementIsBody && !focusableAncestor) {
       
  4777       // When the active element is the focusable ancestor, it'll not emit
       
  4778       // focus/blur events. After all, it's already focused. So we can't
       
  4779       // listen to those events to focus this tabbable element.
       
  4780       // When the active element is body and there's no focusable ancestor,
       
  4781       // we also don't have any other event to listen to since body never
       
  4782       // emits focus/blur events on itself.
       
  4783       // In both of these cases, we have to schedule focus on this tabbable
       
  4784       // element.
       
  4785       scheduleFocus(element);
       
  4786     } else if (focusableAncestor) {
       
  4787       // Clicking (mouse down) on the tabbable element on Safari and Firefox
       
  4788       // on MacOS will fire focus on the focusable ancestor element if
       
  4789       // there's any and if it's not the current active element. So we wait
       
  4790       // for this event to happen before moving focus to this element.
       
  4791       // Instead of moving focus right away, we have to schedule it,
       
  4792       // otherwise it's gonna prevent drag events from happening.
       
  4793       var onFocus = function onFocus() {
       
  4794         return scheduleFocus(element);
       
  4795       };
       
  4796 
       
  4797       focusableAncestor.addEventListener("focusin", onFocus, {
       
  4798         once: true
       
  4799       });
       
  4800     } else {
       
  4801       // Finally, if there's no focsuable ancestor and there's another
       
  4802       // element with focus, we wait for that element to get blurred before
       
  4803       // focusing this one.
       
  4804       var onBlur = function onBlur() {
       
  4805         return focusIfNeeded(element);
       
  4806       };
       
  4807 
       
  4808       activeElement.addEventListener("blur", onBlur, {
       
  4809         once: true
       
  4810       });
       
  4811     }
       
  4812   }, []);
       
  4813   return onMouseDown;
       
  4814 }
       
  4815 
       
  4816 function isNativeTabbable(element) {
       
  4817   return element.tagName === "BUTTON" || element.tagName === "INPUT" || element.tagName === "SELECT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "AUDIO" || element.tagName === "VIDEO";
       
  4818 }
       
  4819 
       
  4820 var useTabbable = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
       
  4821   name: "Tabbable",
       
  4822   compose: _Box_Box_js__WEBPACK_IMPORTED_MODULE_3__[/* useBox */ "a"],
       
  4823   keys: ["disabled", "focusable"],
       
  4824   useOptions: function useOptions(options, _ref) {
       
  4825     var disabled = _ref.disabled;
       
  4826     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
       
  4827       disabled: disabled
       
  4828     }, options);
       
  4829   },
       
  4830   useProps: function useProps(options, _ref2) {
       
  4831     var htmlRef = _ref2.ref,
       
  4832         htmlTabIndex = _ref2.tabIndex,
       
  4833         htmlOnClick = _ref2.onClick,
       
  4834         htmlOnMouseDown = _ref2.onMouseDown,
       
  4835         htmlStyle = _ref2.style,
       
  4836         htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref2, ["ref", "tabIndex", "onClick", "onMouseDown", "style"]);
       
  4837 
       
  4838     var ref = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(null);
       
  4839     var onClickRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__[/* useLiveRef */ "a"])(htmlOnClick);
       
  4840     var onMouseDownRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__[/* useLiveRef */ "a"])(htmlOnMouseDown);
       
  4841     var trulyDisabled = options.disabled && !options.focusable;
       
  4842 
       
  4843     var _React$useState2 = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(true),
       
  4844         nativeTabbable = _React$useState2[0],
       
  4845         setNativeTabbable = _React$useState2[1];
       
  4846 
       
  4847     var tabIndex = nativeTabbable ? htmlTabIndex : htmlTabIndex || 0;
       
  4848     var style = options.disabled ? Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
       
  4849       pointerEvents: "none"
       
  4850     }, htmlStyle) : htmlStyle;
       
  4851     var focusOnMouseDown = useFocusOnMouseDown();
       
  4852     Object(reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_9__[/* useIsomorphicEffect */ "a"])(function () {
       
  4853       var tabbable = ref.current;
       
  4854 
       
  4855       if (!tabbable) {
       
  4856          false ? undefined : void 0;
       
  4857         return;
       
  4858       }
       
  4859 
       
  4860       if (!isNativeTabbable(tabbable)) {
       
  4861         setNativeTabbable(false);
       
  4862       }
       
  4863     }, []);
       
  4864     var onClick = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
       
  4865       var _onClickRef$current;
       
  4866 
       
  4867       if (options.disabled) {
       
  4868         event.stopPropagation();
       
  4869         event.preventDefault();
       
  4870         return;
       
  4871       }
       
  4872 
       
  4873       (_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event);
       
  4874     }, [options.disabled]);
       
  4875     var onMouseDown = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
       
  4876       var _onMouseDownRef$curre;
       
  4877 
       
  4878       if (options.disabled) {
       
  4879         event.stopPropagation();
       
  4880         event.preventDefault();
       
  4881         return;
       
  4882       }
       
  4883 
       
  4884       (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event);
       
  4885       if (event.defaultPrevented) return;
       
  4886       focusOnMouseDown === null || focusOnMouseDown === void 0 ? void 0 : focusOnMouseDown(event);
       
  4887     }, [options.disabled, focusOnMouseDown]);
       
  4888     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
       
  4889       ref: Object(reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__[/* useForkRef */ "a"])(ref, htmlRef),
       
  4890       style: style,
       
  4891       tabIndex: !trulyDisabled ? tabIndex : undefined,
       
  4892       disabled: trulyDisabled && nativeTabbable ? true : undefined,
       
  4893       "aria-disabled": options.disabled ? true : undefined,
       
  4894       onClick: onClick,
       
  4895       onMouseDown: onMouseDown
       
  4896     }, htmlProps);
       
  4897   }
       
  4898 });
       
  4899 var Tabbable = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
       
  4900   as: "div",
       
  4901   useHook: useTabbable
       
  4902 });
       
  4903 
       
  4904 
       
  4905 
       
  4906 
       
  4907 /***/ }),
       
  4908 /* 74 */
       
  4909 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4910 
       
  4911 "use strict";
       
  4912 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SystemContext; });
       
  4913 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
       
  4914 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
       
  4915 
       
  4916 
       
  4917 var SystemContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({});
       
  4918 
       
  4919 
       
  4920 
       
  4921 
       
  4922 /***/ }),
       
  4923 /* 75 */
       
  4924 /***/ (function(module, exports) {
       
  4925 
       
  4926 (function() { module.exports = this["wp"]["htmlEntities"]; }());
       
  4927 
       
  4928 /***/ }),
       
  4929 /* 76 */,
       
  4930 /* 77 */,
       
  4931 /* 78 */
       
  4932 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4933 
       
  4934 "use strict";
       
  4935 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useCreateElement; });
       
  4936 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
       
  4937 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
       
  4938 /* harmony import */ var _SystemContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
       
  4939 /* harmony import */ var _rollupPluginBabelHelpers_0c84a174_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55);
       
  4940 
       
  4941 
       
  4942 
       
  4943 
       
  4944 function isRenderProp(children) {
       
  4945   return typeof children === "function";
       
  4946 }
       
  4947 
       
  4948 /**
       
  4949  * Custom hook that will call `children` if it's a function. If
       
  4950  * `useCreateElement` has been passed to the context, it'll be used instead.
       
  4951  *
       
  4952  * @example
       
  4953  * import React from "react";
       
  4954  * import { SystemProvider, useCreateElement } from "reakit-system";
       
  4955  *
       
  4956  * const system = {
       
  4957  *   useCreateElement(type, props, children = props.children) {
       
  4958  *     // very similar to what `useCreateElement` does already
       
  4959  *     if (typeof children === "function") {
       
  4960  *       const { children: _, ...rest } = props;
       
  4961  *       return children(rest);
       
  4962  *     }
       
  4963  *     return React.createElement(type, props, children);
       
  4964  *   },
       
  4965  * };
       
  4966  *
       
  4967  * function Component(props) {
       
  4968  *   return useCreateElement("div", props);
       
  4969  * }
       
  4970  *
       
  4971  * function App() {
       
  4972  *   return (
       
  4973  *     <SystemProvider unstable_system={system}>
       
  4974  *       <Component url="url">{({ url }) => <a href={url}>link</a>}</Component>
       
  4975  *     </SystemProvider>
       
  4976  *   );
       
  4977  * }
       
  4978  */
       
  4979 
       
  4980 var useCreateElement = function useCreateElement(type, props, children) {
       
  4981   if (children === void 0) {
       
  4982     children = props.children;
       
  4983   }
       
  4984 
       
  4985   var context = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_SystemContext_js__WEBPACK_IMPORTED_MODULE_1__[/* SystemContext */ "a"]);
       
  4986 
       
  4987   if (context.useCreateElement) {
       
  4988     return context.useCreateElement(type, props, children);
       
  4989   }
       
  4990 
       
  4991   if (typeof type === "string" && isRenderProp(children)) {
       
  4992     var _ = props.children,
       
  4993         rest = Object(_rollupPluginBabelHelpers_0c84a174_js__WEBPACK_IMPORTED_MODULE_2__[/* a */ "b"])(props, ["children"]);
       
  4994 
       
  4995     return children(rest);
       
  4996   }
       
  4997 
       
  4998   return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(type, props, children);
       
  4999 };
       
  5000 
       
  5001 
       
  5002 
       
  5003 
       
  5004 /***/ }),
       
  5005 /* 79 */,
       
  5006 /* 80 */
       
  5007 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5008 
       
  5009 "use strict";
       
  5010 
       
  5011 // UNUSED EXPORTS: warning, useWarning
       
  5012 
       
  5013 // EXTERNAL MODULE: ./node_modules/reakit-warning/es/warning.js
       
  5014 var warning = __webpack_require__(106);
       
  5015 
       
  5016 // EXTERNAL MODULE: external {"this":"React"}
       
  5017 var external_this_React_ = __webpack_require__(13);
       
  5018 
       
  5019 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/isObject.js
       
  5020 /**
       
  5021  * Checks whether `arg` is an object or not.
       
  5022  *
       
  5023  * @returns {boolean}
       
  5024  */
       
  5025 function isObject(arg) {
       
  5026   return typeof arg === "object" && arg != null;
       
  5027 }
       
  5028 
       
  5029 
       
  5030 
       
  5031 // CONCATENATED MODULE: ./node_modules/reakit-warning/es/useWarning.js
       
  5032 
       
  5033 
       
  5034 
       
  5035 
       
  5036 
       
  5037 function isRefObject(ref) {
       
  5038   return isObject(ref) && "current" in ref;
       
  5039 }
       
  5040 /**
       
  5041  * Logs `messages` to the console using `console.warn` based on a `condition`.
       
  5042  * This should be used inside components.
       
  5043  */
       
  5044 
       
  5045 
       
  5046 function useWarning(condition) {
       
  5047   for (var _len = arguments.length, messages = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
  5048     messages[_key - 1] = arguments[_key];
       
  5049   }
       
  5050 
       
  5051   if (false) {}
       
  5052 }
       
  5053 
       
  5054 
       
  5055 
       
  5056 // CONCATENATED MODULE: ./node_modules/reakit-warning/es/index.js
       
  5057 
       
  5058 
       
  5059 
       
  5060 
       
  5061 
       
  5062 
       
  5063 
       
  5064 /***/ }),
       
  5065 /* 81 */
       
  5066 /***/ (function(module, exports) {
       
  5067 
       
  5068 (function() { module.exports = this["wp"]["viewport"]; }());
       
  5069 
       
  5070 /***/ }),
       
  5071 /* 82 */
       
  5072 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5073 
       
  5074 "use strict";
       
  5075 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createOnKeyDown; });
       
  5076 /**
       
  5077  * Returns an `onKeyDown` handler to be passed to a component.
       
  5078  *
       
  5079  * @param options
       
  5080  */
       
  5081 function createOnKeyDown(_temp) {
       
  5082   var _ref = _temp === void 0 ? {} : _temp,
       
  5083       keyMap = _ref.keyMap,
       
  5084       onKey = _ref.onKey,
       
  5085       stopPropagation = _ref.stopPropagation,
       
  5086       onKeyDown = _ref.onKeyDown,
       
  5087       _ref$shouldKeyDown = _ref.shouldKeyDown,
       
  5088       shouldKeyDown = _ref$shouldKeyDown === void 0 ? function () {
       
  5089     return true;
       
  5090   } : _ref$shouldKeyDown,
       
  5091       _ref$preventDefault = _ref.preventDefault,
       
  5092       preventDefault = _ref$preventDefault === void 0 ? true : _ref$preventDefault;
       
  5093 
       
  5094   return function (event) {
       
  5095     if (!keyMap) return;
       
  5096     var finalKeyMap = typeof keyMap === "function" ? keyMap(event) : keyMap;
       
  5097     var shouldPreventDefault = typeof preventDefault === "function" ? preventDefault(event) : preventDefault;
       
  5098     var shouldStopPropagation = typeof stopPropagation === "function" ? stopPropagation(event) : stopPropagation;
       
  5099 
       
  5100     if (event.key in finalKeyMap) {
       
  5101       var action = finalKeyMap[event.key];
       
  5102 
       
  5103       if (typeof action === "function" && shouldKeyDown(event)) {
       
  5104         if (shouldPreventDefault) event.preventDefault();
       
  5105         if (shouldStopPropagation) event.stopPropagation();
       
  5106         if (onKey) onKey(event);
       
  5107         action(event); // Prevent onKeyDown from being called twice for the same keys
       
  5108 
       
  5109         return;
       
  5110       }
       
  5111     }
       
  5112 
       
  5113     if (onKeyDown && "current" in onKeyDown) {
       
  5114       var _onKeyDown$current;
       
  5115 
       
  5116       (_onKeyDown$current = onKeyDown.current) === null || _onKeyDown$current === void 0 ? void 0 : _onKeyDown$current.call(onKeyDown, event);
       
  5117     } else {
       
  5118       onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
       
  5119     }
       
  5120   };
       
  5121 }
       
  5122 
       
  5123 
       
  5124 
       
  5125 
       
  5126 /***/ }),
       
  5127 /* 83 */,
       
  5128 /* 84 */
       
  5129 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5130 
       
  5131 "use strict";
       
  5132 /* unused harmony export Clickable */
       
  5133 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useClickable; });
       
  5134 /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
       
  5135 /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
       
  5136 /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
       
  5137 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
       
  5138 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
       
  5139 /* harmony import */ var reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70);
       
  5140 /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80);
       
  5141 /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46);
       
  5142 /* harmony import */ var reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(53);
       
  5143 /* harmony import */ var _Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(73);
       
  5144 
       
  5145 
       
  5146 
       
  5147 
       
  5148 
       
  5149 
       
  5150 
       
  5151 
       
  5152 
       
  5153 
       
  5154 
       
  5155 
       
  5156 
       
  5157 
       
  5158 
       
  5159 
       
  5160 
       
  5161 
       
  5162 function isNativeClick(event) {
       
  5163   var element = event.currentTarget;
       
  5164   if (!event.isTrusted) return false; // istanbul ignore next: can't test trusted events yet
       
  5165 
       
  5166   return Object(reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_4__[/* isButton */ "a"])(element) || element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "SELECT";
       
  5167 }
       
  5168 
       
  5169 var useClickable = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
       
  5170   name: "Clickable",
       
  5171   compose: _Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_8__[/* useTabbable */ "a"],
       
  5172   keys: ["unstable_clickOnEnter", "unstable_clickOnSpace"],
       
  5173   useOptions: function useOptions(_ref) {
       
  5174     var _ref$unstable_clickOn = _ref.unstable_clickOnEnter,
       
  5175         unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? true : _ref$unstable_clickOn,
       
  5176         _ref$unstable_clickOn2 = _ref.unstable_clickOnSpace,
       
  5177         unstable_clickOnSpace = _ref$unstable_clickOn2 === void 0 ? true : _ref$unstable_clickOn2,
       
  5178         options = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref, ["unstable_clickOnEnter", "unstable_clickOnSpace"]);
       
  5179 
       
  5180     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
       
  5181       unstable_clickOnEnter: unstable_clickOnEnter,
       
  5182       unstable_clickOnSpace: unstable_clickOnSpace
       
  5183     }, options);
       
  5184   },
       
  5185   useProps: function useProps(options, _ref2) {
       
  5186     var htmlOnKeyDown = _ref2.onKeyDown,
       
  5187         htmlOnKeyUp = _ref2.onKeyUp,
       
  5188         htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref2, ["onKeyDown", "onKeyUp"]);
       
  5189 
       
  5190     var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(false),
       
  5191         active = _React$useState[0],
       
  5192         setActive = _React$useState[1];
       
  5193 
       
  5194     var onKeyDownRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnKeyDown);
       
  5195     var onKeyUpRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnKeyUp);
       
  5196     var onKeyDown = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
       
  5197       var _onKeyDownRef$current;
       
  5198 
       
  5199       (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event);
       
  5200       if (event.defaultPrevented) return;
       
  5201       if (options.disabled) return;
       
  5202       if (event.metaKey) return;
       
  5203       if (!Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__[/* isSelfTarget */ "a"])(event)) return;
       
  5204       var isEnter = options.unstable_clickOnEnter && event.key === "Enter";
       
  5205       var isSpace = options.unstable_clickOnSpace && event.key === " ";
       
  5206 
       
  5207       if (isEnter || isSpace) {
       
  5208         if (isNativeClick(event)) return;
       
  5209         event.preventDefault();
       
  5210 
       
  5211         if (isEnter) {
       
  5212           event.currentTarget.click();
       
  5213         } else if (isSpace) {
       
  5214           setActive(true);
       
  5215         }
       
  5216       }
       
  5217     }, [options.disabled, options.unstable_clickOnEnter, options.unstable_clickOnSpace]);
       
  5218     var onKeyUp = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
       
  5219       var _onKeyUpRef$current;
       
  5220 
       
  5221       (_onKeyUpRef$current = onKeyUpRef.current) === null || _onKeyUpRef$current === void 0 ? void 0 : _onKeyUpRef$current.call(onKeyUpRef, event);
       
  5222       if (event.defaultPrevented) return;
       
  5223       if (options.disabled) return;
       
  5224       if (event.metaKey) return;
       
  5225       var isSpace = options.unstable_clickOnSpace && event.key === " ";
       
  5226 
       
  5227       if (active && isSpace) {
       
  5228         setActive(false);
       
  5229         event.currentTarget.click();
       
  5230       }
       
  5231     }, [options.disabled, options.unstable_clickOnSpace, active]);
       
  5232     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
       
  5233       "data-active": active || undefined,
       
  5234       onKeyDown: onKeyDown,
       
  5235       onKeyUp: onKeyUp
       
  5236     }, htmlProps);
       
  5237   }
       
  5238 });
       
  5239 var Clickable = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
       
  5240   as: "button",
       
  5241   memo: true,
       
  5242   useHook: useClickable
       
  5243 });
       
  5244 
       
  5245 
       
  5246 
       
  5247 
       
  5248 /***/ }),
       
  5249 /* 85 */,
       
  5250 /* 86 */,
       
  5251 /* 87 */,
       
  5252 /* 88 */,
       
  5253 /* 89 */,
       
  5254 /* 90 */,
       
  5255 /* 91 */,
       
  5256 /* 92 */,
       
  5257 /* 93 */
       
  5258 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5259 
       
  5260 "use strict";
       
  5261 /* unused harmony export unstable_Id */
       
  5262 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_useId; });
       
  5263 /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
       
  5264 /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
       
  5265 /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
       
  5266 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
       
  5267 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
       
  5268 /* harmony import */ var _IdProvider_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68);
       
  5269 /* harmony import */ var _IdState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
       
  5270 
       
  5271 
       
  5272 
       
  5273 
       
  5274 
       
  5275 
       
  5276 
       
  5277 
       
  5278 var unstable_useId = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
       
  5279   useState: _IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"],
       
  5280   keys: ["id"],
       
  5281   useOptions: function useOptions(options, htmlProps) {
       
  5282     var generateId = Object(react__WEBPACK_IMPORTED_MODULE_3__["useContext"])(_IdProvider_js__WEBPACK_IMPORTED_MODULE_4__[/* unstable_IdContext */ "a"]);
       
  5283 
       
  5284     var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(function () {
       
  5285       // This comes from useIdState
       
  5286       if (options.unstable_idCountRef) {
       
  5287         options.unstable_idCountRef.current += 1;
       
  5288         return "-" + options.unstable_idCountRef.current;
       
  5289       } // If there's no useIdState, we check if `baseId` was passed (as a prop,
       
  5290       // not from useIdState).
       
  5291 
       
  5292 
       
  5293       if (options.baseId) {
       
  5294         return "-" + generateId("");
       
  5295       }
       
  5296 
       
  5297       return "";
       
  5298     }),
       
  5299         suffix = _React$useState[0]; // `baseId` will be the prop passed directly as a prop or via useIdState.
       
  5300     // If there's neither, then it'll fallback to Context's generateId.
       
  5301     // This generateId can result in a sequential ID (if there's a Provider)
       
  5302     // or a random string (without Provider).
       
  5303 
       
  5304 
       
  5305     var baseId = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () {
       
  5306       return options.baseId || generateId();
       
  5307     }, [options.baseId, generateId]);
       
  5308     var id = htmlProps.id || options.id || "" + baseId + suffix;
       
  5309     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, options), {}, {
       
  5310       id: id
       
  5311     });
       
  5312   },
       
  5313   useProps: function useProps(options, htmlProps) {
       
  5314     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
       
  5315       id: options.id
       
  5316     }, htmlProps);
       
  5317   }
       
  5318 });
       
  5319 var unstable_Id = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
       
  5320   as: "div",
       
  5321   useHook: unstable_useId
       
  5322 });
       
  5323 
       
  5324 
       
  5325 
       
  5326 
       
  5327 /***/ }),
       
  5328 /* 94 */
       
  5329 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5330 
       
  5331 "use strict";
       
  5332 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fireEvent; });
       
  5333 /* harmony import */ var _createEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(122);
       
  5334 
       
  5335 
       
  5336 
       
  5337 /**
       
  5338  * Creates and dispatches `Event` in a way that also works on IE 11.
       
  5339  *
       
  5340  * @example
       
  5341  * import { fireEvent } from "reakit-utils";
       
  5342  *
       
  5343  * fireEvent(document.getElementById("id"), "blur", {
       
  5344  *   bubbles: true,
       
  5345  *   cancelable: true,
       
  5346  * });
       
  5347  */
       
  5348 
       
  5349 function fireEvent(element, type, eventInit) {
       
  5350   return element.dispatchEvent(Object(_createEvent_js__WEBPACK_IMPORTED_MODULE_0__[/* createEvent */ "a"])(element, type, eventInit));
       
  5351 }
       
  5352 
       
  5353 
       
  5354 
       
  5355 
       
  5356 /***/ }),
       
  5357 /* 95 */
       
  5358 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5359 
       
  5360 "use strict";
       
  5361 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isTextField; });
       
  5362 /**
       
  5363  * Check whether the given element is a text field, where text field is defined
       
  5364  * by the ability to select within the input, or that it is contenteditable.
       
  5365  */
       
  5366 function isTextField(element) {
       
  5367   try {
       
  5368     var isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
       
  5369     var isTextArea = element.tagName === "TEXTAREA";
       
  5370     var isContentEditable = element.contentEditable === "true";
       
  5371     return isTextInput || isTextArea || isContentEditable || false;
       
  5372   } catch (error) {
       
  5373     // Safari throws an exception when trying to get `selectionStart`
       
  5374     // on non-text <input> elements (which, understandably, don't
       
  5375     // have the text selection API). We catch this via a try/catch
       
  5376     // block, as opposed to a more explicit check of the element's
       
  5377     // input types, because of Safari's non-standard behavior. This
       
  5378     // also means we don't have to worry about the list of input
       
  5379     // types that support `selectionStart` changing as the HTML spec
       
  5380     // evolves over time.
       
  5381     return false;
       
  5382   }
       
  5383 }
       
  5384 
       
  5385 
       
  5386 
       
  5387 
       
  5388 /***/ }),
       
  5389 /* 96 */
       
  5390 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5391 
       
  5392 "use strict";
       
  5393 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return setTextFieldValue; });
       
  5394 function setTextFieldValue(element, value) {
       
  5395   element.value = value;
       
  5396 }
       
  5397 
       
  5398 
       
  5399 
       
  5400 
       
  5401 /***/ }),
       
  5402 /* 97 */
       
  5403 /***/ (function(module, exports, __webpack_require__) {
       
  5404 
       
  5405 "use strict";
       
  5406 
       
  5407 exports.__esModule = true;
       
  5408 var TextareaAutosize_1 = __webpack_require__(173);
       
  5409 exports["default"] = TextareaAutosize_1["default"];
       
  5410 
       
  5411 
       
  5412 /***/ }),
       
  5413 /* 98 */,
       
  5414 /* 99 */,
       
  5415 /* 100 */
       
  5416 /***/ (function(module, exports) {
       
  5417 
       
  5418 (function() { module.exports = this["wp"]["notices"]; }());
       
  5419 
       
  5420 /***/ }),
       
  5421 /* 101 */,
       
  5422 /* 102 */
       
  5423 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5424 
       
  5425 "use strict";
       
  5426 
       
  5427 // EXPORTS
       
  5428 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ fireKeyboardEvent; });
       
  5429 
       
  5430 // EXTERNAL MODULE: ./node_modules/reakit-utils/es/getDocument.js
       
  5431 var getDocument = __webpack_require__(47);
       
  5432 
       
  5433 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/getDefaultView.js
       
  5434 
       
  5435 
       
  5436 /**
       
  5437  * Returns `element.ownerDocument.defaultView || window`.
       
  5438  */
       
  5439 
       
  5440 function getDefaultView(element) {
       
  5441   return Object(getDocument["a" /* getDocument */])(element).defaultView || window;
       
  5442 }
       
  5443 
       
  5444 
       
  5445 
       
  5446 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/createKeyboardEvent.js
       
  5447 
       
  5448 
       
  5449 
       
  5450 /**
       
  5451  * Creates a `KeyboardEvent` in a way that also works on IE 11.
       
  5452  *
       
  5453  * @example
       
  5454  * import { createKeyboardEvent } from "reakit-utils";
       
  5455  *
       
  5456  * const el = document.getElementById("id");
       
  5457  * el.dispatchEvent(createKeyboardEvent(el, "keydown", { key: "ArrowDown" }));
       
  5458  */
       
  5459 
       
  5460 function createKeyboardEvent(element, type, eventInit) {
       
  5461   if (eventInit === void 0) {
       
  5462     eventInit = {};
       
  5463   }
       
  5464 
       
  5465   if (typeof KeyboardEvent === "function") {
       
  5466     return new KeyboardEvent(type, eventInit);
       
  5467   } // IE 11 doesn't support Event constructors
       
  5468 
       
  5469 
       
  5470   var event = Object(getDocument["a" /* getDocument */])(element).createEvent("KeyboardEvent");
       
  5471   event.initKeyboardEvent(type, eventInit.bubbles, eventInit.cancelable, getDefaultView(element), eventInit.key, eventInit.location, eventInit.ctrlKey, eventInit.altKey, eventInit.shiftKey, eventInit.metaKey);
       
  5472   return event;
       
  5473 }
       
  5474 
       
  5475 
       
  5476 
       
  5477 // CONCATENATED MODULE: ./node_modules/reakit-utils/es/fireKeyboardEvent.js
       
  5478 
       
  5479 
       
  5480 
       
  5481 
       
  5482 /**
       
  5483  * Creates and dispatches `KeyboardEvent` in a way that also works on IE 11.
       
  5484  *
       
  5485  * @example
       
  5486  * import { fireKeyboardEvent } from "reakit-utils";
       
  5487  *
       
  5488  * fireKeyboardEvent(document.getElementById("id"), "keydown", {
       
  5489  *   key: "ArrowDown",
       
  5490  *   shiftKey: true,
       
  5491  * });
       
  5492  */
       
  5493 
       
  5494 function fireKeyboardEvent(element, type, eventInit) {
       
  5495   return element.dispatchEvent(createKeyboardEvent(element, type, eventInit));
       
  5496 }
       
  5497 
       
  5498 
       
  5499 
       
  5500 
       
  5501 /***/ }),
       
  5502 /* 103 */,
       
  5503 /* 104 */,
       
  5504 /* 105 */,
       
  5505 /* 106 */
       
  5506 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  5507 
       
  5508 "use strict";
       
  5509 /* unused harmony export warning */
       
  5510 
       
  5511 
       
  5512 /**
       
  5513  * Logs `messages` to the console using `console.warn` based on a `condition`.
       
  5514  *
       
  5515  * @example
       
  5516  * import { warning } from "reakit-warning";
       
  5517  *
       
  5518  * warning(true, "a", "b"); // console.warn("a", "\n", "b")
       
  5519  * warning(false, "a", "b"); // does nothing
       
  5520  */
       
  5521 
       
  5522 function warning(condition) {
       
  5523   if (false) { var warns, _len, messages, _key, _console; }
       
  5524 }
       
  5525 
       
  5526 
       
  5527 
       
  5528 
       
  5529 /***/ }),
       
  5530 /* 107 */,
       
  5531 /* 108 */,
       
  5532 /* 109 */,
       
  5533 /* 110 */
       
  5534 /***/ (function(module, exports, __webpack_require__) {
       
  5535 
       
  5536 "use strict";
       
  5537 
       
  5538 
       
  5539 function flattenIntoMap( map, effects ) {
       
  5540 	var i;
       
  5541 	if ( Array.isArray( effects ) ) {
       
  5542 		for ( i = 0; i < effects.length; i++ ) {
       
  5543 			flattenIntoMap( map, effects[ i ] );
       
  5544 		}
       
  5545 	} else {
       
  5546 		for ( i in effects ) {
       
  5547 			map[ i ] = ( map[ i ] || [] ).concat( effects[ i ] );
       
  5548 		}
       
  5549 	}
       
  5550 }
       
  5551 
       
  5552 function refx( effects ) {
       
  5553 	var map = {},
       
  5554 		middleware;
       
  5555 
       
  5556 	flattenIntoMap( map, effects );
       
  5557 
       
  5558 	middleware = function( store ) {
       
  5559 		return function( next ) {
       
  5560 			return function( action ) {
       
  5561 				var handlers = map[ action.type ],
       
  5562 					result = next( action ),
       
  5563 					i, handlerAction;
       
  5564 
       
  5565 				if ( handlers ) {
       
  5566 					for ( i = 0; i < handlers.length; i++ ) {
       
  5567 						handlerAction = handlers[ i ]( action, store );
       
  5568 						if ( handlerAction ) {
       
  5569 							store.dispatch( handlerAction );
       
  5570 						}
       
  5571 					}
       
  5572 				}
       
  5573 
       
  5574 				return result;
       
  5575 			};
       
  5576 		};
       
  5577 	};
       
  5578 
       
  5579 	middleware.effects = map;
       
  5580 
       
  5581 	return middleware;
       
  5582 }
       
  5583 
       
  5584 module.exports = refx;
       
  5585 
       
  5586 
       
  5587 /***/ }),
       
  5588 /* 111 */,
       
  5589 /* 112 */,
       
  5590 /* 113 */
       
  5591 /***/ (function(module, exports, __webpack_require__) {
       
  5592 
       
  5593 "use strict";
       
  5594 
       
  5595 
       
  5596 Object.defineProperty(exports, '__esModule', { value: true });
       
  5597 
       
  5598 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
       
  5599 
       
  5600 var _extends = _interopDefault(__webpack_require__(170));
       
  5601 var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(171));
       
  5602 var React = __webpack_require__(13);
       
  5603 var React__default = _interopDefault(React);
       
  5604 var _inheritsLoose = _interopDefault(__webpack_require__(145));
       
  5605 var _assertThisInitialized = _interopDefault(__webpack_require__(172));
       
  5606 
       
  5607 var is = {
       
  5608   arr: Array.isArray,
       
  5609   obj: function obj(a) {
       
  5610     return Object.prototype.toString.call(a) === '[object Object]';
       
  5611   },
       
  5612   fun: function fun(a) {
       
  5613     return typeof a === 'function';
       
  5614   },
       
  5615   str: function str(a) {
       
  5616     return typeof a === 'string';
       
  5617   },
       
  5618   num: function num(a) {
       
  5619     return typeof a === 'number';
       
  5620   },
       
  5621   und: function und(a) {
       
  5622     return a === void 0;
       
  5623   },
       
  5624   nul: function nul(a) {
       
  5625     return a === null;
       
  5626   },
       
  5627   set: function set(a) {
       
  5628     return a instanceof Set;
       
  5629   },
       
  5630   map: function map(a) {
       
  5631     return a instanceof Map;
       
  5632   },
       
  5633   equ: function equ(a, b) {
       
  5634     if (typeof a !== typeof b) return false;
       
  5635     if (is.str(a) || is.num(a)) return a === b;
       
  5636     if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
       
  5637     var i;
       
  5638 
       
  5639     for (i in a) {
       
  5640       if (!(i in b)) return false;
       
  5641     }
       
  5642 
       
  5643     for (i in b) {
       
  5644       if (a[i] !== b[i]) return false;
       
  5645     }
       
  5646 
       
  5647     return is.und(i) ? a === b : true;
       
  5648   }
       
  5649 };
       
  5650 function merge(target, lowercase) {
       
  5651   if (lowercase === void 0) {
       
  5652     lowercase = true;
       
  5653   }
       
  5654 
       
  5655   return function (object) {
       
  5656     return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
       
  5657       var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
       
  5658       acc[key] = target(key);
       
  5659       return acc;
       
  5660     }, target);
       
  5661   };
       
  5662 }
       
  5663 function useForceUpdate() {
       
  5664   var _useState = React.useState(false),
       
  5665       f = _useState[1];
       
  5666 
       
  5667   var forceUpdate = React.useCallback(function () {
       
  5668     return f(function (v) {
       
  5669       return !v;
       
  5670     });
       
  5671   }, []);
       
  5672   return forceUpdate;
       
  5673 }
       
  5674 function withDefault(value, defaultValue) {
       
  5675   return is.und(value) || is.nul(value) ? defaultValue : value;
       
  5676 }
       
  5677 function toArray(a) {
       
  5678   return !is.und(a) ? is.arr(a) ? a : [a] : [];
       
  5679 }
       
  5680 function callProp(obj) {
       
  5681   for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
  5682     args[_key - 1] = arguments[_key];
       
  5683   }
       
  5684 
       
  5685   return is.fun(obj) ? obj.apply(void 0, args) : obj;
       
  5686 }
       
  5687 
       
  5688 function getForwardProps(props) {
       
  5689   var to = props.to,
       
  5690       from = props.from,
       
  5691       config = props.config,
       
  5692       onStart = props.onStart,
       
  5693       onRest = props.onRest,
       
  5694       onFrame = props.onFrame,
       
  5695       children = props.children,
       
  5696       reset = props.reset,
       
  5697       reverse = props.reverse,
       
  5698       force = props.force,
       
  5699       immediate = props.immediate,
       
  5700       delay = props.delay,
       
  5701       attach = props.attach,
       
  5702       destroyed = props.destroyed,
       
  5703       interpolateTo = props.interpolateTo,
       
  5704       ref = props.ref,
       
  5705       lazy = props.lazy,
       
  5706       forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
       
  5707 
       
  5708   return forward;
       
  5709 }
       
  5710 
       
  5711 function interpolateTo(props) {
       
  5712   var forward = getForwardProps(props);
       
  5713   if (is.und(forward)) return _extends({
       
  5714     to: forward
       
  5715   }, props);
       
  5716   var rest = Object.keys(props).reduce(function (a, k) {
       
  5717     var _extends2;
       
  5718 
       
  5719     return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
       
  5720   }, {});
       
  5721   return _extends({
       
  5722     to: forward
       
  5723   }, rest);
       
  5724 }
       
  5725 function handleRef(ref, forward) {
       
  5726   if (forward) {
       
  5727     // If it's a function, assume it's a ref callback
       
  5728     if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
       
  5729       forward.current = ref;
       
  5730     }
       
  5731   }
       
  5732 
       
  5733   return ref;
       
  5734 }
       
  5735 
       
  5736 var Animated =
       
  5737 /*#__PURE__*/
       
  5738 function () {
       
  5739   function Animated() {
       
  5740     this.payload = void 0;
       
  5741     this.children = [];
       
  5742   }
       
  5743 
       
  5744   var _proto = Animated.prototype;
       
  5745 
       
  5746   _proto.getAnimatedValue = function getAnimatedValue() {
       
  5747     return this.getValue();
       
  5748   };
       
  5749 
       
  5750   _proto.getPayload = function getPayload() {
       
  5751     return this.payload || this;
       
  5752   };
       
  5753 
       
  5754   _proto.attach = function attach() {};
       
  5755 
       
  5756   _proto.detach = function detach() {};
       
  5757 
       
  5758   _proto.getChildren = function getChildren() {
       
  5759     return this.children;
       
  5760   };
       
  5761 
       
  5762   _proto.addChild = function addChild(child) {
       
  5763     if (this.children.length === 0) this.attach();
       
  5764     this.children.push(child);
       
  5765   };
       
  5766 
       
  5767   _proto.removeChild = function removeChild(child) {
       
  5768     var index = this.children.indexOf(child);
       
  5769     this.children.splice(index, 1);
       
  5770     if (this.children.length === 0) this.detach();
       
  5771   };
       
  5772 
       
  5773   return Animated;
       
  5774 }();
       
  5775 var AnimatedArray =
       
  5776 /*#__PURE__*/
       
  5777 function (_Animated) {
       
  5778   _inheritsLoose(AnimatedArray, _Animated);
       
  5779 
       
  5780   function AnimatedArray() {
       
  5781     var _this;
       
  5782 
       
  5783     for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
       
  5784       args[_key] = arguments[_key];
       
  5785     }
       
  5786 
       
  5787     _this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
       
  5788     _this.payload = [];
       
  5789 
       
  5790     _this.attach = function () {
       
  5791       return _this.payload.forEach(function (p) {
       
  5792         return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
       
  5793       });
       
  5794     };
       
  5795 
       
  5796     _this.detach = function () {
       
  5797       return _this.payload.forEach(function (p) {
       
  5798         return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
       
  5799       });
       
  5800     };
       
  5801 
       
  5802     return _this;
       
  5803   }
       
  5804 
       
  5805   return AnimatedArray;
       
  5806 }(Animated);
       
  5807 var AnimatedObject =
       
  5808 /*#__PURE__*/
       
  5809 function (_Animated2) {
       
  5810   _inheritsLoose(AnimatedObject, _Animated2);
       
  5811 
       
  5812   function AnimatedObject() {
       
  5813     var _this2;
       
  5814 
       
  5815     for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
       
  5816       args[_key3] = arguments[_key3];
       
  5817     }
       
  5818 
       
  5819     _this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
       
  5820     _this2.payload = {};
       
  5821 
       
  5822     _this2.attach = function () {
       
  5823       return Object.values(_this2.payload).forEach(function (s) {
       
  5824         return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
       
  5825       });
       
  5826     };
       
  5827 
       
  5828     _this2.detach = function () {
       
  5829       return Object.values(_this2.payload).forEach(function (s) {
       
  5830         return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
       
  5831       });
       
  5832     };
       
  5833 
       
  5834     return _this2;
       
  5835   }
       
  5836 
       
  5837   var _proto2 = AnimatedObject.prototype;
       
  5838 
       
  5839   _proto2.getValue = function getValue(animated) {
       
  5840     if (animated === void 0) {
       
  5841       animated = false;
       
  5842     }
       
  5843 
       
  5844     var payload = {};
       
  5845 
       
  5846     for (var _key4 in this.payload) {
       
  5847       var value = this.payload[_key4];
       
  5848       if (animated && !(value instanceof Animated)) continue;
       
  5849       payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
       
  5850     }
       
  5851 
       
  5852     return payload;
       
  5853   };
       
  5854 
       
  5855   _proto2.getAnimatedValue = function getAnimatedValue() {
       
  5856     return this.getValue(true);
       
  5857   };
       
  5858 
       
  5859   return AnimatedObject;
       
  5860 }(Animated);
       
  5861 
       
  5862 var applyAnimatedValues;
       
  5863 function injectApplyAnimatedValues(fn, transform) {
       
  5864   applyAnimatedValues = {
       
  5865     fn: fn,
       
  5866     transform: transform
       
  5867   };
       
  5868 }
       
  5869 var colorNames;
       
  5870 function injectColorNames(names) {
       
  5871   colorNames = names;
       
  5872 }
       
  5873 var requestFrame = function requestFrame(cb) {
       
  5874   return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
       
  5875 };
       
  5876 var cancelFrame = function cancelFrame(id) {
       
  5877   typeof window !== 'undefined' && window.cancelAnimationFrame(id);
       
  5878 };
       
  5879 function injectFrame(raf, caf) {
       
  5880   requestFrame = raf;
       
  5881   cancelFrame = caf;
       
  5882 }
       
  5883 var interpolation;
       
  5884 function injectStringInterpolator(fn) {
       
  5885   interpolation = fn;
       
  5886 }
       
  5887 var now = function now() {
       
  5888   return Date.now();
       
  5889 };
       
  5890 function injectNow(nowFn) {
       
  5891   now = nowFn;
       
  5892 }
       
  5893 var defaultElement;
       
  5894 function injectDefaultElement(el) {
       
  5895   defaultElement = el;
       
  5896 }
       
  5897 var animatedApi = function animatedApi(node) {
       
  5898   return node.current;
       
  5899 };
       
  5900 function injectAnimatedApi(fn) {
       
  5901   animatedApi = fn;
       
  5902 }
       
  5903 var createAnimatedStyle;
       
  5904 function injectCreateAnimatedStyle(factory) {
       
  5905   createAnimatedStyle = factory;
       
  5906 }
       
  5907 var manualFrameloop;
       
  5908 function injectManualFrameloop(callback) {
       
  5909   manualFrameloop = callback;
       
  5910 }
       
  5911 
       
  5912 var Globals = /*#__PURE__*/Object.freeze({
       
  5913   get applyAnimatedValues () { return applyAnimatedValues; },
       
  5914   injectApplyAnimatedValues: injectApplyAnimatedValues,
       
  5915   get colorNames () { return colorNames; },
       
  5916   injectColorNames: injectColorNames,
       
  5917   get requestFrame () { return requestFrame; },
       
  5918   get cancelFrame () { return cancelFrame; },
       
  5919   injectFrame: injectFrame,
       
  5920   get interpolation () { return interpolation; },
       
  5921   injectStringInterpolator: injectStringInterpolator,
       
  5922   get now () { return now; },
       
  5923   injectNow: injectNow,
       
  5924   get defaultElement () { return defaultElement; },
       
  5925   injectDefaultElement: injectDefaultElement,
       
  5926   get animatedApi () { return animatedApi; },
       
  5927   injectAnimatedApi: injectAnimatedApi,
       
  5928   get createAnimatedStyle () { return createAnimatedStyle; },
       
  5929   injectCreateAnimatedStyle: injectCreateAnimatedStyle,
       
  5930   get manualFrameloop () { return manualFrameloop; },
       
  5931   injectManualFrameloop: injectManualFrameloop
       
  5932 });
       
  5933 
       
  5934 /**
       
  5935  * Wraps the `style` property with `AnimatedStyle`.
       
  5936  */
       
  5937 
       
  5938 var AnimatedProps =
       
  5939 /*#__PURE__*/
       
  5940 function (_AnimatedObject) {
       
  5941   _inheritsLoose(AnimatedProps, _AnimatedObject);
       
  5942 
       
  5943   function AnimatedProps(props, callback) {
       
  5944     var _this;
       
  5945 
       
  5946     _this = _AnimatedObject.call(this) || this;
       
  5947     _this.update = void 0;
       
  5948     _this.payload = !props.style ? props : _extends({}, props, {
       
  5949       style: createAnimatedStyle(props.style)
       
  5950     });
       
  5951     _this.update = callback;
       
  5952 
       
  5953     _this.attach();
       
  5954 
       
  5955     return _this;
       
  5956   }
       
  5957 
       
  5958   return AnimatedProps;
       
  5959 }(AnimatedObject);
       
  5960 
       
  5961 var isFunctionComponent = function isFunctionComponent(val) {
       
  5962   return is.fun(val) && !(val.prototype instanceof React__default.Component);
       
  5963 };
       
  5964 
       
  5965 var createAnimatedComponent = function createAnimatedComponent(Component) {
       
  5966   var AnimatedComponent = React.forwardRef(function (props, ref) {
       
  5967     var forceUpdate = useForceUpdate();
       
  5968     var mounted = React.useRef(true);
       
  5969     var propsAnimated = React.useRef(null);
       
  5970     var node = React.useRef(null);
       
  5971     var attachProps = React.useCallback(function (props) {
       
  5972       var oldPropsAnimated = propsAnimated.current;
       
  5973 
       
  5974       var callback = function callback() {
       
  5975         var didUpdate = false;
       
  5976 
       
  5977         if (node.current) {
       
  5978           didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
       
  5979         }
       
  5980 
       
  5981         if (!node.current || didUpdate === false) {
       
  5982           // If no referenced node has been found, or the update target didn't have a
       
  5983           // native-responder, then forceUpdate the animation ...
       
  5984           forceUpdate();
       
  5985         }
       
  5986       };
       
  5987 
       
  5988       propsAnimated.current = new AnimatedProps(props, callback);
       
  5989       oldPropsAnimated && oldPropsAnimated.detach();
       
  5990     }, []);
       
  5991     React.useEffect(function () {
       
  5992       return function () {
       
  5993         mounted.current = false;
       
  5994         propsAnimated.current && propsAnimated.current.detach();
       
  5995       };
       
  5996     }, []);
       
  5997     React.useImperativeHandle(ref, function () {
       
  5998       return animatedApi(node, mounted, forceUpdate);
       
  5999     });
       
  6000     attachProps(props);
       
  6001 
       
  6002     var _getValue = propsAnimated.current.getValue(),
       
  6003         scrollTop = _getValue.scrollTop,
       
  6004         scrollLeft = _getValue.scrollLeft,
       
  6005         animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
       
  6006     // See: https://github.com/react-spring/react-spring/issues/569
       
  6007 
       
  6008 
       
  6009     var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
       
  6010       return node.current = handleRef(childRef, ref);
       
  6011     };
       
  6012     return React__default.createElement(Component, _extends({}, animatedProps, {
       
  6013       ref: refFn
       
  6014     }));
       
  6015   });
       
  6016   return AnimatedComponent;
       
  6017 };
       
  6018 
       
  6019 var active = false;
       
  6020 var controllers = new Set();
       
  6021 
       
  6022 var update = function update() {
       
  6023   if (!active) return false;
       
  6024   var time = now();
       
  6025 
       
  6026   for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
       
  6027     var _ref;
       
  6028 
       
  6029     if (_isArray) {
       
  6030       if (_i >= _iterator.length) break;
       
  6031       _ref = _iterator[_i++];
       
  6032     } else {
       
  6033       _i = _iterator.next();
       
  6034       if (_i.done) break;
       
  6035       _ref = _i.value;
       
  6036     }
       
  6037 
       
  6038     var controller = _ref;
       
  6039     var isActive = false;
       
  6040 
       
  6041     for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
       
  6042       var config = controller.configs[configIdx];
       
  6043       var endOfAnimation = void 0,
       
  6044           lastTime = void 0;
       
  6045 
       
  6046       for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
       
  6047         var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
       
  6048 
       
  6049         if (animation.done) continue;
       
  6050         var from = config.fromValues[valIdx];
       
  6051         var to = config.toValues[valIdx];
       
  6052         var position = animation.lastPosition;
       
  6053         var isAnimated = to instanceof Animated;
       
  6054         var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
       
  6055         if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
       
  6056 
       
  6057         if (config.immediate) {
       
  6058           animation.setValue(to);
       
  6059           animation.done = true;
       
  6060           continue;
       
  6061         } // Break animation when string values are involved
       
  6062 
       
  6063 
       
  6064         if (typeof from === 'string' || typeof to === 'string') {
       
  6065           animation.setValue(to);
       
  6066           animation.done = true;
       
  6067           continue;
       
  6068         }
       
  6069 
       
  6070         if (config.duration !== void 0) {
       
  6071           /** Duration easing */
       
  6072           position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
       
  6073           endOfAnimation = time >= animation.startTime + config.duration;
       
  6074         } else if (config.decay) {
       
  6075           /** Decay easing */
       
  6076           position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
       
  6077           endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
       
  6078           if (endOfAnimation) to = position;
       
  6079         } else {
       
  6080           /** Spring easing */
       
  6081           lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
       
  6082           velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
       
  6083 
       
  6084           if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
       
  6085 
       
  6086           var numSteps = Math.floor(time - lastTime);
       
  6087 
       
  6088           for (var i = 0; i < numSteps; ++i) {
       
  6089             var force = -config.tension * (position - to);
       
  6090             var damping = -config.friction * velocity;
       
  6091             var acceleration = (force + damping) / config.mass;
       
  6092             velocity = velocity + acceleration * 1 / 1000;
       
  6093             position = position + velocity * 1 / 1000;
       
  6094           } // Conditions for stopping the spring animation
       
  6095 
       
  6096 
       
  6097           var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
       
  6098           var isVelocity = Math.abs(velocity) <= config.precision;
       
  6099           var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
       
  6100           endOfAnimation = isOvershooting || isVelocity && isDisplacement;
       
  6101           animation.lastVelocity = velocity;
       
  6102           animation.lastTime = time;
       
  6103         } // Trails aren't done until their parents conclude
       
  6104 
       
  6105 
       
  6106         if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
       
  6107 
       
  6108         if (endOfAnimation) {
       
  6109           // Ensure that we end up with a round value
       
  6110           if (animation.value !== to) position = to;
       
  6111           animation.done = true;
       
  6112         } else isActive = true;
       
  6113 
       
  6114         animation.setValue(position);
       
  6115         animation.lastPosition = position;
       
  6116       } // Keep track of updated values only when necessary
       
  6117 
       
  6118 
       
  6119       if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
       
  6120     } // Update callbacks in the end of the frame
       
  6121 
       
  6122 
       
  6123     if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
       
  6124 
       
  6125     if (!isActive) {
       
  6126       controllers.delete(controller);
       
  6127       controller.stop(true);
       
  6128     }
       
  6129   } // Loop over as long as there are controllers ...
       
  6130 
       
  6131 
       
  6132   if (controllers.size) {
       
  6133     if (manualFrameloop) manualFrameloop();else requestFrame(update);
       
  6134   } else {
       
  6135     active = false;
       
  6136   }
       
  6137 
       
  6138   return active;
       
  6139 };
       
  6140 
       
  6141 var start = function start(controller) {
       
  6142   if (!controllers.has(controller)) controllers.add(controller);
       
  6143 
       
  6144   if (!active) {
       
  6145     active = true;
       
  6146     if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
       
  6147   }
       
  6148 };
       
  6149 
       
  6150 var stop = function stop(controller) {
       
  6151   if (controllers.has(controller)) controllers.delete(controller);
       
  6152 };
       
  6153 
       
  6154 function createInterpolator(range, output, extrapolate) {
       
  6155   if (typeof range === 'function') {
       
  6156     return range;
       
  6157   }
       
  6158 
       
  6159   if (Array.isArray(range)) {
       
  6160     return createInterpolator({
       
  6161       range: range,
       
  6162       output: output,
       
  6163       extrapolate: extrapolate
       
  6164     });
       
  6165   }
       
  6166 
       
  6167   if (interpolation && typeof range.output[0] === 'string') {
       
  6168     return interpolation(range);
       
  6169   }
       
  6170 
       
  6171   var config = range;
       
  6172   var outputRange = config.output;
       
  6173   var inputRange = config.range || [0, 1];
       
  6174   var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
       
  6175   var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
       
  6176 
       
  6177   var easing = config.easing || function (t) {
       
  6178     return t;
       
  6179   };
       
  6180 
       
  6181   return function (input) {
       
  6182     var range = findRange(input, inputRange);
       
  6183     return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
       
  6184   };
       
  6185 }
       
  6186 
       
  6187 function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
       
  6188   var result = map ? map(input) : input; // Extrapolate
       
  6189 
       
  6190   if (result < inputMin) {
       
  6191     if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
       
  6192   }
       
  6193 
       
  6194   if (result > inputMax) {
       
  6195     if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
       
  6196   }
       
  6197 
       
  6198   if (outputMin === outputMax) return outputMin;
       
  6199   if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
       
  6200 
       
  6201   if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
       
  6202 
       
  6203   result = easing(result); // Output Range
       
  6204 
       
  6205   if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
       
  6206   return result;
       
  6207 }
       
  6208 
       
  6209 function findRange(input, inputRange) {
       
  6210   for (var i = 1; i < inputRange.length - 1; ++i) {
       
  6211     if (inputRange[i] >= input) break;
       
  6212   }
       
  6213 
       
  6214   return i - 1;
       
  6215 }
       
  6216 
       
  6217 var AnimatedInterpolation =
       
  6218 /*#__PURE__*/
       
  6219 function (_AnimatedArray) {
       
  6220   _inheritsLoose(AnimatedInterpolation, _AnimatedArray);
       
  6221 
       
  6222   function AnimatedInterpolation(parents, range, output, extrapolate) {
       
  6223     var _this;
       
  6224 
       
  6225     _this = _AnimatedArray.call(this) || this;
       
  6226     _this.calc = void 0;
       
  6227     _this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
       
  6228     _this.calc = createInterpolator(range, output, extrapolate);
       
  6229     return _this;
       
  6230   }
       
  6231 
       
  6232   var _proto = AnimatedInterpolation.prototype;
       
  6233 
       
  6234   _proto.getValue = function getValue() {
       
  6235     return this.calc.apply(this, this.payload.map(function (value) {
       
  6236       return value.getValue();
       
  6237     }));
       
  6238   };
       
  6239 
       
  6240   _proto.updateConfig = function updateConfig(range, output, extrapolate) {
       
  6241     this.calc = createInterpolator(range, output, extrapolate);
       
  6242   };
       
  6243 
       
  6244   _proto.interpolate = function interpolate(range, output, extrapolate) {
       
  6245     return new AnimatedInterpolation(this, range, output, extrapolate);
       
  6246   };
       
  6247 
       
  6248   return AnimatedInterpolation;
       
  6249 }(AnimatedArray);
       
  6250 
       
  6251 var interpolate$1 = function interpolate(parents, range, output) {
       
  6252   return parents && new AnimatedInterpolation(parents, range, output);
       
  6253 };
       
  6254 
       
  6255 var config = {
       
  6256   default: {
       
  6257     tension: 170,
       
  6258     friction: 26
       
  6259   },
       
  6260   gentle: {
       
  6261     tension: 120,
       
  6262     friction: 14
       
  6263   },
       
  6264   wobbly: {
       
  6265     tension: 180,
       
  6266     friction: 12
       
  6267   },
       
  6268   stiff: {
       
  6269     tension: 210,
       
  6270     friction: 20
       
  6271   },
       
  6272   slow: {
       
  6273     tension: 280,
       
  6274     friction: 60
       
  6275   },
       
  6276   molasses: {
       
  6277     tension: 280,
       
  6278     friction: 120
       
  6279   }
       
  6280 };
       
  6281 
       
  6282 /** API
       
  6283  *  useChain(references, timeSteps, timeFrame)
       
  6284  */
       
  6285 
       
  6286 function useChain(refs, timeSteps, timeFrame) {
       
  6287   if (timeFrame === void 0) {
       
  6288     timeFrame = 1000;
       
  6289   }
       
  6290 
       
  6291   var previous = React.useRef();
       
  6292   React.useEffect(function () {
       
  6293     if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
       
  6294       var current = _ref.current;
       
  6295       return current && current.start();
       
  6296     });else if (timeSteps) {
       
  6297       refs.forEach(function (_ref2, index) {
       
  6298         var current = _ref2.current;
       
  6299 
       
  6300         if (current) {
       
  6301           var ctrls = current.controllers;
       
  6302 
       
  6303           if (ctrls.length) {
       
  6304             var t = timeFrame * timeSteps[index];
       
  6305             ctrls.forEach(function (ctrl) {
       
  6306               ctrl.queue = ctrl.queue.map(function (e) {
       
  6307                 return _extends({}, e, {
       
  6308                   delay: e.delay + t
       
  6309                 });
       
  6310               });
       
  6311               ctrl.start();
       
  6312             });
       
  6313           }
       
  6314         }
       
  6315       });
       
  6316     } else refs.reduce(function (q, _ref3, rI) {
       
  6317       var current = _ref3.current;
       
  6318       return q = q.then(function () {
       
  6319         return current.start();
       
  6320       });
       
  6321     }, Promise.resolve());
       
  6322     previous.current = refs;
       
  6323   });
       
  6324 }
       
  6325 
       
  6326 /**
       
  6327  * Animated works by building a directed acyclic graph of dependencies
       
  6328  * transparently when you render your Animated components.
       
  6329  *
       
  6330  *               new Animated.Value(0)
       
  6331  *     .interpolate()        .interpolate()    new Animated.Value(1)
       
  6332  *         opacity               translateY      scale
       
  6333  *          style                         transform
       
  6334  *         View#234                         style
       
  6335  *                                         View#123
       
  6336  *
       
  6337  * A) Top Down phase
       
  6338  * When an AnimatedValue is updated, we recursively go down through this
       
  6339  * graph in order to find leaf nodes: the views that we flag as needing
       
  6340  * an update.
       
  6341  *
       
  6342  * B) Bottom Up phase
       
  6343  * When a view is flagged as needing an update, we recursively go back up
       
  6344  * in order to build the new value that it needs. The reason why we need
       
  6345  * this two-phases process is to deal with composite props such as
       
  6346  * transform which can receive values from multiple parents.
       
  6347  */
       
  6348 function addAnimatedStyles(node, styles) {
       
  6349   if ('update' in node) {
       
  6350     styles.add(node);
       
  6351   } else {
       
  6352     node.getChildren().forEach(function (child) {
       
  6353       return addAnimatedStyles(child, styles);
       
  6354     });
       
  6355   }
       
  6356 }
       
  6357 
       
  6358 var AnimatedValue =
       
  6359 /*#__PURE__*/
       
  6360 function (_Animated) {
       
  6361   _inheritsLoose(AnimatedValue, _Animated);
       
  6362 
       
  6363   function AnimatedValue(_value) {
       
  6364     var _this;
       
  6365 
       
  6366     _this = _Animated.call(this) || this;
       
  6367     _this.animatedStyles = new Set();
       
  6368     _this.value = void 0;
       
  6369     _this.startPosition = void 0;
       
  6370     _this.lastPosition = void 0;
       
  6371     _this.lastVelocity = void 0;
       
  6372     _this.startTime = void 0;
       
  6373     _this.lastTime = void 0;
       
  6374     _this.done = false;
       
  6375 
       
  6376     _this.setValue = function (value, flush) {
       
  6377       if (flush === void 0) {
       
  6378         flush = true;
       
  6379       }
       
  6380 
       
  6381       _this.value = value;
       
  6382       if (flush) _this.flush();
       
  6383     };
       
  6384 
       
  6385     _this.value = _value;
       
  6386     _this.startPosition = _value;
       
  6387     _this.lastPosition = _value;
       
  6388     return _this;
       
  6389   }
       
  6390 
       
  6391   var _proto = AnimatedValue.prototype;
       
  6392 
       
  6393   _proto.flush = function flush() {
       
  6394     if (this.animatedStyles.size === 0) {
       
  6395       addAnimatedStyles(this, this.animatedStyles);
       
  6396     }
       
  6397 
       
  6398     this.animatedStyles.forEach(function (animatedStyle) {
       
  6399       return animatedStyle.update();
       
  6400     });
       
  6401   };
       
  6402 
       
  6403   _proto.clearStyles = function clearStyles() {
       
  6404     this.animatedStyles.clear();
       
  6405   };
       
  6406 
       
  6407   _proto.getValue = function getValue() {
       
  6408     return this.value;
       
  6409   };
       
  6410 
       
  6411   _proto.interpolate = function interpolate(range, output, extrapolate) {
       
  6412     return new AnimatedInterpolation(this, range, output, extrapolate);
       
  6413   };
       
  6414 
       
  6415   return AnimatedValue;
       
  6416 }(Animated);
       
  6417 
       
  6418 var AnimatedValueArray =
       
  6419 /*#__PURE__*/
       
  6420 function (_AnimatedArray) {
       
  6421   _inheritsLoose(AnimatedValueArray, _AnimatedArray);
       
  6422 
       
  6423   function AnimatedValueArray(values) {
       
  6424     var _this;
       
  6425 
       
  6426     _this = _AnimatedArray.call(this) || this;
       
  6427     _this.payload = values.map(function (n) {
       
  6428       return new AnimatedValue(n);
       
  6429     });
       
  6430     return _this;
       
  6431   }
       
  6432 
       
  6433   var _proto = AnimatedValueArray.prototype;
       
  6434 
       
  6435   _proto.setValue = function setValue(value, flush) {
       
  6436     var _this2 = this;
       
  6437 
       
  6438     if (flush === void 0) {
       
  6439       flush = true;
       
  6440     }
       
  6441 
       
  6442     if (Array.isArray(value)) {
       
  6443       if (value.length === this.payload.length) {
       
  6444         value.forEach(function (v, i) {
       
  6445           return _this2.payload[i].setValue(v, flush);
       
  6446         });
       
  6447       }
       
  6448     } else {
       
  6449       this.payload.forEach(function (p) {
       
  6450         return p.setValue(value, flush);
       
  6451       });
       
  6452     }
       
  6453   };
       
  6454 
       
  6455   _proto.getValue = function getValue() {
       
  6456     return this.payload.map(function (v) {
       
  6457       return v.getValue();
       
  6458     });
       
  6459   };
       
  6460 
       
  6461   _proto.interpolate = function interpolate(range, output) {
       
  6462     return new AnimatedInterpolation(this, range, output);
       
  6463   };
       
  6464 
       
  6465   return AnimatedValueArray;
       
  6466 }(AnimatedArray);
       
  6467 
       
  6468 var G = 0;
       
  6469 
       
  6470 var Controller =
       
  6471 /*#__PURE__*/
       
  6472 function () {
       
  6473   function Controller() {
       
  6474     var _this = this;
       
  6475 
       
  6476     this.id = void 0;
       
  6477     this.idle = true;
       
  6478     this.hasChanged = false;
       
  6479     this.guid = 0;
       
  6480     this.local = 0;
       
  6481     this.props = {};
       
  6482     this.merged = {};
       
  6483     this.animations = {};
       
  6484     this.interpolations = {};
       
  6485     this.values = {};
       
  6486     this.configs = [];
       
  6487     this.listeners = [];
       
  6488     this.queue = [];
       
  6489     this.localQueue = void 0;
       
  6490 
       
  6491     this.getValues = function () {
       
  6492       return _this.interpolations;
       
  6493     };
       
  6494 
       
  6495     this.id = G++;
       
  6496   }
       
  6497   /** update(props)
       
  6498    *  This function filters input props and creates an array of tasks which are executed in .start()
       
  6499    *  Each task is allowed to carry a delay, which means it can execute asnychroneously */
       
  6500 
       
  6501 
       
  6502   var _proto = Controller.prototype;
       
  6503 
       
  6504   _proto.update = function update$$1(args) {
       
  6505     //this._id = n + this.id
       
  6506     if (!args) return this; // Extract delay and the to-prop from props
       
  6507 
       
  6508     var _ref = interpolateTo(args),
       
  6509         _ref$delay = _ref.delay,
       
  6510         delay = _ref$delay === void 0 ? 0 : _ref$delay,
       
  6511         to = _ref.to,
       
  6512         props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]);
       
  6513 
       
  6514     if (is.arr(to) || is.fun(to)) {
       
  6515       // If config is either a function or an array queue it up as is
       
  6516       this.queue.push(_extends({}, props, {
       
  6517         delay: delay,
       
  6518         to: to
       
  6519       }));
       
  6520     } else if (to) {
       
  6521       // Otherwise go through each key since it could be delayed individually
       
  6522       var ops = {};
       
  6523       Object.entries(to).forEach(function (_ref2) {
       
  6524         var _to;
       
  6525 
       
  6526         var k = _ref2[0],
       
  6527             v = _ref2[1];
       
  6528 
       
  6529         // Fetch delay and create an entry, consisting of the to-props, the delay, and basic props
       
  6530         var entry = _extends({
       
  6531           to: (_to = {}, _to[k] = v, _to),
       
  6532           delay: callProp(delay, k)
       
  6533         }, props);
       
  6534 
       
  6535         var previous = ops[entry.delay] && ops[entry.delay].to;
       
  6536         ops[entry.delay] = _extends({}, ops[entry.delay], entry, {
       
  6537           to: _extends({}, previous, entry.to)
       
  6538         });
       
  6539       });
       
  6540       this.queue = Object.values(ops);
       
  6541     } // Sort queue, so that async calls go last
       
  6542 
       
  6543 
       
  6544     this.queue = this.queue.sort(function (a, b) {
       
  6545       return a.delay - b.delay;
       
  6546     }); // Diff the reduced props immediately (they'll contain the from-prop and some config)
       
  6547 
       
  6548     this.diff(props);
       
  6549     return this;
       
  6550   }
       
  6551   /** start(onEnd)
       
  6552    *  This function either executes a queue, if present, or starts the frameloop, which animates */
       
  6553   ;
       
  6554 
       
  6555   _proto.start = function start$$1(onEnd) {
       
  6556     var _this2 = this;
       
  6557 
       
  6558     // If a queue is present we must excecute it
       
  6559     if (this.queue.length) {
       
  6560       this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values
       
  6561 
       
  6562       if (this.localQueue) {
       
  6563         this.localQueue.forEach(function (_ref3) {
       
  6564           var _ref3$from = _ref3.from,
       
  6565               from = _ref3$from === void 0 ? {} : _ref3$from,
       
  6566               _ref3$to = _ref3.to,
       
  6567               to = _ref3$to === void 0 ? {} : _ref3$to;
       
  6568           if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
       
  6569           if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
       
  6570         });
       
  6571       } // The guid helps us tracking frames, a new queue over an old one means an override
       
  6572       // We discard async calls in that caseÍ
       
  6573 
       
  6574 
       
  6575       var local = this.local = ++this.guid;
       
  6576       var queue = this.localQueue = this.queue;
       
  6577       this.queue = []; // Go through each entry and execute it
       
  6578 
       
  6579       queue.forEach(function (_ref4, index) {
       
  6580         var delay = _ref4.delay,
       
  6581             props = _objectWithoutPropertiesLoose(_ref4, ["delay"]);
       
  6582 
       
  6583         var cb = function cb(finished) {
       
  6584           if (index === queue.length - 1 && local === _this2.guid && finished) {
       
  6585             _this2.idle = true;
       
  6586             if (_this2.props.onRest) _this2.props.onRest(_this2.merged);
       
  6587           }
       
  6588 
       
  6589           if (onEnd) onEnd();
       
  6590         }; // Entries can be delayed, ansyc or immediate
       
  6591 
       
  6592 
       
  6593         var async = is.arr(props.to) || is.fun(props.to);
       
  6594 
       
  6595         if (delay) {
       
  6596           setTimeout(function () {
       
  6597             if (local === _this2.guid) {
       
  6598               if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
       
  6599             }
       
  6600           }, delay);
       
  6601         } else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
       
  6602       });
       
  6603     } // Otherwise we kick of the frameloop
       
  6604     else {
       
  6605         if (is.fun(onEnd)) this.listeners.push(onEnd);
       
  6606         if (this.props.onStart) this.props.onStart();
       
  6607 
       
  6608         start(this);
       
  6609       }
       
  6610 
       
  6611     return this;
       
  6612   };
       
  6613 
       
  6614   _proto.stop = function stop$$1(finished) {
       
  6615     this.listeners.forEach(function (onEnd) {
       
  6616       return onEnd(finished);
       
  6617     });
       
  6618     this.listeners = [];
       
  6619     return this;
       
  6620   }
       
  6621   /** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
       
  6622   ;
       
  6623 
       
  6624   _proto.pause = function pause(finished) {
       
  6625     this.stop(true);
       
  6626     if (finished) stop(this);
       
  6627     return this;
       
  6628   };
       
  6629 
       
  6630   _proto.runAsync = function runAsync(_ref5, onEnd) {
       
  6631     var _this3 = this;
       
  6632 
       
  6633     var delay = _ref5.delay,
       
  6634         props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
       
  6635 
       
  6636     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
       
  6637     // If the view relies on certain values "from" has to be present
       
  6638 
       
  6639     var queue = Promise.resolve(undefined);
       
  6640 
       
  6641     if (is.arr(props.to)) {
       
  6642       var _loop = function _loop(i) {
       
  6643         var index = i;
       
  6644 
       
  6645         var fresh = _extends({}, props, interpolateTo(props.to[index]));
       
  6646 
       
  6647         if (is.arr(fresh.config)) fresh.config = fresh.config[index];
       
  6648         queue = queue.then(function () {
       
  6649           //this.stop()
       
  6650           if (local === _this3.guid) return new Promise(function (r) {
       
  6651             return _this3.diff(fresh).start(r);
       
  6652           });
       
  6653         });
       
  6654       };
       
  6655 
       
  6656       for (var i = 0; i < props.to.length; i++) {
       
  6657         _loop(i);
       
  6658       }
       
  6659     } else if (is.fun(props.to)) {
       
  6660       var index = 0;
       
  6661       var last;
       
  6662       queue = queue.then(function () {
       
  6663         return props.to( // next(props)
       
  6664         function (p) {
       
  6665           var fresh = _extends({}, props, interpolateTo(p));
       
  6666 
       
  6667           if (is.arr(fresh.config)) fresh.config = fresh.config[index];
       
  6668           index++; //this.stop()
       
  6669 
       
  6670           if (local === _this3.guid) return last = new Promise(function (r) {
       
  6671             return _this3.diff(fresh).start(r);
       
  6672           });
       
  6673           return;
       
  6674         }, // cancel()
       
  6675         function (finished) {
       
  6676           if (finished === void 0) {
       
  6677             finished = true;
       
  6678           }
       
  6679 
       
  6680           return _this3.stop(finished);
       
  6681         }).then(function () {
       
  6682           return last;
       
  6683         });
       
  6684       });
       
  6685     }
       
  6686 
       
  6687     queue.then(onEnd);
       
  6688   };
       
  6689 
       
  6690   _proto.diff = function diff(props) {
       
  6691     var _this4 = this;
       
  6692 
       
  6693     this.props = _extends({}, this.props, props);
       
  6694     var _this$props = this.props,
       
  6695         _this$props$from = _this$props.from,
       
  6696         from = _this$props$from === void 0 ? {} : _this$props$from,
       
  6697         _this$props$to = _this$props.to,
       
  6698         to = _this$props$to === void 0 ? {} : _this$props$to,
       
  6699         _this$props$config = _this$props.config,
       
  6700         config = _this$props$config === void 0 ? {} : _this$props$config,
       
  6701         reverse = _this$props.reverse,
       
  6702         attach = _this$props.attach,
       
  6703         reset = _this$props.reset,
       
  6704         immediate = _this$props.immediate; // Reverse values when requested
       
  6705 
       
  6706     if (reverse) {
       
  6707       var _ref6 = [to, from];
       
  6708       from = _ref6[0];
       
  6709       to = _ref6[1];
       
  6710     } // This will collect all props that were ever set, reset merged props when necessary
       
  6711 
       
  6712 
       
  6713     this.merged = _extends({}, from, this.merged, to);
       
  6714     this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
       
  6715 
       
  6716     var target = attach && attach(this); // Reduces input { name: value } pairs into animated values
       
  6717 
       
  6718     this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) {
       
  6719       var name = _ref7[0],
       
  6720           value = _ref7[1];
       
  6721       // Issue cached entries, except on reset
       
  6722       var entry = acc[name] || {}; // Figure out what the value is supposed to be
       
  6723 
       
  6724       var isNumber = is.num(value);
       
  6725       var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value];
       
  6726       var isArray = is.arr(value);
       
  6727       var isInterpolation = !isNumber && !isArray && !isString;
       
  6728       var fromValue = !is.und(from[name]) ? from[name] : value;
       
  6729       var toValue = isNumber || isArray ? value : isString ? value : 1;
       
  6730       var toConfig = callProp(config, name);
       
  6731       if (target) toValue = target.animations[name].parent;
       
  6732       var parent = entry.parent,
       
  6733           interpolation$$1 = entry.interpolation,
       
  6734           toValues = toArray(target ? toValue.getPayload() : toValue),
       
  6735           animatedValues;
       
  6736       var newValue = value;
       
  6737       if (isInterpolation) newValue = interpolation({
       
  6738         range: [0, 1],
       
  6739         output: [value, value]
       
  6740       })(1);
       
  6741       var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
       
  6742 
       
  6743       var isFirst = is.und(parent);
       
  6744       var isActive = !isFirst && entry.animatedValues.some(function (v) {
       
  6745         return !v.done;
       
  6746       });
       
  6747       var currentValueDiffersFromGoal = !is.equ(newValue, currentValue);
       
  6748       var hasNewGoal = !is.equ(newValue, entry.previous);
       
  6749       var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one)
       
  6750       // and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?)
       
  6751 
       
  6752       if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) {
       
  6753         var _extends2;
       
  6754 
       
  6755         // Convert regular values into animated values, ALWAYS re-use if possible
       
  6756         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) {
       
  6757           var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value);
       
  6758           prev = prev !== void 0 && !reset ? prev : fromValue;
       
  6759 
       
  6760           if (entry.parent) {
       
  6761             parent = entry.parent;
       
  6762             parent.setValue(0, false);
       
  6763           } else parent = new AnimatedValue(0);
       
  6764 
       
  6765           var range = {
       
  6766             output: [prev, value]
       
  6767           };
       
  6768 
       
  6769           if (entry.interpolation) {
       
  6770             interpolation$$1 = entry.interpolation;
       
  6771             entry.interpolation.updateConfig(range);
       
  6772           } else interpolation$$1 = parent.interpolate(range);
       
  6773         }
       
  6774         toValues = toArray(target ? toValue.getPayload() : toValue);
       
  6775         animatedValues = toArray(parent.getPayload());
       
  6776         if (reset && !isInterpolation) parent.setValue(fromValue, false);
       
  6777         _this4.hasChanged = true; // Reset animated values
       
  6778 
       
  6779         animatedValues.forEach(function (value) {
       
  6780           value.startPosition = value.value;
       
  6781           value.lastPosition = value.value;
       
  6782           value.lastVelocity = isActive ? value.lastVelocity : undefined;
       
  6783           value.lastTime = isActive ? value.lastTime : undefined;
       
  6784           value.startTime = now();
       
  6785           value.done = false;
       
  6786           value.animatedStyles.clear();
       
  6787         }); // Set immediate values
       
  6788 
       
  6789         if (callProp(immediate, name)) {
       
  6790           parent.setValue(isInterpolation ? toValue : value, false);
       
  6791         }
       
  6792 
       
  6793         return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, {
       
  6794           name: name,
       
  6795           parent: parent,
       
  6796           interpolation: interpolation$$1,
       
  6797           animatedValues: animatedValues,
       
  6798           toValues: toValues,
       
  6799           previous: newValue,
       
  6800           config: toConfig,
       
  6801           fromValues: toArray(parent.getValue()),
       
  6802           immediate: callProp(immediate, name),
       
  6803           initialVelocity: withDefault(toConfig.velocity, 0),
       
  6804           clamp: withDefault(toConfig.clamp, false),
       
  6805           precision: withDefault(toConfig.precision, 0.01),
       
  6806           tension: withDefault(toConfig.tension, 170),
       
  6807           friction: withDefault(toConfig.friction, 26),
       
  6808           mass: withDefault(toConfig.mass, 1),
       
  6809           duration: toConfig.duration,
       
  6810           easing: withDefault(toConfig.easing, function (t) {
       
  6811             return t;
       
  6812           }),
       
  6813           decay: toConfig.decay
       
  6814         }), _extends2));
       
  6815       } else {
       
  6816         if (!currentValueDiffersFromGoal) {
       
  6817           var _extends3;
       
  6818 
       
  6819           // So ... the current target value (newValue) appears to be different from the previous value,
       
  6820           // which normally constitutes an update, but the actual value (currentValue) matches the target!
       
  6821           // In order to resolve this without causing an animation update we silently flag the animation as done,
       
  6822           // which it technically is. Interpolations also needs a config update with their target set to 1.
       
  6823           if (isInterpolation) {
       
  6824             parent.setValue(1, false);
       
  6825             interpolation$$1.updateConfig({
       
  6826               output: [newValue, newValue]
       
  6827             });
       
  6828           }
       
  6829 
       
  6830           parent.done = true;
       
  6831           _this4.hasChanged = true;
       
  6832           return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
       
  6833             previous: newValue
       
  6834           }), _extends3));
       
  6835         }
       
  6836 
       
  6837         return acc;
       
  6838       }
       
  6839     }, this.animations);
       
  6840 
       
  6841     if (this.hasChanged) {
       
  6842       // Make animations available to frameloop
       
  6843       this.configs = Object.values(this.animations);
       
  6844       this.values = {};
       
  6845       this.interpolations = {};
       
  6846 
       
  6847       for (var key in this.animations) {
       
  6848         this.interpolations[key] = this.animations[key].interpolation;
       
  6849         this.values[key] = this.animations[key].interpolation.getValue();
       
  6850       }
       
  6851     }
       
  6852 
       
  6853     return this;
       
  6854   };
       
  6855 
       
  6856   _proto.destroy = function destroy() {
       
  6857     this.stop();
       
  6858     this.props = {};
       
  6859     this.merged = {};
       
  6860     this.animations = {};
       
  6861     this.interpolations = {};
       
  6862     this.values = {};
       
  6863     this.configs = [];
       
  6864     this.local = 0;
       
  6865   };
       
  6866 
       
  6867   return Controller;
       
  6868 }();
       
  6869 
       
  6870 /** API
       
  6871  * const props = useSprings(number, [{ ... }, { ... }, ...])
       
  6872  * const [props, set] = useSprings(number, (i, controller) => ({ ... }))
       
  6873  */
       
  6874 
       
  6875 var useSprings = function useSprings(length, props) {
       
  6876   var mounted = React.useRef(false);
       
  6877   var ctrl = React.useRef();
       
  6878   var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
       
  6879 
       
  6880   var _useMemo = React.useMemo(function () {
       
  6881     // Remove old controllers
       
  6882     if (ctrl.current) {
       
  6883       ctrl.current.map(function (c) {
       
  6884         return c.destroy();
       
  6885       });
       
  6886       ctrl.current = undefined;
       
  6887     }
       
  6888 
       
  6889     var ref;
       
  6890     return [new Array(length).fill().map(function (_, i) {
       
  6891       var ctrl = new Controller();
       
  6892       var newProps = isFn ? callProp(props, i, ctrl) : props[i];
       
  6893       if (i === 0) ref = newProps.ref;
       
  6894       ctrl.update(newProps);
       
  6895       if (!ref) ctrl.start();
       
  6896       return ctrl;
       
  6897     }), ref];
       
  6898   }, [length]),
       
  6899       controllers = _useMemo[0],
       
  6900       ref = _useMemo[1];
       
  6901 
       
  6902   ctrl.current = controllers; // The hooks reference api gets defined here ...
       
  6903 
       
  6904   var api = React.useImperativeHandle(ref, function () {
       
  6905     return {
       
  6906       start: function start() {
       
  6907         return Promise.all(ctrl.current.map(function (c) {
       
  6908           return new Promise(function (r) {
       
  6909             return c.start(r);
       
  6910           });
       
  6911         }));
       
  6912       },
       
  6913       stop: function stop(finished) {
       
  6914         return ctrl.current.forEach(function (c) {
       
  6915           return c.stop(finished);
       
  6916         });
       
  6917       },
       
  6918 
       
  6919       get controllers() {
       
  6920         return ctrl.current;
       
  6921       }
       
  6922 
       
  6923     };
       
  6924   }); // This function updates the controllers
       
  6925 
       
  6926   var updateCtrl = React.useMemo(function () {
       
  6927     return function (updateProps) {
       
  6928       return ctrl.current.map(function (c, i) {
       
  6929         c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
       
  6930         if (!ref) c.start();
       
  6931       });
       
  6932     };
       
  6933   }, [length]); // Update controller if props aren't functional
       
  6934 
       
  6935   React.useEffect(function () {
       
  6936     if (mounted.current) {
       
  6937       if (!isFn) updateCtrl(props);
       
  6938     } else if (!ref) ctrl.current.forEach(function (c) {
       
  6939       return c.start();
       
  6940     });
       
  6941   }); // Update mounted flag and destroy controller on unmount
       
  6942 
       
  6943   React.useEffect(function () {
       
  6944     return mounted.current = true, function () {
       
  6945       return ctrl.current.forEach(function (c) {
       
  6946         return c.destroy();
       
  6947       });
       
  6948     };
       
  6949   }, []); // Return animated props, or, anim-props + the update-setter above
       
  6950 
       
  6951   var propValues = ctrl.current.map(function (c) {
       
  6952     return c.getValues();
       
  6953   });
       
  6954   return isFn ? [propValues, updateCtrl, function (finished) {
       
  6955     return ctrl.current.forEach(function (c) {
       
  6956       return c.pause(finished);
       
  6957     });
       
  6958   }] : propValues;
       
  6959 };
       
  6960 
       
  6961 /** API
       
  6962  * const props = useSpring({ ... })
       
  6963  * const [props, set] = useSpring(() => ({ ... }))
       
  6964  */
       
  6965 
       
  6966 var useSpring = function useSpring(props) {
       
  6967   var isFn = is.fun(props);
       
  6968 
       
  6969   var _useSprings = useSprings(1, isFn ? props : [props]),
       
  6970       result = _useSprings[0],
       
  6971       set = _useSprings[1],
       
  6972       pause = _useSprings[2];
       
  6973 
       
  6974   return isFn ? [result[0], set, pause] : result;
       
  6975 };
       
  6976 
       
  6977 /** API
       
  6978  * const trails = useTrail(number, { ... })
       
  6979  * const [trails, set] = useTrail(number, () => ({ ... }))
       
  6980  */
       
  6981 
       
  6982 var useTrail = function useTrail(length, props) {
       
  6983   var mounted = React.useRef(false);
       
  6984   var isFn = is.fun(props);
       
  6985   var updateProps = callProp(props);
       
  6986   var instances = React.useRef();
       
  6987 
       
  6988   var _useSprings = useSprings(length, function (i, ctrl) {
       
  6989     if (i === 0) instances.current = [];
       
  6990     instances.current.push(ctrl);
       
  6991     return _extends({}, updateProps, {
       
  6992       config: callProp(updateProps.config, i),
       
  6993       attach: i > 0 && function () {
       
  6994         return instances.current[i - 1];
       
  6995       }
       
  6996     });
       
  6997   }),
       
  6998       result = _useSprings[0],
       
  6999       set = _useSprings[1],
       
  7000       pause = _useSprings[2]; // Set up function to update controller
       
  7001 
       
  7002 
       
  7003   var updateCtrl = React.useMemo(function () {
       
  7004     return function (props) {
       
  7005       return set(function (i, ctrl) {
       
  7006         var last = props.reverse ? i === 0 : length - 1 === i;
       
  7007         var attachIdx = props.reverse ? i + 1 : i - 1;
       
  7008         var attachController = instances.current[attachIdx];
       
  7009         return _extends({}, props, {
       
  7010           config: callProp(props.config || updateProps.config, i),
       
  7011           attach: attachController && function () {
       
  7012             return attachController;
       
  7013           }
       
  7014         });
       
  7015       });
       
  7016     };
       
  7017   }, [length, updateProps.reverse]); // Update controller if props aren't functional
       
  7018 
       
  7019   React.useEffect(function () {
       
  7020     return void (mounted.current && !isFn && updateCtrl(props));
       
  7021   }); // Update mounted flag and destroy controller on unmount
       
  7022 
       
  7023   React.useEffect(function () {
       
  7024     return void (mounted.current = true);
       
  7025   }, []);
       
  7026   return isFn ? [result, updateCtrl, pause] : result;
       
  7027 };
       
  7028 
       
  7029 /** API
       
  7030  * const transitions = useTransition(items, itemKeys, { ... })
       
  7031  * const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
       
  7032  */
       
  7033 
       
  7034 var guid = 0;
       
  7035 var ENTER = 'enter';
       
  7036 var LEAVE = 'leave';
       
  7037 var UPDATE = 'update';
       
  7038 
       
  7039 var mapKeys = function mapKeys(items, keys) {
       
  7040   return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
       
  7041 };
       
  7042 
       
  7043 var get = function get(props) {
       
  7044   var items = props.items,
       
  7045       _props$keys = props.keys,
       
  7046       keys = _props$keys === void 0 ? function (item) {
       
  7047     return item;
       
  7048   } : _props$keys,
       
  7049       rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
       
  7050 
       
  7051   items = toArray(items !== void 0 ? items : null);
       
  7052   return _extends({
       
  7053     items: items,
       
  7054     keys: mapKeys(items, keys)
       
  7055   }, rest);
       
  7056 };
       
  7057 
       
  7058 function useTransition(input, keyTransform, config) {
       
  7059   var props = _extends({
       
  7060     items: input,
       
  7061     keys: keyTransform || function (i) {
       
  7062       return i;
       
  7063     }
       
  7064   }, config);
       
  7065 
       
  7066   var _get = get(props),
       
  7067       _get$lazy = _get.lazy,
       
  7068       lazy = _get$lazy === void 0 ? false : _get$lazy,
       
  7069       _get$unique = _get.unique,
       
  7070       _get$reset = _get.reset,
       
  7071       reset = _get$reset === void 0 ? false : _get$reset,
       
  7072       enter = _get.enter,
       
  7073       leave = _get.leave,
       
  7074       update = _get.update,
       
  7075       onDestroyed = _get.onDestroyed,
       
  7076       keys = _get.keys,
       
  7077       items = _get.items,
       
  7078       onFrame = _get.onFrame,
       
  7079       _onRest = _get.onRest,
       
  7080       onStart = _get.onStart,
       
  7081       ref = _get.ref,
       
  7082       extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
       
  7083 
       
  7084   var forceUpdate = useForceUpdate();
       
  7085   var mounted = React.useRef(false);
       
  7086   var state = React.useRef({
       
  7087     mounted: false,
       
  7088     first: true,
       
  7089     deleted: [],
       
  7090     current: {},
       
  7091     transitions: [],
       
  7092     prevProps: {},
       
  7093     paused: !!props.ref,
       
  7094     instances: !mounted.current && new Map(),
       
  7095     forceUpdate: forceUpdate
       
  7096   });
       
  7097   React.useImperativeHandle(props.ref, function () {
       
  7098     return {
       
  7099       start: function start() {
       
  7100         return Promise.all(Array.from(state.current.instances).map(function (_ref) {
       
  7101           var c = _ref[1];
       
  7102           return new Promise(function (r) {
       
  7103             return c.start(r);
       
  7104           });
       
  7105         }));
       
  7106       },
       
  7107       stop: function stop(finished) {
       
  7108         return Array.from(state.current.instances).forEach(function (_ref2) {
       
  7109           var c = _ref2[1];
       
  7110           return c.stop(finished);
       
  7111         });
       
  7112       },
       
  7113 
       
  7114       get controllers() {
       
  7115         return Array.from(state.current.instances).map(function (_ref3) {
       
  7116           var c = _ref3[1];
       
  7117           return c;
       
  7118         });
       
  7119       }
       
  7120 
       
  7121     };
       
  7122   }); // Update state
       
  7123 
       
  7124   state.current = diffItems(state.current, props);
       
  7125 
       
  7126   if (state.current.changed) {
       
  7127     // Update state
       
  7128     state.current.transitions.forEach(function (transition) {
       
  7129       var slot = transition.slot,
       
  7130           from = transition.from,
       
  7131           to = transition.to,
       
  7132           config = transition.config,
       
  7133           trail = transition.trail,
       
  7134           key = transition.key,
       
  7135           item = transition.item;
       
  7136       if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object
       
  7137 
       
  7138       var ctrl = state.current.instances.get(key);
       
  7139 
       
  7140       var newProps = _extends({}, extra, {
       
  7141         to: to,
       
  7142         from: from,
       
  7143         config: config,
       
  7144         ref: ref,
       
  7145         onRest: function onRest(values) {
       
  7146           if (state.current.mounted) {
       
  7147             if (transition.destroyed) {
       
  7148               // If no ref is given delete destroyed items immediately
       
  7149               if (!ref && !lazy) cleanUp(state, key);
       
  7150               if (onDestroyed) onDestroyed(item);
       
  7151             } // A transition comes to rest once all its springs conclude
       
  7152 
       
  7153 
       
  7154             var curInstances = Array.from(state.current.instances);
       
  7155             var active = curInstances.some(function (_ref4) {
       
  7156               var c = _ref4[1];
       
  7157               return !c.idle;
       
  7158             });
       
  7159             if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state);
       
  7160             if (_onRest) _onRest(item, slot, values);
       
  7161           }
       
  7162         },
       
  7163         onStart: onStart && function () {
       
  7164           return onStart(item, slot);
       
  7165         },
       
  7166         onFrame: onFrame && function (values) {
       
  7167           return onFrame(item, slot, values);
       
  7168         },
       
  7169         delay: trail,
       
  7170         reset: reset && slot === ENTER // Update controller
       
  7171 
       
  7172       });
       
  7173 
       
  7174       ctrl.update(newProps);
       
  7175       if (!state.current.paused) ctrl.start();
       
  7176     });
       
  7177   }
       
  7178 
       
  7179   React.useEffect(function () {
       
  7180     state.current.mounted = mounted.current = true;
       
  7181     return function () {
       
  7182       state.current.mounted = mounted.current = false;
       
  7183       Array.from(state.current.instances).map(function (_ref5) {
       
  7184         var c = _ref5[1];
       
  7185         return c.destroy();
       
  7186       });
       
  7187       state.current.instances.clear();
       
  7188     };
       
  7189   }, []);
       
  7190   return state.current.transitions.map(function (_ref6) {
       
  7191     var item = _ref6.item,
       
  7192         slot = _ref6.slot,
       
  7193         key = _ref6.key;
       
  7194     return {
       
  7195       item: item,
       
  7196       key: key,
       
  7197       state: slot,
       
  7198       props: state.current.instances.get(key).getValues()
       
  7199     };
       
  7200   });
       
  7201 }
       
  7202 
       
  7203 function cleanUp(state, filterKey) {
       
  7204   var deleted = state.current.deleted;
       
  7205 
       
  7206   var _loop = function _loop() {
       
  7207     if (_isArray) {
       
  7208       if (_i >= _iterator.length) return "break";
       
  7209       _ref8 = _iterator[_i++];
       
  7210     } else {
       
  7211       _i = _iterator.next();
       
  7212       if (_i.done) return "break";
       
  7213       _ref8 = _i.value;
       
  7214     }
       
  7215 
       
  7216     var _ref7 = _ref8;
       
  7217     var key = _ref7.key;
       
  7218 
       
  7219     var filter = function filter(t) {
       
  7220       return t.key !== key;
       
  7221     };
       
  7222 
       
  7223     if (is.und(filterKey) || filterKey === key) {
       
  7224       state.current.instances.delete(key);
       
  7225       state.current.transitions = state.current.transitions.filter(filter);
       
  7226       state.current.deleted = state.current.deleted.filter(filter);
       
  7227     }
       
  7228   };
       
  7229 
       
  7230   for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
       
  7231     var _ref8;
       
  7232 
       
  7233     var _ret = _loop();
       
  7234 
       
  7235     if (_ret === "break") break;
       
  7236   }
       
  7237 
       
  7238   state.current.forceUpdate();
       
  7239 }
       
  7240 
       
  7241 function diffItems(_ref9, props) {
       
  7242   var first = _ref9.first,
       
  7243       prevProps = _ref9.prevProps,
       
  7244       state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]);
       
  7245 
       
  7246   var _get2 = get(props),
       
  7247       items = _get2.items,
       
  7248       keys = _get2.keys,
       
  7249       initial = _get2.initial,
       
  7250       from = _get2.from,
       
  7251       enter = _get2.enter,
       
  7252       leave = _get2.leave,
       
  7253       update = _get2.update,
       
  7254       _get2$trail = _get2.trail,
       
  7255       trail = _get2$trail === void 0 ? 0 : _get2$trail,
       
  7256       unique = _get2.unique,
       
  7257       config = _get2.config,
       
  7258       _get2$order = _get2.order,
       
  7259       order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order;
       
  7260 
       
  7261   var _get3 = get(prevProps),
       
  7262       _keys = _get3.keys,
       
  7263       _items = _get3.items;
       
  7264 
       
  7265   var current = _extends({}, state.current);
       
  7266 
       
  7267   var deleted = [].concat(state.deleted); // Compare next keys with current keys
       
  7268 
       
  7269   var currentKeys = Object.keys(current);
       
  7270   var currentSet = new Set(currentKeys);
       
  7271   var nextSet = new Set(keys);
       
  7272   var added = keys.filter(function (item) {
       
  7273     return !currentSet.has(item);
       
  7274   });
       
  7275   var removed = state.transitions.filter(function (item) {
       
  7276     return !item.destroyed && !nextSet.has(item.originalKey);
       
  7277   }).map(function (i) {
       
  7278     return i.originalKey;
       
  7279   });
       
  7280   var updated = keys.filter(function (item) {
       
  7281     return currentSet.has(item);
       
  7282   });
       
  7283   var delay = -trail;
       
  7284 
       
  7285   while (order.length) {
       
  7286     var changeType = order.shift();
       
  7287 
       
  7288     switch (changeType) {
       
  7289       case ENTER:
       
  7290         {
       
  7291           added.forEach(function (key, index) {
       
  7292             // In unique mode, remove fading out transitions if their key comes in again
       
  7293             if (unique && deleted.find(function (d) {
       
  7294               return d.originalKey === key;
       
  7295             })) deleted = deleted.filter(function (t) {
       
  7296               return t.originalKey !== key;
       
  7297             });
       
  7298             var keyIndex = keys.indexOf(key);
       
  7299             var item = items[keyIndex];
       
  7300             var slot = first && initial !== void 0 ? 'initial' : ENTER;
       
  7301             current[key] = {
       
  7302               slot: slot,
       
  7303               originalKey: key,
       
  7304               key: unique ? String(key) : guid++,
       
  7305               item: item,
       
  7306               trail: delay = delay + trail,
       
  7307               config: callProp(config, item, slot),
       
  7308               from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item),
       
  7309               to: callProp(enter, item)
       
  7310             };
       
  7311           });
       
  7312           break;
       
  7313         }
       
  7314 
       
  7315       case LEAVE:
       
  7316         {
       
  7317           removed.forEach(function (key) {
       
  7318             var keyIndex = _keys.indexOf(key);
       
  7319 
       
  7320             var item = _items[keyIndex];
       
  7321             var slot = LEAVE;
       
  7322             deleted.unshift(_extends({}, current[key], {
       
  7323               slot: slot,
       
  7324               destroyed: true,
       
  7325               left: _keys[Math.max(0, keyIndex - 1)],
       
  7326               right: _keys[Math.min(_keys.length, keyIndex + 1)],
       
  7327               trail: delay = delay + trail,
       
  7328               config: callProp(config, item, slot),
       
  7329               to: callProp(leave, item)
       
  7330             }));
       
  7331             delete current[key];
       
  7332           });
       
  7333           break;
       
  7334         }
       
  7335 
       
  7336       case UPDATE:
       
  7337         {
       
  7338           updated.forEach(function (key) {
       
  7339             var keyIndex = keys.indexOf(key);
       
  7340             var item = items[keyIndex];
       
  7341             var slot = UPDATE;
       
  7342             current[key] = _extends({}, current[key], {
       
  7343               item: item,
       
  7344               slot: slot,
       
  7345               trail: delay = delay + trail,
       
  7346               config: callProp(config, item, slot),
       
  7347               to: callProp(update, item)
       
  7348             });
       
  7349           });
       
  7350           break;
       
  7351         }
       
  7352     }
       
  7353   }
       
  7354 
       
  7355   var out = keys.map(function (key) {
       
  7356     return current[key];
       
  7357   }); // This tries to restore order for deleted items by finding their last known siblings
       
  7358   // only using the left sibling to keep order placement consistent for all deleted items
       
  7359 
       
  7360   deleted.forEach(function (_ref10) {
       
  7361     var left = _ref10.left,
       
  7362         right = _ref10.right,
       
  7363         item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]);
       
  7364 
       
  7365     var pos; // Was it the element on the left, if yes, move there ...
       
  7366 
       
  7367     if ((pos = out.findIndex(function (t) {
       
  7368       return t.originalKey === left;
       
  7369     })) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯
       
  7370 
       
  7371     pos = Math.max(0, pos);
       
  7372     out = [].concat(out.slice(0, pos), [item], out.slice(pos));
       
  7373   });
       
  7374   return _extends({}, state, {
       
  7375     changed: added.length || removed.length || updated.length,
       
  7376     first: first && added.length === 0,
       
  7377     transitions: out,
       
  7378     current: current,
       
  7379     deleted: deleted,
       
  7380     prevProps: props
       
  7381   });
       
  7382 }
       
  7383 
       
  7384 var AnimatedStyle =
       
  7385 /*#__PURE__*/
       
  7386 function (_AnimatedObject) {
       
  7387   _inheritsLoose(AnimatedStyle, _AnimatedObject);
       
  7388 
       
  7389   function AnimatedStyle(style) {
       
  7390     var _this;
       
  7391 
       
  7392     if (style === void 0) {
       
  7393       style = {};
       
  7394     }
       
  7395 
       
  7396     _this = _AnimatedObject.call(this) || this;
       
  7397 
       
  7398     if (style.transform && !(style.transform instanceof Animated)) {
       
  7399       style = applyAnimatedValues.transform(style);
       
  7400     }
       
  7401 
       
  7402     _this.payload = style;
       
  7403     return _this;
       
  7404   }
       
  7405 
       
  7406   return AnimatedStyle;
       
  7407 }(AnimatedObject);
       
  7408 
       
  7409 // http://www.w3.org/TR/css3-color/#svg-color
       
  7410 var colors = {
       
  7411   transparent: 0x00000000,
       
  7412   aliceblue: 0xf0f8ffff,
       
  7413   antiquewhite: 0xfaebd7ff,
       
  7414   aqua: 0x00ffffff,
       
  7415   aquamarine: 0x7fffd4ff,
       
  7416   azure: 0xf0ffffff,
       
  7417   beige: 0xf5f5dcff,
       
  7418   bisque: 0xffe4c4ff,
       
  7419   black: 0x000000ff,
       
  7420   blanchedalmond: 0xffebcdff,
       
  7421   blue: 0x0000ffff,
       
  7422   blueviolet: 0x8a2be2ff,
       
  7423   brown: 0xa52a2aff,
       
  7424   burlywood: 0xdeb887ff,
       
  7425   burntsienna: 0xea7e5dff,
       
  7426   cadetblue: 0x5f9ea0ff,
       
  7427   chartreuse: 0x7fff00ff,
       
  7428   chocolate: 0xd2691eff,
       
  7429   coral: 0xff7f50ff,
       
  7430   cornflowerblue: 0x6495edff,
       
  7431   cornsilk: 0xfff8dcff,
       
  7432   crimson: 0xdc143cff,
       
  7433   cyan: 0x00ffffff,
       
  7434   darkblue: 0x00008bff,
       
  7435   darkcyan: 0x008b8bff,
       
  7436   darkgoldenrod: 0xb8860bff,
       
  7437   darkgray: 0xa9a9a9ff,
       
  7438   darkgreen: 0x006400ff,
       
  7439   darkgrey: 0xa9a9a9ff,
       
  7440   darkkhaki: 0xbdb76bff,
       
  7441   darkmagenta: 0x8b008bff,
       
  7442   darkolivegreen: 0x556b2fff,
       
  7443   darkorange: 0xff8c00ff,
       
  7444   darkorchid: 0x9932ccff,
       
  7445   darkred: 0x8b0000ff,
       
  7446   darksalmon: 0xe9967aff,
       
  7447   darkseagreen: 0x8fbc8fff,
       
  7448   darkslateblue: 0x483d8bff,
       
  7449   darkslategray: 0x2f4f4fff,
       
  7450   darkslategrey: 0x2f4f4fff,
       
  7451   darkturquoise: 0x00ced1ff,
       
  7452   darkviolet: 0x9400d3ff,
       
  7453   deeppink: 0xff1493ff,
       
  7454   deepskyblue: 0x00bfffff,
       
  7455   dimgray: 0x696969ff,
       
  7456   dimgrey: 0x696969ff,
       
  7457   dodgerblue: 0x1e90ffff,
       
  7458   firebrick: 0xb22222ff,
       
  7459   floralwhite: 0xfffaf0ff,
       
  7460   forestgreen: 0x228b22ff,
       
  7461   fuchsia: 0xff00ffff,
       
  7462   gainsboro: 0xdcdcdcff,
       
  7463   ghostwhite: 0xf8f8ffff,
       
  7464   gold: 0xffd700ff,
       
  7465   goldenrod: 0xdaa520ff,
       
  7466   gray: 0x808080ff,
       
  7467   green: 0x008000ff,
       
  7468   greenyellow: 0xadff2fff,
       
  7469   grey: 0x808080ff,
       
  7470   honeydew: 0xf0fff0ff,
       
  7471   hotpink: 0xff69b4ff,
       
  7472   indianred: 0xcd5c5cff,
       
  7473   indigo: 0x4b0082ff,
       
  7474   ivory: 0xfffff0ff,
       
  7475   khaki: 0xf0e68cff,
       
  7476   lavender: 0xe6e6faff,
       
  7477   lavenderblush: 0xfff0f5ff,
       
  7478   lawngreen: 0x7cfc00ff,
       
  7479   lemonchiffon: 0xfffacdff,
       
  7480   lightblue: 0xadd8e6ff,
       
  7481   lightcoral: 0xf08080ff,
       
  7482   lightcyan: 0xe0ffffff,
       
  7483   lightgoldenrodyellow: 0xfafad2ff,
       
  7484   lightgray: 0xd3d3d3ff,
       
  7485   lightgreen: 0x90ee90ff,
       
  7486   lightgrey: 0xd3d3d3ff,
       
  7487   lightpink: 0xffb6c1ff,
       
  7488   lightsalmon: 0xffa07aff,
       
  7489   lightseagreen: 0x20b2aaff,
       
  7490   lightskyblue: 0x87cefaff,
       
  7491   lightslategray: 0x778899ff,
       
  7492   lightslategrey: 0x778899ff,
       
  7493   lightsteelblue: 0xb0c4deff,
       
  7494   lightyellow: 0xffffe0ff,
       
  7495   lime: 0x00ff00ff,
       
  7496   limegreen: 0x32cd32ff,
       
  7497   linen: 0xfaf0e6ff,
       
  7498   magenta: 0xff00ffff,
       
  7499   maroon: 0x800000ff,
       
  7500   mediumaquamarine: 0x66cdaaff,
       
  7501   mediumblue: 0x0000cdff,
       
  7502   mediumorchid: 0xba55d3ff,
       
  7503   mediumpurple: 0x9370dbff,
       
  7504   mediumseagreen: 0x3cb371ff,
       
  7505   mediumslateblue: 0x7b68eeff,
       
  7506   mediumspringgreen: 0x00fa9aff,
       
  7507   mediumturquoise: 0x48d1ccff,
       
  7508   mediumvioletred: 0xc71585ff,
       
  7509   midnightblue: 0x191970ff,
       
  7510   mintcream: 0xf5fffaff,
       
  7511   mistyrose: 0xffe4e1ff,
       
  7512   moccasin: 0xffe4b5ff,
       
  7513   navajowhite: 0xffdeadff,
       
  7514   navy: 0x000080ff,
       
  7515   oldlace: 0xfdf5e6ff,
       
  7516   olive: 0x808000ff,
       
  7517   olivedrab: 0x6b8e23ff,
       
  7518   orange: 0xffa500ff,
       
  7519   orangered: 0xff4500ff,
       
  7520   orchid: 0xda70d6ff,
       
  7521   palegoldenrod: 0xeee8aaff,
       
  7522   palegreen: 0x98fb98ff,
       
  7523   paleturquoise: 0xafeeeeff,
       
  7524   palevioletred: 0xdb7093ff,
       
  7525   papayawhip: 0xffefd5ff,
       
  7526   peachpuff: 0xffdab9ff,
       
  7527   peru: 0xcd853fff,
       
  7528   pink: 0xffc0cbff,
       
  7529   plum: 0xdda0ddff,
       
  7530   powderblue: 0xb0e0e6ff,
       
  7531   purple: 0x800080ff,
       
  7532   rebeccapurple: 0x663399ff,
       
  7533   red: 0xff0000ff,
       
  7534   rosybrown: 0xbc8f8fff,
       
  7535   royalblue: 0x4169e1ff,
       
  7536   saddlebrown: 0x8b4513ff,
       
  7537   salmon: 0xfa8072ff,
       
  7538   sandybrown: 0xf4a460ff,
       
  7539   seagreen: 0x2e8b57ff,
       
  7540   seashell: 0xfff5eeff,
       
  7541   sienna: 0xa0522dff,
       
  7542   silver: 0xc0c0c0ff,
       
  7543   skyblue: 0x87ceebff,
       
  7544   slateblue: 0x6a5acdff,
       
  7545   slategray: 0x708090ff,
       
  7546   slategrey: 0x708090ff,
       
  7547   snow: 0xfffafaff,
       
  7548   springgreen: 0x00ff7fff,
       
  7549   steelblue: 0x4682b4ff,
       
  7550   tan: 0xd2b48cff,
       
  7551   teal: 0x008080ff,
       
  7552   thistle: 0xd8bfd8ff,
       
  7553   tomato: 0xff6347ff,
       
  7554   turquoise: 0x40e0d0ff,
       
  7555   violet: 0xee82eeff,
       
  7556   wheat: 0xf5deb3ff,
       
  7557   white: 0xffffffff,
       
  7558   whitesmoke: 0xf5f5f5ff,
       
  7559   yellow: 0xffff00ff,
       
  7560   yellowgreen: 0x9acd32ff
       
  7561 };
       
  7562 
       
  7563 // const INTEGER = '[-+]?\\d+';
       
  7564 var NUMBER = '[-+]?\\d*\\.?\\d+';
       
  7565 var PERCENTAGE = NUMBER + '%';
       
  7566 
       
  7567 function call() {
       
  7568   for (var _len = arguments.length, parts = new Array(_len), _key = 0; _key < _len; _key++) {
       
  7569     parts[_key] = arguments[_key];
       
  7570   }
       
  7571 
       
  7572   return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)';
       
  7573 }
       
  7574 
       
  7575 var rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));
       
  7576 var rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));
       
  7577 var hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));
       
  7578 var hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
       
  7579 var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
       
  7580 var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
       
  7581 var hex6 = /^#([0-9a-fA-F]{6})$/;
       
  7582 var hex8 = /^#([0-9a-fA-F]{8})$/;
       
  7583 
       
  7584 /*
       
  7585 https://github.com/react-community/normalize-css-color
       
  7586 
       
  7587 BSD 3-Clause License
       
  7588 
       
  7589 Copyright (c) 2016, React Community
       
  7590 All rights reserved.
       
  7591 
       
  7592 Redistribution and use in source and binary forms, with or without
       
  7593 modification, are permitted provided that the following conditions are met:
       
  7594 
       
  7595 * Redistributions of source code must retain the above copyright notice, this
       
  7596   list of conditions and the following disclaimer.
       
  7597 
       
  7598 * Redistributions in binary form must reproduce the above copyright notice,
       
  7599   this list of conditions and the following disclaimer in the documentation
       
  7600   and/or other materials provided with the distribution.
       
  7601 
       
  7602 * Neither the name of the copyright holder nor the names of its
       
  7603   contributors may be used to endorse or promote products derived from
       
  7604   this software without specific prior written permission.
       
  7605 
       
  7606 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
       
  7607 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       
  7608 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
       
  7609 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
       
  7610 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
       
  7611 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
       
  7612 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
       
  7613 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
       
  7614 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
       
  7615 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
  7616 */
       
  7617 function normalizeColor(color) {
       
  7618   var match;
       
  7619 
       
  7620   if (typeof color === 'number') {
       
  7621     return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;
       
  7622   } // Ordered based on occurrences on Facebook codebase
       
  7623 
       
  7624 
       
  7625   if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;
       
  7626   if (colors.hasOwnProperty(color)) return colors[color];
       
  7627 
       
  7628   if (match = rgb.exec(color)) {
       
  7629     return (parse255(match[1]) << 24 | // r
       
  7630     parse255(match[2]) << 16 | // g
       
  7631     parse255(match[3]) << 8 | // b
       
  7632     0x000000ff) >>> // a
       
  7633     0;
       
  7634   }
       
  7635 
       
  7636   if (match = rgba.exec(color)) {
       
  7637     return (parse255(match[1]) << 24 | // r
       
  7638     parse255(match[2]) << 16 | // g
       
  7639     parse255(match[3]) << 8 | // b
       
  7640     parse1(match[4])) >>> // a
       
  7641     0;
       
  7642   }
       
  7643 
       
  7644   if (match = hex3.exec(color)) {
       
  7645     return parseInt(match[1] + match[1] + // r
       
  7646     match[2] + match[2] + // g
       
  7647     match[3] + match[3] + // b
       
  7648     'ff', // a
       
  7649     16) >>> 0;
       
  7650   } // https://drafts.csswg.org/css-color-4/#hex-notation
       
  7651 
       
  7652 
       
  7653   if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;
       
  7654 
       
  7655   if (match = hex4.exec(color)) {
       
  7656     return parseInt(match[1] + match[1] + // r
       
  7657     match[2] + match[2] + // g
       
  7658     match[3] + match[3] + // b
       
  7659     match[4] + match[4], // a
       
  7660     16) >>> 0;
       
  7661   }
       
  7662 
       
  7663   if (match = hsl.exec(color)) {
       
  7664     return (hslToRgb(parse360(match[1]), // h
       
  7665     parsePercentage(match[2]), // s
       
  7666     parsePercentage(match[3]) // l
       
  7667     ) | 0x000000ff) >>> // a
       
  7668     0;
       
  7669   }
       
  7670 
       
  7671   if (match = hsla.exec(color)) {
       
  7672     return (hslToRgb(parse360(match[1]), // h
       
  7673     parsePercentage(match[2]), // s
       
  7674     parsePercentage(match[3]) // l
       
  7675     ) | parse1(match[4])) >>> // a
       
  7676     0;
       
  7677   }
       
  7678 
       
  7679   return null;
       
  7680 }
       
  7681 
       
  7682 function hue2rgb(p, q, t) {
       
  7683   if (t < 0) t += 1;
       
  7684   if (t > 1) t -= 1;
       
  7685   if (t < 1 / 6) return p + (q - p) * 6 * t;
       
  7686   if (t < 1 / 2) return q;
       
  7687   if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
       
  7688   return p;
       
  7689 }
       
  7690 
       
  7691 function hslToRgb(h, s, l) {
       
  7692   var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
       
  7693   var p = 2 * l - q;
       
  7694   var r = hue2rgb(p, q, h + 1 / 3);
       
  7695   var g = hue2rgb(p, q, h);
       
  7696   var b = hue2rgb(p, q, h - 1 / 3);
       
  7697   return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
       
  7698 }
       
  7699 
       
  7700 function parse255(str) {
       
  7701   var int = parseInt(str, 10);
       
  7702   if (int < 0) return 0;
       
  7703   if (int > 255) return 255;
       
  7704   return int;
       
  7705 }
       
  7706 
       
  7707 function parse360(str) {
       
  7708   var int = parseFloat(str);
       
  7709   return (int % 360 + 360) % 360 / 360;
       
  7710 }
       
  7711 
       
  7712 function parse1(str) {
       
  7713   var num = parseFloat(str);
       
  7714   if (num < 0) return 0;
       
  7715   if (num > 1) return 255;
       
  7716   return Math.round(num * 255);
       
  7717 }
       
  7718 
       
  7719 function parsePercentage(str) {
       
  7720   // parseFloat conveniently ignores the final %
       
  7721   var int = parseFloat(str);
       
  7722   if (int < 0) return 0;
       
  7723   if (int > 100) return 1;
       
  7724   return int / 100;
       
  7725 }
       
  7726 
       
  7727 function colorToRgba(input) {
       
  7728   var int32Color = normalizeColor(input);
       
  7729   if (int32Color === null) return input;
       
  7730   int32Color = int32Color || 0;
       
  7731   var r = (int32Color & 0xff000000) >>> 24;
       
  7732   var g = (int32Color & 0x00ff0000) >>> 16;
       
  7733   var b = (int32Color & 0x0000ff00) >>> 8;
       
  7734   var a = (int32Color & 0x000000ff) / 255;
       
  7735   return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
       
  7736 } // Problem: https://github.com/animatedjs/animated/pull/102
       
  7737 // Solution: https://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly/658662
       
  7738 
       
  7739 
       
  7740 var stringShapeRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; // Covers rgb, rgba, hsl, hsla
       
  7741 // Taken from https://gist.github.com/olmokramer/82ccce673f86db7cda5e
       
  7742 
       
  7743 var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; // Covers color names (transparent, blue, etc.)
       
  7744 
       
  7745 var colorNamesRegex = new RegExp("(" + Object.keys(colors).join('|') + ")", 'g');
       
  7746 /**
       
  7747  * Supports string shapes by extracting numbers so new values can be computed,
       
  7748  * and recombines those values into new strings of the same shape.  Supports
       
  7749  * things like:
       
  7750  *
       
  7751  *   rgba(123, 42, 99, 0.36)           // colors
       
  7752  *   -45deg                            // values with units
       
  7753  *   0 2px 2px 0px rgba(0, 0, 0, 0.12) // box shadows
       
  7754  */
       
  7755 
       
  7756 var createStringInterpolator = function createStringInterpolator(config) {
       
  7757   // Replace colors with rgba
       
  7758   var outputRange = config.output.map(function (rangeValue) {
       
  7759     return rangeValue.replace(colorRegex, colorToRgba);
       
  7760   }).map(function (rangeValue) {
       
  7761     return rangeValue.replace(colorNamesRegex, colorToRgba);
       
  7762   });
       
  7763   var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
       
  7764     return [];
       
  7765   });
       
  7766   outputRange.forEach(function (value) {
       
  7767     value.match(stringShapeRegex).forEach(function (number, i) {
       
  7768       return outputRanges[i].push(+number);
       
  7769     });
       
  7770   });
       
  7771   var interpolations = outputRange[0].match(stringShapeRegex).map(function (_value, i) {
       
  7772     return createInterpolator(_extends({}, config, {
       
  7773       output: outputRanges[i]
       
  7774     }));
       
  7775   });
       
  7776   return function (input) {
       
  7777     var i = 0;
       
  7778     return outputRange[0] // 'rgba(0, 100, 200, 0)'
       
  7779     // ->
       
  7780     // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'
       
  7781     .replace(stringShapeRegex, function () {
       
  7782       return interpolations[i++](input);
       
  7783     }) // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to
       
  7784     // round the opacity (4th column).
       
  7785     .replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, function (_, p1, p2, p3, p4) {
       
  7786       return "rgba(" + Math.round(p1) + ", " + Math.round(p2) + ", " + Math.round(p3) + ", " + p4 + ")";
       
  7787     });
       
  7788   };
       
  7789 };
       
  7790 
       
  7791 var isUnitlessNumber = {
       
  7792   animationIterationCount: true,
       
  7793   borderImageOutset: true,
       
  7794   borderImageSlice: true,
       
  7795   borderImageWidth: true,
       
  7796   boxFlex: true,
       
  7797   boxFlexGroup: true,
       
  7798   boxOrdinalGroup: true,
       
  7799   columnCount: true,
       
  7800   columns: true,
       
  7801   flex: true,
       
  7802   flexGrow: true,
       
  7803   flexPositive: true,
       
  7804   flexShrink: true,
       
  7805   flexNegative: true,
       
  7806   flexOrder: true,
       
  7807   gridRow: true,
       
  7808   gridRowEnd: true,
       
  7809   gridRowSpan: true,
       
  7810   gridRowStart: true,
       
  7811   gridColumn: true,
       
  7812   gridColumnEnd: true,
       
  7813   gridColumnSpan: true,
       
  7814   gridColumnStart: true,
       
  7815   fontWeight: true,
       
  7816   lineClamp: true,
       
  7817   lineHeight: true,
       
  7818   opacity: true,
       
  7819   order: true,
       
  7820   orphans: true,
       
  7821   tabSize: true,
       
  7822   widows: true,
       
  7823   zIndex: true,
       
  7824   zoom: true,
       
  7825   // SVG-related properties
       
  7826   fillOpacity: true,
       
  7827   floodOpacity: true,
       
  7828   stopOpacity: true,
       
  7829   strokeDasharray: true,
       
  7830   strokeDashoffset: true,
       
  7831   strokeMiterlimit: true,
       
  7832   strokeOpacity: true,
       
  7833   strokeWidth: true
       
  7834 };
       
  7835 
       
  7836 var prefixKey = function prefixKey(prefix, key) {
       
  7837   return prefix + key.charAt(0).toUpperCase() + key.substring(1);
       
  7838 };
       
  7839 
       
  7840 var prefixes = ['Webkit', 'Ms', 'Moz', 'O'];
       
  7841 isUnitlessNumber = Object.keys(isUnitlessNumber).reduce(function (acc, prop) {
       
  7842   prefixes.forEach(function (prefix) {
       
  7843     return acc[prefixKey(prefix, prop)] = acc[prop];
       
  7844   });
       
  7845   return acc;
       
  7846 }, isUnitlessNumber);
       
  7847 
       
  7848 function dangerousStyleValue(name, value, isCustomProperty) {
       
  7849   if (value == null || typeof value === 'boolean' || value === '') return '';
       
  7850   if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
       
  7851 
       
  7852   return ('' + value).trim();
       
  7853 }
       
  7854 
       
  7855 var attributeCache = {};
       
  7856 injectCreateAnimatedStyle(function (style) {
       
  7857   return new AnimatedStyle(style);
       
  7858 });
       
  7859 injectDefaultElement('div');
       
  7860 injectStringInterpolator(createStringInterpolator);
       
  7861 injectColorNames(colors);
       
  7862 injectApplyAnimatedValues(function (instance, props) {
       
  7863   if (instance.nodeType && instance.setAttribute !== undefined) {
       
  7864     var style = props.style,
       
  7865         children = props.children,
       
  7866         scrollTop = props.scrollTop,
       
  7867         scrollLeft = props.scrollLeft,
       
  7868         attributes = _objectWithoutPropertiesLoose(props, ["style", "children", "scrollTop", "scrollLeft"]);
       
  7869 
       
  7870     var filter = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';
       
  7871     if (scrollTop !== void 0) instance.scrollTop = scrollTop;
       
  7872     if (scrollLeft !== void 0) instance.scrollLeft = scrollLeft; // Set textContent, if children is an animatable value
       
  7873 
       
  7874     if (children !== void 0) instance.textContent = children; // Set styles ...
       
  7875 
       
  7876     for (var styleName in style) {
       
  7877       if (!style.hasOwnProperty(styleName)) continue;
       
  7878       var isCustomProperty = styleName.indexOf('--') === 0;
       
  7879       var styleValue = dangerousStyleValue(styleName, style[styleName], isCustomProperty);
       
  7880       if (styleName === 'float') styleName = 'cssFloat';
       
  7881       if (isCustomProperty) instance.style.setProperty(styleName, styleValue);else instance.style[styleName] = styleValue;
       
  7882     } // Set attributes ...
       
  7883 
       
  7884 
       
  7885     for (var name in attributes) {
       
  7886       // Attributes are written in dash case
       
  7887       var dashCase = filter ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, function (n) {
       
  7888         return '-' + n.toLowerCase();
       
  7889       }));
       
  7890       if (typeof instance.getAttribute(dashCase) !== 'undefined') instance.setAttribute(dashCase, attributes[name]);
       
  7891     }
       
  7892 
       
  7893     return;
       
  7894   } else return false;
       
  7895 }, function (style) {
       
  7896   return style;
       
  7897 });
       
  7898 
       
  7899 var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
       
  7900 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
       
  7901 // Extend animated with all the available THREE elements
       
  7902 var apply = merge(createAnimatedComponent, false);
       
  7903 var extendedAnimated = apply(domElements);
       
  7904 
       
  7905 exports.apply = apply;
       
  7906 exports.config = config;
       
  7907 exports.update = update;
       
  7908 exports.animated = extendedAnimated;
       
  7909 exports.a = extendedAnimated;
       
  7910 exports.interpolate = interpolate$1;
       
  7911 exports.Globals = Globals;
       
  7912 exports.useSpring = useSpring;
       
  7913 exports.useTrail = useTrail;
       
  7914 exports.useTransition = useTransition;
       
  7915 exports.useChain = useChain;
       
  7916 exports.useSprings = useSprings;
       
  7917 
       
  7918 
       
  7919 /***/ }),
       
  7920 /* 114 */,
       
  7921 /* 115 */,
       
  7922 /* 116 */,
       
  7923 /* 117 */,
       
  7924 /* 118 */,
       
  7925 /* 119 */
       
  7926 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  7927 
       
  7928 "use strict";
       
  7929 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Composite; });
       
  7930 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return useComposite; });
       
  7931 /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
       
  7932 /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
       
  7933 /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
       
  7934 /* harmony import */ var _Box_Box_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67);
       
  7935 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
       
  7936 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
       
  7937 /* harmony import */ var reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63);
       
  7938 /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80);
       
  7939 /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46);
       
  7940 /* harmony import */ var reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(53);
       
  7941 /* harmony import */ var reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(57);
       
  7942 /* harmony import */ var _Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(73);
       
  7943 /* harmony import */ var reakit_system_useCreateElement__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(78);
       
  7944 /* harmony import */ var reakit_utils_createOnKeyDown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(82);
       
  7945 /* harmony import */ var reakit_utils_getDocument__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(47);
       
  7946 /* harmony import */ var reakit_utils_fireEvent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(94);
       
  7947 /* harmony import */ var reakit_utils_fireKeyboardEvent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(102);
       
  7948 /* harmony import */ var _CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(51);
       
  7949 
       
  7950 
       
  7951 
       
  7952 
       
  7953 
       
  7954 
       
  7955 
       
  7956 
       
  7957 
       
  7958 
       
  7959 
       
  7960 
       
  7961 
       
  7962 
       
  7963 
       
  7964 
       
  7965 
       
  7966 
       
  7967 
       
  7968 
       
  7969 
       
  7970 
       
  7971 
       
  7972 
       
  7973 
       
  7974 
       
  7975 
       
  7976 
       
  7977 var isIE11 = typeof window !== "undefined" && "msCrypto" in window;
       
  7978 function getNextActiveElementOnBlur(event) {
       
  7979   // IE 11 doesn't support event.relatedTarget on blur.
       
  7980   // document.activeElement points the the next active element.
       
  7981   // On modern browsers, document.activeElement points to the current target.
       
  7982   if (isIE11) {
       
  7983     var activeElement = Object(reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_9__[/* getActiveElement */ "a"])(event.target);
       
  7984     return activeElement;
       
  7985   }
       
  7986 
       
  7987   return event.relatedTarget;
       
  7988 }
       
  7989 
       
  7990 var validCompositeRoles = ["combobox", "grid", "tablist", "listbox", "menu", "menubar", "toolbar", "radiogroup", "tree", "treegrid"];
       
  7991 var isIE11$1 = typeof window !== "undefined" && "msCrypto" in window;
       
  7992 
       
  7993 function canProxyKeyboardEvent(event) {
       
  7994   if (!Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__[/* isSelfTarget */ "a"])(event)) return false;
       
  7995   if (event.metaKey) return false;
       
  7996   if (event.key === "Tab") return false;
       
  7997   return true;
       
  7998 }
       
  7999 
       
  8000 function useKeyboardEventProxy(virtual, currentItem, htmlEventHandler) {
       
  8001   var eventHandlerRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlEventHandler);
       
  8002   return Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
       
  8003     var _eventHandlerRef$curr;
       
  8004 
       
  8005     if (virtual && canProxyKeyboardEvent(event)) {
       
  8006       var currentElement = currentItem === null || currentItem === void 0 ? void 0 : currentItem.ref.current;
       
  8007 
       
  8008       if (currentElement) {
       
  8009         Object(reakit_utils_fireKeyboardEvent__WEBPACK_IMPORTED_MODULE_15__[/* fireKeyboardEvent */ "a"])(currentElement, event.type, event); // The event will be triggered on the composite item and then
       
  8010         // propagated up to this composite element again, so we can pretend
       
  8011         // that it wasn't called on this component in the first place.
       
  8012 
       
  8013         if (event.currentTarget.contains(currentElement)) {
       
  8014           event.stopPropagation();
       
  8015           event.preventDefault();
       
  8016           return;
       
  8017         }
       
  8018       }
       
  8019     }
       
  8020 
       
  8021     (_eventHandlerRef$curr = eventHandlerRef.current) === null || _eventHandlerRef$curr === void 0 ? void 0 : _eventHandlerRef$curr.call(eventHandlerRef, event);
       
  8022   }, [virtual, currentItem]);
       
  8023 } // istanbul ignore next
       
  8024 
       
  8025 
       
  8026 function useActiveElementRef(elementRef) {
       
  8027   var activeElementRef = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(null);
       
  8028   Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
       
  8029     var document = Object(reakit_utils_getDocument__WEBPACK_IMPORTED_MODULE_13__[/* getDocument */ "a"])(elementRef.current);
       
  8030 
       
  8031     var onFocus = function onFocus(event) {
       
  8032       var target = event.target;
       
  8033       activeElementRef.current = target;
       
  8034     };
       
  8035 
       
  8036     document.addEventListener("focus", onFocus, true);
       
  8037     return function () {
       
  8038       document.removeEventListener("focus", onFocus, true);
       
  8039     };
       
  8040   }, []);
       
  8041   return activeElementRef;
       
  8042 }
       
  8043 
       
  8044 function findFirstEnabledItemInTheLastRow(items) {
       
  8045   return Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__["a"])(Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__["b"])(Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__[/* r */ "f"])(Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__["c"])(items))));
       
  8046 }
       
  8047 
       
  8048 function isItem(items, element) {
       
  8049   return items === null || items === void 0 ? void 0 : items.some(function (item) {
       
  8050     return !!element && item.ref.current === element;
       
  8051   });
       
  8052 }
       
  8053 
       
  8054 var useComposite = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
       
  8055   name: "Composite",
       
  8056   compose: [_Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_10__[/* useTabbable */ "a"]],
       
  8057   useState: _CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__[/* u */ "g"],
       
  8058   useOptions: function useOptions(options) {
       
  8059     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, options), {}, {
       
  8060       currentId: Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__[/* g */ "e"])(options)
       
  8061     });
       
  8062   },
       
  8063   useProps: function useProps(options, _ref) {
       
  8064     var htmlRef = _ref.ref,
       
  8065         htmlOnFocus = _ref.onFocus,
       
  8066         htmlOnBlur = _ref.onBlur,
       
  8067         htmlOnKeyDown = _ref.onKeyDown,
       
  8068         htmlOnKeyUp = _ref.onKeyUp,
       
  8069         htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref, ["ref", "onFocus", "onBlur", "onKeyDown", "onKeyUp"]);
       
  8070 
       
  8071     var ref = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(null);
       
  8072     var currentItem = Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__[/* f */ "d"])(options.items, options.currentId);
       
  8073     var previousItem = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(undefined);
       
  8074     var onFocusRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlOnFocus);
       
  8075     var onBlurRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlOnBlur); // IE 11 doesn't support event.relatedTarget, so we use the active element
       
  8076     // ref instead.
       
  8077 
       
  8078     var activeElementRef = isIE11$1 ? useActiveElementRef(ref) : undefined;
       
  8079     Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
       
  8080       var element = ref.current;
       
  8081 
       
  8082       if (!element) {
       
  8083          false ? undefined : void 0;
       
  8084         return;
       
  8085       }
       
  8086 
       
  8087       if (options.unstable_moves && !currentItem) {
       
  8088         // If composite.move(null) has been called, the composite container
       
  8089         // will receive focus.
       
  8090         element.focus();
       
  8091       }
       
  8092     }, [options.unstable_moves, currentItem]);
       
  8093     var onKeyDown = useKeyboardEventProxy(options.unstable_virtual, currentItem, htmlOnKeyDown);
       
  8094     var onKeyUp = useKeyboardEventProxy(options.unstable_virtual, currentItem, htmlOnKeyUp);
       
  8095     var onFocus = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
       
  8096       var _onFocusRef$current2;
       
  8097 
       
  8098       if (options.unstable_virtual) {
       
  8099         // IE11 doesn't support event.relatedTarget, so we use the active
       
  8100         // element ref instead.
       
  8101         var previousActiveElement = (activeElementRef === null || activeElementRef === void 0 ? void 0 : activeElementRef.current) || event.relatedTarget;
       
  8102         var previousActiveElementWasItem = isItem(options.items, previousActiveElement);
       
  8103 
       
  8104         if (Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__[/* isSelfTarget */ "a"])(event) && !previousActiveElementWasItem) {
       
  8105           var _onFocusRef$current, _currentItem$ref$curr;
       
  8106 
       
  8107           // This means that the composite element has been focused while the
       
  8108           // composite item has not. For example, by clicking on the
       
  8109           // composite element without touching any item, or by tabbing into
       
  8110           // the composite element. In this case, we want to trigger focus on
       
  8111           // the item, just like it would happen with roving tabindex.
       
  8112           // When it receives focus, the composite item will put focus back
       
  8113           // on the composite element, in which case hasItemWithFocus will be
       
  8114           // true.
       
  8115           (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event);
       
  8116           currentItem === null || currentItem === void 0 ? void 0 : (_currentItem$ref$curr = currentItem.ref.current) === null || _currentItem$ref$curr === void 0 ? void 0 : _currentItem$ref$curr.focus();
       
  8117           return;
       
  8118         }
       
  8119 
       
  8120         if (previousActiveElementWasItem) {
       
  8121           // Composite has been focused as a result of an item receiving
       
  8122           // focus. The composite item will move focus back to the composite
       
  8123           // container. In this case, we don't want to propagate this
       
  8124           // additional event nor call the onFocus handler passed to
       
  8125           // <Composite onFocus={...} /> (htmlOnFocus). Unless users add DOM
       
  8126           // event handlers to the composite element directly, this will be
       
  8127           // like this event has never existed.
       
  8128           event.stopPropagation();
       
  8129           return;
       
  8130         }
       
  8131       } else if (Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__[/* isSelfTarget */ "a"])(event)) {
       
  8132         var _options$setCurrentId;
       
  8133 
       
  8134         // When the roving tabindex composite gets intentionally focused (for
       
  8135         // example, by clicking directly on it, and not on an item), we make
       
  8136         // sure to set the current id to null (which means the composite
       
  8137         // itself is focused).
       
  8138         (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, null);
       
  8139       }
       
  8140 
       
  8141       (_onFocusRef$current2 = onFocusRef.current) === null || _onFocusRef$current2 === void 0 ? void 0 : _onFocusRef$current2.call(onFocusRef, event);
       
  8142     }, [options.unstable_virtual, options.items, currentItem, options.setCurrentId]);
       
  8143     var onBlur = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
       
  8144       var _onBlurRef$current;
       
  8145 
       
  8146       // When virtual is set to true, we move focus from the composite
       
  8147       // container (this component) to the composite item that is being
       
  8148       // selected. Then we move focus back to the composite container. This
       
  8149       // is so we can provide the same API as the roving tabindex method,
       
  8150       // which means people can attach onFocus/onBlur handlers on the
       
  8151       // CompositeItem component regardless of whether it's virtual or not.
       
  8152       // This sequence of blurring and focusing items and composite may be
       
  8153       // confusing, so we ignore intermediate focus and blurs by stopping its
       
  8154       // propagation and not calling the passed onBlur handler (htmlOnBlur).
       
  8155       if (options.unstable_virtual) {
       
  8156         var targetIsItem = isItem(options.items, event.target);
       
  8157         var nextActiveElement = getNextActiveElementOnBlur(event);
       
  8158         var nextActiveElementIsItem = isItem(options.items, nextActiveElement);
       
  8159 
       
  8160         if (Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__[/* isSelfTarget */ "a"])(event) && nextActiveElementIsItem) {
       
  8161           var _previousItem$current;
       
  8162 
       
  8163           // This is an intermediate blur event: blurring the composite
       
  8164           // container to focus an item (nextActiveElement). We ignore this
       
  8165           // event.
       
  8166           if ((_previousItem$current = previousItem.current) === null || _previousItem$current === void 0 ? void 0 : _previousItem$current.ref.current) {
       
  8167             // If there's a previous active item we fire a blur event on it
       
  8168             // so it will work just like if it had DOM focus before (like when
       
  8169             // using roving tabindex).
       
  8170             Object(reakit_utils_fireEvent__WEBPACK_IMPORTED_MODULE_14__[/* fireEvent */ "a"])(previousItem.current.ref.current, "blur", event);
       
  8171           }
       
  8172 
       
  8173           previousItem.current = currentItem;
       
  8174           event.stopPropagation();
       
  8175           return;
       
  8176         }
       
  8177 
       
  8178         if (!targetIsItem) {
       
  8179           // If target is another thing (probably something outside of the
       
  8180           // composite container), we don't ignore the event, but we should
       
  8181           // reset the previousItem reference.
       
  8182           if (currentItem === null || currentItem === void 0 ? void 0 : currentItem.ref.current) {
       
  8183             Object(reakit_utils_fireEvent__WEBPACK_IMPORTED_MODULE_14__[/* fireEvent */ "a"])(currentItem.ref.current, "blur", event);
       
  8184           }
       
  8185 
       
  8186           previousItem.current = undefined;
       
  8187         } else {
       
  8188           previousItem.current = currentItem;
       
  8189         }
       
  8190       }
       
  8191 
       
  8192       (_onBlurRef$current = onBlurRef.current) === null || _onBlurRef$current === void 0 ? void 0 : _onBlurRef$current.call(onBlurRef, event);
       
  8193     }, [options.unstable_virtual, options.items, currentItem]);
       
  8194     var onMove = Object(react__WEBPACK_IMPORTED_MODULE_4__["useMemo"])(function () {
       
  8195       return Object(reakit_utils_createOnKeyDown__WEBPACK_IMPORTED_MODULE_12__[/* createOnKeyDown */ "a"])({
       
  8196         onKeyDown: onKeyDown,
       
  8197         stopPropagation: true,
       
  8198         shouldKeyDown: function shouldKeyDown(event) {
       
  8199           return Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__[/* isSelfTarget */ "a"])(event) && options.currentId === null;
       
  8200         },
       
  8201         keyMap: function keyMap() {
       
  8202           var _options$groups;
       
  8203 
       
  8204           var isVertical = options.orientation !== "horizontal";
       
  8205           var isHorizontal = options.orientation !== "vertical";
       
  8206           var isGrid = !!((_options$groups = options.groups) === null || _options$groups === void 0 ? void 0 : _options$groups.length);
       
  8207 
       
  8208           var up = function up() {
       
  8209             if (isGrid) {
       
  8210               var item = findFirstEnabledItemInTheLastRow(options.items);
       
  8211 
       
  8212               if (item === null || item === void 0 ? void 0 : item.id) {
       
  8213                 var _options$move;
       
  8214 
       
  8215                 (_options$move = options.move) === null || _options$move === void 0 ? void 0 : _options$move.call(options, item.id);
       
  8216               }
       
  8217             } else {
       
  8218               var _options$last;
       
  8219 
       
  8220               (_options$last = options.last) === null || _options$last === void 0 ? void 0 : _options$last.call(options);
       
  8221             }
       
  8222           };
       
  8223 
       
  8224           var first = options.first && function () {
       
  8225             return options.first();
       
  8226           };
       
  8227 
       
  8228           var last = options.last && function () {
       
  8229             return options.last();
       
  8230           };
       
  8231 
       
  8232           return {
       
  8233             ArrowUp: (isGrid || isVertical) && up,
       
  8234             ArrowRight: (isGrid || isHorizontal) && first,
       
  8235             ArrowDown: (isGrid || isVertical) && first,
       
  8236             ArrowLeft: (isGrid || isHorizontal) && last,
       
  8237             Home: first,
       
  8238             End: last,
       
  8239             PageUp: first,
       
  8240             PageDown: last
       
  8241           };
       
  8242         }
       
  8243       });
       
  8244     }, [onKeyDown, options.currentId, options.orientation, options.groups, options.items, options.move, options.last, options.first]);
       
  8245     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
       
  8246       ref: Object(reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__[/* useForkRef */ "a"])(ref, htmlRef),
       
  8247       id: options.baseId,
       
  8248       onFocus: onFocus,
       
  8249       onBlur: onBlur,
       
  8250       onKeyDown: onMove,
       
  8251       onKeyUp: onKeyUp,
       
  8252       "aria-activedescendant": options.unstable_virtual ? (currentItem === null || currentItem === void 0 ? void 0 : currentItem.id) || undefined : undefined
       
  8253     }, htmlProps);
       
  8254   },
       
  8255   useComposeProps: function useComposeProps(options, htmlProps) {
       
  8256     htmlProps = Object(_Box_Box_js__WEBPACK_IMPORTED_MODULE_3__[/* useBox */ "a"])(options, htmlProps, true);
       
  8257     var tabbableHTMLProps = Object(_Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_10__[/* useTabbable */ "a"])(options, htmlProps, true);
       
  8258 
       
  8259     if (options.unstable_virtual || options.currentId === null) {
       
  8260       // Composite will only be tabbable by default if the focus is managed
       
  8261       // using aria-activedescendant, which requires DOM focus on the container
       
  8262       // element (the composite)
       
  8263       return tabbableHTMLProps;
       
  8264     }
       
  8265 
       
  8266     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, htmlProps), {}, {
       
  8267       ref: tabbableHTMLProps.ref
       
  8268     });
       
  8269   }
       
  8270 });
       
  8271 var Composite = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
       
  8272   as: "div",
       
  8273   useHook: useComposite,
       
  8274   useCreateElement: function useCreateElement$1(type, props, children) {
       
  8275      false ? undefined : void 0;
       
  8276      false ? undefined : void 0;
       
  8277     return Object(reakit_system_useCreateElement__WEBPACK_IMPORTED_MODULE_11__[/* useCreateElement */ "a"])(type, props, children);
       
  8278   }
       
  8279 });
       
  8280 
       
  8281 
       
  8282 
       
  8283 
       
  8284 /***/ }),
       
  8285 /* 120 */
       
  8286 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  8287 
       
  8288 "use strict";
       
  8289 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CompositeItem; });
       
  8290 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return useCompositeItem; });
       
  8291 /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
       
  8292 /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
       
  8293 /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
       
  8294 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
       
  8295 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
       
  8296 /* harmony import */ var reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63);
       
  8297 /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80);
       
  8298 /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46);
       
  8299 /* harmony import */ var reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(53);
       
  8300 /* harmony import */ var reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(69);
       
  8301 /* harmony import */ var reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(72);
       
  8302 /* harmony import */ var reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(71);
       
  8303 /* harmony import */ var _Clickable_Clickable_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84);
       
  8304 /* harmony import */ var reakit_utils_createOnKeyDown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(82);
       
  8305 /* harmony import */ var reakit_utils_getDocument__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(47);
       
  8306 /* harmony import */ var _CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(51);
       
  8307 /* harmony import */ var _Id_Id_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(93);
       
  8308 /* harmony import */ var reakit_utils_isTextField__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(95);
       
  8309 /* harmony import */ var _setTextFieldValue_78ab5d56_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(96);
       
  8310 
       
  8311 
       
  8312 
       
  8313 
       
  8314 
       
  8315 
       
  8316 
       
  8317 
       
  8318 
       
  8319 
       
  8320 
       
  8321 
       
  8322 
       
  8323 
       
  8324 
       
  8325 
       
  8326 
       
  8327 
       
  8328 
       
  8329 
       
  8330 
       
  8331 
       
  8332 
       
  8333 
       
  8334 
       
  8335 
       
  8336 
       
  8337 
       
  8338 
       
  8339 function getWidget(itemElement) {
       
  8340   return itemElement.querySelector("[data-composite-item-widget]");
       
  8341 }
       
  8342 
       
  8343 function useItem(options) {
       
  8344   return Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () {
       
  8345     var _options$items;
       
  8346 
       
  8347     return (_options$items = options.items) === null || _options$items === void 0 ? void 0 : _options$items.find(function (item) {
       
  8348       return options.id && item.id === options.id;
       
  8349     });
       
  8350   }, [options.items, options.id]);
       
  8351 }
       
  8352 
       
  8353 function targetIsAnotherItem(event, items) {
       
  8354   if (Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__[/* isSelfTarget */ "a"])(event)) return false;
       
  8355 
       
  8356   for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(items), _step; !(_step = _iterator()).done;) {
       
  8357     var item = _step.value;
       
  8358 
       
  8359     if (item.ref.current === event.target) {
       
  8360       return true;
       
  8361     }
       
  8362   }
       
  8363 
       
  8364   return false;
       
  8365 }
       
  8366 
       
  8367 var useCompositeItem = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
       
  8368   name: "CompositeItem",
       
  8369   compose: [_Clickable_Clickable_js__WEBPACK_IMPORTED_MODULE_11__[/* useClickable */ "a"], _Id_Id_js__WEBPACK_IMPORTED_MODULE_15__[/* unstable_useId */ "a"]],
       
  8370   useState: _CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_14__[/* u */ "g"],
       
  8371   propsAreEqual: function propsAreEqual(prev, next) {
       
  8372     if (!next.id || prev.id !== next.id) {
       
  8373       return _Clickable_Clickable_js__WEBPACK_IMPORTED_MODULE_11__[/* useClickable */ "a"].unstable_propsAreEqual(prev, next);
       
  8374     }
       
  8375 
       
  8376     var prevCurrentId = prev.currentId,
       
  8377         prevMoves = prev.unstable_moves,
       
  8378         prevProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(prev, ["currentId", "unstable_moves"]);
       
  8379 
       
  8380     var nextCurrentId = next.currentId,
       
  8381         nextMoves = next.unstable_moves,
       
  8382         nextProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(next, ["currentId", "unstable_moves"]);
       
  8383 
       
  8384     if (nextCurrentId !== prevCurrentId) {
       
  8385       if (next.id === nextCurrentId || next.id === prevCurrentId) {
       
  8386         return false;
       
  8387       }
       
  8388     } else if (prevMoves !== nextMoves) {
       
  8389       return false;
       
  8390     }
       
  8391 
       
  8392     return _Clickable_Clickable_js__WEBPACK_IMPORTED_MODULE_11__[/* useClickable */ "a"].unstable_propsAreEqual(prevProps, nextProps);
       
  8393   },
       
  8394   useOptions: function useOptions(options) {
       
  8395     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, options), {}, {
       
  8396       id: options.id,
       
  8397       currentId: Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_14__[/* g */ "e"])(options),
       
  8398       unstable_clickOnSpace: options.unstable_hasActiveWidget ? false : options.unstable_clickOnSpace
       
  8399     });
       
  8400   },
       
  8401   useProps: function useProps(options, _ref) {
       
  8402     var _options$items2;
       
  8403 
       
  8404     var htmlRef = _ref.ref,
       
  8405         _ref$tabIndex = _ref.tabIndex,
       
  8406         htmlTabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
       
  8407         htmlOnFocus = _ref.onFocus,
       
  8408         htmlOnBlur = _ref.onBlur,
       
  8409         htmlOnKeyDown = _ref.onKeyDown,
       
  8410         htmlOnClick = _ref.onClick,
       
  8411         htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref, ["ref", "tabIndex", "onFocus", "onBlur", "onKeyDown", "onClick"]);
       
  8412 
       
  8413     var ref = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(null);
       
  8414     var id = options.id;
       
  8415     var trulyDisabled = options.disabled && !options.focusable;
       
  8416     var isCurrentItem = options.currentId === id;
       
  8417     var isCurrentItemRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(isCurrentItem);
       
  8418     var hasFocusedComposite = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(false);
       
  8419     var item = useItem(options);
       
  8420     var onFocusRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnFocus);
       
  8421     var onBlurRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnBlur);
       
  8422     var onKeyDownRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnKeyDown);
       
  8423     var onClickRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnClick);
       
  8424     var shouldTabIndex = !options.unstable_virtual && !options.unstable_hasActiveWidget && isCurrentItem || // We don't want to set tabIndex="-1" when using CompositeItem as a
       
  8425     // standalone component, without state props.
       
  8426     !((_options$items2 = options.items) === null || _options$items2 === void 0 ? void 0 : _options$items2.length);
       
  8427     Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(function () {
       
  8428       var _options$registerItem;
       
  8429 
       
  8430       if (!id) return undefined;
       
  8431       (_options$registerItem = options.registerItem) === null || _options$registerItem === void 0 ? void 0 : _options$registerItem.call(options, {
       
  8432         id: id,
       
  8433         ref: ref,
       
  8434         disabled: !!trulyDisabled
       
  8435       });
       
  8436       return function () {
       
  8437         var _options$unregisterIt;
       
  8438 
       
  8439         (_options$unregisterIt = options.unregisterItem) === null || _options$unregisterIt === void 0 ? void 0 : _options$unregisterIt.call(options, id);
       
  8440       };
       
  8441     }, [id, trulyDisabled, options.registerItem, options.unregisterItem]);
       
  8442     Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(function () {
       
  8443       var element = ref.current;
       
  8444 
       
  8445       if (!element) {
       
  8446          false ? undefined : void 0;
       
  8447         return;
       
  8448       } // `moves` will be incremented whenever next, previous, up, down, first,
       
  8449       // last or move have been called. This means that the composite item will
       
  8450       // be focused whenever some of these functions are called. We're using
       
  8451       // isCurrentItemRef instead of isCurrentItem because we don't want to
       
  8452       // focus the item if isCurrentItem changes (and options.moves doesn't).
       
  8453 
       
  8454 
       
  8455       if (options.unstable_moves && isCurrentItemRef.current) {
       
  8456         element.focus();
       
  8457       }
       
  8458     }, [options.unstable_moves]);
       
  8459     var onFocus = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
       
  8460       var _onFocusRef$current, _options$setCurrentId;
       
  8461 
       
  8462       (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event);
       
  8463       if (event.defaultPrevented) return;
       
  8464       if (Object(reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_9__[/* isPortalEvent */ "a"])(event)) return;
       
  8465       if (!id) return;
       
  8466       if (targetIsAnotherItem(event, options.items)) return;
       
  8467       (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, id); // When using aria-activedescendant, we want to make sure that the
       
  8468       // composite container receives focus, not the composite item.
       
  8469       // But we don't want to do this if the target is another focusable
       
  8470       // element inside the composite item, such as CompositeItemWidget.
       
  8471 
       
  8472       if (options.unstable_virtual && options.baseId && Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__[/* isSelfTarget */ "a"])(event)) {
       
  8473         var target = event.target;
       
  8474         var composite = Object(reakit_utils_getDocument__WEBPACK_IMPORTED_MODULE_13__[/* getDocument */ "a"])(target).getElementById(options.baseId);
       
  8475 
       
  8476         if (composite) {
       
  8477           hasFocusedComposite.current = true;
       
  8478           Object(reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_10__[/* ensureFocus */ "a"])(composite);
       
  8479         }
       
  8480       }
       
  8481     }, [id, options.items, options.setCurrentId, options.unstable_virtual, options.baseId]);
       
  8482     var onBlur = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
       
  8483       var _onBlurRef$current;
       
  8484 
       
  8485       if (options.unstable_virtual) {
       
  8486         if (hasFocusedComposite.current) {
       
  8487           // When hasFocusedComposite is true, composite has been focused
       
  8488           // right after focusing this item. This is an intermediate blur
       
  8489           // event, so we ignore it.
       
  8490           hasFocusedComposite.current = false;
       
  8491           event.preventDefault();
       
  8492           event.stopPropagation();
       
  8493           return;
       
  8494         }
       
  8495       }
       
  8496 
       
  8497       (_onBlurRef$current = onBlurRef.current) === null || _onBlurRef$current === void 0 ? void 0 : _onBlurRef$current.call(onBlurRef, event);
       
  8498     }, [options.unstable_virtual]);
       
  8499     var onCharacterKeyDown = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
       
  8500       var _onKeyDownRef$current;
       
  8501 
       
  8502       (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event);
       
  8503       if (!Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__[/* isSelfTarget */ "a"])(event)) return;
       
  8504 
       
  8505       if (event.key.length === 1 && event.key !== " ") {
       
  8506         var widget = getWidget(event.currentTarget);
       
  8507 
       
  8508         if (widget && Object(reakit_utils_isTextField__WEBPACK_IMPORTED_MODULE_16__[/* isTextField */ "a"])(widget)) {
       
  8509           widget.focus();
       
  8510           var key = event.key; // Using RAF here because otherwise the key will be added twice
       
  8511           // to the input when using roving tabindex
       
  8512 
       
  8513           window.requestAnimationFrame(function () {
       
  8514             Object(_setTextFieldValue_78ab5d56_js__WEBPACK_IMPORTED_MODULE_17__[/* s */ "a"])(widget, key);
       
  8515           });
       
  8516         }
       
  8517       }
       
  8518     }, []);
       
  8519     var onKeyDown = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () {
       
  8520       return Object(reakit_utils_createOnKeyDown__WEBPACK_IMPORTED_MODULE_12__[/* createOnKeyDown */ "a"])({
       
  8521         onKeyDown: onCharacterKeyDown,
       
  8522         stopPropagation: true,
       
  8523         // We don't want to listen to focusable elements inside the composite
       
  8524         // item, such as a CompositeItemWidget.
       
  8525         shouldKeyDown: reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__[/* isSelfTarget */ "a"],
       
  8526         keyMap: function keyMap() {
       
  8527           // `options.orientation` can also be undefined, which means that
       
  8528           // both `isVertical` and `isHorizontal` will be `true`.
       
  8529           var isVertical = options.orientation !== "horizontal";
       
  8530           var isHorizontal = options.orientation !== "vertical";
       
  8531           var isGrid = !!(item === null || item === void 0 ? void 0 : item.groupId);
       
  8532 
       
  8533           var Delete = function Delete(event) {
       
  8534             var widget = getWidget(event.currentTarget);
       
  8535 
       
  8536             if (widget && Object(reakit_utils_isTextField__WEBPACK_IMPORTED_MODULE_16__[/* isTextField */ "a"])(widget)) {
       
  8537               Object(_setTextFieldValue_78ab5d56_js__WEBPACK_IMPORTED_MODULE_17__[/* s */ "a"])(widget, "");
       
  8538             }
       
  8539           };
       
  8540 
       
  8541           var up = options.up && function () {
       
  8542             return options.up();
       
  8543           };
       
  8544 
       
  8545           var next = options.next && function () {
       
  8546             return options.next();
       
  8547           };
       
  8548 
       
  8549           var down = options.down && function () {
       
  8550             return options.down();
       
  8551           };
       
  8552 
       
  8553           var previous = options.previous && function () {
       
  8554             return options.previous();
       
  8555           };
       
  8556 
       
  8557           return {
       
  8558             Delete: Delete,
       
  8559             Backspace: Delete,
       
  8560             ArrowUp: (isGrid || isVertical) && up,
       
  8561             ArrowRight: (isGrid || isHorizontal) && next,
       
  8562             ArrowDown: (isGrid || isVertical) && down,
       
  8563             ArrowLeft: (isGrid || isHorizontal) && previous,
       
  8564             Home: function Home(event) {
       
  8565               if (!isGrid || event.ctrlKey) {
       
  8566                 var _options$first;
       
  8567 
       
  8568                 (_options$first = options.first) === null || _options$first === void 0 ? void 0 : _options$first.call(options);
       
  8569               } else {
       
  8570                 var _options$previous;
       
  8571 
       
  8572                 (_options$previous = options.previous) === null || _options$previous === void 0 ? void 0 : _options$previous.call(options, true);
       
  8573               }
       
  8574             },
       
  8575             End: function End(event) {
       
  8576               if (!isGrid || event.ctrlKey) {
       
  8577                 var _options$last;
       
  8578 
       
  8579                 (_options$last = options.last) === null || _options$last === void 0 ? void 0 : _options$last.call(options);
       
  8580               } else {
       
  8581                 var _options$next;
       
  8582 
       
  8583                 (_options$next = options.next) === null || _options$next === void 0 ? void 0 : _options$next.call(options, true);
       
  8584               }
       
  8585             },
       
  8586             PageUp: function PageUp() {
       
  8587               if (isGrid) {
       
  8588                 var _options$up;
       
  8589 
       
  8590                 (_options$up = options.up) === null || _options$up === void 0 ? void 0 : _options$up.call(options, true);
       
  8591               } else {
       
  8592                 var _options$first2;
       
  8593 
       
  8594                 (_options$first2 = options.first) === null || _options$first2 === void 0 ? void 0 : _options$first2.call(options);
       
  8595               }
       
  8596             },
       
  8597             PageDown: function PageDown() {
       
  8598               if (isGrid) {
       
  8599                 var _options$down;
       
  8600 
       
  8601                 (_options$down = options.down) === null || _options$down === void 0 ? void 0 : _options$down.call(options, true);
       
  8602               } else {
       
  8603                 var _options$last2;
       
  8604 
       
  8605                 (_options$last2 = options.last) === null || _options$last2 === void 0 ? void 0 : _options$last2.call(options);
       
  8606               }
       
  8607             }
       
  8608           };
       
  8609         }
       
  8610       });
       
  8611     }, [onCharacterKeyDown, options.orientation, item, options.up, options.next, options.down, options.previous, options.first, options.last]);
       
  8612     var onClick = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
       
  8613       var _onClickRef$current;
       
  8614 
       
  8615       (_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event);
       
  8616       if (event.defaultPrevented) return;
       
  8617       var element = event.currentTarget;
       
  8618       var widget = getWidget(element);
       
  8619 
       
  8620       if (widget && !Object(reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_8__[/* hasFocusWithin */ "a"])(widget)) {
       
  8621         // If there's a widget inside the composite item, we make sure it's
       
  8622         // focused when pressing enter, space or clicking on the composite item.
       
  8623         widget.focus();
       
  8624       }
       
  8625     }, []);
       
  8626     return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
       
  8627       ref: Object(reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[/* useForkRef */ "a"])(ref, htmlRef),
       
  8628       id: id,
       
  8629       tabIndex: shouldTabIndex ? htmlTabIndex : -1,
       
  8630       "aria-selected": options.unstable_virtual && isCurrentItem ? true : undefined,
       
  8631       onFocus: onFocus,
       
  8632       onBlur: onBlur,
       
  8633       onKeyDown: onKeyDown,
       
  8634       onClick: onClick
       
  8635     }, htmlProps);
       
  8636   }
       
  8637 });
       
  8638 var CompositeItem = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
       
  8639   as: "button",
       
  8640   memo: true,
       
  8641   useHook: useCompositeItem
       
  8642 });
       
  8643 
       
  8644 
       
  8645 
       
  8646 
       
  8647 /***/ }),
       
  8648 /* 121 */,
       
  8649 /* 122 */
       
  8650 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  8651 
       
  8652 "use strict";
       
  8653 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createEvent; });
       
  8654 /* harmony import */ var _getDocument_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47);
       
  8655 
       
  8656 
       
  8657 /**
       
  8658  * Creates an `Event` in a way that also works on IE 11.
       
  8659  *
       
  8660  * @example
       
  8661  * import { createEvent } from "reakit-utils";
       
  8662  *
       
  8663  * const el = document.getElementById("id");
       
  8664  * el.dispatchEvent(createEvent(el, "blur", { bubbles: false }));
       
  8665  */
       
  8666 
       
  8667 function createEvent(element, type, eventInit) {
       
  8668   var _eventInit, _eventInit2;
       
  8669 
       
  8670   if (eventInit === void 0) {
       
  8671     eventInit = {};
       
  8672   }
       
  8673 
       
  8674   if (typeof Event === "function") {
       
  8675     return new Event(type, eventInit);
       
  8676   } // IE 11 doesn't support Event constructors
       
  8677 
       
  8678 
       
  8679   var event = Object(_getDocument_js__WEBPACK_IMPORTED_MODULE_0__[/* getDocument */ "a"])(element).createEvent("Event");
       
  8680   event.initEvent(type, (_eventInit = eventInit) === null || _eventInit === void 0 ? void 0 : _eventInit.bubbles, (_eventInit2 = eventInit) === null || _eventInit2 === void 0 ? void 0 : _eventInit2.cancelable);
       
  8681   return event;
       
  8682 }
       
  8683 
       
  8684 
       
  8685 
       
  8686 
       
  8687 /***/ }),
       
  8688 /* 123 */
       
  8689 /***/ (function(module, exports, __webpack_require__) {
       
  8690 
       
  8691 "use strict";
       
  8692 
       
  8693 
       
  8694 module.exports = __webpack_require__(178);
       
  8695 
       
  8696 /***/ }),
       
  8697 /* 124 */,
       
  8698 /* 125 */
       
  8699 /***/ (function(module, exports) {
       
  8700 
       
  8701 (function() { module.exports = this["wp"]["shortcode"]; }());
       
  8702 
       
  8703 /***/ }),
       
  8704 /* 126 */,
       
  8705 /* 127 */,
       
  8706 /* 128 */,
       
  8707 /* 129 */,
       
  8708 /* 130 */,
       
  8709 /* 131 */,
       
  8710 /* 132 */,
       
  8711 /* 133 */,
       
  8712 /* 134 */,
       
  8713 /* 135 */,
       
  8714 /* 136 */,
       
  8715 /* 137 */
       
  8716 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  8717 
       
  8718 "use strict";
       
  8719 /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
       
  8720 /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
       
  8721 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
       
  8722 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
       
  8723 
       
  8724 
       
  8725 
       
  8726 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; }
       
  8727 
       
  8728 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; }
       
  8729 
  5247 
  8730 /**
  5248 /**
  8731  * WordPress dependencies
  5249  * WordPress dependencies
  8732  */
  5250  */
  8733  // Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
  5251 
  8734 
  5252 const grid = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  8735 /* eslint-disable jsdoc/valid-types */
       
  8736 
       
  8737 /** @typedef {{icon: JSX.Element, size?: number} & import('react').ComponentPropsWithoutRef<'SVG'>} IconProps */
       
  8738 
       
  8739 /* eslint-enable jsdoc/valid-types */
       
  8740 
       
  8741 /**
       
  8742  * Return an SVG icon.
       
  8743  *
       
  8744  * @param {IconProps} props icon is the SVG component to render
       
  8745  *                          size is a number specifiying the icon size in pixels
       
  8746  *                          Other props will be passed to wrapped SVG component
       
  8747  *
       
  8748  * @return {JSX.Element}  Icon component
       
  8749  */
       
  8750 
       
  8751 function Icon(_ref) {
       
  8752   var icon = _ref.icon,
       
  8753       _ref$size = _ref.size,
       
  8754       size = _ref$size === void 0 ? 24 : _ref$size,
       
  8755       props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]);
       
  8756 
       
  8757   return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({
       
  8758     width: size,
       
  8759     height: size
       
  8760   }, props));
       
  8761 }
       
  8762 
       
  8763 /* harmony default export */ __webpack_exports__["a"] = (Icon);
       
  8764 
       
  8765 
       
  8766 /***/ }),
       
  8767 /* 138 */
       
  8768 /***/ (function(module, exports, __webpack_require__) {
       
  8769 
       
  8770 "use strict";
       
  8771 /**
       
  8772  * Copyright (c) 2013-present, Facebook, Inc.
       
  8773  *
       
  8774  * This source code is licensed under the MIT license found in the
       
  8775  * LICENSE file in the root directory of this source tree.
       
  8776  */
       
  8777 
       
  8778 
       
  8779 
       
  8780 var ReactPropTypesSecret = __webpack_require__(139);
       
  8781 
       
  8782 function emptyFunction() {}
       
  8783 function emptyFunctionWithReset() {}
       
  8784 emptyFunctionWithReset.resetWarningCache = emptyFunction;
       
  8785 
       
  8786 module.exports = function() {
       
  8787   function shim(props, propName, componentName, location, propFullName, secret) {
       
  8788     if (secret === ReactPropTypesSecret) {
       
  8789       // It is still safe when called from React.
       
  8790       return;
       
  8791     }
       
  8792     var err = new Error(
       
  8793       'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
       
  8794       'Use PropTypes.checkPropTypes() to call them. ' +
       
  8795       'Read more at http://fb.me/use-check-prop-types'
       
  8796     );
       
  8797     err.name = 'Invariant Violation';
       
  8798     throw err;
       
  8799   };
       
  8800   shim.isRequired = shim;
       
  8801   function getShim() {
       
  8802     return shim;
       
  8803   };
       
  8804   // Important!
       
  8805   // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
       
  8806   var ReactPropTypes = {
       
  8807     array: shim,
       
  8808     bool: shim,
       
  8809     func: shim,
       
  8810     number: shim,
       
  8811     object: shim,
       
  8812     string: shim,
       
  8813     symbol: shim,
       
  8814 
       
  8815     any: shim,
       
  8816     arrayOf: getShim,
       
  8817     element: shim,
       
  8818     elementType: shim,
       
  8819     instanceOf: getShim,
       
  8820     node: shim,
       
  8821     objectOf: getShim,
       
  8822     oneOf: getShim,
       
  8823     oneOfType: getShim,
       
  8824     shape: getShim,
       
  8825     exact: getShim,
       
  8826 
       
  8827     checkPropTypes: emptyFunctionWithReset,
       
  8828     resetWarningCache: emptyFunction
       
  8829   };
       
  8830 
       
  8831   ReactPropTypes.PropTypes = ReactPropTypes;
       
  8832 
       
  8833   return ReactPropTypes;
       
  8834 };
       
  8835 
       
  8836 
       
  8837 /***/ }),
       
  8838 /* 139 */
       
  8839 /***/ (function(module, exports, __webpack_require__) {
       
  8840 
       
  8841 "use strict";
       
  8842 /**
       
  8843  * Copyright (c) 2013-present, Facebook, Inc.
       
  8844  *
       
  8845  * This source code is licensed under the MIT license found in the
       
  8846  * LICENSE file in the root directory of this source tree.
       
  8847  */
       
  8848 
       
  8849 
       
  8850 
       
  8851 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
       
  8852 
       
  8853 module.exports = ReactPropTypesSecret;
       
  8854 
       
  8855 
       
  8856 /***/ }),
       
  8857 /* 140 */,
       
  8858 /* 141 */,
       
  8859 /* 142 */,
       
  8860 /* 143 */,
       
  8861 /* 144 */,
       
  8862 /* 145 */
       
  8863 /***/ (function(module, exports) {
       
  8864 
       
  8865 function _inheritsLoose(subClass, superClass) {
       
  8866   subClass.prototype = Object.create(superClass.prototype);
       
  8867   subClass.prototype.constructor = subClass;
       
  8868   subClass.__proto__ = superClass;
       
  8869 }
       
  8870 
       
  8871 module.exports = _inheritsLoose;
       
  8872 
       
  8873 /***/ }),
       
  8874 /* 146 */
       
  8875 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  8876 
       
  8877 "use strict";
       
  8878 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toArray; });
       
  8879 /* harmony import */ var _arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
       
  8880 /* harmony import */ var _iterableToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35);
       
  8881 /* harmony import */ var _unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29);
       
  8882 /* harmony import */ var _nonIterableRest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39);
       
  8883 
       
  8884 
       
  8885 
       
  8886 
       
  8887 function _toArray(arr) {
       
  8888   return Object(_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(arr) || Object(_iterableToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(arr) || Object(_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(arr) || Object(_nonIterableRest__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])();
       
  8889 }
       
  8890 
       
  8891 /***/ }),
       
  8892 /* 147 */
       
  8893 /***/ (function(module, exports) {
       
  8894 
       
  8895 (function() { module.exports = this["wp"]["wordcount"]; }());
       
  8896 
       
  8897 /***/ }),
       
  8898 /* 148 */,
       
  8899 /* 149 */,
       
  8900 /* 150 */,
       
  8901 /* 151 */,
       
  8902 /* 152 */,
       
  8903 /* 153 */
       
  8904 /***/ (function(module, exports) {
       
  8905 
       
  8906 (function() { module.exports = this["wp"]["tokenList"]; }());
       
  8907 
       
  8908 /***/ }),
       
  8909 /* 154 */
       
  8910 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  8911 
       
  8912 "use strict";
       
  8913 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
  8914 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
  8915 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
  8916 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
  8917 
       
  8918 
       
  8919 /**
       
  8920  * WordPress dependencies
       
  8921  */
       
  8922 
       
  8923 var close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  8924   xmlns: "http://www.w3.org/2000/svg",
  5253   xmlns: "http://www.w3.org/2000/svg",
  8925   viewBox: "0 0 24 24"
  5254   viewBox: "0 0 24 24"
  8926 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  5255 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  8927   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"
  5256   d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",
       
  5257   fillRule: "evenodd",
       
  5258   clipRule: "evenodd"
  8928 }));
  5259 }));
  8929 /* harmony default export */ __webpack_exports__["a"] = (close);
  5260 /* harmony default export */ __webpack_exports__["a"] = (grid);
  8930 
  5261 
  8931 
  5262 
  8932 /***/ }),
  5263 /***/ }),
  8933 /* 155 */
  5264 
       
  5265 /***/ "bWcr":
  8934 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5266 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8935 
  5267 
  8936 "use strict";
  5268 "use strict";
  8937 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  5269 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  8938 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  5270 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  8939 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
  5271 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  8940 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  5272 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  8941 
  5273 
  8942 
  5274 
  8943 /**
  5275 /**
  8944  * WordPress dependencies
  5276  * WordPress dependencies
  8945  */
  5277  */
  8946 
  5278 
  8947 var check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  5279 const closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  8948   xmlns: "http://www.w3.org/2000/svg",
  5280   xmlns: "http://www.w3.org/2000/svg",
  8949   viewBox: "0 0 24 24"
  5281   viewBox: "0 0 24 24"
  8950 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  5282 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  8951   d: "M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"
  5283   d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
  8952 }));
  5284 }));
  8953 /* harmony default export */ __webpack_exports__["a"] = (check);
  5285 /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
  8954 
  5286 
  8955 
  5287 
  8956 /***/ }),
  5288 /***/ }),
  8957 /* 156 */,
  5289 
  8958 /* 157 */,
  5290 /***/ "btIw":
  8959 /* 158 */,
  5291 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8960 /* 159 */,
  5292 
  8961 /* 160 */,
  5293 "use strict";
  8962 /* 161 */,
  5294 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  8963 /* 162 */,
  5295 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  8964 /* 163 */,
  5296 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  8965 /* 164 */,
  5297 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  8966 /* 165 */
  5298 
       
  5299 
       
  5300 /**
       
  5301  * WordPress dependencies
       
  5302  */
       
  5303 
       
  5304 const keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
  5305   xmlns: "http://www.w3.org/2000/svg",
       
  5306   viewBox: "-2 -2 24 24"
       
  5307 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
  5308   d: "M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"
       
  5309 }));
       
  5310 /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn);
       
  5311 
       
  5312 
       
  5313 /***/ }),
       
  5314 
       
  5315 /***/ "cDcd":
  8967 /***/ (function(module, exports) {
  5316 /***/ (function(module, exports) {
  8968 
  5317 
  8969 if (typeof Object.create === 'function') {
  5318 (function() { module.exports = window["React"]; }());
  8970   // implementation from standard node.js 'util' module
       
  8971   module.exports = function inherits(ctor, superCtor) {
       
  8972     if (superCtor) {
       
  8973       ctor.super_ = superCtor
       
  8974       ctor.prototype = Object.create(superCtor.prototype, {
       
  8975         constructor: {
       
  8976           value: ctor,
       
  8977           enumerable: false,
       
  8978           writable: true,
       
  8979           configurable: true
       
  8980         }
       
  8981       })
       
  8982     }
       
  8983   };
       
  8984 } else {
       
  8985   // old school shim for old browsers
       
  8986   module.exports = function inherits(ctor, superCtor) {
       
  8987     if (superCtor) {
       
  8988       ctor.super_ = superCtor
       
  8989       var TempCtor = function () {}
       
  8990       TempCtor.prototype = superCtor.prototype
       
  8991       ctor.prototype = new TempCtor()
       
  8992       ctor.prototype.constructor = ctor
       
  8993     }
       
  8994   }
       
  8995 }
       
  8996 
       
  8997 
  5319 
  8998 /***/ }),
  5320 /***/ }),
  8999 /* 166 */,
  5321 
  9000 /* 167 */,
  5322 /***/ "cGtP":
  9001 /* 168 */,
  5323 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9002 /* 169 */,
       
  9003 /* 170 */
       
  9004 /***/ (function(module, exports) {
       
  9005 
       
  9006 function _extends() {
       
  9007   module.exports = _extends = Object.assign || function (target) {
       
  9008     for (var i = 1; i < arguments.length; i++) {
       
  9009       var source = arguments[i];
       
  9010 
       
  9011       for (var key in source) {
       
  9012         if (Object.prototype.hasOwnProperty.call(source, key)) {
       
  9013           target[key] = source[key];
       
  9014         }
       
  9015       }
       
  9016     }
       
  9017 
       
  9018     return target;
       
  9019   };
       
  9020 
       
  9021   return _extends.apply(this, arguments);
       
  9022 }
       
  9023 
       
  9024 module.exports = _extends;
       
  9025 
       
  9026 /***/ }),
       
  9027 /* 171 */
       
  9028 /***/ (function(module, exports) {
       
  9029 
       
  9030 function _objectWithoutPropertiesLoose(source, excluded) {
       
  9031   if (source == null) return {};
       
  9032   var target = {};
       
  9033   var sourceKeys = Object.keys(source);
       
  9034   var key, i;
       
  9035 
       
  9036   for (i = 0; i < sourceKeys.length; i++) {
       
  9037     key = sourceKeys[i];
       
  9038     if (excluded.indexOf(key) >= 0) continue;
       
  9039     target[key] = source[key];
       
  9040   }
       
  9041 
       
  9042   return target;
       
  9043 }
       
  9044 
       
  9045 module.exports = _objectWithoutPropertiesLoose;
       
  9046 
       
  9047 /***/ }),
       
  9048 /* 172 */
       
  9049 /***/ (function(module, exports) {
       
  9050 
       
  9051 function _assertThisInitialized(self) {
       
  9052   if (self === void 0) {
       
  9053     throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
       
  9054   }
       
  9055 
       
  9056   return self;
       
  9057 }
       
  9058 
       
  9059 module.exports = _assertThisInitialized;
       
  9060 
       
  9061 /***/ }),
       
  9062 /* 173 */
       
  9063 /***/ (function(module, exports, __webpack_require__) {
       
  9064 
  5324 
  9065 "use strict";
  5325 "use strict";
  9066 
  5326 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  9067 var __extends = (this && this.__extends) || (function () {
       
  9068     var extendStatics = Object.setPrototypeOf ||
       
  9069         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
       
  9070         function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
       
  9071     return function (d, b) {
       
  9072         extendStatics(d, b);
       
  9073         function __() { this.constructor = d; }
       
  9074         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
       
  9075     };
       
  9076 })();
       
  9077 var __assign = (this && this.__assign) || Object.assign || function(t) {
       
  9078     for (var s, i = 1, n = arguments.length; i < n; i++) {
       
  9079         s = arguments[i];
       
  9080         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
       
  9081             t[p] = s[p];
       
  9082     }
       
  9083     return t;
       
  9084 };
       
  9085 var __rest = (this && this.__rest) || function (s, e) {
       
  9086     var t = {};
       
  9087     for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
       
  9088         t[p] = s[p];
       
  9089     if (s != null && typeof Object.getOwnPropertySymbols === "function")
       
  9090         for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
       
  9091             t[p[i]] = s[p[i]];
       
  9092     return t;
       
  9093 };
       
  9094 exports.__esModule = true;
       
  9095 var React = __webpack_require__(13);
       
  9096 var PropTypes = __webpack_require__(28);
       
  9097 var autosize = __webpack_require__(174);
       
  9098 var _getLineHeight = __webpack_require__(175);
       
  9099 var getLineHeight = _getLineHeight;
       
  9100 var UPDATE = 'autosize:update';
       
  9101 var DESTROY = 'autosize:destroy';
       
  9102 var RESIZED = 'autosize:resized';
       
  9103 /**
       
  9104  * A light replacement for built-in textarea component
       
  9105  * which automaticaly adjusts its height to match the content
       
  9106  */
       
  9107 var TextareaAutosize = /** @class */ (function (_super) {
       
  9108     __extends(TextareaAutosize, _super);
       
  9109     function TextareaAutosize() {
       
  9110         var _this = _super !== null && _super.apply(this, arguments) || this;
       
  9111         _this.state = {
       
  9112             lineHeight: null
       
  9113         };
       
  9114         _this.dispatchEvent = function (EVENT_TYPE) {
       
  9115             var event = document.createEvent('Event');
       
  9116             event.initEvent(EVENT_TYPE, true, false);
       
  9117             _this.textarea.dispatchEvent(event);
       
  9118         };
       
  9119         _this.updateLineHeight = function () {
       
  9120             _this.setState({
       
  9121                 lineHeight: getLineHeight(_this.textarea)
       
  9122             });
       
  9123         };
       
  9124         _this.onChange = function (e) {
       
  9125             var onChange = _this.props.onChange;
       
  9126             _this.currentValue = e.currentTarget.value;
       
  9127             onChange && onChange(e);
       
  9128         };
       
  9129         _this.saveDOMNodeRef = function (ref) {
       
  9130             var innerRef = _this.props.innerRef;
       
  9131             if (innerRef) {
       
  9132                 innerRef(ref);
       
  9133             }
       
  9134             _this.textarea = ref;
       
  9135         };
       
  9136         _this.getLocals = function () {
       
  9137             var _a = _this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef"]), lineHeight = _a.state.lineHeight, saveDOMNodeRef = _a.saveDOMNodeRef;
       
  9138             var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
       
  9139             return __assign({}, props, { saveDOMNodeRef: saveDOMNodeRef, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, onChange: _this.onChange });
       
  9140         };
       
  9141         return _this;
       
  9142     }
       
  9143     TextareaAutosize.prototype.componentDidMount = function () {
       
  9144         var _this = this;
       
  9145         var _a = this.props, onResize = _a.onResize, maxRows = _a.maxRows;
       
  9146         if (typeof maxRows === 'number') {
       
  9147             this.updateLineHeight();
       
  9148         }
       
  9149         /*
       
  9150           the defer is needed to:
       
  9151             - force "autosize" to activate the scrollbar when this.props.maxRows is passed
       
  9152             - support StyledComponents (see #71)
       
  9153         */
       
  9154         setTimeout(function () { return autosize(_this.textarea); });
       
  9155         if (onResize) {
       
  9156             this.textarea.addEventListener(RESIZED, onResize);
       
  9157         }
       
  9158     };
       
  9159     TextareaAutosize.prototype.componentWillUnmount = function () {
       
  9160         var onResize = this.props.onResize;
       
  9161         if (onResize) {
       
  9162             this.textarea.removeEventListener(RESIZED, onResize);
       
  9163         }
       
  9164         this.dispatchEvent(DESTROY);
       
  9165     };
       
  9166     TextareaAutosize.prototype.render = function () {
       
  9167         var _a = this.getLocals(), children = _a.children, saveDOMNodeRef = _a.saveDOMNodeRef, locals = __rest(_a, ["children", "saveDOMNodeRef"]);
       
  9168         return (React.createElement("textarea", __assign({}, locals, { ref: saveDOMNodeRef }), children));
       
  9169     };
       
  9170     TextareaAutosize.prototype.componentDidUpdate = function (prevProps) {
       
  9171         if (this.props.value !== this.currentValue || this.props.rows !== prevProps.rows) {
       
  9172             this.dispatchEvent(UPDATE);
       
  9173         }
       
  9174     };
       
  9175     TextareaAutosize.defaultProps = {
       
  9176         rows: 1
       
  9177     };
       
  9178     TextareaAutosize.propTypes = {
       
  9179         rows: PropTypes.number,
       
  9180         maxRows: PropTypes.number,
       
  9181         onResize: PropTypes.func,
       
  9182         innerRef: PropTypes.func
       
  9183     };
       
  9184     return TextareaAutosize;
       
  9185 }(React.Component));
       
  9186 exports["default"] = TextareaAutosize;
       
  9187 
       
  9188 
       
  9189 /***/ }),
       
  9190 /* 174 */
       
  9191 /***/ (function(module, exports, __webpack_require__) {
       
  9192 
       
  9193 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
       
  9194 	autosize 4.0.2
       
  9195 	license: MIT
       
  9196 	http://www.jacklmoore.com/autosize
       
  9197 */
       
  9198 (function (global, factory) {
       
  9199 	if (true) {
       
  9200 		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
       
  9201 				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
       
  9202 				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
       
  9203 				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
       
  9204 	} else { var mod; }
       
  9205 })(this, function (module, exports) {
       
  9206 	'use strict';
       
  9207 
       
  9208 	var map = typeof Map === "function" ? new Map() : function () {
       
  9209 		var keys = [];
       
  9210 		var values = [];
       
  9211 
       
  9212 		return {
       
  9213 			has: function has(key) {
       
  9214 				return keys.indexOf(key) > -1;
       
  9215 			},
       
  9216 			get: function get(key) {
       
  9217 				return values[keys.indexOf(key)];
       
  9218 			},
       
  9219 			set: function set(key, value) {
       
  9220 				if (keys.indexOf(key) === -1) {
       
  9221 					keys.push(key);
       
  9222 					values.push(value);
       
  9223 				}
       
  9224 			},
       
  9225 			delete: function _delete(key) {
       
  9226 				var index = keys.indexOf(key);
       
  9227 				if (index > -1) {
       
  9228 					keys.splice(index, 1);
       
  9229 					values.splice(index, 1);
       
  9230 				}
       
  9231 			}
       
  9232 		};
       
  9233 	}();
       
  9234 
       
  9235 	var createEvent = function createEvent(name) {
       
  9236 		return new Event(name, { bubbles: true });
       
  9237 	};
       
  9238 	try {
       
  9239 		new Event('test');
       
  9240 	} catch (e) {
       
  9241 		// IE does not support `new Event()`
       
  9242 		createEvent = function createEvent(name) {
       
  9243 			var evt = document.createEvent('Event');
       
  9244 			evt.initEvent(name, true, false);
       
  9245 			return evt;
       
  9246 		};
       
  9247 	}
       
  9248 
       
  9249 	function assign(ta) {
       
  9250 		if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
       
  9251 
       
  9252 		var heightOffset = null;
       
  9253 		var clientWidth = null;
       
  9254 		var cachedHeight = null;
       
  9255 
       
  9256 		function init() {
       
  9257 			var style = window.getComputedStyle(ta, null);
       
  9258 
       
  9259 			if (style.resize === 'vertical') {
       
  9260 				ta.style.resize = 'none';
       
  9261 			} else if (style.resize === 'both') {
       
  9262 				ta.style.resize = 'horizontal';
       
  9263 			}
       
  9264 
       
  9265 			if (style.boxSizing === 'content-box') {
       
  9266 				heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
       
  9267 			} else {
       
  9268 				heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
       
  9269 			}
       
  9270 			// Fix when a textarea is not on document body and heightOffset is Not a Number
       
  9271 			if (isNaN(heightOffset)) {
       
  9272 				heightOffset = 0;
       
  9273 			}
       
  9274 
       
  9275 			update();
       
  9276 		}
       
  9277 
       
  9278 		function changeOverflow(value) {
       
  9279 			{
       
  9280 				// Chrome/Safari-specific fix:
       
  9281 				// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
       
  9282 				// made available by removing the scrollbar. The following forces the necessary text reflow.
       
  9283 				var width = ta.style.width;
       
  9284 				ta.style.width = '0px';
       
  9285 				// Force reflow:
       
  9286 				/* jshint ignore:start */
       
  9287 				ta.offsetWidth;
       
  9288 				/* jshint ignore:end */
       
  9289 				ta.style.width = width;
       
  9290 			}
       
  9291 
       
  9292 			ta.style.overflowY = value;
       
  9293 		}
       
  9294 
       
  9295 		function getParentOverflows(el) {
       
  9296 			var arr = [];
       
  9297 
       
  9298 			while (el && el.parentNode && el.parentNode instanceof Element) {
       
  9299 				if (el.parentNode.scrollTop) {
       
  9300 					arr.push({
       
  9301 						node: el.parentNode,
       
  9302 						scrollTop: el.parentNode.scrollTop
       
  9303 					});
       
  9304 				}
       
  9305 				el = el.parentNode;
       
  9306 			}
       
  9307 
       
  9308 			return arr;
       
  9309 		}
       
  9310 
       
  9311 		function resize() {
       
  9312 			if (ta.scrollHeight === 0) {
       
  9313 				// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
       
  9314 				return;
       
  9315 			}
       
  9316 
       
  9317 			var overflows = getParentOverflows(ta);
       
  9318 			var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
       
  9319 
       
  9320 			ta.style.height = '';
       
  9321 			ta.style.height = ta.scrollHeight + heightOffset + 'px';
       
  9322 
       
  9323 			// used to check if an update is actually necessary on window.resize
       
  9324 			clientWidth = ta.clientWidth;
       
  9325 
       
  9326 			// prevents scroll-position jumping
       
  9327 			overflows.forEach(function (el) {
       
  9328 				el.node.scrollTop = el.scrollTop;
       
  9329 			});
       
  9330 
       
  9331 			if (docTop) {
       
  9332 				document.documentElement.scrollTop = docTop;
       
  9333 			}
       
  9334 		}
       
  9335 
       
  9336 		function update() {
       
  9337 			resize();
       
  9338 
       
  9339 			var styleHeight = Math.round(parseFloat(ta.style.height));
       
  9340 			var computed = window.getComputedStyle(ta, null);
       
  9341 
       
  9342 			// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
       
  9343 			var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
       
  9344 
       
  9345 			// The actual height not matching the style height (set via the resize method) indicates that 
       
  9346 			// the max-height has been exceeded, in which case the overflow should be allowed.
       
  9347 			if (actualHeight < styleHeight) {
       
  9348 				if (computed.overflowY === 'hidden') {
       
  9349 					changeOverflow('scroll');
       
  9350 					resize();
       
  9351 					actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
       
  9352 				}
       
  9353 			} else {
       
  9354 				// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
       
  9355 				if (computed.overflowY !== 'hidden') {
       
  9356 					changeOverflow('hidden');
       
  9357 					resize();
       
  9358 					actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
       
  9359 				}
       
  9360 			}
       
  9361 
       
  9362 			if (cachedHeight !== actualHeight) {
       
  9363 				cachedHeight = actualHeight;
       
  9364 				var evt = createEvent('autosize:resized');
       
  9365 				try {
       
  9366 					ta.dispatchEvent(evt);
       
  9367 				} catch (err) {
       
  9368 					// Firefox will throw an error on dispatchEvent for a detached element
       
  9369 					// https://bugzilla.mozilla.org/show_bug.cgi?id=889376
       
  9370 				}
       
  9371 			}
       
  9372 		}
       
  9373 
       
  9374 		var pageResize = function pageResize() {
       
  9375 			if (ta.clientWidth !== clientWidth) {
       
  9376 				update();
       
  9377 			}
       
  9378 		};
       
  9379 
       
  9380 		var destroy = function (style) {
       
  9381 			window.removeEventListener('resize', pageResize, false);
       
  9382 			ta.removeEventListener('input', update, false);
       
  9383 			ta.removeEventListener('keyup', update, false);
       
  9384 			ta.removeEventListener('autosize:destroy', destroy, false);
       
  9385 			ta.removeEventListener('autosize:update', update, false);
       
  9386 
       
  9387 			Object.keys(style).forEach(function (key) {
       
  9388 				ta.style[key] = style[key];
       
  9389 			});
       
  9390 
       
  9391 			map.delete(ta);
       
  9392 		}.bind(ta, {
       
  9393 			height: ta.style.height,
       
  9394 			resize: ta.style.resize,
       
  9395 			overflowY: ta.style.overflowY,
       
  9396 			overflowX: ta.style.overflowX,
       
  9397 			wordWrap: ta.style.wordWrap
       
  9398 		});
       
  9399 
       
  9400 		ta.addEventListener('autosize:destroy', destroy, false);
       
  9401 
       
  9402 		// IE9 does not fire onpropertychange or oninput for deletions,
       
  9403 		// so binding to onkeyup to catch most of those events.
       
  9404 		// There is no way that I know of to detect something like 'cut' in IE9.
       
  9405 		if ('onpropertychange' in ta && 'oninput' in ta) {
       
  9406 			ta.addEventListener('keyup', update, false);
       
  9407 		}
       
  9408 
       
  9409 		window.addEventListener('resize', pageResize, false);
       
  9410 		ta.addEventListener('input', update, false);
       
  9411 		ta.addEventListener('autosize:update', update, false);
       
  9412 		ta.style.overflowX = 'hidden';
       
  9413 		ta.style.wordWrap = 'break-word';
       
  9414 
       
  9415 		map.set(ta, {
       
  9416 			destroy: destroy,
       
  9417 			update: update
       
  9418 		});
       
  9419 
       
  9420 		init();
       
  9421 	}
       
  9422 
       
  9423 	function destroy(ta) {
       
  9424 		var methods = map.get(ta);
       
  9425 		if (methods) {
       
  9426 			methods.destroy();
       
  9427 		}
       
  9428 	}
       
  9429 
       
  9430 	function update(ta) {
       
  9431 		var methods = map.get(ta);
       
  9432 		if (methods) {
       
  9433 			methods.update();
       
  9434 		}
       
  9435 	}
       
  9436 
       
  9437 	var autosize = null;
       
  9438 
       
  9439 	// Do nothing in Node.js environment and IE8 (or lower)
       
  9440 	if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
       
  9441 		autosize = function autosize(el) {
       
  9442 			return el;
       
  9443 		};
       
  9444 		autosize.destroy = function (el) {
       
  9445 			return el;
       
  9446 		};
       
  9447 		autosize.update = function (el) {
       
  9448 			return el;
       
  9449 		};
       
  9450 	} else {
       
  9451 		autosize = function autosize(el, options) {
       
  9452 			if (el) {
       
  9453 				Array.prototype.forEach.call(el.length ? el : [el], function (x) {
       
  9454 					return assign(x, options);
       
  9455 				});
       
  9456 			}
       
  9457 			return el;
       
  9458 		};
       
  9459 		autosize.destroy = function (el) {
       
  9460 			if (el) {
       
  9461 				Array.prototype.forEach.call(el.length ? el : [el], destroy);
       
  9462 			}
       
  9463 			return el;
       
  9464 		};
       
  9465 		autosize.update = function (el) {
       
  9466 			if (el) {
       
  9467 				Array.prototype.forEach.call(el.length ? el : [el], update);
       
  9468 			}
       
  9469 			return el;
       
  9470 		};
       
  9471 	}
       
  9472 
       
  9473 	exports.default = autosize;
       
  9474 	module.exports = exports['default'];
       
  9475 });
       
  9476 
       
  9477 /***/ }),
       
  9478 /* 175 */
       
  9479 /***/ (function(module, exports, __webpack_require__) {
       
  9480 
       
  9481 // Load in dependencies
       
  9482 var computedStyle = __webpack_require__(176);
       
  9483 
       
  9484 /**
       
  9485  * Calculate the `line-height` of a given node
       
  9486  * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
       
  9487  * @returns {Number} `line-height` of the element in pixels
       
  9488  */
       
  9489 function lineHeight(node) {
       
  9490   // Grab the line-height via style
       
  9491   var lnHeightStr = computedStyle(node, 'line-height');
       
  9492   var lnHeight = parseFloat(lnHeightStr, 10);
       
  9493 
       
  9494   // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
       
  9495   if (lnHeightStr === lnHeight + '') {
       
  9496     // Save the old lineHeight style and update the em unit to the element
       
  9497     var _lnHeightStyle = node.style.lineHeight;
       
  9498     node.style.lineHeight = lnHeightStr + 'em';
       
  9499 
       
  9500     // Calculate the em based height
       
  9501     lnHeightStr = computedStyle(node, 'line-height');
       
  9502     lnHeight = parseFloat(lnHeightStr, 10);
       
  9503 
       
  9504     // Revert the lineHeight style
       
  9505     if (_lnHeightStyle) {
       
  9506       node.style.lineHeight = _lnHeightStyle;
       
  9507     } else {
       
  9508       delete node.style.lineHeight;
       
  9509     }
       
  9510   }
       
  9511 
       
  9512   // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
       
  9513   // DEV: `em` units are converted to `pt` in IE6
       
  9514   // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
       
  9515   if (lnHeightStr.indexOf('pt') !== -1) {
       
  9516     lnHeight *= 4;
       
  9517     lnHeight /= 3;
       
  9518   // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
       
  9519   } else if (lnHeightStr.indexOf('mm') !== -1) {
       
  9520     lnHeight *= 96;
       
  9521     lnHeight /= 25.4;
       
  9522   // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
       
  9523   } else if (lnHeightStr.indexOf('cm') !== -1) {
       
  9524     lnHeight *= 96;
       
  9525     lnHeight /= 2.54;
       
  9526   // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
       
  9527   } else if (lnHeightStr.indexOf('in') !== -1) {
       
  9528     lnHeight *= 96;
       
  9529   // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
       
  9530   } else if (lnHeightStr.indexOf('pc') !== -1) {
       
  9531     lnHeight *= 16;
       
  9532   }
       
  9533 
       
  9534   // Continue our computation
       
  9535   lnHeight = Math.round(lnHeight);
       
  9536 
       
  9537   // If the line-height is "normal", calculate by font-size
       
  9538   if (lnHeightStr === 'normal') {
       
  9539     // Create a temporary node
       
  9540     var nodeName = node.nodeName;
       
  9541     var _node = document.createElement(nodeName);
       
  9542     _node.innerHTML = '&nbsp;';
       
  9543 
       
  9544     // If we have a text area, reset it to only 1 row
       
  9545     // https://github.com/twolfson/line-height/issues/4
       
  9546     if (nodeName.toUpperCase() === 'TEXTAREA') {
       
  9547       _node.setAttribute('rows', '1');
       
  9548     }
       
  9549 
       
  9550     // Set the font-size of the element
       
  9551     var fontSizeStr = computedStyle(node, 'font-size');
       
  9552     _node.style.fontSize = fontSizeStr;
       
  9553 
       
  9554     // Remove default padding/border which can affect offset height
       
  9555     // https://github.com/twolfson/line-height/issues/4
       
  9556     // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
       
  9557     _node.style.padding = '0px';
       
  9558     _node.style.border = '0px';
       
  9559 
       
  9560     // Append it to the body
       
  9561     var body = document.body;
       
  9562     body.appendChild(_node);
       
  9563 
       
  9564     // Assume the line height of the element is the height
       
  9565     var height = _node.offsetHeight;
       
  9566     lnHeight = height;
       
  9567 
       
  9568     // Remove our child from the DOM
       
  9569     body.removeChild(_node);
       
  9570   }
       
  9571 
       
  9572   // Return the calculated height
       
  9573   return lnHeight;
       
  9574 }
       
  9575 
       
  9576 // Export lineHeight
       
  9577 module.exports = lineHeight;
       
  9578 
       
  9579 
       
  9580 /***/ }),
       
  9581 /* 176 */
       
  9582 /***/ (function(module, exports) {
       
  9583 
       
  9584 // This code has been refactored for 140 bytes
       
  9585 // You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
       
  9586 var computedStyle = function (el, prop, getComputedStyle) {
       
  9587   getComputedStyle = window.getComputedStyle;
       
  9588 
       
  9589   // In one fell swoop
       
  9590   return (
       
  9591     // If we have getComputedStyle
       
  9592     getComputedStyle ?
       
  9593       // Query it
       
  9594       // TODO: From CSS-Query notes, we might need (node, null) for FF
       
  9595       getComputedStyle(el) :
       
  9596 
       
  9597     // Otherwise, we are in IE and use currentStyle
       
  9598       el.currentStyle
       
  9599   )[
       
  9600     // Switch to camelCase for CSSOM
       
  9601     // DEV: Grabbed from jQuery
       
  9602     // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
       
  9603     // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
       
  9604     prop.replace(/-(\w)/gi, function (word, letter) {
       
  9605       return letter.toUpperCase();
       
  9606     })
       
  9607   ];
       
  9608 };
       
  9609 
       
  9610 module.exports = computedStyle;
       
  9611 
       
  9612 
       
  9613 /***/ }),
       
  9614 /* 177 */
       
  9615 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  9616 
       
  9617 "use strict";
       
  9618 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
  9619 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  5327 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  9620 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
  5328 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  9621 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  5329 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  9622 
  5330 
  9623 
  5331 
  9624 /**
  5332 /**
  9625  * WordPress dependencies
  5333  * WordPress dependencies
  9626  */
  5334  */
  9627 
  5335 
  9628 var closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  5336 const search = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  9629   xmlns: "http://www.w3.org/2000/svg",
  5337   xmlns: "http://www.w3.org/2000/svg",
  9630   viewBox: "0 0 24 24"
  5338   viewBox: "0 0 24 24"
  9631 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  5339 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  9632   d: "M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"
  5340   d: "M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"
  9633 }));
  5341 }));
  9634 /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
  5342 /* harmony default export */ __webpack_exports__["a"] = (search);
  9635 
  5343 
  9636 
  5344 
  9637 /***/ }),
  5345 /***/ }),
  9638 /* 178 */
  5346 
  9639 /***/ (function(module, exports, __webpack_require__) {
  5347 /***/ "cjQ8":
       
  5348 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9640 
  5349 
  9641 "use strict";
  5350 "use strict";
  9642 
  5351 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  9643 
       
  9644 var util = __webpack_require__(179);
       
  9645 
       
  9646 function scrollIntoView(elem, container, config) {
       
  9647   config = config || {};
       
  9648   // document 归一化到 window
       
  9649   if (container.nodeType === 9) {
       
  9650     container = util.getWindow(container);
       
  9651   }
       
  9652 
       
  9653   var allowHorizontalScroll = config.allowHorizontalScroll;
       
  9654   var onlyScrollIfNeeded = config.onlyScrollIfNeeded;
       
  9655   var alignWithTop = config.alignWithTop;
       
  9656   var alignWithLeft = config.alignWithLeft;
       
  9657   var offsetTop = config.offsetTop || 0;
       
  9658   var offsetLeft = config.offsetLeft || 0;
       
  9659   var offsetBottom = config.offsetBottom || 0;
       
  9660   var offsetRight = config.offsetRight || 0;
       
  9661 
       
  9662   allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll;
       
  9663 
       
  9664   var isWin = util.isWindow(container);
       
  9665   var elemOffset = util.offset(elem);
       
  9666   var eh = util.outerHeight(elem);
       
  9667   var ew = util.outerWidth(elem);
       
  9668   var containerOffset = undefined;
       
  9669   var ch = undefined;
       
  9670   var cw = undefined;
       
  9671   var containerScroll = undefined;
       
  9672   var diffTop = undefined;
       
  9673   var diffBottom = undefined;
       
  9674   var win = undefined;
       
  9675   var winScroll = undefined;
       
  9676   var ww = undefined;
       
  9677   var wh = undefined;
       
  9678 
       
  9679   if (isWin) {
       
  9680     win = container;
       
  9681     wh = util.height(win);
       
  9682     ww = util.width(win);
       
  9683     winScroll = {
       
  9684       left: util.scrollLeft(win),
       
  9685       top: util.scrollTop(win)
       
  9686     };
       
  9687     // elem 相对 container 可视视窗的距离
       
  9688     diffTop = {
       
  9689       left: elemOffset.left - winScroll.left - offsetLeft,
       
  9690       top: elemOffset.top - winScroll.top - offsetTop
       
  9691     };
       
  9692     diffBottom = {
       
  9693       left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight,
       
  9694       top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom
       
  9695     };
       
  9696     containerScroll = winScroll;
       
  9697   } else {
       
  9698     containerOffset = util.offset(container);
       
  9699     ch = container.clientHeight;
       
  9700     cw = container.clientWidth;
       
  9701     containerScroll = {
       
  9702       left: container.scrollLeft,
       
  9703       top: container.scrollTop
       
  9704     };
       
  9705     // elem 相对 container 可视视窗的距离
       
  9706     // 注意边框, offset 是边框到根节点
       
  9707     diffTop = {
       
  9708       left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft,
       
  9709       top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop
       
  9710     };
       
  9711     diffBottom = {
       
  9712       left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight,
       
  9713       top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom
       
  9714     };
       
  9715   }
       
  9716 
       
  9717   if (diffTop.top < 0 || diffBottom.top > 0) {
       
  9718     // 强制向上
       
  9719     if (alignWithTop === true) {
       
  9720       util.scrollTop(container, containerScroll.top + diffTop.top);
       
  9721     } else if (alignWithTop === false) {
       
  9722       util.scrollTop(container, containerScroll.top + diffBottom.top);
       
  9723     } else {
       
  9724       // 自动调整
       
  9725       if (diffTop.top < 0) {
       
  9726         util.scrollTop(container, containerScroll.top + diffTop.top);
       
  9727       } else {
       
  9728         util.scrollTop(container, containerScroll.top + diffBottom.top);
       
  9729       }
       
  9730     }
       
  9731   } else {
       
  9732     if (!onlyScrollIfNeeded) {
       
  9733       alignWithTop = alignWithTop === undefined ? true : !!alignWithTop;
       
  9734       if (alignWithTop) {
       
  9735         util.scrollTop(container, containerScroll.top + diffTop.top);
       
  9736       } else {
       
  9737         util.scrollTop(container, containerScroll.top + diffBottom.top);
       
  9738       }
       
  9739     }
       
  9740   }
       
  9741 
       
  9742   if (allowHorizontalScroll) {
       
  9743     if (diffTop.left < 0 || diffBottom.left > 0) {
       
  9744       // 强制向上
       
  9745       if (alignWithLeft === true) {
       
  9746         util.scrollLeft(container, containerScroll.left + diffTop.left);
       
  9747       } else if (alignWithLeft === false) {
       
  9748         util.scrollLeft(container, containerScroll.left + diffBottom.left);
       
  9749       } else {
       
  9750         // 自动调整
       
  9751         if (diffTop.left < 0) {
       
  9752           util.scrollLeft(container, containerScroll.left + diffTop.left);
       
  9753         } else {
       
  9754           util.scrollLeft(container, containerScroll.left + diffBottom.left);
       
  9755         }
       
  9756       }
       
  9757     } else {
       
  9758       if (!onlyScrollIfNeeded) {
       
  9759         alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft;
       
  9760         if (alignWithLeft) {
       
  9761           util.scrollLeft(container, containerScroll.left + diffTop.left);
       
  9762         } else {
       
  9763           util.scrollLeft(container, containerScroll.left + diffBottom.left);
       
  9764         }
       
  9765       }
       
  9766     }
       
  9767   }
       
  9768 }
       
  9769 
       
  9770 module.exports = scrollIntoView;
       
  9771 
       
  9772 /***/ }),
       
  9773 /* 179 */
       
  9774 /***/ (function(module, exports, __webpack_require__) {
       
  9775 
       
  9776 "use strict";
       
  9777 
       
  9778 
       
  9779 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; };
       
  9780 
       
  9781 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
       
  9782 
       
  9783 var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;
       
  9784 
       
  9785 function getClientPosition(elem) {
       
  9786   var box = undefined;
       
  9787   var x = undefined;
       
  9788   var y = undefined;
       
  9789   var doc = elem.ownerDocument;
       
  9790   var body = doc.body;
       
  9791   var docElem = doc && doc.documentElement;
       
  9792   // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式
       
  9793   box = elem.getBoundingClientRect();
       
  9794 
       
  9795   // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop
       
  9796   // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确
       
  9797   // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin
       
  9798 
       
  9799   x = box.left;
       
  9800   y = box.top;
       
  9801 
       
  9802   // In IE, most of the time, 2 extra pixels are added to the top and left
       
  9803   // due to the implicit 2-pixel inset border.  In IE6/7 quirks mode and
       
  9804   // IE6 standards mode, this border can be overridden by setting the
       
  9805   // document element's border to zero -- thus, we cannot rely on the
       
  9806   // offset always being 2 pixels.
       
  9807 
       
  9808   // In quirks mode, the offset can be determined by querying the body's
       
  9809   // clientLeft/clientTop, but in standards mode, it is found by querying
       
  9810   // the document element's clientLeft/clientTop.  Since we already called
       
  9811   // getClientBoundingRect we have already forced a reflow, so it is not
       
  9812   // too expensive just to query them all.
       
  9813 
       
  9814   // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的
       
  9815   // 窗口边框标准是设 documentElement ,quirks 时设置 body
       
  9816   // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去
       
  9817   // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置
       
  9818   // 标准 ie 下 docElem.clientTop 就是 border-top
       
  9819   // ie7 html 即窗口边框改变不了。永远为 2
       
  9820   // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0
       
  9821 
       
  9822   x -= docElem.clientLeft || body.clientLeft || 0;
       
  9823   y -= docElem.clientTop || body.clientTop || 0;
       
  9824 
       
  9825   return {
       
  9826     left: x,
       
  9827     top: y
       
  9828   };
       
  9829 }
       
  9830 
       
  9831 function getScroll(w, top) {
       
  9832   var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
       
  9833   var method = 'scroll' + (top ? 'Top' : 'Left');
       
  9834   if (typeof ret !== 'number') {
       
  9835     var d = w.document;
       
  9836     // ie6,7,8 standard mode
       
  9837     ret = d.documentElement[method];
       
  9838     if (typeof ret !== 'number') {
       
  9839       // quirks mode
       
  9840       ret = d.body[method];
       
  9841     }
       
  9842   }
       
  9843   return ret;
       
  9844 }
       
  9845 
       
  9846 function getScrollLeft(w) {
       
  9847   return getScroll(w);
       
  9848 }
       
  9849 
       
  9850 function getScrollTop(w) {
       
  9851   return getScroll(w, true);
       
  9852 }
       
  9853 
       
  9854 function getOffset(el) {
       
  9855   var pos = getClientPosition(el);
       
  9856   var doc = el.ownerDocument;
       
  9857   var w = doc.defaultView || doc.parentWindow;
       
  9858   pos.left += getScrollLeft(w);
       
  9859   pos.top += getScrollTop(w);
       
  9860   return pos;
       
  9861 }
       
  9862 function _getComputedStyle(elem, name, computedStyle_) {
       
  9863   var val = '';
       
  9864   var d = elem.ownerDocument;
       
  9865   var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null);
       
  9866 
       
  9867   // https://github.com/kissyteam/kissy/issues/61
       
  9868   if (computedStyle) {
       
  9869     val = computedStyle.getPropertyValue(name) || computedStyle[name];
       
  9870   }
       
  9871 
       
  9872   return val;
       
  9873 }
       
  9874 
       
  9875 var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');
       
  9876 var RE_POS = /^(top|right|bottom|left)$/;
       
  9877 var CURRENT_STYLE = 'currentStyle';
       
  9878 var RUNTIME_STYLE = 'runtimeStyle';
       
  9879 var LEFT = 'left';
       
  9880 var PX = 'px';
       
  9881 
       
  9882 function _getComputedStyleIE(elem, name) {
       
  9883   // currentStyle maybe null
       
  9884   // http://msdn.microsoft.com/en-us/library/ms535231.aspx
       
  9885   var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];
       
  9886 
       
  9887   // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值
       
  9888   // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19
       
  9889   // 在 ie 下不对,需要直接用 offset 方式
       
  9890   // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了
       
  9891 
       
  9892   // From the awesome hack by Dean Edwards
       
  9893   // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
       
  9894   // If we're not dealing with a regular pixel number
       
  9895   // but a number that has a weird ending, we need to convert it to pixels
       
  9896   // exclude left right for relativity
       
  9897   if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {
       
  9898     // Remember the original values
       
  9899     var style = elem.style;
       
  9900     var left = style[LEFT];
       
  9901     var rsLeft = elem[RUNTIME_STYLE][LEFT];
       
  9902 
       
  9903     // prevent flashing of content
       
  9904     elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];
       
  9905 
       
  9906     // Put in the new values to get a computed value out
       
  9907     style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;
       
  9908     ret = style.pixelLeft + PX;
       
  9909 
       
  9910     // Revert the changed values
       
  9911     style[LEFT] = left;
       
  9912 
       
  9913     elem[RUNTIME_STYLE][LEFT] = rsLeft;
       
  9914   }
       
  9915   return ret === '' ? 'auto' : ret;
       
  9916 }
       
  9917 
       
  9918 var getComputedStyleX = undefined;
       
  9919 if (typeof window !== 'undefined') {
       
  9920   getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;
       
  9921 }
       
  9922 
       
  9923 function each(arr, fn) {
       
  9924   for (var i = 0; i < arr.length; i++) {
       
  9925     fn(arr[i]);
       
  9926   }
       
  9927 }
       
  9928 
       
  9929 function isBorderBoxFn(elem) {
       
  9930   return getComputedStyleX(elem, 'boxSizing') === 'border-box';
       
  9931 }
       
  9932 
       
  9933 var BOX_MODELS = ['margin', 'border', 'padding'];
       
  9934 var CONTENT_INDEX = -1;
       
  9935 var PADDING_INDEX = 2;
       
  9936 var BORDER_INDEX = 1;
       
  9937 var MARGIN_INDEX = 0;
       
  9938 
       
  9939 function swap(elem, options, callback) {
       
  9940   var old = {};
       
  9941   var style = elem.style;
       
  9942   var name = undefined;
       
  9943 
       
  9944   // Remember the old values, and insert the new ones
       
  9945   for (name in options) {
       
  9946     if (options.hasOwnProperty(name)) {
       
  9947       old[name] = style[name];
       
  9948       style[name] = options[name];
       
  9949     }
       
  9950   }
       
  9951 
       
  9952   callback.call(elem);
       
  9953 
       
  9954   // Revert the old values
       
  9955   for (name in options) {
       
  9956     if (options.hasOwnProperty(name)) {
       
  9957       style[name] = old[name];
       
  9958     }
       
  9959   }
       
  9960 }
       
  9961 
       
  9962 function getPBMWidth(elem, props, which) {
       
  9963   var value = 0;
       
  9964   var prop = undefined;
       
  9965   var j = undefined;
       
  9966   var i = undefined;
       
  9967   for (j = 0; j < props.length; j++) {
       
  9968     prop = props[j];
       
  9969     if (prop) {
       
  9970       for (i = 0; i < which.length; i++) {
       
  9971         var cssProp = undefined;
       
  9972         if (prop === 'border') {
       
  9973           cssProp = prop + which[i] + 'Width';
       
  9974         } else {
       
  9975           cssProp = prop + which[i];
       
  9976         }
       
  9977         value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;
       
  9978       }
       
  9979     }
       
  9980   }
       
  9981   return value;
       
  9982 }
       
  9983 
       
  9984 /**
       
  9985  * A crude way of determining if an object is a window
       
  9986  * @member util
       
  9987  */
       
  9988 function isWindow(obj) {
       
  9989   // must use == for ie8
       
  9990   /* eslint eqeqeq:0 */
       
  9991   return obj != null && obj == obj.window;
       
  9992 }
       
  9993 
       
  9994 var domUtils = {};
       
  9995 
       
  9996 each(['Width', 'Height'], function (name) {
       
  9997   domUtils['doc' + name] = function (refWin) {
       
  9998     var d = refWin.document;
       
  9999     return Math.max(
       
 10000     // firefox chrome documentElement.scrollHeight< body.scrollHeight
       
 10001     // ie standard mode : documentElement.scrollHeight> body.scrollHeight
       
 10002     d.documentElement['scroll' + name],
       
 10003     // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
       
 10004     d.body['scroll' + name], domUtils['viewport' + name](d));
       
 10005   };
       
 10006 
       
 10007   domUtils['viewport' + name] = function (win) {
       
 10008     // pc browser includes scrollbar in window.innerWidth
       
 10009     var prop = 'client' + name;
       
 10010     var doc = win.document;
       
 10011     var body = doc.body;
       
 10012     var documentElement = doc.documentElement;
       
 10013     var documentElementProp = documentElement[prop];
       
 10014     // 标准模式取 documentElement
       
 10015     // backcompat 取 body
       
 10016     return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;
       
 10017   };
       
 10018 });
       
 10019 
       
 10020 /*
       
 10021  得到元素的大小信息
       
 10022  @param elem
       
 10023  @param name
       
 10024  @param {String} [extra]  'padding' : (css width) + padding
       
 10025  'border' : (css width) + padding + border
       
 10026  'margin' : (css width) + padding + border + margin
       
 10027  */
       
 10028 function getWH(elem, name, extra) {
       
 10029   if (isWindow(elem)) {
       
 10030     return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);
       
 10031   } else if (elem.nodeType === 9) {
       
 10032     return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);
       
 10033   }
       
 10034   var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
       
 10035   var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;
       
 10036   var computedStyle = getComputedStyleX(elem);
       
 10037   var isBorderBox = isBorderBoxFn(elem, computedStyle);
       
 10038   var cssBoxValue = 0;
       
 10039   if (borderBoxValue == null || borderBoxValue <= 0) {
       
 10040     borderBoxValue = undefined;
       
 10041     // Fall back to computed then un computed css if necessary
       
 10042     cssBoxValue = getComputedStyleX(elem, name);
       
 10043     if (cssBoxValue == null || Number(cssBoxValue) < 0) {
       
 10044       cssBoxValue = elem.style[name] || 0;
       
 10045     }
       
 10046     // Normalize '', auto, and prepare for extra
       
 10047     cssBoxValue = parseFloat(cssBoxValue) || 0;
       
 10048   }
       
 10049   if (extra === undefined) {
       
 10050     extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
       
 10051   }
       
 10052   var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;
       
 10053   var val = borderBoxValue || cssBoxValue;
       
 10054   if (extra === CONTENT_INDEX) {
       
 10055     if (borderBoxValueOrIsBorderBox) {
       
 10056       return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);
       
 10057     }
       
 10058     return cssBoxValue;
       
 10059   }
       
 10060   if (borderBoxValueOrIsBorderBox) {
       
 10061     var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);
       
 10062     return val + (extra === BORDER_INDEX ? 0 : padding);
       
 10063   }
       
 10064   return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);
       
 10065 }
       
 10066 
       
 10067 var cssShow = {
       
 10068   position: 'absolute',
       
 10069   visibility: 'hidden',
       
 10070   display: 'block'
       
 10071 };
       
 10072 
       
 10073 // fix #119 : https://github.com/kissyteam/kissy/issues/119
       
 10074 function getWHIgnoreDisplay(elem) {
       
 10075   var val = undefined;
       
 10076   var args = arguments;
       
 10077   // in case elem is window
       
 10078   // elem.offsetWidth === undefined
       
 10079   if (elem.offsetWidth !== 0) {
       
 10080     val = getWH.apply(undefined, args);
       
 10081   } else {
       
 10082     swap(elem, cssShow, function () {
       
 10083       val = getWH.apply(undefined, args);
       
 10084     });
       
 10085   }
       
 10086   return val;
       
 10087 }
       
 10088 
       
 10089 function css(el, name, v) {
       
 10090   var value = v;
       
 10091   if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
       
 10092     for (var i in name) {
       
 10093       if (name.hasOwnProperty(i)) {
       
 10094         css(el, i, name[i]);
       
 10095       }
       
 10096     }
       
 10097     return undefined;
       
 10098   }
       
 10099   if (typeof value !== 'undefined') {
       
 10100     if (typeof value === 'number') {
       
 10101       value += 'px';
       
 10102     }
       
 10103     el.style[name] = value;
       
 10104     return undefined;
       
 10105   }
       
 10106   return getComputedStyleX(el, name);
       
 10107 }
       
 10108 
       
 10109 each(['width', 'height'], function (name) {
       
 10110   var first = name.charAt(0).toUpperCase() + name.slice(1);
       
 10111   domUtils['outer' + first] = function (el, includeMargin) {
       
 10112     return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
       
 10113   };
       
 10114   var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
       
 10115 
       
 10116   domUtils[name] = function (elem, val) {
       
 10117     if (val !== undefined) {
       
 10118       if (elem) {
       
 10119         var computedStyle = getComputedStyleX(elem);
       
 10120         var isBorderBox = isBorderBoxFn(elem);
       
 10121         if (isBorderBox) {
       
 10122           val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);
       
 10123         }
       
 10124         return css(elem, name, val);
       
 10125       }
       
 10126       return undefined;
       
 10127     }
       
 10128     return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);
       
 10129   };
       
 10130 });
       
 10131 
       
 10132 // 设置 elem 相对 elem.ownerDocument 的坐标
       
 10133 function setOffset(elem, offset) {
       
 10134   // set position first, in-case top/left are set even on static elem
       
 10135   if (css(elem, 'position') === 'static') {
       
 10136     elem.style.position = 'relative';
       
 10137   }
       
 10138 
       
 10139   var old = getOffset(elem);
       
 10140   var ret = {};
       
 10141   var current = undefined;
       
 10142   var key = undefined;
       
 10143 
       
 10144   for (key in offset) {
       
 10145     if (offset.hasOwnProperty(key)) {
       
 10146       current = parseFloat(css(elem, key)) || 0;
       
 10147       ret[key] = current + offset[key] - old[key];
       
 10148     }
       
 10149   }
       
 10150   css(elem, ret);
       
 10151 }
       
 10152 
       
 10153 module.exports = _extends({
       
 10154   getWindow: function getWindow(node) {
       
 10155     var doc = node.ownerDocument || node;
       
 10156     return doc.defaultView || doc.parentWindow;
       
 10157   },
       
 10158   offset: function offset(el, value) {
       
 10159     if (typeof value !== 'undefined') {
       
 10160       setOffset(el, value);
       
 10161     } else {
       
 10162       return getOffset(el);
       
 10163     }
       
 10164   },
       
 10165 
       
 10166   isWindow: isWindow,
       
 10167   each: each,
       
 10168   css: css,
       
 10169   clone: function clone(obj) {
       
 10170     var ret = {};
       
 10171     for (var i in obj) {
       
 10172       if (obj.hasOwnProperty(i)) {
       
 10173         ret[i] = obj[i];
       
 10174       }
       
 10175     }
       
 10176     var overflow = obj.overflow;
       
 10177     if (overflow) {
       
 10178       for (var i in obj) {
       
 10179         if (obj.hasOwnProperty(i)) {
       
 10180           ret.overflow[i] = obj.overflow[i];
       
 10181         }
       
 10182       }
       
 10183     }
       
 10184     return ret;
       
 10185   },
       
 10186   scrollLeft: function scrollLeft(w, v) {
       
 10187     if (isWindow(w)) {
       
 10188       if (v === undefined) {
       
 10189         return getScrollLeft(w);
       
 10190       }
       
 10191       window.scrollTo(v, getScrollTop(w));
       
 10192     } else {
       
 10193       if (v === undefined) {
       
 10194         return w.scrollLeft;
       
 10195       }
       
 10196       w.scrollLeft = v;
       
 10197     }
       
 10198   },
       
 10199   scrollTop: function scrollTop(w, v) {
       
 10200     if (isWindow(w)) {
       
 10201       if (v === undefined) {
       
 10202         return getScrollTop(w);
       
 10203       }
       
 10204       window.scrollTo(getScrollLeft(w), v);
       
 10205     } else {
       
 10206       if (v === undefined) {
       
 10207         return w.scrollTop;
       
 10208       }
       
 10209       w.scrollTop = v;
       
 10210     }
       
 10211   },
       
 10212 
       
 10213   viewportWidth: 0,
       
 10214   viewportHeight: 0
       
 10215 }, domUtils);
       
 10216 
       
 10217 /***/ }),
       
 10218 /* 180 */
       
 10219 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 10220 
       
 10221 "use strict";
       
 10222 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 10223 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  5352 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 10224 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
  5353 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 10225 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  5354 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 10226 
  5355 
 10227 
  5356 
 10228 /**
  5357 /**
 10229  * WordPress dependencies
  5358  * WordPress dependencies
 10230  */
  5359  */
 10231 
  5360 
 10232 var link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  5361 const arrowLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 10233   xmlns: "http://www.w3.org/2000/svg",
  5362   xmlns: "http://www.w3.org/2000/svg",
 10234   viewBox: "0 0 24 24"
  5363   viewBox: "0 0 24 24"
 10235 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  5364 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 10236   d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"
  5365   d: "M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"
 10237 }));
  5366 }));
 10238 /* harmony default export */ __webpack_exports__["a"] = (link);
  5367 /* harmony default export */ __webpack_exports__["a"] = (arrowLeft);
 10239 
  5368 
 10240 
  5369 
 10241 /***/ }),
  5370 /***/ }),
 10242 /* 181 */,
  5371 
 10243 /* 182 */,
  5372 /***/ "eGrx":
 10244 /* 183 */,
       
 10245 /* 184 */,
       
 10246 /* 185 */,
       
 10247 /* 186 */,
       
 10248 /* 187 */,
       
 10249 /* 188 */,
       
 10250 /* 189 */,
       
 10251 /* 190 */,
       
 10252 /* 191 */,
       
 10253 /* 192 */,
       
 10254 /* 193 */,
       
 10255 /* 194 */,
       
 10256 /* 195 */,
       
 10257 /* 196 */,
       
 10258 /* 197 */,
       
 10259 /* 198 */,
       
 10260 /* 199 */,
       
 10261 /* 200 */,
       
 10262 /* 201 */,
       
 10263 /* 202 */
       
 10264 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 10265 
       
 10266 "use strict";
       
 10267 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 10268 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 10269 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 10270 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 10271 
       
 10272 
       
 10273 /**
       
 10274  * WordPress dependencies
       
 10275  */
       
 10276 
       
 10277 var blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 10278   xmlns: "http://www.w3.org/2000/svg",
       
 10279   viewBox: "0 0 24 24"
       
 10280 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 10281   d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
       
 10282 }));
       
 10283 /* harmony default export */ __webpack_exports__["a"] = (blockDefault);
       
 10284 
       
 10285 
       
 10286 /***/ }),
       
 10287 /* 203 */
       
 10288 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 10289 
       
 10290 "use strict";
       
 10291 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 10292 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 10293 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 10294 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 10295 
       
 10296 
       
 10297 /**
       
 10298  * WordPress dependencies
       
 10299  */
       
 10300 
       
 10301 var keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 10302   xmlns: "http://www.w3.org/2000/svg",
       
 10303   viewBox: "-2 -2 24 24"
       
 10304 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 10305   d: "M16 4h2v9H7v3l-5-4 5-4v3h9V4z"
       
 10306 }));
       
 10307 /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn);
       
 10308 
       
 10309 
       
 10310 /***/ }),
       
 10311 /* 204 */
       
 10312 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 10313 
       
 10314 "use strict";
       
 10315 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 10316 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 10317 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 10318 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 10319 
       
 10320 
       
 10321 /**
       
 10322  * WordPress dependencies
       
 10323  */
       
 10324 
       
 10325 var upload = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 10326   xmlns: "http://www.w3.org/2000/svg",
       
 10327   viewBox: "0 0 24 24"
       
 10328 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 10329   d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"
       
 10330 }));
       
 10331 /* harmony default export */ __webpack_exports__["a"] = (upload);
       
 10332 
       
 10333 
       
 10334 /***/ }),
       
 10335 /* 205 */,
       
 10336 /* 206 */,
       
 10337 /* 207 */,
       
 10338 /* 208 */,
       
 10339 /* 209 */,
       
 10340 /* 210 */,
       
 10341 /* 211 */,
       
 10342 /* 212 */,
       
 10343 /* 213 */,
       
 10344 /* 214 */,
       
 10345 /* 215 */,
       
 10346 /* 216 */,
       
 10347 /* 217 */,
       
 10348 /* 218 */,
       
 10349 /* 219 */,
       
 10350 /* 220 */,
       
 10351 /* 221 */,
       
 10352 /* 222 */,
       
 10353 /* 223 */,
       
 10354 /* 224 */,
       
 10355 /* 225 */,
       
 10356 /* 226 */,
       
 10357 /* 227 */,
       
 10358 /* 228 */,
       
 10359 /* 229 */,
       
 10360 /* 230 */,
       
 10361 /* 231 */,
       
 10362 /* 232 */,
       
 10363 /* 233 */,
       
 10364 /* 234 */,
       
 10365 /* 235 */,
       
 10366 /* 236 */,
       
 10367 /* 237 */,
       
 10368 /* 238 */,
       
 10369 /* 239 */,
       
 10370 /* 240 */,
       
 10371 /* 241 */,
       
 10372 /* 242 */,
       
 10373 /* 243 */,
       
 10374 /* 244 */,
       
 10375 /* 245 */,
       
 10376 /* 246 */,
       
 10377 /* 247 */,
       
 10378 /* 248 */,
       
 10379 /* 249 */,
       
 10380 /* 250 */,
       
 10381 /* 251 */,
       
 10382 /* 252 */,
       
 10383 /* 253 */,
       
 10384 /* 254 */,
       
 10385 /* 255 */,
       
 10386 /* 256 */,
       
 10387 /* 257 */,
       
 10388 /* 258 */,
       
 10389 /* 259 */,
       
 10390 /* 260 */,
       
 10391 /* 261 */,
       
 10392 /* 262 */,
       
 10393 /* 263 */
       
 10394 /***/ (function(module, exports, __webpack_require__) {
       
 10395 
       
 10396 "use strict";
       
 10397 
       
 10398 
       
 10399 Object.defineProperty(exports, "__esModule", {
       
 10400   value: true
       
 10401 });
       
 10402 /**
       
 10403  * Redux dispatch multiple actions
       
 10404  */
       
 10405 
       
 10406 function multi(_ref) {
       
 10407   var dispatch = _ref.dispatch;
       
 10408 
       
 10409   return function (next) {
       
 10410     return function (action) {
       
 10411       return Array.isArray(action) ? action.filter(Boolean).map(dispatch) : next(action);
       
 10412     };
       
 10413   };
       
 10414 }
       
 10415 
       
 10416 /**
       
 10417  * Exports
       
 10418  */
       
 10419 
       
 10420 exports.default = multi;
       
 10421 
       
 10422 /***/ }),
       
 10423 /* 264 */
       
 10424 /***/ (function(module, exports, __webpack_require__) {
       
 10425 
       
 10426 "use strict";
       
 10427 /*istanbul ignore start*/
       
 10428 
       
 10429 
       
 10430 Object.defineProperty(exports, "__esModule", {
       
 10431   value: true
       
 10432 });
       
 10433 exports.diffChars = diffChars;
       
 10434 exports.characterDiff = void 0;
       
 10435 
       
 10436 /*istanbul ignore end*/
       
 10437 var
       
 10438 /*istanbul ignore start*/
       
 10439 _base = _interopRequireDefault(__webpack_require__(297))
       
 10440 /*istanbul ignore end*/
       
 10441 ;
       
 10442 
       
 10443 /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
 10444 
       
 10445 /*istanbul ignore end*/
       
 10446 var characterDiff = new
       
 10447 /*istanbul ignore start*/
       
 10448 _base
       
 10449 /*istanbul ignore end*/
       
 10450 .
       
 10451 /*istanbul ignore start*/
       
 10452 default
       
 10453 /*istanbul ignore end*/
       
 10454 ();
       
 10455 
       
 10456 /*istanbul ignore start*/
       
 10457 exports.characterDiff = characterDiff;
       
 10458 
       
 10459 /*istanbul ignore end*/
       
 10460 function diffChars(oldStr, newStr, options) {
       
 10461   return characterDiff.diff(oldStr, newStr, options);
       
 10462 }
       
 10463 
       
 10464 
       
 10465 /***/ }),
       
 10466 /* 265 */
       
 10467 /***/ (function(module, exports, __webpack_require__) {
       
 10468 
       
 10469 "use strict";
       
 10470 /*
       
 10471 Copyright (c) 2014, Yahoo! Inc. All rights reserved.
       
 10472 Copyrights licensed under the New BSD License.
       
 10473 See the accompanying LICENSE file for terms.
       
 10474 */
       
 10475 
       
 10476 
       
 10477 
       
 10478 exports.match = matchQuery;
       
 10479 exports.parse = parseQuery;
       
 10480 
       
 10481 // -----------------------------------------------------------------------------
       
 10482 
       
 10483 var RE_MEDIA_QUERY     = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,
       
 10484     RE_MQ_EXPRESSION   = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,
       
 10485     RE_MQ_FEATURE      = /^(?:(min|max)-)?(.+)/,
       
 10486     RE_LENGTH_UNIT     = /(em|rem|px|cm|mm|in|pt|pc)?$/,
       
 10487     RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;
       
 10488 
       
 10489 function matchQuery(mediaQuery, values) {
       
 10490     return parseQuery(mediaQuery).some(function (query) {
       
 10491         var inverse = query.inverse;
       
 10492 
       
 10493         // Either the parsed or specified `type` is "all", or the types must be
       
 10494         // equal for a match.
       
 10495         var typeMatch = query.type === 'all' || values.type === query.type;
       
 10496 
       
 10497         // Quit early when `type` doesn't match, but take "not" into account.
       
 10498         if ((typeMatch && inverse) || !(typeMatch || inverse)) {
       
 10499             return false;
       
 10500         }
       
 10501 
       
 10502         var expressionsMatch = query.expressions.every(function (expression) {
       
 10503             var feature  = expression.feature,
       
 10504                 modifier = expression.modifier,
       
 10505                 expValue = expression.value,
       
 10506                 value    = values[feature];
       
 10507 
       
 10508             // Missing or falsy values don't match.
       
 10509             if (!value) { return false; }
       
 10510 
       
 10511             switch (feature) {
       
 10512                 case 'orientation':
       
 10513                 case 'scan':
       
 10514                     return value.toLowerCase() === expValue.toLowerCase();
       
 10515 
       
 10516                 case 'width':
       
 10517                 case 'height':
       
 10518                 case 'device-width':
       
 10519                 case 'device-height':
       
 10520                     expValue = toPx(expValue);
       
 10521                     value    = toPx(value);
       
 10522                     break;
       
 10523 
       
 10524                 case 'resolution':
       
 10525                     expValue = toDpi(expValue);
       
 10526                     value    = toDpi(value);
       
 10527                     break;
       
 10528 
       
 10529                 case 'aspect-ratio':
       
 10530                 case 'device-aspect-ratio':
       
 10531                 case /* Deprecated */ 'device-pixel-ratio':
       
 10532                     expValue = toDecimal(expValue);
       
 10533                     value    = toDecimal(value);
       
 10534                     break;
       
 10535 
       
 10536                 case 'grid':
       
 10537                 case 'color':
       
 10538                 case 'color-index':
       
 10539                 case 'monochrome':
       
 10540                     expValue = parseInt(expValue, 10) || 1;
       
 10541                     value    = parseInt(value, 10) || 0;
       
 10542                     break;
       
 10543             }
       
 10544 
       
 10545             switch (modifier) {
       
 10546                 case 'min': return value >= expValue;
       
 10547                 case 'max': return value <= expValue;
       
 10548                 default   : return value === expValue;
       
 10549             }
       
 10550         });
       
 10551 
       
 10552         return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);
       
 10553     });
       
 10554 }
       
 10555 
       
 10556 function parseQuery(mediaQuery) {
       
 10557     return mediaQuery.split(',').map(function (query) {
       
 10558         query = query.trim();
       
 10559 
       
 10560         var captures    = query.match(RE_MEDIA_QUERY),
       
 10561             modifier    = captures[1],
       
 10562             type        = captures[2],
       
 10563             expressions = captures[3] || '',
       
 10564             parsed      = {};
       
 10565 
       
 10566         parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';
       
 10567         parsed.type    = type ? type.toLowerCase() : 'all';
       
 10568 
       
 10569         // Split expressions into a list.
       
 10570         expressions = expressions.match(/\([^\)]+\)/g) || [];
       
 10571 
       
 10572         parsed.expressions = expressions.map(function (expression) {
       
 10573             var captures = expression.match(RE_MQ_EXPRESSION),
       
 10574                 feature  = captures[1].toLowerCase().match(RE_MQ_FEATURE);
       
 10575 
       
 10576             return {
       
 10577                 modifier: feature[1],
       
 10578                 feature : feature[2],
       
 10579                 value   : captures[2]
       
 10580             };
       
 10581         });
       
 10582 
       
 10583         return parsed;
       
 10584     });
       
 10585 }
       
 10586 
       
 10587 // -- Utilities ----------------------------------------------------------------
       
 10588 
       
 10589 function toDecimal(ratio) {
       
 10590     var decimal = Number(ratio),
       
 10591         numbers;
       
 10592 
       
 10593     if (!decimal) {
       
 10594         numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/);
       
 10595         decimal = numbers[1] / numbers[2];
       
 10596     }
       
 10597 
       
 10598     return decimal;
       
 10599 }
       
 10600 
       
 10601 function toDpi(resolution) {
       
 10602     var value = parseFloat(resolution),
       
 10603         units = String(resolution).match(RE_RESOLUTION_UNIT)[1];
       
 10604 
       
 10605     switch (units) {
       
 10606         case 'dpcm': return value / 2.54;
       
 10607         case 'dppx': return value * 96;
       
 10608         default    : return value;
       
 10609     }
       
 10610 }
       
 10611 
       
 10612 function toPx(length) {
       
 10613     var value = parseFloat(length),
       
 10614         units = String(length).match(RE_LENGTH_UNIT)[1];
       
 10615 
       
 10616     switch (units) {
       
 10617         case 'em' : return value * 16;
       
 10618         case 'rem': return value * 16;
       
 10619         case 'cm' : return value * 96 / 2.54;
       
 10620         case 'mm' : return value * 96 / 2.54 / 10;
       
 10621         case 'in' : return value * 96;
       
 10622         case 'pt' : return value * 72;
       
 10623         case 'pc' : return value * 72 / 12;
       
 10624         default   : return value;
       
 10625     }
       
 10626 }
       
 10627 
       
 10628 
       
 10629 /***/ }),
       
 10630 /* 266 */
       
 10631 /***/ (function(module, exports) {
  5373 /***/ (function(module, exports) {
 10632 
  5374 
 10633 var traverse = module.exports = function (obj) {
  5375 var traverse = module.exports = function (obj) {
 10634     return new Traverse(obj);
  5376     return new Traverse(obj);
 10635 };
  5377 };
 10945     return key in obj;
  5687     return key in obj;
 10946 };
  5688 };
 10947 
  5689 
 10948 
  5690 
 10949 /***/ }),
  5691 /***/ }),
 10950 /* 267 */,
  5692 
 10951 /* 268 */,
  5693 /***/ "fPbg":
 10952 /* 269 */,
       
 10953 /* 270 */,
       
 10954 /* 271 */,
       
 10955 /* 272 */,
       
 10956 /* 273 */,
       
 10957 /* 274 */,
       
 10958 /* 275 */,
       
 10959 /* 276 */,
       
 10960 /* 277 */,
       
 10961 /* 278 */,
       
 10962 /* 279 */,
       
 10963 /* 280 */,
       
 10964 /* 281 */,
       
 10965 /* 282 */,
       
 10966 /* 283 */,
       
 10967 /* 284 */,
       
 10968 /* 285 */,
       
 10969 /* 286 */,
       
 10970 /* 287 */
       
 10971 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5694 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 10972 
  5695 
 10973 "use strict";
  5696 "use strict";
 10974 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  5697 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 10975 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  5698 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 10976 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
  5699 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 10977 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  5700 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 10978 
  5701 
 10979 
  5702 
 10980 /**
  5703 /**
 10981  * WordPress dependencies
  5704  * WordPress dependencies
 10982  */
  5705  */
 10983 
  5706 
 10984 var alignLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  5707 const alignLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 10985   xmlns: "http://www.w3.org/2000/svg",
  5708   xmlns: "http://www.w3.org/2000/svg",
 10986   viewBox: "0 0 24 24"
  5709   viewBox: "0 0 24 24"
 10987 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  5710 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 10988   d: "M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"
  5711   d: "M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"
 10989 }));
  5712 }));
 10990 /* harmony default export */ __webpack_exports__["a"] = (alignLeft);
  5713 /* harmony default export */ __webpack_exports__["a"] = (alignLeft);
 10991 
  5714 
 10992 
  5715 
 10993 /***/ }),
  5716 /***/ }),
 10994 /* 288 */
  5717 
       
  5718 /***/ "g56x":
       
  5719 /***/ (function(module, exports) {
       
  5720 
       
  5721 (function() { module.exports = window["wp"]["hooks"]; }());
       
  5722 
       
  5723 /***/ }),
       
  5724 
       
  5725 /***/ "gdqT":
       
  5726 /***/ (function(module, exports) {
       
  5727 
       
  5728 (function() { module.exports = window["wp"]["a11y"]; }());
       
  5729 
       
  5730 /***/ }),
       
  5731 
       
  5732 /***/ "hF7m":
       
  5733 /***/ (function(module, exports) {
       
  5734 
       
  5735 (function() { module.exports = window["wp"]["keyboardShortcuts"]; }());
       
  5736 
       
  5737 /***/ }),
       
  5738 
       
  5739 /***/ "iA5R":
       
  5740 /***/ (function(module, exports, __webpack_require__) {
       
  5741 
       
  5742 "use strict";
       
  5743 /*istanbul ignore start*/
       
  5744 
       
  5745 
       
  5746 Object.defineProperty(exports, "__esModule", {
       
  5747   value: true
       
  5748 });
       
  5749 exports.diffChars = diffChars;
       
  5750 exports.characterDiff = void 0;
       
  5751 
       
  5752 /*istanbul ignore end*/
       
  5753 var
       
  5754 /*istanbul ignore start*/
       
  5755 _base = _interopRequireDefault(__webpack_require__("smQA"))
       
  5756 /*istanbul ignore end*/
       
  5757 ;
       
  5758 
       
  5759 /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
  5760 
       
  5761 /*istanbul ignore end*/
       
  5762 var characterDiff = new
       
  5763 /*istanbul ignore start*/
       
  5764 _base
       
  5765 /*istanbul ignore end*/
       
  5766 .
       
  5767 /*istanbul ignore start*/
       
  5768 default
       
  5769 /*istanbul ignore end*/
       
  5770 ();
       
  5771 
       
  5772 /*istanbul ignore start*/
       
  5773 exports.characterDiff = characterDiff;
       
  5774 
       
  5775 /*istanbul ignore end*/
       
  5776 function diffChars(oldStr, newStr, options) {
       
  5777   return characterDiff.diff(oldStr, newStr, options);
       
  5778 }
       
  5779 
       
  5780 
       
  5781 /***/ }),
       
  5782 
       
  5783 /***/ "iClF":
 10995 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5784 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 10996 
  5785 
 10997 "use strict";
  5786 "use strict";
 10998 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  5787 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 10999 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  5788 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 11000 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
  5789 /**
       
  5790  * WordPress dependencies
       
  5791  */
       
  5792 
       
  5793 /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
       
  5794 
       
  5795 /**
       
  5796  * Return an SVG icon.
       
  5797  *
       
  5798  * @param {IconProps} props icon is the SVG component to render
       
  5799  *                          size is a number specifiying the icon size in pixels
       
  5800  *                          Other props will be passed to wrapped SVG component
       
  5801  *
       
  5802  * @return {JSX.Element}  Icon component
       
  5803  */
       
  5804 
       
  5805 function Icon({
       
  5806   icon,
       
  5807   size = 24,
       
  5808   ...props
       
  5809 }) {
       
  5810   return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(icon, {
       
  5811     width: size,
       
  5812     height: size,
       
  5813     ...props
       
  5814   });
       
  5815 }
       
  5816 
       
  5817 /* harmony default export */ __webpack_exports__["a"] = (Icon);
       
  5818 
       
  5819 
       
  5820 /***/ }),
       
  5821 
       
  5822 /***/ "jB5C":
       
  5823 /***/ (function(module, exports, __webpack_require__) {
       
  5824 
       
  5825 "use strict";
       
  5826 
       
  5827 
       
  5828 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; };
       
  5829 
       
  5830 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
       
  5831 
       
  5832 var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;
       
  5833 
       
  5834 function getClientPosition(elem) {
       
  5835   var box = undefined;
       
  5836   var x = undefined;
       
  5837   var y = undefined;
       
  5838   var doc = elem.ownerDocument;
       
  5839   var body = doc.body;
       
  5840   var docElem = doc && doc.documentElement;
       
  5841   // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式
       
  5842   box = elem.getBoundingClientRect();
       
  5843 
       
  5844   // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop
       
  5845   // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确
       
  5846   // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin
       
  5847 
       
  5848   x = box.left;
       
  5849   y = box.top;
       
  5850 
       
  5851   // In IE, most of the time, 2 extra pixels are added to the top and left
       
  5852   // due to the implicit 2-pixel inset border.  In IE6/7 quirks mode and
       
  5853   // IE6 standards mode, this border can be overridden by setting the
       
  5854   // document element's border to zero -- thus, we cannot rely on the
       
  5855   // offset always being 2 pixels.
       
  5856 
       
  5857   // In quirks mode, the offset can be determined by querying the body's
       
  5858   // clientLeft/clientTop, but in standards mode, it is found by querying
       
  5859   // the document element's clientLeft/clientTop.  Since we already called
       
  5860   // getClientBoundingRect we have already forced a reflow, so it is not
       
  5861   // too expensive just to query them all.
       
  5862 
       
  5863   // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的
       
  5864   // 窗口边框标准是设 documentElement ,quirks 时设置 body
       
  5865   // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去
       
  5866   // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置
       
  5867   // 标准 ie 下 docElem.clientTop 就是 border-top
       
  5868   // ie7 html 即窗口边框改变不了。永远为 2
       
  5869   // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0
       
  5870 
       
  5871   x -= docElem.clientLeft || body.clientLeft || 0;
       
  5872   y -= docElem.clientTop || body.clientTop || 0;
       
  5873 
       
  5874   return {
       
  5875     left: x,
       
  5876     top: y
       
  5877   };
       
  5878 }
       
  5879 
       
  5880 function getScroll(w, top) {
       
  5881   var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
       
  5882   var method = 'scroll' + (top ? 'Top' : 'Left');
       
  5883   if (typeof ret !== 'number') {
       
  5884     var d = w.document;
       
  5885     // ie6,7,8 standard mode
       
  5886     ret = d.documentElement[method];
       
  5887     if (typeof ret !== 'number') {
       
  5888       // quirks mode
       
  5889       ret = d.body[method];
       
  5890     }
       
  5891   }
       
  5892   return ret;
       
  5893 }
       
  5894 
       
  5895 function getScrollLeft(w) {
       
  5896   return getScroll(w);
       
  5897 }
       
  5898 
       
  5899 function getScrollTop(w) {
       
  5900   return getScroll(w, true);
       
  5901 }
       
  5902 
       
  5903 function getOffset(el) {
       
  5904   var pos = getClientPosition(el);
       
  5905   var doc = el.ownerDocument;
       
  5906   var w = doc.defaultView || doc.parentWindow;
       
  5907   pos.left += getScrollLeft(w);
       
  5908   pos.top += getScrollTop(w);
       
  5909   return pos;
       
  5910 }
       
  5911 function _getComputedStyle(elem, name, computedStyle_) {
       
  5912   var val = '';
       
  5913   var d = elem.ownerDocument;
       
  5914   var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null);
       
  5915 
       
  5916   // https://github.com/kissyteam/kissy/issues/61
       
  5917   if (computedStyle) {
       
  5918     val = computedStyle.getPropertyValue(name) || computedStyle[name];
       
  5919   }
       
  5920 
       
  5921   return val;
       
  5922 }
       
  5923 
       
  5924 var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');
       
  5925 var RE_POS = /^(top|right|bottom|left)$/;
       
  5926 var CURRENT_STYLE = 'currentStyle';
       
  5927 var RUNTIME_STYLE = 'runtimeStyle';
       
  5928 var LEFT = 'left';
       
  5929 var PX = 'px';
       
  5930 
       
  5931 function _getComputedStyleIE(elem, name) {
       
  5932   // currentStyle maybe null
       
  5933   // http://msdn.microsoft.com/en-us/library/ms535231.aspx
       
  5934   var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];
       
  5935 
       
  5936   // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值
       
  5937   // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19
       
  5938   // 在 ie 下不对,需要直接用 offset 方式
       
  5939   // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了
       
  5940 
       
  5941   // From the awesome hack by Dean Edwards
       
  5942   // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
       
  5943   // If we're not dealing with a regular pixel number
       
  5944   // but a number that has a weird ending, we need to convert it to pixels
       
  5945   // exclude left right for relativity
       
  5946   if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {
       
  5947     // Remember the original values
       
  5948     var style = elem.style;
       
  5949     var left = style[LEFT];
       
  5950     var rsLeft = elem[RUNTIME_STYLE][LEFT];
       
  5951 
       
  5952     // prevent flashing of content
       
  5953     elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];
       
  5954 
       
  5955     // Put in the new values to get a computed value out
       
  5956     style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;
       
  5957     ret = style.pixelLeft + PX;
       
  5958 
       
  5959     // Revert the changed values
       
  5960     style[LEFT] = left;
       
  5961 
       
  5962     elem[RUNTIME_STYLE][LEFT] = rsLeft;
       
  5963   }
       
  5964   return ret === '' ? 'auto' : ret;
       
  5965 }
       
  5966 
       
  5967 var getComputedStyleX = undefined;
       
  5968 if (typeof window !== 'undefined') {
       
  5969   getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;
       
  5970 }
       
  5971 
       
  5972 function each(arr, fn) {
       
  5973   for (var i = 0; i < arr.length; i++) {
       
  5974     fn(arr[i]);
       
  5975   }
       
  5976 }
       
  5977 
       
  5978 function isBorderBoxFn(elem) {
       
  5979   return getComputedStyleX(elem, 'boxSizing') === 'border-box';
       
  5980 }
       
  5981 
       
  5982 var BOX_MODELS = ['margin', 'border', 'padding'];
       
  5983 var CONTENT_INDEX = -1;
       
  5984 var PADDING_INDEX = 2;
       
  5985 var BORDER_INDEX = 1;
       
  5986 var MARGIN_INDEX = 0;
       
  5987 
       
  5988 function swap(elem, options, callback) {
       
  5989   var old = {};
       
  5990   var style = elem.style;
       
  5991   var name = undefined;
       
  5992 
       
  5993   // Remember the old values, and insert the new ones
       
  5994   for (name in options) {
       
  5995     if (options.hasOwnProperty(name)) {
       
  5996       old[name] = style[name];
       
  5997       style[name] = options[name];
       
  5998     }
       
  5999   }
       
  6000 
       
  6001   callback.call(elem);
       
  6002 
       
  6003   // Revert the old values
       
  6004   for (name in options) {
       
  6005     if (options.hasOwnProperty(name)) {
       
  6006       style[name] = old[name];
       
  6007     }
       
  6008   }
       
  6009 }
       
  6010 
       
  6011 function getPBMWidth(elem, props, which) {
       
  6012   var value = 0;
       
  6013   var prop = undefined;
       
  6014   var j = undefined;
       
  6015   var i = undefined;
       
  6016   for (j = 0; j < props.length; j++) {
       
  6017     prop = props[j];
       
  6018     if (prop) {
       
  6019       for (i = 0; i < which.length; i++) {
       
  6020         var cssProp = undefined;
       
  6021         if (prop === 'border') {
       
  6022           cssProp = prop + which[i] + 'Width';
       
  6023         } else {
       
  6024           cssProp = prop + which[i];
       
  6025         }
       
  6026         value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;
       
  6027       }
       
  6028     }
       
  6029   }
       
  6030   return value;
       
  6031 }
       
  6032 
       
  6033 /**
       
  6034  * A crude way of determining if an object is a window
       
  6035  * @member util
       
  6036  */
       
  6037 function isWindow(obj) {
       
  6038   // must use == for ie8
       
  6039   /* eslint eqeqeq:0 */
       
  6040   return obj != null && obj == obj.window;
       
  6041 }
       
  6042 
       
  6043 var domUtils = {};
       
  6044 
       
  6045 each(['Width', 'Height'], function (name) {
       
  6046   domUtils['doc' + name] = function (refWin) {
       
  6047     var d = refWin.document;
       
  6048     return Math.max(
       
  6049     // firefox chrome documentElement.scrollHeight< body.scrollHeight
       
  6050     // ie standard mode : documentElement.scrollHeight> body.scrollHeight
       
  6051     d.documentElement['scroll' + name],
       
  6052     // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
       
  6053     d.body['scroll' + name], domUtils['viewport' + name](d));
       
  6054   };
       
  6055 
       
  6056   domUtils['viewport' + name] = function (win) {
       
  6057     // pc browser includes scrollbar in window.innerWidth
       
  6058     var prop = 'client' + name;
       
  6059     var doc = win.document;
       
  6060     var body = doc.body;
       
  6061     var documentElement = doc.documentElement;
       
  6062     var documentElementProp = documentElement[prop];
       
  6063     // 标准模式取 documentElement
       
  6064     // backcompat 取 body
       
  6065     return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;
       
  6066   };
       
  6067 });
       
  6068 
       
  6069 /*
       
  6070  得到元素的大小信息
       
  6071  @param elem
       
  6072  @param name
       
  6073  @param {String} [extra]  'padding' : (css width) + padding
       
  6074  'border' : (css width) + padding + border
       
  6075  'margin' : (css width) + padding + border + margin
       
  6076  */
       
  6077 function getWH(elem, name, extra) {
       
  6078   if (isWindow(elem)) {
       
  6079     return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);
       
  6080   } else if (elem.nodeType === 9) {
       
  6081     return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);
       
  6082   }
       
  6083   var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
       
  6084   var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;
       
  6085   var computedStyle = getComputedStyleX(elem);
       
  6086   var isBorderBox = isBorderBoxFn(elem, computedStyle);
       
  6087   var cssBoxValue = 0;
       
  6088   if (borderBoxValue == null || borderBoxValue <= 0) {
       
  6089     borderBoxValue = undefined;
       
  6090     // Fall back to computed then un computed css if necessary
       
  6091     cssBoxValue = getComputedStyleX(elem, name);
       
  6092     if (cssBoxValue == null || Number(cssBoxValue) < 0) {
       
  6093       cssBoxValue = elem.style[name] || 0;
       
  6094     }
       
  6095     // Normalize '', auto, and prepare for extra
       
  6096     cssBoxValue = parseFloat(cssBoxValue) || 0;
       
  6097   }
       
  6098   if (extra === undefined) {
       
  6099     extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
       
  6100   }
       
  6101   var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;
       
  6102   var val = borderBoxValue || cssBoxValue;
       
  6103   if (extra === CONTENT_INDEX) {
       
  6104     if (borderBoxValueOrIsBorderBox) {
       
  6105       return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);
       
  6106     }
       
  6107     return cssBoxValue;
       
  6108   }
       
  6109   if (borderBoxValueOrIsBorderBox) {
       
  6110     var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);
       
  6111     return val + (extra === BORDER_INDEX ? 0 : padding);
       
  6112   }
       
  6113   return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);
       
  6114 }
       
  6115 
       
  6116 var cssShow = {
       
  6117   position: 'absolute',
       
  6118   visibility: 'hidden',
       
  6119   display: 'block'
       
  6120 };
       
  6121 
       
  6122 // fix #119 : https://github.com/kissyteam/kissy/issues/119
       
  6123 function getWHIgnoreDisplay(elem) {
       
  6124   var val = undefined;
       
  6125   var args = arguments;
       
  6126   // in case elem is window
       
  6127   // elem.offsetWidth === undefined
       
  6128   if (elem.offsetWidth !== 0) {
       
  6129     val = getWH.apply(undefined, args);
       
  6130   } else {
       
  6131     swap(elem, cssShow, function () {
       
  6132       val = getWH.apply(undefined, args);
       
  6133     });
       
  6134   }
       
  6135   return val;
       
  6136 }
       
  6137 
       
  6138 function css(el, name, v) {
       
  6139   var value = v;
       
  6140   if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
       
  6141     for (var i in name) {
       
  6142       if (name.hasOwnProperty(i)) {
       
  6143         css(el, i, name[i]);
       
  6144       }
       
  6145     }
       
  6146     return undefined;
       
  6147   }
       
  6148   if (typeof value !== 'undefined') {
       
  6149     if (typeof value === 'number') {
       
  6150       value += 'px';
       
  6151     }
       
  6152     el.style[name] = value;
       
  6153     return undefined;
       
  6154   }
       
  6155   return getComputedStyleX(el, name);
       
  6156 }
       
  6157 
       
  6158 each(['width', 'height'], function (name) {
       
  6159   var first = name.charAt(0).toUpperCase() + name.slice(1);
       
  6160   domUtils['outer' + first] = function (el, includeMargin) {
       
  6161     return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
       
  6162   };
       
  6163   var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
       
  6164 
       
  6165   domUtils[name] = function (elem, val) {
       
  6166     if (val !== undefined) {
       
  6167       if (elem) {
       
  6168         var computedStyle = getComputedStyleX(elem);
       
  6169         var isBorderBox = isBorderBoxFn(elem);
       
  6170         if (isBorderBox) {
       
  6171           val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);
       
  6172         }
       
  6173         return css(elem, name, val);
       
  6174       }
       
  6175       return undefined;
       
  6176     }
       
  6177     return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);
       
  6178   };
       
  6179 });
       
  6180 
       
  6181 // 设置 elem 相对 elem.ownerDocument 的坐标
       
  6182 function setOffset(elem, offset) {
       
  6183   // set position first, in-case top/left are set even on static elem
       
  6184   if (css(elem, 'position') === 'static') {
       
  6185     elem.style.position = 'relative';
       
  6186   }
       
  6187 
       
  6188   var old = getOffset(elem);
       
  6189   var ret = {};
       
  6190   var current = undefined;
       
  6191   var key = undefined;
       
  6192 
       
  6193   for (key in offset) {
       
  6194     if (offset.hasOwnProperty(key)) {
       
  6195       current = parseFloat(css(elem, key)) || 0;
       
  6196       ret[key] = current + offset[key] - old[key];
       
  6197     }
       
  6198   }
       
  6199   css(elem, ret);
       
  6200 }
       
  6201 
       
  6202 module.exports = _extends({
       
  6203   getWindow: function getWindow(node) {
       
  6204     var doc = node.ownerDocument || node;
       
  6205     return doc.defaultView || doc.parentWindow;
       
  6206   },
       
  6207   offset: function offset(el, value) {
       
  6208     if (typeof value !== 'undefined') {
       
  6209       setOffset(el, value);
       
  6210     } else {
       
  6211       return getOffset(el);
       
  6212     }
       
  6213   },
       
  6214 
       
  6215   isWindow: isWindow,
       
  6216   each: each,
       
  6217   css: css,
       
  6218   clone: function clone(obj) {
       
  6219     var ret = {};
       
  6220     for (var i in obj) {
       
  6221       if (obj.hasOwnProperty(i)) {
       
  6222         ret[i] = obj[i];
       
  6223       }
       
  6224     }
       
  6225     var overflow = obj.overflow;
       
  6226     if (overflow) {
       
  6227       for (var i in obj) {
       
  6228         if (obj.hasOwnProperty(i)) {
       
  6229           ret.overflow[i] = obj.overflow[i];
       
  6230         }
       
  6231       }
       
  6232     }
       
  6233     return ret;
       
  6234   },
       
  6235   scrollLeft: function scrollLeft(w, v) {
       
  6236     if (isWindow(w)) {
       
  6237       if (v === undefined) {
       
  6238         return getScrollLeft(w);
       
  6239       }
       
  6240       window.scrollTo(v, getScrollTop(w));
       
  6241     } else {
       
  6242       if (v === undefined) {
       
  6243         return w.scrollLeft;
       
  6244       }
       
  6245       w.scrollLeft = v;
       
  6246     }
       
  6247   },
       
  6248   scrollTop: function scrollTop(w, v) {
       
  6249     if (isWindow(w)) {
       
  6250       if (v === undefined) {
       
  6251         return getScrollTop(w);
       
  6252       }
       
  6253       window.scrollTo(getScrollLeft(w), v);
       
  6254     } else {
       
  6255       if (v === undefined) {
       
  6256         return w.scrollTop;
       
  6257       }
       
  6258       w.scrollTop = v;
       
  6259     }
       
  6260   },
       
  6261 
       
  6262   viewportWidth: 0,
       
  6263   viewportHeight: 0
       
  6264 }, domUtils);
       
  6265 
       
  6266 /***/ }),
       
  6267 
       
  6268 /***/ "jTPX":
       
  6269 /***/ (function(module, exports) {
       
  6270 
       
  6271 // This code has been refactored for 140 bytes
       
  6272 // You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
       
  6273 var computedStyle = function (el, prop, getComputedStyle) {
       
  6274   getComputedStyle = window.getComputedStyle;
       
  6275 
       
  6276   // In one fell swoop
       
  6277   return (
       
  6278     // If we have getComputedStyle
       
  6279     getComputedStyle ?
       
  6280       // Query it
       
  6281       // TODO: From CSS-Query notes, we might need (node, null) for FF
       
  6282       getComputedStyle(el) :
       
  6283 
       
  6284     // Otherwise, we are in IE and use currentStyle
       
  6285       el.currentStyle
       
  6286   )[
       
  6287     // Switch to camelCase for CSSOM
       
  6288     // DEV: Grabbed from jQuery
       
  6289     // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
       
  6290     // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
       
  6291     prop.replace(/-(\w)/gi, function (word, letter) {
       
  6292       return letter.toUpperCase();
       
  6293     })
       
  6294   ];
       
  6295 };
       
  6296 
       
  6297 module.exports = computedStyle;
       
  6298 
       
  6299 
       
  6300 /***/ }),
       
  6301 
       
  6302 /***/ "l3Sj":
       
  6303 /***/ (function(module, exports) {
       
  6304 
       
  6305 (function() { module.exports = window["wp"]["i18n"]; }());
       
  6306 
       
  6307 /***/ }),
       
  6308 
       
  6309 /***/ "onLe":
       
  6310 /***/ (function(module, exports) {
       
  6311 
       
  6312 (function() { module.exports = window["wp"]["notices"]; }());
       
  6313 
       
  6314 /***/ }),
       
  6315 
       
  6316 /***/ "pPDe":
       
  6317 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  6318 
       
  6319 "use strict";
       
  6320 
       
  6321 
       
  6322 var LEAF_KEY, hasWeakMap;
       
  6323 
       
  6324 /**
       
  6325  * Arbitrary value used as key for referencing cache object in WeakMap tree.
       
  6326  *
       
  6327  * @type {Object}
       
  6328  */
       
  6329 LEAF_KEY = {};
       
  6330 
       
  6331 /**
       
  6332  * Whether environment supports WeakMap.
       
  6333  *
       
  6334  * @type {boolean}
       
  6335  */
       
  6336 hasWeakMap = typeof WeakMap !== 'undefined';
       
  6337 
       
  6338 /**
       
  6339  * Returns the first argument as the sole entry in an array.
       
  6340  *
       
  6341  * @param {*} value Value to return.
       
  6342  *
       
  6343  * @return {Array} Value returned as entry in array.
       
  6344  */
       
  6345 function arrayOf( value ) {
       
  6346 	return [ value ];
       
  6347 }
       
  6348 
       
  6349 /**
       
  6350  * Returns true if the value passed is object-like, or false otherwise. A value
       
  6351  * is object-like if it can support property assignment, e.g. object or array.
       
  6352  *
       
  6353  * @param {*} value Value to test.
       
  6354  *
       
  6355  * @return {boolean} Whether value is object-like.
       
  6356  */
       
  6357 function isObjectLike( value ) {
       
  6358 	return !! value && 'object' === typeof value;
       
  6359 }
       
  6360 
       
  6361 /**
       
  6362  * Creates and returns a new cache object.
       
  6363  *
       
  6364  * @return {Object} Cache object.
       
  6365  */
       
  6366 function createCache() {
       
  6367 	var cache = {
       
  6368 		clear: function() {
       
  6369 			cache.head = null;
       
  6370 		},
       
  6371 	};
       
  6372 
       
  6373 	return cache;
       
  6374 }
       
  6375 
       
  6376 /**
       
  6377  * Returns true if entries within the two arrays are strictly equal by
       
  6378  * reference from a starting index.
       
  6379  *
       
  6380  * @param {Array}  a         First array.
       
  6381  * @param {Array}  b         Second array.
       
  6382  * @param {number} fromIndex Index from which to start comparison.
       
  6383  *
       
  6384  * @return {boolean} Whether arrays are shallowly equal.
       
  6385  */
       
  6386 function isShallowEqual( a, b, fromIndex ) {
       
  6387 	var i;
       
  6388 
       
  6389 	if ( a.length !== b.length ) {
       
  6390 		return false;
       
  6391 	}
       
  6392 
       
  6393 	for ( i = fromIndex; i < a.length; i++ ) {
       
  6394 		if ( a[ i ] !== b[ i ] ) {
       
  6395 			return false;
       
  6396 		}
       
  6397 	}
       
  6398 
       
  6399 	return true;
       
  6400 }
       
  6401 
       
  6402 /**
       
  6403  * Returns a memoized selector function. The getDependants function argument is
       
  6404  * called before the memoized selector and is expected to return an immutable
       
  6405  * reference or array of references on which the selector depends for computing
       
  6406  * its own return value. The memoize cache is preserved only as long as those
       
  6407  * dependant references remain the same. If getDependants returns a different
       
  6408  * reference(s), the cache is cleared and the selector value regenerated.
       
  6409  *
       
  6410  * @param {Function} selector      Selector function.
       
  6411  * @param {Function} getDependants Dependant getter returning an immutable
       
  6412  *                                 reference or array of reference used in
       
  6413  *                                 cache bust consideration.
       
  6414  *
       
  6415  * @return {Function} Memoized selector.
       
  6416  */
       
  6417 /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
       
  6418 	var rootCache, getCache;
       
  6419 
       
  6420 	// Use object source as dependant if getter not provided
       
  6421 	if ( ! getDependants ) {
       
  6422 		getDependants = arrayOf;
       
  6423 	}
       
  6424 
       
  6425 	/**
       
  6426 	 * Returns the root cache. If WeakMap is supported, this is assigned to the
       
  6427 	 * root WeakMap cache set, otherwise it is a shared instance of the default
       
  6428 	 * cache object.
       
  6429 	 *
       
  6430 	 * @return {(WeakMap|Object)} Root cache object.
       
  6431 	 */
       
  6432 	function getRootCache() {
       
  6433 		return rootCache;
       
  6434 	}
       
  6435 
       
  6436 	/**
       
  6437 	 * Returns the cache for a given dependants array. When possible, a WeakMap
       
  6438 	 * will be used to create a unique cache for each set of dependants. This
       
  6439 	 * is feasible due to the nature of WeakMap in allowing garbage collection
       
  6440 	 * to occur on entries where the key object is no longer referenced. Since
       
  6441 	 * WeakMap requires the key to be an object, this is only possible when the
       
  6442 	 * dependant is object-like. The root cache is created as a hierarchy where
       
  6443 	 * each top-level key is the first entry in a dependants set, the value a
       
  6444 	 * WeakMap where each key is the next dependant, and so on. This continues
       
  6445 	 * so long as the dependants are object-like. If no dependants are object-
       
  6446 	 * like, then the cache is shared across all invocations.
       
  6447 	 *
       
  6448 	 * @see isObjectLike
       
  6449 	 *
       
  6450 	 * @param {Array} dependants Selector dependants.
       
  6451 	 *
       
  6452 	 * @return {Object} Cache object.
       
  6453 	 */
       
  6454 	function getWeakMapCache( dependants ) {
       
  6455 		var caches = rootCache,
       
  6456 			isUniqueByDependants = true,
       
  6457 			i, dependant, map, cache;
       
  6458 
       
  6459 		for ( i = 0; i < dependants.length; i++ ) {
       
  6460 			dependant = dependants[ i ];
       
  6461 
       
  6462 			// Can only compose WeakMap from object-like key.
       
  6463 			if ( ! isObjectLike( dependant ) ) {
       
  6464 				isUniqueByDependants = false;
       
  6465 				break;
       
  6466 			}
       
  6467 
       
  6468 			// Does current segment of cache already have a WeakMap?
       
  6469 			if ( caches.has( dependant ) ) {
       
  6470 				// Traverse into nested WeakMap.
       
  6471 				caches = caches.get( dependant );
       
  6472 			} else {
       
  6473 				// Create, set, and traverse into a new one.
       
  6474 				map = new WeakMap();
       
  6475 				caches.set( dependant, map );
       
  6476 				caches = map;
       
  6477 			}
       
  6478 		}
       
  6479 
       
  6480 		// We use an arbitrary (but consistent) object as key for the last item
       
  6481 		// in the WeakMap to serve as our running cache.
       
  6482 		if ( ! caches.has( LEAF_KEY ) ) {
       
  6483 			cache = createCache();
       
  6484 			cache.isUniqueByDependants = isUniqueByDependants;
       
  6485 			caches.set( LEAF_KEY, cache );
       
  6486 		}
       
  6487 
       
  6488 		return caches.get( LEAF_KEY );
       
  6489 	}
       
  6490 
       
  6491 	// Assign cache handler by availability of WeakMap
       
  6492 	getCache = hasWeakMap ? getWeakMapCache : getRootCache;
       
  6493 
       
  6494 	/**
       
  6495 	 * Resets root memoization cache.
       
  6496 	 */
       
  6497 	function clear() {
       
  6498 		rootCache = hasWeakMap ? new WeakMap() : createCache();
       
  6499 	}
       
  6500 
       
  6501 	// eslint-disable-next-line jsdoc/check-param-names
       
  6502 	/**
       
  6503 	 * The augmented selector call, considering first whether dependants have
       
  6504 	 * changed before passing it to underlying memoize function.
       
  6505 	 *
       
  6506 	 * @param {Object} source    Source object for derivation.
       
  6507 	 * @param {...*}   extraArgs Additional arguments to pass to selector.
       
  6508 	 *
       
  6509 	 * @return {*} Selector result.
       
  6510 	 */
       
  6511 	function callSelector( /* source, ...extraArgs */ ) {
       
  6512 		var len = arguments.length,
       
  6513 			cache, node, i, args, dependants;
       
  6514 
       
  6515 		// Create copy of arguments (avoid leaking deoptimization).
       
  6516 		args = new Array( len );
       
  6517 		for ( i = 0; i < len; i++ ) {
       
  6518 			args[ i ] = arguments[ i ];
       
  6519 		}
       
  6520 
       
  6521 		dependants = getDependants.apply( null, args );
       
  6522 		cache = getCache( dependants );
       
  6523 
       
  6524 		// If not guaranteed uniqueness by dependants (primitive type or lack
       
  6525 		// of WeakMap support), shallow compare against last dependants and, if
       
  6526 		// references have changed, destroy cache to recalculate result.
       
  6527 		if ( ! cache.isUniqueByDependants ) {
       
  6528 			if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
       
  6529 				cache.clear();
       
  6530 			}
       
  6531 
       
  6532 			cache.lastDependants = dependants;
       
  6533 		}
       
  6534 
       
  6535 		node = cache.head;
       
  6536 		while ( node ) {
       
  6537 			// Check whether node arguments match arguments
       
  6538 			if ( ! isShallowEqual( node.args, args, 1 ) ) {
       
  6539 				node = node.next;
       
  6540 				continue;
       
  6541 			}
       
  6542 
       
  6543 			// At this point we can assume we've found a match
       
  6544 
       
  6545 			// Surface matched node to head if not already
       
  6546 			if ( node !== cache.head ) {
       
  6547 				// Adjust siblings to point to each other.
       
  6548 				node.prev.next = node.next;
       
  6549 				if ( node.next ) {
       
  6550 					node.next.prev = node.prev;
       
  6551 				}
       
  6552 
       
  6553 				node.next = cache.head;
       
  6554 				node.prev = null;
       
  6555 				cache.head.prev = node;
       
  6556 				cache.head = node;
       
  6557 			}
       
  6558 
       
  6559 			// Return immediately
       
  6560 			return node.val;
       
  6561 		}
       
  6562 
       
  6563 		// No cached value found. Continue to insertion phase:
       
  6564 
       
  6565 		node = {
       
  6566 			// Generate the result from original function
       
  6567 			val: selector.apply( null, args ),
       
  6568 		};
       
  6569 
       
  6570 		// Avoid including the source object in the cache.
       
  6571 		args[ 0 ] = null;
       
  6572 		node.args = args;
       
  6573 
       
  6574 		// Don't need to check whether node is already head, since it would
       
  6575 		// have been returned above already if it was
       
  6576 
       
  6577 		// Shift existing head down list
       
  6578 		if ( cache.head ) {
       
  6579 			cache.head.prev = node;
       
  6580 			node.next = cache.head;
       
  6581 		}
       
  6582 
       
  6583 		cache.head = node;
       
  6584 
       
  6585 		return node.val;
       
  6586 	}
       
  6587 
       
  6588 	callSelector.getDependants = getDependants;
       
  6589 	callSelector.clear = clear;
       
  6590 	clear();
       
  6591 
       
  6592 	return callSelector;
       
  6593 });
       
  6594 
       
  6595 
       
  6596 /***/ }),
       
  6597 
       
  6598 /***/ "pVnL":
       
  6599 /***/ (function(module, exports) {
       
  6600 
       
  6601 function _extends() {
       
  6602   module.exports = _extends = Object.assign || function (target) {
       
  6603     for (var i = 1; i < arguments.length; i++) {
       
  6604       var source = arguments[i];
       
  6605 
       
  6606       for (var key in source) {
       
  6607         if (Object.prototype.hasOwnProperty.call(source, key)) {
       
  6608           target[key] = source[key];
       
  6609         }
       
  6610       }
       
  6611     }
       
  6612 
       
  6613     return target;
       
  6614   };
       
  6615 
       
  6616   module.exports["default"] = module.exports, module.exports.__esModule = true;
       
  6617   return _extends.apply(this, arguments);
       
  6618 }
       
  6619 
       
  6620 module.exports = _extends;
       
  6621 module.exports["default"] = module.exports, module.exports.__esModule = true;
       
  6622 
       
  6623 /***/ }),
       
  6624 
       
  6625 /***/ "plpT":
       
  6626 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  6627 
       
  6628 "use strict";
       
  6629 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
  6630 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
  6631 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 11001 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  6632 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 11002 
  6633 
 11003 
  6634 
 11004 /**
  6635 /**
 11005  * WordPress dependencies
  6636  * WordPress dependencies
 11006  */
  6637  */
 11007 
  6638 
 11008 var alignCenter = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  6639 const alignCenter = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 11009   xmlns: "http://www.w3.org/2000/svg",
  6640   xmlns: "http://www.w3.org/2000/svg",
 11010   viewBox: "0 0 24 24"
  6641   viewBox: "0 0 24 24"
 11011 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  6642 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 11012   d: "M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"
  6643   d: "M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"
 11013 }));
  6644 }));
 11014 /* harmony default export */ __webpack_exports__["a"] = (alignCenter);
  6645 /* harmony default export */ __webpack_exports__["a"] = (alignCenter);
 11015 
  6646 
 11016 
  6647 
 11017 /***/ }),
  6648 /***/ }),
 11018 /* 289 */
  6649 
       
  6650 /***/ "qRz9":
       
  6651 /***/ (function(module, exports) {
       
  6652 
       
  6653 (function() { module.exports = window["wp"]["richText"]; }());
       
  6654 
       
  6655 /***/ }),
       
  6656 
       
  6657 /***/ "rH4q":
 11019 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  6658 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 11020 
  6659 
 11021 "use strict";
  6660 "use strict";
 11022 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  6661 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 11023 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  6662 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 11024 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
  6663 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 11025 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  6664 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 11026 
  6665 
 11027 
  6666 
 11028 /**
  6667 /**
 11029  * WordPress dependencies
  6668  * WordPress dependencies
 11030  */
  6669  */
 11031 
  6670 
 11032 var alignRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  6671 const media = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 11033   xmlns: "http://www.w3.org/2000/svg",
  6672   xmlns: "http://www.w3.org/2000/svg",
 11034   viewBox: "0 0 24 24"
  6673   viewBox: "0 0 24 24"
 11035 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
  6674 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 11036   d: "M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"
  6675   d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"
 11037 }));
  6676 }));
 11038 /* harmony default export */ __webpack_exports__["a"] = (alignRight);
  6677 /* harmony default export */ __webpack_exports__["a"] = (media);
 11039 
  6678 
 11040 
  6679 
 11041 /***/ }),
  6680 /***/ }),
 11042 /* 290 */
  6681 
 11043 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  6682 /***/ "rl8x":
 11044 
  6683 /***/ (function(module, exports) {
 11045 "use strict";
  6684 
 11046 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  6685 (function() { module.exports = window["wp"]["isShallowEqual"]; }());
 11047 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11048 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11049 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11050 
       
 11051 
       
 11052 /**
       
 11053  * WordPress dependencies
       
 11054  */
       
 11055 
       
 11056 var plus = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11057   xmlns: "http://www.w3.org/2000/svg",
       
 11058   viewBox: "0 0 24 24"
       
 11059 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11060   d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
       
 11061 }));
       
 11062 /* harmony default export */ __webpack_exports__["a"] = (plus);
       
 11063 
       
 11064 
  6686 
 11065 /***/ }),
  6687 /***/ }),
 11066 /* 291 */
  6688 
 11067 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  6689 /***/ "rmEH":
 11068 
  6690 /***/ (function(module, exports) {
 11069 "use strict";
  6691 
 11070 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  6692 (function() { module.exports = window["wp"]["htmlEntities"]; }());
 11071 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11072 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11073 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11074 
       
 11075 
       
 11076 /**
       
 11077  * WordPress dependencies
       
 11078  */
       
 11079 
       
 11080 var search = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11081   xmlns: "http://www.w3.org/2000/svg",
       
 11082   viewBox: "0 0 24 24"
       
 11083 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11084   d: "M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"
       
 11085 }));
       
 11086 /* harmony default export */ __webpack_exports__["a"] = (search);
       
 11087 
       
 11088 
  6693 
 11089 /***/ }),
  6694 /***/ }),
 11090 /* 292 */
  6695 
 11091 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  6696 /***/ "smQA":
 11092 
       
 11093 "use strict";
       
 11094 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 11095 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11096 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11097 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11098 
       
 11099 
       
 11100 /**
       
 11101  * WordPress dependencies
       
 11102  */
       
 11103 
       
 11104 var chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11105   xmlns: "http://www.w3.org/2000/svg",
       
 11106   viewBox: "0 0 24 24"
       
 11107 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11108   d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
       
 11109 }));
       
 11110 /* harmony default export */ __webpack_exports__["a"] = (chevronRight);
       
 11111 
       
 11112 
       
 11113 /***/ }),
       
 11114 /* 293 */
       
 11115 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11116 
       
 11117 "use strict";
       
 11118 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 11119 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11120 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11121 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11122 
       
 11123 
       
 11124 /**
       
 11125  * WordPress dependencies
       
 11126  */
       
 11127 
       
 11128 var chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11129   xmlns: "http://www.w3.org/2000/svg",
       
 11130   viewBox: "0 0 24 24"
       
 11131 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11132   d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
       
 11133 }));
       
 11134 /* harmony default export */ __webpack_exports__["a"] = (chevronLeft);
       
 11135 
       
 11136 
       
 11137 /***/ }),
       
 11138 /* 294 */
       
 11139 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11140 
       
 11141 "use strict";
       
 11142 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 11143 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11144 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11145 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11146 
       
 11147 
       
 11148 /**
       
 11149  * WordPress dependencies
       
 11150  */
       
 11151 
       
 11152 var chevronUp = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11153   viewBox: "0 0 24 24",
       
 11154   xmlns: "http://www.w3.org/2000/svg"
       
 11155 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11156   d: "M12 8l-6 5.4 1 1.2 5-4.6 5 4.6 1-1.2z"
       
 11157 }));
       
 11158 /* harmony default export */ __webpack_exports__["a"] = (chevronUp);
       
 11159 
       
 11160 
       
 11161 /***/ }),
       
 11162 /* 295 */
       
 11163 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11164 
       
 11165 "use strict";
       
 11166 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 11167 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11168 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11169 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11170 
       
 11171 
       
 11172 /**
       
 11173  * WordPress dependencies
       
 11174  */
       
 11175 
       
 11176 var chevronDown = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11177   viewBox: "0 0 24 24",
       
 11178   xmlns: "http://www.w3.org/2000/svg"
       
 11179 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11180   d: "M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"
       
 11181 }));
       
 11182 /* harmony default export */ __webpack_exports__["a"] = (chevronDown);
       
 11183 
       
 11184 
       
 11185 /***/ }),
       
 11186 /* 296 */
       
 11187 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11188 
       
 11189 "use strict";
       
 11190 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 11191 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11192 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11193 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11194 
       
 11195 
       
 11196 /**
       
 11197  * WordPress dependencies
       
 11198  */
       
 11199 
       
 11200 var moreVertical = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11201   xmlns: "http://www.w3.org/2000/svg",
       
 11202   viewBox: "0 0 24 24"
       
 11203 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11204   d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
       
 11205 }));
       
 11206 /* harmony default export */ __webpack_exports__["a"] = (moreVertical);
       
 11207 
       
 11208 
       
 11209 /***/ }),
       
 11210 /* 297 */
       
 11211 /***/ (function(module, exports, __webpack_require__) {
  6697 /***/ (function(module, exports, __webpack_require__) {
 11212 
  6698 
 11213 "use strict";
  6699 "use strict";
 11214 /*istanbul ignore start*/
  6700 /*istanbul ignore start*/
 11215 
  6701 
 11515   };
  7001   };
 11516 }
  7002 }
 11517 
  7003 
 11518 
  7004 
 11519 /***/ }),
  7005 /***/ }),
 11520 /* 298 */
  7006 
 11521 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  7007 /***/ "tI+e":
 11522 
  7008 /***/ (function(module, exports) {
 11523 "use strict";
  7009 
 11524 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  7010 (function() { module.exports = window["wp"]["components"]; }());
 11525 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11526 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11527 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11528 
       
 11529 
       
 11530 /**
       
 11531  * WordPress dependencies
       
 11532  */
       
 11533 
       
 11534 var layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11535   xmlns: "http://www.w3.org/2000/svg",
       
 11536   viewBox: "-2 -2 24 24"
       
 11537 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11538   d: "M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"
       
 11539 }));
       
 11540 /* harmony default export */ __webpack_exports__["a"] = (layout);
       
 11541 
       
 11542 
  7011 
 11543 /***/ }),
  7012 /***/ }),
 11544 /* 299 */
  7013 
 11545 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  7014 /***/ "tr0p":
 11546 
       
 11547 "use strict";
       
 11548 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 11549 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11550 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11551 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11552 
       
 11553 
       
 11554 /**
       
 11555  * WordPress dependencies
       
 11556  */
       
 11557 
       
 11558 var pencil = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11559   xmlns: "http://www.w3.org/2000/svg",
       
 11560   viewBox: "-2 -2 24 24"
       
 11561 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11562   d: "M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6zM13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"
       
 11563 }));
       
 11564 /* harmony default export */ __webpack_exports__["a"] = (pencil);
       
 11565 
       
 11566 
       
 11567 /***/ }),
       
 11568 /* 300 */
       
 11569 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11570 
       
 11571 "use strict";
       
 11572 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
 11573 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11574 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
 11575 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11576 
       
 11577 
       
 11578 /**
       
 11579  * WordPress dependencies
       
 11580  */
       
 11581 
       
 11582 var edit = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11583   xmlns: "http://www.w3.org/2000/svg",
       
 11584   viewBox: "0 0 24 24"
       
 11585 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11586   d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"
       
 11587 }));
       
 11588 /* harmony default export */ __webpack_exports__["a"] = (edit);
       
 11589 
       
 11590 
       
 11591 /***/ }),
       
 11592 /* 301 */,
       
 11593 /* 302 */,
       
 11594 /* 303 */,
       
 11595 /* 304 */,
       
 11596 /* 305 */,
       
 11597 /* 306 */,
       
 11598 /* 307 */,
       
 11599 /* 308 */,
       
 11600 /* 309 */,
       
 11601 /* 310 */,
       
 11602 /* 311 */,
       
 11603 /* 312 */,
       
 11604 /* 313 */,
       
 11605 /* 314 */,
       
 11606 /* 315 */,
       
 11607 /* 316 */,
       
 11608 /* 317 */,
       
 11609 /* 318 */,
       
 11610 /* 319 */,
       
 11611 /* 320 */,
       
 11612 /* 321 */,
       
 11613 /* 322 */,
       
 11614 /* 323 */,
       
 11615 /* 324 */,
       
 11616 /* 325 */,
       
 11617 /* 326 */,
       
 11618 /* 327 */,
       
 11619 /* 328 */,
       
 11620 /* 329 */,
       
 11621 /* 330 */,
       
 11622 /* 331 */,
       
 11623 /* 332 */,
       
 11624 /* 333 */,
       
 11625 /* 334 */,
       
 11626 /* 335 */,
       
 11627 /* 336 */,
       
 11628 /* 337 */,
       
 11629 /* 338 */,
       
 11630 /* 339 */,
       
 11631 /* 340 */,
       
 11632 /* 341 */,
       
 11633 /* 342 */,
       
 11634 /* 343 */,
       
 11635 /* 344 */,
       
 11636 /* 345 */,
       
 11637 /* 346 */,
       
 11638 /* 347 */,
       
 11639 /* 348 */,
       
 11640 /* 349 */,
       
 11641 /* 350 */,
       
 11642 /* 351 */,
       
 11643 /* 352 */,
       
 11644 /* 353 */,
       
 11645 /* 354 */,
       
 11646 /* 355 */,
       
 11647 /* 356 */,
       
 11648 /* 357 */,
       
 11649 /* 358 */,
       
 11650 /* 359 */,
       
 11651 /* 360 */,
       
 11652 /* 361 */,
       
 11653 /* 362 */,
       
 11654 /* 363 */,
       
 11655 /* 364 */,
       
 11656 /* 365 */,
       
 11657 /* 366 */,
       
 11658 /* 367 */,
       
 11659 /* 368 */,
       
 11660 /* 369 */,
       
 11661 /* 370 */,
       
 11662 /* 371 */,
       
 11663 /* 372 */,
       
 11664 /* 373 */,
       
 11665 /* 374 */,
       
 11666 /* 375 */,
       
 11667 /* 376 */,
       
 11668 /* 377 */,
       
 11669 /* 378 */,
       
 11670 /* 379 */,
       
 11671 /* 380 */,
       
 11672 /* 381 */,
       
 11673 /* 382 */,
       
 11674 /* 383 */,
       
 11675 /* 384 */,
       
 11676 /* 385 */,
       
 11677 /* 386 */,
       
 11678 /* 387 */,
       
 11679 /* 388 */,
       
 11680 /* 389 */,
       
 11681 /* 390 */,
       
 11682 /* 391 */,
       
 11683 /* 392 */,
       
 11684 /* 393 */,
       
 11685 /* 394 */,
       
 11686 /* 395 */,
       
 11687 /* 396 */,
       
 11688 /* 397 */,
       
 11689 /* 398 */,
       
 11690 /* 399 */,
       
 11691 /* 400 */,
       
 11692 /* 401 */,
       
 11693 /* 402 */,
       
 11694 /* 403 */,
       
 11695 /* 404 */,
       
 11696 /* 405 */,
       
 11697 /* 406 */,
       
 11698 /* 407 */,
       
 11699 /* 408 */,
       
 11700 /* 409 */,
       
 11701 /* 410 */,
       
 11702 /* 411 */,
       
 11703 /* 412 */,
       
 11704 /* 413 */,
       
 11705 /* 414 */,
       
 11706 /* 415 */,
       
 11707 /* 416 */,
       
 11708 /* 417 */,
       
 11709 /* 418 */,
       
 11710 /* 419 */,
       
 11711 /* 420 */,
       
 11712 /* 421 */,
       
 11713 /* 422 */,
       
 11714 /* 423 */,
       
 11715 /* 424 */,
       
 11716 /* 425 */,
       
 11717 /* 426 */,
       
 11718 /* 427 */,
       
 11719 /* 428 */,
       
 11720 /* 429 */,
       
 11721 /* 430 */,
       
 11722 /* 431 */,
       
 11723 /* 432 */,
       
 11724 /* 433 */,
       
 11725 /* 434 */,
       
 11726 /* 435 */,
       
 11727 /* 436 */,
       
 11728 /* 437 */
       
 11729 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  7015 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 11730 
  7016 
 11731 "use strict";
  7017 "use strict";
 11732 // ESM COMPAT FLAG
  7018 // ESM COMPAT FLAG
 11733 __webpack_require__.r(__webpack_exports__);
  7019 __webpack_require__.r(__webpack_exports__);
 11734 
  7020 
 11735 // EXPORTS
  7021 // EXPORTS
 11736 __webpack_require__.d(__webpack_exports__, "__experimentalAlignmentHookSettingsProvider", function() { return /* reexport */ AlignmentHookSettingsProvider; });
  7022 __webpack_require__.d(__webpack_exports__, "__experimentalGetBorderClassesAndStyles", function() { return /* reexport */ getBorderClassesAndStyles; });
       
  7023 __webpack_require__.d(__webpack_exports__, "__experimentalUseBorderProps", function() { return /* reexport */ useBorderProps; });
       
  7024 __webpack_require__.d(__webpack_exports__, "__experimentalGetColorClassesAndStyles", function() { return /* reexport */ getColorClassesAndStyles; });
       
  7025 __webpack_require__.d(__webpack_exports__, "__experimentalUseColorProps", function() { return /* reexport */ useColorProps; });
       
  7026 __webpack_require__.d(__webpack_exports__, "__experimentalUseCustomSides", function() { return /* reexport */ useCustomSides; });
 11737 __webpack_require__.d(__webpack_exports__, "getColorClassName", function() { return /* reexport */ getColorClassName; });
  7027 __webpack_require__.d(__webpack_exports__, "getColorClassName", function() { return /* reexport */ getColorClassName; });
 11738 __webpack_require__.d(__webpack_exports__, "getColorObjectByAttributeValues", function() { return /* reexport */ utils_getColorObjectByAttributeValues; });
  7028 __webpack_require__.d(__webpack_exports__, "getColorObjectByAttributeValues", function() { return /* reexport */ getColorObjectByAttributeValues; });
 11739 __webpack_require__.d(__webpack_exports__, "getColorObjectByColorValue", function() { return /* reexport */ utils_getColorObjectByColorValue; });
  7029 __webpack_require__.d(__webpack_exports__, "getColorObjectByColorValue", function() { return /* reexport */ getColorObjectByColorValue; });
 11740 __webpack_require__.d(__webpack_exports__, "createCustomColorsHOC", function() { return /* reexport */ createCustomColorsHOC; });
  7030 __webpack_require__.d(__webpack_exports__, "createCustomColorsHOC", function() { return /* reexport */ createCustomColorsHOC; });
 11741 __webpack_require__.d(__webpack_exports__, "withColors", function() { return /* reexport */ withColors; });
  7031 __webpack_require__.d(__webpack_exports__, "withColors", function() { return /* reexport */ withColors; });
 11742 __webpack_require__.d(__webpack_exports__, "__experimentalUseColors", function() { return /* reexport */ __experimentalUseColors; });
  7032 __webpack_require__.d(__webpack_exports__, "__experimentalUseColors", function() { return /* reexport */ __experimentalUseColors; });
 11743 __webpack_require__.d(__webpack_exports__, "__experimentalGetGradientClass", function() { return /* reexport */ __experimentalGetGradientClass; });
  7033 __webpack_require__.d(__webpack_exports__, "__experimentalGetGradientClass", function() { return /* reexport */ __experimentalGetGradientClass; });
 11744 __webpack_require__.d(__webpack_exports__, "getGradientValueBySlug", function() { return /* reexport */ getGradientValueBySlug; });
  7034 __webpack_require__.d(__webpack_exports__, "getGradientValueBySlug", function() { return /* reexport */ getGradientValueBySlug; });
 11745 __webpack_require__.d(__webpack_exports__, "__experimentalGetGradientObjectByGradientValue", function() { return /* reexport */ __experimentalGetGradientObjectByGradientValue; });
  7035 __webpack_require__.d(__webpack_exports__, "__experimentalGetGradientObjectByGradientValue", function() { return /* reexport */ __experimentalGetGradientObjectByGradientValue; });
 11746 __webpack_require__.d(__webpack_exports__, "getGradientSlugByValue", function() { return /* reexport */ getGradientSlugByValue; });
  7036 __webpack_require__.d(__webpack_exports__, "getGradientSlugByValue", function() { return /* reexport */ getGradientSlugByValue; });
 11747 __webpack_require__.d(__webpack_exports__, "__experimentalUseGradient", function() { return /* reexport */ __experimentalUseGradient; });
  7037 __webpack_require__.d(__webpack_exports__, "__experimentalUseGradient", function() { return /* reexport */ __experimentalUseGradient; });
 11748 __webpack_require__.d(__webpack_exports__, "getFontSize", function() { return /* reexport */ utils_getFontSize; });
  7038 __webpack_require__.d(__webpack_exports__, "getFontSize", function() { return /* reexport */ getFontSize; });
 11749 __webpack_require__.d(__webpack_exports__, "getFontSizeClass", function() { return /* reexport */ getFontSizeClass; });
  7039 __webpack_require__.d(__webpack_exports__, "getFontSizeClass", function() { return /* reexport */ getFontSizeClass; });
 11750 __webpack_require__.d(__webpack_exports__, "getFontSizeObjectByValue", function() { return /* reexport */ getFontSizeObjectByValue; });
  7040 __webpack_require__.d(__webpack_exports__, "getFontSizeObjectByValue", function() { return /* reexport */ getFontSizeObjectByValue; });
 11751 __webpack_require__.d(__webpack_exports__, "FontSizePicker", function() { return /* reexport */ font_size_picker; });
  7041 __webpack_require__.d(__webpack_exports__, "FontSizePicker", function() { return /* reexport */ font_size_picker; });
 11752 __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return /* reexport */ with_font_sizes; });
  7042 __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return /* reexport */ with_font_sizes; });
 11753 __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return /* reexport */ alignment_toolbar; });
  7043 __webpack_require__.d(__webpack_exports__, "AlignmentControl", function() { return /* reexport */ AlignmentControl; });
       
  7044 __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return /* reexport */ AlignmentToolbar; });
 11754 __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return /* reexport */ autocomplete; });
  7045 __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return /* reexport */ autocomplete; });
 11755 __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return /* reexport */ block_alignment_toolbar; });
  7046 __webpack_require__.d(__webpack_exports__, "BlockAlignmentControl", function() { return /* reexport */ BlockAlignmentControl; });
 11756 __webpack_require__.d(__webpack_exports__, "__experimentalBlockAlignmentMatrixToolbar", function() { return /* reexport */ block_alignment_matrix_toolbar; });
  7047 __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return /* reexport */ BlockAlignmentToolbar; });
       
  7048 __webpack_require__.d(__webpack_exports__, "__experimentalBlockFullHeightAligmentControl", function() { return /* reexport */ block_full_height_alignment_control; });
       
  7049 __webpack_require__.d(__webpack_exports__, "__experimentalBlockAlignmentMatrixControl", function() { return /* reexport */ block_alignment_matrix_control; });
 11757 __webpack_require__.d(__webpack_exports__, "BlockBreadcrumb", function() { return /* reexport */ block_breadcrumb; });
  7050 __webpack_require__.d(__webpack_exports__, "BlockBreadcrumb", function() { return /* reexport */ block_breadcrumb; });
 11758 __webpack_require__.d(__webpack_exports__, "BlockContextProvider", function() { return /* reexport */ BlockContextProvider; });
  7051 __webpack_require__.d(__webpack_exports__, "BlockContextProvider", function() { return /* reexport */ BlockContextProvider; });
 11759 __webpack_require__.d(__webpack_exports__, "BlockControls", function() { return /* reexport */ block_controls; });
  7052 __webpack_require__.d(__webpack_exports__, "BlockControls", function() { return /* reexport */ block_controls; });
       
  7053 __webpack_require__.d(__webpack_exports__, "BlockFormatControls", function() { return /* reexport */ BlockFormatControls; });
 11760 __webpack_require__.d(__webpack_exports__, "BlockColorsStyleSelector", function() { return /* reexport */ color_style_selector; });
  7054 __webpack_require__.d(__webpack_exports__, "BlockColorsStyleSelector", function() { return /* reexport */ color_style_selector; });
 11761 __webpack_require__.d(__webpack_exports__, "BlockEdit", function() { return /* reexport */ block_edit_BlockEdit; });
  7055 __webpack_require__.d(__webpack_exports__, "BlockEdit", function() { return /* reexport */ block_edit_BlockEdit; });
 11762 __webpack_require__.d(__webpack_exports__, "useBlockEditContext", function() { return /* reexport */ useBlockEditContext; });
  7056 __webpack_require__.d(__webpack_exports__, "useBlockEditContext", function() { return /* reexport */ useBlockEditContext; });
 11763 __webpack_require__.d(__webpack_exports__, "BlockFormatControls", function() { return /* reexport */ block_format_controls; });
       
 11764 __webpack_require__.d(__webpack_exports__, "BlockIcon", function() { return /* reexport */ BlockIcon; });
  7057 __webpack_require__.d(__webpack_exports__, "BlockIcon", function() { return /* reexport */ BlockIcon; });
 11765 __webpack_require__.d(__webpack_exports__, "BlockNavigationDropdown", function() { return /* reexport */ dropdown; });
  7058 __webpack_require__.d(__webpack_exports__, "BlockNavigationDropdown", function() { return /* reexport */ dropdown; });
 11766 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationBlockFill", function() { return /* reexport */ block_slot_BlockNavigationBlockFill; });
  7059 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationBlockFill", function() { return /* reexport */ BlockNavigationBlockFill; });
 11767 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationEditor", function() { return /* reexport */ BlockNavigationEditor; });
  7060 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationEditor", function() { return /* reexport */ BlockNavigationEditor; });
 11768 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationTree", function() { return /* reexport */ BlockNavigationTree; });
  7061 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationTree", function() { return /* reexport */ BlockNavigationTree; });
 11769 __webpack_require__.d(__webpack_exports__, "__experimentalBlockVariationPicker", function() { return /* reexport */ block_variation_picker; });
  7062 __webpack_require__.d(__webpack_exports__, "__experimentalBlockVariationPicker", function() { return /* reexport */ block_variation_picker; });
 11770 __webpack_require__.d(__webpack_exports__, "BlockVerticalAlignmentToolbar", function() { return /* reexport */ block_vertical_alignment_toolbar; });
  7063 __webpack_require__.d(__webpack_exports__, "__experimentalBlockPatternSetup", function() { return /* reexport */ block_pattern_setup; });
 11771 __webpack_require__.d(__webpack_exports__, "ButtonBlockerAppender", function() { return /* reexport */ button_block_appender; });
  7064 __webpack_require__.d(__webpack_exports__, "__experimentalBlockVariationTransforms", function() { return /* reexport */ block_variation_transforms; });
       
  7065 __webpack_require__.d(__webpack_exports__, "BlockVerticalAlignmentToolbar", function() { return /* reexport */ BlockVerticalAlignmentToolbar; });
       
  7066 __webpack_require__.d(__webpack_exports__, "BlockVerticalAlignmentControl", function() { return /* reexport */ BlockVerticalAlignmentControl; });
       
  7067 __webpack_require__.d(__webpack_exports__, "__experimentalBorderStyleControl", function() { return /* reexport */ BorderStyleControl; });
       
  7068 __webpack_require__.d(__webpack_exports__, "ButtonBlockerAppender", function() { return /* reexport */ ButtonBlockerAppender; });
       
  7069 __webpack_require__.d(__webpack_exports__, "ButtonBlockAppender", function() { return /* reexport */ button_block_appender; });
 11772 __webpack_require__.d(__webpack_exports__, "ColorPalette", function() { return /* reexport */ color_palette; });
  7070 __webpack_require__.d(__webpack_exports__, "ColorPalette", function() { return /* reexport */ color_palette; });
 11773 __webpack_require__.d(__webpack_exports__, "ColorPaletteControl", function() { return /* reexport */ ColorPaletteControl; });
  7071 __webpack_require__.d(__webpack_exports__, "ColorPaletteControl", function() { return /* reexport */ ColorPaletteControl; });
 11774 __webpack_require__.d(__webpack_exports__, "ContrastChecker", function() { return /* reexport */ contrast_checker; });
  7072 __webpack_require__.d(__webpack_exports__, "ContrastChecker", function() { return /* reexport */ contrast_checker; });
       
  7073 __webpack_require__.d(__webpack_exports__, "__experimentalDuotoneControl", function() { return /* reexport */ duotone_control; });
 11775 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPicker", function() { return /* reexport */ gradient_picker; });
  7074 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPicker", function() { return /* reexport */ gradient_picker; });
 11776 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPickerControl", function() { return /* reexport */ GradientPickerControl; });
  7075 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPickerControl", function() { return /* reexport */ GradientPickerControl; });
 11777 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPickerPanel", function() { return /* reexport */ GradientPanel; });
  7076 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPickerPanel", function() { return /* reexport */ GradientPanel; });
       
  7077 __webpack_require__.d(__webpack_exports__, "__experimentalFontAppearanceControl", function() { return /* reexport */ FontAppearanceControl; });
       
  7078 __webpack_require__.d(__webpack_exports__, "__experimentalFontFamilyControl", function() { return /* reexport */ FontFamilyControl; });
 11778 __webpack_require__.d(__webpack_exports__, "__experimentalColorGradientControl", function() { return /* reexport */ control; });
  7079 __webpack_require__.d(__webpack_exports__, "__experimentalColorGradientControl", function() { return /* reexport */ control; });
 11779 __webpack_require__.d(__webpack_exports__, "__experimentalPanelColorGradientSettings", function() { return /* reexport */ panel_color_gradient_settings; });
  7080 __webpack_require__.d(__webpack_exports__, "__experimentalPanelColorGradientSettings", function() { return /* reexport */ panel_color_gradient_settings; });
 11780 __webpack_require__.d(__webpack_exports__, "__experimentalImageSizeControl", function() { return /* reexport */ ImageSizeControl; });
  7081 __webpack_require__.d(__webpack_exports__, "__experimentalImageSizeControl", function() { return /* reexport */ ImageSizeControl; });
 11781 __webpack_require__.d(__webpack_exports__, "InnerBlocks", function() { return /* reexport */ inner_blocks; });
  7082 __webpack_require__.d(__webpack_exports__, "InnerBlocks", function() { return /* reexport */ inner_blocks; });
       
  7083 __webpack_require__.d(__webpack_exports__, "__experimentalUseInnerBlocksProps", function() { return /* reexport */ useInnerBlocksProps; });
 11782 __webpack_require__.d(__webpack_exports__, "InspectorAdvancedControls", function() { return /* reexport */ inspector_advanced_controls; });
  7084 __webpack_require__.d(__webpack_exports__, "InspectorAdvancedControls", function() { return /* reexport */ inspector_advanced_controls; });
 11783 __webpack_require__.d(__webpack_exports__, "InspectorControls", function() { return /* reexport */ inspector_controls; });
  7085 __webpack_require__.d(__webpack_exports__, "InspectorControls", function() { return /* reexport */ inspector_controls; });
       
  7086 __webpack_require__.d(__webpack_exports__, "JustifyToolbar", function() { return /* reexport */ JustifyToolbar; });
       
  7087 __webpack_require__.d(__webpack_exports__, "JustifyContentControl", function() { return /* reexport */ JustifyContentControl; });
 11784 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControl", function() { return /* reexport */ link_control; });
  7088 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControl", function() { return /* reexport */ link_control; });
 11785 __webpack_require__.d(__webpack_exports__, "__experimentalLineHeightControl", function() { return /* reexport */ LineHeightControl; });
  7089 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControlSearchInput", function() { return /* reexport */ search_input; });
       
  7090 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControlSearchResults", function() { return /* reexport */ LinkControlSearchResults; });
       
  7091 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControlSearchItem", function() { return /* reexport */ search_item; });
       
  7092 __webpack_require__.d(__webpack_exports__, "LineHeightControl", function() { return /* reexport */ LineHeightControl; });
 11786 __webpack_require__.d(__webpack_exports__, "MediaReplaceFlow", function() { return /* reexport */ media_replace_flow; });
  7093 __webpack_require__.d(__webpack_exports__, "MediaReplaceFlow", function() { return /* reexport */ media_replace_flow; });
 11787 __webpack_require__.d(__webpack_exports__, "MediaPlaceholder", function() { return /* reexport */ media_placeholder; });
  7094 __webpack_require__.d(__webpack_exports__, "MediaPlaceholder", function() { return /* reexport */ media_placeholder; });
 11788 __webpack_require__.d(__webpack_exports__, "MediaUpload", function() { return /* reexport */ media_upload; });
  7095 __webpack_require__.d(__webpack_exports__, "MediaUpload", function() { return /* reexport */ media_upload; });
 11789 __webpack_require__.d(__webpack_exports__, "MediaUploadCheck", function() { return /* reexport */ check; });
  7096 __webpack_require__.d(__webpack_exports__, "MediaUploadCheck", function() { return /* reexport */ check; });
 11790 __webpack_require__.d(__webpack_exports__, "PanelColorSettings", function() { return /* reexport */ panel_color_settings; });
  7097 __webpack_require__.d(__webpack_exports__, "PanelColorSettings", function() { return /* reexport */ panel_color_settings; });
 11797 __webpack_require__.d(__webpack_exports__, "ToolSelector", function() { return /* reexport */ tool_selector; });
  7104 __webpack_require__.d(__webpack_exports__, "ToolSelector", function() { return /* reexport */ tool_selector; });
 11798 __webpack_require__.d(__webpack_exports__, "__experimentalUnitControl", function() { return /* reexport */ UnitControl; });
  7105 __webpack_require__.d(__webpack_exports__, "__experimentalUnitControl", function() { return /* reexport */ UnitControl; });
 11799 __webpack_require__.d(__webpack_exports__, "URLInput", function() { return /* reexport */ url_input; });
  7106 __webpack_require__.d(__webpack_exports__, "URLInput", function() { return /* reexport */ url_input; });
 11800 __webpack_require__.d(__webpack_exports__, "URLInputButton", function() { return /* reexport */ url_input_button; });
  7107 __webpack_require__.d(__webpack_exports__, "URLInputButton", function() { return /* reexport */ url_input_button; });
 11801 __webpack_require__.d(__webpack_exports__, "URLPopover", function() { return /* reexport */ url_popover; });
  7108 __webpack_require__.d(__webpack_exports__, "URLPopover", function() { return /* reexport */ url_popover; });
 11802 __webpack_require__.d(__webpack_exports__, "__experimentalImageURLInputUI", function() { return /* reexport */ image_url_input_ui_ImageURLInputUI; });
  7109 __webpack_require__.d(__webpack_exports__, "__experimentalImageURLInputUI", function() { return /* reexport */ ImageURLInputUI; });
 11803 __webpack_require__.d(__webpack_exports__, "withColorContext", function() { return /* reexport */ with_color_context; });
  7110 __webpack_require__.d(__webpack_exports__, "withColorContext", function() { return /* reexport */ with_color_context; });
 11804 __webpack_require__.d(__webpack_exports__, "__experimentalBlockSettingsMenuFirstItem", function() { return /* reexport */ block_settings_menu_first_item; });
  7111 __webpack_require__.d(__webpack_exports__, "__unstableBlockSettingsMenuFirstItem", function() { return /* reexport */ block_settings_menu_first_item; });
 11805 __webpack_require__.d(__webpack_exports__, "__experimentalInserterMenuExtension", function() { return /* reexport */ inserter_menu_extension; });
  7112 __webpack_require__.d(__webpack_exports__, "__unstableInserterMenuExtension", function() { return /* reexport */ inserter_menu_extension; });
 11806 __webpack_require__.d(__webpack_exports__, "__experimentalPreviewOptions", function() { return /* reexport */ PreviewOptions; });
  7113 __webpack_require__.d(__webpack_exports__, "__experimentalPreviewOptions", function() { return /* reexport */ PreviewOptions; });
 11807 __webpack_require__.d(__webpack_exports__, "__experimentalUseResizeCanvas", function() { return /* reexport */ useResizeCanvas; });
  7114 __webpack_require__.d(__webpack_exports__, "__experimentalUseResizeCanvas", function() { return /* reexport */ useResizeCanvas; });
 11808 __webpack_require__.d(__webpack_exports__, "BlockInspector", function() { return /* reexport */ block_inspector; });
  7115 __webpack_require__.d(__webpack_exports__, "BlockInspector", function() { return /* reexport */ block_inspector; });
 11809 __webpack_require__.d(__webpack_exports__, "BlockList", function() { return /* reexport */ block_list; });
  7116 __webpack_require__.d(__webpack_exports__, "BlockList", function() { return /* reexport */ BlockList; });
 11810 __webpack_require__.d(__webpack_exports__, "__experimentalBlock", function() { return /* reexport */ Block; });
  7117 __webpack_require__.d(__webpack_exports__, "useBlockProps", function() { return /* reexport */ useBlockProps; });
       
  7118 __webpack_require__.d(__webpack_exports__, "__experimentalLayoutStyle", function() { return /* reexport */ LayoutStyle; });
 11811 __webpack_require__.d(__webpack_exports__, "BlockMover", function() { return /* reexport */ block_mover; });
  7119 __webpack_require__.d(__webpack_exports__, "BlockMover", function() { return /* reexport */ block_mover; });
 11812 __webpack_require__.d(__webpack_exports__, "BlockPreview", function() { return /* reexport */ block_preview; });
  7120 __webpack_require__.d(__webpack_exports__, "BlockPreview", function() { return /* reexport */ block_preview; });
 11813 __webpack_require__.d(__webpack_exports__, "BlockSelectionClearer", function() { return /* reexport */ block_selection_clearer; });
  7121 __webpack_require__.d(__webpack_exports__, "BlockSelectionClearer", function() { return /* reexport */ BlockSelectionClearer; });
       
  7122 __webpack_require__.d(__webpack_exports__, "__unstableUseBlockSelectionClearer", function() { return /* reexport */ useBlockSelectionClearer; });
 11814 __webpack_require__.d(__webpack_exports__, "BlockSettingsMenu", function() { return /* reexport */ block_settings_menu; });
  7123 __webpack_require__.d(__webpack_exports__, "BlockSettingsMenu", function() { return /* reexport */ block_settings_menu; });
 11815 __webpack_require__.d(__webpack_exports__, "BlockSettingsMenuControls", function() { return /* reexport */ block_settings_menu_controls; });
  7124 __webpack_require__.d(__webpack_exports__, "BlockSettingsMenuControls", function() { return /* reexport */ block_settings_menu_controls; });
 11816 __webpack_require__.d(__webpack_exports__, "BlockTitle", function() { return /* reexport */ BlockTitle; });
  7125 __webpack_require__.d(__webpack_exports__, "BlockTitle", function() { return /* reexport */ BlockTitle; });
 11817 __webpack_require__.d(__webpack_exports__, "BlockToolbar", function() { return /* reexport */ BlockToolbar; });
  7126 __webpack_require__.d(__webpack_exports__, "BlockToolbar", function() { return /* reexport */ BlockToolbar; });
       
  7127 __webpack_require__.d(__webpack_exports__, "BlockTools", function() { return /* reexport */ BlockTools; });
 11818 __webpack_require__.d(__webpack_exports__, "CopyHandler", function() { return /* reexport */ copy_handler; });
  7128 __webpack_require__.d(__webpack_exports__, "CopyHandler", function() { return /* reexport */ copy_handler; });
       
  7129 __webpack_require__.d(__webpack_exports__, "__unstableUseClipboardHandler", function() { return /* reexport */ useClipboardHandler; });
 11819 __webpack_require__.d(__webpack_exports__, "DefaultBlockAppender", function() { return /* reexport */ default_block_appender; });
  7130 __webpack_require__.d(__webpack_exports__, "DefaultBlockAppender", function() { return /* reexport */ default_block_appender; });
 11820 __webpack_require__.d(__webpack_exports__, "__unstableEditorStyles", function() { return /* reexport */ editor_styles; });
  7131 __webpack_require__.d(__webpack_exports__, "__unstableEditorStyles", function() { return /* reexport */ EditorStyles; });
 11821 __webpack_require__.d(__webpack_exports__, "Inserter", function() { return /* reexport */ inserter; });
  7132 __webpack_require__.d(__webpack_exports__, "Inserter", function() { return /* reexport */ inserter; });
 11822 __webpack_require__.d(__webpack_exports__, "__experimentalLibrary", function() { return /* reexport */ library; });
  7133 __webpack_require__.d(__webpack_exports__, "__experimentalLibrary", function() { return /* reexport */ library; });
 11823 __webpack_require__.d(__webpack_exports__, "__experimentalSearchForm", function() { return /* reexport */ search_form; });
  7134 __webpack_require__.d(__webpack_exports__, "__experimentalSearchForm", function() { return /* reexport */ search_form; });
 11824 __webpack_require__.d(__webpack_exports__, "BlockEditorKeyboardShortcuts", function() { return /* reexport */ keyboard_shortcuts; });
  7135 __webpack_require__.d(__webpack_exports__, "BlockEditorKeyboardShortcuts", function() { return /* reexport */ keyboard_shortcuts; });
 11825 __webpack_require__.d(__webpack_exports__, "MultiSelectScrollIntoView", function() { return /* reexport */ MultiSelectScrollIntoView; });
  7136 __webpack_require__.d(__webpack_exports__, "MultiSelectScrollIntoView", function() { return /* reexport */ MultiSelectScrollIntoView; });
 11826 __webpack_require__.d(__webpack_exports__, "NavigableToolbar", function() { return /* reexport */ navigable_toolbar; });
  7137 __webpack_require__.d(__webpack_exports__, "NavigableToolbar", function() { return /* reexport */ navigable_toolbar; });
 11827 __webpack_require__.d(__webpack_exports__, "ObserveTyping", function() { return /* reexport */ observe_typing; });
  7138 __webpack_require__.d(__webpack_exports__, "ObserveTyping", function() { return /* reexport */ observe_typing; });
       
  7139 __webpack_require__.d(__webpack_exports__, "__unstableUseTypingObserver", function() { return /* reexport */ useTypingObserver; });
       
  7140 __webpack_require__.d(__webpack_exports__, "__unstableUseMouseMoveTypingReset", function() { return /* reexport */ useMouseMoveTypingReset; });
 11828 __webpack_require__.d(__webpack_exports__, "PreserveScrollInReorder", function() { return /* reexport */ PreserveScrollInReorder; });
  7141 __webpack_require__.d(__webpack_exports__, "PreserveScrollInReorder", function() { return /* reexport */ PreserveScrollInReorder; });
 11829 __webpack_require__.d(__webpack_exports__, "SkipToSelectedBlock", function() { return /* reexport */ skip_to_selected_block; });
  7142 __webpack_require__.d(__webpack_exports__, "SkipToSelectedBlock", function() { return /* reexport */ skip_to_selected_block; });
 11830 __webpack_require__.d(__webpack_exports__, "Typewriter", function() { return /* reexport */ typewriter; });
  7143 __webpack_require__.d(__webpack_exports__, "Typewriter", function() { return /* reexport */ typewriter; });
       
  7144 __webpack_require__.d(__webpack_exports__, "__unstableUseTypewriter", function() { return /* reexport */ useTypewriter; });
 11831 __webpack_require__.d(__webpack_exports__, "Warning", function() { return /* reexport */ warning; });
  7145 __webpack_require__.d(__webpack_exports__, "Warning", function() { return /* reexport */ warning; });
 11832 __webpack_require__.d(__webpack_exports__, "WritingFlow", function() { return /* reexport */ WritingFlow; });
  7146 __webpack_require__.d(__webpack_exports__, "WritingFlow", function() { return /* reexport */ writing_flow; });
       
  7147 __webpack_require__.d(__webpack_exports__, "__unstableUseCanvasClickRedirect", function() { return /* reexport */ useCanvasClickRedirect; });
       
  7148 __webpack_require__.d(__webpack_exports__, "useBlockDisplayInformation", function() { return /* reexport */ useBlockDisplayInformation; });
       
  7149 __webpack_require__.d(__webpack_exports__, "__unstableIframe", function() { return /* reexport */ iframe; });
       
  7150 __webpack_require__.d(__webpack_exports__, "__experimentalUseNoRecursiveRenders", function() { return /* reexport */ useNoRecursiveRenders; });
 11833 __webpack_require__.d(__webpack_exports__, "BlockEditorProvider", function() { return /* reexport */ provider; });
  7151 __webpack_require__.d(__webpack_exports__, "BlockEditorProvider", function() { return /* reexport */ provider; });
 11834 __webpack_require__.d(__webpack_exports__, "__experimentalUseSimulatedMediaQuery", function() { return /* reexport */ useSimulatedMediaQuery; });
  7152 __webpack_require__.d(__webpack_exports__, "__experimentalUseSimulatedMediaQuery", function() { return /* reexport */ useSimulatedMediaQuery; });
 11835 __webpack_require__.d(__webpack_exports__, "__experimentalUseEditorFeature", function() { return /* reexport */ useEditorFeature; });
  7153 __webpack_require__.d(__webpack_exports__, "useSetting", function() { return /* reexport */ useSetting; });
 11836 __webpack_require__.d(__webpack_exports__, "transformStyles", function() { return /* reexport */ transform_styles; });
  7154 __webpack_require__.d(__webpack_exports__, "transformStyles", function() { return /* reexport */ transform_styles; });
       
  7155 __webpack_require__.d(__webpack_exports__, "validateThemeColors", function() { return /* reexport */ validateThemeColors; });
       
  7156 __webpack_require__.d(__webpack_exports__, "validateThemeGradients", function() { return /* reexport */ validateThemeGradients; });
       
  7157 __webpack_require__.d(__webpack_exports__, "__experimentalGetMatchingVariation", function() { return /* reexport */ __experimentalGetMatchingVariation; });
 11837 __webpack_require__.d(__webpack_exports__, "storeConfig", function() { return /* reexport */ storeConfig; });
  7158 __webpack_require__.d(__webpack_exports__, "storeConfig", function() { return /* reexport */ storeConfig; });
       
  7159 __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
 11838 __webpack_require__.d(__webpack_exports__, "SETTINGS_DEFAULTS", function() { return /* reexport */ SETTINGS_DEFAULTS; });
  7160 __webpack_require__.d(__webpack_exports__, "SETTINGS_DEFAULTS", function() { return /* reexport */ SETTINGS_DEFAULTS; });
       
  7161 
       
  7162 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-editor/build-module/store/selectors.js
       
  7163 var selectors_namespaceObject = {};
       
  7164 __webpack_require__.r(selectors_namespaceObject);
       
  7165 __webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return selectors_getBlockName; });
       
  7166 __webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return selectors_isBlockValid; });
       
  7167 __webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return selectors_getBlockAttributes; });
       
  7168 __webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; });
       
  7169 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return selectors_unstableGetBlockWithoutInnerBlocks; });
       
  7170 __webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
       
  7171 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithBlockTree", function() { return __unstableGetBlockWithBlockTree; });
       
  7172 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockTree", function() { return __unstableGetBlockTree; });
       
  7173 __webpack_require__.d(selectors_namespaceObject, "__unstableGetClientIdWithClientIdsTree", function() { return selectors_unstableGetClientIdWithClientIdsTree; });
       
  7174 __webpack_require__.d(selectors_namespaceObject, "__unstableGetClientIdsTree", function() { return selectors_unstableGetClientIdsTree; });
       
  7175 __webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return selectors_getClientIdsOfDescendants; });
       
  7176 __webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
       
  7177 __webpack_require__.d(selectors_namespaceObject, "getGlobalBlockCount", function() { return selectors_getGlobalBlockCount; });
       
  7178 __webpack_require__.d(selectors_namespaceObject, "getBlocksByClientId", function() { return selectors_getBlocksByClientId; });
       
  7179 __webpack_require__.d(selectors_namespaceObject, "getBlockCount", function() { return selectors_getBlockCount; });
       
  7180 __webpack_require__.d(selectors_namespaceObject, "getSelectionStart", function() { return selectors_getSelectionStart; });
       
  7181 __webpack_require__.d(selectors_namespaceObject, "getSelectionEnd", function() { return selectors_getSelectionEnd; });
       
  7182 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionStart", function() { return selectors_getBlockSelectionStart; });
       
  7183 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionEnd", function() { return selectors_getBlockSelectionEnd; });
       
  7184 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockCount", function() { return selectors_getSelectedBlockCount; });
       
  7185 __webpack_require__.d(selectors_namespaceObject, "hasSelectedBlock", function() { return selectors_hasSelectedBlock; });
       
  7186 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientId", function() { return selectors_getSelectedBlockClientId; });
       
  7187 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlock", function() { return selectors_getSelectedBlock; });
       
  7188 __webpack_require__.d(selectors_namespaceObject, "getBlockRootClientId", function() { return selectors_getBlockRootClientId; });
       
  7189 __webpack_require__.d(selectors_namespaceObject, "getBlockParents", function() { return selectors_getBlockParents; });
       
  7190 __webpack_require__.d(selectors_namespaceObject, "getBlockParentsByBlockName", function() { return getBlockParentsByBlockName; });
       
  7191 __webpack_require__.d(selectors_namespaceObject, "getBlockHierarchyRootClientId", function() { return selectors_getBlockHierarchyRootClientId; });
       
  7192 __webpack_require__.d(selectors_namespaceObject, "getLowestCommonAncestorWithSelectedBlock", function() { return getLowestCommonAncestorWithSelectedBlock; });
       
  7193 __webpack_require__.d(selectors_namespaceObject, "getAdjacentBlockClientId", function() { return getAdjacentBlockClientId; });
       
  7194 __webpack_require__.d(selectors_namespaceObject, "getPreviousBlockClientId", function() { return selectors_getPreviousBlockClientId; });
       
  7195 __webpack_require__.d(selectors_namespaceObject, "getNextBlockClientId", function() { return selectors_getNextBlockClientId; });
       
  7196 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlocksInitialCaretPosition", function() { return selectors_getSelectedBlocksInitialCaretPosition; });
       
  7197 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientIds", function() { return selectors_getSelectedBlockClientIds; });
       
  7198 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlockClientIds", function() { return selectors_getMultiSelectedBlockClientIds; });
       
  7199 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocks", function() { return selectors_getMultiSelectedBlocks; });
       
  7200 __webpack_require__.d(selectors_namespaceObject, "getFirstMultiSelectedBlockClientId", function() { return selectors_getFirstMultiSelectedBlockClientId; });
       
  7201 __webpack_require__.d(selectors_namespaceObject, "getLastMultiSelectedBlockClientId", function() { return selectors_getLastMultiSelectedBlockClientId; });
       
  7202 __webpack_require__.d(selectors_namespaceObject, "isFirstMultiSelectedBlock", function() { return selectors_isFirstMultiSelectedBlock; });
       
  7203 __webpack_require__.d(selectors_namespaceObject, "isBlockMultiSelected", function() { return selectors_isBlockMultiSelected; });
       
  7204 __webpack_require__.d(selectors_namespaceObject, "isAncestorMultiSelected", function() { return selectors_isAncestorMultiSelected; });
       
  7205 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksStartClientId", function() { return selectors_getMultiSelectedBlocksStartClientId; });
       
  7206 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksEndClientId", function() { return selectors_getMultiSelectedBlocksEndClientId; });
       
  7207 __webpack_require__.d(selectors_namespaceObject, "getBlockOrder", function() { return selectors_getBlockOrder; });
       
  7208 __webpack_require__.d(selectors_namespaceObject, "getBlockIndex", function() { return selectors_getBlockIndex; });
       
  7209 __webpack_require__.d(selectors_namespaceObject, "isBlockSelected", function() { return selectors_isBlockSelected; });
       
  7210 __webpack_require__.d(selectors_namespaceObject, "hasSelectedInnerBlock", function() { return selectors_hasSelectedInnerBlock; });
       
  7211 __webpack_require__.d(selectors_namespaceObject, "isBlockWithinSelection", function() { return isBlockWithinSelection; });
       
  7212 __webpack_require__.d(selectors_namespaceObject, "hasMultiSelection", function() { return selectors_hasMultiSelection; });
       
  7213 __webpack_require__.d(selectors_namespaceObject, "isMultiSelecting", function() { return selectors_isMultiSelecting; });
       
  7214 __webpack_require__.d(selectors_namespaceObject, "isSelectionEnabled", function() { return selectors_isSelectionEnabled; });
       
  7215 __webpack_require__.d(selectors_namespaceObject, "getBlockMode", function() { return selectors_getBlockMode; });
       
  7216 __webpack_require__.d(selectors_namespaceObject, "isTyping", function() { return selectors_isTyping; });
       
  7217 __webpack_require__.d(selectors_namespaceObject, "isDraggingBlocks", function() { return isDraggingBlocks; });
       
  7218 __webpack_require__.d(selectors_namespaceObject, "getDraggedBlockClientIds", function() { return selectors_getDraggedBlockClientIds; });
       
  7219 __webpack_require__.d(selectors_namespaceObject, "isBlockBeingDragged", function() { return selectors_isBlockBeingDragged; });
       
  7220 __webpack_require__.d(selectors_namespaceObject, "isAncestorBeingDragged", function() { return selectors_isAncestorBeingDragged; });
       
  7221 __webpack_require__.d(selectors_namespaceObject, "isCaretWithinFormattedText", function() { return selectors_isCaretWithinFormattedText; });
       
  7222 __webpack_require__.d(selectors_namespaceObject, "getBlockInsertionPoint", function() { return selectors_getBlockInsertionPoint; });
       
  7223 __webpack_require__.d(selectors_namespaceObject, "isBlockInsertionPointVisible", function() { return selectors_isBlockInsertionPointVisible; });
       
  7224 __webpack_require__.d(selectors_namespaceObject, "isValidTemplate", function() { return selectors_isValidTemplate; });
       
  7225 __webpack_require__.d(selectors_namespaceObject, "getTemplate", function() { return getTemplate; });
       
  7226 __webpack_require__.d(selectors_namespaceObject, "getTemplateLock", function() { return selectors_getTemplateLock; });
       
  7227 __webpack_require__.d(selectors_namespaceObject, "canInsertBlockType", function() { return selectors_canInsertBlockType; });
       
  7228 __webpack_require__.d(selectors_namespaceObject, "canInsertBlocks", function() { return selectors_canInsertBlocks; });
       
  7229 __webpack_require__.d(selectors_namespaceObject, "getInserterItems", function() { return selectors_getInserterItems; });
       
  7230 __webpack_require__.d(selectors_namespaceObject, "getBlockTransformItems", function() { return selectors_getBlockTransformItems; });
       
  7231 __webpack_require__.d(selectors_namespaceObject, "hasInserterItems", function() { return selectors_hasInserterItems; });
       
  7232 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAllowedBlocks", function() { return selectors_experimentalGetAllowedBlocks; });
       
  7233 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetParsedPattern", function() { return __experimentalGetParsedPattern; });
       
  7234 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAllowedPatterns", function() { return selectors_experimentalGetAllowedPatterns; });
       
  7235 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetPatternsByBlockTypes", function() { return selectors_experimentalGetPatternsByBlockTypes; });
       
  7236 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetPatternTransformItems", function() { return selectors_experimentalGetPatternTransformItems; });
       
  7237 __webpack_require__.d(selectors_namespaceObject, "getBlockListSettings", function() { return selectors_getBlockListSettings; });
       
  7238 __webpack_require__.d(selectors_namespaceObject, "getSettings", function() { return selectors_getSettings; });
       
  7239 __webpack_require__.d(selectors_namespaceObject, "isLastBlockChangePersistent", function() { return selectors_isLastBlockChangePersistent; });
       
  7240 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetBlockListSettingsForBlocks", function() { return selectors_experimentalGetBlockListSettingsForBlocks; });
       
  7241 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetParsedReusableBlock", function() { return __experimentalGetParsedReusableBlock; });
       
  7242 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetReusableBlockTitle", function() { return selectors_experimentalGetReusableBlockTitle; });
       
  7243 __webpack_require__.d(selectors_namespaceObject, "__unstableIsLastBlockChangeIgnored", function() { return selectors_unstableIsLastBlockChangeIgnored; });
       
  7244 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetLastBlockAttributeChanges", function() { return __experimentalGetLastBlockAttributeChanges; });
       
  7245 __webpack_require__.d(selectors_namespaceObject, "isNavigationMode", function() { return selectors_isNavigationMode; });
       
  7246 __webpack_require__.d(selectors_namespaceObject, "hasBlockMovingClientId", function() { return selectors_hasBlockMovingClientId; });
       
  7247 __webpack_require__.d(selectors_namespaceObject, "didAutomaticChange", function() { return selectors_didAutomaticChange; });
       
  7248 __webpack_require__.d(selectors_namespaceObject, "isBlockHighlighted", function() { return selectors_isBlockHighlighted; });
       
  7249 __webpack_require__.d(selectors_namespaceObject, "areInnerBlocksControlled", function() { return areInnerBlocksControlled; });
       
  7250 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetActiveBlockIdByBlockNames", function() { return __experimentalGetActiveBlockIdByBlockNames; });
       
  7251 __webpack_require__.d(selectors_namespaceObject, "wasBlockJustInserted", function() { return wasBlockJustInserted; });
 11839 
  7252 
 11840 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-editor/build-module/store/actions.js
  7253 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-editor/build-module/store/actions.js
 11841 var actions_namespaceObject = {};
  7254 var actions_namespaceObject = {};
 11842 __webpack_require__.r(actions_namespaceObject);
  7255 __webpack_require__.r(actions_namespaceObject);
 11843 __webpack_require__.d(actions_namespaceObject, "resetBlocks", function() { return actions_resetBlocks; });
  7256 __webpack_require__.d(actions_namespaceObject, "resetBlocks", function() { return actions_resetBlocks; });
       
  7257 __webpack_require__.d(actions_namespaceObject, "validateBlocksToTemplate", function() { return validateBlocksToTemplate; });
 11844 __webpack_require__.d(actions_namespaceObject, "resetSelection", function() { return actions_resetSelection; });
  7258 __webpack_require__.d(actions_namespaceObject, "resetSelection", function() { return actions_resetSelection; });
 11845 __webpack_require__.d(actions_namespaceObject, "receiveBlocks", function() { return receiveBlocks; });
  7259 __webpack_require__.d(actions_namespaceObject, "receiveBlocks", function() { return receiveBlocks; });
 11846 __webpack_require__.d(actions_namespaceObject, "updateBlockAttributes", function() { return actions_updateBlockAttributes; });
  7260 __webpack_require__.d(actions_namespaceObject, "updateBlockAttributes", function() { return actions_updateBlockAttributes; });
 11847 __webpack_require__.d(actions_namespaceObject, "updateBlock", function() { return actions_updateBlock; });
  7261 __webpack_require__.d(actions_namespaceObject, "updateBlock", function() { return actions_updateBlock; });
 11848 __webpack_require__.d(actions_namespaceObject, "selectBlock", function() { return actions_selectBlock; });
  7262 __webpack_require__.d(actions_namespaceObject, "selectBlock", function() { return actions_selectBlock; });
 11852 __webpack_require__.d(actions_namespaceObject, "stopMultiSelect", function() { return actions_stopMultiSelect; });
  7266 __webpack_require__.d(actions_namespaceObject, "stopMultiSelect", function() { return actions_stopMultiSelect; });
 11853 __webpack_require__.d(actions_namespaceObject, "multiSelect", function() { return actions_multiSelect; });
  7267 __webpack_require__.d(actions_namespaceObject, "multiSelect", function() { return actions_multiSelect; });
 11854 __webpack_require__.d(actions_namespaceObject, "clearSelectedBlock", function() { return actions_clearSelectedBlock; });
  7268 __webpack_require__.d(actions_namespaceObject, "clearSelectedBlock", function() { return actions_clearSelectedBlock; });
 11855 __webpack_require__.d(actions_namespaceObject, "toggleSelection", function() { return actions_toggleSelection; });
  7269 __webpack_require__.d(actions_namespaceObject, "toggleSelection", function() { return actions_toggleSelection; });
 11856 __webpack_require__.d(actions_namespaceObject, "replaceBlocks", function() { return actions_replaceBlocks; });
  7270 __webpack_require__.d(actions_namespaceObject, "replaceBlocks", function() { return actions_replaceBlocks; });
 11857 __webpack_require__.d(actions_namespaceObject, "replaceBlock", function() { return replaceBlock; });
  7271 __webpack_require__.d(actions_namespaceObject, "replaceBlock", function() { return actions_replaceBlock; });
 11858 __webpack_require__.d(actions_namespaceObject, "moveBlocksDown", function() { return actions_moveBlocksDown; });
  7272 __webpack_require__.d(actions_namespaceObject, "moveBlocksDown", function() { return actions_moveBlocksDown; });
 11859 __webpack_require__.d(actions_namespaceObject, "moveBlocksUp", function() { return actions_moveBlocksUp; });
  7273 __webpack_require__.d(actions_namespaceObject, "moveBlocksUp", function() { return actions_moveBlocksUp; });
 11860 __webpack_require__.d(actions_namespaceObject, "moveBlocksToPosition", function() { return actions_moveBlocksToPosition; });
  7274 __webpack_require__.d(actions_namespaceObject, "moveBlocksToPosition", function() { return actions_moveBlocksToPosition; });
 11861 __webpack_require__.d(actions_namespaceObject, "moveBlockToPosition", function() { return actions_moveBlockToPosition; });
  7275 __webpack_require__.d(actions_namespaceObject, "moveBlockToPosition", function() { return actions_moveBlockToPosition; });
 11862 __webpack_require__.d(actions_namespaceObject, "insertBlock", function() { return actions_insertBlock; });
  7276 __webpack_require__.d(actions_namespaceObject, "insertBlock", function() { return actions_insertBlock; });
 11882 __webpack_require__.d(actions_namespaceObject, "updateSettings", function() { return actions_updateSettings; });
  7296 __webpack_require__.d(actions_namespaceObject, "updateSettings", function() { return actions_updateSettings; });
 11883 __webpack_require__.d(actions_namespaceObject, "__unstableSaveReusableBlock", function() { return __unstableSaveReusableBlock; });
  7297 __webpack_require__.d(actions_namespaceObject, "__unstableSaveReusableBlock", function() { return __unstableSaveReusableBlock; });
 11884 __webpack_require__.d(actions_namespaceObject, "__unstableMarkLastChangeAsPersistent", function() { return actions_unstableMarkLastChangeAsPersistent; });
  7298 __webpack_require__.d(actions_namespaceObject, "__unstableMarkLastChangeAsPersistent", function() { return actions_unstableMarkLastChangeAsPersistent; });
 11885 __webpack_require__.d(actions_namespaceObject, "__unstableMarkNextChangeAsNotPersistent", function() { return actions_unstableMarkNextChangeAsNotPersistent; });
  7299 __webpack_require__.d(actions_namespaceObject, "__unstableMarkNextChangeAsNotPersistent", function() { return actions_unstableMarkNextChangeAsNotPersistent; });
 11886 __webpack_require__.d(actions_namespaceObject, "__unstableMarkAutomaticChange", function() { return actions_unstableMarkAutomaticChange; });
  7300 __webpack_require__.d(actions_namespaceObject, "__unstableMarkAutomaticChange", function() { return actions_unstableMarkAutomaticChange; });
       
  7301 __webpack_require__.d(actions_namespaceObject, "__unstableMarkAutomaticChangeFinal", function() { return __unstableMarkAutomaticChangeFinal; });
 11887 __webpack_require__.d(actions_namespaceObject, "setNavigationMode", function() { return actions_setNavigationMode; });
  7302 __webpack_require__.d(actions_namespaceObject, "setNavigationMode", function() { return actions_setNavigationMode; });
 11888 __webpack_require__.d(actions_namespaceObject, "setBlockMovingClientId", function() { return actions_setBlockMovingClientId; });
  7303 __webpack_require__.d(actions_namespaceObject, "setBlockMovingClientId", function() { return actions_setBlockMovingClientId; });
 11889 __webpack_require__.d(actions_namespaceObject, "duplicateBlocks", function() { return actions_duplicateBlocks; });
  7304 __webpack_require__.d(actions_namespaceObject, "duplicateBlocks", function() { return actions_duplicateBlocks; });
 11890 __webpack_require__.d(actions_namespaceObject, "insertBeforeBlock", function() { return actions_insertBeforeBlock; });
  7305 __webpack_require__.d(actions_namespaceObject, "insertBeforeBlock", function() { return actions_insertBeforeBlock; });
 11891 __webpack_require__.d(actions_namespaceObject, "insertAfterBlock", function() { return actions_insertAfterBlock; });
  7306 __webpack_require__.d(actions_namespaceObject, "insertAfterBlock", function() { return actions_insertAfterBlock; });
 11892 __webpack_require__.d(actions_namespaceObject, "toggleBlockHighlight", function() { return actions_toggleBlockHighlight; });
  7307 __webpack_require__.d(actions_namespaceObject, "toggleBlockHighlight", function() { return actions_toggleBlockHighlight; });
 11893 __webpack_require__.d(actions_namespaceObject, "flashBlock", function() { return actions_flashBlock; });
  7308 __webpack_require__.d(actions_namespaceObject, "flashBlock", function() { return actions_flashBlock; });
 11894 __webpack_require__.d(actions_namespaceObject, "setHasControlledInnerBlocks", function() { return actions_setHasControlledInnerBlocks; });
  7309 __webpack_require__.d(actions_namespaceObject, "setHasControlledInnerBlocks", function() { return actions_setHasControlledInnerBlocks; });
 11895 
  7310 
 11896 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-editor/build-module/store/selectors.js
  7311 // EXTERNAL MODULE: external ["wp","richText"]
 11897 var selectors_namespaceObject = {};
  7312 var external_wp_richText_ = __webpack_require__("qRz9");
 11898 __webpack_require__.r(selectors_namespaceObject);
       
 11899 __webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return selectors_getBlockName; });
       
 11900 __webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return selectors_isBlockValid; });
       
 11901 __webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return getBlockAttributes; });
       
 11902 __webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; });
       
 11903 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return selectors_unstableGetBlockWithoutInnerBlocks; });
       
 11904 __webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
       
 11905 __webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return selectors_getClientIdsOfDescendants; });
       
 11906 __webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
       
 11907 __webpack_require__.d(selectors_namespaceObject, "getGlobalBlockCount", function() { return getGlobalBlockCount; });
       
 11908 __webpack_require__.d(selectors_namespaceObject, "getBlocksByClientId", function() { return selectors_getBlocksByClientId; });
       
 11909 __webpack_require__.d(selectors_namespaceObject, "getBlockCount", function() { return selectors_getBlockCount; });
       
 11910 __webpack_require__.d(selectors_namespaceObject, "getSelectionStart", function() { return selectors_getSelectionStart; });
       
 11911 __webpack_require__.d(selectors_namespaceObject, "getSelectionEnd", function() { return selectors_getSelectionEnd; });
       
 11912 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionStart", function() { return getBlockSelectionStart; });
       
 11913 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionEnd", function() { return selectors_getBlockSelectionEnd; });
       
 11914 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockCount", function() { return selectors_getSelectedBlockCount; });
       
 11915 __webpack_require__.d(selectors_namespaceObject, "hasSelectedBlock", function() { return hasSelectedBlock; });
       
 11916 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientId", function() { return selectors_getSelectedBlockClientId; });
       
 11917 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlock", function() { return selectors_getSelectedBlock; });
       
 11918 __webpack_require__.d(selectors_namespaceObject, "getBlockRootClientId", function() { return selectors_getBlockRootClientId; });
       
 11919 __webpack_require__.d(selectors_namespaceObject, "getBlockParents", function() { return selectors_getBlockParents; });
       
 11920 __webpack_require__.d(selectors_namespaceObject, "getBlockParentsByBlockName", function() { return getBlockParentsByBlockName; });
       
 11921 __webpack_require__.d(selectors_namespaceObject, "getBlockHierarchyRootClientId", function() { return getBlockHierarchyRootClientId; });
       
 11922 __webpack_require__.d(selectors_namespaceObject, "getLowestCommonAncestorWithSelectedBlock", function() { return getLowestCommonAncestorWithSelectedBlock; });
       
 11923 __webpack_require__.d(selectors_namespaceObject, "getAdjacentBlockClientId", function() { return getAdjacentBlockClientId; });
       
 11924 __webpack_require__.d(selectors_namespaceObject, "getPreviousBlockClientId", function() { return getPreviousBlockClientId; });
       
 11925 __webpack_require__.d(selectors_namespaceObject, "getNextBlockClientId", function() { return getNextBlockClientId; });
       
 11926 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlocksInitialCaretPosition", function() { return getSelectedBlocksInitialCaretPosition; });
       
 11927 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientIds", function() { return selectors_getSelectedBlockClientIds; });
       
 11928 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlockClientIds", function() { return getMultiSelectedBlockClientIds; });
       
 11929 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocks", function() { return getMultiSelectedBlocks; });
       
 11930 __webpack_require__.d(selectors_namespaceObject, "getFirstMultiSelectedBlockClientId", function() { return selectors_getFirstMultiSelectedBlockClientId; });
       
 11931 __webpack_require__.d(selectors_namespaceObject, "getLastMultiSelectedBlockClientId", function() { return getLastMultiSelectedBlockClientId; });
       
 11932 __webpack_require__.d(selectors_namespaceObject, "isFirstMultiSelectedBlock", function() { return isFirstMultiSelectedBlock; });
       
 11933 __webpack_require__.d(selectors_namespaceObject, "isBlockMultiSelected", function() { return isBlockMultiSelected; });
       
 11934 __webpack_require__.d(selectors_namespaceObject, "isAncestorMultiSelected", function() { return isAncestorMultiSelected; });
       
 11935 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksStartClientId", function() { return getMultiSelectedBlocksStartClientId; });
       
 11936 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksEndClientId", function() { return getMultiSelectedBlocksEndClientId; });
       
 11937 __webpack_require__.d(selectors_namespaceObject, "getBlockOrder", function() { return selectors_getBlockOrder; });
       
 11938 __webpack_require__.d(selectors_namespaceObject, "getBlockIndex", function() { return selectors_getBlockIndex; });
       
 11939 __webpack_require__.d(selectors_namespaceObject, "isBlockSelected", function() { return isBlockSelected; });
       
 11940 __webpack_require__.d(selectors_namespaceObject, "hasSelectedInnerBlock", function() { return hasSelectedInnerBlock; });
       
 11941 __webpack_require__.d(selectors_namespaceObject, "isBlockWithinSelection", function() { return isBlockWithinSelection; });
       
 11942 __webpack_require__.d(selectors_namespaceObject, "hasMultiSelection", function() { return selectors_hasMultiSelection; });
       
 11943 __webpack_require__.d(selectors_namespaceObject, "isMultiSelecting", function() { return selectors_isMultiSelecting; });
       
 11944 __webpack_require__.d(selectors_namespaceObject, "isSelectionEnabled", function() { return selectors_isSelectionEnabled; });
       
 11945 __webpack_require__.d(selectors_namespaceObject, "getBlockMode", function() { return selectors_getBlockMode; });
       
 11946 __webpack_require__.d(selectors_namespaceObject, "isTyping", function() { return selectors_isTyping; });
       
 11947 __webpack_require__.d(selectors_namespaceObject, "isDraggingBlocks", function() { return selectors_isDraggingBlocks; });
       
 11948 __webpack_require__.d(selectors_namespaceObject, "isCaretWithinFormattedText", function() { return selectors_isCaretWithinFormattedText; });
       
 11949 __webpack_require__.d(selectors_namespaceObject, "getBlockInsertionPoint", function() { return getBlockInsertionPoint; });
       
 11950 __webpack_require__.d(selectors_namespaceObject, "isBlockInsertionPointVisible", function() { return isBlockInsertionPointVisible; });
       
 11951 __webpack_require__.d(selectors_namespaceObject, "isValidTemplate", function() { return isValidTemplate; });
       
 11952 __webpack_require__.d(selectors_namespaceObject, "getTemplate", function() { return getTemplate; });
       
 11953 __webpack_require__.d(selectors_namespaceObject, "getTemplateLock", function() { return selectors_getTemplateLock; });
       
 11954 __webpack_require__.d(selectors_namespaceObject, "canInsertBlockType", function() { return selectors_canInsertBlockType; });
       
 11955 __webpack_require__.d(selectors_namespaceObject, "canInsertBlocks", function() { return selectors_canInsertBlocks; });
       
 11956 __webpack_require__.d(selectors_namespaceObject, "getInserterItems", function() { return selectors_getInserterItems; });
       
 11957 __webpack_require__.d(selectors_namespaceObject, "hasInserterItems", function() { return selectors_hasInserterItems; });
       
 11958 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAllowedBlocks", function() { return selectors_experimentalGetAllowedBlocks; });
       
 11959 __webpack_require__.d(selectors_namespaceObject, "getBlockListSettings", function() { return selectors_getBlockListSettings; });
       
 11960 __webpack_require__.d(selectors_namespaceObject, "getSettings", function() { return selectors_getSettings; });
       
 11961 __webpack_require__.d(selectors_namespaceObject, "isLastBlockChangePersistent", function() { return isLastBlockChangePersistent; });
       
 11962 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetBlockListSettingsForBlocks", function() { return selectors_experimentalGetBlockListSettingsForBlocks; });
       
 11963 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetParsedReusableBlock", function() { return __experimentalGetParsedReusableBlock; });
       
 11964 __webpack_require__.d(selectors_namespaceObject, "__unstableIsLastBlockChangeIgnored", function() { return __unstableIsLastBlockChangeIgnored; });
       
 11965 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetLastBlockAttributeChanges", function() { return __experimentalGetLastBlockAttributeChanges; });
       
 11966 __webpack_require__.d(selectors_namespaceObject, "isNavigationMode", function() { return selectors_isNavigationMode; });
       
 11967 __webpack_require__.d(selectors_namespaceObject, "hasBlockMovingClientId", function() { return selectors_hasBlockMovingClientId; });
       
 11968 __webpack_require__.d(selectors_namespaceObject, "didAutomaticChange", function() { return selectors_didAutomaticChange; });
       
 11969 __webpack_require__.d(selectors_namespaceObject, "isBlockHighlighted", function() { return isBlockHighlighted; });
       
 11970 __webpack_require__.d(selectors_namespaceObject, "areInnerBlocksControlled", function() { return areInnerBlocksControlled; });
       
 11971 
       
 11972 // EXTERNAL MODULE: external {"this":["wp","blocks"]}
       
 11973 var external_this_wp_blocks_ = __webpack_require__(10);
       
 11974 
       
 11975 // EXTERNAL MODULE: external {"this":["wp","richText"]}
       
 11976 var external_this_wp_richText_ = __webpack_require__(25);
       
 11977 
       
 11978 // EXTERNAL MODULE: external {"this":["wp","viewport"]}
       
 11979 var external_this_wp_viewport_ = __webpack_require__(81);
       
 11980 
       
 11981 // EXTERNAL MODULE: external {"this":["wp","keyboardShortcuts"]}
       
 11982 var external_this_wp_keyboardShortcuts_ = __webpack_require__(52);
       
 11983 
       
 11984 // EXTERNAL MODULE: external {"this":["wp","notices"]}
       
 11985 var external_this_wp_notices_ = __webpack_require__(100);
       
 11986 
  7313 
 11987 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  7314 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
 11988 var esm_extends = __webpack_require__(8);
  7315 var esm_extends = __webpack_require__("wx14");
 11989 
  7316 
 11990 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  7317 // EXTERNAL MODULE: external ["wp","element"]
 11991 var defineProperty = __webpack_require__(5);
  7318 var external_wp_element_ = __webpack_require__("GRId");
 11992 
       
 11993 // EXTERNAL MODULE: external {"this":["wp","element"]}
       
 11994 var external_this_wp_element_ = __webpack_require__(0);
       
 11995 
  7319 
 11996 // EXTERNAL MODULE: ./node_modules/classnames/index.js
  7320 // EXTERNAL MODULE: ./node_modules/classnames/index.js
 11997 var classnames = __webpack_require__(11);
  7321 var classnames = __webpack_require__("TSYQ");
 11998 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  7322 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
 11999 
  7323 
 12000 // EXTERNAL MODULE: external {"this":"lodash"}
  7324 // EXTERNAL MODULE: external "lodash"
 12001 var external_this_lodash_ = __webpack_require__(2);
  7325 var external_lodash_ = __webpack_require__("YLtl");
 12002 
  7326 
 12003 // EXTERNAL MODULE: external {"this":["wp","compose"]}
  7327 // EXTERNAL MODULE: external ["wp","compose"]
 12004 var external_this_wp_compose_ = __webpack_require__(9);
  7328 var external_wp_compose_ = __webpack_require__("K9lf");
 12005 
  7329 
 12006 // EXTERNAL MODULE: external {"this":["wp","hooks"]}
  7330 // EXTERNAL MODULE: external ["wp","hooks"]
 12007 var external_this_wp_hooks_ = __webpack_require__(32);
  7331 var external_wp_hooks_ = __webpack_require__("g56x");
 12008 
  7332 
 12009 // EXTERNAL MODULE: external {"this":["wp","data"]}
  7333 // EXTERNAL MODULE: external ["wp","blocks"]
 12010 var external_this_wp_data_ = __webpack_require__(4);
  7334 var external_wp_blocks_ = __webpack_require__("HSyU");
 12011 
  7335 
 12012 // EXTERNAL MODULE: external {"this":["wp","components"]}
  7336 // EXTERNAL MODULE: external ["wp","components"]
 12013 var external_this_wp_components_ = __webpack_require__(3);
  7337 var external_wp_components_ = __webpack_require__("tI+e");
       
  7338 
       
  7339 // EXTERNAL MODULE: external ["wp","data"]
       
  7340 var external_wp_data_ = __webpack_require__("1ZqX");
 12014 
  7341 
 12015 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/context.js
  7342 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/context.js
 12016 /**
  7343 /**
 12017  * External dependencies
       
 12018  */
       
 12019 
       
 12020 /**
       
 12021  * WordPress dependencies
  7344  * WordPress dependencies
 12022  */
  7345  */
 12023 
  7346 
 12024 
  7347 const Context = Object(external_wp_element_["createContext"])({
 12025 var Context = Object(external_this_wp_element_["createContext"])({
       
 12026   name: '',
  7348   name: '',
 12027   isSelected: false,
  7349   isSelected: false,
 12028   focusedElement: null,
       
 12029   setFocusedElement: external_this_lodash_["noop"],
       
 12030   clientId: null
  7350   clientId: null
 12031 });
  7351 });
 12032 var Provider = Context.Provider;
  7352 const {
       
  7353   Provider: context_Provider
       
  7354 } = Context;
 12033 
  7355 
 12034 /**
  7356 /**
 12035  * A hook that returns the block edit context.
  7357  * A hook that returns the block edit context.
 12036  *
  7358  *
 12037  * @return {Object} Block edit context
  7359  * @return {Object} Block edit context
 12038  */
  7360  */
 12039 
  7361 
 12040 function useBlockEditContext() {
  7362 function useBlockEditContext() {
 12041   return Object(external_this_wp_element_["useContext"])(Context);
  7363   return Object(external_wp_element_["useContext"])(Context);
 12042 }
  7364 }
       
  7365 
       
  7366 // EXTERNAL MODULE: external ["wp","i18n"]
       
  7367 var external_wp_i18n_ = __webpack_require__("l3Sj");
       
  7368 
       
  7369 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/defaults.js
       
  7370 /**
       
  7371  * WordPress dependencies
       
  7372  */
       
  7373 
       
  7374 const PREFERENCES_DEFAULTS = {
       
  7375   insertUsage: {}
       
  7376 };
       
  7377 /**
       
  7378  * The default editor settings
       
  7379  *
       
  7380  * @typedef {Object} SETTINGS_DEFAULT
       
  7381  * @property {boolean} alignWide Enable/Disable Wide/Full Alignments
       
  7382  * @property {boolean} supportsLayout Enable/disable layouts support in container blocks.
       
  7383  * @property {boolean} imageEditing Image Editing settings set to false to disable.
       
  7384  * @property {Array} imageSizes Available image sizes
       
  7385  * @property {number} maxWidth Max width to constraint resizing
       
  7386  * @property {boolean|Array} allowedBlockTypes Allowed block types
       
  7387  * @property {boolean} hasFixedToolbar Whether or not the editor toolbar is fixed
       
  7388  * @property {boolean} focusMode Whether the focus mode is enabled or not
       
  7389  * @property {Array} styles Editor Styles
       
  7390  * @property {boolean} keepCaretInsideBlock Whether caret should move between blocks in edit mode
       
  7391  * @property {string} bodyPlaceholder Empty post placeholder
       
  7392  * @property {string} titlePlaceholder Empty title placeholder
       
  7393  * @property {boolean} codeEditingEnabled Whether or not the user can switch to the code editor
       
  7394  * @property {boolean} __experimentalCanUserUseUnfilteredHTML Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.
       
  7395  * @property {boolean} __experimentalBlockDirectory Whether the user has enabled the Block Directory
       
  7396  * @property {Array} __experimentalBlockPatterns Array of objects representing the block patterns
       
  7397  * @property {Array} __experimentalBlockPatternCategories Array of objects representing the block pattern categories
       
  7398  */
       
  7399 
       
  7400 const SETTINGS_DEFAULTS = {
       
  7401   alignWide: false,
       
  7402   supportsLayout: true,
       
  7403   // colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
       
  7404   // The setting is only kept for backward compatibility purposes.
       
  7405   colors: [{
       
  7406     name: Object(external_wp_i18n_["__"])('Black'),
       
  7407     slug: 'black',
       
  7408     color: '#000000'
       
  7409   }, {
       
  7410     name: Object(external_wp_i18n_["__"])('Cyan bluish gray'),
       
  7411     slug: 'cyan-bluish-gray',
       
  7412     color: '#abb8c3'
       
  7413   }, {
       
  7414     name: Object(external_wp_i18n_["__"])('White'),
       
  7415     slug: 'white',
       
  7416     color: '#ffffff'
       
  7417   }, {
       
  7418     name: Object(external_wp_i18n_["__"])('Pale pink'),
       
  7419     slug: 'pale-pink',
       
  7420     color: '#f78da7'
       
  7421   }, {
       
  7422     name: Object(external_wp_i18n_["__"])('Vivid red'),
       
  7423     slug: 'vivid-red',
       
  7424     color: '#cf2e2e'
       
  7425   }, {
       
  7426     name: Object(external_wp_i18n_["__"])('Luminous vivid orange'),
       
  7427     slug: 'luminous-vivid-orange',
       
  7428     color: '#ff6900'
       
  7429   }, {
       
  7430     name: Object(external_wp_i18n_["__"])('Luminous vivid amber'),
       
  7431     slug: 'luminous-vivid-amber',
       
  7432     color: '#fcb900'
       
  7433   }, {
       
  7434     name: Object(external_wp_i18n_["__"])('Light green cyan'),
       
  7435     slug: 'light-green-cyan',
       
  7436     color: '#7bdcb5'
       
  7437   }, {
       
  7438     name: Object(external_wp_i18n_["__"])('Vivid green cyan'),
       
  7439     slug: 'vivid-green-cyan',
       
  7440     color: '#00d084'
       
  7441   }, {
       
  7442     name: Object(external_wp_i18n_["__"])('Pale cyan blue'),
       
  7443     slug: 'pale-cyan-blue',
       
  7444     color: '#8ed1fc'
       
  7445   }, {
       
  7446     name: Object(external_wp_i18n_["__"])('Vivid cyan blue'),
       
  7447     slug: 'vivid-cyan-blue',
       
  7448     color: '#0693e3'
       
  7449   }, {
       
  7450     name: Object(external_wp_i18n_["__"])('Vivid purple'),
       
  7451     slug: 'vivid-purple',
       
  7452     color: '#9b51e0'
       
  7453   }],
       
  7454   // fontSizes setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
       
  7455   // The setting is only kept for backward compatibility purposes.
       
  7456   fontSizes: [{
       
  7457     name: Object(external_wp_i18n_["_x"])('Small', 'font size name'),
       
  7458     size: 13,
       
  7459     slug: 'small'
       
  7460   }, {
       
  7461     name: Object(external_wp_i18n_["_x"])('Normal', 'font size name'),
       
  7462     size: 16,
       
  7463     slug: 'normal'
       
  7464   }, {
       
  7465     name: Object(external_wp_i18n_["_x"])('Medium', 'font size name'),
       
  7466     size: 20,
       
  7467     slug: 'medium'
       
  7468   }, {
       
  7469     name: Object(external_wp_i18n_["_x"])('Large', 'font size name'),
       
  7470     size: 36,
       
  7471     slug: 'large'
       
  7472   }, {
       
  7473     name: Object(external_wp_i18n_["_x"])('Huge', 'font size name'),
       
  7474     size: 42,
       
  7475     slug: 'huge'
       
  7476   }],
       
  7477   // Image default size slug.
       
  7478   imageDefaultSize: 'large',
       
  7479   imageSizes: [{
       
  7480     slug: 'thumbnail',
       
  7481     name: Object(external_wp_i18n_["__"])('Thumbnail')
       
  7482   }, {
       
  7483     slug: 'medium',
       
  7484     name: Object(external_wp_i18n_["__"])('Medium')
       
  7485   }, {
       
  7486     slug: 'large',
       
  7487     name: Object(external_wp_i18n_["__"])('Large')
       
  7488   }, {
       
  7489     slug: 'full',
       
  7490     name: Object(external_wp_i18n_["__"])('Full Size')
       
  7491   }],
       
  7492   // Allow plugin to disable Image Editor if need be
       
  7493   imageEditing: true,
       
  7494   // This is current max width of the block inner area
       
  7495   // It's used to constraint image resizing and this value could be overridden later by themes
       
  7496   maxWidth: 580,
       
  7497   // Allowed block types for the editor, defaulting to true (all supported).
       
  7498   allowedBlockTypes: true,
       
  7499   // Maximum upload size in bytes allowed for the site.
       
  7500   maxUploadFileSize: 0,
       
  7501   // List of allowed mime types and file extensions.
       
  7502   allowedMimeTypes: null,
       
  7503   __experimentalCanUserUseUnfilteredHTML: false,
       
  7504   __experimentalBlockDirectory: false,
       
  7505   __mobileEnablePageTemplates: false,
       
  7506   __experimentalBlockPatterns: [],
       
  7507   __experimentalBlockPatternCategories: [],
       
  7508   __experimentalSpotlightEntityBlocks: [],
       
  7509   // gradients setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
       
  7510   // The setting is only kept for backward compatibility purposes.
       
  7511   gradients: [{
       
  7512     name: Object(external_wp_i18n_["__"])('Vivid cyan blue to vivid purple'),
       
  7513     gradient: 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',
       
  7514     slug: 'vivid-cyan-blue-to-vivid-purple'
       
  7515   }, {
       
  7516     name: Object(external_wp_i18n_["__"])('Light green cyan to vivid green cyan'),
       
  7517     gradient: 'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',
       
  7518     slug: 'light-green-cyan-to-vivid-green-cyan'
       
  7519   }, {
       
  7520     name: Object(external_wp_i18n_["__"])('Luminous vivid amber to luminous vivid orange'),
       
  7521     gradient: 'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',
       
  7522     slug: 'luminous-vivid-amber-to-luminous-vivid-orange'
       
  7523   }, {
       
  7524     name: Object(external_wp_i18n_["__"])('Luminous vivid orange to vivid red'),
       
  7525     gradient: 'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',
       
  7526     slug: 'luminous-vivid-orange-to-vivid-red'
       
  7527   }, {
       
  7528     name: Object(external_wp_i18n_["__"])('Very light gray to cyan bluish gray'),
       
  7529     gradient: 'linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)',
       
  7530     slug: 'very-light-gray-to-cyan-bluish-gray'
       
  7531   }, {
       
  7532     name: Object(external_wp_i18n_["__"])('Cool to warm spectrum'),
       
  7533     gradient: 'linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)',
       
  7534     slug: 'cool-to-warm-spectrum'
       
  7535   }, {
       
  7536     name: Object(external_wp_i18n_["__"])('Blush light purple'),
       
  7537     gradient: 'linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)',
       
  7538     slug: 'blush-light-purple'
       
  7539   }, {
       
  7540     name: Object(external_wp_i18n_["__"])('Blush bordeaux'),
       
  7541     gradient: 'linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)',
       
  7542     slug: 'blush-bordeaux'
       
  7543   }, {
       
  7544     name: Object(external_wp_i18n_["__"])('Luminous dusk'),
       
  7545     gradient: 'linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)',
       
  7546     slug: 'luminous-dusk'
       
  7547   }, {
       
  7548     name: Object(external_wp_i18n_["__"])('Pale ocean'),
       
  7549     gradient: 'linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)',
       
  7550     slug: 'pale-ocean'
       
  7551   }, {
       
  7552     name: Object(external_wp_i18n_["__"])('Electric grass'),
       
  7553     gradient: 'linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)',
       
  7554     slug: 'electric-grass'
       
  7555   }, {
       
  7556     name: Object(external_wp_i18n_["__"])('Midnight'),
       
  7557     gradient: 'linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)',
       
  7558     slug: 'midnight'
       
  7559   }]
       
  7560 };
       
  7561 
       
  7562 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/array.js
       
  7563 /**
       
  7564  * External dependencies
       
  7565  */
       
  7566 
       
  7567 /**
       
  7568  * Insert one or multiple elements into a given position of an array.
       
  7569  *
       
  7570  * @param {Array}  array    Source array.
       
  7571  * @param {*}      elements Elements to insert.
       
  7572  * @param {number} index    Insert Position.
       
  7573  *
       
  7574  * @return {Array}          Result.
       
  7575  */
       
  7576 
       
  7577 function insertAt(array, elements, index) {
       
  7578   return [...array.slice(0, index), ...Object(external_lodash_["castArray"])(elements), ...array.slice(index)];
       
  7579 }
       
  7580 /**
       
  7581  * Moves an element in an array.
       
  7582  *
       
  7583  * @param {Array}  array Source array.
       
  7584  * @param {number} from  Source index.
       
  7585  * @param {number} to    Destination index.
       
  7586  * @param {number} count Number of elements to move.
       
  7587  *
       
  7588  * @return {Array}       Result.
       
  7589  */
       
  7590 
       
  7591 function moveTo(array, from, to, count = 1) {
       
  7592   const withoutMovedElements = [...array];
       
  7593   withoutMovedElements.splice(from, count);
       
  7594   return insertAt(withoutMovedElements, array.slice(from, from + count), to);
       
  7595 }
       
  7596 
       
  7597 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/reducer.js
       
  7598 /**
       
  7599  * External dependencies
       
  7600  */
       
  7601 
       
  7602 /**
       
  7603  * WordPress dependencies
       
  7604  */
       
  7605 
       
  7606 
       
  7607 
       
  7608 /**
       
  7609  * Internal dependencies
       
  7610  */
       
  7611 
       
  7612 
       
  7613 
       
  7614 /**
       
  7615  * Given an array of blocks, returns an object where each key is a nesting
       
  7616  * context, the value of which is an array of block client IDs existing within
       
  7617  * that nesting context.
       
  7618  *
       
  7619  * @param {Array}   blocks       Blocks to map.
       
  7620  * @param {?string} rootClientId Assumed root client ID.
       
  7621  *
       
  7622  * @return {Object} Block order map object.
       
  7623  */
       
  7624 
       
  7625 function mapBlockOrder(blocks, rootClientId = '') {
       
  7626   const result = {
       
  7627     [rootClientId]: []
       
  7628   };
       
  7629   blocks.forEach(block => {
       
  7630     const {
       
  7631       clientId,
       
  7632       innerBlocks
       
  7633     } = block;
       
  7634     result[rootClientId].push(clientId);
       
  7635     Object.assign(result, mapBlockOrder(innerBlocks, clientId));
       
  7636   });
       
  7637   return result;
       
  7638 }
       
  7639 /**
       
  7640  * Given an array of blocks, returns an object where each key contains
       
  7641  * the clientId of the block and the value is the parent of the block.
       
  7642  *
       
  7643  * @param {Array}   blocks       Blocks to map.
       
  7644  * @param {?string} rootClientId Assumed root client ID.
       
  7645  *
       
  7646  * @return {Object} Block order map object.
       
  7647  */
       
  7648 
       
  7649 
       
  7650 function mapBlockParents(blocks, rootClientId = '') {
       
  7651   return blocks.reduce((result, block) => Object.assign(result, {
       
  7652     [block.clientId]: rootClientId
       
  7653   }, mapBlockParents(block.innerBlocks, block.clientId)), {});
       
  7654 }
       
  7655 /**
       
  7656  * Helper method to iterate through all blocks, recursing into inner blocks,
       
  7657  * applying a transformation function to each one.
       
  7658  * Returns a flattened object with the transformed blocks.
       
  7659  *
       
  7660  * @param {Array} blocks Blocks to flatten.
       
  7661  * @param {Function} transform Transforming function to be applied to each block.
       
  7662  *
       
  7663  * @return {Object} Flattened object.
       
  7664  */
       
  7665 
       
  7666 
       
  7667 function flattenBlocks(blocks, transform = external_lodash_["identity"]) {
       
  7668   const result = {};
       
  7669   const stack = [...blocks];
       
  7670 
       
  7671   while (stack.length) {
       
  7672     const {
       
  7673       innerBlocks,
       
  7674       ...block
       
  7675     } = stack.shift();
       
  7676     stack.push(...innerBlocks);
       
  7677     result[block.clientId] = transform(block);
       
  7678   }
       
  7679 
       
  7680   return result;
       
  7681 }
       
  7682 /**
       
  7683  * Given an array of blocks, returns an object containing all blocks, without
       
  7684  * attributes, recursing into inner blocks. Keys correspond to the block client
       
  7685  * ID, the value of which is the attributes object.
       
  7686  *
       
  7687  * @param {Array} blocks Blocks to flatten.
       
  7688  *
       
  7689  * @return {Object} Flattened block attributes object.
       
  7690  */
       
  7691 
       
  7692 
       
  7693 function getFlattenedBlocksWithoutAttributes(blocks) {
       
  7694   return flattenBlocks(blocks, block => Object(external_lodash_["omit"])(block, 'attributes'));
       
  7695 }
       
  7696 /**
       
  7697  * Given an array of blocks, returns an object containing all block attributes,
       
  7698  * recursing into inner blocks. Keys correspond to the block client ID, the
       
  7699  * value of which is the attributes object.
       
  7700  *
       
  7701  * @param {Array} blocks Blocks to flatten.
       
  7702  *
       
  7703  * @return {Object} Flattened block attributes object.
       
  7704  */
       
  7705 
       
  7706 
       
  7707 function getFlattenedBlockAttributes(blocks) {
       
  7708   return flattenBlocks(blocks, block => block.attributes);
       
  7709 }
       
  7710 /**
       
  7711  * Given a block order map object, returns *all* of the block client IDs that are
       
  7712  * a descendant of the given root client ID.
       
  7713  *
       
  7714  * Calling this with `rootClientId` set to `''` results in a list of client IDs
       
  7715  * that are in the post. That is, it excludes blocks like fetched reusable
       
  7716  * blocks which are stored into state but not visible. It also excludes
       
  7717  * InnerBlocks controllers, like template parts.
       
  7718  *
       
  7719  * It is important to exclude the full inner block controller and not just the
       
  7720  * inner blocks because in many cases, we need to persist the previous value of
       
  7721  * an inner block controller. To do so, it must be excluded from the list of
       
  7722  * client IDs which are considered to be part of the top-level entity.
       
  7723  *
       
  7724  * @param {Object}  blocksOrder  Object that maps block client IDs to a list of
       
  7725  *                               nested block client IDs.
       
  7726  * @param {?string} rootClientId The root client ID to search. Defaults to ''.
       
  7727  * @param {?Object} controlledInnerBlocks The InnerBlocks controller state.
       
  7728  *
       
  7729  * @return {Array} List of descendant client IDs.
       
  7730  */
       
  7731 
       
  7732 
       
  7733 function getNestedBlockClientIds(blocksOrder, rootClientId = '', controlledInnerBlocks = {}) {
       
  7734   return Object(external_lodash_["reduce"])(blocksOrder[rootClientId], (result, clientId) => {
       
  7735     if (!!controlledInnerBlocks[clientId]) {
       
  7736       return result;
       
  7737     }
       
  7738 
       
  7739     return [...result, clientId, ...getNestedBlockClientIds(blocksOrder, clientId)];
       
  7740   }, []);
       
  7741 }
       
  7742 /**
       
  7743  * Returns an object against which it is safe to perform mutating operations,
       
  7744  * given the original object and its current working copy.
       
  7745  *
       
  7746  * @param {Object} original Original object.
       
  7747  * @param {Object} working  Working object.
       
  7748  *
       
  7749  * @return {Object} Mutation-safe object.
       
  7750  */
       
  7751 
       
  7752 
       
  7753 function getMutateSafeObject(original, working) {
       
  7754   if (original === working) {
       
  7755     return { ...original
       
  7756     };
       
  7757   }
       
  7758 
       
  7759   return working;
       
  7760 }
       
  7761 /**
       
  7762  * Returns true if the two object arguments have the same keys, or false
       
  7763  * otherwise.
       
  7764  *
       
  7765  * @param {Object} a First object.
       
  7766  * @param {Object} b Second object.
       
  7767  *
       
  7768  * @return {boolean} Whether the two objects have the same keys.
       
  7769  */
       
  7770 
       
  7771 
       
  7772 function hasSameKeys(a, b) {
       
  7773   return Object(external_lodash_["isEqual"])(Object(external_lodash_["keys"])(a), Object(external_lodash_["keys"])(b));
       
  7774 }
       
  7775 /**
       
  7776  * Returns true if, given the currently dispatching action and the previously
       
  7777  * dispatched action, the two actions are updating the same block attribute, or
       
  7778  * false otherwise.
       
  7779  *
       
  7780  * @param {Object} action     Currently dispatching action.
       
  7781  * @param {Object} lastAction Previously dispatched action.
       
  7782  *
       
  7783  * @return {boolean} Whether actions are updating the same block attribute.
       
  7784  */
       
  7785 
       
  7786 function isUpdatingSameBlockAttribute(action, lastAction) {
       
  7787   return action.type === 'UPDATE_BLOCK_ATTRIBUTES' && lastAction !== undefined && lastAction.type === 'UPDATE_BLOCK_ATTRIBUTES' && Object(external_lodash_["isEqual"])(action.clientIds, lastAction.clientIds) && hasSameKeys(action.attributes, lastAction.attributes);
       
  7788 }
       
  7789 /**
       
  7790  * Utility returning an object with an empty object value for each key.
       
  7791  *
       
  7792  * @param {Array} objectKeys Keys to fill.
       
  7793  * @return {Object} Object filled with empty object as values for each clientId.
       
  7794  */
       
  7795 
       
  7796 const fillKeysWithEmptyObject = objectKeys => {
       
  7797   return objectKeys.reduce((result, key) => {
       
  7798     result[key] = {};
       
  7799     return result;
       
  7800   }, {});
       
  7801 };
       
  7802 /**
       
  7803  * Higher-order reducer intended to compute a cache key for each block in the post.
       
  7804  * A new instance of the cache key (empty object) is created each time the block object
       
  7805  * needs to be refreshed (for any change in the block or its children).
       
  7806  *
       
  7807  * @param {Function} reducer Original reducer function.
       
  7808  *
       
  7809  * @return {Function} Enhanced reducer function.
       
  7810  */
       
  7811 
       
  7812 
       
  7813 const withBlockCache = reducer => (state = {}, action) => {
       
  7814   const newState = reducer(state, action);
       
  7815 
       
  7816   if (newState === state) {
       
  7817     return state;
       
  7818   }
       
  7819 
       
  7820   newState.cache = state.cache ? state.cache : {};
       
  7821   /**
       
  7822    * For each clientId provided, traverses up parents, adding the provided clientIds
       
  7823    * and each parent's clientId to the returned array.
       
  7824    *
       
  7825    * When calling this function consider that it uses the old state, so any state
       
  7826    * modifications made by the `reducer` will not be present.
       
  7827    *
       
  7828    * @param {Array} clientIds an Array of block clientIds.
       
  7829    *
       
  7830    * @return {Array} The provided clientIds and all of their parent clientIds.
       
  7831    */
       
  7832 
       
  7833   const getBlocksWithParentsClientIds = clientIds => {
       
  7834     return clientIds.reduce((result, clientId) => {
       
  7835       let current = clientId;
       
  7836 
       
  7837       do {
       
  7838         result.push(current);
       
  7839         current = state.parents[current];
       
  7840       } while (current && !state.controlledInnerBlocks[current]);
       
  7841 
       
  7842       return result;
       
  7843     }, []);
       
  7844   };
       
  7845 
       
  7846   switch (action.type) {
       
  7847     case 'RESET_BLOCKS':
       
  7848       newState.cache = Object(external_lodash_["mapValues"])(flattenBlocks(action.blocks), () => ({}));
       
  7849       break;
       
  7850 
       
  7851     case 'RECEIVE_BLOCKS':
       
  7852     case 'INSERT_BLOCKS':
       
  7853       {
       
  7854         const updatedBlockUids = Object(external_lodash_["keys"])(flattenBlocks(action.blocks));
       
  7855 
       
  7856         if (action.rootClientId && !state.controlledInnerBlocks[action.rootClientId]) {
       
  7857           updatedBlockUids.push(action.rootClientId);
       
  7858         }
       
  7859 
       
  7860         newState.cache = { ...newState.cache,
       
  7861           ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids))
       
  7862         };
       
  7863         break;
       
  7864       }
       
  7865 
       
  7866     case 'UPDATE_BLOCK':
       
  7867       newState.cache = { ...newState.cache,
       
  7868         ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds([action.clientId]))
       
  7869       };
       
  7870       break;
       
  7871 
       
  7872     case 'UPDATE_BLOCK_ATTRIBUTES':
       
  7873       newState.cache = { ...newState.cache,
       
  7874         ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(action.clientIds))
       
  7875       };
       
  7876       break;
       
  7877 
       
  7878     case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  7879       const parentClientIds = fillKeysWithEmptyObject(getBlocksWithParentsClientIds(action.replacedClientIds));
       
  7880       newState.cache = { ...Object(external_lodash_["omit"])(newState.cache, action.replacedClientIds),
       
  7881         ...Object(external_lodash_["omit"])(parentClientIds, action.replacedClientIds),
       
  7882         ...fillKeysWithEmptyObject(Object(external_lodash_["keys"])(flattenBlocks(action.blocks)))
       
  7883       };
       
  7884       break;
       
  7885 
       
  7886     case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  7887       newState.cache = { ...Object(external_lodash_["omit"])(newState.cache, action.removedClientIds),
       
  7888         ...fillKeysWithEmptyObject(Object(external_lodash_["difference"])(getBlocksWithParentsClientIds(action.clientIds), action.clientIds))
       
  7889       };
       
  7890       break;
       
  7891 
       
  7892     case 'MOVE_BLOCKS_TO_POSITION':
       
  7893       {
       
  7894         const updatedBlockUids = [...action.clientIds];
       
  7895 
       
  7896         if (action.fromRootClientId) {
       
  7897           updatedBlockUids.push(action.fromRootClientId);
       
  7898         }
       
  7899 
       
  7900         if (action.toRootClientId) {
       
  7901           updatedBlockUids.push(action.toRootClientId);
       
  7902         }
       
  7903 
       
  7904         newState.cache = { ...newState.cache,
       
  7905           ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids))
       
  7906         };
       
  7907         break;
       
  7908       }
       
  7909 
       
  7910     case 'MOVE_BLOCKS_UP':
       
  7911     case 'MOVE_BLOCKS_DOWN':
       
  7912       {
       
  7913         const updatedBlockUids = [];
       
  7914 
       
  7915         if (action.rootClientId) {
       
  7916           updatedBlockUids.push(action.rootClientId);
       
  7917         }
       
  7918 
       
  7919         newState.cache = { ...newState.cache,
       
  7920           ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids))
       
  7921         };
       
  7922         break;
       
  7923       }
       
  7924 
       
  7925     case 'SAVE_REUSABLE_BLOCK_SUCCESS':
       
  7926       {
       
  7927         const updatedBlockUids = Object(external_lodash_["keys"])(Object(external_lodash_["omitBy"])(newState.attributes, (attributes, clientId) => {
       
  7928           return newState.byClientId[clientId].name !== 'core/block' || attributes.ref !== action.updatedId;
       
  7929         }));
       
  7930         newState.cache = { ...newState.cache,
       
  7931           ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids))
       
  7932         };
       
  7933       }
       
  7934   }
       
  7935 
       
  7936   return newState;
       
  7937 };
       
  7938 /**
       
  7939  * Higher-order reducer intended to augment the blocks reducer, assigning an
       
  7940  * `isPersistentChange` property value corresponding to whether a change in
       
  7941  * state can be considered as persistent. All changes are considered persistent
       
  7942  * except when updating the same block attribute as in the previous action.
       
  7943  *
       
  7944  * @param {Function} reducer Original reducer function.
       
  7945  *
       
  7946  * @return {Function} Enhanced reducer function.
       
  7947  */
       
  7948 
       
  7949 
       
  7950 function withPersistentBlockChange(reducer) {
       
  7951   let lastAction;
       
  7952   let markNextChangeAsNotPersistent = false;
       
  7953   return (state, action) => {
       
  7954     let nextState = reducer(state, action);
       
  7955     const isExplicitPersistentChange = action.type === 'MARK_LAST_CHANGE_AS_PERSISTENT' || markNextChangeAsNotPersistent; // Defer to previous state value (or default) unless changing or
       
  7956     // explicitly marking as persistent.
       
  7957 
       
  7958     if (state === nextState && !isExplicitPersistentChange) {
       
  7959       var _state$isPersistentCh;
       
  7960 
       
  7961       markNextChangeAsNotPersistent = action.type === 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT';
       
  7962       const nextIsPersistentChange = (_state$isPersistentCh = state === null || state === void 0 ? void 0 : state.isPersistentChange) !== null && _state$isPersistentCh !== void 0 ? _state$isPersistentCh : true;
       
  7963 
       
  7964       if (state.isPersistentChange === nextIsPersistentChange) {
       
  7965         return state;
       
  7966       }
       
  7967 
       
  7968       return { ...nextState,
       
  7969         isPersistentChange: nextIsPersistentChange
       
  7970       };
       
  7971     }
       
  7972 
       
  7973     nextState = { ...nextState,
       
  7974       isPersistentChange: isExplicitPersistentChange ? !markNextChangeAsNotPersistent : !isUpdatingSameBlockAttribute(action, lastAction)
       
  7975     }; // In comparing against the previous action, consider only those which
       
  7976     // would have qualified as one which would have been ignored or not
       
  7977     // have resulted in a changed state.
       
  7978 
       
  7979     lastAction = action;
       
  7980     markNextChangeAsNotPersistent = action.type === 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT';
       
  7981     return nextState;
       
  7982   };
       
  7983 }
       
  7984 /**
       
  7985  * Higher-order reducer intended to augment the blocks reducer, assigning an
       
  7986  * `isIgnoredChange` property value corresponding to whether a change in state
       
  7987  * can be considered as ignored. A change is considered ignored when the result
       
  7988  * of an action not incurred by direct user interaction.
       
  7989  *
       
  7990  * @param {Function} reducer Original reducer function.
       
  7991  *
       
  7992  * @return {Function} Enhanced reducer function.
       
  7993  */
       
  7994 
       
  7995 
       
  7996 function withIgnoredBlockChange(reducer) {
       
  7997   /**
       
  7998    * Set of action types for which a blocks state change should be ignored.
       
  7999    *
       
  8000    * @type {Set}
       
  8001    */
       
  8002   const IGNORED_ACTION_TYPES = new Set(['RECEIVE_BLOCKS']);
       
  8003   return (state, action) => {
       
  8004     const nextState = reducer(state, action);
       
  8005 
       
  8006     if (nextState !== state) {
       
  8007       nextState.isIgnoredChange = IGNORED_ACTION_TYPES.has(action.type);
       
  8008     }
       
  8009 
       
  8010     return nextState;
       
  8011   };
       
  8012 }
       
  8013 /**
       
  8014  * Higher-order reducer targeting the combined blocks reducer, augmenting
       
  8015  * block client IDs in remove action to include cascade of inner blocks.
       
  8016  *
       
  8017  * @param {Function} reducer Original reducer function.
       
  8018  *
       
  8019  * @return {Function} Enhanced reducer function.
       
  8020  */
       
  8021 
       
  8022 
       
  8023 const withInnerBlocksRemoveCascade = reducer => (state, action) => {
       
  8024   // Gets all children which need to be removed.
       
  8025   const getAllChildren = clientIds => {
       
  8026     let result = clientIds;
       
  8027 
       
  8028     for (let i = 0; i < result.length; i++) {
       
  8029       if (!state.order[result[i]] || action.keepControlledInnerBlocks && action.keepControlledInnerBlocks[result[i]]) {
       
  8030         continue;
       
  8031       }
       
  8032 
       
  8033       if (result === clientIds) {
       
  8034         result = [...result];
       
  8035       }
       
  8036 
       
  8037       result.push(...state.order[result[i]]);
       
  8038     }
       
  8039 
       
  8040     return result;
       
  8041   };
       
  8042 
       
  8043   if (state) {
       
  8044     switch (action.type) {
       
  8045       case 'REMOVE_BLOCKS':
       
  8046         action = { ...action,
       
  8047           type: 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN',
       
  8048           removedClientIds: getAllChildren(action.clientIds)
       
  8049         };
       
  8050         break;
       
  8051 
       
  8052       case 'REPLACE_BLOCKS':
       
  8053         action = { ...action,
       
  8054           type: 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN',
       
  8055           replacedClientIds: getAllChildren(action.clientIds)
       
  8056         };
       
  8057         break;
       
  8058     }
       
  8059   }
       
  8060 
       
  8061   return reducer(state, action);
       
  8062 };
       
  8063 /**
       
  8064  * Higher-order reducer which targets the combined blocks reducer and handles
       
  8065  * the `RESET_BLOCKS` action. When dispatched, this action will replace all
       
  8066  * blocks that exist in the post, leaving blocks that exist only in state (e.g.
       
  8067  * reusable blocks and blocks controlled by inner blocks controllers) alone.
       
  8068  *
       
  8069  * @param {Function} reducer Original reducer function.
       
  8070  *
       
  8071  * @return {Function} Enhanced reducer function.
       
  8072  */
       
  8073 
       
  8074 
       
  8075 const withBlockReset = reducer => (state, action) => {
       
  8076   if (state && action.type === 'RESET_BLOCKS') {
       
  8077     /**
       
  8078      * A list of client IDs associated with the top level entity (like a
       
  8079      * post or template). It excludes the client IDs of blocks associated
       
  8080      * with other entities, like inner block controllers or reusable blocks.
       
  8081      */
       
  8082     const visibleClientIds = getNestedBlockClientIds(state.order, '', state.controlledInnerBlocks); // pickBy returns only the truthy values from controlledInnerBlocks
       
  8083 
       
  8084     const controlledInnerBlocks = Object.keys(Object(external_lodash_["pickBy"])(state.controlledInnerBlocks));
       
  8085     /**
       
  8086      * Each update operation consists of a few parts:
       
  8087      * 1. First, the client IDs associated with the top level entity are
       
  8088      *    removed from the existing state key, leaving in place controlled
       
  8089      *    blocks (like reusable blocks and inner block controllers).
       
  8090      * 2. Second, the blocks from the reset action are used to calculate the
       
  8091      *    individual state keys. This will re-populate the clientIDs which
       
  8092      *    were removed in step 1.
       
  8093      * 3. In some cases, we remove the recalculated inner block controllers,
       
  8094      *    letting their old values persist. We need to do this because the
       
  8095      *    reset block action from a top-level entity is not aware of any
       
  8096      *    inner blocks inside InnerBlock controllers. So if the new values
       
  8097      *    were used, it would not take into account the existing InnerBlocks
       
  8098      *    which already exist in the state for inner block controllers. For
       
  8099      *    example, `attributes` uses the newly computed value for controllers
       
  8100      *    since attributes are stored in the top-level entity. But `order`
       
  8101      *    uses the previous value for the controllers since the new value
       
  8102      *    does not include the order of controlled inner blocks. So if the
       
  8103      *    new value was used, template parts would disappear from the editor
       
  8104      *    whenever you try to undo a change in the top level entity.
       
  8105      */
       
  8106 
       
  8107     return { ...state,
       
  8108       byClientId: { ...Object(external_lodash_["omit"])(state.byClientId, visibleClientIds),
       
  8109         ...getFlattenedBlocksWithoutAttributes(action.blocks)
       
  8110       },
       
  8111       attributes: { ...Object(external_lodash_["omit"])(state.attributes, visibleClientIds),
       
  8112         ...getFlattenedBlockAttributes(action.blocks)
       
  8113       },
       
  8114       order: { ...Object(external_lodash_["omit"])(state.order, visibleClientIds),
       
  8115         ...Object(external_lodash_["omit"])(mapBlockOrder(action.blocks), controlledInnerBlocks)
       
  8116       },
       
  8117       parents: { ...Object(external_lodash_["omit"])(state.parents, visibleClientIds),
       
  8118         ...mapBlockParents(action.blocks)
       
  8119       },
       
  8120       cache: { ...Object(external_lodash_["omit"])(state.cache, visibleClientIds),
       
  8121         ...Object(external_lodash_["omit"])(Object(external_lodash_["mapValues"])(flattenBlocks(action.blocks), () => ({})), controlledInnerBlocks)
       
  8122       }
       
  8123     };
       
  8124   }
       
  8125 
       
  8126   return reducer(state, action);
       
  8127 };
       
  8128 /**
       
  8129  * Higher-order reducer which targets the combined blocks reducer and handles
       
  8130  * the `REPLACE_INNER_BLOCKS` action. When dispatched, this action the state
       
  8131  * should become equivalent to the execution of a `REMOVE_BLOCKS` action
       
  8132  * containing all the child's of the root block followed by the execution of
       
  8133  * `INSERT_BLOCKS` with the new blocks.
       
  8134  *
       
  8135  * @param {Function} reducer Original reducer function.
       
  8136  *
       
  8137  * @return {Function} Enhanced reducer function.
       
  8138  */
       
  8139 
       
  8140 
       
  8141 const withReplaceInnerBlocks = reducer => (state, action) => {
       
  8142   if (action.type !== 'REPLACE_INNER_BLOCKS') {
       
  8143     return reducer(state, action);
       
  8144   } // Finds every nested inner block controller. We must check the action blocks
       
  8145   // and not just the block parent state because some inner block controllers
       
  8146   // should be deleted if specified, whereas others should not be deleted. If
       
  8147   // a controlled should not be deleted, then we need to avoid deleting its
       
  8148   // inner blocks from the block state because its inner blocks will not be
       
  8149   // attached to the block in the action.
       
  8150 
       
  8151 
       
  8152   const nestedControllers = {};
       
  8153 
       
  8154   if (Object.keys(state.controlledInnerBlocks).length) {
       
  8155     const stack = [...action.blocks];
       
  8156 
       
  8157     while (stack.length) {
       
  8158       const {
       
  8159         innerBlocks,
       
  8160         ...block
       
  8161       } = stack.shift();
       
  8162       stack.push(...innerBlocks);
       
  8163 
       
  8164       if (!!state.controlledInnerBlocks[block.clientId]) {
       
  8165         nestedControllers[block.clientId] = true;
       
  8166       }
       
  8167     }
       
  8168   } // The `keepControlledInnerBlocks` prop will keep the inner blocks of the
       
  8169   // marked block in the block state so that they can be reattached to the
       
  8170   // marked block when we re-insert everything a few lines below.
       
  8171 
       
  8172 
       
  8173   let stateAfterBlocksRemoval = state;
       
  8174 
       
  8175   if (state.order[action.rootClientId]) {
       
  8176     stateAfterBlocksRemoval = reducer(stateAfterBlocksRemoval, {
       
  8177       type: 'REMOVE_BLOCKS',
       
  8178       keepControlledInnerBlocks: nestedControllers,
       
  8179       clientIds: state.order[action.rootClientId]
       
  8180     });
       
  8181   }
       
  8182 
       
  8183   let stateAfterInsert = stateAfterBlocksRemoval;
       
  8184 
       
  8185   if (action.blocks.length) {
       
  8186     stateAfterInsert = reducer(stateAfterInsert, { ...action,
       
  8187       type: 'INSERT_BLOCKS',
       
  8188       index: 0
       
  8189     }); // We need to re-attach the block order of the controlled inner blocks.
       
  8190     // Otherwise, an inner block controller's blocks will be deleted entirely
       
  8191     // from its entity..
       
  8192 
       
  8193     stateAfterInsert.order = { ...stateAfterInsert.order,
       
  8194       ...Object(external_lodash_["reduce"])(nestedControllers, (result, value, key) => {
       
  8195         if (state.order[key]) {
       
  8196           result[key] = state.order[key];
       
  8197         }
       
  8198 
       
  8199         return result;
       
  8200       }, {})
       
  8201     };
       
  8202   }
       
  8203 
       
  8204   return stateAfterInsert;
       
  8205 };
       
  8206 /**
       
  8207  * Higher-order reducer which targets the combined blocks reducer and handles
       
  8208  * the `SAVE_REUSABLE_BLOCK_SUCCESS` action. This action can't be handled by
       
  8209  * regular reducers and needs a higher-order reducer since it needs access to
       
  8210  * both `byClientId` and `attributes` simultaneously.
       
  8211  *
       
  8212  * @param {Function} reducer Original reducer function.
       
  8213  *
       
  8214  * @return {Function} Enhanced reducer function.
       
  8215  */
       
  8216 
       
  8217 
       
  8218 const withSaveReusableBlock = reducer => (state, action) => {
       
  8219   if (state && action.type === 'SAVE_REUSABLE_BLOCK_SUCCESS') {
       
  8220     const {
       
  8221       id,
       
  8222       updatedId
       
  8223     } = action; // If a temporary reusable block is saved, we swap the temporary id with the final one
       
  8224 
       
  8225     if (id === updatedId) {
       
  8226       return state;
       
  8227     }
       
  8228 
       
  8229     state = { ...state
       
  8230     };
       
  8231     state.attributes = Object(external_lodash_["mapValues"])(state.attributes, (attributes, clientId) => {
       
  8232       const {
       
  8233         name
       
  8234       } = state.byClientId[clientId];
       
  8235 
       
  8236       if (name === 'core/block' && attributes.ref === id) {
       
  8237         return { ...attributes,
       
  8238           ref: updatedId
       
  8239         };
       
  8240       }
       
  8241 
       
  8242       return attributes;
       
  8243     });
       
  8244   }
       
  8245 
       
  8246   return reducer(state, action);
       
  8247 };
       
  8248 /**
       
  8249  * Reducer returning the blocks state.
       
  8250  *
       
  8251  * @param {Object} state  Current state.
       
  8252  * @param {Object} action Dispatched action.
       
  8253  *
       
  8254  * @return {Object} Updated state.
       
  8255  */
       
  8256 
       
  8257 
       
  8258 const reducer_blocks = Object(external_lodash_["flow"])(external_wp_data_["combineReducers"], withSaveReusableBlock, // needs to be before withBlockCache
       
  8259 withBlockCache, // needs to be before withInnerBlocksRemoveCascade
       
  8260 withInnerBlocksRemoveCascade, withReplaceInnerBlocks, // needs to be after withInnerBlocksRemoveCascade
       
  8261 withBlockReset, withPersistentBlockChange, withIgnoredBlockChange)({
       
  8262   byClientId(state = {}, action) {
       
  8263     switch (action.type) {
       
  8264       case 'RESET_BLOCKS':
       
  8265         return getFlattenedBlocksWithoutAttributes(action.blocks);
       
  8266 
       
  8267       case 'RECEIVE_BLOCKS':
       
  8268       case 'INSERT_BLOCKS':
       
  8269         return { ...state,
       
  8270           ...getFlattenedBlocksWithoutAttributes(action.blocks)
       
  8271         };
       
  8272 
       
  8273       case 'UPDATE_BLOCK':
       
  8274         // Ignore updates if block isn't known
       
  8275         if (!state[action.clientId]) {
       
  8276           return state;
       
  8277         } // Do nothing if only attributes change.
       
  8278 
       
  8279 
       
  8280         const changes = Object(external_lodash_["omit"])(action.updates, 'attributes');
       
  8281 
       
  8282         if (Object(external_lodash_["isEmpty"])(changes)) {
       
  8283           return state;
       
  8284         }
       
  8285 
       
  8286         return { ...state,
       
  8287           [action.clientId]: { ...state[action.clientId],
       
  8288             ...changes
       
  8289           }
       
  8290         };
       
  8291 
       
  8292       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  8293         if (!action.blocks) {
       
  8294           return state;
       
  8295         }
       
  8296 
       
  8297         return { ...Object(external_lodash_["omit"])(state, action.replacedClientIds),
       
  8298           ...getFlattenedBlocksWithoutAttributes(action.blocks)
       
  8299         };
       
  8300 
       
  8301       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  8302         return Object(external_lodash_["omit"])(state, action.removedClientIds);
       
  8303     }
       
  8304 
       
  8305     return state;
       
  8306   },
       
  8307 
       
  8308   attributes(state = {}, action) {
       
  8309     switch (action.type) {
       
  8310       case 'RESET_BLOCKS':
       
  8311         return getFlattenedBlockAttributes(action.blocks);
       
  8312 
       
  8313       case 'RECEIVE_BLOCKS':
       
  8314       case 'INSERT_BLOCKS':
       
  8315         return { ...state,
       
  8316           ...getFlattenedBlockAttributes(action.blocks)
       
  8317         };
       
  8318 
       
  8319       case 'UPDATE_BLOCK':
       
  8320         // Ignore updates if block isn't known or there are no attribute changes.
       
  8321         if (!state[action.clientId] || !action.updates.attributes) {
       
  8322           return state;
       
  8323         }
       
  8324 
       
  8325         return { ...state,
       
  8326           [action.clientId]: { ...state[action.clientId],
       
  8327             ...action.updates.attributes
       
  8328           }
       
  8329         };
       
  8330 
       
  8331       case 'UPDATE_BLOCK_ATTRIBUTES':
       
  8332         {
       
  8333           // Avoid a state change if none of the block IDs are known.
       
  8334           if (action.clientIds.every(id => !state[id])) {
       
  8335             return state;
       
  8336           }
       
  8337 
       
  8338           const next = action.clientIds.reduce((accumulator, id) => ({ ...accumulator,
       
  8339             [id]: Object(external_lodash_["reduce"])(action.uniqueByBlock ? action.attributes[id] : action.attributes, (result, value, key) => {
       
  8340               // Consider as updates only changed values.
       
  8341               if (value !== result[key]) {
       
  8342                 result = getMutateSafeObject(state[id], result);
       
  8343                 result[key] = value;
       
  8344               }
       
  8345 
       
  8346               return result;
       
  8347             }, state[id])
       
  8348           }), {});
       
  8349 
       
  8350           if (action.clientIds.every(id => next[id] === state[id])) {
       
  8351             return state;
       
  8352           }
       
  8353 
       
  8354           return { ...state,
       
  8355             ...next
       
  8356           };
       
  8357         }
       
  8358 
       
  8359       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  8360         if (!action.blocks) {
       
  8361           return state;
       
  8362         }
       
  8363 
       
  8364         return { ...Object(external_lodash_["omit"])(state, action.replacedClientIds),
       
  8365           ...getFlattenedBlockAttributes(action.blocks)
       
  8366         };
       
  8367 
       
  8368       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  8369         return Object(external_lodash_["omit"])(state, action.removedClientIds);
       
  8370     }
       
  8371 
       
  8372     return state;
       
  8373   },
       
  8374 
       
  8375   order(state = {}, action) {
       
  8376     switch (action.type) {
       
  8377       case 'RESET_BLOCKS':
       
  8378         return mapBlockOrder(action.blocks);
       
  8379 
       
  8380       case 'RECEIVE_BLOCKS':
       
  8381         return { ...state,
       
  8382           ...Object(external_lodash_["omit"])(mapBlockOrder(action.blocks), '')
       
  8383         };
       
  8384 
       
  8385       case 'INSERT_BLOCKS':
       
  8386         {
       
  8387           const {
       
  8388             rootClientId = ''
       
  8389           } = action;
       
  8390           const subState = state[rootClientId] || [];
       
  8391           const mappedBlocks = mapBlockOrder(action.blocks, rootClientId);
       
  8392           const {
       
  8393             index = subState.length
       
  8394           } = action;
       
  8395           return { ...state,
       
  8396             ...mappedBlocks,
       
  8397             [rootClientId]: insertAt(subState, mappedBlocks[rootClientId], index)
       
  8398           };
       
  8399         }
       
  8400 
       
  8401       case 'MOVE_BLOCKS_TO_POSITION':
       
  8402         {
       
  8403           const {
       
  8404             fromRootClientId = '',
       
  8405             toRootClientId = '',
       
  8406             clientIds
       
  8407           } = action;
       
  8408           const {
       
  8409             index = state[toRootClientId].length
       
  8410           } = action; // Moving inside the same parent block
       
  8411 
       
  8412           if (fromRootClientId === toRootClientId) {
       
  8413             const subState = state[toRootClientId];
       
  8414             const fromIndex = subState.indexOf(clientIds[0]);
       
  8415             return { ...state,
       
  8416               [toRootClientId]: moveTo(state[toRootClientId], fromIndex, index, clientIds.length)
       
  8417             };
       
  8418           } // Moving from a parent block to another
       
  8419 
       
  8420 
       
  8421           return { ...state,
       
  8422             [fromRootClientId]: Object(external_lodash_["without"])(state[fromRootClientId], ...clientIds),
       
  8423             [toRootClientId]: insertAt(state[toRootClientId], clientIds, index)
       
  8424           };
       
  8425         }
       
  8426 
       
  8427       case 'MOVE_BLOCKS_UP':
       
  8428         {
       
  8429           const {
       
  8430             clientIds,
       
  8431             rootClientId = ''
       
  8432           } = action;
       
  8433           const firstClientId = Object(external_lodash_["first"])(clientIds);
       
  8434           const subState = state[rootClientId];
       
  8435 
       
  8436           if (!subState.length || firstClientId === Object(external_lodash_["first"])(subState)) {
       
  8437             return state;
       
  8438           }
       
  8439 
       
  8440           const firstIndex = subState.indexOf(firstClientId);
       
  8441           return { ...state,
       
  8442             [rootClientId]: moveTo(subState, firstIndex, firstIndex - 1, clientIds.length)
       
  8443           };
       
  8444         }
       
  8445 
       
  8446       case 'MOVE_BLOCKS_DOWN':
       
  8447         {
       
  8448           const {
       
  8449             clientIds,
       
  8450             rootClientId = ''
       
  8451           } = action;
       
  8452           const firstClientId = Object(external_lodash_["first"])(clientIds);
       
  8453           const lastClientId = Object(external_lodash_["last"])(clientIds);
       
  8454           const subState = state[rootClientId];
       
  8455 
       
  8456           if (!subState.length || lastClientId === Object(external_lodash_["last"])(subState)) {
       
  8457             return state;
       
  8458           }
       
  8459 
       
  8460           const firstIndex = subState.indexOf(firstClientId);
       
  8461           return { ...state,
       
  8462             [rootClientId]: moveTo(subState, firstIndex, firstIndex + 1, clientIds.length)
       
  8463           };
       
  8464         }
       
  8465 
       
  8466       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  8467         {
       
  8468           const {
       
  8469             clientIds
       
  8470           } = action;
       
  8471 
       
  8472           if (!action.blocks) {
       
  8473             return state;
       
  8474           }
       
  8475 
       
  8476           const mappedBlocks = mapBlockOrder(action.blocks);
       
  8477           return Object(external_lodash_["flow"])([nextState => Object(external_lodash_["omit"])(nextState, action.replacedClientIds), nextState => ({ ...nextState,
       
  8478             ...Object(external_lodash_["omit"])(mappedBlocks, '')
       
  8479           }), nextState => Object(external_lodash_["mapValues"])(nextState, subState => Object(external_lodash_["reduce"])(subState, (result, clientId) => {
       
  8480             if (clientId === clientIds[0]) {
       
  8481               return [...result, ...mappedBlocks['']];
       
  8482             }
       
  8483 
       
  8484             if (clientIds.indexOf(clientId) === -1) {
       
  8485               result.push(clientId);
       
  8486             }
       
  8487 
       
  8488             return result;
       
  8489           }, []))])(state);
       
  8490         }
       
  8491 
       
  8492       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  8493         return Object(external_lodash_["flow"])([// Remove inner block ordering for removed blocks
       
  8494         nextState => Object(external_lodash_["omit"])(nextState, action.removedClientIds), // Remove deleted blocks from other blocks' orderings
       
  8495         nextState => Object(external_lodash_["mapValues"])(nextState, subState => Object(external_lodash_["without"])(subState, ...action.removedClientIds))])(state);
       
  8496     }
       
  8497 
       
  8498     return state;
       
  8499   },
       
  8500 
       
  8501   // While technically redundant data as the inverse of `order`, it serves as
       
  8502   // an optimization for the selectors which derive the ancestry of a block.
       
  8503   parents(state = {}, action) {
       
  8504     switch (action.type) {
       
  8505       case 'RESET_BLOCKS':
       
  8506         return mapBlockParents(action.blocks);
       
  8507 
       
  8508       case 'RECEIVE_BLOCKS':
       
  8509         return { ...state,
       
  8510           ...mapBlockParents(action.blocks)
       
  8511         };
       
  8512 
       
  8513       case 'INSERT_BLOCKS':
       
  8514         return { ...state,
       
  8515           ...mapBlockParents(action.blocks, action.rootClientId || '')
       
  8516         };
       
  8517 
       
  8518       case 'MOVE_BLOCKS_TO_POSITION':
       
  8519         {
       
  8520           return { ...state,
       
  8521             ...action.clientIds.reduce((accumulator, id) => {
       
  8522               accumulator[id] = action.toRootClientId || '';
       
  8523               return accumulator;
       
  8524             }, {})
       
  8525           };
       
  8526         }
       
  8527 
       
  8528       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  8529         return { ...Object(external_lodash_["omit"])(state, action.replacedClientIds),
       
  8530           ...mapBlockParents(action.blocks, state[action.clientIds[0]])
       
  8531         };
       
  8532 
       
  8533       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
  8534         return Object(external_lodash_["omit"])(state, action.removedClientIds);
       
  8535     }
       
  8536 
       
  8537     return state;
       
  8538   },
       
  8539 
       
  8540   controlledInnerBlocks(state = {}, {
       
  8541     type,
       
  8542     clientId,
       
  8543     hasControlledInnerBlocks
       
  8544   }) {
       
  8545     if (type === 'SET_HAS_CONTROLLED_INNER_BLOCKS') {
       
  8546       return { ...state,
       
  8547         [clientId]: hasControlledInnerBlocks
       
  8548       };
       
  8549     }
       
  8550 
       
  8551     return state;
       
  8552   }
       
  8553 
       
  8554 });
       
  8555 /**
       
  8556  * Reducer returning typing state.
       
  8557  *
       
  8558  * @param {boolean} state  Current state.
       
  8559  * @param {Object}  action Dispatched action.
       
  8560  *
       
  8561  * @return {boolean} Updated state.
       
  8562  */
       
  8563 
       
  8564 function reducer_isTyping(state = false, action) {
       
  8565   switch (action.type) {
       
  8566     case 'START_TYPING':
       
  8567       return true;
       
  8568 
       
  8569     case 'STOP_TYPING':
       
  8570       return false;
       
  8571   }
       
  8572 
       
  8573   return state;
       
  8574 }
       
  8575 /**
       
  8576  * Reducer returning dragged block client id.
       
  8577  *
       
  8578  * @param {string[]} state  Current state.
       
  8579  * @param {Object}  action Dispatched action.
       
  8580  *
       
  8581  * @return {string[]} Updated state.
       
  8582  */
       
  8583 
       
  8584 function draggedBlocks(state = [], action) {
       
  8585   switch (action.type) {
       
  8586     case 'START_DRAGGING_BLOCKS':
       
  8587       return action.clientIds;
       
  8588 
       
  8589     case 'STOP_DRAGGING_BLOCKS':
       
  8590       return [];
       
  8591   }
       
  8592 
       
  8593   return state;
       
  8594 }
       
  8595 /**
       
  8596  * Reducer returning whether the caret is within formatted text.
       
  8597  *
       
  8598  * @param {boolean} state  Current state.
       
  8599  * @param {Object}  action Dispatched action.
       
  8600  *
       
  8601  * @return {boolean} Updated state.
       
  8602  */
       
  8603 
       
  8604 function reducer_isCaretWithinFormattedText(state = false, action) {
       
  8605   switch (action.type) {
       
  8606     case 'ENTER_FORMATTED_TEXT':
       
  8607       return true;
       
  8608 
       
  8609     case 'EXIT_FORMATTED_TEXT':
       
  8610       return false;
       
  8611   }
       
  8612 
       
  8613   return state;
       
  8614 }
       
  8615 /**
       
  8616  * Internal helper reducer for selectionStart and selectionEnd. Can hold a block
       
  8617  * selection, represented by an object with property clientId.
       
  8618  *
       
  8619  * @param {Object} state  Current state.
       
  8620  * @param {Object} action Dispatched action.
       
  8621  *
       
  8622  * @return {Object} Updated state.
       
  8623  */
       
  8624 
       
  8625 function selectionHelper(state = {}, action) {
       
  8626   switch (action.type) {
       
  8627     case 'CLEAR_SELECTED_BLOCK':
       
  8628       {
       
  8629         if (state.clientId) {
       
  8630           return {};
       
  8631         }
       
  8632 
       
  8633         return state;
       
  8634       }
       
  8635 
       
  8636     case 'SELECT_BLOCK':
       
  8637       if (action.clientId === state.clientId) {
       
  8638         return state;
       
  8639       }
       
  8640 
       
  8641       return {
       
  8642         clientId: action.clientId
       
  8643       };
       
  8644 
       
  8645     case 'REPLACE_INNER_BLOCKS':
       
  8646     case 'INSERT_BLOCKS':
       
  8647       {
       
  8648         if (!action.updateSelection || !action.blocks.length) {
       
  8649           return state;
       
  8650         }
       
  8651 
       
  8652         return {
       
  8653           clientId: action.blocks[0].clientId
       
  8654         };
       
  8655       }
       
  8656 
       
  8657     case 'REMOVE_BLOCKS':
       
  8658       if (!action.clientIds || !action.clientIds.length || action.clientIds.indexOf(state.clientId) === -1) {
       
  8659         return state;
       
  8660       }
       
  8661 
       
  8662       return {};
       
  8663 
       
  8664     case 'REPLACE_BLOCKS':
       
  8665       {
       
  8666         if (action.clientIds.indexOf(state.clientId) === -1) {
       
  8667           return state;
       
  8668         }
       
  8669 
       
  8670         const indexToSelect = action.indexToSelect || action.blocks.length - 1;
       
  8671         const blockToSelect = action.blocks[indexToSelect];
       
  8672 
       
  8673         if (!blockToSelect) {
       
  8674           return {};
       
  8675         }
       
  8676 
       
  8677         if (blockToSelect.clientId === state.clientId) {
       
  8678           return state;
       
  8679         }
       
  8680 
       
  8681         return {
       
  8682           clientId: blockToSelect.clientId
       
  8683         };
       
  8684       }
       
  8685   }
       
  8686 
       
  8687   return state;
       
  8688 }
       
  8689 /**
       
  8690  * Reducer returning the selection state.
       
  8691  *
       
  8692  * @param {boolean} state  Current state.
       
  8693  * @param {Object}  action Dispatched action.
       
  8694  *
       
  8695  * @return {boolean} Updated state.
       
  8696  */
       
  8697 
       
  8698 
       
  8699 function reducer_selection(state = {}, action) {
       
  8700   var _state$selectionStart, _state$selectionEnd;
       
  8701 
       
  8702   switch (action.type) {
       
  8703     case 'SELECTION_CHANGE':
       
  8704       return {
       
  8705         selectionStart: {
       
  8706           clientId: action.clientId,
       
  8707           attributeKey: action.attributeKey,
       
  8708           offset: action.startOffset
       
  8709         },
       
  8710         selectionEnd: {
       
  8711           clientId: action.clientId,
       
  8712           attributeKey: action.attributeKey,
       
  8713           offset: action.endOffset
       
  8714         }
       
  8715       };
       
  8716 
       
  8717     case 'RESET_SELECTION':
       
  8718       const {
       
  8719         selectionStart,
       
  8720         selectionEnd
       
  8721       } = action;
       
  8722       return {
       
  8723         selectionStart,
       
  8724         selectionEnd
       
  8725       };
       
  8726 
       
  8727     case 'MULTI_SELECT':
       
  8728       const {
       
  8729         start,
       
  8730         end
       
  8731       } = action;
       
  8732       return {
       
  8733         selectionStart: {
       
  8734           clientId: start
       
  8735         },
       
  8736         selectionEnd: {
       
  8737           clientId: end
       
  8738         }
       
  8739       };
       
  8740 
       
  8741     case 'RESET_BLOCKS':
       
  8742       const startClientId = state === null || state === void 0 ? void 0 : (_state$selectionStart = state.selectionStart) === null || _state$selectionStart === void 0 ? void 0 : _state$selectionStart.clientId;
       
  8743       const endClientId = state === null || state === void 0 ? void 0 : (_state$selectionEnd = state.selectionEnd) === null || _state$selectionEnd === void 0 ? void 0 : _state$selectionEnd.clientId; // Do nothing if there's no selected block.
       
  8744 
       
  8745       if (!startClientId && !endClientId) {
       
  8746         return state;
       
  8747       } // If the start of the selection won't exist after reset, remove selection.
       
  8748 
       
  8749 
       
  8750       if (!action.blocks.some(block => block.clientId === startClientId)) {
       
  8751         return {
       
  8752           selectionStart: {},
       
  8753           selectionEnd: {}
       
  8754         };
       
  8755       } // If the end of the selection won't exist after reset, collapse selection.
       
  8756 
       
  8757 
       
  8758       if (!action.blocks.some(block => block.clientId === endClientId)) {
       
  8759         return { ...state,
       
  8760           selectionEnd: state.selectionStart
       
  8761         };
       
  8762       }
       
  8763 
       
  8764   }
       
  8765 
       
  8766   return {
       
  8767     selectionStart: selectionHelper(state.selectionStart, action),
       
  8768     selectionEnd: selectionHelper(state.selectionEnd, action)
       
  8769   };
       
  8770 }
       
  8771 /**
       
  8772  * Reducer returning whether the user is multi-selecting.
       
  8773  *
       
  8774  * @param {boolean} state  Current state.
       
  8775  * @param {Object}  action Dispatched action.
       
  8776  *
       
  8777  * @return {boolean} Updated state.
       
  8778  */
       
  8779 
       
  8780 function reducer_isMultiSelecting(state = false, action) {
       
  8781   switch (action.type) {
       
  8782     case 'START_MULTI_SELECT':
       
  8783       return true;
       
  8784 
       
  8785     case 'STOP_MULTI_SELECT':
       
  8786       return false;
       
  8787   }
       
  8788 
       
  8789   return state;
       
  8790 }
       
  8791 /**
       
  8792  * Reducer returning whether selection is enabled.
       
  8793  *
       
  8794  * @param {boolean} state  Current state.
       
  8795  * @param {Object}  action Dispatched action.
       
  8796  *
       
  8797  * @return {boolean} Updated state.
       
  8798  */
       
  8799 
       
  8800 function reducer_isSelectionEnabled(state = true, action) {
       
  8801   switch (action.type) {
       
  8802     case 'TOGGLE_SELECTION':
       
  8803       return action.isSelectionEnabled;
       
  8804   }
       
  8805 
       
  8806   return state;
       
  8807 }
       
  8808 /**
       
  8809  * Reducer returning the intial block selection.
       
  8810  *
       
  8811  * Currently this in only used to restore the selection after block deletion and
       
  8812  * pasting new content.This reducer should eventually be removed in favour of setting
       
  8813  * selection directly.
       
  8814  *
       
  8815  * @param {boolean} state  Current state.
       
  8816  * @param {Object}  action Dispatched action.
       
  8817  *
       
  8818  * @return {number|null} Initial position: 0, -1 or null.
       
  8819  */
       
  8820 
       
  8821 function reducer_initialPosition(state = null, action) {
       
  8822   if (action.type === 'REPLACE_BLOCKS' && action.initialPosition !== undefined) {
       
  8823     return action.initialPosition;
       
  8824   } else if (['SELECT_BLOCK', 'RESET_SELECTION', 'INSERT_BLOCKS', 'REPLACE_INNER_BLOCKS'].includes(action.type)) {
       
  8825     return action.initialPosition;
       
  8826   }
       
  8827 
       
  8828   return state;
       
  8829 }
       
  8830 function blocksMode(state = {}, action) {
       
  8831   if (action.type === 'TOGGLE_BLOCK_MODE') {
       
  8832     const {
       
  8833       clientId
       
  8834     } = action;
       
  8835     return { ...state,
       
  8836       [clientId]: state[clientId] && state[clientId] === 'html' ? 'visual' : 'html'
       
  8837     };
       
  8838   }
       
  8839 
       
  8840   return state;
       
  8841 }
       
  8842 /**
       
  8843  * Reducer returning the block insertion point visibility, either null if there
       
  8844  * is not an explicit insertion point assigned, or an object of its `index` and
       
  8845  * `rootClientId`.
       
  8846  *
       
  8847  * @param {Object} state  Current state.
       
  8848  * @param {Object} action Dispatched action.
       
  8849  *
       
  8850  * @return {Object} Updated state.
       
  8851  */
       
  8852 
       
  8853 function reducer_insertionPoint(state = null, action) {
       
  8854   switch (action.type) {
       
  8855     case 'SHOW_INSERTION_POINT':
       
  8856       const {
       
  8857         rootClientId,
       
  8858         index,
       
  8859         __unstableWithInserter
       
  8860       } = action;
       
  8861       return {
       
  8862         rootClientId,
       
  8863         index,
       
  8864         __unstableWithInserter
       
  8865       };
       
  8866 
       
  8867     case 'HIDE_INSERTION_POINT':
       
  8868       return null;
       
  8869   }
       
  8870 
       
  8871   return state;
       
  8872 }
       
  8873 /**
       
  8874  * Reducer returning whether the post blocks match the defined template or not.
       
  8875  *
       
  8876  * @param {Object} state  Current state.
       
  8877  * @param {Object} action Dispatched action.
       
  8878  *
       
  8879  * @return {boolean} Updated state.
       
  8880  */
       
  8881 
       
  8882 function reducer_template(state = {
       
  8883   isValid: true
       
  8884 }, action) {
       
  8885   switch (action.type) {
       
  8886     case 'SET_TEMPLATE_VALIDITY':
       
  8887       return { ...state,
       
  8888         isValid: action.isValid
       
  8889       };
       
  8890   }
       
  8891 
       
  8892   return state;
       
  8893 }
       
  8894 /**
       
  8895  * Reducer returning the editor setting.
       
  8896  *
       
  8897  * @param {Object} state  Current state.
       
  8898  * @param {Object} action Dispatched action.
       
  8899  *
       
  8900  * @return {Object} Updated state.
       
  8901  */
       
  8902 
       
  8903 function reducer_settings(state = SETTINGS_DEFAULTS, action) {
       
  8904   switch (action.type) {
       
  8905     case 'UPDATE_SETTINGS':
       
  8906       return { ...state,
       
  8907         ...action.settings
       
  8908       };
       
  8909   }
       
  8910 
       
  8911   return state;
       
  8912 }
       
  8913 /**
       
  8914  * Reducer returning the user preferences.
       
  8915  *
       
  8916  * @param {Object}  state                 Current state.
       
  8917  * @param {Object}  action                Dispatched action.
       
  8918  *
       
  8919  * @return {string} Updated state.
       
  8920  */
       
  8921 
       
  8922 function preferences(state = PREFERENCES_DEFAULTS, action) {
       
  8923   switch (action.type) {
       
  8924     case 'INSERT_BLOCKS':
       
  8925     case 'REPLACE_BLOCKS':
       
  8926       return action.blocks.reduce((prevState, block) => {
       
  8927         const {
       
  8928           attributes,
       
  8929           name: blockName
       
  8930         } = block;
       
  8931         const match = Object(external_wp_data_["select"])(external_wp_blocks_["store"]).getActiveBlockVariation(blockName, attributes); // If a block variation match is found change the name to be the same with the
       
  8932         // one that is used for block variations in the Inserter (`getItemFromVariation`).
       
  8933 
       
  8934         let id = match !== null && match !== void 0 && match.name ? `${blockName}/${match.name}` : blockName;
       
  8935         const insert = {
       
  8936           name: id
       
  8937         };
       
  8938 
       
  8939         if (blockName === 'core/block') {
       
  8940           insert.ref = attributes.ref;
       
  8941           id += '/' + attributes.ref;
       
  8942         }
       
  8943 
       
  8944         return { ...prevState,
       
  8945           insertUsage: { ...prevState.insertUsage,
       
  8946             [id]: {
       
  8947               time: action.time,
       
  8948               count: prevState.insertUsage[id] ? prevState.insertUsage[id].count + 1 : 1,
       
  8949               insert
       
  8950             }
       
  8951           }
       
  8952         };
       
  8953       }, state);
       
  8954   }
       
  8955 
       
  8956   return state;
       
  8957 }
       
  8958 /**
       
  8959  * Reducer returning an object where each key is a block client ID, its value
       
  8960  * representing the settings for its nested blocks.
       
  8961  *
       
  8962  * @param {Object} state  Current state.
       
  8963  * @param {Object} action Dispatched action.
       
  8964  *
       
  8965  * @return {Object} Updated state.
       
  8966  */
       
  8967 
       
  8968 const reducer_blockListSettings = (state = {}, action) => {
       
  8969   switch (action.type) {
       
  8970     // Even if the replaced blocks have the same client ID, our logic
       
  8971     // should correct the state.
       
  8972     case 'REPLACE_BLOCKS':
       
  8973     case 'REMOVE_BLOCKS':
       
  8974       {
       
  8975         return Object(external_lodash_["omit"])(state, action.clientIds);
       
  8976       }
       
  8977 
       
  8978     case 'UPDATE_BLOCK_LIST_SETTINGS':
       
  8979       {
       
  8980         const {
       
  8981           clientId
       
  8982         } = action;
       
  8983 
       
  8984         if (!action.settings) {
       
  8985           if (state.hasOwnProperty(clientId)) {
       
  8986             return Object(external_lodash_["omit"])(state, clientId);
       
  8987           }
       
  8988 
       
  8989           return state;
       
  8990         }
       
  8991 
       
  8992         if (Object(external_lodash_["isEqual"])(state[clientId], action.settings)) {
       
  8993           return state;
       
  8994         }
       
  8995 
       
  8996         return { ...state,
       
  8997           [clientId]: action.settings
       
  8998         };
       
  8999       }
       
  9000   }
       
  9001 
       
  9002   return state;
       
  9003 };
       
  9004 /**
       
  9005  * Reducer returning whether the navigation mode is enabled or not.
       
  9006  *
       
  9007  * @param {string} state  Current state.
       
  9008  * @param {Object} action Dispatched action.
       
  9009  *
       
  9010  * @return {string} Updated state.
       
  9011  */
       
  9012 
       
  9013 function reducer_isNavigationMode(state = false, action) {
       
  9014   // Let inserting block always trigger Edit mode.
       
  9015   if (action.type === 'INSERT_BLOCKS') {
       
  9016     return false;
       
  9017   }
       
  9018 
       
  9019   if (action.type === 'SET_NAVIGATION_MODE') {
       
  9020     return action.isNavigationMode;
       
  9021   }
       
  9022 
       
  9023   return state;
       
  9024 }
       
  9025 /**
       
  9026  * Reducer returning whether the block moving mode is enabled or not.
       
  9027  *
       
  9028  * @param {string|null} state  Current state.
       
  9029  * @param {Object} action Dispatched action.
       
  9030  *
       
  9031  * @return {string|null} Updated state.
       
  9032  */
       
  9033 
       
  9034 function reducer_hasBlockMovingClientId(state = null, action) {
       
  9035   // Let inserting block always trigger Edit mode.
       
  9036   if (action.type === 'SET_BLOCK_MOVING_MODE') {
       
  9037     return action.hasBlockMovingClientId;
       
  9038   }
       
  9039 
       
  9040   if (action.type === 'SET_NAVIGATION_MODE') {
       
  9041     return null;
       
  9042   }
       
  9043 
       
  9044   return state;
       
  9045 }
       
  9046 /**
       
  9047  * Reducer return an updated state representing the most recent block attribute
       
  9048  * update. The state is structured as an object where the keys represent the
       
  9049  * client IDs of blocks, the values a subset of attributes from the most recent
       
  9050  * block update. The state is always reset to null if the last action is
       
  9051  * anything other than an attributes update.
       
  9052  *
       
  9053  * @param {Object<string,Object>} state  Current state.
       
  9054  * @param {Object}                action Action object.
       
  9055  *
       
  9056  * @return {[string,Object]} Updated state.
       
  9057  */
       
  9058 
       
  9059 function lastBlockAttributesChange(state, action) {
       
  9060   switch (action.type) {
       
  9061     case 'UPDATE_BLOCK':
       
  9062       if (!action.updates.attributes) {
       
  9063         break;
       
  9064       }
       
  9065 
       
  9066       return {
       
  9067         [action.clientId]: action.updates.attributes
       
  9068       };
       
  9069 
       
  9070     case 'UPDATE_BLOCK_ATTRIBUTES':
       
  9071       return action.clientIds.reduce((accumulator, id) => ({ ...accumulator,
       
  9072         [id]: action.uniqueByBlock ? action.attributes[id] : action.attributes
       
  9073       }), {});
       
  9074   }
       
  9075 
       
  9076   return null;
       
  9077 }
       
  9078 /**
       
  9079  * Reducer returning automatic change state.
       
  9080  *
       
  9081  * @param {boolean} state  Current state.
       
  9082  * @param {Object}  action Dispatched action.
       
  9083  *
       
  9084  * @return {string} Updated state.
       
  9085  */
       
  9086 
       
  9087 function automaticChangeStatus(state, action) {
       
  9088   switch (action.type) {
       
  9089     case 'MARK_AUTOMATIC_CHANGE':
       
  9090       return 'pending';
       
  9091 
       
  9092     case 'MARK_AUTOMATIC_CHANGE_FINAL':
       
  9093       if (state === 'pending') {
       
  9094         return 'final';
       
  9095       }
       
  9096 
       
  9097       return;
       
  9098 
       
  9099     case 'SELECTION_CHANGE':
       
  9100       // As long as the state is not final, ignore any selection changes.
       
  9101       if (state !== 'final') {
       
  9102         return state;
       
  9103       }
       
  9104 
       
  9105       return;
       
  9106     // Undoing an automatic change should still be possible after mouse
       
  9107     // move.
       
  9108 
       
  9109     case 'START_TYPING':
       
  9110     case 'STOP_TYPING':
       
  9111       return state;
       
  9112   } // Reset the state by default (for any action not handled).
       
  9113 
       
  9114 }
       
  9115 /**
       
  9116  * Reducer returning current highlighted block.
       
  9117  *
       
  9118  * @param {boolean} state  Current highlighted block.
       
  9119  * @param {Object}  action Dispatched action.
       
  9120  *
       
  9121  * @return {string} Updated state.
       
  9122  */
       
  9123 
       
  9124 function highlightedBlock(state, action) {
       
  9125   switch (action.type) {
       
  9126     case 'TOGGLE_BLOCK_HIGHLIGHT':
       
  9127       const {
       
  9128         clientId,
       
  9129         isHighlighted
       
  9130       } = action;
       
  9131 
       
  9132       if (isHighlighted) {
       
  9133         return clientId;
       
  9134       } else if (state === clientId) {
       
  9135         return null;
       
  9136       }
       
  9137 
       
  9138       return state;
       
  9139 
       
  9140     case 'SELECT_BLOCK':
       
  9141       if (action.clientId !== state) {
       
  9142         return null;
       
  9143       }
       
  9144 
       
  9145   }
       
  9146 
       
  9147   return state;
       
  9148 }
       
  9149 /**
       
  9150  * Reducer returning the block insertion event list state.
       
  9151  *
       
  9152  * @param {Object}  state  Current state.
       
  9153  * @param {Object}  action Dispatched action.
       
  9154  *
       
  9155  * @return {Object} Updated state.
       
  9156  */
       
  9157 
       
  9158 function lastBlockInserted(state = {}, action) {
       
  9159   var _action$meta;
       
  9160 
       
  9161   switch (action.type) {
       
  9162     case 'INSERT_BLOCKS':
       
  9163       if (!action.blocks.length) {
       
  9164         return state;
       
  9165       }
       
  9166 
       
  9167       const clientId = action.blocks[0].clientId;
       
  9168       const source = (_action$meta = action.meta) === null || _action$meta === void 0 ? void 0 : _action$meta.source;
       
  9169       return {
       
  9170         clientId,
       
  9171         source
       
  9172       };
       
  9173 
       
  9174     case 'RESET_BLOCKS':
       
  9175       return {};
       
  9176   }
       
  9177 
       
  9178   return state;
       
  9179 }
       
  9180 /* harmony default export */ var store_reducer = (Object(external_wp_data_["combineReducers"])({
       
  9181   blocks: reducer_blocks,
       
  9182   isTyping: reducer_isTyping,
       
  9183   draggedBlocks,
       
  9184   isCaretWithinFormattedText: reducer_isCaretWithinFormattedText,
       
  9185   selection: reducer_selection,
       
  9186   isMultiSelecting: reducer_isMultiSelecting,
       
  9187   isSelectionEnabled: reducer_isSelectionEnabled,
       
  9188   initialPosition: reducer_initialPosition,
       
  9189   blocksMode,
       
  9190   blockListSettings: reducer_blockListSettings,
       
  9191   insertionPoint: reducer_insertionPoint,
       
  9192   template: reducer_template,
       
  9193   settings: reducer_settings,
       
  9194   preferences,
       
  9195   lastBlockAttributesChange,
       
  9196   isNavigationMode: reducer_isNavigationMode,
       
  9197   hasBlockMovingClientId: reducer_hasBlockMovingClientId,
       
  9198   automaticChangeStatus,
       
  9199   highlightedBlock,
       
  9200   lastBlockInserted
       
  9201 }));
       
  9202 
       
  9203 // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
       
  9204 var rememo = __webpack_require__("pPDe");
       
  9205 
       
  9206 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/selectors.js
       
  9207 
       
  9208 
       
  9209 /**
       
  9210  * External dependencies
       
  9211  */
       
  9212 
       
  9213 
       
  9214 /**
       
  9215  * WordPress dependencies
       
  9216  */
       
  9217 
       
  9218 
       
  9219 
       
  9220 
       
  9221 /**
       
  9222  * A block selection object.
       
  9223  *
       
  9224  * @typedef {Object} WPBlockSelection
       
  9225  *
       
  9226  * @property {string} clientId     A block client ID.
       
  9227  * @property {string} attributeKey A block attribute key.
       
  9228  * @property {number} offset       An attribute value offset, based on the rich
       
  9229  *                                 text value. See `wp.richText.create`.
       
  9230  */
       
  9231 // Module constants
       
  9232 
       
  9233 const MILLISECONDS_PER_HOUR = 3600 * 1000;
       
  9234 const MILLISECONDS_PER_DAY = 24 * 3600 * 1000;
       
  9235 const MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;
       
  9236 const templateIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
       
  9237   xmlns: "http://www.w3.org/2000/svg",
       
  9238   viewBox: "0 0 24 24"
       
  9239 }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
       
  9240   x: "0",
       
  9241   fill: "none",
       
  9242   width: "24",
       
  9243   height: "24"
       
  9244 }), Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
       
  9245   d: "M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"
       
  9246 })));
       
  9247 /**
       
  9248  * Shared reference to an empty array for cases where it is important to avoid
       
  9249  * returning a new array reference on every invocation, as in a connected or
       
  9250  * other pure component which performs `shouldComponentUpdate` check on props.
       
  9251  * This should be used as a last resort, since the normalized data should be
       
  9252  * maintained by the reducer result in state.
       
  9253  *
       
  9254  * @type {Array}
       
  9255  */
       
  9256 
       
  9257 const EMPTY_ARRAY = [];
       
  9258 /**
       
  9259  * Returns a block's name given its client ID, or null if no block exists with
       
  9260  * the client ID.
       
  9261  *
       
  9262  * @param {Object} state    Editor state.
       
  9263  * @param {string} clientId Block client ID.
       
  9264  *
       
  9265  * @return {string} Block name.
       
  9266  */
       
  9267 
       
  9268 function selectors_getBlockName(state, clientId) {
       
  9269   const block = state.blocks.byClientId[clientId];
       
  9270   const socialLinkName = 'core/social-link';
       
  9271 
       
  9272   if (external_wp_element_["Platform"].OS !== 'web' && (block === null || block === void 0 ? void 0 : block.name) === socialLinkName) {
       
  9273     const attributes = state.blocks.attributes[clientId];
       
  9274     const {
       
  9275       service
       
  9276     } = attributes;
       
  9277     return service ? `${socialLinkName}-${service}` : socialLinkName;
       
  9278   }
       
  9279 
       
  9280   return block ? block.name : null;
       
  9281 }
       
  9282 /**
       
  9283  * Returns whether a block is valid or not.
       
  9284  *
       
  9285  * @param {Object} state    Editor state.
       
  9286  * @param {string} clientId Block client ID.
       
  9287  *
       
  9288  * @return {boolean} Is Valid.
       
  9289  */
       
  9290 
       
  9291 function selectors_isBlockValid(state, clientId) {
       
  9292   const block = state.blocks.byClientId[clientId];
       
  9293   return !!block && block.isValid;
       
  9294 }
       
  9295 /**
       
  9296  * Returns a block's attributes given its client ID, or null if no block exists with
       
  9297  * the client ID.
       
  9298  *
       
  9299  * @param {Object} state    Editor state.
       
  9300  * @param {string} clientId Block client ID.
       
  9301  *
       
  9302  * @return {Object?} Block attributes.
       
  9303  */
       
  9304 
       
  9305 function selectors_getBlockAttributes(state, clientId) {
       
  9306   const block = state.blocks.byClientId[clientId];
       
  9307 
       
  9308   if (!block) {
       
  9309     return null;
       
  9310   }
       
  9311 
       
  9312   return state.blocks.attributes[clientId];
       
  9313 }
       
  9314 /**
       
  9315  * Returns a block given its client ID. This is a parsed copy of the block,
       
  9316  * containing its `blockName`, `clientId`, and current `attributes` state. This
       
  9317  * is not the block's registration settings, which must be retrieved from the
       
  9318  * blocks module registration store.
       
  9319  *
       
  9320  * getBlock recurses through its inner blocks until all its children blocks have
       
  9321  * been retrieved. Note that getBlock will not return the child inner blocks of
       
  9322  * an inner block controller. This is because an inner block controller syncs
       
  9323  * itself with its own entity, and should therefore not be included with the
       
  9324  * blocks of a different entity. For example, say you call `getBlocks( TP )` to
       
  9325  * get the blocks of a template part. If another template part is a child of TP,
       
  9326  * then the nested template part's child blocks will not be returned. This way,
       
  9327  * the template block itself is considered part of the parent, but the children
       
  9328  * are not.
       
  9329  *
       
  9330  * @param {Object} state    Editor state.
       
  9331  * @param {string} clientId Block client ID.
       
  9332  *
       
  9333  * @return {Object} Parsed block object.
       
  9334  */
       
  9335 
       
  9336 const selectors_getBlock = Object(rememo["a" /* default */])((state, clientId) => {
       
  9337   const block = state.blocks.byClientId[clientId];
       
  9338 
       
  9339   if (!block) {
       
  9340     return null;
       
  9341   }
       
  9342 
       
  9343   return { ...block,
       
  9344     attributes: selectors_getBlockAttributes(state, clientId),
       
  9345     innerBlocks: areInnerBlocksControlled(state, clientId) ? EMPTY_ARRAY : selectors_getBlocks(state, clientId)
       
  9346   };
       
  9347 }, (state, clientId) => [// Normally, we'd have both `getBlockAttributes` dependencies and
       
  9348 // `getBlocks` (children) dependencies here but for performance reasons
       
  9349 // we use a denormalized cache key computed in the reducer that takes both
       
  9350 // the attributes and inner blocks into account. The value of the cache key
       
  9351 // is being changed whenever one of these dependencies is out of date.
       
  9352 state.blocks.cache[clientId]]);
       
  9353 const selectors_unstableGetBlockWithoutInnerBlocks = Object(rememo["a" /* default */])((state, clientId) => {
       
  9354   const block = state.blocks.byClientId[clientId];
       
  9355 
       
  9356   if (!block) {
       
  9357     return null;
       
  9358   }
       
  9359 
       
  9360   return { ...block,
       
  9361     attributes: selectors_getBlockAttributes(state, clientId)
       
  9362   };
       
  9363 }, (state, clientId) => [state.blocks.byClientId[clientId], state.blocks.attributes[clientId]]);
       
  9364 /**
       
  9365  * Returns all block objects for the current post being edited as an array in
       
  9366  * the order they appear in the post. Note that this will exclude child blocks
       
  9367  * of nested inner block controllers.
       
  9368  *
       
  9369  * Note: It's important to memoize this selector to avoid return a new instance
       
  9370  * on each call. We use the block cache state for each top-level block of the
       
  9371  * given clientID. This way, the selector only refreshes on changes to blocks
       
  9372  * associated with the given entity, and does not refresh when changes are made
       
  9373  * to blocks which are part of different inner block controllers.
       
  9374  *
       
  9375  * @param {Object}  state        Editor state.
       
  9376  * @param {?string} rootClientId Optional root client ID of block list.
       
  9377  *
       
  9378  * @return {Object[]} Post blocks.
       
  9379  */
       
  9380 
       
  9381 const selectors_getBlocks = Object(rememo["a" /* default */])((state, rootClientId) => {
       
  9382   return Object(external_lodash_["map"])(selectors_getBlockOrder(state, rootClientId), clientId => selectors_getBlock(state, clientId));
       
  9383 }, (state, rootClientId) => Object(external_lodash_["map"])(state.blocks.order[rootClientId || ''], id => state.blocks.cache[id]));
       
  9384 /**
       
  9385  * Similar to getBlock, except it will include the entire nested block tree as
       
  9386  * inner blocks. The normal getBlock selector will exclude sections of the block
       
  9387  * tree which belong to different entities.
       
  9388  *
       
  9389  * @param {Object} state    Editor state.
       
  9390  * @param {string} clientId Client ID of the block to get.
       
  9391  *
       
  9392  * @return {Object} The block with all
       
  9393  */
       
  9394 
       
  9395 const __unstableGetBlockWithBlockTree = Object(rememo["a" /* default */])((state, clientId) => {
       
  9396   const block = state.blocks.byClientId[clientId];
       
  9397 
       
  9398   if (!block) {
       
  9399     return null;
       
  9400   }
       
  9401 
       
  9402   return { ...block,
       
  9403     attributes: selectors_getBlockAttributes(state, clientId),
       
  9404     innerBlocks: __unstableGetBlockTree(state, clientId)
       
  9405   };
       
  9406 }, state => [state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
       
  9407 /**
       
  9408  * Similar to getBlocks, except this selector returns the entire block tree
       
  9409  * represented in the block-editor store from the given root regardless of any
       
  9410  * inner block controllers.
       
  9411  *
       
  9412  * @param {Object}  state        Editor state.
       
  9413  * @param {?string} rootClientId Optional root client ID of block list.
       
  9414  *
       
  9415  * @return {Object[]} Post blocks.
       
  9416  */
       
  9417 
       
  9418 const __unstableGetBlockTree = Object(rememo["a" /* default */])((state, rootClientId = '') => Object(external_lodash_["map"])(selectors_getBlockOrder(state, rootClientId), clientId => __unstableGetBlockWithBlockTree(state, clientId)), state => [state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
       
  9419 /**
       
  9420  * Returns a stripped down block object containing only its client ID,
       
  9421  * and its inner blocks' client IDs.
       
  9422  *
       
  9423  * @param {Object} state    Editor state.
       
  9424  * @param {string} clientId Client ID of the block to get.
       
  9425  *
       
  9426  * @return {Object} Client IDs of the post blocks.
       
  9427  */
       
  9428 
       
  9429 const selectors_unstableGetClientIdWithClientIdsTree = Object(rememo["a" /* default */])((state, clientId) => ({
       
  9430   clientId,
       
  9431   innerBlocks: selectors_unstableGetClientIdsTree(state, clientId)
       
  9432 }), state => [state.blocks.order]);
       
  9433 /**
       
  9434  * Returns the block tree represented in the block-editor store from the
       
  9435  * given root, consisting of stripped down block objects containing only
       
  9436  * their client IDs, and their inner blocks' client IDs.
       
  9437  *
       
  9438  * @param {Object}  state        Editor state.
       
  9439  * @param {?string} rootClientId Optional root client ID of block list.
       
  9440  *
       
  9441  * @return {Object[]} Client IDs of the post blocks.
       
  9442  */
       
  9443 
       
  9444 const selectors_unstableGetClientIdsTree = Object(rememo["a" /* default */])((state, rootClientId = '') => Object(external_lodash_["map"])(selectors_getBlockOrder(state, rootClientId), clientId => selectors_unstableGetClientIdWithClientIdsTree(state, clientId)), state => [state.blocks.order]);
       
  9445 /**
       
  9446  * Returns an array containing the clientIds of all descendants
       
  9447  * of the blocks given.
       
  9448  *
       
  9449  * @param {Object} state Global application state.
       
  9450  * @param {Array} clientIds Array of blocks to inspect.
       
  9451  *
       
  9452  * @return {Array} ids of descendants.
       
  9453  */
       
  9454 
       
  9455 const selectors_getClientIdsOfDescendants = (state, clientIds) => Object(external_lodash_["flatMap"])(clientIds, clientId => {
       
  9456   const descendants = selectors_getBlockOrder(state, clientId);
       
  9457   return [...descendants, ...selectors_getClientIdsOfDescendants(state, descendants)];
       
  9458 });
       
  9459 /**
       
  9460  * Returns an array containing the clientIds of the top-level blocks
       
  9461  * and their descendants of any depth (for nested blocks).
       
  9462  *
       
  9463  * @param {Object} state Global application state.
       
  9464  *
       
  9465  * @return {Array} ids of top-level and descendant blocks.
       
  9466  */
       
  9467 
       
  9468 const getClientIdsWithDescendants = Object(rememo["a" /* default */])(state => {
       
  9469   const topLevelIds = selectors_getBlockOrder(state);
       
  9470   return [...topLevelIds, ...selectors_getClientIdsOfDescendants(state, topLevelIds)];
       
  9471 }, state => [state.blocks.order]);
       
  9472 /**
       
  9473  * Returns the total number of blocks, or the total number of blocks with a specific name in a post.
       
  9474  * The number returned includes nested blocks.
       
  9475  *
       
  9476  * @param {Object}  state     Global application state.
       
  9477  * @param {?string} blockName Optional block name, if specified only blocks of that type will be counted.
       
  9478  *
       
  9479  * @return {number} Number of blocks in the post, or number of blocks with name equal to blockName.
       
  9480  */
       
  9481 
       
  9482 const selectors_getGlobalBlockCount = Object(rememo["a" /* default */])((state, blockName) => {
       
  9483   const clientIds = getClientIdsWithDescendants(state);
       
  9484 
       
  9485   if (!blockName) {
       
  9486     return clientIds.length;
       
  9487   }
       
  9488 
       
  9489   return Object(external_lodash_["reduce"])(clientIds, (accumulator, clientId) => {
       
  9490     const block = state.blocks.byClientId[clientId];
       
  9491     return block.name === blockName ? accumulator + 1 : accumulator;
       
  9492   }, 0);
       
  9493 }, state => [state.blocks.order, state.blocks.byClientId]);
       
  9494 /**
       
  9495  * Given an array of block client IDs, returns the corresponding array of block
       
  9496  * objects.
       
  9497  *
       
  9498  * @param {Object}   state     Editor state.
       
  9499  * @param {string[]} clientIds Client IDs for which blocks are to be returned.
       
  9500  *
       
  9501  * @return {WPBlock[]} Block objects.
       
  9502  */
       
  9503 
       
  9504 const selectors_getBlocksByClientId = Object(rememo["a" /* default */])((state, clientIds) => Object(external_lodash_["map"])(Object(external_lodash_["castArray"])(clientIds), clientId => selectors_getBlock(state, clientId)), state => [state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
       
  9505 /**
       
  9506  * Returns the number of blocks currently present in the post.
       
  9507  *
       
  9508  * @param {Object}  state        Editor state.
       
  9509  * @param {?string} rootClientId Optional root client ID of block list.
       
  9510  *
       
  9511  * @return {number} Number of blocks in the post.
       
  9512  */
       
  9513 
       
  9514 function selectors_getBlockCount(state, rootClientId) {
       
  9515   return selectors_getBlockOrder(state, rootClientId).length;
       
  9516 }
       
  9517 /**
       
  9518  * Returns the current selection start block client ID, attribute key and text
       
  9519  * offset.
       
  9520  *
       
  9521  * @param {Object} state Block editor state.
       
  9522  *
       
  9523  * @return {WPBlockSelection} Selection start information.
       
  9524  */
       
  9525 
       
  9526 function selectors_getSelectionStart(state) {
       
  9527   return state.selection.selectionStart;
       
  9528 }
       
  9529 /**
       
  9530  * Returns the current selection end block client ID, attribute key and text
       
  9531  * offset.
       
  9532  *
       
  9533  * @param {Object} state Block editor state.
       
  9534  *
       
  9535  * @return {WPBlockSelection} Selection end information.
       
  9536  */
       
  9537 
       
  9538 function selectors_getSelectionEnd(state) {
       
  9539   return state.selection.selectionEnd;
       
  9540 }
       
  9541 /**
       
  9542  * Returns the current block selection start. This value may be null, and it
       
  9543  * may represent either a singular block selection or multi-selection start.
       
  9544  * A selection is singular if its start and end match.
       
  9545  *
       
  9546  * @param {Object} state Global application state.
       
  9547  *
       
  9548  * @return {?string} Client ID of block selection start.
       
  9549  */
       
  9550 
       
  9551 function selectors_getBlockSelectionStart(state) {
       
  9552   return state.selection.selectionStart.clientId;
       
  9553 }
       
  9554 /**
       
  9555  * Returns the current block selection end. This value may be null, and it
       
  9556  * may represent either a singular block selection or multi-selection end.
       
  9557  * A selection is singular if its start and end match.
       
  9558  *
       
  9559  * @param {Object} state Global application state.
       
  9560  *
       
  9561  * @return {?string} Client ID of block selection end.
       
  9562  */
       
  9563 
       
  9564 function selectors_getBlockSelectionEnd(state) {
       
  9565   return state.selection.selectionEnd.clientId;
       
  9566 }
       
  9567 /**
       
  9568  * Returns the number of blocks currently selected in the post.
       
  9569  *
       
  9570  * @param {Object} state Global application state.
       
  9571  *
       
  9572  * @return {number} Number of blocks selected in the post.
       
  9573  */
       
  9574 
       
  9575 function selectors_getSelectedBlockCount(state) {
       
  9576   const multiSelectedBlockCount = selectors_getMultiSelectedBlockClientIds(state).length;
       
  9577 
       
  9578   if (multiSelectedBlockCount) {
       
  9579     return multiSelectedBlockCount;
       
  9580   }
       
  9581 
       
  9582   return state.selection.selectionStart.clientId ? 1 : 0;
       
  9583 }
       
  9584 /**
       
  9585  * Returns true if there is a single selected block, or false otherwise.
       
  9586  *
       
  9587  * @param {Object} state Editor state.
       
  9588  *
       
  9589  * @return {boolean} Whether a single block is selected.
       
  9590  */
       
  9591 
       
  9592 function selectors_hasSelectedBlock(state) {
       
  9593   const {
       
  9594     selectionStart,
       
  9595     selectionEnd
       
  9596   } = state.selection;
       
  9597   return !!selectionStart.clientId && selectionStart.clientId === selectionEnd.clientId;
       
  9598 }
       
  9599 /**
       
  9600  * Returns the currently selected block client ID, or null if there is no
       
  9601  * selected block.
       
  9602  *
       
  9603  * @param {Object} state Editor state.
       
  9604  *
       
  9605  * @return {?string} Selected block client ID.
       
  9606  */
       
  9607 
       
  9608 function selectors_getSelectedBlockClientId(state) {
       
  9609   const {
       
  9610     selectionStart,
       
  9611     selectionEnd
       
  9612   } = state.selection;
       
  9613   const {
       
  9614     clientId
       
  9615   } = selectionStart;
       
  9616 
       
  9617   if (!clientId || clientId !== selectionEnd.clientId) {
       
  9618     return null;
       
  9619   }
       
  9620 
       
  9621   return clientId;
       
  9622 }
       
  9623 /**
       
  9624  * Returns the currently selected block, or null if there is no selected block.
       
  9625  *
       
  9626  * @param {Object} state Global application state.
       
  9627  *
       
  9628  * @return {?Object} Selected block.
       
  9629  */
       
  9630 
       
  9631 function selectors_getSelectedBlock(state) {
       
  9632   const clientId = selectors_getSelectedBlockClientId(state);
       
  9633   return clientId ? selectors_getBlock(state, clientId) : null;
       
  9634 }
       
  9635 /**
       
  9636  * Given a block client ID, returns the root block from which the block is
       
  9637  * nested, an empty string for top-level blocks, or null if the block does not
       
  9638  * exist.
       
  9639  *
       
  9640  * @param {Object} state    Editor state.
       
  9641  * @param {string} clientId Block from which to find root client ID.
       
  9642  *
       
  9643  * @return {?string} Root client ID, if exists
       
  9644  */
       
  9645 
       
  9646 function selectors_getBlockRootClientId(state, clientId) {
       
  9647   return state.blocks.parents[clientId] !== undefined ? state.blocks.parents[clientId] : null;
       
  9648 }
       
  9649 /**
       
  9650  * Given a block client ID, returns the list of all its parents from top to bottom.
       
  9651  *
       
  9652  * @param {Object} state    Editor state.
       
  9653  * @param {string} clientId Block from which to find root client ID.
       
  9654  * @param {boolean} ascending Order results from bottom to top (true) or top to bottom (false).
       
  9655  *
       
  9656  * @return {Array} ClientIDs of the parent blocks.
       
  9657  */
       
  9658 
       
  9659 const selectors_getBlockParents = Object(rememo["a" /* default */])((state, clientId, ascending = false) => {
       
  9660   const parents = [];
       
  9661   let current = clientId;
       
  9662 
       
  9663   while (!!state.blocks.parents[current]) {
       
  9664     current = state.blocks.parents[current];
       
  9665     parents.push(current);
       
  9666   }
       
  9667 
       
  9668   return ascending ? parents : parents.reverse();
       
  9669 }, state => [state.blocks.parents]);
       
  9670 /**
       
  9671  * Given a block client ID and a block name, returns the list of all its parents
       
  9672  * from top to bottom, filtered by the given name(s). For example, if passed
       
  9673  * 'core/group' as the blockName, it will only return parents which are group
       
  9674  * blocks. If passed `[ 'core/group', 'core/cover']`, as the blockName, it will
       
  9675  * return parents which are group blocks and parents which are cover blocks.
       
  9676  *
       
  9677  * @param {Object}          state     Editor state.
       
  9678  * @param {string}          clientId  Block from which to find root client ID.
       
  9679  * @param {string|string[]} blockName Block name(s) to filter.
       
  9680  * @param {boolean}         ascending Order results from bottom to top (true) or top to bottom (false).
       
  9681  *
       
  9682  * @return {Array} ClientIDs of the parent blocks.
       
  9683  */
       
  9684 
       
  9685 const getBlockParentsByBlockName = Object(rememo["a" /* default */])((state, clientId, blockName, ascending = false) => {
       
  9686   const parents = selectors_getBlockParents(state, clientId, ascending);
       
  9687   return Object(external_lodash_["map"])(Object(external_lodash_["filter"])(Object(external_lodash_["map"])(parents, id => ({
       
  9688     id,
       
  9689     name: selectors_getBlockName(state, id)
       
  9690   })), ({
       
  9691     name
       
  9692   }) => {
       
  9693     if (Array.isArray(blockName)) {
       
  9694       return blockName.includes(name);
       
  9695     }
       
  9696 
       
  9697     return name === blockName;
       
  9698   }), ({
       
  9699     id
       
  9700   }) => id);
       
  9701 }, state => [state.blocks.parents]);
       
  9702 /**
       
  9703  * Given a block client ID, returns the root of the hierarchy from which the block is nested, return the block itself for root level blocks.
       
  9704  *
       
  9705  * @param {Object} state    Editor state.
       
  9706  * @param {string} clientId Block from which to find root client ID.
       
  9707  *
       
  9708  * @return {string} Root client ID
       
  9709  */
       
  9710 
       
  9711 function selectors_getBlockHierarchyRootClientId(state, clientId) {
       
  9712   let current = clientId;
       
  9713   let parent;
       
  9714 
       
  9715   do {
       
  9716     parent = current;
       
  9717     current = state.blocks.parents[current];
       
  9718   } while (current);
       
  9719 
       
  9720   return parent;
       
  9721 }
       
  9722 /**
       
  9723  * Given a block client ID, returns the lowest common ancestor with selected client ID.
       
  9724  *
       
  9725  * @param {Object} state    Editor state.
       
  9726  * @param {string} clientId Block from which to find common ancestor client ID.
       
  9727  *
       
  9728  * @return {string} Common ancestor client ID or undefined
       
  9729  */
       
  9730 
       
  9731 function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
       
  9732   const selectedId = selectors_getSelectedBlockClientId(state);
       
  9733   const clientParents = [...selectors_getBlockParents(state, clientId), clientId];
       
  9734   const selectedParents = [...selectors_getBlockParents(state, selectedId), selectedId];
       
  9735   let lowestCommonAncestor;
       
  9736   const maxDepth = Math.min(clientParents.length, selectedParents.length);
       
  9737 
       
  9738   for (let index = 0; index < maxDepth; index++) {
       
  9739     if (clientParents[index] === selectedParents[index]) {
       
  9740       lowestCommonAncestor = clientParents[index];
       
  9741     } else {
       
  9742       break;
       
  9743     }
       
  9744   }
       
  9745 
       
  9746   return lowestCommonAncestor;
       
  9747 }
       
  9748 /**
       
  9749  * Returns the client ID of the block adjacent one at the given reference
       
  9750  * startClientId and modifier directionality. Defaults start startClientId to
       
  9751  * the selected block, and direction as next block. Returns null if there is no
       
  9752  * adjacent block.
       
  9753  *
       
  9754  * @param {Object}  state         Editor state.
       
  9755  * @param {?string} startClientId Optional client ID of block from which to
       
  9756  *                                search.
       
  9757  * @param {?number} modifier      Directionality multiplier (1 next, -1
       
  9758  *                                previous).
       
  9759  *
       
  9760  * @return {?string} Return the client ID of the block, or null if none exists.
       
  9761  */
       
  9762 
       
  9763 function getAdjacentBlockClientId(state, startClientId, modifier = 1) {
       
  9764   // Default to selected block.
       
  9765   if (startClientId === undefined) {
       
  9766     startClientId = selectors_getSelectedBlockClientId(state);
       
  9767   } // Try multi-selection starting at extent based on modifier.
       
  9768 
       
  9769 
       
  9770   if (startClientId === undefined) {
       
  9771     if (modifier < 0) {
       
  9772       startClientId = selectors_getFirstMultiSelectedBlockClientId(state);
       
  9773     } else {
       
  9774       startClientId = selectors_getLastMultiSelectedBlockClientId(state);
       
  9775     }
       
  9776   } // Validate working start client ID.
       
  9777 
       
  9778 
       
  9779   if (!startClientId) {
       
  9780     return null;
       
  9781   } // Retrieve start block root client ID, being careful to allow the falsey
       
  9782   // empty string top-level root by explicitly testing against null.
       
  9783 
       
  9784 
       
  9785   const rootClientId = selectors_getBlockRootClientId(state, startClientId);
       
  9786 
       
  9787   if (rootClientId === null) {
       
  9788     return null;
       
  9789   }
       
  9790 
       
  9791   const {
       
  9792     order
       
  9793   } = state.blocks;
       
  9794   const orderSet = order[rootClientId];
       
  9795   const index = orderSet.indexOf(startClientId);
       
  9796   const nextIndex = index + 1 * modifier; // Block was first in set and we're attempting to get previous.
       
  9797 
       
  9798   if (nextIndex < 0) {
       
  9799     return null;
       
  9800   } // Block was last in set and we're attempting to get next.
       
  9801 
       
  9802 
       
  9803   if (nextIndex === orderSet.length) {
       
  9804     return null;
       
  9805   } // Assume incremented index is within the set.
       
  9806 
       
  9807 
       
  9808   return orderSet[nextIndex];
       
  9809 }
       
  9810 /**
       
  9811  * Returns the previous block's client ID from the given reference start ID.
       
  9812  * Defaults start to the selected block. Returns null if there is no previous
       
  9813  * block.
       
  9814  *
       
  9815  * @param {Object}  state         Editor state.
       
  9816  * @param {?string} startClientId Optional client ID of block from which to
       
  9817  *                                search.
       
  9818  *
       
  9819  * @return {?string} Adjacent block's client ID, or null if none exists.
       
  9820  */
       
  9821 
       
  9822 function selectors_getPreviousBlockClientId(state, startClientId) {
       
  9823   return getAdjacentBlockClientId(state, startClientId, -1);
       
  9824 }
       
  9825 /**
       
  9826  * Returns the next block's client ID from the given reference start ID.
       
  9827  * Defaults start to the selected block. Returns null if there is no next
       
  9828  * block.
       
  9829  *
       
  9830  * @param {Object}  state         Editor state.
       
  9831  * @param {?string} startClientId Optional client ID of block from which to
       
  9832  *                                search.
       
  9833  *
       
  9834  * @return {?string} Adjacent block's client ID, or null if none exists.
       
  9835  */
       
  9836 
       
  9837 function selectors_getNextBlockClientId(state, startClientId) {
       
  9838   return getAdjacentBlockClientId(state, startClientId, 1);
       
  9839 }
       
  9840 /**
       
  9841  * Returns the initial caret position for the selected block.
       
  9842  * This position is to used to position the caret properly when the selected block changes.
       
  9843  * If the current block is not a RichText, having initial position set to 0 means "focus block"
       
  9844  *
       
  9845  * @param {Object} state Global application state.
       
  9846  *
       
  9847  * @return {0|-1|null} Initial position.
       
  9848  */
       
  9849 
       
  9850 function selectors_getSelectedBlocksInitialCaretPosition(state) {
       
  9851   return state.initialPosition;
       
  9852 }
       
  9853 /**
       
  9854  * Returns the current selection set of block client IDs (multiselection or single selection).
       
  9855  *
       
  9856  * @param {Object} state Editor state.
       
  9857  *
       
  9858  * @return {Array} Multi-selected block client IDs.
       
  9859  */
       
  9860 
       
  9861 const selectors_getSelectedBlockClientIds = Object(rememo["a" /* default */])(state => {
       
  9862   const {
       
  9863     selectionStart,
       
  9864     selectionEnd
       
  9865   } = state.selection;
       
  9866 
       
  9867   if (selectionStart.clientId === undefined || selectionEnd.clientId === undefined) {
       
  9868     return EMPTY_ARRAY;
       
  9869   }
       
  9870 
       
  9871   if (selectionStart.clientId === selectionEnd.clientId) {
       
  9872     return [selectionStart.clientId];
       
  9873   } // Retrieve root client ID to aid in retrieving relevant nested block
       
  9874   // order, being careful to allow the falsey empty string top-level root
       
  9875   // by explicitly testing against null.
       
  9876 
       
  9877 
       
  9878   const rootClientId = selectors_getBlockRootClientId(state, selectionStart.clientId);
       
  9879 
       
  9880   if (rootClientId === null) {
       
  9881     return EMPTY_ARRAY;
       
  9882   }
       
  9883 
       
  9884   const blockOrder = selectors_getBlockOrder(state, rootClientId);
       
  9885   const startIndex = blockOrder.indexOf(selectionStart.clientId);
       
  9886   const endIndex = blockOrder.indexOf(selectionEnd.clientId);
       
  9887 
       
  9888   if (startIndex > endIndex) {
       
  9889     return blockOrder.slice(endIndex, startIndex + 1);
       
  9890   }
       
  9891 
       
  9892   return blockOrder.slice(startIndex, endIndex + 1);
       
  9893 }, state => [state.blocks.order, state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId]);
       
  9894 /**
       
  9895  * Returns the current multi-selection set of block client IDs, or an empty
       
  9896  * array if there is no multi-selection.
       
  9897  *
       
  9898  * @param {Object} state Editor state.
       
  9899  *
       
  9900  * @return {Array} Multi-selected block client IDs.
       
  9901  */
       
  9902 
       
  9903 function selectors_getMultiSelectedBlockClientIds(state) {
       
  9904   const {
       
  9905     selectionStart,
       
  9906     selectionEnd
       
  9907   } = state.selection;
       
  9908 
       
  9909   if (selectionStart.clientId === selectionEnd.clientId) {
       
  9910     return EMPTY_ARRAY;
       
  9911   }
       
  9912 
       
  9913   return selectors_getSelectedBlockClientIds(state);
       
  9914 }
       
  9915 /**
       
  9916  * Returns the current multi-selection set of blocks, or an empty array if
       
  9917  * there is no multi-selection.
       
  9918  *
       
  9919  * @param {Object} state Editor state.
       
  9920  *
       
  9921  * @return {Array} Multi-selected block objects.
       
  9922  */
       
  9923 
       
  9924 const selectors_getMultiSelectedBlocks = Object(rememo["a" /* default */])(state => {
       
  9925   const multiSelectedBlockClientIds = selectors_getMultiSelectedBlockClientIds(state);
       
  9926 
       
  9927   if (!multiSelectedBlockClientIds.length) {
       
  9928     return EMPTY_ARRAY;
       
  9929   }
       
  9930 
       
  9931   return multiSelectedBlockClientIds.map(clientId => selectors_getBlock(state, clientId));
       
  9932 }, state => [...selectors_getSelectedBlockClientIds.getDependants(state), state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
       
  9933 /**
       
  9934  * Returns the client ID of the first block in the multi-selection set, or null
       
  9935  * if there is no multi-selection.
       
  9936  *
       
  9937  * @param {Object} state Editor state.
       
  9938  *
       
  9939  * @return {?string} First block client ID in the multi-selection set.
       
  9940  */
       
  9941 
       
  9942 function selectors_getFirstMultiSelectedBlockClientId(state) {
       
  9943   return Object(external_lodash_["first"])(selectors_getMultiSelectedBlockClientIds(state)) || null;
       
  9944 }
       
  9945 /**
       
  9946  * Returns the client ID of the last block in the multi-selection set, or null
       
  9947  * if there is no multi-selection.
       
  9948  *
       
  9949  * @param {Object} state Editor state.
       
  9950  *
       
  9951  * @return {?string} Last block client ID in the multi-selection set.
       
  9952  */
       
  9953 
       
  9954 function selectors_getLastMultiSelectedBlockClientId(state) {
       
  9955   return Object(external_lodash_["last"])(selectors_getMultiSelectedBlockClientIds(state)) || null;
       
  9956 }
       
  9957 /**
       
  9958  * Returns true if a multi-selection exists, and the block corresponding to the
       
  9959  * specified client ID is the first block of the multi-selection set, or false
       
  9960  * otherwise.
       
  9961  *
       
  9962  * @param {Object} state    Editor state.
       
  9963  * @param {string} clientId Block client ID.
       
  9964  *
       
  9965  * @return {boolean} Whether block is first in multi-selection.
       
  9966  */
       
  9967 
       
  9968 function selectors_isFirstMultiSelectedBlock(state, clientId) {
       
  9969   return selectors_getFirstMultiSelectedBlockClientId(state) === clientId;
       
  9970 }
       
  9971 /**
       
  9972  * Returns true if the client ID occurs within the block multi-selection, or
       
  9973  * false otherwise.
       
  9974  *
       
  9975  * @param {Object} state    Editor state.
       
  9976  * @param {string} clientId Block client ID.
       
  9977  *
       
  9978  * @return {boolean} Whether block is in multi-selection set.
       
  9979  */
       
  9980 
       
  9981 function selectors_isBlockMultiSelected(state, clientId) {
       
  9982   return selectors_getMultiSelectedBlockClientIds(state).indexOf(clientId) !== -1;
       
  9983 }
       
  9984 /**
       
  9985  * Returns true if an ancestor of the block is multi-selected, or false
       
  9986  * otherwise.
       
  9987  *
       
  9988  * @param {Object} state    Editor state.
       
  9989  * @param {string} clientId Block client ID.
       
  9990  *
       
  9991  * @return {boolean} Whether an ancestor of the block is in multi-selection
       
  9992  *                   set.
       
  9993  */
       
  9994 
       
  9995 const selectors_isAncestorMultiSelected = Object(rememo["a" /* default */])((state, clientId) => {
       
  9996   let ancestorClientId = clientId;
       
  9997   let isMultiSelected = false;
       
  9998 
       
  9999   while (ancestorClientId && !isMultiSelected) {
       
 10000     ancestorClientId = selectors_getBlockRootClientId(state, ancestorClientId);
       
 10001     isMultiSelected = selectors_isBlockMultiSelected(state, ancestorClientId);
       
 10002   }
       
 10003 
       
 10004   return isMultiSelected;
       
 10005 }, state => [state.blocks.order, state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId]);
       
 10006 /**
       
 10007  * Returns the client ID of the block which begins the multi-selection set, or
       
 10008  * null if there is no multi-selection.
       
 10009  *
       
 10010  * This is not necessarily the first client ID in the selection.
       
 10011  *
       
 10012  * @see getFirstMultiSelectedBlockClientId
       
 10013  *
       
 10014  * @param {Object} state Editor state.
       
 10015  *
       
 10016  * @return {?string} Client ID of block beginning multi-selection.
       
 10017  */
       
 10018 
       
 10019 function selectors_getMultiSelectedBlocksStartClientId(state) {
       
 10020   const {
       
 10021     selectionStart,
       
 10022     selectionEnd
       
 10023   } = state.selection;
       
 10024 
       
 10025   if (selectionStart.clientId === selectionEnd.clientId) {
       
 10026     return null;
       
 10027   }
       
 10028 
       
 10029   return selectionStart.clientId || null;
       
 10030 }
       
 10031 /**
       
 10032  * Returns the client ID of the block which ends the multi-selection set, or
       
 10033  * null if there is no multi-selection.
       
 10034  *
       
 10035  * This is not necessarily the last client ID in the selection.
       
 10036  *
       
 10037  * @see getLastMultiSelectedBlockClientId
       
 10038  *
       
 10039  * @param {Object} state Editor state.
       
 10040  *
       
 10041  * @return {?string} Client ID of block ending multi-selection.
       
 10042  */
       
 10043 
       
 10044 function selectors_getMultiSelectedBlocksEndClientId(state) {
       
 10045   const {
       
 10046     selectionStart,
       
 10047     selectionEnd
       
 10048   } = state.selection;
       
 10049 
       
 10050   if (selectionStart.clientId === selectionEnd.clientId) {
       
 10051     return null;
       
 10052   }
       
 10053 
       
 10054   return selectionEnd.clientId || null;
       
 10055 }
       
 10056 /**
       
 10057  * Returns an array containing all block client IDs in the editor in the order
       
 10058  * they appear. Optionally accepts a root client ID of the block list for which
       
 10059  * the order should be returned, defaulting to the top-level block order.
       
 10060  *
       
 10061  * @param {Object}  state        Editor state.
       
 10062  * @param {?string} rootClientId Optional root client ID of block list.
       
 10063  *
       
 10064  * @return {Array} Ordered client IDs of editor blocks.
       
 10065  */
       
 10066 
       
 10067 function selectors_getBlockOrder(state, rootClientId) {
       
 10068   return state.blocks.order[rootClientId || ''] || EMPTY_ARRAY;
       
 10069 }
       
 10070 /**
       
 10071  * Returns the index at which the block corresponding to the specified client
       
 10072  * ID occurs within the block order, or `-1` if the block does not exist.
       
 10073  *
       
 10074  * @param {Object}  state        Editor state.
       
 10075  * @param {string}  clientId     Block client ID.
       
 10076  * @param {?string} rootClientId Optional root client ID of block list.
       
 10077  *
       
 10078  * @return {number} Index at which block exists in order.
       
 10079  */
       
 10080 
       
 10081 function selectors_getBlockIndex(state, clientId, rootClientId) {
       
 10082   return selectors_getBlockOrder(state, rootClientId).indexOf(clientId);
       
 10083 }
       
 10084 /**
       
 10085  * Returns true if the block corresponding to the specified client ID is
       
 10086  * currently selected and no multi-selection exists, or false otherwise.
       
 10087  *
       
 10088  * @param {Object} state    Editor state.
       
 10089  * @param {string} clientId Block client ID.
       
 10090  *
       
 10091  * @return {boolean} Whether block is selected and multi-selection exists.
       
 10092  */
       
 10093 
       
 10094 function selectors_isBlockSelected(state, clientId) {
       
 10095   const {
       
 10096     selectionStart,
       
 10097     selectionEnd
       
 10098   } = state.selection;
       
 10099 
       
 10100   if (selectionStart.clientId !== selectionEnd.clientId) {
       
 10101     return false;
       
 10102   }
       
 10103 
       
 10104   return selectionStart.clientId === clientId;
       
 10105 }
       
 10106 /**
       
 10107  * Returns true if one of the block's inner blocks is selected.
       
 10108  *
       
 10109  * @param {Object}  state    Editor state.
       
 10110  * @param {string}  clientId Block client ID.
       
 10111  * @param {boolean} deep     Perform a deep check.
       
 10112  *
       
 10113  * @return {boolean} Whether the block as an inner block selected
       
 10114  */
       
 10115 
       
 10116 function selectors_hasSelectedInnerBlock(state, clientId, deep = false) {
       
 10117   return Object(external_lodash_["some"])(selectors_getBlockOrder(state, clientId), innerClientId => selectors_isBlockSelected(state, innerClientId) || selectors_isBlockMultiSelected(state, innerClientId) || deep && selectors_hasSelectedInnerBlock(state, innerClientId, deep));
       
 10118 }
       
 10119 /**
       
 10120  * Returns true if the block corresponding to the specified client ID is
       
 10121  * currently selected but isn't the last of the selected blocks. Here "last"
       
 10122  * refers to the block sequence in the document, _not_ the sequence of
       
 10123  * multi-selection, which is why `state.selectionEnd` isn't used.
       
 10124  *
       
 10125  * @param {Object} state    Editor state.
       
 10126  * @param {string} clientId Block client ID.
       
 10127  *
       
 10128  * @return {boolean} Whether block is selected and not the last in the
       
 10129  *                   selection.
       
 10130  */
       
 10131 
       
 10132 function isBlockWithinSelection(state, clientId) {
       
 10133   if (!clientId) {
       
 10134     return false;
       
 10135   }
       
 10136 
       
 10137   const clientIds = selectors_getMultiSelectedBlockClientIds(state);
       
 10138   const index = clientIds.indexOf(clientId);
       
 10139   return index > -1 && index < clientIds.length - 1;
       
 10140 }
       
 10141 /**
       
 10142  * Returns true if a multi-selection has been made, or false otherwise.
       
 10143  *
       
 10144  * @param {Object} state Editor state.
       
 10145  *
       
 10146  * @return {boolean} Whether multi-selection has been made.
       
 10147  */
       
 10148 
       
 10149 function selectors_hasMultiSelection(state) {
       
 10150   const {
       
 10151     selectionStart,
       
 10152     selectionEnd
       
 10153   } = state.selection;
       
 10154   return selectionStart.clientId !== selectionEnd.clientId;
       
 10155 }
       
 10156 /**
       
 10157  * Whether in the process of multi-selecting or not. This flag is only true
       
 10158  * while the multi-selection is being selected (by mouse move), and is false
       
 10159  * once the multi-selection has been settled.
       
 10160  *
       
 10161  * @see hasMultiSelection
       
 10162  *
       
 10163  * @param {Object} state Global application state.
       
 10164  *
       
 10165  * @return {boolean} True if multi-selecting, false if not.
       
 10166  */
       
 10167 
       
 10168 function selectors_isMultiSelecting(state) {
       
 10169   return state.isMultiSelecting;
       
 10170 }
       
 10171 /**
       
 10172  * Selector that returns if multi-selection is enabled or not.
       
 10173  *
       
 10174  * @param {Object} state Global application state.
       
 10175  *
       
 10176  * @return {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled.
       
 10177  */
       
 10178 
       
 10179 function selectors_isSelectionEnabled(state) {
       
 10180   return state.isSelectionEnabled;
       
 10181 }
       
 10182 /**
       
 10183  * Returns the block's editing mode, defaulting to "visual" if not explicitly
       
 10184  * assigned.
       
 10185  *
       
 10186  * @param {Object} state    Editor state.
       
 10187  * @param {string} clientId Block client ID.
       
 10188  *
       
 10189  * @return {Object} Block editing mode.
       
 10190  */
       
 10191 
       
 10192 function selectors_getBlockMode(state, clientId) {
       
 10193   return state.blocksMode[clientId] || 'visual';
       
 10194 }
       
 10195 /**
       
 10196  * Returns true if the user is typing, or false otherwise.
       
 10197  *
       
 10198  * @param {Object} state Global application state.
       
 10199  *
       
 10200  * @return {boolean} Whether user is typing.
       
 10201  */
       
 10202 
       
 10203 function selectors_isTyping(state) {
       
 10204   return state.isTyping;
       
 10205 }
       
 10206 /**
       
 10207  * Returns true if the user is dragging blocks, or false otherwise.
       
 10208  *
       
 10209  * @param {Object} state Global application state.
       
 10210  *
       
 10211  * @return {boolean} Whether user is dragging blocks.
       
 10212  */
       
 10213 
       
 10214 function isDraggingBlocks(state) {
       
 10215   return !!state.draggedBlocks.length;
       
 10216 }
       
 10217 /**
       
 10218  * Returns the client ids of any blocks being directly dragged.
       
 10219  *
       
 10220  * This does not include children of a parent being dragged.
       
 10221  *
       
 10222  * @param {Object} state Global application state.
       
 10223  *
       
 10224  * @return {string[]} Array of dragged block client ids.
       
 10225  */
       
 10226 
       
 10227 function selectors_getDraggedBlockClientIds(state) {
       
 10228   return state.draggedBlocks;
       
 10229 }
       
 10230 /**
       
 10231  * Returns whether the block is being dragged.
       
 10232  *
       
 10233  * Only returns true if the block is being directly dragged,
       
 10234  * not if the block is a child of a parent being dragged.
       
 10235  * See `isAncestorBeingDragged` for child blocks.
       
 10236  *
       
 10237  * @param {Object} state    Global application state.
       
 10238  * @param {string} clientId Client id for block to check.
       
 10239  *
       
 10240  * @return {boolean} Whether the block is being dragged.
       
 10241  */
       
 10242 
       
 10243 function selectors_isBlockBeingDragged(state, clientId) {
       
 10244   return state.draggedBlocks.includes(clientId);
       
 10245 }
       
 10246 /**
       
 10247  * Returns whether a parent/ancestor of the block is being dragged.
       
 10248  *
       
 10249  * @param {Object} state    Global application state.
       
 10250  * @param {string} clientId Client id for block to check.
       
 10251  *
       
 10252  * @return {boolean} Whether the block's ancestor is being dragged.
       
 10253  */
       
 10254 
       
 10255 function selectors_isAncestorBeingDragged(state, clientId) {
       
 10256   // Return early if no blocks are being dragged rather than
       
 10257   // the more expensive check for parents.
       
 10258   if (!isDraggingBlocks(state)) {
       
 10259     return false;
       
 10260   }
       
 10261 
       
 10262   const parents = selectors_getBlockParents(state, clientId);
       
 10263   return Object(external_lodash_["some"])(parents, parentClientId => selectors_isBlockBeingDragged(state, parentClientId));
       
 10264 }
       
 10265 /**
       
 10266  * Returns true if the caret is within formatted text, or false otherwise.
       
 10267  *
       
 10268  * @param {Object} state Global application state.
       
 10269  *
       
 10270  * @return {boolean} Whether the caret is within formatted text.
       
 10271  */
       
 10272 
       
 10273 function selectors_isCaretWithinFormattedText(state) {
       
 10274   return state.isCaretWithinFormattedText;
       
 10275 }
       
 10276 /**
       
 10277  * Returns the insertion point, the index at which the new inserted block would
       
 10278  * be placed. Defaults to the last index.
       
 10279  *
       
 10280  * @param {Object} state Editor state.
       
 10281  *
       
 10282  * @return {Object} Insertion point object with `rootClientId`, `index`.
       
 10283  */
       
 10284 
       
 10285 function selectors_getBlockInsertionPoint(state) {
       
 10286   let rootClientId, index;
       
 10287   const {
       
 10288     insertionPoint,
       
 10289     selection: {
       
 10290       selectionEnd
       
 10291     }
       
 10292   } = state;
       
 10293 
       
 10294   if (insertionPoint !== null) {
       
 10295     return insertionPoint;
       
 10296   }
       
 10297 
       
 10298   const {
       
 10299     clientId
       
 10300   } = selectionEnd;
       
 10301 
       
 10302   if (clientId) {
       
 10303     rootClientId = selectors_getBlockRootClientId(state, clientId) || undefined;
       
 10304     index = selectors_getBlockIndex(state, selectionEnd.clientId, rootClientId) + 1;
       
 10305   } else {
       
 10306     index = selectors_getBlockOrder(state).length;
       
 10307   }
       
 10308 
       
 10309   return {
       
 10310     rootClientId,
       
 10311     index
       
 10312   };
       
 10313 }
       
 10314 /**
       
 10315  * Returns true if we should show the block insertion point.
       
 10316  *
       
 10317  * @param {Object} state Global application state.
       
 10318  *
       
 10319  * @return {?boolean} Whether the insertion point is visible or not.
       
 10320  */
       
 10321 
       
 10322 function selectors_isBlockInsertionPointVisible(state) {
       
 10323   return state.insertionPoint !== null;
       
 10324 }
       
 10325 /**
       
 10326  * Returns whether the blocks matches the template or not.
       
 10327  *
       
 10328  * @param {boolean} state
       
 10329  * @return {?boolean} Whether the template is valid or not.
       
 10330  */
       
 10331 
       
 10332 function selectors_isValidTemplate(state) {
       
 10333   return state.template.isValid;
       
 10334 }
       
 10335 /**
       
 10336  * Returns the defined block template
       
 10337  *
       
 10338  * @param {boolean} state
       
 10339  * @return {?Array}        Block Template
       
 10340  */
       
 10341 
       
 10342 function getTemplate(state) {
       
 10343   return state.settings.template;
       
 10344 }
       
 10345 /**
       
 10346  * Returns the defined block template lock. Optionally accepts a root block
       
 10347  * client ID as context, otherwise defaulting to the global context.
       
 10348  *
       
 10349  * @param {Object}  state        Editor state.
       
 10350  * @param {?string} rootClientId Optional block root client ID.
       
 10351  *
       
 10352  * @return {?string} Block Template Lock
       
 10353  */
       
 10354 
       
 10355 function selectors_getTemplateLock(state, rootClientId) {
       
 10356   if (!rootClientId) {
       
 10357     return state.settings.templateLock;
       
 10358   }
       
 10359 
       
 10360   const blockListSettings = selectors_getBlockListSettings(state, rootClientId);
       
 10361 
       
 10362   if (!blockListSettings) {
       
 10363     return null;
       
 10364   }
       
 10365 
       
 10366   return blockListSettings.templateLock;
       
 10367 }
       
 10368 
       
 10369 const checkAllowList = (list, item, defaultResult = null) => {
       
 10370   if (Object(external_lodash_["isBoolean"])(list)) {
       
 10371     return list;
       
 10372   }
       
 10373 
       
 10374   if (Object(external_lodash_["isArray"])(list)) {
       
 10375     // TODO: when there is a canonical way to detect that we are editing a post
       
 10376     // the following check should be changed to something like:
       
 10377     // if ( list.includes( 'core/post-content' ) && getEditorMode() === 'post-content' && item === null )
       
 10378     if (list.includes('core/post-content') && item === null) {
       
 10379       return true;
       
 10380     }
       
 10381 
       
 10382     return list.includes(item);
       
 10383   }
       
 10384 
       
 10385   return defaultResult;
       
 10386 };
       
 10387 /**
       
 10388  * Determines if the given block type is allowed to be inserted into the block list.
       
 10389  * This function is not exported and not memoized because using a memoized selector
       
 10390  * inside another memoized selector is just a waste of time.
       
 10391  *
       
 10392  * @param {Object}         state        Editor state.
       
 10393  * @param {string|Object}  blockName    The block type object, e.g., the response
       
 10394  *                                      from the block directory; or a string name of
       
 10395  *                                      an installed block type, e.g.' core/paragraph'.
       
 10396  * @param {?string}        rootClientId Optional root client ID of block list.
       
 10397  *
       
 10398  * @return {boolean} Whether the given block type is allowed to be inserted.
       
 10399  */
       
 10400 
       
 10401 
       
 10402 const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) => {
       
 10403   let blockType;
       
 10404 
       
 10405   if (blockName && 'object' === typeof blockName) {
       
 10406     blockType = blockName;
       
 10407     blockName = blockType.name;
       
 10408   } else {
       
 10409     blockType = Object(external_wp_blocks_["getBlockType"])(blockName);
       
 10410   }
       
 10411 
       
 10412   if (!blockType) {
       
 10413     return false;
       
 10414   }
       
 10415 
       
 10416   const {
       
 10417     allowedBlockTypes
       
 10418   } = selectors_getSettings(state);
       
 10419   const isBlockAllowedInEditor = checkAllowList(allowedBlockTypes, blockName, true);
       
 10420 
       
 10421   if (!isBlockAllowedInEditor) {
       
 10422     return false;
       
 10423   }
       
 10424 
       
 10425   const isLocked = !!selectors_getTemplateLock(state, rootClientId);
       
 10426 
       
 10427   if (isLocked) {
       
 10428     return false;
       
 10429   }
       
 10430 
       
 10431   const parentBlockListSettings = selectors_getBlockListSettings(state, rootClientId); // The parent block doesn't have settings indicating it doesn't support
       
 10432   // inner blocks, return false.
       
 10433 
       
 10434   if (rootClientId && parentBlockListSettings === undefined) {
       
 10435     return false;
       
 10436   }
       
 10437 
       
 10438   const parentAllowedBlocks = parentBlockListSettings === null || parentBlockListSettings === void 0 ? void 0 : parentBlockListSettings.allowedBlocks;
       
 10439   const hasParentAllowedBlock = checkAllowList(parentAllowedBlocks, blockName);
       
 10440   const blockAllowedParentBlocks = blockType.parent;
       
 10441   const parentName = selectors_getBlockName(state, rootClientId);
       
 10442   const hasBlockAllowedParent = checkAllowList(blockAllowedParentBlocks, parentName);
       
 10443 
       
 10444   if (hasParentAllowedBlock !== null && hasBlockAllowedParent !== null) {
       
 10445     return hasParentAllowedBlock || hasBlockAllowedParent;
       
 10446   } else if (hasParentAllowedBlock !== null) {
       
 10447     return hasParentAllowedBlock;
       
 10448   } else if (hasBlockAllowedParent !== null) {
       
 10449     return hasBlockAllowedParent;
       
 10450   }
       
 10451 
       
 10452   return true;
       
 10453 };
       
 10454 /**
       
 10455  * Determines if the given block type is allowed to be inserted into the block list.
       
 10456  *
       
 10457  * @param {Object}  state        Editor state.
       
 10458  * @param {string}  blockName    The name of the block type, e.g.' core/paragraph'.
       
 10459  * @param {?string} rootClientId Optional root client ID of block list.
       
 10460  *
       
 10461  * @return {boolean} Whether the given block type is allowed to be inserted.
       
 10462  */
       
 10463 
       
 10464 
       
 10465 const selectors_canInsertBlockType = Object(rememo["a" /* default */])(canInsertBlockTypeUnmemoized, (state, blockName, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId[rootClientId], state.settings.allowedBlockTypes, state.settings.templateLock]);
       
 10466 /**
       
 10467  * Determines if the given blocks are allowed to be inserted into the block
       
 10468  * list.
       
 10469  *
       
 10470  * @param {Object}  state        Editor state.
       
 10471  * @param {string}  clientIds    The block client IDs to be inserted.
       
 10472  * @param {?string} rootClientId Optional root client ID of block list.
       
 10473  *
       
 10474  * @return {boolean} Whether the given blocks are allowed to be inserted.
       
 10475  */
       
 10476 
       
 10477 function selectors_canInsertBlocks(state, clientIds, rootClientId = null) {
       
 10478   return clientIds.every(id => selectors_canInsertBlockType(state, selectors_getBlockName(state, id), rootClientId));
       
 10479 }
       
 10480 /**
       
 10481  * Returns information about how recently and frequently a block has been inserted.
       
 10482  *
       
 10483  * @param {Object} state Global application state.
       
 10484  * @param {string} id    A string which identifies the insert, e.g. 'core/block/12'
       
 10485  *
       
 10486  * @return {?{ time: number, count: number }} An object containing `time` which is when the last
       
 10487  *                                            insert occurred as a UNIX epoch, and `count` which is
       
 10488  *                                            the number of inserts that have occurred.
       
 10489  */
       
 10490 
       
 10491 function getInsertUsage(state, id) {
       
 10492   var _state$preferences$in, _state$preferences$in2;
       
 10493 
       
 10494   return (_state$preferences$in = (_state$preferences$in2 = state.preferences.insertUsage) === null || _state$preferences$in2 === void 0 ? void 0 : _state$preferences$in2[id]) !== null && _state$preferences$in !== void 0 ? _state$preferences$in : null;
       
 10495 }
       
 10496 /**
       
 10497  * Returns whether we can show a block type in the inserter
       
 10498  *
       
 10499  * @param {Object} state Global State
       
 10500  * @param {Object} blockType BlockType
       
 10501  * @param {?string} rootClientId Optional root client ID of block list.
       
 10502  *
       
 10503  * @return {boolean} Whether the given block type is allowed to be shown in the inserter.
       
 10504  */
       
 10505 
       
 10506 
       
 10507 const canIncludeBlockTypeInInserter = (state, blockType, rootClientId) => {
       
 10508   if (!Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'inserter', true)) {
       
 10509     return false;
       
 10510   }
       
 10511 
       
 10512   return canInsertBlockTypeUnmemoized(state, blockType.name, rootClientId);
       
 10513 };
       
 10514 /**
       
 10515  * Return a function to be used to tranform a block variation to an inserter item
       
 10516  *
       
 10517  * @param {Object} state Global State
       
 10518  * @param {Object} item Denormalized inserter item
       
 10519  * @return {Function} Function to transform a block variation to inserter item
       
 10520  */
       
 10521 
       
 10522 
       
 10523 const getItemFromVariation = (state, item) => variation => {
       
 10524   const variationId = `${item.id}/${variation.name}`;
       
 10525   const {
       
 10526     time,
       
 10527     count = 0
       
 10528   } = getInsertUsage(state, variationId) || {};
       
 10529   return { ...item,
       
 10530     id: variationId,
       
 10531     icon: variation.icon || item.icon,
       
 10532     title: variation.title || item.title,
       
 10533     description: variation.description || item.description,
       
 10534     category: variation.category || item.category,
       
 10535     // If `example` is explicitly undefined for the variation, the preview will not be shown.
       
 10536     example: variation.hasOwnProperty('example') ? variation.example : item.example,
       
 10537     initialAttributes: { ...item.initialAttributes,
       
 10538       ...variation.attributes
       
 10539     },
       
 10540     innerBlocks: variation.innerBlocks,
       
 10541     keywords: variation.keywords || item.keywords,
       
 10542     frecency: calculateFrecency(time, count)
       
 10543   };
       
 10544 };
       
 10545 /**
       
 10546  * Returns the calculated frecency.
       
 10547  *
       
 10548  * 'frecency' is a heuristic (https://en.wikipedia.org/wiki/Frecency)
       
 10549  * that combines block usage frequenty and recency.
       
 10550  *
       
 10551  * @param {number} time When the last insert occurred as a UNIX epoch
       
 10552  * @param {number} count The number of inserts that have occurred.
       
 10553  *
       
 10554  * @return {number} The calculated frecency.
       
 10555  */
       
 10556 
       
 10557 
       
 10558 const calculateFrecency = (time, count) => {
       
 10559   if (!time) {
       
 10560     return count;
       
 10561   } // The selector is cached, which means Date.now() is the last time that the
       
 10562   // relevant state changed. This suits our needs.
       
 10563 
       
 10564 
       
 10565   const duration = Date.now() - time;
       
 10566 
       
 10567   switch (true) {
       
 10568     case duration < MILLISECONDS_PER_HOUR:
       
 10569       return count * 4;
       
 10570 
       
 10571     case duration < MILLISECONDS_PER_DAY:
       
 10572       return count * 2;
       
 10573 
       
 10574     case duration < MILLISECONDS_PER_WEEK:
       
 10575       return count / 2;
       
 10576 
       
 10577     default:
       
 10578       return count / 4;
       
 10579   }
       
 10580 };
       
 10581 /**
       
 10582  * Returns a function that accepts a block type and builds an item to be shown
       
 10583  * in a specific context. It's used for building items for Inserter and available
       
 10584  * block Transfroms list.
       
 10585  *
       
 10586  * @param {Object} state Editor state.
       
 10587  * @param {Object} options Options object for handling the building of a block type.
       
 10588  * @param {string} options.buildScope The scope for which the item is going to be used.
       
 10589  * @return {Function} Function returns an item to be shown in a specific context (Inserter|Transforms list).
       
 10590  */
       
 10591 
       
 10592 
       
 10593 const buildBlockTypeItem = (state, {
       
 10594   buildScope = 'inserter'
       
 10595 }) => blockType => {
       
 10596   const id = blockType.name;
       
 10597   let isDisabled = false;
       
 10598 
       
 10599   if (!Object(external_wp_blocks_["hasBlockSupport"])(blockType.name, 'multiple', true)) {
       
 10600     isDisabled = Object(external_lodash_["some"])(selectors_getBlocksByClientId(state, getClientIdsWithDescendants(state)), {
       
 10601       name: blockType.name
       
 10602     });
       
 10603   }
       
 10604 
       
 10605   const {
       
 10606     time,
       
 10607     count = 0
       
 10608   } = getInsertUsage(state, id) || {};
       
 10609   const blockItemBase = {
       
 10610     id,
       
 10611     name: blockType.name,
       
 10612     title: blockType.title,
       
 10613     icon: blockType.icon,
       
 10614     isDisabled,
       
 10615     frecency: calculateFrecency(time, count)
       
 10616   };
       
 10617   if (buildScope === 'transform') return blockItemBase;
       
 10618   const inserterVariations = blockType.variations.filter(({
       
 10619     scope
       
 10620   }) => !scope || scope.includes('inserter'));
       
 10621   return { ...blockItemBase,
       
 10622     initialAttributes: {},
       
 10623     description: blockType.description,
       
 10624     category: blockType.category,
       
 10625     keywords: blockType.keywords,
       
 10626     variations: inserterVariations,
       
 10627     example: blockType.example,
       
 10628     utility: 1 // deprecated
       
 10629 
       
 10630   };
       
 10631 };
       
 10632 /**
       
 10633  * Determines the items that appear in the inserter. Includes both static
       
 10634  * items (e.g. a regular block type) and dynamic items (e.g. a reusable block).
       
 10635  *
       
 10636  * Each item object contains what's necessary to display a button in the
       
 10637  * inserter and handle its selection.
       
 10638  *
       
 10639  * The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency)
       
 10640  * that combines block usage frequenty and recency.
       
 10641  *
       
 10642  * Items are returned ordered descendingly by their 'utility' and 'frecency'.
       
 10643  *
       
 10644  * @param {Object}  state        Editor state.
       
 10645  * @param {?string} rootClientId Optional root client ID of block list.
       
 10646  *
       
 10647  * @return {WPEditorInserterItem[]} Items that appear in inserter.
       
 10648  *
       
 10649  * @typedef {Object} WPEditorInserterItem
       
 10650  * @property {string}   id                Unique identifier for the item.
       
 10651  * @property {string}   name              The type of block to create.
       
 10652  * @property {Object}   initialAttributes Attributes to pass to the newly created block.
       
 10653  * @property {string}   title             Title of the item, as it appears in the inserter.
       
 10654  * @property {string}   icon              Dashicon for the item, as it appears in the inserter.
       
 10655  * @property {string}   category          Block category that the item is associated with.
       
 10656  * @property {string[]} keywords          Keywords that can be searched to find this item.
       
 10657  * @property {boolean}  isDisabled        Whether or not the user should be prevented from inserting
       
 10658  *                                        this item.
       
 10659  * @property {number}   frecency          Heuristic that combines frequency and recency.
       
 10660  */
       
 10661 
       
 10662 
       
 10663 const selectors_getInserterItems = Object(rememo["a" /* default */])((state, rootClientId = null) => {
       
 10664   const buildBlockTypeInserterItem = buildBlockTypeItem(state, {
       
 10665     buildScope: 'inserter'
       
 10666   });
       
 10667 
       
 10668   const buildReusableBlockInserterItem = reusableBlock => {
       
 10669     const id = `core/block/${reusableBlock.id}`;
       
 10670 
       
 10671     const referencedBlocks = __experimentalGetParsedReusableBlock(state, reusableBlock.id);
       
 10672 
       
 10673     let referencedBlockType;
       
 10674 
       
 10675     if (referencedBlocks.length === 1) {
       
 10676       referencedBlockType = Object(external_wp_blocks_["getBlockType"])(referencedBlocks[0].name);
       
 10677     }
       
 10678 
       
 10679     const {
       
 10680       time,
       
 10681       count = 0
       
 10682     } = getInsertUsage(state, id) || {};
       
 10683     const frecency = calculateFrecency(time, count);
       
 10684     return {
       
 10685       id,
       
 10686       name: 'core/block',
       
 10687       initialAttributes: {
       
 10688         ref: reusableBlock.id
       
 10689       },
       
 10690       title: reusableBlock.title.raw,
       
 10691       icon: referencedBlockType ? referencedBlockType.icon : templateIcon,
       
 10692       category: 'reusable',
       
 10693       keywords: [],
       
 10694       isDisabled: false,
       
 10695       utility: 1,
       
 10696       // deprecated
       
 10697       frecency
       
 10698     };
       
 10699   };
       
 10700 
       
 10701   const blockTypeInserterItems = Object(external_wp_blocks_["getBlockTypes"])().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId)).map(buildBlockTypeInserterItem);
       
 10702   const reusableBlockInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).map(buildReusableBlockInserterItem) : []; // Exclude any block type item that is to be replaced by a default
       
 10703   // variation.
       
 10704 
       
 10705   const visibleBlockTypeInserterItems = blockTypeInserterItems.filter(({
       
 10706     variations = []
       
 10707   }) => !variations.some(({
       
 10708     isDefault
       
 10709   }) => isDefault));
       
 10710   const blockVariations = []; // Show all available blocks with variations
       
 10711 
       
 10712   for (const item of blockTypeInserterItems) {
       
 10713     const {
       
 10714       variations = []
       
 10715     } = item;
       
 10716 
       
 10717     if (variations.length) {
       
 10718       const variationMapper = getItemFromVariation(state, item);
       
 10719       blockVariations.push(...variations.map(variationMapper));
       
 10720     }
       
 10721   } // Prioritize core blocks's display in inserter.
       
 10722 
       
 10723 
       
 10724   const prioritizeCoreBlocks = (a, b) => {
       
 10725     const coreBlockNamePrefix = 'core/';
       
 10726     const firstIsCoreBlock = a.name.startsWith(coreBlockNamePrefix);
       
 10727     const secondIsCoreBlock = b.name.startsWith(coreBlockNamePrefix);
       
 10728 
       
 10729     if (firstIsCoreBlock && secondIsCoreBlock) {
       
 10730       return 0;
       
 10731     }
       
 10732 
       
 10733     return firstIsCoreBlock && !secondIsCoreBlock ? -1 : 1;
       
 10734   }; // Ensure core blocks are prioritized in the returned results,
       
 10735   // because third party blocks can be registered earlier than
       
 10736   // the core blocks (usually by using the `init` action),
       
 10737   // thus affecting the display order.
       
 10738   // We don't sort reusable blocks as they are handled differently.
       
 10739 
       
 10740 
       
 10741   const sortedBlockTypes = [...visibleBlockTypeInserterItems, ...blockVariations].sort(prioritizeCoreBlocks);
       
 10742   return [...sortedBlockTypes, ...reusableBlockInserterItems];
       
 10743 }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.blocks.order, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), Object(external_wp_blocks_["getBlockTypes"])()]);
       
 10744 /**
       
 10745  * Determines the items that appear in the available block transforms list.
       
 10746  *
       
 10747  * Each item object contains what's necessary to display a menu item in the
       
 10748  * transform list and handle its selection.
       
 10749  *
       
 10750  * The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency)
       
 10751  * that combines block usage frequenty and recency.
       
 10752  *
       
 10753  * Items are returned ordered descendingly by their 'frecency'.
       
 10754  *
       
 10755  * @param {Object}  state        Editor state.
       
 10756  * @param {?string} rootClientId Optional root client ID of block list.
       
 10757  *
       
 10758  * @return {WPEditorTransformItem[]} Items that appear in inserter.
       
 10759  *
       
 10760  * @typedef {Object} WPEditorTransformItem
       
 10761  * @property {string}   id                Unique identifier for the item.
       
 10762  * @property {string}   name              The type of block to create.
       
 10763  * @property {string}   title             Title of the item, as it appears in the inserter.
       
 10764  * @property {string}   icon              Dashicon for the item, as it appears in the inserter.
       
 10765  * @property {boolean}  isDisabled        Whether or not the user should be prevented from inserting
       
 10766  *                                        this item.
       
 10767  * @property {number}   frecency          Heuristic that combines frequency and recency.
       
 10768  */
       
 10769 
       
 10770 const selectors_getBlockTransformItems = Object(rememo["a" /* default */])((state, blocks, rootClientId = null) => {
       
 10771   const buildBlockTypeTransformItem = buildBlockTypeItem(state, {
       
 10772     buildScope: 'transform'
       
 10773   });
       
 10774   const blockTypeTransformItems = Object(external_wp_blocks_["getBlockTypes"])().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId)).map(buildBlockTypeTransformItem);
       
 10775   const itemsByName = Object(external_lodash_["mapKeys"])(blockTypeTransformItems, ({
       
 10776     name
       
 10777   }) => name);
       
 10778   const possibleTransforms = Object(external_wp_blocks_["getPossibleBlockTransformations"])(blocks).reduce((accumulator, block) => {
       
 10779     if (itemsByName[block === null || block === void 0 ? void 0 : block.name]) {
       
 10780       accumulator.push(itemsByName[block.name]);
       
 10781     }
       
 10782 
       
 10783     return accumulator;
       
 10784   }, []);
       
 10785   const possibleBlockTransformations = Object(external_lodash_["orderBy"])(possibleTransforms, block => itemsByName[block.name].frecency, 'desc');
       
 10786   return possibleBlockTransformations;
       
 10787 }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, Object(external_wp_blocks_["getBlockTypes"])()]);
       
 10788 /**
       
 10789  * Determines whether there are items to show in the inserter.
       
 10790  *
       
 10791  * @param {Object}  state        Editor state.
       
 10792  * @param {?string} rootClientId Optional root client ID of block list.
       
 10793  *
       
 10794  * @return {boolean} Items that appear in inserter.
       
 10795  */
       
 10796 
       
 10797 const selectors_hasInserterItems = Object(rememo["a" /* default */])((state, rootClientId = null) => {
       
 10798   const hasBlockType = Object(external_lodash_["some"])(Object(external_wp_blocks_["getBlockTypes"])(), blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId));
       
 10799 
       
 10800   if (hasBlockType) {
       
 10801     return true;
       
 10802   }
       
 10803 
       
 10804   const hasReusableBlock = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) && getReusableBlocks(state).length > 0;
       
 10805   return hasReusableBlock;
       
 10806 }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), Object(external_wp_blocks_["getBlockTypes"])()]);
       
 10807 /**
       
 10808  * Returns the list of allowed inserter blocks for inner blocks children
       
 10809  *
       
 10810  * @param {Object}  state        Editor state.
       
 10811  * @param {?string} rootClientId Optional root client ID of block list.
       
 10812  *
       
 10813  * @return {Array?} The list of allowed block types.
       
 10814  */
       
 10815 
       
 10816 const selectors_experimentalGetAllowedBlocks = Object(rememo["a" /* default */])((state, rootClientId = null) => {
       
 10817   if (!rootClientId) {
       
 10818     return;
       
 10819   }
       
 10820 
       
 10821   return Object(external_lodash_["filter"])(Object(external_wp_blocks_["getBlockTypes"])(), blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId));
       
 10822 }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.settings.allowedBlockTypes, state.settings.templateLock, Object(external_wp_blocks_["getBlockTypes"])()]);
       
 10823 
       
 10824 const checkAllowListRecursive = (blocks, allowedBlockTypes) => {
       
 10825   if (Object(external_lodash_["isBoolean"])(allowedBlockTypes)) {
       
 10826     return allowedBlockTypes;
       
 10827   }
       
 10828 
       
 10829   const blocksQueue = [...blocks];
       
 10830 
       
 10831   while (blocksQueue.length > 0) {
       
 10832     var _block$innerBlocks;
       
 10833 
       
 10834     const block = blocksQueue.shift();
       
 10835     const isAllowed = checkAllowList(allowedBlockTypes, block.name || block.blockName, true);
       
 10836 
       
 10837     if (!isAllowed) {
       
 10838       return false;
       
 10839     }
       
 10840 
       
 10841     (_block$innerBlocks = block.innerBlocks) === null || _block$innerBlocks === void 0 ? void 0 : _block$innerBlocks.forEach(innerBlock => {
       
 10842       blocksQueue.push(innerBlock);
       
 10843     });
       
 10844   }
       
 10845 
       
 10846   return true;
       
 10847 };
       
 10848 
       
 10849 const __experimentalGetParsedPattern = Object(rememo["a" /* default */])((state, patternName) => {
       
 10850   const patterns = state.settings.__experimentalBlockPatterns;
       
 10851   const pattern = patterns.find(({
       
 10852     name
       
 10853   }) => name === patternName);
       
 10854 
       
 10855   if (!pattern) {
       
 10856     return null;
       
 10857   }
       
 10858 
       
 10859   return { ...pattern,
       
 10860     blocks: Object(external_wp_blocks_["parse"])(pattern.content)
       
 10861   };
       
 10862 }, state => [state.settings.__experimentalBlockPatterns]);
       
 10863 const getAllAllowedPatterns = Object(rememo["a" /* default */])(state => {
       
 10864   const patterns = state.settings.__experimentalBlockPatterns;
       
 10865   const {
       
 10866     allowedBlockTypes
       
 10867   } = selectors_getSettings(state);
       
 10868   const parsedPatterns = patterns.map(({
       
 10869     name
       
 10870   }) => __experimentalGetParsedPattern(state, name));
       
 10871   const allowedPatterns = parsedPatterns.filter(({
       
 10872     blocks
       
 10873   }) => checkAllowListRecursive(blocks, allowedBlockTypes));
       
 10874   return allowedPatterns;
       
 10875 }, state => [state.settings.__experimentalBlockPatterns, state.settings.allowedBlockTypes]);
       
 10876 /**
       
 10877  * Returns the list of allowed patterns for inner blocks children.
       
 10878  *
       
 10879  * @param {Object}  state        Editor state.
       
 10880  * @param {?string} rootClientId Optional target root client ID.
       
 10881  *
       
 10882  * @return {Array?} The list of allowed patterns.
       
 10883  */
       
 10884 
       
 10885 const selectors_experimentalGetAllowedPatterns = Object(rememo["a" /* default */])((state, rootClientId = null) => {
       
 10886   const availableParsedPatterns = getAllAllowedPatterns(state);
       
 10887   const patternsAllowed = Object(external_lodash_["filter"])(availableParsedPatterns, ({
       
 10888     blocks
       
 10889   }) => blocks.every(({
       
 10890     name
       
 10891   }) => selectors_canInsertBlockType(state, name, rootClientId)));
       
 10892   return patternsAllowed;
       
 10893 }, (state, rootClientId) => [state.settings.__experimentalBlockPatterns, state.settings.allowedBlockTypes, state.settings.templateLock, state.blockListSettings[rootClientId], state.blocks.byClientId[rootClientId]]);
       
 10894 /**
       
 10895  * Returns the list of patterns based on their declared `blockTypes`
       
 10896  * and a block's name.
       
 10897  * Patterns can use `blockTypes` to integrate in work flows like
       
 10898  * suggesting appropriate patterns in a Placeholder state(during insertion)
       
 10899  * or blocks transformations.
       
 10900  *
       
 10901  * @param {Object} state Editor state.
       
 10902  * @param {string|string[]} blockNames Block's name or array of block names to find matching pattens.
       
 10903  * @param {?string} rootClientId Optional target root client ID.
       
 10904  *
       
 10905  * @return {Array} The list of matched block patterns based on declared `blockTypes` and block name.
       
 10906  */
       
 10907 
       
 10908 const selectors_experimentalGetPatternsByBlockTypes = Object(rememo["a" /* default */])((state, blockNames, rootClientId = null) => {
       
 10909   if (!blockNames) return EMPTY_ARRAY;
       
 10910 
       
 10911   const patterns = selectors_experimentalGetAllowedPatterns(state, rootClientId);
       
 10912 
       
 10913   const normalizedBlockNames = Array.isArray(blockNames) ? blockNames : [blockNames];
       
 10914   return patterns.filter(pattern => {
       
 10915     var _pattern$blockTypes, _pattern$blockTypes$s;
       
 10916 
       
 10917     return pattern === null || pattern === void 0 ? void 0 : (_pattern$blockTypes = pattern.blockTypes) === null || _pattern$blockTypes === void 0 ? void 0 : (_pattern$blockTypes$s = _pattern$blockTypes.some) === null || _pattern$blockTypes$s === void 0 ? void 0 : _pattern$blockTypes$s.call(_pattern$blockTypes, blockName => normalizedBlockNames.includes(blockName));
       
 10918   });
       
 10919 }, (state, rootClientId) => [...selectors_experimentalGetAllowedPatterns.getDependants(state, rootClientId)]);
       
 10920 /**
       
 10921  * Determines the items that appear in the available pattern transforms list.
       
 10922  *
       
 10923  * For now we only handle blocks without InnerBlocks and take into account
       
 10924  * the `__experimentalRole` property of blocks' attributes for the transformation.
       
 10925  *
       
 10926  * We return the first set of possible eligible block patterns,
       
 10927  * by checking the `blockTypes` property. We still have to recurse through
       
 10928  * block pattern's blocks and try to find matches from the selected blocks.
       
 10929  * Now this happens in the consumer to avoid heavy operations in the selector.
       
 10930  *
       
 10931  * @param {Object}  state Editor state.
       
 10932  * @param {Object[]} blocks The selected blocks.
       
 10933  * @param {?string} rootClientId Optional root client ID of block list.
       
 10934  *
       
 10935  * @return {WPBlockPattern[]} Items that are eligible for a pattern transformation.
       
 10936  */
       
 10937 
       
 10938 const selectors_experimentalGetPatternTransformItems = Object(rememo["a" /* default */])((state, blocks, rootClientId = null) => {
       
 10939   if (!blocks) return EMPTY_ARRAY;
       
 10940   /**
       
 10941    * For now we only handle blocks without InnerBlocks and take into account
       
 10942    * the `__experimentalRole` property of blocks' attributes for the transformation.
       
 10943    * Note that the blocks have been retrieved through `getBlock`, which doesn't
       
 10944    * return the inner blocks of an inner block controller, so we still need
       
 10945    * to check for this case too.
       
 10946    */
       
 10947 
       
 10948   if (blocks.some(({
       
 10949     clientId,
       
 10950     innerBlocks
       
 10951   }) => innerBlocks.length || areInnerBlocksControlled(state, clientId))) {
       
 10952     return EMPTY_ARRAY;
       
 10953   } // Create a Set of the selected block names that is used in patterns filtering.
       
 10954 
       
 10955 
       
 10956   const selectedBlockNames = Array.from(new Set(blocks.map(({
       
 10957     name
       
 10958   }) => name)));
       
 10959   /**
       
 10960    * Here we will return first set of possible eligible block patterns,
       
 10961    * by checking the `blockTypes` property. We still have to recurse through
       
 10962    * block pattern's blocks and try to find matches from the selected blocks.
       
 10963    * Now this happens in the consumer to avoid heavy operations in the selector.
       
 10964    */
       
 10965 
       
 10966   return selectors_experimentalGetPatternsByBlockTypes(state, selectedBlockNames, rootClientId);
       
 10967 }, (state, rootClientId) => [...selectors_experimentalGetPatternsByBlockTypes.getDependants(state, rootClientId)]);
       
 10968 /**
       
 10969  * Returns the Block List settings of a block, if any exist.
       
 10970  *
       
 10971  * @param {Object}  state    Editor state.
       
 10972  * @param {?string} clientId Block client ID.
       
 10973  *
       
 10974  * @return {?Object} Block settings of the block if set.
       
 10975  */
       
 10976 
       
 10977 function selectors_getBlockListSettings(state, clientId) {
       
 10978   return state.blockListSettings[clientId];
       
 10979 }
       
 10980 /**
       
 10981  * Returns the editor settings.
       
 10982  *
       
 10983  * @param {Object} state Editor state.
       
 10984  *
       
 10985  * @return {Object} The editor settings object.
       
 10986  */
       
 10987 
       
 10988 function selectors_getSettings(state) {
       
 10989   return state.settings;
       
 10990 }
       
 10991 /**
       
 10992  * Returns true if the most recent block change is be considered persistent, or
       
 10993  * false otherwise. A persistent change is one committed by BlockEditorProvider
       
 10994  * via its `onChange` callback, in addition to `onInput`.
       
 10995  *
       
 10996  * @param {Object} state Block editor state.
       
 10997  *
       
 10998  * @return {boolean} Whether the most recent block change was persistent.
       
 10999  */
       
 11000 
       
 11001 function selectors_isLastBlockChangePersistent(state) {
       
 11002   return state.blocks.isPersistentChange;
       
 11003 }
       
 11004 /**
       
 11005  * Returns the block list settings for an array of blocks, if any exist.
       
 11006  *
       
 11007  * @param {Object} state     Editor state.
       
 11008  * @param {Array}  clientIds Block client IDs.
       
 11009  *
       
 11010  * @return {Object} An object where the keys are client ids and the values are
       
 11011  *                  a block list setting object.
       
 11012  */
       
 11013 
       
 11014 const selectors_experimentalGetBlockListSettingsForBlocks = Object(rememo["a" /* default */])((state, clientIds = []) => {
       
 11015   return clientIds.reduce((blockListSettingsForBlocks, clientId) => {
       
 11016     if (!state.blockListSettings[clientId]) {
       
 11017       return blockListSettingsForBlocks;
       
 11018     }
       
 11019 
       
 11020     return { ...blockListSettingsForBlocks,
       
 11021       [clientId]: state.blockListSettings[clientId]
       
 11022     };
       
 11023   }, {});
       
 11024 }, state => [state.blockListSettings]);
       
 11025 /**
       
 11026  * Returns the parsed block saved as shared block with the given ID.
       
 11027  *
       
 11028  * @param {Object}        state Global application state.
       
 11029  * @param {number|string} ref   The shared block's ID.
       
 11030  *
       
 11031  * @return {Object} The parsed block.
       
 11032  */
       
 11033 
       
 11034 const __experimentalGetParsedReusableBlock = Object(rememo["a" /* default */])((state, ref) => {
       
 11035   const reusableBlock = Object(external_lodash_["find"])(getReusableBlocks(state), block => block.id === ref);
       
 11036 
       
 11037   if (!reusableBlock) {
       
 11038     return null;
       
 11039   } // Only reusableBlock.content.raw should be used here, `reusableBlock.content` is a
       
 11040   // workaround until #22127 is fixed.
       
 11041 
       
 11042 
       
 11043   return Object(external_wp_blocks_["parse"])(typeof reusableBlock.content.raw === 'string' ? reusableBlock.content.raw : reusableBlock.content);
       
 11044 }, state => [getReusableBlocks(state)]);
       
 11045 /**
       
 11046  * Returns the title of a given reusable block
       
 11047  *
       
 11048  * @param {Object}        state Global application state.
       
 11049  * @param {number|string} ref   The shared block's ID.
       
 11050  *
       
 11051  * @return {string} The reusable block saved title.
       
 11052  */
       
 11053 
       
 11054 const selectors_experimentalGetReusableBlockTitle = Object(rememo["a" /* default */])((state, ref) => {
       
 11055   var _reusableBlock$title;
       
 11056 
       
 11057   const reusableBlock = Object(external_lodash_["find"])(getReusableBlocks(state), block => block.id === ref);
       
 11058 
       
 11059   if (!reusableBlock) {
       
 11060     return null;
       
 11061   }
       
 11062 
       
 11063   return (_reusableBlock$title = reusableBlock.title) === null || _reusableBlock$title === void 0 ? void 0 : _reusableBlock$title.raw;
       
 11064 }, state => [getReusableBlocks(state)]);
       
 11065 /**
       
 11066  * Returns true if the most recent block change is be considered ignored, or
       
 11067  * false otherwise. An ignored change is one not to be committed by
       
 11068  * BlockEditorProvider, neither via `onChange` nor `onInput`.
       
 11069  *
       
 11070  * @param {Object} state Block editor state.
       
 11071  *
       
 11072  * @return {boolean} Whether the most recent block change was ignored.
       
 11073  */
       
 11074 
       
 11075 function selectors_unstableIsLastBlockChangeIgnored(state) {
       
 11076   // TODO: Removal Plan: Changes incurred by RECEIVE_BLOCKS should not be
       
 11077   // ignored if in-fact they result in a change in blocks state. The current
       
 11078   // need to ignore changes not a result of user interaction should be
       
 11079   // accounted for in the refactoring of reusable blocks as occurring within
       
 11080   // their own separate block editor / state (#7119).
       
 11081   return state.blocks.isIgnoredChange;
       
 11082 }
       
 11083 /**
       
 11084  * Returns the block attributes changed as a result of the last dispatched
       
 11085  * action.
       
 11086  *
       
 11087  * @param {Object} state Block editor state.
       
 11088  *
       
 11089  * @return {Object<string,Object>} Subsets of block attributes changed, keyed
       
 11090  *                                 by block client ID.
       
 11091  */
       
 11092 
       
 11093 function __experimentalGetLastBlockAttributeChanges(state) {
       
 11094   return state.lastBlockAttributesChange;
       
 11095 }
       
 11096 /**
       
 11097  * Returns the available reusable blocks
       
 11098  *
       
 11099  * @param {Object} state Global application state.
       
 11100  *
       
 11101  * @return {Array} Reusable blocks
       
 11102  */
       
 11103 
       
 11104 function getReusableBlocks(state) {
       
 11105   var _state$settings$__exp, _state$settings;
       
 11106 
       
 11107   return (_state$settings$__exp = state === null || state === void 0 ? void 0 : (_state$settings = state.settings) === null || _state$settings === void 0 ? void 0 : _state$settings.__experimentalReusableBlocks) !== null && _state$settings$__exp !== void 0 ? _state$settings$__exp : EMPTY_ARRAY;
       
 11108 }
       
 11109 /**
       
 11110  * Returns whether the navigation mode is enabled.
       
 11111  *
       
 11112  * @param {Object} state Editor state.
       
 11113  *
       
 11114  * @return {boolean}     Is navigation mode enabled.
       
 11115  */
       
 11116 
       
 11117 
       
 11118 function selectors_isNavigationMode(state) {
       
 11119   return state.isNavigationMode;
       
 11120 }
       
 11121 /**
       
 11122  * Returns whether block moving mode is enabled.
       
 11123  *
       
 11124  * @param {Object} state Editor state.
       
 11125  *
       
 11126  * @return {string}     Client Id of moving block.
       
 11127  */
       
 11128 
       
 11129 function selectors_hasBlockMovingClientId(state) {
       
 11130   return state.hasBlockMovingClientId;
       
 11131 }
       
 11132 /**
       
 11133  * Returns true if the last change was an automatic change, false otherwise.
       
 11134  *
       
 11135  * @param {Object} state Global application state.
       
 11136  *
       
 11137  * @return {boolean} Whether the last change was automatic.
       
 11138  */
       
 11139 
       
 11140 function selectors_didAutomaticChange(state) {
       
 11141   return !!state.automaticChangeStatus;
       
 11142 }
       
 11143 /**
       
 11144  * Returns true if the current highlighted block matches the block clientId.
       
 11145  *
       
 11146  * @param {Object} state Global application state.
       
 11147  * @param {string} clientId The block to check.
       
 11148  *
       
 11149  * @return {boolean} Whether the block is currently highlighted.
       
 11150  */
       
 11151 
       
 11152 function selectors_isBlockHighlighted(state, clientId) {
       
 11153   return state.highlightedBlock === clientId;
       
 11154 }
       
 11155 /**
       
 11156  * Checks if a given block has controlled inner blocks.
       
 11157  *
       
 11158  * @param {Object} state Global application state.
       
 11159  * @param {string} clientId The block to check.
       
 11160  *
       
 11161  * @return {boolean} True if the block has controlled inner blocks.
       
 11162  */
       
 11163 
       
 11164 function areInnerBlocksControlled(state, clientId) {
       
 11165   return !!state.blocks.controlledInnerBlocks[clientId];
       
 11166 }
       
 11167 /**
       
 11168  * Returns the clientId for the first 'active' block of a given array of block names.
       
 11169  * A block is 'active' if it (or a child) is the selected block.
       
 11170  * Returns the first match moving up the DOM from the selected block.
       
 11171  *
       
 11172  * @param {Object} state Global application state.
       
 11173  * @param {string[]} validBlocksNames The names of block types to check for.
       
 11174  *
       
 11175  * @return {string} The matching block's clientId.
       
 11176  */
       
 11177 
       
 11178 const __experimentalGetActiveBlockIdByBlockNames = Object(rememo["a" /* default */])((state, validBlockNames) => {
       
 11179   if (!validBlockNames.length) {
       
 11180     return null;
       
 11181   } // Check if selected block is a valid entity area.
       
 11182 
       
 11183 
       
 11184   const selectedBlockClientId = selectors_getSelectedBlockClientId(state);
       
 11185 
       
 11186   if (validBlockNames.includes(selectors_getBlockName(state, selectedBlockClientId))) {
       
 11187     return selectedBlockClientId;
       
 11188   } // Check if first selected block is a child of a valid entity area.
       
 11189 
       
 11190 
       
 11191   const multiSelectedBlockClientIds = selectors_getMultiSelectedBlockClientIds(state);
       
 11192   const entityAreaParents = getBlockParentsByBlockName(state, selectedBlockClientId || multiSelectedBlockClientIds[0], validBlockNames);
       
 11193 
       
 11194   if (entityAreaParents) {
       
 11195     // Last parent closest/most interior.
       
 11196     return Object(external_lodash_["last"])(entityAreaParents);
       
 11197   }
       
 11198 
       
 11199   return null;
       
 11200 }, (state, validBlockNames) => [state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId, validBlockNames]);
       
 11201 /**
       
 11202  * Tells if the block with the passed clientId was just inserted.
       
 11203  *
       
 11204  * @param {Object} state Global application state.
       
 11205  * @param {Object} clientId Client Id of the block.
       
 11206  * @param {?string} source Optional insertion source of the block.
       
 11207  * @return {boolean} True if the block matches the last block inserted from the specified source.
       
 11208  */
       
 11209 
       
 11210 function wasBlockJustInserted(state, clientId, source) {
       
 11211   const {
       
 11212     lastBlockInserted
       
 11213   } = state;
       
 11214   return lastBlockInserted.clientId === clientId && lastBlockInserted.source === source;
       
 11215 }
       
 11216 
       
 11217 // EXTERNAL MODULE: external ["wp","a11y"]
       
 11218 var external_wp_a11y_ = __webpack_require__("gdqT");
       
 11219 
       
 11220 // EXTERNAL MODULE: external ["wp","deprecated"]
       
 11221 var external_wp_deprecated_ = __webpack_require__("NMb1");
       
 11222 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
       
 11223 
       
 11224 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/controls.js
       
 11225 /**
       
 11226  * WordPress dependencies
       
 11227  */
       
 11228 
       
 11229 /**
       
 11230  * Internal dependencies
       
 11231  */
       
 11232 
       
 11233 
       
 11234 const __unstableMarkAutomaticChangeFinalControl = function () {
       
 11235   return {
       
 11236     type: 'MARK_AUTOMATIC_CHANGE_FINAL_CONTROL'
       
 11237   };
       
 11238 };
       
 11239 const controls_controls = {
       
 11240   SLEEP({
       
 11241     duration
       
 11242   }) {
       
 11243     return new Promise(resolve => {
       
 11244       setTimeout(resolve, duration);
       
 11245     });
       
 11246   },
       
 11247 
       
 11248   MARK_AUTOMATIC_CHANGE_FINAL_CONTROL: Object(external_wp_data_["createRegistryControl"])(registry => () => {
       
 11249     const {
       
 11250       requestIdleCallback = callback => setTimeout(callback, 100)
       
 11251     } = window;
       
 11252     requestIdleCallback(() => registry.dispatch(store).__unstableMarkAutomaticChangeFinal());
       
 11253   })
       
 11254 };
       
 11255 /* harmony default export */ var store_controls = (controls_controls);
       
 11256 
       
 11257 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/constants.js
       
 11258 const STORE_NAME = 'core/block-editor';
       
 11259 
       
 11260 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/actions.js
       
 11261 /**
       
 11262  * External dependencies
       
 11263  */
       
 11264 
       
 11265 /**
       
 11266  * WordPress dependencies
       
 11267  */
       
 11268 
       
 11269 
       
 11270 
       
 11271 
       
 11272 
       
 11273 
       
 11274 
       
 11275 /**
       
 11276  * Internal dependencies
       
 11277  */
       
 11278 
       
 11279 
       
 11280 
       
 11281 /**
       
 11282  * Generator which will yield a default block insert action if there
       
 11283  * are no other blocks at the root of the editor. This generator should be used
       
 11284  * in actions which may result in no blocks remaining in the editor (removal,
       
 11285  * replacement, etc).
       
 11286  */
       
 11287 
       
 11288 function* ensureDefaultBlock() {
       
 11289   const count = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockCount'); // To avoid a focus loss when removing the last block, assure there is
       
 11290   // always a default block if the last of the blocks have been removed.
       
 11291 
       
 11292   if (count === 0) {
       
 11293     const {
       
 11294       __unstableHasCustomAppender
       
 11295     } = yield external_wp_data_["controls"].select(STORE_NAME, 'getSettings'); // If there's an custom appender, don't insert default block.
       
 11296     // We have to remember to manually move the focus elsewhere to
       
 11297     // prevent it from being lost though.
       
 11298 
       
 11299     if (__unstableHasCustomAppender) {
       
 11300       return;
       
 11301     }
       
 11302 
       
 11303     return yield actions_insertDefaultBlock();
       
 11304   }
       
 11305 }
       
 11306 /**
       
 11307  * Returns an action object used in signalling that blocks state should be
       
 11308  * reset to the specified array of blocks, taking precedence over any other
       
 11309  * content reflected as an edit in state.
       
 11310  *
       
 11311  * @param {Array} blocks Array of blocks.
       
 11312  */
       
 11313 
       
 11314 
       
 11315 function* actions_resetBlocks(blocks) {
       
 11316   yield {
       
 11317     type: 'RESET_BLOCKS',
       
 11318     blocks
       
 11319   };
       
 11320   return yield* validateBlocksToTemplate(blocks);
       
 11321 }
       
 11322 /**
       
 11323  * Block validity is a function of blocks state (at the point of a
       
 11324  * reset) and the template setting. As a compromise to its placement
       
 11325  * across distinct parts of state, it is implemented here as a side-
       
 11326  * effect of the block reset action.
       
 11327  *
       
 11328  * @param {Array} blocks Array of blocks.
       
 11329  */
       
 11330 
       
 11331 function* validateBlocksToTemplate(blocks) {
       
 11332   const template = yield external_wp_data_["controls"].select(STORE_NAME, 'getTemplate');
       
 11333   const templateLock = yield external_wp_data_["controls"].select(STORE_NAME, 'getTemplateLock'); // Unlocked templates are considered always valid because they act
       
 11334   // as default values only.
       
 11335 
       
 11336   const isBlocksValidToTemplate = !template || templateLock !== 'all' || Object(external_wp_blocks_["doBlocksMatchTemplate"])(blocks, template); // Update if validity has changed.
       
 11337 
       
 11338   const isValidTemplate = yield external_wp_data_["controls"].select(STORE_NAME, 'isValidTemplate');
       
 11339 
       
 11340   if (isBlocksValidToTemplate !== isValidTemplate) {
       
 11341     yield setTemplateValidity(isBlocksValidToTemplate);
       
 11342     return isBlocksValidToTemplate;
       
 11343   }
       
 11344 }
       
 11345 /**
       
 11346  * A block selection object.
       
 11347  *
       
 11348  * @typedef {Object} WPBlockSelection
       
 11349  *
       
 11350  * @property {string} clientId     A block client ID.
       
 11351  * @property {string} attributeKey A block attribute key.
       
 11352  * @property {number} offset       An attribute value offset, based on the rich
       
 11353  *                                 text value. See `wp.richText.create`.
       
 11354  */
       
 11355 
       
 11356 /**
       
 11357  * Returns an action object used in signalling that selection state should be
       
 11358  * reset to the specified selection.
       
 11359  *
       
 11360  * @param {WPBlockSelection} selectionStart  The selection start.
       
 11361  * @param {WPBlockSelection} selectionEnd    The selection end.
       
 11362  * @param {0|-1|null}        initialPosition Initial block position.
       
 11363  *
       
 11364  * @return {Object} Action object.
       
 11365  */
       
 11366 
       
 11367 function actions_resetSelection(selectionStart, selectionEnd, initialPosition) {
       
 11368   return {
       
 11369     type: 'RESET_SELECTION',
       
 11370     selectionStart,
       
 11371     selectionEnd,
       
 11372     initialPosition
       
 11373   };
       
 11374 }
       
 11375 /**
       
 11376  * Returns an action object used in signalling that blocks have been received.
       
 11377  * Unlike resetBlocks, these should be appended to the existing known set, not
       
 11378  * replacing.
       
 11379  *
       
 11380  * @param {Object[]} blocks Array of block objects.
       
 11381  *
       
 11382  * @return {Object} Action object.
       
 11383  */
       
 11384 
       
 11385 function receiveBlocks(blocks) {
       
 11386   return {
       
 11387     type: 'RECEIVE_BLOCKS',
       
 11388     blocks
       
 11389   };
       
 11390 }
       
 11391 /**
       
 11392  * Returns an action object used in signalling that the multiple blocks'
       
 11393  * attributes with the specified client IDs have been updated.
       
 11394  *
       
 11395  * @param {string|string[]} clientIds  Block client IDs.
       
 11396  * @param {Object}          attributes Block attributes to be merged. Should be keyed by clientIds if
       
 11397  * uniqueByBlock is true.
       
 11398  * @param {boolean}          uniqueByBlock true if each block in clientIds array has a unique set of attributes
       
 11399  * @return {Object} Action object.
       
 11400  */
       
 11401 
       
 11402 function actions_updateBlockAttributes(clientIds, attributes, uniqueByBlock = false) {
       
 11403   return {
       
 11404     type: 'UPDATE_BLOCK_ATTRIBUTES',
       
 11405     clientIds: Object(external_lodash_["castArray"])(clientIds),
       
 11406     attributes,
       
 11407     uniqueByBlock
       
 11408   };
       
 11409 }
       
 11410 /**
       
 11411  * Returns an action object used in signalling that the block with the
       
 11412  * specified client ID has been updated.
       
 11413  *
       
 11414  * @param {string} clientId Block client ID.
       
 11415  * @param {Object} updates  Block attributes to be merged.
       
 11416  *
       
 11417  * @return {Object} Action object.
       
 11418  */
       
 11419 
       
 11420 function actions_updateBlock(clientId, updates) {
       
 11421   return {
       
 11422     type: 'UPDATE_BLOCK',
       
 11423     clientId,
       
 11424     updates
       
 11425   };
       
 11426 }
       
 11427 /**
       
 11428  * Returns an action object used in signalling that the block with the
       
 11429  * specified client ID has been selected, optionally accepting a position
       
 11430  * value reflecting its selection directionality. An initialPosition of -1
       
 11431  * reflects a reverse selection.
       
 11432  *
       
 11433  * @param {string}    clientId        Block client ID.
       
 11434  * @param {0|-1|null} initialPosition Optional initial position. Pass as -1 to
       
 11435  *                                  reflect reverse selection.
       
 11436  *
       
 11437  * @return {Object} Action object.
       
 11438  */
       
 11439 
       
 11440 function actions_selectBlock(clientId, initialPosition = 0) {
       
 11441   return {
       
 11442     type: 'SELECT_BLOCK',
       
 11443     initialPosition,
       
 11444     clientId
       
 11445   };
       
 11446 }
       
 11447 /**
       
 11448  * Yields action objects used in signalling that the block preceding the given
       
 11449  * clientId should be selected.
       
 11450  *
       
 11451  * @param {string} clientId Block client ID.
       
 11452  */
       
 11453 
       
 11454 function* selectPreviousBlock(clientId) {
       
 11455   const previousBlockClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getPreviousBlockClientId', clientId);
       
 11456 
       
 11457   if (previousBlockClientId) {
       
 11458     yield actions_selectBlock(previousBlockClientId, -1);
       
 11459     return [previousBlockClientId];
       
 11460   }
       
 11461 }
       
 11462 /**
       
 11463  * Yields action objects used in signalling that the block following the given
       
 11464  * clientId should be selected.
       
 11465  *
       
 11466  * @param {string} clientId Block client ID.
       
 11467  */
       
 11468 
       
 11469 function* selectNextBlock(clientId) {
       
 11470   const nextBlockClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getNextBlockClientId', clientId);
       
 11471 
       
 11472   if (nextBlockClientId) {
       
 11473     yield actions_selectBlock(nextBlockClientId);
       
 11474     return [nextBlockClientId];
       
 11475   }
       
 11476 }
       
 11477 /**
       
 11478  * Returns an action object used in signalling that a block multi-selection has started.
       
 11479  *
       
 11480  * @return {Object} Action object.
       
 11481  */
       
 11482 
       
 11483 function actions_startMultiSelect() {
       
 11484   return {
       
 11485     type: 'START_MULTI_SELECT'
       
 11486   };
       
 11487 }
       
 11488 /**
       
 11489  * Returns an action object used in signalling that block multi-selection stopped.
       
 11490  *
       
 11491  * @return {Object} Action object.
       
 11492  */
       
 11493 
       
 11494 function actions_stopMultiSelect() {
       
 11495   return {
       
 11496     type: 'STOP_MULTI_SELECT'
       
 11497   };
       
 11498 }
       
 11499 /**
       
 11500  * Returns an action object used in signalling that block multi-selection changed.
       
 11501  *
       
 11502  * @param {string} start First block of the multi selection.
       
 11503  * @param {string} end   Last block of the multiselection.
       
 11504  */
       
 11505 
       
 11506 function* actions_multiSelect(start, end) {
       
 11507   const startBlockRootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', start);
       
 11508   const endBlockRootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', end); // Only allow block multi-selections at the same level.
       
 11509 
       
 11510   if (startBlockRootClientId !== endBlockRootClientId) {
       
 11511     return;
       
 11512   }
       
 11513 
       
 11514   yield {
       
 11515     type: 'MULTI_SELECT',
       
 11516     start,
       
 11517     end
       
 11518   };
       
 11519   const blockCount = yield external_wp_data_["controls"].select(STORE_NAME, 'getSelectedBlockCount');
       
 11520   Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["sprintf"])(
       
 11521   /* translators: %s: number of selected blocks */
       
 11522   Object(external_wp_i18n_["_n"])('%s block selected.', '%s blocks selected.', blockCount), blockCount), 'assertive');
       
 11523 }
       
 11524 /**
       
 11525  * Returns an action object used in signalling that the block selection is cleared.
       
 11526  *
       
 11527  * @return {Object} Action object.
       
 11528  */
       
 11529 
       
 11530 function actions_clearSelectedBlock() {
       
 11531   return {
       
 11532     type: 'CLEAR_SELECTED_BLOCK'
       
 11533   };
       
 11534 }
       
 11535 /**
       
 11536  * Returns an action object that enables or disables block selection.
       
 11537  *
       
 11538  * @param {boolean} [isSelectionEnabled=true] Whether block selection should
       
 11539  *                                            be enabled.
       
 11540  *
       
 11541  * @return {Object} Action object.
       
 11542  */
       
 11543 
       
 11544 function actions_toggleSelection(isSelectionEnabled = true) {
       
 11545   return {
       
 11546     type: 'TOGGLE_SELECTION',
       
 11547     isSelectionEnabled
       
 11548   };
       
 11549 }
       
 11550 
       
 11551 function getBlocksWithDefaultStylesApplied(blocks, blockEditorSettings) {
       
 11552   var _blockEditorSettings$, _blockEditorSettings$2;
       
 11553 
       
 11554   const preferredStyleVariations = (_blockEditorSettings$ = blockEditorSettings === null || blockEditorSettings === void 0 ? void 0 : (_blockEditorSettings$2 = blockEditorSettings.__experimentalPreferredStyleVariations) === null || _blockEditorSettings$2 === void 0 ? void 0 : _blockEditorSettings$2.value) !== null && _blockEditorSettings$ !== void 0 ? _blockEditorSettings$ : {};
       
 11555   return blocks.map(block => {
       
 11556     var _block$attributes;
       
 11557 
       
 11558     const blockName = block.name;
       
 11559 
       
 11560     if (!Object(external_wp_blocks_["hasBlockSupport"])(blockName, 'defaultStylePicker', true)) {
       
 11561       return block;
       
 11562     }
       
 11563 
       
 11564     if (!preferredStyleVariations[blockName]) {
       
 11565       return block;
       
 11566     }
       
 11567 
       
 11568     const className = (_block$attributes = block.attributes) === null || _block$attributes === void 0 ? void 0 : _block$attributes.className;
       
 11569 
       
 11570     if (className !== null && className !== void 0 && className.includes('is-style-')) {
       
 11571       return block;
       
 11572     }
       
 11573 
       
 11574     const {
       
 11575       attributes = {}
       
 11576     } = block;
       
 11577     const blockStyle = preferredStyleVariations[blockName];
       
 11578     return { ...block,
       
 11579       attributes: { ...attributes,
       
 11580         className: `${className || ''} is-style-${blockStyle}`.trim()
       
 11581       }
       
 11582     };
       
 11583   });
       
 11584 }
       
 11585 /**
       
 11586  * Returns an action object signalling that a blocks should be replaced with
       
 11587  * one or more replacement blocks.
       
 11588  *
       
 11589  * @param {(string|string[])} clientIds       Block client ID(s) to replace.
       
 11590  * @param {(Object|Object[])} blocks          Replacement block(s).
       
 11591  * @param {number}            indexToSelect   Index of replacement block to select.
       
 11592  * @param {0|-1|null}         initialPosition Index of caret after in the selected block after the operation.
       
 11593  * @param {?Object}           meta            Optional Meta values to be passed to the action object.
       
 11594  *
       
 11595  * @yield {Object} Action object.
       
 11596  */
       
 11597 
       
 11598 
       
 11599 function* actions_replaceBlocks(clientIds, blocks, indexToSelect, initialPosition = 0, meta) {
       
 11600   clientIds = Object(external_lodash_["castArray"])(clientIds);
       
 11601   blocks = getBlocksWithDefaultStylesApplied(Object(external_lodash_["castArray"])(blocks), yield external_wp_data_["controls"].select(STORE_NAME, 'getSettings'));
       
 11602   const rootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', Object(external_lodash_["first"])(clientIds)); // Replace is valid if the new blocks can be inserted in the root block.
       
 11603 
       
 11604   for (let index = 0; index < blocks.length; index++) {
       
 11605     const block = blocks[index];
       
 11606     const canInsertBlock = yield external_wp_data_["controls"].select(STORE_NAME, 'canInsertBlockType', block.name, rootClientId);
       
 11607 
       
 11608     if (!canInsertBlock) {
       
 11609       return;
       
 11610     }
       
 11611   }
       
 11612 
       
 11613   yield {
       
 11614     type: 'REPLACE_BLOCKS',
       
 11615     clientIds,
       
 11616     blocks,
       
 11617     time: Date.now(),
       
 11618     indexToSelect,
       
 11619     initialPosition,
       
 11620     meta
       
 11621   };
       
 11622   yield* ensureDefaultBlock();
       
 11623 }
       
 11624 /**
       
 11625  * Returns an action object signalling that a single block should be replaced
       
 11626  * with one or more replacement blocks.
       
 11627  *
       
 11628  * @param {(string|string[])} clientId Block client ID to replace.
       
 11629  * @param {(Object|Object[])} block    Replacement block(s).
       
 11630  *
       
 11631  * @return {Object} Action object.
       
 11632  */
       
 11633 
       
 11634 function actions_replaceBlock(clientId, block) {
       
 11635   return actions_replaceBlocks(clientId, block);
       
 11636 }
       
 11637 /**
       
 11638  * Higher-order action creator which, given the action type to dispatch creates
       
 11639  * an action creator for managing block movement.
       
 11640  *
       
 11641  * @param {string} type Action type to dispatch.
       
 11642  *
       
 11643  * @return {Function} Action creator.
       
 11644  */
       
 11645 
       
 11646 function createOnMove(type) {
       
 11647   return (clientIds, rootClientId) => {
       
 11648     return {
       
 11649       clientIds: Object(external_lodash_["castArray"])(clientIds),
       
 11650       type,
       
 11651       rootClientId
       
 11652     };
       
 11653   };
       
 11654 }
       
 11655 
       
 11656 const actions_moveBlocksDown = createOnMove('MOVE_BLOCKS_DOWN');
       
 11657 const actions_moveBlocksUp = createOnMove('MOVE_BLOCKS_UP');
       
 11658 /**
       
 11659  * Returns an action object signalling that the given blocks should be moved to
       
 11660  * a new position.
       
 11661  *
       
 11662  * @param  {?string} clientIds        The client IDs of the blocks.
       
 11663  * @param  {?string} fromRootClientId Root client ID source.
       
 11664  * @param  {?string} toRootClientId   Root client ID destination.
       
 11665  * @param  {number}  index            The index to move the blocks to.
       
 11666  *
       
 11667  * @yield {Object} Action object.
       
 11668  */
       
 11669 
       
 11670 function* actions_moveBlocksToPosition(clientIds, fromRootClientId = '', toRootClientId = '', index) {
       
 11671   const templateLock = yield external_wp_data_["controls"].select(STORE_NAME, 'getTemplateLock', fromRootClientId); // If locking is equal to all on the original clientId (fromRootClientId),
       
 11672   // it is not possible to move the block to any other position.
       
 11673 
       
 11674   if (templateLock === 'all') {
       
 11675     return;
       
 11676   }
       
 11677 
       
 11678   const action = {
       
 11679     type: 'MOVE_BLOCKS_TO_POSITION',
       
 11680     fromRootClientId,
       
 11681     toRootClientId,
       
 11682     clientIds,
       
 11683     index
       
 11684   }; // If moving inside the same root block the move is always possible.
       
 11685 
       
 11686   if (fromRootClientId === toRootClientId) {
       
 11687     yield action;
       
 11688     return;
       
 11689   } // If templateLock is insert we can not remove the block from the parent.
       
 11690   // Given that here we know that we are moving the block to a different
       
 11691   // parent, the move should not be possible if the condition is true.
       
 11692 
       
 11693 
       
 11694   if (templateLock === 'insert') {
       
 11695     return;
       
 11696   }
       
 11697 
       
 11698   const canInsertBlocks = yield external_wp_data_["controls"].select(STORE_NAME, 'canInsertBlocks', clientIds, toRootClientId); // If moving to other parent block, the move is possible if we can insert a block of the same type inside the new parent block.
       
 11699 
       
 11700   if (canInsertBlocks) {
       
 11701     yield action;
       
 11702   }
       
 11703 }
       
 11704 /**
       
 11705  * Returns an action object signalling that the given block should be moved to a
       
 11706  * new position.
       
 11707  *
       
 11708  * @param  {?string} clientId         The client ID of the block.
       
 11709  * @param  {?string} fromRootClientId Root client ID source.
       
 11710  * @param  {?string} toRootClientId   Root client ID destination.
       
 11711  * @param  {number}  index            The index to move the block to.
       
 11712  *
       
 11713  * @yield {Object} Action object.
       
 11714  */
       
 11715 
       
 11716 function* actions_moveBlockToPosition(clientId, fromRootClientId = '', toRootClientId = '', index) {
       
 11717   yield actions_moveBlocksToPosition([clientId], fromRootClientId, toRootClientId, index);
       
 11718 }
       
 11719 /**
       
 11720  * Returns an action object used in signalling that a single block should be
       
 11721  * inserted, optionally at a specific index respective a root block list.
       
 11722  *
       
 11723  * @param {Object}  block            Block object to insert.
       
 11724  * @param {?number} index            Index at which block should be inserted.
       
 11725  * @param {?string} rootClientId     Optional root client ID of block list on which to insert.
       
 11726  * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.
       
 11727  * @param {?Object} meta             Optional Meta values to be passed to the action object.
       
 11728  *
       
 11729  * @return {Object} Action object.
       
 11730  */
       
 11731 
       
 11732 function actions_insertBlock(block, index, rootClientId, updateSelection = true, meta) {
       
 11733   return actions_insertBlocks([block], index, rootClientId, updateSelection, 0, meta);
       
 11734 }
       
 11735 /**
       
 11736  * Returns an action object used in signalling that an array of blocks should
       
 11737  * be inserted, optionally at a specific index respective a root block list.
       
 11738  *
       
 11739  * @param {Object[]}  blocks          Block objects to insert.
       
 11740  * @param {?number}   index           Index at which block should be inserted.
       
 11741  * @param {?string}   rootClientId    Optional root client ID of block list on which to insert.
       
 11742  * @param {?boolean}  updateSelection If true block selection will be updated.  If false, block selection will not change. Defaults to true.
       
 11743  * @param {0|-1|null} initialPosition Initial focus position. Setting it to null prevent focusing the inserted block.
       
 11744  * @param {?Object}   meta            Optional Meta values to be passed to the action object.
       
 11745  * @return {Object} Action object.
       
 11746  */
       
 11747 
       
 11748 function* actions_insertBlocks(blocks, index, rootClientId, updateSelection = true, initialPosition = 0, meta) {
       
 11749   if (Object(external_lodash_["isObject"])(initialPosition)) {
       
 11750     meta = initialPosition;
       
 11751     initialPosition = 0;
       
 11752     external_wp_deprecated_default()("meta argument in wp.data.dispatch('core/block-editor')", {
       
 11753       since: '10.1',
       
 11754       plugin: 'Gutenberg',
       
 11755       hint: 'The meta argument is now the 6th argument of the function'
       
 11756     });
       
 11757   }
       
 11758 
       
 11759   blocks = getBlocksWithDefaultStylesApplied(Object(external_lodash_["castArray"])(blocks), yield external_wp_data_["controls"].select(STORE_NAME, 'getSettings'));
       
 11760   const allowedBlocks = [];
       
 11761 
       
 11762   for (const block of blocks) {
       
 11763     const isValid = yield external_wp_data_["controls"].select(STORE_NAME, 'canInsertBlockType', block.name, rootClientId);
       
 11764 
       
 11765     if (isValid) {
       
 11766       allowedBlocks.push(block);
       
 11767     }
       
 11768   }
       
 11769 
       
 11770   if (allowedBlocks.length) {
       
 11771     return {
       
 11772       type: 'INSERT_BLOCKS',
       
 11773       blocks: allowedBlocks,
       
 11774       index,
       
 11775       rootClientId,
       
 11776       time: Date.now(),
       
 11777       updateSelection,
       
 11778       initialPosition: updateSelection ? initialPosition : null,
       
 11779       meta
       
 11780     };
       
 11781   }
       
 11782 }
       
 11783 /**
       
 11784  * Returns an action object used in signalling that the insertion point should
       
 11785  * be shown.
       
 11786  *
       
 11787  * @param {?string} rootClientId Optional root client ID of block list on
       
 11788  *                               which to insert.
       
 11789  * @param {?number} index        Index at which block should be inserted.
       
 11790  * @param {Object}  __unstableOptions Wether or not to show an inserter button.
       
 11791  *
       
 11792  * @return {Object} Action object.
       
 11793  */
       
 11794 
       
 11795 function actions_showInsertionPoint(rootClientId, index, __unstableOptions = {}) {
       
 11796   const {
       
 11797     __unstableWithInserter
       
 11798   } = __unstableOptions;
       
 11799   return {
       
 11800     type: 'SHOW_INSERTION_POINT',
       
 11801     rootClientId,
       
 11802     index,
       
 11803     __unstableWithInserter
       
 11804   };
       
 11805 }
       
 11806 /**
       
 11807  * Returns an action object hiding the insertion point.
       
 11808  *
       
 11809  * @return {Object} Action object.
       
 11810  */
       
 11811 
       
 11812 function actions_hideInsertionPoint() {
       
 11813   return {
       
 11814     type: 'HIDE_INSERTION_POINT'
       
 11815   };
       
 11816 }
       
 11817 /**
       
 11818  * Returns an action object resetting the template validity.
       
 11819  *
       
 11820  * @param {boolean}  isValid  template validity flag.
       
 11821  *
       
 11822  * @return {Object} Action object.
       
 11823  */
       
 11824 
       
 11825 function setTemplateValidity(isValid) {
       
 11826   return {
       
 11827     type: 'SET_TEMPLATE_VALIDITY',
       
 11828     isValid
       
 11829   };
       
 11830 }
       
 11831 /**
       
 11832  * Returns an action object synchronize the template with the list of blocks
       
 11833  *
       
 11834  * @return {Object} Action object.
       
 11835  */
       
 11836 
       
 11837 function* synchronizeTemplate() {
       
 11838   yield {
       
 11839     type: 'SYNCHRONIZE_TEMPLATE'
       
 11840   };
       
 11841   const blocks = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlocks');
       
 11842   const template = yield external_wp_data_["controls"].select(STORE_NAME, 'getTemplate');
       
 11843   const updatedBlockList = Object(external_wp_blocks_["synchronizeBlocksWithTemplate"])(blocks, template);
       
 11844   return yield actions_resetBlocks(updatedBlockList);
       
 11845 }
       
 11846 /**
       
 11847  * Returns an action object used in signalling that two blocks should be merged
       
 11848  *
       
 11849  * @param {string} firstBlockClientId  Client ID of the first block to merge.
       
 11850  * @param {string} secondBlockClientId Client ID of the second block to merge.
       
 11851  */
       
 11852 
       
 11853 function* actions_mergeBlocks(firstBlockClientId, secondBlockClientId) {
       
 11854   const blocks = [firstBlockClientId, secondBlockClientId];
       
 11855   yield {
       
 11856     type: 'MERGE_BLOCKS',
       
 11857     blocks
       
 11858   };
       
 11859   const [clientIdA, clientIdB] = blocks;
       
 11860   const blockA = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlock', clientIdA);
       
 11861   const blockAType = Object(external_wp_blocks_["getBlockType"])(blockA.name); // Only focus the previous block if it's not mergeable
       
 11862 
       
 11863   if (!blockAType.merge) {
       
 11864     yield actions_selectBlock(blockA.clientId);
       
 11865     return;
       
 11866   }
       
 11867 
       
 11868   const blockB = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlock', clientIdB);
       
 11869   const blockBType = Object(external_wp_blocks_["getBlockType"])(blockB.name);
       
 11870   const {
       
 11871     clientId,
       
 11872     attributeKey,
       
 11873     offset
       
 11874   } = yield external_wp_data_["controls"].select(STORE_NAME, 'getSelectionStart');
       
 11875   const selectedBlockType = clientId === clientIdA ? blockAType : blockBType;
       
 11876   const attributeDefinition = selectedBlockType.attributes[attributeKey];
       
 11877   const canRestoreTextSelection = (clientId === clientIdA || clientId === clientIdB) && attributeKey !== undefined && offset !== undefined && // We cannot restore text selection if the RichText identifier
       
 11878   // is not a defined block attribute key. This can be the case if the
       
 11879   // fallback intance ID is used to store selection (and no RichText
       
 11880   // identifier is set), or when the identifier is wrong.
       
 11881   !!attributeDefinition;
       
 11882 
       
 11883   if (!attributeDefinition) {
       
 11884     if (typeof attributeKey === 'number') {
       
 11885       window.console.error(`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${typeof attributeKey}`);
       
 11886     } else {
       
 11887       window.console.error('The RichText identifier prop does not match any attributes defined by the block.');
       
 11888     }
       
 11889   } // A robust way to retain selection position through various transforms
       
 11890   // is to insert a special character at the position and then recover it.
       
 11891 
       
 11892 
       
 11893   const START_OF_SELECTED_AREA = '\u0086'; // Clone the blocks so we don't insert the character in a "live" block.
       
 11894 
       
 11895   const cloneA = Object(external_wp_blocks_["cloneBlock"])(blockA);
       
 11896   const cloneB = Object(external_wp_blocks_["cloneBlock"])(blockB);
       
 11897 
       
 11898   if (canRestoreTextSelection) {
       
 11899     const selectedBlock = clientId === clientIdA ? cloneA : cloneB;
       
 11900     const html = selectedBlock.attributes[attributeKey];
       
 11901     const {
       
 11902       multiline: multilineTag,
       
 11903       __unstableMultilineWrapperTags: multilineWrapperTags,
       
 11904       __unstablePreserveWhiteSpace: preserveWhiteSpace
       
 11905     } = attributeDefinition;
       
 11906     const value = Object(external_wp_richText_["insert"])(Object(external_wp_richText_["create"])({
       
 11907       html,
       
 11908       multilineTag,
       
 11909       multilineWrapperTags,
       
 11910       preserveWhiteSpace
       
 11911     }), START_OF_SELECTED_AREA, offset, offset);
       
 11912     selectedBlock.attributes[attributeKey] = Object(external_wp_richText_["toHTMLString"])({
       
 11913       value,
       
 11914       multilineTag,
       
 11915       preserveWhiteSpace
       
 11916     });
       
 11917   } // We can only merge blocks with similar types
       
 11918   // thus, we transform the block to merge first
       
 11919 
       
 11920 
       
 11921   const blocksWithTheSameType = blockA.name === blockB.name ? [cloneB] : Object(external_wp_blocks_["switchToBlockType"])(cloneB, blockA.name); // If the block types can not match, do nothing
       
 11922 
       
 11923   if (!blocksWithTheSameType || !blocksWithTheSameType.length) {
       
 11924     return;
       
 11925   } // Calling the merge to update the attributes and remove the block to be merged
       
 11926 
       
 11927 
       
 11928   const updatedAttributes = blockAType.merge(cloneA.attributes, blocksWithTheSameType[0].attributes);
       
 11929 
       
 11930   if (canRestoreTextSelection) {
       
 11931     const newAttributeKey = Object(external_lodash_["findKey"])(updatedAttributes, v => typeof v === 'string' && v.indexOf(START_OF_SELECTED_AREA) !== -1);
       
 11932     const convertedHtml = updatedAttributes[newAttributeKey];
       
 11933     const {
       
 11934       multiline: multilineTag,
       
 11935       __unstableMultilineWrapperTags: multilineWrapperTags,
       
 11936       __unstablePreserveWhiteSpace: preserveWhiteSpace
       
 11937     } = blockAType.attributes[newAttributeKey];
       
 11938     const convertedValue = Object(external_wp_richText_["create"])({
       
 11939       html: convertedHtml,
       
 11940       multilineTag,
       
 11941       multilineWrapperTags,
       
 11942       preserveWhiteSpace
       
 11943     });
       
 11944     const newOffset = convertedValue.text.indexOf(START_OF_SELECTED_AREA);
       
 11945     const newValue = Object(external_wp_richText_["remove"])(convertedValue, newOffset, newOffset + 1);
       
 11946     const newHtml = Object(external_wp_richText_["toHTMLString"])({
       
 11947       value: newValue,
       
 11948       multilineTag,
       
 11949       preserveWhiteSpace
       
 11950     });
       
 11951     updatedAttributes[newAttributeKey] = newHtml;
       
 11952     yield actions_selectionChange(blockA.clientId, newAttributeKey, newOffset, newOffset);
       
 11953   }
       
 11954 
       
 11955   yield* actions_replaceBlocks([blockA.clientId, blockB.clientId], [{ ...blockA,
       
 11956     attributes: { ...blockA.attributes,
       
 11957       ...updatedAttributes
       
 11958     }
       
 11959   }, ...blocksWithTheSameType.slice(1)]);
       
 11960 }
       
 11961 /**
       
 11962  * Yields action objects used in signalling that the blocks corresponding to
       
 11963  * the set of specified client IDs are to be removed.
       
 11964  *
       
 11965  * @param {string|string[]} clientIds      Client IDs of blocks to remove.
       
 11966  * @param {boolean}         selectPrevious True if the previous block should be
       
 11967  *                                         selected when a block is removed.
       
 11968  */
       
 11969 
       
 11970 function* actions_removeBlocks(clientIds, selectPrevious = true) {
       
 11971   if (!clientIds || !clientIds.length) {
       
 11972     return;
       
 11973   }
       
 11974 
       
 11975   clientIds = Object(external_lodash_["castArray"])(clientIds);
       
 11976   const rootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', clientIds[0]);
       
 11977   const isLocked = yield external_wp_data_["controls"].select(STORE_NAME, 'getTemplateLock', rootClientId);
       
 11978 
       
 11979   if (isLocked) {
       
 11980     return;
       
 11981   }
       
 11982 
       
 11983   let previousBlockId;
       
 11984 
       
 11985   if (selectPrevious) {
       
 11986     previousBlockId = yield selectPreviousBlock(clientIds[0]);
       
 11987   } else {
       
 11988     previousBlockId = yield external_wp_data_["controls"].select(STORE_NAME, 'getPreviousBlockClientId', clientIds[0]);
       
 11989   }
       
 11990 
       
 11991   yield {
       
 11992     type: 'REMOVE_BLOCKS',
       
 11993     clientIds
       
 11994   }; // To avoid a focus loss when removing the last block, assure there is
       
 11995   // always a default block if the last of the blocks have been removed.
       
 11996 
       
 11997   const defaultBlockId = yield* ensureDefaultBlock();
       
 11998   return [previousBlockId || defaultBlockId];
       
 11999 }
       
 12000 /**
       
 12001  * Returns an action object used in signalling that the block with the
       
 12002  * specified client ID is to be removed.
       
 12003  *
       
 12004  * @param {string}  clientId       Client ID of block to remove.
       
 12005  * @param {boolean} selectPrevious True if the previous block should be
       
 12006  *                                 selected when a block is removed.
       
 12007  *
       
 12008  * @return {Object} Action object.
       
 12009  */
       
 12010 
       
 12011 function actions_removeBlock(clientId, selectPrevious) {
       
 12012   return actions_removeBlocks([clientId], selectPrevious);
       
 12013 }
       
 12014 /**
       
 12015  * Returns an action object used in signalling that the inner blocks with the
       
 12016  * specified client ID should be replaced.
       
 12017  *
       
 12018  * @param {string}    rootClientId    Client ID of the block whose InnerBlocks will re replaced.
       
 12019  * @param {Object[]}  blocks          Block objects to insert as new InnerBlocks
       
 12020  * @param {?boolean}  updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to false.
       
 12021  * @param {0|-1|null} initialPosition Initial block position.
       
 12022  * @return {Object} Action object.
       
 12023  */
       
 12024 
       
 12025 function actions_replaceInnerBlocks(rootClientId, blocks, updateSelection = false, initialPosition = 0) {
       
 12026   return {
       
 12027     type: 'REPLACE_INNER_BLOCKS',
       
 12028     rootClientId,
       
 12029     blocks,
       
 12030     updateSelection,
       
 12031     initialPosition: updateSelection ? initialPosition : null,
       
 12032     time: Date.now()
       
 12033   };
       
 12034 }
       
 12035 /**
       
 12036  * Returns an action object used to toggle the block editing mode between
       
 12037  * visual and HTML modes.
       
 12038  *
       
 12039  * @param {string} clientId Block client ID.
       
 12040  *
       
 12041  * @return {Object} Action object.
       
 12042  */
       
 12043 
       
 12044 function toggleBlockMode(clientId) {
       
 12045   return {
       
 12046     type: 'TOGGLE_BLOCK_MODE',
       
 12047     clientId
       
 12048   };
       
 12049 }
       
 12050 /**
       
 12051  * Returns an action object used in signalling that the user has begun to type.
       
 12052  *
       
 12053  * @return {Object} Action object.
       
 12054  */
       
 12055 
       
 12056 function actions_startTyping() {
       
 12057   return {
       
 12058     type: 'START_TYPING'
       
 12059   };
       
 12060 }
       
 12061 /**
       
 12062  * Returns an action object used in signalling that the user has stopped typing.
       
 12063  *
       
 12064  * @return {Object} Action object.
       
 12065  */
       
 12066 
       
 12067 function actions_stopTyping() {
       
 12068   return {
       
 12069     type: 'STOP_TYPING'
       
 12070   };
       
 12071 }
       
 12072 /**
       
 12073  * Returns an action object used in signalling that the user has begun to drag blocks.
       
 12074  *
       
 12075  * @param {string[]} clientIds An array of client ids being dragged
       
 12076  *
       
 12077  * @return {Object} Action object.
       
 12078  */
       
 12079 
       
 12080 function actions_startDraggingBlocks(clientIds = []) {
       
 12081   return {
       
 12082     type: 'START_DRAGGING_BLOCKS',
       
 12083     clientIds
       
 12084   };
       
 12085 }
       
 12086 /**
       
 12087  * Returns an action object used in signalling that the user has stopped dragging blocks.
       
 12088  *
       
 12089  * @return {Object} Action object.
       
 12090  */
       
 12091 
       
 12092 function actions_stopDraggingBlocks() {
       
 12093   return {
       
 12094     type: 'STOP_DRAGGING_BLOCKS'
       
 12095   };
       
 12096 }
       
 12097 /**
       
 12098  * Returns an action object used in signalling that the caret has entered formatted text.
       
 12099  *
       
 12100  * @return {Object} Action object.
       
 12101  */
       
 12102 
       
 12103 function actions_enterFormattedText() {
       
 12104   return {
       
 12105     type: 'ENTER_FORMATTED_TEXT'
       
 12106   };
       
 12107 }
       
 12108 /**
       
 12109  * Returns an action object used in signalling that the user caret has exited formatted text.
       
 12110  *
       
 12111  * @return {Object} Action object.
       
 12112  */
       
 12113 
       
 12114 function actions_exitFormattedText() {
       
 12115   return {
       
 12116     type: 'EXIT_FORMATTED_TEXT'
       
 12117   };
       
 12118 }
       
 12119 /**
       
 12120  * Returns an action object used in signalling that the user caret has changed
       
 12121  * position.
       
 12122  *
       
 12123  * @param {string} clientId     The selected block client ID.
       
 12124  * @param {string} attributeKey The selected block attribute key.
       
 12125  * @param {number} startOffset  The start offset.
       
 12126  * @param {number} endOffset    The end offset.
       
 12127  *
       
 12128  * @return {Object} Action object.
       
 12129  */
       
 12130 
       
 12131 function actions_selectionChange(clientId, attributeKey, startOffset, endOffset) {
       
 12132   return {
       
 12133     type: 'SELECTION_CHANGE',
       
 12134     clientId,
       
 12135     attributeKey,
       
 12136     startOffset,
       
 12137     endOffset
       
 12138   };
       
 12139 }
       
 12140 /**
       
 12141  * Returns an action object used in signalling that a new block of the default
       
 12142  * type should be added to the block list.
       
 12143  *
       
 12144  * @param {?Object} attributes   Optional attributes of the block to assign.
       
 12145  * @param {?string} rootClientId Optional root client ID of block list on which
       
 12146  *                               to append.
       
 12147  * @param {?number} index        Optional index where to insert the default block
       
 12148  *
       
 12149  * @return {Object} Action object
       
 12150  */
       
 12151 
       
 12152 function actions_insertDefaultBlock(attributes, rootClientId, index) {
       
 12153   // Abort if there is no default block type (if it has been unregistered).
       
 12154   const defaultBlockName = Object(external_wp_blocks_["getDefaultBlockName"])();
       
 12155 
       
 12156   if (!defaultBlockName) {
       
 12157     return;
       
 12158   }
       
 12159 
       
 12160   const block = Object(external_wp_blocks_["createBlock"])(defaultBlockName, attributes);
       
 12161   return actions_insertBlock(block, index, rootClientId);
       
 12162 }
       
 12163 /**
       
 12164  * Returns an action object that changes the nested settings of a given block.
       
 12165  *
       
 12166  * @param {string} clientId Client ID of the block whose nested setting are
       
 12167  *                          being received.
       
 12168  * @param {Object} settings Object with the new settings for the nested block.
       
 12169  *
       
 12170  * @return {Object} Action object
       
 12171  */
       
 12172 
       
 12173 function actions_updateBlockListSettings(clientId, settings) {
       
 12174   return {
       
 12175     type: 'UPDATE_BLOCK_LIST_SETTINGS',
       
 12176     clientId,
       
 12177     settings
       
 12178   };
       
 12179 }
       
 12180 /**
       
 12181  * Returns an action object used in signalling that the block editor settings have been updated.
       
 12182  *
       
 12183  * @param {Object} settings Updated settings
       
 12184  *
       
 12185  * @return {Object} Action object
       
 12186  */
       
 12187 
       
 12188 function actions_updateSettings(settings) {
       
 12189   return {
       
 12190     type: 'UPDATE_SETTINGS',
       
 12191     settings
       
 12192   };
       
 12193 }
       
 12194 /**
       
 12195  * Returns an action object used in signalling that a temporary reusable blocks have been saved
       
 12196  * in order to switch its temporary id with the real id.
       
 12197  *
       
 12198  * @param {string} id        Reusable block's id.
       
 12199  * @param {string} updatedId Updated block's id.
       
 12200  *
       
 12201  * @return {Object} Action object.
       
 12202  */
       
 12203 
       
 12204 function __unstableSaveReusableBlock(id, updatedId) {
       
 12205   return {
       
 12206     type: 'SAVE_REUSABLE_BLOCK_SUCCESS',
       
 12207     id,
       
 12208     updatedId
       
 12209   };
       
 12210 }
       
 12211 /**
       
 12212  * Returns an action object used in signalling that the last block change should be marked explicitly as persistent.
       
 12213  *
       
 12214  * @return {Object} Action object.
       
 12215  */
       
 12216 
       
 12217 function actions_unstableMarkLastChangeAsPersistent() {
       
 12218   return {
       
 12219     type: 'MARK_LAST_CHANGE_AS_PERSISTENT'
       
 12220   };
       
 12221 }
       
 12222 /**
       
 12223  * Returns an action object used in signalling that the next block change should be marked explicitly as not persistent.
       
 12224  *
       
 12225  * @return {Object} Action object.
       
 12226  */
       
 12227 
       
 12228 function actions_unstableMarkNextChangeAsNotPersistent() {
       
 12229   return {
       
 12230     type: 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT'
       
 12231   };
       
 12232 }
       
 12233 /**
       
 12234  * Returns an action object used in signalling that the last block change is
       
 12235  * an automatic change, meaning it was not performed by the user, and can be
       
 12236  * undone using the `Escape` and `Backspace` keys. This action must be called
       
 12237  * after the change was made, and any actions that are a consequence of it, so
       
 12238  * it is recommended to be called at the next idle period to ensure all
       
 12239  * selection changes have been recorded.
       
 12240  */
       
 12241 
       
 12242 function* actions_unstableMarkAutomaticChange() {
       
 12243   yield {
       
 12244     type: 'MARK_AUTOMATIC_CHANGE'
       
 12245   };
       
 12246   yield __unstableMarkAutomaticChangeFinalControl();
       
 12247 }
       
 12248 function __unstableMarkAutomaticChangeFinal() {
       
 12249   return {
       
 12250     type: 'MARK_AUTOMATIC_CHANGE_FINAL'
       
 12251   };
       
 12252 }
       
 12253 /**
       
 12254  * Generators that triggers an action used to enable or disable the navigation mode.
       
 12255  *
       
 12256  * @param {string} isNavigationMode Enable/Disable navigation mode.
       
 12257  */
       
 12258 
       
 12259 function* actions_setNavigationMode(isNavigationMode = true) {
       
 12260   yield {
       
 12261     type: 'SET_NAVIGATION_MODE',
       
 12262     isNavigationMode
       
 12263   };
       
 12264 
       
 12265   if (isNavigationMode) {
       
 12266     Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.'));
       
 12267   } else {
       
 12268     Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('You are currently in edit mode. To return to the navigation mode, press Escape.'));
       
 12269   }
       
 12270 }
       
 12271 /**
       
 12272  * Generator that triggers an action used to enable or disable the block moving mode.
       
 12273  *
       
 12274  * @param {string|null} hasBlockMovingClientId Enable/Disable block moving mode.
       
 12275  */
       
 12276 
       
 12277 function* actions_setBlockMovingClientId(hasBlockMovingClientId = null) {
       
 12278   yield {
       
 12279     type: 'SET_BLOCK_MOVING_MODE',
       
 12280     hasBlockMovingClientId
       
 12281   };
       
 12282 
       
 12283   if (hasBlockMovingClientId) {
       
 12284     Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block.'));
       
 12285   }
       
 12286 }
       
 12287 /**
       
 12288  * Generator that triggers an action used to duplicate a list of blocks.
       
 12289  *
       
 12290  * @param {string[]} clientIds
       
 12291  * @param {boolean} updateSelection
       
 12292  */
       
 12293 
       
 12294 function* actions_duplicateBlocks(clientIds, updateSelection = true) {
       
 12295   if (!clientIds && !clientIds.length) {
       
 12296     return;
       
 12297   }
       
 12298 
       
 12299   const blocks = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlocksByClientId', clientIds);
       
 12300   const rootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', clientIds[0]); // Return early if blocks don't exist.
       
 12301 
       
 12302   if (Object(external_lodash_["some"])(blocks, block => !block)) {
       
 12303     return;
       
 12304   }
       
 12305 
       
 12306   const blockNames = blocks.map(block => block.name); // Return early if blocks don't support multiple usage.
       
 12307 
       
 12308   if (Object(external_lodash_["some"])(blockNames, blockName => !Object(external_wp_blocks_["hasBlockSupport"])(blockName, 'multiple', true))) {
       
 12309     return;
       
 12310   }
       
 12311 
       
 12312   const lastSelectedIndex = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockIndex', Object(external_lodash_["last"])(Object(external_lodash_["castArray"])(clientIds)), rootClientId);
       
 12313   const clonedBlocks = blocks.map(block => Object(external_wp_blocks_["__experimentalCloneSanitizedBlock"])(block));
       
 12314   yield actions_insertBlocks(clonedBlocks, lastSelectedIndex + 1, rootClientId, updateSelection);
       
 12315 
       
 12316   if (clonedBlocks.length > 1 && updateSelection) {
       
 12317     yield actions_multiSelect(Object(external_lodash_["first"])(clonedBlocks).clientId, Object(external_lodash_["last"])(clonedBlocks).clientId);
       
 12318   }
       
 12319 
       
 12320   return clonedBlocks.map(block => block.clientId);
       
 12321 }
       
 12322 /**
       
 12323  * Generator used to insert an empty block after a given block.
       
 12324  *
       
 12325  * @param {string} clientId
       
 12326  */
       
 12327 
       
 12328 function* actions_insertBeforeBlock(clientId) {
       
 12329   if (!clientId) {
       
 12330     return;
       
 12331   }
       
 12332 
       
 12333   const rootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', clientId);
       
 12334   const isLocked = yield external_wp_data_["controls"].select(STORE_NAME, 'getTemplateLock', rootClientId);
       
 12335 
       
 12336   if (isLocked) {
       
 12337     return;
       
 12338   }
       
 12339 
       
 12340   const firstSelectedIndex = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockIndex', clientId, rootClientId);
       
 12341   return yield actions_insertDefaultBlock({}, rootClientId, firstSelectedIndex);
       
 12342 }
       
 12343 /**
       
 12344  * Generator used to insert an empty block before a given block.
       
 12345  *
       
 12346  * @param {string} clientId
       
 12347  */
       
 12348 
       
 12349 function* actions_insertAfterBlock(clientId) {
       
 12350   if (!clientId) {
       
 12351     return;
       
 12352   }
       
 12353 
       
 12354   const rootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', clientId);
       
 12355   const isLocked = yield external_wp_data_["controls"].select(STORE_NAME, 'getTemplateLock', rootClientId);
       
 12356 
       
 12357   if (isLocked) {
       
 12358     return;
       
 12359   }
       
 12360 
       
 12361   const firstSelectedIndex = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockIndex', clientId, rootClientId);
       
 12362   return yield actions_insertDefaultBlock({}, rootClientId, firstSelectedIndex + 1);
       
 12363 }
       
 12364 /**
       
 12365  * Returns an action object that toggles the highlighted block state.
       
 12366  *
       
 12367  * @param {string} clientId The block's clientId.
       
 12368  * @param {boolean} isHighlighted The highlight state.
       
 12369  */
       
 12370 
       
 12371 function actions_toggleBlockHighlight(clientId, isHighlighted) {
       
 12372   return {
       
 12373     type: 'TOGGLE_BLOCK_HIGHLIGHT',
       
 12374     clientId,
       
 12375     isHighlighted
       
 12376   };
       
 12377 }
       
 12378 /**
       
 12379  * Yields action objects used in signalling that the block corresponding to the
       
 12380  * given clientId should appear to "flash" by rhythmically highlighting it.
       
 12381  *
       
 12382  * @param {string} clientId Target block client ID.
       
 12383  */
       
 12384 
       
 12385 function* actions_flashBlock(clientId) {
       
 12386   yield actions_toggleBlockHighlight(clientId, true);
       
 12387   yield {
       
 12388     type: 'SLEEP',
       
 12389     duration: 150
       
 12390   };
       
 12391   yield actions_toggleBlockHighlight(clientId, false);
       
 12392 }
       
 12393 /**
       
 12394  * Returns an action object that sets whether the block has controlled innerblocks.
       
 12395  *
       
 12396  * @param {string} clientId The block's clientId.
       
 12397  * @param {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled.
       
 12398  */
       
 12399 
       
 12400 function actions_setHasControlledInnerBlocks(clientId, hasControlledInnerBlocks) {
       
 12401   return {
       
 12402     type: 'SET_HAS_CONTROLLED_INNER_BLOCKS',
       
 12403     hasControlledInnerBlocks,
       
 12404     clientId
       
 12405   };
       
 12406 }
       
 12407 
       
 12408 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/index.js
       
 12409 /**
       
 12410  * WordPress dependencies
       
 12411  */
       
 12412 
       
 12413 /**
       
 12414  * Internal dependencies
       
 12415  */
       
 12416 
       
 12417 
       
 12418 
       
 12419 
       
 12420 
       
 12421 
       
 12422 /**
       
 12423  * Block editor data store configuration.
       
 12424  *
       
 12425  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore
       
 12426  *
       
 12427  * @type {Object}
       
 12428  */
       
 12429 
       
 12430 const storeConfig = {
       
 12431   reducer: store_reducer,
       
 12432   selectors: selectors_namespaceObject,
       
 12433   actions: actions_namespaceObject,
       
 12434   controls: store_controls
       
 12435 };
       
 12436 /**
       
 12437  * Store definition for the block editor namespace.
       
 12438  *
       
 12439  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
       
 12440  *
       
 12441  * @type {Object}
       
 12442  */
       
 12443 
       
 12444 const store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, { ...storeConfig,
       
 12445   persist: ['preferences']
       
 12446 }); // Ideally we'd use register instead of register stores.
       
 12447 
       
 12448 Object(external_wp_data_["registerStore"])(STORE_NAME, { ...storeConfig,
       
 12449   persist: ['preferences']
       
 12450 });
 12043 
 12451 
 12044 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-display-block-controls/index.js
 12452 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-display-block-controls/index.js
 12045 /**
 12453 /**
 12046  * WordPress dependencies
 12454  * WordPress dependencies
 12047  */
 12455  */
 12049 /**
 12457 /**
 12050  * Internal dependencies
 12458  * Internal dependencies
 12051  */
 12459  */
 12052 
 12460 
 12053 
 12461 
       
 12462 
 12054 function useDisplayBlockControls() {
 12463 function useDisplayBlockControls() {
 12055   var _useBlockEditContext = useBlockEditContext(),
 12464   const {
 12056       isSelected = _useBlockEditContext.isSelected,
 12465     isSelected,
 12057       clientId = _useBlockEditContext.clientId,
 12466     clientId,
 12058       name = _useBlockEditContext.name;
 12467     name
 12059 
 12468   } = useBlockEditContext();
 12060   var isFirstAndSameTypeMultiSelected = Object(external_this_wp_data_["useSelect"])(function (select) {
 12469   const isFirstAndSameTypeMultiSelected = Object(external_wp_data_["useSelect"])(select => {
 12061     // Don't bother checking, see OR statement below.
 12470     // Don't bother checking, see OR statement below.
 12062     if (isSelected) {
 12471     if (isSelected) {
 12063       return;
 12472       return;
 12064     }
 12473     }
 12065 
 12474 
 12066     var _select = select('core/block-editor'),
 12475     const {
 12067         getBlockName = _select.getBlockName,
 12476       getBlockName,
 12068         isFirstMultiSelectedBlock = _select.isFirstMultiSelectedBlock,
 12477       isFirstMultiSelectedBlock,
 12069         getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds;
 12478       getMultiSelectedBlockClientIds
       
 12479     } = select(store);
 12070 
 12480 
 12071     if (!isFirstMultiSelectedBlock(clientId)) {
 12481     if (!isFirstMultiSelectedBlock(clientId)) {
 12072       return false;
 12482       return false;
 12073     }
 12483     }
 12074 
 12484 
 12075     return getMultiSelectedBlockClientIds().every(function (id) {
 12485     return getMultiSelectedBlockClientIds().every(id => getBlockName(id) === name);
 12076       return getBlockName(id) === name;
       
 12077     });
       
 12078   }, [clientId, isSelected, name]);
 12486   }, [clientId, isSelected, name]);
 12079   return isSelected || isFirstAndSameTypeMultiSelected;
 12487   return isSelected || isFirstAndSameTypeMultiSelected;
 12080 }
 12488 }
 12081 
 12489 
 12082 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-controls/index.js
 12490 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-controls/groups.js
 12083 
 12491 /**
       
 12492  * WordPress dependencies
       
 12493  */
       
 12494 
       
 12495 const BlockControlsDefault = Object(external_wp_components_["createSlotFill"])('BlockControls');
       
 12496 const BlockControlsBlock = Object(external_wp_components_["createSlotFill"])('BlockControlsBlock');
       
 12497 const BlockControlsInline = Object(external_wp_components_["createSlotFill"])('BlockFormatControls');
       
 12498 const BlockControlsOther = Object(external_wp_components_["createSlotFill"])('BlockControlsOther');
       
 12499 const groups = {
       
 12500   default: BlockControlsDefault,
       
 12501   block: BlockControlsBlock,
       
 12502   inline: BlockControlsInline,
       
 12503   other: BlockControlsOther
       
 12504 };
       
 12505 /* harmony default export */ var block_controls_groups = (groups);
       
 12506 
       
 12507 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-controls/fill.js
 12084 
 12508 
 12085 
 12509 
 12086 /**
 12510 /**
 12087  * External dependencies
 12511  * External dependencies
 12088  */
 12512  */
 12090 /**
 12514 /**
 12091  * WordPress dependencies
 12515  * WordPress dependencies
 12092  */
 12516  */
 12093 
 12517 
 12094 
 12518 
 12095 
       
 12096 /**
 12519 /**
 12097  * Internal dependencies
 12520  * Internal dependencies
 12098  */
 12521  */
 12099 
 12522 
 12100 
 12523 
 12101 
 12524 
 12102 var _createSlotFill = Object(external_this_wp_components_["createSlotFill"])('BlockControls'),
 12525 function BlockControlsFill({
 12103     Fill = _createSlotFill.Fill,
 12526   group = 'default',
 12104     Slot = _createSlotFill.Slot;
 12527   controls,
 12105 
 12528   children
 12106 function BlockControlsSlot(props) {
 12529 }) {
 12107   var accessibleToolbarState = Object(external_this_wp_element_["useContext"])(external_this_wp_components_["__experimentalToolbarContext"]);
       
 12108   return Object(external_this_wp_element_["createElement"])(Slot, Object(esm_extends["a" /* default */])({}, props, {
       
 12109     fillProps: accessibleToolbarState
       
 12110   }));
       
 12111 }
       
 12112 
       
 12113 function BlockControlsFill(_ref) {
       
 12114   var controls = _ref.controls,
       
 12115       children = _ref.children;
       
 12116 
       
 12117   if (!useDisplayBlockControls()) {
 12530   if (!useDisplayBlockControls()) {
 12118     return null;
 12531     return null;
 12119   }
 12532   }
 12120 
 12533 
 12121   return Object(external_this_wp_element_["createElement"])(Fill, null, function (fillProps) {
 12534   const Fill = block_controls_groups[group].Fill;
       
 12535   return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalStyleProvider"], {
       
 12536     document: document
       
 12537   }, Object(external_wp_element_["createElement"])(Fill, null, fillProps => {
 12122     // Children passed to BlockControlsFill will not have access to any
 12538     // Children passed to BlockControlsFill will not have access to any
 12123     // React Context whose Provider is part of the BlockControlsSlot tree.
 12539     // React Context whose Provider is part of the BlockControlsSlot tree.
 12124     // So we re-create the Provider in this subtree.
 12540     // So we re-create the Provider in this subtree.
 12125     var value = !Object(external_this_lodash_["isEmpty"])(fillProps) ? fillProps : null;
 12541     const value = !Object(external_lodash_["isEmpty"])(fillProps) ? fillProps : null;
 12126     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalToolbarContext"].Provider, {
 12542     return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToolbarContext"].Provider, {
 12127       value: value
 12543       value: value
 12128     }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
 12544     }, group === 'default' && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
 12129       controls: controls
 12545       controls: controls
 12130     }), children);
 12546     }), children);
 12131   });
 12547   }));
 12132 }
 12548 }
 12133 
 12549 
 12134 var BlockControls = BlockControlsFill;
 12550 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-controls/slot.js
 12135 BlockControls.Slot = BlockControlsSlot;
 12551 
       
 12552 
       
 12553 
       
 12554 /**
       
 12555  * WordPress dependencies
       
 12556  */
       
 12557 
       
 12558 
       
 12559 /**
       
 12560  * Internal dependencies
       
 12561  */
       
 12562 
       
 12563 
       
 12564 function BlockControlsSlot({
       
 12565   group = 'default',
       
 12566   ...props
       
 12567 }) {
       
 12568   const accessibleToolbarState = Object(external_wp_element_["useContext"])(external_wp_components_["__experimentalToolbarContext"]);
       
 12569   const Slot = block_controls_groups[group].Slot;
       
 12570   const slot = Object(external_wp_components_["__experimentalUseSlot"])(Slot.__unstableName);
       
 12571   const hasFills = Boolean(slot.fills && slot.fills.length);
       
 12572 
       
 12573   if (!hasFills) {
       
 12574     return null;
       
 12575   }
       
 12576 
       
 12577   if (group === 'default') {
       
 12578     return Object(external_wp_element_["createElement"])(Slot, Object(esm_extends["a" /* default */])({}, props, {
       
 12579       bubblesVirtually: true,
       
 12580       fillProps: accessibleToolbarState
       
 12581     }));
       
 12582   }
       
 12583 
       
 12584   return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(Slot, Object(esm_extends["a" /* default */])({}, props, {
       
 12585     bubblesVirtually: true,
       
 12586     fillProps: accessibleToolbarState
       
 12587   })));
       
 12588 }
       
 12589 
       
 12590 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-controls/index.js
       
 12591 
       
 12592 
       
 12593 
       
 12594 /**
       
 12595  * Internal dependencies
       
 12596  */
       
 12597 
       
 12598 
       
 12599 const BlockControls = BlockControlsFill;
       
 12600 BlockControls.Slot = BlockControlsSlot; // This is just here for backward compatibility
       
 12601 
       
 12602 const BlockFormatControls = props => {
       
 12603   return Object(external_wp_element_["createElement"])(BlockControlsFill, Object(esm_extends["a" /* default */])({
       
 12604     group: "inline"
       
 12605   }, props));
       
 12606 };
       
 12607 
       
 12608 BlockFormatControls.Slot = props => {
       
 12609   return Object(external_wp_element_["createElement"])(BlockControlsSlot, Object(esm_extends["a" /* default */])({
       
 12610     group: "inline"
       
 12611   }, props));
       
 12612 };
       
 12613 
 12136 /* harmony default export */ var block_controls = (BlockControls);
 12614 /* harmony default export */ var block_controls = (BlockControls);
 12137 
 12615 
 12138 // EXTERNAL MODULE: external {"this":["wp","i18n"]}
 12616 // EXTERNAL MODULE: external ["wp","primitives"]
 12139 var external_this_wp_i18n_ = __webpack_require__(1);
 12617 var external_wp_primitives_ = __webpack_require__("Tqx9");
 12140 
       
 12141 // EXTERNAL MODULE: external {"this":["wp","primitives"]}
       
 12142 var external_this_wp_primitives_ = __webpack_require__(6);
       
 12143 
 12618 
 12144 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-left.js
 12619 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-left.js
 12145 
 12620 
 12146 
 12621 
 12147 /**
 12622 /**
 12148  * WordPress dependencies
 12623  * WordPress dependencies
 12149  */
 12624  */
 12150 
 12625 
 12151 var positionLeft = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 12626 const positionLeft = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 12152   xmlns: "http://www.w3.org/2000/svg",
 12627   xmlns: "http://www.w3.org/2000/svg",
 12153   viewBox: "0 0 24 24"
 12628   viewBox: "0 0 24 24"
 12154 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 12629 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 12155   d: "M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"
 12630   d: "M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"
 12156 }));
 12631 }));
 12157 /* harmony default export */ var position_left = (positionLeft);
 12632 /* harmony default export */ var position_left = (positionLeft);
 12158 
 12633 
 12159 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-center.js
 12634 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-center.js
 12161 
 12636 
 12162 /**
 12637 /**
 12163  * WordPress dependencies
 12638  * WordPress dependencies
 12164  */
 12639  */
 12165 
 12640 
 12166 var positionCenter = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 12641 const positionCenter = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 12167   xmlns: "http://www.w3.org/2000/svg",
 12642   xmlns: "http://www.w3.org/2000/svg",
 12168   viewBox: "0 0 24 24"
 12643   viewBox: "0 0 24 24"
 12169 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 12644 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 12170   d: "M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"
 12645   d: "M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"
 12171 }));
 12646 }));
 12172 /* harmony default export */ var position_center = (positionCenter);
 12647 /* harmony default export */ var position_center = (positionCenter);
 12173 
 12648 
 12174 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-right.js
 12649 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-right.js
 12176 
 12651 
 12177 /**
 12652 /**
 12178  * WordPress dependencies
 12653  * WordPress dependencies
 12179  */
 12654  */
 12180 
 12655 
 12181 var positionRight = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 12656 const positionRight = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 12182   xmlns: "http://www.w3.org/2000/svg",
 12657   xmlns: "http://www.w3.org/2000/svg",
 12183   viewBox: "0 0 24 24"
 12658   viewBox: "0 0 24 24"
 12184 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 12659 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 12185   d: "M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"
 12660   d: "M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"
 12186 }));
 12661 }));
 12187 /* harmony default export */ var position_right = (positionRight);
 12662 /* harmony default export */ var position_right = (positionRight);
 12188 
 12663 
 12189 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stretch-wide.js
 12664 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stretch-wide.js
 12191 
 12666 
 12192 /**
 12667 /**
 12193  * WordPress dependencies
 12668  * WordPress dependencies
 12194  */
 12669  */
 12195 
 12670 
 12196 var stretchWide = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 12671 const stretchWide = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 12197   xmlns: "http://www.w3.org/2000/svg",
 12672   xmlns: "http://www.w3.org/2000/svg",
 12198   viewBox: "0 0 24 24"
 12673   viewBox: "0 0 24 24"
 12199 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 12674 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 12200   d: "M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"
 12675   d: "M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"
 12201 }));
 12676 }));
 12202 /* harmony default export */ var stretch_wide = (stretchWide);
 12677 /* harmony default export */ var stretch_wide = (stretchWide);
 12203 
 12678 
 12204 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stretch-full-width.js
 12679 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stretch-full-width.js
 12206 
 12681 
 12207 /**
 12682 /**
 12208  * WordPress dependencies
 12683  * WordPress dependencies
 12209  */
 12684  */
 12210 
 12685 
 12211 var stretchFullWidth = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 12686 const stretchFullWidth = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 12212   xmlns: "http://www.w3.org/2000/svg",
 12687   xmlns: "http://www.w3.org/2000/svg",
 12213   viewBox: "0 0 24 24"
 12688   viewBox: "0 0 24 24"
 12214 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 12689 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 12215   d: "M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"
 12690   d: "M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"
 12216 }));
 12691 }));
 12217 /* harmony default export */ var stretch_full_width = (stretchFullWidth);
 12692 /* harmony default export */ var stretch_full_width = (stretchFullWidth);
 12218 
 12693 
 12219 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-toolbar/index.js
 12694 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/layout.js
 12220 
 12695 
 12221 
       
 12222 
       
 12223 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; }
       
 12224 
       
 12225 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; }
       
 12226 
 12696 
 12227 /**
 12697 /**
 12228  * WordPress dependencies
 12698  * WordPress dependencies
 12229  */
 12699  */
 12230 
 12700 
 12231 
 12701 const layout_defaultLayout = {
 12232 
 12702   type: 'default'
 12233 
 12703 };
 12234 
 12704 const Layout = Object(external_wp_element_["createContext"])(layout_defaultLayout);
 12235 var BLOCK_ALIGNMENTS_CONTROLS = {
 12705 
       
 12706 function appendSelectors(selectors, append) {
       
 12707   // Ideally we shouldn't need the `.editor-styles-wrapper` increased specificity here
       
 12708   // The problem though is that we have a `.editor-styles-wrapper p { margin: reset; }` style
       
 12709   // it's used to reset the default margin added by wp-admin to paragraphs
       
 12710   // so we need this to be higher speficity otherwise, it won't be applied to paragraphs inside containers
       
 12711   // When the post editor is fully iframed, this extra classname could be removed.
       
 12712   return selectors.split(',').map(subselector => `.editor-styles-wrapper ${subselector} ${append}`).join(',');
       
 12713 }
       
 12714 /**
       
 12715  * Allows to define the layout.
       
 12716  */
       
 12717 
       
 12718 
       
 12719 const LayoutProvider = Layout.Provider;
       
 12720 /**
       
 12721  * React hook used to retrieve the layout config.
       
 12722  */
       
 12723 
       
 12724 function useLayout() {
       
 12725   return Object(external_wp_element_["useContext"])(Layout);
       
 12726 }
       
 12727 function LayoutStyle({
       
 12728   selector,
       
 12729   layout = {}
       
 12730 }) {
       
 12731   const {
       
 12732     contentSize,
       
 12733     wideSize
       
 12734   } = layout;
       
 12735   let style = !!contentSize || !!wideSize ? `
       
 12736 				${appendSelectors(selector, '> *')} {
       
 12737 					max-width: ${contentSize !== null && contentSize !== void 0 ? contentSize : wideSize};
       
 12738 					margin-left: auto !important;
       
 12739 					margin-right: auto !important;
       
 12740 				}
       
 12741 
       
 12742 				${appendSelectors(selector, '> [data-align="wide"]')}  {
       
 12743 					max-width: ${wideSize !== null && wideSize !== void 0 ? wideSize : contentSize};
       
 12744 				}
       
 12745 
       
 12746 				${appendSelectors(selector, '> [data-align="full"]')} {
       
 12747 					max-width: none;
       
 12748 				}
       
 12749 			` : '';
       
 12750   style += `
       
 12751 		${appendSelectors(selector, '> [data-align="left"]')} {
       
 12752 			float: left;
       
 12753 			margin-right: 2em;
       
 12754 		}
       
 12755 
       
 12756 		${appendSelectors(selector, '> [data-align="right"]')} {
       
 12757 			float: right;
       
 12758 			margin-left: 2em;
       
 12759 		}
       
 12760 	`;
       
 12761   return Object(external_wp_element_["createElement"])("style", null, style);
       
 12762 }
       
 12763 
       
 12764 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-control/use-available-alignments.js
       
 12765 /**
       
 12766  * WordPress dependencies
       
 12767  */
       
 12768 
       
 12769 /**
       
 12770  * Internal dependencies
       
 12771  */
       
 12772 
       
 12773 
       
 12774 
       
 12775 const DEFAULT_CONTROLS = ['left', 'center', 'right', 'wide', 'full'];
       
 12776 const WIDE_CONTROLS = ['wide', 'full'];
       
 12777 function useAvailableAlignments(controls = DEFAULT_CONTROLS) {
       
 12778   const {
       
 12779     wideControlsEnabled = false
       
 12780   } = Object(external_wp_data_["useSelect"])(select => {
       
 12781     const {
       
 12782       getSettings
       
 12783     } = select(store);
       
 12784     const settings = getSettings();
       
 12785     return {
       
 12786       wideControlsEnabled: settings.alignWide
       
 12787     };
       
 12788   }, []);
       
 12789   const layout = useLayout();
       
 12790   const supportsAlignments = layout.type === 'default';
       
 12791 
       
 12792   if (!supportsAlignments) {
       
 12793     return [];
       
 12794   }
       
 12795 
       
 12796   const {
       
 12797     alignments: availableAlignments = DEFAULT_CONTROLS
       
 12798   } = layout;
       
 12799   const enabledControls = controls.filter(control => (layout.alignments || // Ignore the global wideAlignment check if the layout explicitely defines alignments.
       
 12800   wideControlsEnabled || !WIDE_CONTROLS.includes(control)) && availableAlignments.includes(control));
       
 12801   return enabledControls;
       
 12802 }
       
 12803 
       
 12804 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-control/ui.js
       
 12805 
       
 12806 
       
 12807 
       
 12808 /**
       
 12809  * WordPress dependencies
       
 12810  */
       
 12811 
       
 12812 
       
 12813 
       
 12814 /**
       
 12815  * Internal dependencies
       
 12816  */
       
 12817 
       
 12818 
       
 12819 const BLOCK_ALIGNMENTS_CONTROLS = {
 12236   left: {
 12820   left: {
 12237     icon: position_left,
 12821     icon: position_left,
 12238     title: Object(external_this_wp_i18n_["__"])('Align left')
 12822     title: Object(external_wp_i18n_["__"])('Align left')
 12239   },
 12823   },
 12240   center: {
 12824   center: {
 12241     icon: position_center,
 12825     icon: position_center,
 12242     title: Object(external_this_wp_i18n_["__"])('Align center')
 12826     title: Object(external_wp_i18n_["__"])('Align center')
 12243   },
 12827   },
 12244   right: {
 12828   right: {
 12245     icon: position_right,
 12829     icon: position_right,
 12246     title: Object(external_this_wp_i18n_["__"])('Align right')
 12830     title: Object(external_wp_i18n_["__"])('Align right')
 12247   },
 12831   },
 12248   wide: {
 12832   wide: {
 12249     icon: stretch_wide,
 12833     icon: stretch_wide,
 12250     title: Object(external_this_wp_i18n_["__"])('Wide width')
 12834     title: Object(external_wp_i18n_["__"])('Wide width')
 12251   },
 12835   },
 12252   full: {
 12836   full: {
 12253     icon: stretch_full_width,
 12837     icon: stretch_full_width,
 12254     title: Object(external_this_wp_i18n_["__"])('Full width')
 12838     title: Object(external_wp_i18n_["__"])('Full width')
 12255   }
 12839   }
 12256 };
 12840 };
 12257 var DEFAULT_CONTROLS = ['left', 'center', 'right', 'wide', 'full'];
 12841 const DEFAULT_CONTROL = 'center';
 12258 var DEFAULT_CONTROL = 'center';
 12842 const ui_POPOVER_PROPS = {
 12259 var WIDE_CONTROLS = ['wide', 'full'];
       
 12260 var block_alignment_toolbar_POPOVER_PROPS = {
       
 12261   isAlternate: true
 12843   isAlternate: true
 12262 };
 12844 };
 12263 function BlockAlignmentToolbar(_ref) {
 12845 
 12264   var value = _ref.value,
 12846 function BlockAlignmentUI({
 12265       onChange = _ref.onChange,
 12847   value,
 12266       _ref$controls = _ref.controls,
 12848   onChange,
 12267       controls = _ref$controls === void 0 ? DEFAULT_CONTROLS : _ref$controls,
 12849   controls,
 12268       _ref$isCollapsed = _ref.isCollapsed,
 12850   isToolbar,
 12269       isCollapsed = _ref$isCollapsed === void 0 ? true : _ref$isCollapsed,
 12851   isCollapsed = true
 12270       _ref$wideControlsEnab = _ref.wideControlsEnabled,
 12852 }) {
 12271       wideControlsEnabled = _ref$wideControlsEnab === void 0 ? false : _ref$wideControlsEnab;
 12853   const enabledControls = useAvailableAlignments(controls);
       
 12854 
       
 12855   if (enabledControls.length === 0) {
       
 12856     return null;
       
 12857   }
 12272 
 12858 
 12273   function applyOrUnset(align) {
 12859   function applyOrUnset(align) {
 12274     return function () {
 12860     return () => onChange(value === align ? undefined : align);
 12275       return onChange(value === align ? undefined : align);
 12861   }
 12276     };
 12862 
 12277   }
 12863   const activeAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[value];
 12278 
 12864   const defaultAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[DEFAULT_CONTROL];
 12279   var enabledControls = wideControlsEnabled ? controls : controls.filter(function (control) {
 12865   const UIComponent = isToolbar ? external_wp_components_["ToolbarGroup"] : external_wp_components_["ToolbarDropdownMenu"];
 12280     return WIDE_CONTROLS.indexOf(control) === -1;
 12866   const extraProps = isToolbar ? {
 12281   });
 12867     isCollapsed
 12282   var activeAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[value];
 12868   } : {};
 12283   var defaultAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[DEFAULT_CONTROL];
 12869   return Object(external_wp_element_["createElement"])(UIComponent, Object(esm_extends["a" /* default */])({
 12284   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
 12870     popoverProps: ui_POPOVER_PROPS,
 12285     popoverProps: block_alignment_toolbar_POPOVER_PROPS,
       
 12286     isCollapsed: isCollapsed,
       
 12287     icon: activeAlignmentControl ? activeAlignmentControl.icon : defaultAlignmentControl.icon,
 12871     icon: activeAlignmentControl ? activeAlignmentControl.icon : defaultAlignmentControl.icon,
 12288     label: Object(external_this_wp_i18n_["__"])('Change alignment'),
 12872     label: Object(external_wp_i18n_["__"])('Align'),
 12289     controls: enabledControls.map(function (control) {
 12873     toggleProps: {
 12290       return _objectSpread({}, BLOCK_ALIGNMENTS_CONTROLS[control], {
 12874       describedBy: Object(external_wp_i18n_["__"])('Change alignment')
       
 12875     },
       
 12876     controls: enabledControls.map(control => {
       
 12877       return { ...BLOCK_ALIGNMENTS_CONTROLS[control],
 12291         isActive: value === control,
 12878         isActive: value === control,
 12292         role: isCollapsed ? 'menuitemradio' : undefined,
 12879         role: isCollapsed ? 'menuitemradio' : undefined,
 12293         onClick: applyOrUnset(control)
 12880         onClick: applyOrUnset(control)
 12294       });
 12881       };
 12295     })
 12882     })
 12296   });
 12883   }, extraProps));
 12297 }
 12884 }
 12298 /* harmony default export */ var block_alignment_toolbar = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
 12885 
 12299   var _select = select('core/block-editor'),
 12886 /* harmony default export */ var ui = (BlockAlignmentUI);
 12300       getSettings = _select.getSettings;
 12887 
 12301 
 12888 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-control/index.js
 12302   var settings = getSettings();
 12889 
 12303   return {
 12890 
 12304     wideControlsEnabled: settings.alignWide
 12891 
 12305   };
 12892 /**
 12306 }))(BlockAlignmentToolbar));
 12893  * Internal dependencies
       
 12894  */
       
 12895 
       
 12896 function BlockAlignmentControl(props) {
       
 12897   return Object(external_wp_element_["createElement"])(ui, Object(esm_extends["a" /* default */])({}, props, {
       
 12898     isToolbar: false
       
 12899   }));
       
 12900 }
       
 12901 function BlockAlignmentToolbar(props) {
       
 12902   return Object(external_wp_element_["createElement"])(ui, Object(esm_extends["a" /* default */])({}, props, {
       
 12903     isToolbar: true
       
 12904   }));
       
 12905 }
 12307 
 12906 
 12308 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/align.js
 12907 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/align.js
 12309 
 12908 
 12310 
 12909 
 12311 
 12910 
 12312 
       
 12313 function align_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; }
       
 12314 
       
 12315 function align_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { align_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 { align_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 12316 
       
 12317 /**
 12911 /**
 12318  * External dependencies
 12912  * External dependencies
 12319  */
 12913  */
 12320 
 12914 
 12321 
 12915 
 12324  */
 12918  */
 12325 
 12919 
 12326 
 12920 
 12327 
 12921 
 12328 
 12922 
 12329 
       
 12330 
       
 12331 /**
 12923 /**
 12332  * Internal dependencies
 12924  * Internal dependencies
 12333  */
 12925  */
       
 12926 
 12334 
 12927 
 12335 
 12928 
 12336 /**
 12929 /**
 12337  * An array which includes all possible valid alignments,
 12930  * An array which includes all possible valid alignments,
 12338  * used to validate if an alignment is valid or not.
 12931  * used to validate if an alignment is valid or not.
 12339  *
 12932  *
 12340  * @constant
 12933  * @constant
 12341  * @type {string[]}
 12934  * @type {string[]}
 12342  */
 12935  */
 12343 
 12936 
 12344 var ALL_ALIGNMENTS = ['left', 'center', 'right', 'wide', 'full'];
 12937 const ALL_ALIGNMENTS = ['left', 'center', 'right', 'wide', 'full'];
 12345 /**
 12938 /**
 12346  * An array which includes all wide alignments.
 12939  * An array which includes all wide alignments.
 12347  * In order for this alignments to be valid they need to be supported by the block,
 12940  * In order for this alignments to be valid they need to be supported by the block,
 12348  * and by the theme.
 12941  * and by the theme.
 12349  *
 12942  *
 12350  * @constant
 12943  * @constant
 12351  * @type {string[]}
 12944  * @type {string[]}
 12352  */
 12945  */
 12353 
 12946 
 12354 var WIDE_ALIGNMENTS = ['wide', 'full'];
 12947 const WIDE_ALIGNMENTS = ['wide', 'full'];
 12355 /**
 12948 /**
 12356  * Returns the valid alignments.
 12949  * Returns the valid alignments.
 12357  * Takes into consideration the aligns supported by a block, if the block supports wide controls or not and if theme supports wide controls or not.
 12950  * Takes into consideration the aligns supported by a block, if the block supports wide controls or not and if theme supports wide controls or not.
 12358  * Exported just for testing purposes, not exported outside the module.
 12951  * Exported just for testing purposes, not exported outside the module.
 12359  *
 12952  *
 12362  * @param {?boolean}          hasWideEnabled      True if theme supports wide alignments. And False otherwise.
 12955  * @param {?boolean}          hasWideEnabled      True if theme supports wide alignments. And False otherwise.
 12363  *
 12956  *
 12364  * @return {string[]} Valid alignments.
 12957  * @return {string[]} Valid alignments.
 12365  */
 12958  */
 12366 
 12959 
 12367 function getValidAlignments(blockAlign) {
 12960 function getValidAlignments(blockAlign, hasWideBlockSupport = true, hasWideEnabled = true) {
 12368   var hasWideBlockSupport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
 12961   let validAlignments;
 12369   var hasWideEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
       
 12370   var validAlignments;
       
 12371 
 12962 
 12372   if (Array.isArray(blockAlign)) {
 12963   if (Array.isArray(blockAlign)) {
 12373     validAlignments = blockAlign;
 12964     validAlignments = ALL_ALIGNMENTS.filter(value => blockAlign.includes(value));
 12374   } else if (blockAlign === true) {
 12965   } else if (blockAlign === true) {
 12375     // `true` includes all alignments...
 12966     // `true` includes all alignments...
 12376     validAlignments = ALL_ALIGNMENTS;
 12967     validAlignments = ALL_ALIGNMENTS;
 12377   } else {
 12968   } else {
 12378     validAlignments = [];
 12969     validAlignments = [];
 12379   }
 12970   }
 12380 
 12971 
 12381   if (!hasWideEnabled || blockAlign === true && !hasWideBlockSupport) {
 12972   if (!hasWideEnabled || blockAlign === true && !hasWideBlockSupport) {
 12382     return external_this_lodash_["without"].apply(void 0, [validAlignments].concat(WIDE_ALIGNMENTS));
 12973     return Object(external_lodash_["without"])(validAlignments, ...WIDE_ALIGNMENTS);
 12383   }
 12974   }
 12384 
 12975 
 12385   return validAlignments;
 12976   return validAlignments;
 12386 }
 12977 }
 12387 /**
 12978 /**
 12391  * @return {Object}          Filtered block settings
 12982  * @return {Object}          Filtered block settings
 12392  */
 12983  */
 12393 
 12984 
 12394 function addAttribute(settings) {
 12985 function addAttribute(settings) {
 12395   // allow blocks to specify their own attribute definition with default values if needed.
 12986   // allow blocks to specify their own attribute definition with default values if needed.
 12396   if (Object(external_this_lodash_["has"])(settings.attributes, ['align', 'type'])) {
 12987   if (Object(external_lodash_["has"])(settings.attributes, ['align', 'type'])) {
 12397     return settings;
 12988     return settings;
 12398   }
 12989   }
 12399 
 12990 
 12400   if (Object(external_this_wp_blocks_["hasBlockSupport"])(settings, 'align')) {
 12991   if (Object(external_wp_blocks_["hasBlockSupport"])(settings, 'align')) {
 12401     // Gracefully handle if settings.attributes is undefined.
 12992     // Gracefully handle if settings.attributes is undefined.
 12402     settings.attributes = align_objectSpread({}, settings.attributes, {
 12993     settings.attributes = { ...settings.attributes,
 12403       align: {
 12994       align: {
 12404         type: 'string'
 12995         type: 'string',
       
 12996         // Allow for '' since it is used by updateAlignment function
       
 12997         // in withToolbarControls for special cases with defined default values.
       
 12998         enum: [...ALL_ALIGNMENTS, '']
 12405       }
 12999       }
 12406     });
 13000     };
 12407   }
 13001   }
 12408 
 13002 
 12409   return settings;
 13003   return settings;
 12410 }
 13004 }
 12411 var AlignmentHookSettings = Object(external_this_wp_element_["createContext"])({});
       
 12412 /**
       
 12413  * Allows to pass additional settings to the alignment hook.
       
 12414  */
       
 12415 
       
 12416 var AlignmentHookSettingsProvider = AlignmentHookSettings.Provider;
       
 12417 /**
 13005 /**
 12418  * Override the default edit UI to include new toolbar controls for block
 13006  * Override the default edit UI to include new toolbar controls for block
 12419  * alignment, if block defines support.
 13007  * alignment, if block defines support.
 12420  *
 13008  *
 12421  * @param  {Function} BlockEdit Original component
 13009  * @param  {Function} BlockEdit Original component
 12422  * @return {Function}           Wrapped component
 13010  * @return {Function}           Wrapped component
 12423  */
 13011  */
 12424 
 13012 
 12425 var withToolbarControls = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) {
 13013 const withToolbarControls = Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => props => {
 12426   return function (props) {
 13014   const {
 12427     var _useContext = Object(external_this_wp_element_["useContext"])(AlignmentHookSettings),
 13015     name: blockName
 12428         isEmbedButton = _useContext.isEmbedButton;
 13016   } = props; // Compute the block allowed alignments without taking into account,
 12429 
 13017   // if the theme supports wide alignments or not
 12430     var blockName = props.name; // Compute valid alignments without taking into account,
 13018   // and without checking the layout for availble alignments.
 12431     // if the theme supports wide alignments or not.
 13019   // BlockAlignmentToolbar takes both of these into account.
 12432     // BlockAlignmentToolbar takes into account the theme support.
 13020 
 12433 
 13021   const blockAllowedAlignments = getValidAlignments(Object(external_wp_blocks_["getBlockSupport"])(blockName, 'align'), Object(external_wp_blocks_["hasBlockSupport"])(blockName, 'alignWide', true));
 12434     var validAlignments = isEmbedButton ? [] : getValidAlignments(Object(external_this_wp_blocks_["getBlockSupport"])(blockName, 'align'), Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, 'alignWide', true));
 13022   const validAlignments = useAvailableAlignments(blockAllowedAlignments);
 12435 
 13023 
 12436     var updateAlignment = function updateAlignment(nextAlign) {
 13024   const updateAlignment = nextAlign => {
 12437       if (!nextAlign) {
 13025     if (!nextAlign) {
 12438         var blockType = Object(external_this_wp_blocks_["getBlockType"])(props.name);
 13026       var _blockType$attributes, _blockType$attributes2;
 12439         var blockDefaultAlign = Object(external_this_lodash_["get"])(blockType, ['attributes', 'align', 'default']);
 13027 
 12440 
 13028       const blockType = Object(external_wp_blocks_["getBlockType"])(props.name);
 12441         if (blockDefaultAlign) {
 13029       const blockDefaultAlign = (_blockType$attributes = blockType.attributes) === null || _blockType$attributes === void 0 ? void 0 : (_blockType$attributes2 = _blockType$attributes.align) === null || _blockType$attributes2 === void 0 ? void 0 : _blockType$attributes2.default;
 12442           nextAlign = '';
 13030 
 12443         }
 13031       if (blockDefaultAlign) {
       
 13032         nextAlign = '';
 12444       }
 13033       }
 12445 
 13034     }
 12446       props.setAttributes({
 13035 
 12447         align: nextAlign
 13036     props.setAttributes({
 12448       });
 13037       align: nextAlign
 12449     };
 13038     });
 12450 
       
 12451     return [validAlignments.length > 0 && props.isSelected && Object(external_this_wp_element_["createElement"])(block_controls, {
       
 12452       key: "align-controls"
       
 12453     }, Object(external_this_wp_element_["createElement"])(block_alignment_toolbar, {
       
 12454       value: props.attributes.align,
       
 12455       onChange: updateAlignment,
       
 12456       controls: validAlignments
       
 12457     })), Object(external_this_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
       
 12458       key: "edit"
       
 12459     }, props))];
       
 12460   };
 13039   };
       
 13040 
       
 13041   return [validAlignments.length > 0 && props.isSelected && Object(external_wp_element_["createElement"])(block_controls, {
       
 13042     key: "align-controls",
       
 13043     group: "block"
       
 13044   }, Object(external_wp_element_["createElement"])(BlockAlignmentControl, {
       
 13045     value: props.attributes.align,
       
 13046     onChange: updateAlignment,
       
 13047     controls: validAlignments
       
 13048   })), Object(external_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
       
 13049     key: "edit"
       
 13050   }, props))];
 12461 }, 'withToolbarControls');
 13051 }, 'withToolbarControls');
 12462 /**
 13052 /**
 12463  * Override the default block element to add alignment wrapper props.
 13053  * Override the default block element to add alignment wrapper props.
 12464  *
 13054  *
 12465  * @param  {Function} BlockListBlock Original component
 13055  * @param  {Function} BlockListBlock Original component
 12466  * @return {Function}                Wrapped component
 13056  * @return {Function}                Wrapped component
 12467  */
 13057  */
 12468 
 13058 
 12469 var withDataAlign = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockListBlock) {
 13059 const withDataAlign = Object(external_wp_compose_["createHigherOrderComponent"])(BlockListBlock => props => {
 12470   return function (props) {
 13060   const {
 12471     var name = props.name,
 13061     name,
 12472         attributes = props.attributes;
 13062     attributes
 12473     var align = attributes.align;
 13063   } = props;
 12474     var hasWideEnabled = Object(external_this_wp_data_["useSelect"])(function (select) {
 13064   const {
 12475       return !!select('core/block-editor').getSettings().alignWide;
 13065     align
 12476     }, []); // If an alignment is not assigned, there's no need to go through the
 13066   } = attributes;
 12477     // effort to validate or assign its value.
 13067   const blockAllowedAlignments = getValidAlignments(Object(external_wp_blocks_["getBlockSupport"])(name, 'align'), Object(external_wp_blocks_["hasBlockSupport"])(name, 'alignWide', true));
 12478 
 13068   const validAlignments = useAvailableAlignments(blockAllowedAlignments); // If an alignment is not assigned, there's no need to go through the
 12479     if (align === undefined) {
 13069   // effort to validate or assign its value.
 12480       return Object(external_this_wp_element_["createElement"])(BlockListBlock, props);
 13070 
 12481     }
 13071   if (align === undefined) {
 12482 
 13072     return Object(external_wp_element_["createElement"])(BlockListBlock, props);
 12483     var validAlignments = getValidAlignments(Object(external_this_wp_blocks_["getBlockSupport"])(name, 'align'), Object(external_this_wp_blocks_["hasBlockSupport"])(name, 'alignWide', true), hasWideEnabled);
 13073   }
 12484     var wrapperProps = props.wrapperProps;
 13074 
 12485 
 13075   let wrapperProps = props.wrapperProps;
 12486     if (validAlignments.includes(align)) {
 13076 
 12487       wrapperProps = align_objectSpread({}, wrapperProps, {
 13077   if (validAlignments.includes(align)) {
 12488         'data-align': align
 13078     wrapperProps = { ...wrapperProps,
 12489       });
 13079       'data-align': align
 12490     }
 13080     };
 12491 
 13081   }
 12492     return Object(external_this_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, {
 13082 
 12493       wrapperProps: wrapperProps
 13083   return Object(external_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, {
 12494     }));
 13084     wrapperProps: wrapperProps
 12495   };
 13085   }));
 12496 });
 13086 });
 12497 /**
 13087 /**
 12498  * Override props assigned to save component to inject alignment class name if
 13088  * Override props assigned to save component to inject alignment class name if
 12499  * block supports it.
 13089  * block supports it.
 12500  *
 13090  *
 12503  * @param  {Object} attributes Block attributes
 13093  * @param  {Object} attributes Block attributes
 12504  * @return {Object}            Filtered props applied to save element
 13094  * @return {Object}            Filtered props applied to save element
 12505  */
 13095  */
 12506 
 13096 
 12507 function addAssignedAlign(props, blockType, attributes) {
 13097 function addAssignedAlign(props, blockType, attributes) {
 12508   var align = attributes.align;
 13098   const {
 12509   var blockAlign = Object(external_this_wp_blocks_["getBlockSupport"])(blockType, 'align');
 13099     align
 12510   var hasWideBlockSupport = Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'alignWide', true); // Compute valid alignments without taking into account if
 13100   } = attributes;
       
 13101   const blockAlign = Object(external_wp_blocks_["getBlockSupport"])(blockType, 'align');
       
 13102   const hasWideBlockSupport = Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'alignWide', true); // Compute valid alignments without taking into account if
 12511   // the theme supports wide alignments or not.
 13103   // the theme supports wide alignments or not.
 12512   // This way changing themes does not impact the block save.
 13104   // This way changing themes does not impact the block save.
 12513 
 13105 
 12514   var isAlignValid = getValidAlignments(blockAlign, hasWideBlockSupport).includes(align);
 13106   const isAlignValid = getValidAlignments(blockAlign, hasWideBlockSupport).includes(align);
 12515 
 13107 
 12516   if (isAlignValid) {
 13108   if (isAlignValid) {
 12517     props.className = classnames_default()("align".concat(align), props.className);
 13109     props.className = classnames_default()(`align${align}`, props.className);
 12518   }
 13110   }
 12519 
 13111 
 12520   return props;
 13112   return props;
 12521 }
 13113 }
 12522 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/align/addAttribute', addAttribute);
 13114 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/align/addAttribute', addAttribute);
 12523 Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/editor/align/with-data-align', withDataAlign);
 13115 Object(external_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/editor/align/with-data-align', withDataAlign);
 12524 Object(external_this_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/align/with-toolbar-controls', withToolbarControls);
 13116 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/align/with-toolbar-controls', withToolbarControls);
 12525 Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/align/addAssignedAlign', addAssignedAlign);
 13117 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/align/addAssignedAlign', addAssignedAlign);
 12526 
 13118 
 12527 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-advanced-controls/index.js
 13119 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-advanced-controls/index.js
 12528 
 13120 
 12529 
 13121 
 12530 /**
 13122 /**
 12534 /**
 13126 /**
 12535  * Internal dependencies
 13127  * Internal dependencies
 12536  */
 13128  */
 12537 
 13129 
 12538 
 13130 
 12539 var inspector_advanced_controls_name = 'InspectorAdvancedControls';
 13131 const inspector_advanced_controls_name = 'InspectorAdvancedControls';
 12540 
 13132 const {
 12541 var inspector_advanced_controls_createSlotFill = Object(external_this_wp_components_["createSlotFill"])(inspector_advanced_controls_name),
 13133   Fill: inspector_advanced_controls_Fill,
 12542     inspector_advanced_controls_Fill = inspector_advanced_controls_createSlotFill.Fill,
 13134   Slot: inspector_advanced_controls_Slot
 12543     inspector_advanced_controls_Slot = inspector_advanced_controls_createSlotFill.Slot;
 13135 } = Object(external_wp_components_["createSlotFill"])(inspector_advanced_controls_name);
 12544 
 13136 
 12545 function InspectorAdvancedControls(_ref) {
 13137 function InspectorAdvancedControls({
 12546   var children = _ref.children;
 13138   children
 12547 
 13139 }) {
 12548   var _useBlockEditContext = useBlockEditContext(),
 13140   const {
 12549       isSelected = _useBlockEditContext.isSelected;
 13141     isSelected
 12550 
 13142   } = useBlockEditContext();
 12551   return isSelected ? Object(external_this_wp_element_["createElement"])(inspector_advanced_controls_Fill, null, children) : null;
 13143   return isSelected ? Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalStyleProvider"], {
       
 13144     document: document
       
 13145   }, Object(external_wp_element_["createElement"])(inspector_advanced_controls_Fill, null, children)) : null;
 12552 }
 13146 }
 12553 
 13147 
 12554 InspectorAdvancedControls.slotName = inspector_advanced_controls_name;
 13148 InspectorAdvancedControls.slotName = inspector_advanced_controls_name;
 12555 InspectorAdvancedControls.Slot = inspector_advanced_controls_Slot;
 13149 InspectorAdvancedControls.Slot = inspector_advanced_controls_Slot;
       
 13150 /**
       
 13151  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-advanced-controls/README.md
       
 13152  */
       
 13153 
 12556 /* harmony default export */ var inspector_advanced_controls = (InspectorAdvancedControls);
 13154 /* harmony default export */ var inspector_advanced_controls = (InspectorAdvancedControls);
 12557 
 13155 
       
 13156 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-controls/index.js
       
 13157 
       
 13158 
       
 13159 /**
       
 13160  * WordPress dependencies
       
 13161  */
       
 13162 
       
 13163 /**
       
 13164  * Internal dependencies
       
 13165  */
       
 13166 
       
 13167 
       
 13168 const {
       
 13169   Fill: inspector_controls_Fill,
       
 13170   Slot: inspector_controls_Slot
       
 13171 } = Object(external_wp_components_["createSlotFill"])('InspectorControls');
       
 13172 
       
 13173 function InspectorControls({
       
 13174   children
       
 13175 }) {
       
 13176   return useDisplayBlockControls() ? Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalStyleProvider"], {
       
 13177     document: document
       
 13178   }, Object(external_wp_element_["createElement"])(inspector_controls_Fill, null, children)) : null;
       
 13179 }
       
 13180 
       
 13181 InspectorControls.Slot = inspector_controls_Slot;
       
 13182 /**
       
 13183  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-controls/README.md
       
 13184  */
       
 13185 
       
 13186 /* harmony default export */ var inspector_controls = (InspectorControls);
       
 13187 
 12558 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/anchor.js
 13188 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/anchor.js
 12559 
 13189 
 12560 
 13190 
 12561 
       
 12562 function anchor_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; }
       
 12563 
       
 12564 function anchor_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { anchor_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 { anchor_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 12565 
       
 12566 /**
 13191 /**
 12567  * External dependencies
 13192  * External dependencies
 12568  */
 13193  */
 12569 
 13194 
 12570 /**
 13195 /**
 12574 
 13199 
 12575 
 13200 
 12576 
 13201 
 12577 
 13202 
 12578 
 13203 
       
 13204 
 12579 /**
 13205 /**
 12580  * Internal dependencies
 13206  * Internal dependencies
 12581  */
 13207  */
 12582 
 13208 
 12583 
 13209 
 12585  * Regular expression matching invalid anchor characters for replacement.
 13211  * Regular expression matching invalid anchor characters for replacement.
 12586  *
 13212  *
 12587  * @type {RegExp}
 13213  * @type {RegExp}
 12588  */
 13214  */
 12589 
 13215 
 12590 var ANCHOR_REGEX = /[\s#]/g;
 13216 const ANCHOR_REGEX = /[\s#]/g;
 12591 /**
 13217 /**
 12592  * Filters registered block settings, extending attributes with anchor using ID
 13218  * Filters registered block settings, extending attributes with anchor using ID
 12593  * of the first node.
 13219  * of the first node.
 12594  *
 13220  *
 12595  * @param {Object} settings Original block settings.
 13221  * @param {Object} settings Original block settings.
 12597  * @return {Object} Filtered block settings.
 13223  * @return {Object} Filtered block settings.
 12598  */
 13224  */
 12599 
 13225 
 12600 function anchor_addAttribute(settings) {
 13226 function anchor_addAttribute(settings) {
 12601   // allow blocks to specify their own attribute definition with default values if needed.
 13227   // allow blocks to specify their own attribute definition with default values if needed.
 12602   if (Object(external_this_lodash_["has"])(settings.attributes, ['anchor', 'type'])) {
 13228   if (Object(external_lodash_["has"])(settings.attributes, ['anchor', 'type'])) {
 12603     return settings;
 13229     return settings;
 12604   }
 13230   }
 12605 
 13231 
 12606   if (Object(external_this_wp_blocks_["hasBlockSupport"])(settings, 'anchor')) {
 13232   if (Object(external_wp_blocks_["hasBlockSupport"])(settings, 'anchor')) {
 12607     // Gracefully handle if settings.attributes is undefined.
 13233     // Gracefully handle if settings.attributes is undefined.
 12608     settings.attributes = anchor_objectSpread({}, settings.attributes, {
 13234     settings.attributes = { ...settings.attributes,
 12609       anchor: {
 13235       anchor: {
 12610         type: 'string',
 13236         type: 'string',
 12611         source: 'attribute',
 13237         source: 'attribute',
 12612         attribute: 'id',
 13238         attribute: 'id',
 12613         selector: '*'
 13239         selector: '*'
 12614       }
 13240       }
 12615     });
 13241     };
 12616   }
 13242   }
 12617 
 13243 
 12618   return settings;
 13244   return settings;
 12619 }
 13245 }
 12620 /**
 13246 /**
 12624  * @param {WPComponent} BlockEdit Original component.
 13250  * @param {WPComponent} BlockEdit Original component.
 12625  *
 13251  *
 12626  * @return {WPComponent} Wrapped component.
 13252  * @return {WPComponent} Wrapped component.
 12627  */
 13253  */
 12628 
 13254 
 12629 var withInspectorControl = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) {
 13255 const withInspectorControl = Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => {
 12630   return function (props) {
 13256   return props => {
 12631     var hasAnchor = Object(external_this_wp_blocks_["hasBlockSupport"])(props.name, 'anchor');
 13257     const hasAnchor = Object(external_wp_blocks_["hasBlockSupport"])(props.name, 'anchor');
 12632 
 13258 
 12633     if (hasAnchor && props.isSelected) {
 13259     if (hasAnchor && props.isSelected) {
 12634       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(BlockEdit, props), Object(external_this_wp_element_["createElement"])(inspector_advanced_controls, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
 13260       const isWeb = external_wp_element_["Platform"].OS === 'web';
       
 13261       const textControl = Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 12635         className: "html-anchor-control",
 13262         className: "html-anchor-control",
 12636         label: Object(external_this_wp_i18n_["__"])('HTML anchor'),
 13263         label: Object(external_wp_i18n_["__"])('HTML anchor'),
 12637         help: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page.'), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
 13264         help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_i18n_["__"])('Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page.'), Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
 12638           href: 'https://wordpress.org/support/article/page-jumps/'
 13265           href: 'https://wordpress.org/support/article/page-jumps/'
 12639         }, Object(external_this_wp_i18n_["__"])('Learn more about anchors'))),
 13266         }, Object(external_wp_i18n_["__"])('Learn more about anchors'))),
 12640         value: props.attributes.anchor || '',
 13267         value: props.attributes.anchor || '',
 12641         onChange: function onChange(nextValue) {
 13268         placeholder: !isWeb ? Object(external_wp_i18n_["__"])('Add an anchor') : null,
       
 13269         onChange: nextValue => {
 12642           nextValue = nextValue.replace(ANCHOR_REGEX, '-');
 13270           nextValue = nextValue.replace(ANCHOR_REGEX, '-');
 12643           props.setAttributes({
 13271           props.setAttributes({
 12644             anchor: nextValue
 13272             anchor: nextValue
 12645           });
 13273           });
 12646         },
 13274         },
       
 13275         autoCapitalize: "none",
 12647         autoComplete: "off"
 13276         autoComplete: "off"
 12648       })));
 13277       });
 12649     }
 13278       return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(BlockEdit, props), isWeb && Object(external_wp_element_["createElement"])(inspector_advanced_controls, null, textControl), !isWeb && props.name === 'core/heading' && Object(external_wp_element_["createElement"])(inspector_controls, null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 12650 
 13279         title: Object(external_wp_i18n_["__"])('Heading settings')
 12651     return Object(external_this_wp_element_["createElement"])(BlockEdit, props);
 13280       }, textControl)));
       
 13281     }
       
 13282 
       
 13283     return Object(external_wp_element_["createElement"])(BlockEdit, props);
 12652   };
 13284   };
 12653 }, 'withInspectorControl');
 13285 }, 'withInspectorControl');
 12654 /**
 13286 /**
 12655  * Override props assigned to save component to inject anchor ID, if block
 13287  * Override props assigned to save component to inject anchor ID, if block
 12656  * supports anchor. This is only applied if the block's save result is an
 13288  * supports anchor. This is only applied if the block's save result is an
 12662  *
 13294  *
 12663  * @return {Object} Filtered props applied to save element.
 13295  * @return {Object} Filtered props applied to save element.
 12664  */
 13296  */
 12665 
 13297 
 12666 function addSaveProps(extraProps, blockType, attributes) {
 13298 function addSaveProps(extraProps, blockType, attributes) {
 12667   if (Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'anchor')) {
 13299   if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'anchor')) {
 12668     extraProps.id = attributes.anchor === '' ? null : attributes.anchor;
 13300     extraProps.id = attributes.anchor === '' ? null : attributes.anchor;
 12669   }
 13301   }
 12670 
 13302 
 12671   return extraProps;
 13303   return extraProps;
 12672 }
 13304 }
 12673 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/anchor/attribute', anchor_addAttribute);
 13305 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/anchor/attribute', anchor_addAttribute);
 12674 Object(external_this_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/anchor/with-inspector-control', withInspectorControl);
 13306 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/anchor/with-inspector-control', withInspectorControl);
 12675 Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/anchor/save-props', addSaveProps);
 13307 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/anchor/save-props', addSaveProps);
 12676 
 13308 
 12677 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/custom-class-name.js
 13309 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/custom-class-name.js
 12678 
 13310 
 12679 
       
 12680 
       
 12681 function custom_class_name_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; }
       
 12682 
       
 12683 function custom_class_name_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { custom_class_name_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 { custom_class_name_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 12684 
 13311 
 12685 /**
 13312 /**
 12686  * External dependencies
 13313  * External dependencies
 12687  */
 13314  */
 12688 
 13315 
 12709  *
 13336  *
 12710  * @return {Object} Filtered block settings.
 13337  * @return {Object} Filtered block settings.
 12711  */
 13338  */
 12712 
 13339 
 12713 function custom_class_name_addAttribute(settings) {
 13340 function custom_class_name_addAttribute(settings) {
 12714   if (Object(external_this_wp_blocks_["hasBlockSupport"])(settings, 'customClassName', true)) {
 13341   if (Object(external_wp_blocks_["hasBlockSupport"])(settings, 'customClassName', true)) {
 12715     // Gracefully handle if settings.attributes is undefined.
 13342     // Gracefully handle if settings.attributes is undefined.
 12716     settings.attributes = custom_class_name_objectSpread({}, settings.attributes, {
 13343     settings.attributes = { ...settings.attributes,
 12717       className: {
 13344       className: {
 12718         type: 'string'
 13345         type: 'string'
 12719       }
 13346       }
 12720     });
 13347     };
 12721   }
 13348   }
 12722 
 13349 
 12723   return settings;
 13350   return settings;
 12724 }
 13351 }
 12725 /**
 13352 /**
 12729  * @param {WPComponent} BlockEdit Original component.
 13356  * @param {WPComponent} BlockEdit Original component.
 12730  *
 13357  *
 12731  * @return {WPComponent} Wrapped component.
 13358  * @return {WPComponent} Wrapped component.
 12732  */
 13359  */
 12733 
 13360 
 12734 var custom_class_name_withInspectorControl = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) {
 13361 const custom_class_name_withInspectorControl = Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => {
 12735   return function (props) {
 13362   return props => {
 12736     var hasCustomClassName = Object(external_this_wp_blocks_["hasBlockSupport"])(props.name, 'customClassName', true);
 13363     const hasCustomClassName = Object(external_wp_blocks_["hasBlockSupport"])(props.name, 'customClassName', true);
 12737 
 13364 
 12738     if (hasCustomClassName && props.isSelected) {
 13365     if (hasCustomClassName && props.isSelected) {
 12739       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(BlockEdit, props), Object(external_this_wp_element_["createElement"])(inspector_advanced_controls, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
 13366       return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(BlockEdit, props), Object(external_wp_element_["createElement"])(inspector_advanced_controls, null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 12740         autoComplete: "off",
 13367         autoComplete: "off",
 12741         label: Object(external_this_wp_i18n_["__"])('Additional CSS class(es)'),
 13368         label: Object(external_wp_i18n_["__"])('Additional CSS class(es)'),
 12742         value: props.attributes.className || '',
 13369         value: props.attributes.className || '',
 12743         onChange: function onChange(nextValue) {
 13370         onChange: nextValue => {
 12744           props.setAttributes({
 13371           props.setAttributes({
 12745             className: nextValue !== '' ? nextValue : undefined
 13372             className: nextValue !== '' ? nextValue : undefined
 12746           });
 13373           });
 12747         },
 13374         },
 12748         help: Object(external_this_wp_i18n_["__"])('Separate multiple classes with spaces.')
 13375         help: Object(external_wp_i18n_["__"])('Separate multiple classes with spaces.')
 12749       })));
 13376       })));
 12750     }
 13377     }
 12751 
 13378 
 12752     return Object(external_this_wp_element_["createElement"])(BlockEdit, props);
 13379     return Object(external_wp_element_["createElement"])(BlockEdit, props);
 12753   };
 13380   };
 12754 }, 'withInspectorControl');
 13381 }, 'withInspectorControl');
 12755 /**
 13382 /**
 12756  * Override props assigned to save component to inject anchor ID, if block
 13383  * Override props assigned to save component to inject anchor ID, if block
 12757  * supports anchor. This is only applied if the block's save result is an
 13384  * supports anchor. This is only applied if the block's save result is an
 12763  *
 13390  *
 12764  * @return {Object} Filtered props applied to save element.
 13391  * @return {Object} Filtered props applied to save element.
 12765  */
 13392  */
 12766 
 13393 
 12767 function custom_class_name_addSaveProps(extraProps, blockType, attributes) {
 13394 function custom_class_name_addSaveProps(extraProps, blockType, attributes) {
 12768   if (Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'customClassName', true) && attributes.className) {
 13395   if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'customClassName', true) && attributes.className) {
 12769     extraProps.className = classnames_default()(extraProps.className, attributes.className);
 13396     extraProps.className = classnames_default()(extraProps.className, attributes.className);
 12770   }
 13397   }
 12771 
 13398 
 12772   return extraProps;
 13399   return extraProps;
 12773 }
 13400 }
 12779  *
 13406  *
 12780  * @return {string[]} Array of class names assigned to the root element.
 13407  * @return {string[]} Array of class names assigned to the root element.
 12781  */
 13408  */
 12782 
 13409 
 12783 function getHTMLRootElementClasses(innerHTML) {
 13410 function getHTMLRootElementClasses(innerHTML) {
 12784   innerHTML = "<div data-custom-class-name>".concat(innerHTML, "</div>");
 13411   innerHTML = `<div data-custom-class-name>${innerHTML}</div>`;
 12785   var parsed = Object(external_this_wp_blocks_["parseWithAttributeSchema"])(innerHTML, {
 13412   const parsed = Object(external_wp_blocks_["parseWithAttributeSchema"])(innerHTML, {
 12786     type: 'string',
 13413     type: 'string',
 12787     source: 'attribute',
 13414     source: 'attribute',
 12788     selector: '[data-custom-class-name] > *',
 13415     selector: '[data-custom-class-name] > *',
 12789     attribute: 'class'
 13416     attribute: 'class'
 12790   });
 13417   });
 12802  *
 13429  *
 12803  * @return {Object} Filtered block attributes.
 13430  * @return {Object} Filtered block attributes.
 12804  */
 13431  */
 12805 
 13432 
 12806 function addParsedDifference(blockAttributes, blockType, innerHTML) {
 13433 function addParsedDifference(blockAttributes, blockType, innerHTML) {
 12807   if (Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'customClassName', true)) {
 13434   if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'customClassName', true)) {
 12808     // To determine difference, serialize block given the known set of
 13435     // To determine difference, serialize block given the known set of
 12809     // attributes, with the exception of `className`. This will determine
 13436     // attributes, with the exception of `className`. This will determine
 12810     // the default set of classes. From there, any difference in innerHTML
 13437     // the default set of classes. From there, any difference in innerHTML
 12811     // can be considered as custom classes.
 13438     // can be considered as custom classes.
 12812     var attributesSansClassName = Object(external_this_lodash_["omit"])(blockAttributes, ['className']);
 13439     const attributesSansClassName = Object(external_lodash_["omit"])(blockAttributes, ['className']);
 12813     var serialized = Object(external_this_wp_blocks_["getSaveContent"])(blockType, attributesSansClassName);
 13440     const serialized = Object(external_wp_blocks_["getSaveContent"])(blockType, attributesSansClassName);
 12814     var defaultClasses = getHTMLRootElementClasses(serialized);
 13441     const defaultClasses = getHTMLRootElementClasses(serialized);
 12815     var actualClasses = getHTMLRootElementClasses(innerHTML);
 13442     const actualClasses = getHTMLRootElementClasses(innerHTML);
 12816     var customClasses = Object(external_this_lodash_["difference"])(actualClasses, defaultClasses);
 13443     const customClasses = Object(external_lodash_["difference"])(actualClasses, defaultClasses);
 12817 
 13444 
 12818     if (customClasses.length) {
 13445     if (customClasses.length) {
 12819       blockAttributes.className = customClasses.join(' ');
 13446       blockAttributes.className = customClasses.join(' ');
 12820     } else if (serialized) {
 13447     } else if (serialized) {
 12821       delete blockAttributes.className;
 13448       delete blockAttributes.className;
 12822     }
 13449     }
 12823   }
 13450   }
 12824 
 13451 
 12825   return blockAttributes;
 13452   return blockAttributes;
 12826 }
 13453 }
 12827 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/custom-class-name/attribute', custom_class_name_addAttribute);
 13454 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/custom-class-name/attribute', custom_class_name_addAttribute);
 12828 Object(external_this_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/custom-class-name/with-inspector-control', custom_class_name_withInspectorControl);
 13455 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/custom-class-name/with-inspector-control', custom_class_name_withInspectorControl);
 12829 Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/custom-class-name/save-props', custom_class_name_addSaveProps);
 13456 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/custom-class-name/save-props', custom_class_name_addSaveProps);
 12830 Object(external_this_wp_hooks_["addFilter"])('blocks.getBlockAttributes', 'core/custom-class-name/addParsedDifference', addParsedDifference);
 13457 Object(external_wp_hooks_["addFilter"])('blocks.getBlockAttributes', 'core/custom-class-name/addParsedDifference', addParsedDifference);
 12831 
       
 12832 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
       
 12833 var toConsumableArray = __webpack_require__(18);
       
 12834 
 13458 
 12835 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/generated-class-name.js
 13459 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/generated-class-name.js
 12836 
       
 12837 
       
 12838 /**
 13460 /**
 12839  * External dependencies
 13461  * External dependencies
 12840  */
 13462  */
 12841 
 13463 
 12842 /**
 13464 /**
 12856  * @return {Object} Filtered props applied to save element.
 13478  * @return {Object} Filtered props applied to save element.
 12857  */
 13479  */
 12858 
 13480 
 12859 function addGeneratedClassName(extraProps, blockType) {
 13481 function addGeneratedClassName(extraProps, blockType) {
 12860   // Adding the generated className
 13482   // Adding the generated className
 12861   if (Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'className', true)) {
 13483   if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'className', true)) {
 12862     if (typeof extraProps.className === 'string') {
 13484     if (typeof extraProps.className === 'string') {
 12863       // We have some extra classes and want to add the default classname
 13485       // We have some extra classes and want to add the default classname
 12864       // We use uniq to prevent duplicate classnames
 13486       // We use uniq to prevent duplicate classnames
 12865       extraProps.className = Object(external_this_lodash_["uniq"])([Object(external_this_wp_blocks_["getBlockDefaultClassName"])(blockType.name)].concat(Object(toConsumableArray["a" /* default */])(extraProps.className.split(' ')))).join(' ').trim();
 13487       extraProps.className = Object(external_lodash_["uniq"])([Object(external_wp_blocks_["getBlockDefaultClassName"])(blockType.name), ...extraProps.className.split(' ')]).join(' ').trim();
 12866     } else {
 13488     } else {
 12867       // There is no string in the className variable,
 13489       // There is no string in the className variable,
 12868       // so we just dump the default name in there
 13490       // so we just dump the default name in there
 12869       extraProps.className = Object(external_this_wp_blocks_["getBlockDefaultClassName"])(blockType.name);
 13491       extraProps.className = Object(external_wp_blocks_["getBlockDefaultClassName"])(blockType.name);
 12870     }
 13492     }
 12871   }
 13493   }
 12872 
 13494 
 12873   return extraProps;
 13495   return extraProps;
 12874 }
 13496 }
 12875 Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/generated-class-name/save-props', addGeneratedClassName);
 13497 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/generated-class-name/save-props', addGeneratedClassName);
 12876 
 13498 
 12877 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
 13499 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-setting/index.js
 12878 var slicedToArray = __webpack_require__(14);
 13500 /**
 12879 
 13501  * External dependencies
 12880 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js
 13502  */
 12881 var toArray = __webpack_require__(146);
 13503 
       
 13504 /**
       
 13505  * WordPress dependencies
       
 13506  */
       
 13507 
       
 13508 
       
 13509 /**
       
 13510  * Internal dependencies
       
 13511  */
       
 13512 
       
 13513 
       
 13514 
       
 13515 const deprecatedFlags = {
       
 13516   'color.palette': settings => settings.colors === undefined ? undefined : settings.colors,
       
 13517   'color.gradients': settings => settings.gradients === undefined ? undefined : settings.gradients,
       
 13518   'color.custom': settings => settings.disableCustomColors === undefined ? undefined : !settings.disableCustomColors,
       
 13519   'color.customGradient': settings => settings.disableCustomGradients === undefined ? undefined : !settings.disableCustomGradients,
       
 13520   'typography.fontSizes': settings => settings.fontSizes === undefined ? undefined : settings.fontSizes,
       
 13521   'typography.customFontSize': settings => settings.disableCustomFontSizes === undefined ? undefined : !settings.disableCustomFontSizes,
       
 13522   'typography.customLineHeight': settings => settings.enableCustomLineHeight,
       
 13523   'spacing.units': settings => {
       
 13524     if (settings.enableCustomUnits === undefined) {
       
 13525       return;
       
 13526     }
       
 13527 
       
 13528     if (settings.enableCustomUnits === true) {
       
 13529       return ['px', 'em', 'rem', 'vh', 'vw', '%'];
       
 13530     }
       
 13531 
       
 13532     return settings.enableCustomUnits;
       
 13533   },
       
 13534   'spacing.customPadding': settings => settings.enableCustomSpacing
       
 13535 };
       
 13536 const PATHS_WITH_MERGE = {
       
 13537   'color.gradients': true,
       
 13538   'color.palette': true,
       
 13539   'typography.fontFamilies': true,
       
 13540   'typography.fontSizes': true
       
 13541 };
       
 13542 /**
       
 13543  * Hook that retrieves the editor setting.
       
 13544  * It works with nested objects using by finding the value at path.
       
 13545  *
       
 13546  * @param {string} path The path to the setting.
       
 13547  *
       
 13548  * @return {any} Returns the value defined for the setting.
       
 13549  *
       
 13550  * @example
       
 13551  * ```js
       
 13552  * const isEnabled = useSetting( 'typography.dropCap' );
       
 13553  * ```
       
 13554  */
       
 13555 
       
 13556 function useSetting(path) {
       
 13557   const {
       
 13558     name: blockName
       
 13559   } = useBlockEditContext();
       
 13560   const setting = Object(external_wp_data_["useSelect"])(select => {
       
 13561     var _get;
       
 13562 
       
 13563     const settings = select(store).getSettings(); // 1 - Use __experimental features, if available.
       
 13564     // We cascade to the all value if the block one is not available.
       
 13565 
       
 13566     const defaultsPath = `__experimentalFeatures.${path}`;
       
 13567     const blockPath = `__experimentalFeatures.blocks.${blockName}.${path}`;
       
 13568     const experimentalFeaturesResult = (_get = Object(external_lodash_["get"])(settings, blockPath)) !== null && _get !== void 0 ? _get : Object(external_lodash_["get"])(settings, defaultsPath);
       
 13569 
       
 13570     if (experimentalFeaturesResult !== undefined) {
       
 13571       if (PATHS_WITH_MERGE[path]) {
       
 13572         var _ref, _experimentalFeatures;
       
 13573 
       
 13574         return (_ref = (_experimentalFeatures = experimentalFeaturesResult.user) !== null && _experimentalFeatures !== void 0 ? _experimentalFeatures : experimentalFeaturesResult.theme) !== null && _ref !== void 0 ? _ref : experimentalFeaturesResult.core;
       
 13575       }
       
 13576 
       
 13577       return experimentalFeaturesResult;
       
 13578     } // 2 - Use deprecated settings, otherwise.
       
 13579 
       
 13580 
       
 13581     const deprecatedSettingsValue = deprecatedFlags[path] ? deprecatedFlags[path](settings) : undefined;
       
 13582 
       
 13583     if (deprecatedSettingsValue !== undefined) {
       
 13584       return deprecatedSettingsValue;
       
 13585     } // 3 - Fall back for typography.dropCap:
       
 13586     // This is only necessary to support typography.dropCap.
       
 13587     // when __experimentalFeatures are not present (core without plugin).
       
 13588     // To remove when __experimentalFeatures are ported to core.
       
 13589 
       
 13590 
       
 13591     return path === 'typography.dropCap' ? true : undefined;
       
 13592   }, [blockName, path]);
       
 13593   return setting;
       
 13594 }
 12882 
 13595 
 12883 // EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js
 13596 // EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js
 12884 var tinycolor = __webpack_require__(66);
 13597 var tinycolor = __webpack_require__("Zss7");
 12885 var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor);
 13598 var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor);
 12886 
 13599 
 12887 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/utils.js
 13600 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/utils.js
 12888 /**
 13601 /**
 12889  * External dependencies
 13602  * External dependencies
 12901  * @return {?Object} If definedColor is passed and the name is found in colors,
 13614  * @return {?Object} If definedColor is passed and the name is found in colors,
 12902  *                   the color object exactly as set by the theme or editor defaults is returned.
 13615  *                   the color object exactly as set by the theme or editor defaults is returned.
 12903  *                   Otherwise, an object that just sets the color is defined.
 13616  *                   Otherwise, an object that just sets the color is defined.
 12904  */
 13617  */
 12905 
 13618 
 12906 var utils_getColorObjectByAttributeValues = function getColorObjectByAttributeValues(colors, definedColor, customColor) {
 13619 const getColorObjectByAttributeValues = (colors, definedColor, customColor) => {
 12907   if (definedColor) {
 13620   if (definedColor) {
 12908     var colorObj = Object(external_this_lodash_["find"])(colors, {
 13621     const colorObj = Object(external_lodash_["find"])(colors, {
 12909       slug: definedColor
 13622       slug: definedColor
 12910     });
 13623     });
 12911 
 13624 
 12912     if (colorObj) {
 13625     if (colorObj) {
 12913       return colorObj;
 13626       return colorObj;
 12926  *
 13639  *
 12927  * @return {?Object} Color object included in the colors array whose color property equals colorValue.
 13640  * @return {?Object} Color object included in the colors array whose color property equals colorValue.
 12928  *                   Returns undefined if no color object matches this requirement.
 13641  *                   Returns undefined if no color object matches this requirement.
 12929  */
 13642  */
 12930 
 13643 
 12931 var utils_getColorObjectByColorValue = function getColorObjectByColorValue(colors, colorValue) {
 13644 const getColorObjectByColorValue = (colors, colorValue) => {
 12932   return Object(external_this_lodash_["find"])(colors, {
 13645   return Object(external_lodash_["find"])(colors, {
 12933     color: colorValue
 13646     color: colorValue
 12934   });
 13647   });
 12935 };
 13648 };
 12936 /**
 13649 /**
 12937  * Returns a class based on the context a color is being used and its slug.
 13650  * Returns a class based on the context a color is being used and its slug.
 12946 function getColorClassName(colorContextName, colorSlug) {
 13659 function getColorClassName(colorContextName, colorSlug) {
 12947   if (!colorContextName || !colorSlug) {
 13660   if (!colorContextName || !colorSlug) {
 12948     return undefined;
 13661     return undefined;
 12949   }
 13662   }
 12950 
 13663 
 12951   return "has-".concat(Object(external_this_lodash_["kebabCase"])(colorSlug), "-").concat(colorContextName);
 13664   return `has-${Object(external_lodash_["kebabCase"])(colorSlug)}-${colorContextName}`;
 12952 }
 13665 }
 12953 /**
 13666 /**
 12954  * Given an array of color objects and a color value returns the color value of the most readable color in the array.
 13667  * Given an array of color objects and a color value returns the color value of the most readable color in the array.
 12955  *
 13668  *
 12956  * @param {Array}   colors     Array of color objects as set by the theme or by the editor defaults.
 13669  * @param {Array}   colors     Array of color objects as set by the theme or by the editor defaults.
 12957  * @param {?string} colorValue A string containing the color value.
 13670  * @param {?string} colorValue A string containing the color value.
 12958  *
 13671  *
 12959  * @return {string} String with the color value of the most readable color.
 13672  * @return {string} String with the color value of the most readable color.
 12960  */
 13673  */
 12961 
 13674 
 12962 function utils_getMostReadableColor(colors, colorValue) {
 13675 function getMostReadableColor(colors, colorValue) {
 12963   return tinycolor_default.a.mostReadable(colorValue, Object(external_this_lodash_["map"])(colors, 'color')).toHexString();
 13676   return tinycolor_default.a.mostReadable(colorValue, Object(external_lodash_["map"])(colors, 'color')).toHexString();
 12964 }
 13677 }
 12965 
 13678 
 12966 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradients/use-gradient.js
 13679 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradients/use-gradient.js
 12967 
       
 12968 
       
 12969 /**
 13680 /**
 12970  * External dependencies
 13681  * External dependencies
 12971  */
 13682  */
 12972 
 13683 
 12973 /**
 13684 /**
 12979 /**
 13690 /**
 12980  * Internal dependencies
 13691  * Internal dependencies
 12981  */
 13692  */
 12982 
 13693 
 12983 
 13694 
       
 13695 
       
 13696 
       
 13697 const use_gradient_EMPTY_ARRAY = [];
 12984 function __experimentalGetGradientClass(gradientSlug) {
 13698 function __experimentalGetGradientClass(gradientSlug) {
 12985   if (!gradientSlug) {
 13699   if (!gradientSlug) {
 12986     return undefined;
 13700     return undefined;
 12987   }
 13701   }
 12988 
 13702 
 12989   return "has-".concat(gradientSlug, "-gradient-background");
 13703   return `has-${gradientSlug}-gradient-background`;
 12990 }
 13704 }
 12991 /**
 13705 /**
 12992  * Retrieves the gradient value per slug.
 13706  * Retrieves the gradient value per slug.
 12993  *
 13707  *
 12994  * @param {Array} gradients Gradient Palette
 13708  * @param {Array} gradients Gradient Palette
 12996  *
 13710  *
 12997  * @return {string} Gradient value.
 13711  * @return {string} Gradient value.
 12998  */
 13712  */
 12999 
 13713 
 13000 function getGradientValueBySlug(gradients, slug) {
 13714 function getGradientValueBySlug(gradients, slug) {
 13001   var gradient = Object(external_this_lodash_["find"])(gradients, ['slug', slug]);
 13715   const gradient = Object(external_lodash_["find"])(gradients, ['slug', slug]);
 13002   return gradient && gradient.gradient;
 13716   return gradient && gradient.gradient;
 13003 }
 13717 }
 13004 function __experimentalGetGradientObjectByGradientValue(gradients, value) {
 13718 function __experimentalGetGradientObjectByGradientValue(gradients, value) {
 13005   var gradient = Object(external_this_lodash_["find"])(gradients, ['gradient', value]);
 13719   const gradient = Object(external_lodash_["find"])(gradients, ['gradient', value]);
 13006   return gradient;
 13720   return gradient;
 13007 }
 13721 }
 13008 /**
 13722 /**
 13009  * Retrieves the gradient slug per slug.
 13723  * Retrieves the gradient slug per slug.
 13010  *
 13724  *
 13012  * @param {string} value Gradient value
 13726  * @param {string} value Gradient value
 13013  * @return {string} Gradient slug.
 13727  * @return {string} Gradient slug.
 13014  */
 13728  */
 13015 
 13729 
 13016 function getGradientSlugByValue(gradients, value) {
 13730 function getGradientSlugByValue(gradients, value) {
 13017   var gradient = __experimentalGetGradientObjectByGradientValue(gradients, value);
 13731   const gradient = __experimentalGetGradientObjectByGradientValue(gradients, value);
 13018 
 13732 
 13019   return gradient && gradient.slug;
 13733   return gradient && gradient.slug;
 13020 }
 13734 }
 13021 function __experimentalUseGradient() {
 13735 function __experimentalUseGradient({
 13022   var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
 13736   gradientAttribute = 'gradient',
 13023       _ref$gradientAttribut = _ref.gradientAttribute,
 13737   customGradientAttribute = 'customGradient'
 13024       gradientAttribute = _ref$gradientAttribut === void 0 ? 'gradient' : _ref$gradientAttribut,
 13738 } = {}) {
 13025       _ref$customGradientAt = _ref.customGradientAttribute,
 13739   const {
 13026       customGradientAttribute = _ref$customGradientAt === void 0 ? 'customGradient' : _ref$customGradientAt;
 13740     clientId
 13027 
 13741   } = useBlockEditContext();
 13028   var _useBlockEditContext = useBlockEditContext(),
 13742   const gradients = useSetting('color.gradients') || use_gradient_EMPTY_ARRAY;
 13029       clientId = _useBlockEditContext.clientId;
 13743   const {
 13030 
 13744     gradient,
 13031   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 13745     customGradient
 13032     var _select = select('core/block-editor'),
 13746   } = Object(external_wp_data_["useSelect"])(select => {
 13033         getBlockAttributes = _select.getBlockAttributes,
 13747     const {
 13034         getSettings = _select.getSettings;
 13748       getBlockAttributes
 13035 
 13749     } = select(store);
 13036     var attributes = getBlockAttributes(clientId);
 13750     const attributes = getBlockAttributes(clientId) || {};
 13037     return {
 13751     return {
 13038       gradient: attributes[gradientAttribute],
       
 13039       customGradient: attributes[customGradientAttribute],
 13752       customGradient: attributes[customGradientAttribute],
 13040       gradients: getSettings().gradients
 13753       gradient: attributes[gradientAttribute]
 13041     };
 13754     };
 13042   }, [clientId, gradientAttribute, customGradientAttribute]),
 13755   }, [clientId, gradientAttribute, customGradientAttribute]);
 13043       gradients = _useSelect.gradients,
 13756   const {
 13044       gradient = _useSelect.gradient,
 13757     updateBlockAttributes
 13045       customGradient = _useSelect.customGradient;
 13758   } = Object(external_wp_data_["useDispatch"])(store);
 13046 
 13759   const setGradient = Object(external_wp_element_["useCallback"])(newGradientValue => {
 13047   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 13760     const slug = getGradientSlugByValue(gradients, newGradientValue);
 13048       updateBlockAttributes = _useDispatch.updateBlockAttributes;
       
 13049 
       
 13050   var setGradient = Object(external_this_wp_element_["useCallback"])(function (newGradientValue) {
       
 13051     var _updateBlockAttribute2;
       
 13052 
       
 13053     var slug = getGradientSlugByValue(gradients, newGradientValue);
       
 13054 
 13761 
 13055     if (slug) {
 13762     if (slug) {
 13056       var _updateBlockAttribute;
 13763       updateBlockAttributes(clientId, {
 13057 
 13764         [gradientAttribute]: slug,
 13058       updateBlockAttributes(clientId, (_updateBlockAttribute = {}, Object(defineProperty["a" /* default */])(_updateBlockAttribute, gradientAttribute, slug), Object(defineProperty["a" /* default */])(_updateBlockAttribute, customGradientAttribute, undefined), _updateBlockAttribute));
 13765         [customGradientAttribute]: undefined
       
 13766       });
 13059       return;
 13767       return;
 13060     }
 13768     }
 13061 
 13769 
 13062     updateBlockAttributes(clientId, (_updateBlockAttribute2 = {}, Object(defineProperty["a" /* default */])(_updateBlockAttribute2, gradientAttribute, undefined), Object(defineProperty["a" /* default */])(_updateBlockAttribute2, customGradientAttribute, newGradientValue), _updateBlockAttribute2));
 13770     updateBlockAttributes(clientId, {
       
 13771       [gradientAttribute]: undefined,
       
 13772       [customGradientAttribute]: newGradientValue
       
 13773     });
 13063   }, [gradients, clientId, updateBlockAttributes]);
 13774   }, [gradients, clientId, updateBlockAttributes]);
 13064 
 13775 
 13065   var gradientClass = __experimentalGetGradientClass(gradient);
 13776   const gradientClass = __experimentalGetGradientClass(gradient);
 13066 
 13777 
 13067   var gradientValue;
 13778   let gradientValue;
 13068 
 13779 
 13069   if (gradient) {
 13780   if (gradient) {
 13070     gradientValue = getGradientValueBySlug(gradients, gradient);
 13781     gradientValue = getGradientValueBySlug(gradients, gradient);
 13071   } else {
 13782   } else {
 13072     gradientValue = customGradient;
 13783     gradientValue = customGradient;
 13073   }
 13784   }
 13074 
 13785 
 13075   return {
 13786   return {
 13076     gradientClass: gradientClass,
 13787     gradientClass,
 13077     gradientValue: gradientValue,
 13788     gradientValue,
 13078     setGradient: setGradient
 13789     setGradient
 13079   };
 13790   };
 13080 }
 13791 }
 13081 
 13792 
 13082 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/utils.js
 13793 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/control.js
       
 13794 
       
 13795 
       
 13796 
 13083 /**
 13797 /**
 13084  * External dependencies
 13798  * External dependencies
 13085  */
 13799  */
 13086 
 13800 
 13087 /**
       
 13088  * Removed undefined values from nested object.
       
 13089  *
       
 13090  * @param {*} object
       
 13091  * @return {*} Object cleaned from undefined values
       
 13092  */
       
 13093 
       
 13094 var utils_cleanEmptyObject = function cleanEmptyObject(object) {
       
 13095   if (!Object(external_this_lodash_["isObject"])(object)) {
       
 13096     return object;
       
 13097   }
       
 13098 
       
 13099   var cleanedNestedObjects = Object(external_this_lodash_["pickBy"])(Object(external_this_lodash_["mapValues"])(object, cleanEmptyObject), external_this_lodash_["identity"]);
       
 13100   return Object(external_this_lodash_["isEqual"])(cleanedNestedObjects, {}) ? undefined : cleanedNestedObjects;
       
 13101 };
       
 13102 
       
 13103 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
       
 13104 var objectWithoutProperties = __webpack_require__(15);
       
 13105 
       
 13106 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/control.js
       
 13107 
       
 13108 
       
 13109 
       
 13110 
       
 13111 
       
 13112 function control_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; }
       
 13113 
       
 13114 function control_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { control_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 { control_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 13115 
       
 13116 /**
       
 13117  * External dependencies
       
 13118  */
       
 13119 
       
 13120 
 13801 
 13121 /**
 13802 /**
 13122  * WordPress dependencies
 13803  * WordPress dependencies
 13123  */
 13804  */
 13124 
 13805 
 13125 
 13806 
 13126 
 13807 
 13127 
 13808 
 13128 
       
 13129 /**
 13809 /**
 13130  * Internal dependencies
 13810  * Internal dependencies
 13131  */
 13811  */
 13132 
 13812 
 13133 
 13813 
       
 13814 
 13134  // translators: first %s: the color name or value (e.g. red or #ff0000)
 13815  // translators: first %s: the color name or value (e.g. red or #ff0000)
 13135 
 13816 
 13136 var colorIndicatorAriaLabel = Object(external_this_wp_i18n_["__"])('(Color: %s)'); // translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
 13817 const colorIndicatorAriaLabel = Object(external_wp_i18n_["__"])('(Color: %s)'); // translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
 13137 
 13818 
 13138 
 13819 
 13139 var gradientIndicatorAriaLabel = Object(external_this_wp_i18n_["__"])('(Gradient: %s)');
 13820 const gradientIndicatorAriaLabel = Object(external_wp_i18n_["__"])('(Gradient: %s)');
 13140 
 13821 
 13141 var colorsAndGradientKeys = ['colors', 'disableCustomColors', 'gradients', 'disableCustomGradients'];
 13822 const colorsAndGradientKeys = ['colors', 'disableCustomColors', 'gradients', 'disableCustomGradients'];
 13142 
 13823 
 13143 function VisualLabel(_ref) {
 13824 function VisualLabel({
 13144   var colors = _ref.colors,
 13825   colors,
 13145       gradients = _ref.gradients,
 13826   gradients,
 13146       label = _ref.label,
 13827   label,
 13147       currentTab = _ref.currentTab,
 13828   currentTab,
 13148       colorValue = _ref.colorValue,
 13829   colorValue,
 13149       gradientValue = _ref.gradientValue;
 13830   gradientValue
 13150   var value, ariaLabel;
 13831 }) {
       
 13832   let value, ariaLabel;
 13151 
 13833 
 13152   if (currentTab === 'color') {
 13834   if (currentTab === 'color') {
 13153     if (colorValue) {
 13835     if (colorValue) {
 13154       value = colorValue;
 13836       value = colorValue;
 13155       var colorObject = utils_getColorObjectByColorValue(colors, value);
 13837       const colorObject = getColorObjectByColorValue(colors, value);
 13156       var colorName = colorObject && colorObject.name;
 13838       const colorName = colorObject && colorObject.name;
 13157       ariaLabel = Object(external_this_wp_i18n_["sprintf"])(colorIndicatorAriaLabel, colorName || value);
 13839       ariaLabel = Object(external_wp_i18n_["sprintf"])(colorIndicatorAriaLabel, colorName || value);
 13158     }
 13840     }
 13159   } else if (currentTab === 'gradient' && gradientValue) {
 13841   } else if (currentTab === 'gradient' && gradientValue) {
 13160     value = gradientValue;
 13842     value = gradientValue;
 13161 
 13843 
 13162     var gradientObject = __experimentalGetGradientObjectByGradientValue(gradients, value);
 13844     const gradientObject = __experimentalGetGradientObjectByGradientValue(gradients, value);
 13163 
 13845 
 13164     var gradientName = gradientObject && gradientObject.name;
 13846     const gradientName = gradientObject && gradientObject.name;
 13165     ariaLabel = Object(external_this_wp_i18n_["sprintf"])(gradientIndicatorAriaLabel, gradientName || value);
 13847     ariaLabel = Object(external_wp_i18n_["sprintf"])(gradientIndicatorAriaLabel, gradientName || value);
 13166   }
 13848   }
 13167 
 13849 
 13168   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, label, !!value && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ColorIndicator"], {
 13850   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, label, !!value && Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], {
 13169     colorValue: value,
 13851     colorValue: value,
 13170     "aria-label": ariaLabel
 13852     "aria-label": ariaLabel
 13171   }));
 13853   }));
 13172 }
 13854 }
 13173 
 13855 
 13174 function ColorGradientControlInner(_ref2) {
 13856 function ColorGradientControlInner({
 13175   var colors = _ref2.colors,
 13857   colors,
 13176       gradients = _ref2.gradients,
 13858   gradients,
 13177       disableCustomColors = _ref2.disableCustomColors,
 13859   disableCustomColors,
 13178       disableCustomGradients = _ref2.disableCustomGradients,
 13860   disableCustomGradients,
 13179       className = _ref2.className,
 13861   className,
 13180       label = _ref2.label,
 13862   label,
 13181       onColorChange = _ref2.onColorChange,
 13863   onColorChange,
 13182       onGradientChange = _ref2.onGradientChange,
 13864   onGradientChange,
 13183       colorValue = _ref2.colorValue,
 13865   colorValue,
 13184       gradientValue = _ref2.gradientValue;
 13866   gradientValue,
 13185   var canChooseAColor = onColorChange && (!Object(external_this_lodash_["isEmpty"])(colors) || !disableCustomColors);
 13867   clearable
 13186   var canChooseAGradient = onGradientChange && (!Object(external_this_lodash_["isEmpty"])(gradients) || !disableCustomGradients);
 13868 }) {
 13187 
 13869   const canChooseAColor = onColorChange && (!Object(external_lodash_["isEmpty"])(colors) || !disableCustomColors);
 13188   var _useState = Object(external_this_wp_element_["useState"])(gradientValue ? 'gradient' : !!canChooseAColor && 'color'),
 13870   const canChooseAGradient = onGradientChange && (!Object(external_lodash_["isEmpty"])(gradients) || !disableCustomGradients);
 13189       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 13871   const [currentTab, setCurrentTab] = Object(external_wp_element_["useState"])(gradientValue ? 'gradient' : !!canChooseAColor && 'color');
 13190       currentTab = _useState2[0],
       
 13191       setCurrentTab = _useState2[1];
       
 13192 
 13872 
 13193   if (!canChooseAColor && !canChooseAGradient) {
 13873   if (!canChooseAColor && !canChooseAGradient) {
 13194     return null;
 13874     return null;
 13195   }
 13875   }
 13196 
 13876 
 13197   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["BaseControl"], {
 13877   return Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
 13198     className: classnames_default()('block-editor-color-gradient-control', className)
 13878     className: classnames_default()('block-editor-color-gradient-control', className)
 13199   }, Object(external_this_wp_element_["createElement"])("fieldset", null, Object(external_this_wp_element_["createElement"])("legend", null, Object(external_this_wp_element_["createElement"])("div", {
 13879   }, Object(external_wp_element_["createElement"])("fieldset", null, Object(external_wp_element_["createElement"])("legend", null, Object(external_wp_element_["createElement"])("div", {
 13200     className: "block-editor-color-gradient-control__color-indicator"
 13880     className: "block-editor-color-gradient-control__color-indicator"
 13201   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["BaseControl"].VisualLabel, null, Object(external_this_wp_element_["createElement"])(VisualLabel, {
 13881   }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"].VisualLabel, null, Object(external_wp_element_["createElement"])(VisualLabel, {
 13202     currentTab: currentTab,
 13882     currentTab: currentTab,
 13203     label: label,
 13883     label: label,
 13204     colorValue: colorValue,
 13884     colorValue: colorValue,
 13205     gradientValue: gradientValue
 13885     gradientValue: gradientValue
 13206   })))), canChooseAColor && canChooseAGradient && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ButtonGroup"], {
 13886   })))), canChooseAColor && canChooseAGradient && Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
 13207     className: "block-editor-color-gradient-control__button-tabs"
 13887     className: "block-editor-color-gradient-control__button-tabs"
 13208   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 13888   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 13209     isSmall: true,
 13889     isSmall: true,
 13210     isPressed: currentTab === 'color',
 13890     isPressed: currentTab === 'color',
 13211     onClick: function onClick() {
 13891     onClick: () => setCurrentTab('color')
 13212       return setCurrentTab('color');
 13892   }, Object(external_wp_i18n_["__"])('Solid')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 13213     }
       
 13214   }, Object(external_this_wp_i18n_["__"])('Solid')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 13215     isSmall: true,
 13893     isSmall: true,
 13216     isPressed: currentTab === 'gradient',
 13894     isPressed: currentTab === 'gradient',
 13217     onClick: function onClick() {
 13895     onClick: () => setCurrentTab('gradient')
 13218       return setCurrentTab('gradient');
 13896   }, Object(external_wp_i18n_["__"])('Gradient'))), (currentTab === 'color' || !canChooseAGradient) && Object(external_wp_element_["createElement"])(external_wp_components_["ColorPalette"], {
 13219     }
       
 13220   }, Object(external_this_wp_i18n_["__"])('Gradient'))), (currentTab === 'color' || !canChooseAGradient) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ColorPalette"], Object(esm_extends["a" /* default */])({
       
 13221     value: colorValue,
 13897     value: colorValue,
 13222     onChange: canChooseAGradient ? function (newColor) {
 13898     onChange: canChooseAGradient ? newColor => {
 13223       onColorChange(newColor);
 13899       onColorChange(newColor);
 13224       onGradientChange();
 13900       onGradientChange();
 13225     } : onColorChange
 13901     } : onColorChange,
 13226   }, {
 13902     colors,
 13227     colors: colors,
 13903     disableCustomColors,
 13228     disableCustomColors: disableCustomColors
 13904     clearable: clearable
 13229   })), (currentTab === 'gradient' || !canChooseAColor) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalGradientPicker"], Object(esm_extends["a" /* default */])({
 13905   }), (currentTab === 'gradient' || !canChooseAColor) && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalGradientPicker"], {
 13230     value: gradientValue,
 13906     value: gradientValue,
 13231     onChange: canChooseAColor ? function (newGradient) {
 13907     onChange: canChooseAColor ? newGradient => {
 13232       onGradientChange(newGradient);
 13908       onGradientChange(newGradient);
 13233       onColorChange();
 13909       onColorChange();
 13234     } : onGradientChange
 13910     } : onGradientChange,
 13235   }, {
 13911     gradients,
 13236     gradients: gradients,
 13912     disableCustomGradients,
 13237     disableCustomGradients: disableCustomGradients
 13913     clearable: clearable
 13238   }))));
 13914   })));
 13239 }
 13915 }
 13240 
 13916 
 13241 function ColorGradientControlSelect(props) {
 13917 function ColorGradientControlSelect(props) {
 13242   var colorGradientSettings = Object(external_this_wp_data_["useSelect"])(function (select) {
 13918   const colorGradientSettings = {};
 13243     var settings = select('core/block-editor').getSettings();
 13919   colorGradientSettings.colors = useSetting('color.palette');
 13244     return Object(external_this_lodash_["pick"])(settings, colorsAndGradientKeys);
 13920   colorGradientSettings.gradients = useSetting('color.gradients');
       
 13921   colorGradientSettings.disableCustomColors = !useSetting('color.custom');
       
 13922   colorGradientSettings.disableCustomGradients = !useSetting('color.customGradient');
       
 13923   return Object(external_wp_element_["createElement"])(ColorGradientControlInner, Object(esm_extends["a" /* default */])({}, colorGradientSettings, props));
       
 13924 }
       
 13925 
       
 13926 function ColorGradientControl(props) {
       
 13927   if (Object(external_lodash_["every"])(colorsAndGradientKeys, key => props.hasOwnProperty(key))) {
       
 13928     return Object(external_wp_element_["createElement"])(ColorGradientControlInner, props);
       
 13929   }
       
 13930 
       
 13931   return Object(external_wp_element_["createElement"])(ColorGradientControlSelect, props);
       
 13932 }
       
 13933 
       
 13934 /* harmony default export */ var control = (ColorGradientControl);
       
 13935 
       
 13936 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/utils.js
       
 13937 /**
       
 13938  * External dependencies
       
 13939  */
       
 13940 
       
 13941 /**
       
 13942  * Removed falsy values from nested object.
       
 13943  *
       
 13944  * @param {*} object
       
 13945  * @return {*} Object cleaned from falsy values
       
 13946  */
       
 13947 
       
 13948 const cleanEmptyObject = object => {
       
 13949   if (!Object(external_lodash_["isObject"])(object) || Array.isArray(object)) {
       
 13950     return object;
       
 13951   }
       
 13952 
       
 13953   const cleanedNestedObjects = Object(external_lodash_["pickBy"])(Object(external_lodash_["mapValues"])(object, cleanEmptyObject), external_lodash_["identity"]);
       
 13954   return Object(external_lodash_["isEmpty"])(cleanedNestedObjects) ? undefined : cleanedNestedObjects;
       
 13955 };
       
 13956 
       
 13957 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/border-color.js
       
 13958 
       
 13959 
       
 13960 
       
 13961 /**
       
 13962  * External dependencies
       
 13963  */
       
 13964 
       
 13965 /**
       
 13966  * WordPress dependencies
       
 13967  */
       
 13968 
       
 13969 
       
 13970 
       
 13971 
       
 13972 /**
       
 13973  * Internal dependencies
       
 13974  */
       
 13975 
       
 13976 
       
 13977 
       
 13978 
       
 13979 
       
 13980  // Defining empty array here instead of inline avoids unnecessary re-renders of
       
 13981 // color control.
       
 13982 
       
 13983 const border_color_EMPTY_ARRAY = [];
       
 13984 /**
       
 13985  * Inspector control panel containing the border color related configuration.
       
 13986  *
       
 13987  * There is deliberate overlap between the colors and borders block supports
       
 13988  * relating to border color. It can be argued the border color controls could
       
 13989  * be included within either, or both, the colors and borders panels in the
       
 13990  * inspector controls. If they share the same block attributes it should not
       
 13991  * matter.
       
 13992  *
       
 13993  * @param  {Object} props Block properties.
       
 13994  * @return {WPElement}    Border color edit element.
       
 13995  */
       
 13996 
       
 13997 function BorderColorEdit(props) {
       
 13998   var _style$border;
       
 13999 
       
 14000   const {
       
 14001     attributes: {
       
 14002       borderColor,
       
 14003       style
       
 14004     },
       
 14005     setAttributes
       
 14006   } = props;
       
 14007   const colors = useSetting('color.palette') || border_color_EMPTY_ARRAY;
       
 14008   const disableCustomColors = !useSetting('color.custom');
       
 14009   const disableCustomGradients = !useSetting('color.customGradient');
       
 14010 
       
 14011   const onChangeColor = value => {
       
 14012     const colorObject = getColorObjectByColorValue(colors, value);
       
 14013     const newStyle = { ...style,
       
 14014       border: { ...(style === null || style === void 0 ? void 0 : style.border),
       
 14015         color: colorObject !== null && colorObject !== void 0 && colorObject.slug ? undefined : value
       
 14016       }
       
 14017     }; // If empty slug, ensure undefined to remove attribute.
       
 14018 
       
 14019     const newNamedColor = colorObject !== null && colorObject !== void 0 && colorObject.slug ? colorObject.slug : undefined;
       
 14020     setAttributes({
       
 14021       style: cleanEmptyObject(newStyle),
       
 14022       borderColor: newNamedColor
       
 14023     });
       
 14024   };
       
 14025 
       
 14026   return Object(external_wp_element_["createElement"])(control, {
       
 14027     label: Object(external_wp_i18n_["__"])('Border color'),
       
 14028     value: borderColor || (style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.color),
       
 14029     colors: colors,
       
 14030     gradients: undefined,
       
 14031     disableCustomColors: disableCustomColors,
       
 14032     disableCustomGradients: disableCustomGradients,
       
 14033     onColorChange: onChangeColor
 13245   });
 14034   });
 13246   return Object(external_this_wp_element_["createElement"])(ColorGradientControlInner, control_objectSpread({}, colorGradientSettings, {}, props));
 14035 }
 13247 }
 14036 /**
 13248 
 14037  * Filters registered block settings, extending attributes to include
 13249 function ColorGradientControl(props) {
 14038  * `borderColor` if needed.
 13250   if (Object(external_this_lodash_["every"])(colorsAndGradientKeys, function (key) {
 14039  *
 13251     return props.hasOwnProperty(key);
 14040  * @param  {Object} settings Original block settings.
 13252   })) {
 14041  * @return {Object}          Updated block settings.
 13253     return Object(external_this_wp_element_["createElement"])(ColorGradientControlInner, props);
 14042  */
 13254   }
 14043 
 13255 
 14044 function addAttributes(settings) {
 13256   return Object(external_this_wp_element_["createElement"])(ColorGradientControlSelect, props);
 14045   if (!hasBorderSupport(settings, 'color')) {
 13257 }
 14046     return settings;
 13258 
 14047   } // Allow blocks to specify default value if needed.
 13259 /* harmony default export */ var control = (ColorGradientControl);
 14048 
       
 14049 
       
 14050   if (settings.attributes.borderColor) {
       
 14051     return settings;
       
 14052   } // Add new borderColor attribute to block settings.
       
 14053 
       
 14054 
       
 14055   return { ...settings,
       
 14056     attributes: { ...settings.attributes,
       
 14057       borderColor: {
       
 14058         type: 'string'
       
 14059       }
       
 14060     }
       
 14061   };
       
 14062 }
       
 14063 /**
       
 14064  * Override props assigned to save component to inject border color.
       
 14065  *
       
 14066  * @param  {Object} props      Additional props applied to save element.
       
 14067  * @param  {Object} blockType  Block type definition.
       
 14068  * @param  {Object} attributes Block's attributes
       
 14069  * @return {Object}            Filtered props to apply to save element.
       
 14070  */
       
 14071 
       
 14072 
       
 14073 function border_color_addSaveProps(props, blockType, attributes) {
       
 14074   var _style$border2;
       
 14075 
       
 14076   if (!hasBorderSupport(blockType, 'color') || shouldSkipSerialization(blockType)) {
       
 14077     return props;
       
 14078   }
       
 14079 
       
 14080   const {
       
 14081     borderColor,
       
 14082     style
       
 14083   } = attributes;
       
 14084   const borderColorClass = getColorClassName('border-color', borderColor);
       
 14085   const newClassName = classnames_default()(props.className, {
       
 14086     'has-border-color': borderColor || (style === null || style === void 0 ? void 0 : (_style$border2 = style.border) === null || _style$border2 === void 0 ? void 0 : _style$border2.color),
       
 14087     [borderColorClass]: !!borderColorClass
       
 14088   }); // If we are clearing the last of the previous classes in `className`
       
 14089   // set it to `undefined` to avoid rendering empty DOM attributes.
       
 14090 
       
 14091   props.className = newClassName ? newClassName : undefined;
       
 14092   return props;
       
 14093 }
       
 14094 /**
       
 14095  * Filters the registered block settings to apply border color styles and
       
 14096  * classnames to the block edit wrapper.
       
 14097  *
       
 14098  * @param {Object} settings Original block settings.
       
 14099  * @return {Object}         Filtered block settings.
       
 14100  */
       
 14101 
       
 14102 
       
 14103 function addEditProps(settings) {
       
 14104   if (!hasBorderSupport(settings, 'color') || shouldSkipSerialization(settings)) {
       
 14105     return settings;
       
 14106   }
       
 14107 
       
 14108   const existingGetEditWrapperProps = settings.getEditWrapperProps;
       
 14109 
       
 14110   settings.getEditWrapperProps = attributes => {
       
 14111     let props = {};
       
 14112 
       
 14113     if (existingGetEditWrapperProps) {
       
 14114       props = existingGetEditWrapperProps(attributes);
       
 14115     }
       
 14116 
       
 14117     return border_color_addSaveProps(props, settings, attributes);
       
 14118   };
       
 14119 
       
 14120   return settings;
       
 14121 }
       
 14122 /**
       
 14123  * This adds inline styles for color palette colors.
       
 14124  * Ideally, this is not needed and themes should load their palettes on the editor.
       
 14125  *
       
 14126  * @param  {Function} BlockListBlock Original component
       
 14127  * @return {Function}                Wrapped component
       
 14128  */
       
 14129 
       
 14130 
       
 14131 const withBorderColorPaletteStyles = Object(external_wp_compose_["createHigherOrderComponent"])(BlockListBlock => props => {
       
 14132   var _getColorObjectByAttr, _props$wrapperProps;
       
 14133 
       
 14134   const {
       
 14135     name,
       
 14136     attributes
       
 14137   } = props;
       
 14138   const {
       
 14139     borderColor
       
 14140   } = attributes;
       
 14141   const colors = useSetting('color.palette') || border_color_EMPTY_ARRAY;
       
 14142 
       
 14143   if (!hasBorderSupport(name, 'color') || shouldSkipSerialization(name)) {
       
 14144     return Object(external_wp_element_["createElement"])(BlockListBlock, props);
       
 14145   }
       
 14146 
       
 14147   const extraStyles = {
       
 14148     borderColor: borderColor ? (_getColorObjectByAttr = getColorObjectByAttributeValues(colors, borderColor)) === null || _getColorObjectByAttr === void 0 ? void 0 : _getColorObjectByAttr.color : undefined
       
 14149   };
       
 14150   let wrapperProps = props.wrapperProps;
       
 14151   wrapperProps = { ...props.wrapperProps,
       
 14152     style: { ...extraStyles,
       
 14153       ...((_props$wrapperProps = props.wrapperProps) === null || _props$wrapperProps === void 0 ? void 0 : _props$wrapperProps.style)
       
 14154     }
       
 14155   };
       
 14156   return Object(external_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, {
       
 14157     wrapperProps: wrapperProps
       
 14158   }));
       
 14159 });
       
 14160 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/border/addAttributes', addAttributes);
       
 14161 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/border/addSaveProps', border_color_addSaveProps);
       
 14162 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/border/addEditProps', addEditProps);
       
 14163 Object(external_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/border/with-border-color-palette-styles', withBorderColorPaletteStyles);
       
 14164 
       
 14165 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/border-radius.js
       
 14166 
       
 14167 
       
 14168 /**
       
 14169  * WordPress dependencies
       
 14170  */
       
 14171 
       
 14172 
       
 14173 /**
       
 14174  * Internal dependencies
       
 14175  */
       
 14176 
       
 14177 
       
 14178 const MIN_BORDER_RADIUS_VALUE = 0;
       
 14179 const MAX_BORDER_RADIUS_VALUE = 50;
       
 14180 /**
       
 14181  * Inspector control panel containing the border radius related configuration.
       
 14182  *
       
 14183  * @param  {Object} props Block properties.
       
 14184  * @return {WPElement}    Border radius edit element.
       
 14185  */
       
 14186 
       
 14187 function BorderRadiusEdit(props) {
       
 14188   var _style$border;
       
 14189 
       
 14190   const {
       
 14191     attributes: {
       
 14192       style
       
 14193     },
       
 14194     setAttributes
       
 14195   } = props;
       
 14196 
       
 14197   const onChange = newRadius => {
       
 14198     let newStyle = { ...style,
       
 14199       border: { ...(style === null || style === void 0 ? void 0 : style.border),
       
 14200         radius: newRadius
       
 14201       }
       
 14202     };
       
 14203 
       
 14204     if (newRadius === undefined) {
       
 14205       newStyle = cleanEmptyObject(newStyle);
       
 14206     }
       
 14207 
       
 14208     setAttributes({
       
 14209       style: newStyle
       
 14210     });
       
 14211   };
       
 14212 
       
 14213   return Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
       
 14214     value: style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius,
       
 14215     label: Object(external_wp_i18n_["__"])('Border radius'),
       
 14216     min: MIN_BORDER_RADIUS_VALUE,
       
 14217     max: MAX_BORDER_RADIUS_VALUE,
       
 14218     initialPosition: 0,
       
 14219     allowReset: true,
       
 14220     onChange: onChange
       
 14221   });
       
 14222 }
       
 14223 
       
 14224 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/border-style-control/index.js
       
 14225 
       
 14226 
       
 14227 /**
       
 14228  * WordPress dependencies
       
 14229  */
       
 14230 
       
 14231 
       
 14232 const DEFAULT_STYLE = {
       
 14233   key: 'default',
       
 14234   name: Object(external_wp_i18n_["__"])('Default'),
       
 14235   style: {
       
 14236     borderStyle: undefined
       
 14237   }
       
 14238 };
       
 14239 const BORDER_STYLES = [DEFAULT_STYLE, {
       
 14240   key: 'none',
       
 14241   name: Object(external_wp_i18n_["__"])('None'),
       
 14242   style: {
       
 14243     borderStyle: 'none'
       
 14244   }
       
 14245 }, {
       
 14246   key: 'solid',
       
 14247   name: Object(external_wp_i18n_["__"])('Solid'),
       
 14248   style: {
       
 14249     borderStyle: 'solid'
       
 14250   }
       
 14251 }, {
       
 14252   key: 'dashed',
       
 14253   name: Object(external_wp_i18n_["__"])('Dashed'),
       
 14254   style: {
       
 14255     borderStyle: 'dashed'
       
 14256   }
       
 14257 }, {
       
 14258   key: 'dotted',
       
 14259   name: Object(external_wp_i18n_["__"])('Dotted'),
       
 14260   style: {
       
 14261     borderStyle: 'dotted'
       
 14262   }
       
 14263 }];
       
 14264 /**
       
 14265  * Control to display border style options.
       
 14266  *
       
 14267  * @param  {Object}   props          Component props.
       
 14268  * @param  {Object}   props.onChange Handler for changing border style selection.
       
 14269  * @param  {Object}   props.value    Currently selected border style value.
       
 14270  *
       
 14271  * @return {WPElement}      Custom border style select control.
       
 14272  */
       
 14273 
       
 14274 function BorderStyleControl({
       
 14275   onChange,
       
 14276   value
       
 14277 }) {
       
 14278   const style = BORDER_STYLES.find(option => option.key === value);
       
 14279   return Object(external_wp_element_["createElement"])("fieldset", {
       
 14280     className: "components-border-style-control"
       
 14281   }, Object(external_wp_element_["createElement"])(external_wp_components_["CustomSelectControl"], {
       
 14282     className: "components-border-style-control__select",
       
 14283     label: Object(external_wp_i18n_["__"])('Border style'),
       
 14284     options: BORDER_STYLES,
       
 14285     value: style || DEFAULT_STYLE,
       
 14286     onChange: ({
       
 14287       selectedItem
       
 14288     }) => selectedItem.key === 'default' ? onChange(undefined) : onChange(selectedItem.key)
       
 14289   }));
       
 14290 }
       
 14291 
       
 14292 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/border-style.js
       
 14293 
       
 14294 
       
 14295 /**
       
 14296  * Internal dependencies
       
 14297  */
       
 14298 
       
 14299 
       
 14300 /**
       
 14301  * Inspector control for configuring border style property.
       
 14302  *
       
 14303  * @param  {Object} props  Block properties.
       
 14304  * @return {WPElement}     Border style edit element.
       
 14305  */
       
 14306 
       
 14307 const BorderStyleEdit = props => {
       
 14308   var _style$border;
       
 14309 
       
 14310   const {
       
 14311     attributes: {
       
 14312       style
       
 14313     },
       
 14314     setAttributes
       
 14315   } = props;
       
 14316 
       
 14317   const onChange = newBorderStyle => {
       
 14318     const newStyleAttributes = { ...style,
       
 14319       border: { ...(style === null || style === void 0 ? void 0 : style.border),
       
 14320         style: newBorderStyle
       
 14321       }
       
 14322     };
       
 14323     setAttributes({
       
 14324       style: cleanEmptyObject(newStyleAttributes)
       
 14325     });
       
 14326   };
       
 14327 
       
 14328   return Object(external_wp_element_["createElement"])(BorderStyleControl, {
       
 14329     value: style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.style,
       
 14330     onChange: onChange
       
 14331   });
       
 14332 };
       
 14333 
       
 14334 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/border-width.js
       
 14335 
       
 14336 
       
 14337 /**
       
 14338  * WordPress dependencies
       
 14339  */
       
 14340 
       
 14341 
       
 14342 /**
       
 14343  * Internal dependencies
       
 14344  */
       
 14345 
       
 14346 
       
 14347 const MIN_BORDER_WIDTH = 0;
       
 14348 const MAX_BORDER_WIDTH = 50;
       
 14349 /**
       
 14350  * Inspector control for configuring border width property.
       
 14351  *
       
 14352  * @param  {Object} props  Block properties.
       
 14353  * @return {WPElement}     Border width edit element.
       
 14354  */
       
 14355 
       
 14356 const BorderWidthEdit = props => {
       
 14357   var _style$border;
       
 14358 
       
 14359   const {
       
 14360     attributes: {
       
 14361       style
       
 14362     },
       
 14363     setAttributes
       
 14364   } = props;
       
 14365 
       
 14366   const onChange = newWidth => {
       
 14367     const newStyle = { ...style,
       
 14368       border: { ...(style === null || style === void 0 ? void 0 : style.border),
       
 14369         width: newWidth
       
 14370       }
       
 14371     };
       
 14372     setAttributes({
       
 14373       style: cleanEmptyObject(newStyle)
       
 14374     });
       
 14375   };
       
 14376 
       
 14377   return Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
       
 14378     value: style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.width,
       
 14379     label: Object(external_wp_i18n_["__"])('Border width'),
       
 14380     min: MIN_BORDER_WIDTH,
       
 14381     max: MAX_BORDER_WIDTH,
       
 14382     initialPosition: 0,
       
 14383     allowReset: true,
       
 14384     onChange: onChange
       
 14385   });
       
 14386 };
       
 14387 
       
 14388 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/border.js
       
 14389 
       
 14390 
       
 14391 /**
       
 14392  * WordPress dependencies
       
 14393  */
       
 14394 
       
 14395 
       
 14396 
       
 14397 
       
 14398 /**
       
 14399  * Internal dependencies
       
 14400  */
       
 14401 
       
 14402 
       
 14403 
       
 14404 
       
 14405 
       
 14406 
       
 14407 
       
 14408 const BORDER_SUPPORT_KEY = '__experimentalBorder';
       
 14409 function BorderPanel(props) {
       
 14410   const isDisabled = useIsBorderDisabled(props);
       
 14411   const isSupported = hasBorderSupport(props.name);
       
 14412   const isColorSupported = useSetting('border.customColor') && hasBorderSupport(props.name, 'color');
       
 14413   const isRadiusSupported = useSetting('border.customRadius') && hasBorderSupport(props.name, 'radius');
       
 14414   const isStyleSupported = useSetting('border.customStyle') && hasBorderSupport(props.name, 'style');
       
 14415   const isWidthSupported = useSetting('border.customWidth') && hasBorderSupport(props.name, 'width');
       
 14416 
       
 14417   if (isDisabled || !isSupported) {
       
 14418     return null;
       
 14419   }
       
 14420 
       
 14421   return Object(external_wp_element_["createElement"])(inspector_controls, null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
       
 14422     title: Object(external_wp_i18n_["__"])('Border settings'),
       
 14423     initialOpen: false
       
 14424   }, isStyleSupported && Object(external_wp_element_["createElement"])(BorderStyleEdit, props), isWidthSupported && Object(external_wp_element_["createElement"])(BorderWidthEdit, props), isRadiusSupported && Object(external_wp_element_["createElement"])(BorderRadiusEdit, props), isColorSupported && Object(external_wp_element_["createElement"])(BorderColorEdit, props)));
       
 14425 }
       
 14426 /**
       
 14427  * Determine whether there is block support for border properties.
       
 14428  *
       
 14429  * @param  {string} blockName Block name.
       
 14430  * @param  {string} feature   Border feature to check support for.
       
 14431  * @return {boolean}          Whether there is support.
       
 14432  */
       
 14433 
       
 14434 function hasBorderSupport(blockName, feature = 'any') {
       
 14435   if (external_wp_element_["Platform"].OS !== 'web') {
       
 14436     return false;
       
 14437   }
       
 14438 
       
 14439   const support = Object(external_wp_blocks_["getBlockSupport"])(blockName, BORDER_SUPPORT_KEY);
       
 14440 
       
 14441   if (support === true) {
       
 14442     return true;
       
 14443   }
       
 14444 
       
 14445   if (feature === 'any') {
       
 14446     return !!(support !== null && support !== void 0 && support.color || support !== null && support !== void 0 && support.radius || support !== null && support !== void 0 && support.width || support !== null && support !== void 0 && support.style);
       
 14447   }
       
 14448 
       
 14449   return !!(support !== null && support !== void 0 && support[feature]);
       
 14450 }
       
 14451 /**
       
 14452  * Check whether serialization of border classes and styles should be skipped.
       
 14453  *
       
 14454  * @param  {string|Object} blockType Block name or block type object.
       
 14455  * @return {boolean}                 Whether serialization of border properties should occur.
       
 14456  */
       
 14457 
       
 14458 function shouldSkipSerialization(blockType) {
       
 14459   const support = Object(external_wp_blocks_["getBlockSupport"])(blockType, BORDER_SUPPORT_KEY);
       
 14460   return support === null || support === void 0 ? void 0 : support.__experimentalSkipSerialization;
       
 14461 }
       
 14462 /**
       
 14463  * Determines if all border support features have been disabled.
       
 14464  *
       
 14465  * @return {boolean} If border support is completely disabled.
       
 14466  */
       
 14467 
       
 14468 const useIsBorderDisabled = () => {
       
 14469   const configs = [!useSetting('border.customColor'), !useSetting('border.customRadius'), !useSetting('border.customStyle'), !useSetting('border.customWidth')];
       
 14470   return configs.every(Boolean);
       
 14471 };
 13260 
 14472 
 13261 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/panel-color-gradient-settings.js
 14473 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/panel-color-gradient-settings.js
 13262 
 14474 
 13263 
 14475 
 13264 
 14476 
 13265 
       
 13266 
       
 13267 function panel_color_gradient_settings_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; }
       
 13268 
       
 13269 function panel_color_gradient_settings_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { panel_color_gradient_settings_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 { panel_color_gradient_settings_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 13270 
       
 13271 /**
 14477 /**
 13272  * External dependencies
 14478  * External dependencies
 13273  */
 14479  */
 13274 
 14480 
 13275 
 14481 
 13277  * WordPress dependencies
 14483  * WordPress dependencies
 13278  */
 14484  */
 13279 
 14485 
 13280 
 14486 
 13281 
 14487 
 13282 
       
 13283 /**
 14488 /**
 13284  * Internal dependencies
 14489  * Internal dependencies
 13285  */
 14490  */
 13286 
 14491 
 13287 
 14492 
 13288 
 14493 
       
 14494 
 13289  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
 14495  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
 13290 
 14496 
 13291 var panel_color_gradient_settings_colorIndicatorAriaLabel = Object(external_this_wp_i18n_["__"])('(%s: color %s)'); // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
 14497 const panel_color_gradient_settings_colorIndicatorAriaLabel = Object(external_wp_i18n_["__"])('(%s: color %s)'); // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
 13292 
 14498 
 13293 
 14499 
 13294 var panel_color_gradient_settings_gradientIndicatorAriaLabel = Object(external_this_wp_i18n_["__"])('(%s: gradient %s)');
 14500 const panel_color_gradient_settings_gradientIndicatorAriaLabel = Object(external_wp_i18n_["__"])('(%s: gradient %s)');
 13295 
 14501 
 13296 var panel_color_gradient_settings_colorsAndGradientKeys = ['colors', 'disableCustomColors', 'gradients', 'disableCustomGradients'];
 14502 const panel_color_gradient_settings_colorsAndGradientKeys = ['colors', 'disableCustomColors', 'gradients', 'disableCustomGradients'];
 13297 
 14503 
 13298 var panel_color_gradient_settings_Indicators = function Indicators(_ref) {
 14504 const Indicators = ({
 13299   var colors = _ref.colors,
 14505   colors,
 13300       gradients = _ref.gradients,
 14506   gradients,
 13301       settings = _ref.settings;
 14507   settings
 13302   return settings.map(function (_ref2, index) {
 14508 }) => {
 13303     var colorValue = _ref2.colorValue,
 14509   return settings.map(({
 13304         gradientValue = _ref2.gradientValue,
 14510     colorValue,
 13305         label = _ref2.label,
 14511     gradientValue,
 13306         availableColors = _ref2.colors,
 14512     label,
 13307         availableGradients = _ref2.gradients;
 14513     colors: availableColors,
 13308 
 14514     gradients: availableGradients
       
 14515   }, index) => {
 13309     if (!colorValue && !gradientValue) {
 14516     if (!colorValue && !gradientValue) {
 13310       return null;
 14517       return null;
 13311     }
 14518     }
 13312 
 14519 
 13313     var ariaLabel;
 14520     let ariaLabel;
 13314 
 14521 
 13315     if (colorValue) {
 14522     if (colorValue) {
 13316       var colorObject = utils_getColorObjectByColorValue(availableColors || colors, colorValue);
 14523       const colorObject = getColorObjectByColorValue(availableColors || colors, colorValue);
 13317       ariaLabel = Object(external_this_wp_i18n_["sprintf"])(panel_color_gradient_settings_colorIndicatorAriaLabel, label.toLowerCase(), colorObject && colorObject.name || colorValue);
 14524       ariaLabel = Object(external_wp_i18n_["sprintf"])(panel_color_gradient_settings_colorIndicatorAriaLabel, label.toLowerCase(), colorObject && colorObject.name || colorValue);
 13318     } else {
 14525     } else {
 13319       var gradientObject = __experimentalGetGradientObjectByGradientValue(availableGradients || gradients, colorValue);
 14526       const gradientObject = __experimentalGetGradientObjectByGradientValue(availableGradients || gradients, colorValue);
 13320 
 14527 
 13321       ariaLabel = Object(external_this_wp_i18n_["sprintf"])(panel_color_gradient_settings_gradientIndicatorAriaLabel, label.toLowerCase(), gradientObject && gradientObject.name || gradientValue);
 14528       ariaLabel = Object(external_wp_i18n_["sprintf"])(panel_color_gradient_settings_gradientIndicatorAriaLabel, label.toLowerCase(), gradientObject && gradientObject.name || gradientValue);
 13322     }
 14529     }
 13323 
 14530 
 13324     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ColorIndicator"], {
 14531     return Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], {
 13325       key: index,
 14532       key: index,
 13326       colorValue: colorValue || gradientValue,
 14533       colorValue: colorValue || gradientValue,
 13327       "aria-label": ariaLabel
 14534       "aria-label": ariaLabel
 13328     });
 14535     });
 13329   });
 14536   });
 13330 };
 14537 };
 13331 
 14538 
 13332 var panel_color_gradient_settings_PanelColorGradientSettingsInner = function PanelColorGradientSettingsInner(_ref3) {
 14539 const PanelColorGradientSettingsInner = ({
 13333   var className = _ref3.className,
 14540   className,
 13334       colors = _ref3.colors,
 14541   colors,
 13335       gradients = _ref3.gradients,
 14542   gradients,
 13336       disableCustomColors = _ref3.disableCustomColors,
 14543   disableCustomColors,
 13337       disableCustomGradients = _ref3.disableCustomGradients,
 14544   disableCustomGradients,
 13338       children = _ref3.children,
 14545   children,
 13339       settings = _ref3.settings,
 14546   settings,
 13340       title = _ref3.title,
 14547   title,
 13341       props = Object(objectWithoutProperties["a" /* default */])(_ref3, ["className", "colors", "gradients", "disableCustomColors", "disableCustomGradients", "children", "settings", "title"]);
 14548   ...props
 13342 
 14549 }) => {
 13343   if (Object(external_this_lodash_["isEmpty"])(colors) && Object(external_this_lodash_["isEmpty"])(gradients) && disableCustomColors && disableCustomGradients && Object(external_this_lodash_["every"])(settings, function (setting) {
 14550   if (Object(external_lodash_["isEmpty"])(colors) && Object(external_lodash_["isEmpty"])(gradients) && disableCustomColors && disableCustomGradients && Object(external_lodash_["every"])(settings, setting => Object(external_lodash_["isEmpty"])(setting.colors) && Object(external_lodash_["isEmpty"])(setting.gradients) && (setting.disableCustomColors === undefined || setting.disableCustomColors) && (setting.disableCustomGradients === undefined || setting.disableCustomGradients))) {
 13344     return Object(external_this_lodash_["isEmpty"])(setting.colors) && Object(external_this_lodash_["isEmpty"])(setting.gradients) && (setting.disableCustomColors === undefined || setting.disableCustomColors) && (setting.disableCustomGradients === undefined || setting.disableCustomGradients);
       
 13345   })) {
       
 13346     return null;
 14551     return null;
 13347   }
 14552   }
 13348 
 14553 
 13349   var titleElement = Object(external_this_wp_element_["createElement"])("span", {
 14554   const titleElement = Object(external_wp_element_["createElement"])("span", {
 13350     className: "block-editor-panel-color-gradient-settings__panel-title"
 14555     className: "block-editor-panel-color-gradient-settings__panel-title"
 13351   }, title, Object(external_this_wp_element_["createElement"])(panel_color_gradient_settings_Indicators, {
 14556   }, title, Object(external_wp_element_["createElement"])(Indicators, {
 13352     colors: colors,
 14557     colors: colors,
 13353     gradients: gradients,
 14558     gradients: gradients,
 13354     settings: settings
 14559     settings: settings
 13355   }));
 14560   }));
 13356   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], Object(esm_extends["a" /* default */])({
 14561   return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], Object(esm_extends["a" /* default */])({
 13357     className: classnames_default()('block-editor-panel-color-gradient-settings', className),
 14562     className: classnames_default()('block-editor-panel-color-gradient-settings', className),
 13358     title: titleElement
 14563     title: titleElement
 13359   }, props), settings.map(function (setting, index) {
 14564   }, props), settings.map((setting, index) => Object(external_wp_element_["createElement"])(control, Object(esm_extends["a" /* default */])({
 13360     return Object(external_this_wp_element_["createElement"])(control, Object(esm_extends["a" /* default */])({
 14565     key: index,
 13361       key: index
 14566     colors,
 13362     }, panel_color_gradient_settings_objectSpread({
 14567     gradients,
 13363       colors: colors,
 14568     disableCustomColors,
 13364       gradients: gradients,
 14569     disableCustomGradients
 13365       disableCustomColors: disableCustomColors,
 14570   }, setting))), children);
 13366       disableCustomGradients: disableCustomGradients
       
 13367     }, setting)));
       
 13368   }), children);
       
 13369 };
 14571 };
 13370 
 14572 
 13371 var panel_color_gradient_settings_PanelColorGradientSettingsSelect = function PanelColorGradientSettingsSelect(props) {
 14573 const PanelColorGradientSettingsSelect = props => {
 13372   var colorGradientSettings = Object(external_this_wp_data_["useSelect"])(function (select) {
 14574   const colorGradientSettings = {};
 13373     var settings = select('core/block-editor').getSettings();
 14575   colorGradientSettings.colors = useSetting('color.palette');
 13374     return Object(external_this_lodash_["pick"])(settings, panel_color_gradient_settings_colorsAndGradientKeys);
 14576   colorGradientSettings.gradients = useSetting('color.gradients');
 13375   });
 14577   colorGradientSettings.disableCustomColors = !useSetting('color.custom');
 13376   return Object(external_this_wp_element_["createElement"])(panel_color_gradient_settings_PanelColorGradientSettingsInner, panel_color_gradient_settings_objectSpread({}, colorGradientSettings, {}, props));
 14578   colorGradientSettings.disableCustomGradients = !useSetting('color.customGradient');
       
 14579   return Object(external_wp_element_["createElement"])(PanelColorGradientSettingsInner, Object(esm_extends["a" /* default */])({}, colorGradientSettings, props));
 13377 };
 14580 };
 13378 
 14581 
 13379 var panel_color_gradient_settings_PanelColorGradientSettings = function PanelColorGradientSettings(props) {
 14582 const PanelColorGradientSettings = props => {
 13380   if (Object(external_this_lodash_["every"])(panel_color_gradient_settings_colorsAndGradientKeys, function (key) {
 14583   if (Object(external_lodash_["every"])(panel_color_gradient_settings_colorsAndGradientKeys, key => props.hasOwnProperty(key))) {
 13381     return props.hasOwnProperty(key);
 14584     return Object(external_wp_element_["createElement"])(PanelColorGradientSettingsInner, props);
 13382   })) {
 14585   }
 13383     return Object(external_this_wp_element_["createElement"])(panel_color_gradient_settings_PanelColorGradientSettingsInner, props);
 14586 
 13384   }
 14587   return Object(external_wp_element_["createElement"])(PanelColorGradientSettingsSelect, props);
 13385 
       
 13386   return Object(external_this_wp_element_["createElement"])(panel_color_gradient_settings_PanelColorGradientSettingsSelect, props);
       
 13387 };
 14588 };
 13388 
 14589 
 13389 /* harmony default export */ var panel_color_gradient_settings = (panel_color_gradient_settings_PanelColorGradientSettings);
 14590 /* harmony default export */ var panel_color_gradient_settings = (PanelColorGradientSettings);
 13390 
       
 13391 // EXTERNAL MODULE: external {"this":["wp","a11y"]}
       
 13392 var external_this_wp_a11y_ = __webpack_require__(54);
       
 13393 
 14591 
 13394 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/contrast-checker/index.js
 14592 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/contrast-checker/index.js
 13395 
 14593 
 13396 
 14594 
 13397 /**
 14595 /**
 13405 
 14603 
 13406 
 14604 
 13407 
 14605 
 13408 
 14606 
 13409 
 14607 
 13410 function ContrastCheckerMessage(_ref) {
 14608 function ContrastCheckerMessage({
 13411   var tinyBackgroundColor = _ref.tinyBackgroundColor,
 14609   tinyBackgroundColor,
 13412       tinyTextColor = _ref.tinyTextColor,
 14610   tinyTextColor,
 13413       backgroundColor = _ref.backgroundColor,
 14611   backgroundColor,
 13414       textColor = _ref.textColor;
 14612   textColor
 13415   var msg = tinyBackgroundColor.getBrightness() < tinyTextColor.getBrightness() ? Object(external_this_wp_i18n_["__"])('This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color.') : Object(external_this_wp_i18n_["__"])('This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.'); // Note: The `Notice` component can speak messages via its `spokenMessage`
 14613 }) {
       
 14614   const msg = tinyBackgroundColor.getBrightness() < tinyTextColor.getBrightness() ? Object(external_wp_i18n_["__"])('This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color.') : Object(external_wp_i18n_["__"])('This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.'); // Note: The `Notice` component can speak messages via its `spokenMessage`
 13416   // prop, but the contrast checker requires granular control over when the
 14615   // prop, but the contrast checker requires granular control over when the
 13417   // announcements are made. Notably, the message will be re-announced if a
 14616   // announcements are made. Notably, the message will be re-announced if a
 13418   // new color combination is selected and the contrast is still insufficient.
 14617   // new color combination is selected and the contrast is still insufficient.
 13419 
 14618 
 13420   Object(external_this_wp_element_["useEffect"])(function () {
 14619   Object(external_wp_element_["useEffect"])(() => {
 13421     Object(external_this_wp_a11y_["speak"])(Object(external_this_wp_i18n_["__"])('This color combination may be hard for people to read.'));
 14620     Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('This color combination may be hard for people to read.'));
 13422   }, [backgroundColor, textColor]);
 14621   }, [backgroundColor, textColor]);
 13423   return Object(external_this_wp_element_["createElement"])("div", {
 14622   return Object(external_wp_element_["createElement"])("div", {
 13424     className: "block-editor-contrast-checker"
 14623     className: "block-editor-contrast-checker"
 13425   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Notice"], {
 14624   }, Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], {
 13426     spokenMessage: null,
 14625     spokenMessage: null,
 13427     status: "warning",
 14626     status: "warning",
 13428     isDismissible: false
 14627     isDismissible: false
 13429   }, msg));
 14628   }, msg));
 13430 }
 14629 }
 13431 
 14630 
 13432 function ContrastChecker(_ref2) {
 14631 function ContrastChecker({
 13433   var backgroundColor = _ref2.backgroundColor,
 14632   backgroundColor,
 13434       fallbackBackgroundColor = _ref2.fallbackBackgroundColor,
 14633   fallbackBackgroundColor,
 13435       fallbackTextColor = _ref2.fallbackTextColor,
 14634   fallbackTextColor,
 13436       fontSize = _ref2.fontSize,
 14635   fontSize,
 13437       isLargeText = _ref2.isLargeText,
 14636   // font size value in pixels
 13438       textColor = _ref2.textColor;
 14637   isLargeText,
 13439 
 14638   textColor
       
 14639 }) {
 13440   if (!(backgroundColor || fallbackBackgroundColor) || !(textColor || fallbackTextColor)) {
 14640   if (!(backgroundColor || fallbackBackgroundColor) || !(textColor || fallbackTextColor)) {
 13441     return null;
 14641     return null;
 13442   }
 14642   }
 13443 
 14643 
 13444   var tinyBackgroundColor = tinycolor_default()(backgroundColor || fallbackBackgroundColor);
 14644   const tinyBackgroundColor = tinycolor_default()(backgroundColor || fallbackBackgroundColor);
 13445   var tinyTextColor = tinycolor_default()(textColor || fallbackTextColor);
 14645   const tinyTextColor = tinycolor_default()(textColor || fallbackTextColor);
 13446   var hasTransparency = tinyBackgroundColor.getAlpha() !== 1 || tinyTextColor.getAlpha() !== 1;
 14646   const hasTransparency = tinyBackgroundColor.getAlpha() !== 1 || tinyTextColor.getAlpha() !== 1;
 13447 
 14647 
 13448   if (hasTransparency || tinycolor_default.a.isReadable(tinyBackgroundColor, tinyTextColor, {
 14648   if (hasTransparency || tinycolor_default.a.isReadable(tinyBackgroundColor, tinyTextColor, {
 13449     level: 'AA',
 14649     level: 'AA',
 13450     size: isLargeText || isLargeText !== false && fontSize >= 24 ? 'large' : 'small'
 14650     size: isLargeText || isLargeText !== false && fontSize >= 24 ? 'large' : 'small'
 13451   })) {
 14651   })) {
 13452     return null;
 14652     return null;
 13453   }
 14653   }
 13454 
 14654 
 13455   return Object(external_this_wp_element_["createElement"])(ContrastCheckerMessage, {
 14655   return Object(external_wp_element_["createElement"])(ContrastCheckerMessage, {
 13456     backgroundColor: backgroundColor,
 14656     backgroundColor: backgroundColor,
 13457     textColor: textColor,
 14657     textColor: textColor,
 13458     tinyBackgroundColor: tinyBackgroundColor,
 14658     tinyBackgroundColor: tinyBackgroundColor,
 13459     tinyTextColor: tinyTextColor
 14659     tinyTextColor: tinyTextColor
 13460   });
 14660   });
 13461 }
 14661 }
 13462 
 14662 
 13463 /* harmony default export */ var contrast_checker = (ContrastChecker);
 14663 /* harmony default export */ var contrast_checker = (ContrastChecker);
 13464 
 14664 
 13465 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-controls/index.js
 14665 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/provider/block-refs-provider.js
 13466 
 14666 
 13467 
 14667 
 13468 /**
 14668 /**
 13469  * WordPress dependencies
 14669  * WordPress dependencies
 13470  */
 14670  */
 13471 
 14671 
       
 14672 const BlockRefs = Object(external_wp_element_["createContext"])();
       
 14673 function BlockRefsProvider({
       
 14674   children
       
 14675 }) {
       
 14676   const value = Object(external_wp_element_["useMemo"])(() => ({
       
 14677     refs: new Map(),
       
 14678     callbacks: new Map()
       
 14679   }), []);
       
 14680   return Object(external_wp_element_["createElement"])(BlockRefs.Provider, {
       
 14681     value: value
       
 14682   }, children);
       
 14683 }
       
 14684 
       
 14685 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-block-refs.js
       
 14686 /**
       
 14687  * WordPress dependencies
       
 14688  */
       
 14689 
       
 14690 
 13472 /**
 14691 /**
 13473  * Internal dependencies
 14692  * Internal dependencies
 13474  */
 14693  */
 13475 
 14694 
 13476 
 14695 
 13477 
 14696 /** @typedef {import('@wordpress/element').RefCallback} RefCallback */
 13478 var inspector_controls_createSlotFill = Object(external_this_wp_components_["createSlotFill"])('InspectorControls'),
 14697 
 13479     inspector_controls_Fill = inspector_controls_createSlotFill.Fill,
 14698 /** @typedef {import('@wordpress/element').RefObject} RefObject */
 13480     inspector_controls_Slot = inspector_controls_createSlotFill.Slot;
 14699 
 13481 
 14700 /**
 13482 function InspectorControls(_ref) {
 14701  * Provides a ref to the BlockRefs context.
 13483   var children = _ref.children;
 14702  *
 13484   return useDisplayBlockControls() ? Object(external_this_wp_element_["createElement"])(inspector_controls_Fill, null, children) : null;
 14703  * @param {string} clientId The client ID of the element ref.
 13485 }
 14704  *
 13486 
 14705  * @return {RefCallback} Ref callback.
 13487 InspectorControls.Slot = inspector_controls_Slot;
 14706  */
 13488 /**
 14707 
 13489  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inspector-controls/README.md
 14708 function useBlockRefProvider(clientId) {
 13490  */
 14709   const {
 13491 
 14710     refs,
 13492 /* harmony default export */ var inspector_controls = (InspectorControls);
 14711     callbacks
 13493 
 14712   } = Object(external_wp_element_["useContext"])(BlockRefs);
 13494 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/dom.js
 14713   const ref = Object(external_wp_element_["useRef"])();
 13495 /**
 14714   Object(external_wp_element_["useLayoutEffect"])(() => {
 13496  * Given a block client ID, returns the corresponding DOM node for the block,
 14715     refs.set(ref, clientId);
 13497  * if exists. As much as possible, this helper should be avoided, and used only
 14716     return () => {
 13498  * in cases where isolated behaviors need remote access to a block node.
 14717       refs.delete(ref);
 13499  *
 14718     };
 13500  * @param {string} clientId Block client ID.
 14719   }, [clientId]);
 13501  *
 14720   return Object(external_wp_compose_["useRefEffect"])(element => {
 13502  * @return {Element?} Block DOM node.
 14721     // Update the ref in the provider.
 13503  */
 14722     ref.current = element; // Call any update functions.
 13504 function getBlockDOMNode(clientId) {
 14723 
 13505   return document.getElementById('block-' + clientId);
 14724     callbacks.forEach((id, setElement) => {
 13506 }
 14725       if (clientId === id) {
 13507 /**
 14726         setElement(element);
 13508  * Returns the preview container DOM node for a given block client ID, or
 14727       }
 13509  * undefined if the container cannot be determined.
 14728     });
 13510  *
 14729   }, [clientId]);
 13511  * @param {string} clientId Block client ID.
 14730 }
 13512  *
 14731 /**
 13513  * @return {Node|undefined} Preview container DOM node.
 14732  * Gets a ref pointing to the current block element. Continues to return a
 13514  */
 14733  * stable ref even if the block client ID changes.
 13515 
 14734  *
 13516 function getBlockPreviewContainerDOMNode(clientId) {
 14735  * @param {string} clientId The client ID to get a ref for.
 13517   var domNode = getBlockDOMNode(clientId);
 14736  *
 13518 
 14737  * @return {RefObject} A ref containing the element.
 13519   if (!domNode) {
 14738  */
 13520     return;
 14739 
 13521   }
 14740 function useBlockRef(clientId) {
 13522 
 14741   const {
 13523   return domNode.firstChild || domNode;
 14742     refs
 13524 }
 14743   } = Object(external_wp_element_["useContext"])(BlockRefs);
 13525 /**
 14744   const freshClientId = Object(external_wp_element_["useRef"])();
 13526  * Returns true if the given element is a block focus stop. Blocks without their
 14745   freshClientId.current = clientId; // Always return an object, even if no ref exists for a given client ID, so
 13527  * own text fields rely on the focus stop to be keyboard navigable.
 14746   // that `current` works at a later point.
 13528  *
 14747 
 13529  * @param {Element} element Element to test.
 14748   return Object(external_wp_element_["useMemo"])(() => ({
 13530  *
 14749     get current() {
 13531  * @return {boolean} Whether element is a block focus stop.
 14750       let element = null; // Multiple refs may be created for a single block. Find the
 13532  */
 14751       // first that has an element set.
 13533 
 14752 
 13534 function isBlockFocusStop(element) {
 14753       for (const [ref, id] of refs.entries()) {
 13535   return element.classList.contains('block-editor-block-list__block');
 14754         if (id === freshClientId.current && ref.current) {
 13536 }
 14755           element = ref.current;
 13537 /**
 14756         }
 13538  * Returns true if two elements are contained within the same block.
 14757       }
 13539  *
 14758 
 13540  * @param {Element} a First element.
 14759       return element;
 13541  * @param {Element} b Second element.
 14760     }
 13542  *
 14761 
 13543  * @return {boolean} Whether elements are in the same block.
 14762   }), []);
 13544  */
 14763 }
 13545 
 14764 /**
 13546 function isInSameBlock(a, b) {
 14765  * Return the element for a given client ID. Updates whenever the element
 13547   return a.closest('.block-editor-block-list__block') === b.closest('.block-editor-block-list__block');
 14766  * changes, becomes available, or disappears.
 13548 }
 14767  *
 13549 /**
 14768  * @param {string} clientId The client ID to an element for.
 13550  * Returns true if an element is considered part of the block and not its
 14769  *
 13551  * children.
 14770  * @return {Element|null} The block's wrapper element.
 13552  *
 14771  */
 13553  * @param {Element} blockElement Block container element.
 14772 
 13554  * @param {Element} element      Element.
 14773 
 13555  *
 14774 function useBlockElement(clientId) {
 13556  * @return {boolean} Whether element is in the block Element but not its
 14775   const {
 13557  *                   children.
 14776     callbacks
 13558  */
 14777   } = Object(external_wp_element_["useContext"])(BlockRefs);
 13559 
 14778   const ref = useBlockRef(clientId);
 13560 function isInsideRootBlock(blockElement, element) {
 14779   const [element, setElement] = Object(external_wp_element_["useState"])(null);
 13561   var parentBlock = element.closest('.block-editor-block-list__block');
 14780   Object(external_wp_element_["useLayoutEffect"])(() => {
 13562   return parentBlock === blockElement;
 14781     if (!clientId) {
 13563 }
 14782       return;
 13564 /**
 14783     }
 13565  * Returns true if the given element contains inner blocks (an InnerBlocks
 14784 
 13566  * element).
 14785     callbacks.set(setElement, clientId);
 13567  *
 14786     return () => {
 13568  * @param {Element} element Element to test.
 14787       callbacks.delete(setElement);
 13569  *
 14788     };
 13570  * @return {boolean} Whether element contains inner blocks.
 14789   }, [clientId]);
 13571  */
 14790   return ref.current || element;
 13572 
 14791 }
 13573 function hasInnerBlocksContext(element) {
 14792 
 13574   return element.classList.contains('block-editor-block-list__layout') || !!element.querySelector('.block-editor-block-list__layout');
 14793 
 13575 }
 14794 
 13576 /**
       
 13577  * Finds the block client ID given any DOM node inside the block.
       
 13578  *
       
 13579  * @param {Node?} node DOM node.
       
 13580  *
       
 13581  * @return {string|undefined} Client ID or undefined if the node is not part of
       
 13582  *                            a block.
       
 13583  */
       
 13584 
       
 13585 function getBlockClientId(node) {
       
 13586   while (node && node.nodeType !== window.Node.ELEMENT_NODE) {
       
 13587     node = node.parentNode;
       
 13588   }
       
 13589 
       
 13590   if (!node) {
       
 13591     return;
       
 13592   }
       
 13593 
       
 13594   var elementNode =
       
 13595   /** @type {Element} */
       
 13596   node;
       
 13597   var blockNode = elementNode.closest('.block-editor-block-list__block');
       
 13598 
       
 13599   if (!blockNode) {
       
 13600     return;
       
 13601   }
       
 13602 
       
 13603   return blockNode.id.slice('block-'.length);
       
 13604 }
       
 13605 
 14795 
 13606 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/color-panel.js
 14796 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/color-panel.js
 13607 
 14797 
 13608 
 14798 
 13609 
       
 13610 /**
 14799 /**
 13611  * WordPress dependencies
 14800  * WordPress dependencies
 13612  */
 14801  */
 13613 
 14802 
 13614 
 14803 
 13618 
 14807 
 13619 
 14808 
 13620 
 14809 
 13621 
 14810 
 13622 
 14811 
 13623 function ColorPanel(_ref) {
 14812 
 13624   var settings = _ref.settings,
 14813 function getComputedStyle(node) {
 13625       clientId = _ref.clientId,
 14814   return node.ownerDocument.defaultView.getComputedStyle(node);
 13626       _ref$enableContrastCh = _ref.enableContrastChecking,
 14815 }
 13627       enableContrastChecking = _ref$enableContrastCh === void 0 ? true : _ref$enableContrastCh;
 14816 
 13628   var _window = window,
 14817 function ColorPanel({
 13629       getComputedStyle = _window.getComputedStyle,
 14818   settings,
 13630       Node = _window.Node;
 14819   clientId,
 13631 
 14820   enableContrastChecking = true
 13632   var _useState = Object(external_this_wp_element_["useState"])(),
 14821 }) {
 13633       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 14822   const [detectedBackgroundColor, setDetectedBackgroundColor] = Object(external_wp_element_["useState"])();
 13634       detectedBackgroundColor = _useState2[0],
 14823   const [detectedColor, setDetectedColor] = Object(external_wp_element_["useState"])();
 13635       setDetectedBackgroundColor = _useState2[1];
 14824   const ref = useBlockRef(clientId);
 13636 
 14825   Object(external_wp_element_["useEffect"])(() => {
 13637   var _useState3 = Object(external_this_wp_element_["useState"])(),
       
 13638       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
       
 13639       detectedColor = _useState4[0],
       
 13640       setDetectedColor = _useState4[1];
       
 13641 
       
 13642   Object(external_this_wp_element_["useEffect"])(function () {
       
 13643     if (!enableContrastChecking) {
 14826     if (!enableContrastChecking) {
 13644       return;
 14827       return;
 13645     }
 14828     }
 13646 
 14829 
 13647     var colorsDetectionElement = getBlockDOMNode(clientId);
 14830     if (!ref.current) {
 13648 
       
 13649     if (!colorsDetectionElement) {
       
 13650       return;
 14831       return;
 13651     }
 14832     }
 13652 
 14833 
 13653     setDetectedColor(getComputedStyle(colorsDetectionElement).color);
 14834     setDetectedColor(getComputedStyle(ref.current).color);
 13654     var backgroundColorNode = colorsDetectionElement;
 14835     let backgroundColorNode = ref.current;
 13655     var backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
 14836     let backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
 13656 
 14837 
 13657     while (backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === Node.ELEMENT_NODE) {
 14838     while (backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === backgroundColorNode.parentNode.ELEMENT_NODE) {
 13658       backgroundColorNode = backgroundColorNode.parentNode;
 14839       backgroundColorNode = backgroundColorNode.parentNode;
 13659       backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
 14840       backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
 13660     }
 14841     }
 13661 
 14842 
 13662     setDetectedBackgroundColor(backgroundColor);
 14843     setDetectedBackgroundColor(backgroundColor);
 13663   });
 14844   });
 13664   return Object(external_this_wp_element_["createElement"])(inspector_controls, null, Object(external_this_wp_element_["createElement"])(panel_color_gradient_settings, {
 14845   return Object(external_wp_element_["createElement"])(inspector_controls, null, Object(external_wp_element_["createElement"])(panel_color_gradient_settings, {
 13665     title: Object(external_this_wp_i18n_["__"])('Color settings'),
 14846     title: Object(external_wp_i18n_["__"])('Color'),
 13666     initialOpen: false,
 14847     initialOpen: false,
 13667     settings: settings
 14848     settings: settings
 13668   }, enableContrastChecking && Object(external_this_wp_element_["createElement"])(contrast_checker, {
 14849   }, enableContrastChecking && Object(external_wp_element_["createElement"])(contrast_checker, {
 13669     backgroundColor: detectedBackgroundColor,
 14850     backgroundColor: detectedBackgroundColor,
 13670     textColor: detectedColor
 14851     textColor: detectedColor
 13671   })));
 14852   })));
 13672 }
 14853 }
 13673 
 14854 
 13674 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/color.js
 14855 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/color.js
 13675 
 14856 
 13676 
 14857 
 13677 
 14858 
 13678 
       
 13679 
       
 13680 function color_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; }
       
 13681 
       
 13682 function color_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { color_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 { color_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 13683 
       
 13684 /**
 14859 /**
 13685  * External dependencies
 14860  * External dependencies
 13686  */
 14861  */
 13687 
 14862 
 13688 
 14863 
 13693 
 14868 
 13694 
 14869 
 13695 
 14870 
 13696 
 14871 
 13697 
 14872 
 13698 
       
 13699 /**
 14873 /**
 13700  * Internal dependencies
 14874  * Internal dependencies
 13701  */
 14875  */
 13702 
 14876 
 13703 
 14877 
 13704 
 14878 
 13705 
 14879 
 13706 
 14880 
 13707 var COLOR_SUPPORT_KEY = '__experimentalColor';
 14881 
 13708 
 14882 const COLOR_SUPPORT_KEY = 'color';
 13709 var color_hasColorSupport = function hasColorSupport(blockType) {
 14883 const color_EMPTY_ARRAY = [];
 13710   return external_this_wp_element_["Platform"].OS === 'web' && Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
 14884 
       
 14885 const hasColorSupport = blockType => {
       
 14886   const colorSupport = Object(external_wp_blocks_["getBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
       
 14887   return colorSupport && (colorSupport.link === true || colorSupport.gradient === true || colorSupport.background !== false || colorSupport.text !== false);
 13711 };
 14888 };
 13712 
 14889 
 13713 var color_hasLinkColorSupport = function hasLinkColorSupport(blockType) {
 14890 const color_shouldSkipSerialization = blockType => {
 13714   if (external_this_wp_element_["Platform"].OS !== 'web') {
 14891   const colorSupport = Object(external_wp_blocks_["getBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
       
 14892   return colorSupport === null || colorSupport === void 0 ? void 0 : colorSupport.__experimentalSkipSerialization;
       
 14893 };
       
 14894 
       
 14895 const hasLinkColorSupport = blockType => {
       
 14896   if (external_wp_element_["Platform"].OS !== 'web') {
 13715     return false;
 14897     return false;
 13716   }
 14898   }
 13717 
 14899 
 13718   var colorSupport = Object(external_this_wp_blocks_["getBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
 14900   const colorSupport = Object(external_wp_blocks_["getBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
 13719   return Object(external_this_lodash_["isObject"])(colorSupport) && !!colorSupport.linkColor;
 14901   return Object(external_lodash_["isObject"])(colorSupport) && !!colorSupport.link;
 13720 };
 14902 };
 13721 
 14903 
 13722 var color_hasGradientSupport = function hasGradientSupport(blockType) {
 14904 const hasGradientSupport = blockType => {
 13723   if (external_this_wp_element_["Platform"].OS !== 'web') {
 14905   if (external_wp_element_["Platform"].OS !== 'web') {
 13724     return false;
 14906     return false;
 13725   }
 14907   }
 13726 
 14908 
 13727   var colorSupport = Object(external_this_wp_blocks_["getBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
 14909   const colorSupport = Object(external_wp_blocks_["getBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
 13728   return Object(external_this_lodash_["isObject"])(colorSupport) && !!colorSupport.gradients;
 14910   return Object(external_lodash_["isObject"])(colorSupport) && !!colorSupport.gradients;
       
 14911 };
       
 14912 
       
 14913 const hasBackgroundColorSupport = blockType => {
       
 14914   const colorSupport = Object(external_wp_blocks_["getBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
       
 14915   return colorSupport && colorSupport.background !== false;
       
 14916 };
       
 14917 
       
 14918 const hasTextColorSupport = blockType => {
       
 14919   const colorSupport = Object(external_wp_blocks_["getBlockSupport"])(blockType, COLOR_SUPPORT_KEY);
       
 14920   return colorSupport && colorSupport.text !== false;
 13729 };
 14921 };
 13730 /**
 14922 /**
 13731  * Filters registered block settings, extending attributes to include
 14923  * Filters registered block settings, extending attributes to include
 13732  * `backgroundColor` and `textColor` attribute.
 14924  * `backgroundColor` and `textColor` attribute.
 13733  *
 14925  *
 13734  * @param  {Object} settings Original block settings
 14926  * @param  {Object} settings Original block settings
 13735  * @return {Object}          Filtered block settings
 14927  * @return {Object}          Filtered block settings
 13736  */
 14928  */
 13737 
 14929 
 13738 
 14930 
 13739 function addAttributes(settings) {
 14931 function color_addAttributes(settings) {
 13740   if (!color_hasColorSupport(settings)) {
 14932   if (!hasColorSupport(settings)) {
 13741     return settings;
 14933     return settings;
 13742   } // allow blocks to specify their own attribute definition with default values if needed.
 14934   } // allow blocks to specify their own attribute definition with default values if needed.
 13743 
 14935 
 13744 
 14936 
 13745   if (!settings.attributes.backgroundColor) {
 14937   if (!settings.attributes.backgroundColor) {
 13756         type: 'string'
 14948         type: 'string'
 13757       }
 14949       }
 13758     });
 14950     });
 13759   }
 14951   }
 13760 
 14952 
 13761   if (color_hasGradientSupport(settings) && !settings.attributes.gradient) {
 14953   if (hasGradientSupport(settings) && !settings.attributes.gradient) {
 13762     Object.assign(settings.attributes, {
 14954     Object.assign(settings.attributes, {
 13763       gradient: {
 14955       gradient: {
 13764         type: 'string'
 14956         type: 'string'
 13765       }
 14957       }
 13766     });
 14958     });
 13777  * @return {Object}            Filtered props applied to save element
 14969  * @return {Object}            Filtered props applied to save element
 13778  */
 14970  */
 13779 
 14971 
 13780 
 14972 
 13781 function color_addSaveProps(props, blockType, attributes) {
 14973 function color_addSaveProps(props, blockType, attributes) {
 13782   var _style$color, _style$color2, _style$color3, _style$color4, _style$color5, _classnames;
 14974   var _style$color, _style$color2, _style$color3, _style$color4, _style$elements, _style$elements$link;
 13783 
 14975 
 13784   if (!color_hasColorSupport(blockType)) {
 14976   if (!hasColorSupport(blockType) || color_shouldSkipSerialization(blockType)) {
 13785     return props;
 14977     return props;
 13786   }
 14978   }
 13787 
 14979 
 13788   var hasGradient = color_hasGradientSupport(blockType); // I'd have prefered to avoid the "style" attribute usage here
 14980   const hasGradient = hasGradientSupport(blockType); // I'd have prefered to avoid the "style" attribute usage here
 13789 
 14981 
 13790   var backgroundColor = attributes.backgroundColor,
 14982   const {
 13791       textColor = attributes.textColor,
 14983     backgroundColor,
 13792       gradient = attributes.gradient,
 14984     textColor,
 13793       style = attributes.style;
 14985     gradient,
 13794   var backgroundClass = getColorClassName('background-color', backgroundColor);
 14986     style
 13795 
 14987   } = attributes;
 13796   var gradientClass = __experimentalGetGradientClass(gradient);
 14988   const backgroundClass = getColorClassName('background-color', backgroundColor);
 13797 
 14989 
 13798   var textClass = getColorClassName('color', textColor);
 14990   const gradientClass = __experimentalGetGradientClass(gradient);
 13799   var newClassName = classnames_default()(props.className, textClass, gradientClass, (_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, backgroundClass, (!hasGradient || !(style === null || style === void 0 ? void 0 : (_style$color = style.color) === null || _style$color === void 0 ? void 0 : _style$color.gradient)) && !!backgroundClass), Object(defineProperty["a" /* default */])(_classnames, 'has-text-color', textColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.text)), Object(defineProperty["a" /* default */])(_classnames, 'has-background', backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.background) || hasGradient && (gradient || (style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.gradient))), Object(defineProperty["a" /* default */])(_classnames, 'has-link-color', style === null || style === void 0 ? void 0 : (_style$color5 = style.color) === null || _style$color5 === void 0 ? void 0 : _style$color5.link), _classnames));
 14991 
       
 14992   const textClass = getColorClassName('color', textColor);
       
 14993   const newClassName = classnames_default()(props.className, textClass, gradientClass, {
       
 14994     // Don't apply the background class if there's a custom gradient
       
 14995     [backgroundClass]: (!hasGradient || !(style !== null && style !== void 0 && (_style$color = style.color) !== null && _style$color !== void 0 && _style$color.gradient)) && !!backgroundClass,
       
 14996     'has-text-color': textColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.text),
       
 14997     'has-background': backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.background) || hasGradient && (gradient || (style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.gradient)),
       
 14998     'has-link-color': style === null || style === void 0 ? void 0 : (_style$elements = style.elements) === null || _style$elements === void 0 ? void 0 : (_style$elements$link = _style$elements.link) === null || _style$elements$link === void 0 ? void 0 : _style$elements$link.color
       
 14999   });
 13800   props.className = newClassName ? newClassName : undefined;
 15000   props.className = newClassName ? newClassName : undefined;
 13801   return props;
 15001   return props;
 13802 }
 15002 }
 13803 /**
 15003 /**
 13804  * Filters registered block settings to extand the block edit wrapper
 15004  * Filters registered block settings to extand the block edit wrapper
 13806  *
 15006  *
 13807  * @param  {Object} settings Original block settings
 15007  * @param  {Object} settings Original block settings
 13808  * @return {Object}          Filtered block settings
 15008  * @return {Object}          Filtered block settings
 13809  */
 15009  */
 13810 
 15010 
 13811 function addEditProps(settings) {
 15011 function color_addEditProps(settings) {
 13812   if (!color_hasColorSupport(settings)) {
 15012   if (!hasColorSupport(settings) || color_shouldSkipSerialization(settings)) {
 13813     return settings;
 15013     return settings;
 13814   }
 15014   }
 13815 
 15015 
 13816   var existingGetEditWrapperProps = settings.getEditWrapperProps;
 15016   const existingGetEditWrapperProps = settings.getEditWrapperProps;
 13817 
 15017 
 13818   settings.getEditWrapperProps = function (attributes) {
 15018   settings.getEditWrapperProps = attributes => {
 13819     var props = {};
 15019     let props = {};
 13820 
 15020 
 13821     if (existingGetEditWrapperProps) {
 15021     if (existingGetEditWrapperProps) {
 13822       props = existingGetEditWrapperProps(attributes);
 15022       props = existingGetEditWrapperProps(attributes);
 13823     }
 15023     }
 13824 
 15024 
 13826   };
 15026   };
 13827 
 15027 
 13828   return settings;
 15028   return settings;
 13829 }
 15029 }
 13830 
 15030 
 13831 var color_getLinkColorFromAttributeValue = function getLinkColorFromAttributeValue(colors, value) {
 15031 const getLinkColorFromAttributeValue = (colors, value) => {
 13832   var attributeParsed = /var:preset\|color\|(.+)/.exec(value);
 15032   const attributeParsed = /var:preset\|color\|(.+)/.exec(value);
 13833 
 15033 
 13834   if (attributeParsed && attributeParsed[1]) {
 15034   if (attributeParsed && attributeParsed[1]) {
 13835     return utils_getColorObjectByAttributeValues(colors, attributeParsed[1]).color;
 15035     return getColorObjectByAttributeValues(colors, attributeParsed[1]).color;
 13836   }
 15036   }
 13837 
 15037 
 13838   return value;
 15038   return value;
 13839 };
 15039 };
       
 15040 
       
 15041 function immutableSet(object, path, value) {
       
 15042   return Object(external_lodash_["setWith"])(object ? Object(external_lodash_["clone"])(object) : {}, path, value, external_lodash_["clone"]);
       
 15043 }
 13840 /**
 15044 /**
 13841  * Inspector control panel containing the color related configuration
 15045  * Inspector control panel containing the color related configuration
 13842  *
 15046  *
 13843  * @param {Object} props
 15047  * @param {Object} props
 13844  *
 15048  *
 13845  * @return {WPElement} Color edit element.
 15049  * @return {WPElement} Color edit element.
 13846  */
 15050  */
 13847 
 15051 
 13848 
 15052 
 13849 function ColorEdit(props) {
 15053 function ColorEdit(props) {
 13850   var _style$color7, _style$color8, _style$color9, _style$color10, _props$attributes$sty2, _props$attributes$sty3;
 15054   var _style$color6, _style$color7, _style$color8, _style$elements2, _style$elements2$link, _style$elements2$link2, _style$elements3, _style$elements3$link, _style$elements3$link2;
 13851 
 15055 
 13852   var blockName = props.name,
 15056   const {
 13853       attributes = props.attributes;
 15057     name: blockName,
 13854 
 15058     attributes
 13855   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 15059   } = props;
 13856     return select('core/block-editor').getSettings();
 15060   const solids = useSetting('color.palette') || color_EMPTY_ARRAY;
 13857   }, []),
 15061   const gradients = useSetting('color.gradients') || color_EMPTY_ARRAY;
 13858       colors = _useSelect.colors,
 15062   const areCustomSolidsEnabled = useSetting('color.custom');
 13859       gradients = _useSelect.gradients,
 15063   const areCustomGradientsEnabled = useSetting('color.customGradient');
 13860       __experimentalEnableLinkColor = _useSelect.__experimentalEnableLinkColor; // Shouldn't be needed but right now the ColorGradientsPanel
 15064   const isLinkEnabled = useSetting('color.link'); // Shouldn't be needed but right now the ColorGradientsPanel
 13861   // can trigger both onChangeColor and onChangeBackground
 15065   // can trigger both onChangeColor and onChangeBackground
 13862   // synchronously causing our two callbacks to override changes
 15066   // synchronously causing our two callbacks to override changes
 13863   // from each other.
 15067   // from each other.
 13864 
 15068 
 13865 
 15069   const localAttributes = Object(external_wp_element_["useRef"])(attributes);
 13866   var localAttributes = Object(external_this_wp_element_["useRef"])(attributes);
 15070   Object(external_wp_element_["useEffect"])(() => {
 13867   Object(external_this_wp_element_["useEffect"])(function () {
       
 13868     localAttributes.current = attributes;
 15071     localAttributes.current = attributes;
 13869   }, [attributes]);
 15072   }, [attributes]);
 13870 
 15073 
 13871   if (!color_hasColorSupport(blockName)) {
 15074   if (!hasColorSupport(blockName) || external_wp_element_["Platform"].OS !== 'web') {
 13872     return null;
 15075     return null;
 13873   }
 15076   }
 13874 
 15077 
 13875   var hasGradient = color_hasGradientSupport(blockName);
 15078   const hasLinkColor = hasLinkColorSupport(blockName) && isLinkEnabled && (solids.length > 0 || areCustomSolidsEnabled);
 13876   var style = attributes.style,
 15079   const hasTextColor = hasTextColorSupport(blockName) && (solids.length > 0 || areCustomSolidsEnabled);
 13877       textColor = attributes.textColor,
 15080   const hasBackgroundColor = hasBackgroundColorSupport(blockName) && (solids.length > 0 || areCustomSolidsEnabled);
 13878       backgroundColor = attributes.backgroundColor,
 15081   const hasGradientColor = hasGradientSupport(blockName) && (gradients.length > 0 || areCustomGradientsEnabled);
 13879       gradient = attributes.gradient;
 15082 
 13880   var gradientValue;
 15083   if (!hasLinkColor && !hasTextColor && !hasBackgroundColor && !hasGradientColor) {
 13881 
 15084     return null;
 13882   if (hasGradient && gradient) {
 15085   }
       
 15086 
       
 15087   const {
       
 15088     style,
       
 15089     textColor,
       
 15090     backgroundColor,
       
 15091     gradient
       
 15092   } = attributes;
       
 15093   let gradientValue;
       
 15094 
       
 15095   if (hasGradientColor && gradient) {
 13883     gradientValue = getGradientValueBySlug(gradients, gradient);
 15096     gradientValue = getGradientValueBySlug(gradients, gradient);
 13884   } else if (hasGradient) {
 15097   } else if (hasGradientColor) {
 13885     var _style$color6;
 15098     var _style$color5;
 13886 
 15099 
 13887     gradientValue = style === null || style === void 0 ? void 0 : (_style$color6 = style.color) === null || _style$color6 === void 0 ? void 0 : _style$color6.gradient;
 15100     gradientValue = style === null || style === void 0 ? void 0 : (_style$color5 = style.color) === null || _style$color5 === void 0 ? void 0 : _style$color5.gradient;
 13888   }
 15101   }
 13889 
 15102 
 13890   var onChangeColor = function onChangeColor(name) {
 15103   const onChangeColor = name => value => {
 13891     return function (value) {
 15104     var _localAttributes$curr, _localAttributes$curr2;
 13892       var _localAttributes$curr, _localAttributes$curr2;
 15105 
 13893 
 15106     const colorObject = getColorObjectByColorValue(solids, value);
 13894       var colorObject = utils_getColorObjectByColorValue(colors, value);
 15107     const attributeName = name + 'Color';
 13895       var attributeName = name + 'Color';
 15108     const newStyle = { ...localAttributes.current.style,
 13896 
 15109       color: { ...((_localAttributes$curr = localAttributes.current) === null || _localAttributes$curr === void 0 ? void 0 : (_localAttributes$curr2 = _localAttributes$curr.style) === null || _localAttributes$curr2 === void 0 ? void 0 : _localAttributes$curr2.color),
 13897       var newStyle = color_objectSpread({}, localAttributes.current.style, {
 15110         [name]: colorObject !== null && colorObject !== void 0 && colorObject.slug ? undefined : value
 13898         color: color_objectSpread({}, (_localAttributes$curr = localAttributes.current) === null || _localAttributes$curr === void 0 ? void 0 : (_localAttributes$curr2 = _localAttributes$curr.style) === null || _localAttributes$curr2 === void 0 ? void 0 : _localAttributes$curr2.color, Object(defineProperty["a" /* default */])({}, name, (colorObject === null || colorObject === void 0 ? void 0 : colorObject.slug) ? undefined : value))
 15111       }
 13899       });
 15112     };
 13900 
 15113     const newNamedColor = colorObject !== null && colorObject !== void 0 && colorObject.slug ? colorObject.slug : undefined;
 13901       var newNamedColor = (colorObject === null || colorObject === void 0 ? void 0 : colorObject.slug) ? colorObject.slug : undefined;
 15114     const newAttributes = {
 13902 
 15115       style: cleanEmptyObject(newStyle),
 13903       var newAttributes = Object(defineProperty["a" /* default */])({
 15116       [attributeName]: newNamedColor
 13904         style: utils_cleanEmptyObject(newStyle)
 15117     };
 13905       }, attributeName, newNamedColor);
 15118     props.setAttributes(newAttributes);
 13906 
 15119     localAttributes.current = { ...localAttributes.current,
 13907       props.setAttributes(newAttributes);
 15120       ...newAttributes
 13908       localAttributes.current = color_objectSpread({}, localAttributes.current, {}, newAttributes);
       
 13909     };
 15121     };
 13910   };
 15122   };
 13911 
 15123 
 13912   var onChangeGradient = function onChangeGradient(value) {
 15124   const onChangeGradient = value => {
 13913     var slug = getGradientSlugByValue(gradients, value);
 15125     const slug = getGradientSlugByValue(gradients, value);
 13914     var newAttributes;
 15126     let newAttributes;
 13915 
 15127 
 13916     if (slug) {
 15128     if (slug) {
 13917       var _localAttributes$curr3, _localAttributes$curr4, _localAttributes$curr5;
 15129       var _localAttributes$curr3, _localAttributes$curr4, _localAttributes$curr5;
 13918 
 15130 
 13919       var newStyle = color_objectSpread({}, (_localAttributes$curr3 = localAttributes.current) === null || _localAttributes$curr3 === void 0 ? void 0 : _localAttributes$curr3.style, {
 15131       const newStyle = { ...((_localAttributes$curr3 = localAttributes.current) === null || _localAttributes$curr3 === void 0 ? void 0 : _localAttributes$curr3.style),
 13920         color: color_objectSpread({}, (_localAttributes$curr4 = localAttributes.current) === null || _localAttributes$curr4 === void 0 ? void 0 : (_localAttributes$curr5 = _localAttributes$curr4.style) === null || _localAttributes$curr5 === void 0 ? void 0 : _localAttributes$curr5.color, {
 15132         color: { ...((_localAttributes$curr4 = localAttributes.current) === null || _localAttributes$curr4 === void 0 ? void 0 : (_localAttributes$curr5 = _localAttributes$curr4.style) === null || _localAttributes$curr5 === void 0 ? void 0 : _localAttributes$curr5.color),
 13921           gradient: undefined
 15133           gradient: undefined
 13922         })
 15134         }
 13923       });
 15135       };
 13924 
       
 13925       newAttributes = {
 15136       newAttributes = {
 13926         style: utils_cleanEmptyObject(newStyle),
 15137         style: cleanEmptyObject(newStyle),
 13927         gradient: slug
 15138         gradient: slug
 13928       };
 15139       };
 13929     } else {
 15140     } else {
 13930       var _localAttributes$curr6, _localAttributes$curr7, _localAttributes$curr8;
 15141       var _localAttributes$curr6, _localAttributes$curr7, _localAttributes$curr8;
 13931 
 15142 
 13932       var _newStyle = color_objectSpread({}, (_localAttributes$curr6 = localAttributes.current) === null || _localAttributes$curr6 === void 0 ? void 0 : _localAttributes$curr6.style, {
 15143       const newStyle = { ...((_localAttributes$curr6 = localAttributes.current) === null || _localAttributes$curr6 === void 0 ? void 0 : _localAttributes$curr6.style),
 13933         color: color_objectSpread({}, (_localAttributes$curr7 = localAttributes.current) === null || _localAttributes$curr7 === void 0 ? void 0 : (_localAttributes$curr8 = _localAttributes$curr7.style) === null || _localAttributes$curr8 === void 0 ? void 0 : _localAttributes$curr8.color, {
 15144         color: { ...((_localAttributes$curr7 = localAttributes.current) === null || _localAttributes$curr7 === void 0 ? void 0 : (_localAttributes$curr8 = _localAttributes$curr7.style) === null || _localAttributes$curr8 === void 0 ? void 0 : _localAttributes$curr8.color),
 13934           gradient: value
 15145           gradient: value
 13935         })
 15146         }
 13936       });
 15147       };
 13937 
       
 13938       newAttributes = {
 15148       newAttributes = {
 13939         style: utils_cleanEmptyObject(_newStyle),
 15149         style: cleanEmptyObject(newStyle),
 13940         gradient: undefined
 15150         gradient: undefined
 13941       };
 15151       };
 13942     }
 15152     }
 13943 
 15153 
 13944     props.setAttributes(newAttributes);
 15154     props.setAttributes(newAttributes);
 13945     localAttributes.current = color_objectSpread({}, localAttributes.current, {}, newAttributes);
 15155     localAttributes.current = { ...localAttributes.current,
       
 15156       ...newAttributes
       
 15157     };
 13946   };
 15158   };
 13947 
 15159 
 13948   var onChangeLinkColor = function onChangeLinkColor(value) {
 15160   const onChangeLinkColor = value => {
 13949     var _props$attributes$sty;
 15161     const colorObject = getColorObjectByColorValue(solids, value);
 13950 
 15162     const newLinkColorValue = colorObject !== null && colorObject !== void 0 && colorObject.slug ? `var:preset|color|${colorObject.slug}` : value;
 13951     var colorObject = utils_getColorObjectByColorValue(colors, value);
 15163     const newStyle = immutableSet(style, ['elements', 'link', 'color', 'text'], newLinkColorValue);
 13952     props.setAttributes({
 15164     props.setAttributes({
 13953       style: color_objectSpread({}, props.attributes.style, {
 15165       style: newStyle
 13954         color: color_objectSpread({}, (_props$attributes$sty = props.attributes.style) === null || _props$attributes$sty === void 0 ? void 0 : _props$attributes$sty.color, {
 15166     });
 13955           link: (colorObject === null || colorObject === void 0 ? void 0 : colorObject.slug) ? "var:preset|color|".concat(colorObject.slug) : value
 15167   };
 13956         })
 15168 
       
 15169   return Object(external_wp_element_["createElement"])(ColorPanel, {
       
 15170     enableContrastChecking: // Turn on contrast checker for web only since it's not supported on mobile yet.
       
 15171     external_wp_element_["Platform"].OS === 'web' && !gradient && !(style !== null && style !== void 0 && (_style$color6 = style.color) !== null && _style$color6 !== void 0 && _style$color6.gradient),
       
 15172     clientId: props.clientId,
       
 15173     settings: [...(hasTextColor ? [{
       
 15174       label: Object(external_wp_i18n_["__"])('Text color'),
       
 15175       onColorChange: onChangeColor('text'),
       
 15176       colorValue: getColorObjectByAttributeValues(solids, textColor, style === null || style === void 0 ? void 0 : (_style$color7 = style.color) === null || _style$color7 === void 0 ? void 0 : _style$color7.text).color
       
 15177     }] : []), ...(hasBackgroundColor || hasGradientColor ? [{
       
 15178       label: Object(external_wp_i18n_["__"])('Background color'),
       
 15179       onColorChange: hasBackgroundColor ? onChangeColor('background') : undefined,
       
 15180       colorValue: getColorObjectByAttributeValues(solids, backgroundColor, style === null || style === void 0 ? void 0 : (_style$color8 = style.color) === null || _style$color8 === void 0 ? void 0 : _style$color8.background).color,
       
 15181       gradientValue,
       
 15182       onGradientChange: hasGradientColor ? onChangeGradient : undefined
       
 15183     }] : []), ...(hasLinkColor ? [{
       
 15184       label: Object(external_wp_i18n_["__"])('Link Color'),
       
 15185       onColorChange: onChangeLinkColor,
       
 15186       colorValue: getLinkColorFromAttributeValue(solids, style === null || style === void 0 ? void 0 : (_style$elements2 = style.elements) === null || _style$elements2 === void 0 ? void 0 : (_style$elements2$link = _style$elements2.link) === null || _style$elements2$link === void 0 ? void 0 : (_style$elements2$link2 = _style$elements2$link.color) === null || _style$elements2$link2 === void 0 ? void 0 : _style$elements2$link2.text),
       
 15187       clearable: !!(style !== null && style !== void 0 && (_style$elements3 = style.elements) !== null && _style$elements3 !== void 0 && (_style$elements3$link = _style$elements3.link) !== null && _style$elements3$link !== void 0 && (_style$elements3$link2 = _style$elements3$link.color) !== null && _style$elements3$link2 !== void 0 && _style$elements3$link2.text)
       
 15188     }] : [])]
       
 15189   });
       
 15190 }
       
 15191 /**
       
 15192  * This adds inline styles for color palette colors.
       
 15193  * Ideally, this is not needed and themes should load their palettes on the editor.
       
 15194  *
       
 15195  * @param  {Function} BlockListBlock Original component
       
 15196  * @return {Function}                Wrapped component
       
 15197  */
       
 15198 
       
 15199 const withColorPaletteStyles = Object(external_wp_compose_["createHigherOrderComponent"])(BlockListBlock => props => {
       
 15200   var _getColorObjectByAttr, _getColorObjectByAttr2, _props$wrapperProps;
       
 15201 
       
 15202   const {
       
 15203     name,
       
 15204     attributes
       
 15205   } = props;
       
 15206   const {
       
 15207     backgroundColor,
       
 15208     textColor
       
 15209   } = attributes;
       
 15210   const colors = useSetting('color.palette') || color_EMPTY_ARRAY;
       
 15211 
       
 15212   if (!hasColorSupport(name) || color_shouldSkipSerialization(name)) {
       
 15213     return Object(external_wp_element_["createElement"])(BlockListBlock, props);
       
 15214   }
       
 15215 
       
 15216   const extraStyles = {
       
 15217     color: textColor ? (_getColorObjectByAttr = getColorObjectByAttributeValues(colors, textColor)) === null || _getColorObjectByAttr === void 0 ? void 0 : _getColorObjectByAttr.color : undefined,
       
 15218     backgroundColor: backgroundColor ? (_getColorObjectByAttr2 = getColorObjectByAttributeValues(colors, backgroundColor)) === null || _getColorObjectByAttr2 === void 0 ? void 0 : _getColorObjectByAttr2.color : undefined
       
 15219   };
       
 15220   let wrapperProps = props.wrapperProps;
       
 15221   wrapperProps = { ...props.wrapperProps,
       
 15222     style: { ...extraStyles,
       
 15223       ...((_props$wrapperProps = props.wrapperProps) === null || _props$wrapperProps === void 0 ? void 0 : _props$wrapperProps.style)
       
 15224     }
       
 15225   };
       
 15226   return Object(external_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, {
       
 15227     wrapperProps: wrapperProps
       
 15228   }));
       
 15229 });
       
 15230 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/color/addAttribute', color_addAttributes);
       
 15231 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/color/addSaveProps', color_addSaveProps);
       
 15232 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/color/addEditProps', color_addEditProps);
       
 15233 Object(external_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/color/with-color-palette-styles', withColorPaletteStyles);
       
 15234 
       
 15235 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-underline.js
       
 15236 
       
 15237 
       
 15238 /**
       
 15239  * WordPress dependencies
       
 15240  */
       
 15241 
       
 15242 const formatUnderline = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 15243   xmlns: "http://www.w3.org/2000/svg",
       
 15244   viewBox: "0 0 24 24"
       
 15245 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 15246   d: "M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"
       
 15247 }));
       
 15248 /* harmony default export */ var format_underline = (formatUnderline);
       
 15249 
       
 15250 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/format-strikethrough.js
       
 15251 var format_strikethrough = __webpack_require__("Crq9");
       
 15252 
       
 15253 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/text-decoration-control/index.js
       
 15254 
       
 15255 
       
 15256 /**
       
 15257  * WordPress dependencies
       
 15258  */
       
 15259 
       
 15260 
       
 15261 
       
 15262 const TEXT_DECORATIONS = [{
       
 15263   name: Object(external_wp_i18n_["__"])('Underline'),
       
 15264   value: 'underline',
       
 15265   icon: format_underline
       
 15266 }, {
       
 15267   name: Object(external_wp_i18n_["__"])('Strikethrough'),
       
 15268   value: 'line-through',
       
 15269   icon: format_strikethrough["a" /* default */]
       
 15270 }];
       
 15271 /**
       
 15272  * Control to facilitate text decoration selections.
       
 15273  *
       
 15274  * @param  {Object}   props                 Component props.
       
 15275  * @param  {string}   props.value           Currently selected text decoration.
       
 15276  * @param  {Function} props.onChange        Handles change in text decoration selection.
       
 15277  * @return {WPElement}                      Text decoration control.
       
 15278  */
       
 15279 
       
 15280 function TextDecorationControl({
       
 15281   value,
       
 15282   onChange
       
 15283 }) {
       
 15284   return Object(external_wp_element_["createElement"])("fieldset", {
       
 15285     className: "block-editor-text-decoration-control"
       
 15286   }, Object(external_wp_element_["createElement"])("legend", null, Object(external_wp_i18n_["__"])('Decoration')), Object(external_wp_element_["createElement"])("div", {
       
 15287     className: "block-editor-text-decoration-control__buttons"
       
 15288   }, TEXT_DECORATIONS.map(textDecoration => {
       
 15289     return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 15290       key: textDecoration.value,
       
 15291       icon: textDecoration.icon,
       
 15292       isSmall: true,
       
 15293       isPressed: textDecoration.value === value,
       
 15294       onClick: () => onChange(textDecoration.value === value ? undefined : textDecoration.value),
       
 15295       "aria-label": textDecoration.name
       
 15296     });
       
 15297   })));
       
 15298 }
       
 15299 
       
 15300 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/text-decoration.js
       
 15301 
       
 15302 
       
 15303 /**
       
 15304  * WordPress dependencies
       
 15305  */
       
 15306 
       
 15307 /**
       
 15308  * Internal dependencies
       
 15309  */
       
 15310 
       
 15311 
       
 15312 
       
 15313 
       
 15314 /**
       
 15315  * Key within block settings' supports array indicating support for text
       
 15316  * decorations e.g. settings found in `block.json`.
       
 15317  */
       
 15318 
       
 15319 const TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';
       
 15320 /**
       
 15321  * Inspector control panel containing the text decoration options.
       
 15322  *
       
 15323  * @param  {Object} props Block properties.
       
 15324  * @return {WPElement}    Text decoration edit element.
       
 15325  */
       
 15326 
       
 15327 function TextDecorationEdit(props) {
       
 15328   var _style$typography;
       
 15329 
       
 15330   const {
       
 15331     attributes: {
       
 15332       style
       
 15333     },
       
 15334     setAttributes
       
 15335   } = props;
       
 15336   const isDisabled = useIsTextDecorationDisabled(props);
       
 15337 
       
 15338   if (isDisabled) {
       
 15339     return null;
       
 15340   }
       
 15341 
       
 15342   function onChange(newDecoration) {
       
 15343     setAttributes({
       
 15344       style: cleanEmptyObject({ ...style,
       
 15345         typography: { ...(style === null || style === void 0 ? void 0 : style.typography),
       
 15346           textDecoration: newDecoration
       
 15347         }
 13957       })
 15348       })
 13958     });
 15349     });
 13959   };
 15350   }
 13960 
 15351 
 13961   return Object(external_this_wp_element_["createElement"])(ColorPanel, {
 15352   return Object(external_wp_element_["createElement"])(TextDecorationControl, {
 13962     enableContrastChecking: // Turn on contrast checker for web only since it's not supported on mobile yet.
 15353     value: style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.textDecoration,
 13963     external_this_wp_element_["Platform"].OS === 'web' && !gradient && !(style === null || style === void 0 ? void 0 : (_style$color7 = style.color) === null || _style$color7 === void 0 ? void 0 : _style$color7.gradient),
 15354     onChange: onChange
 13964     clientId: props.clientId,
       
 13965     settings: [{
       
 13966       label: Object(external_this_wp_i18n_["__"])('Text Color'),
       
 13967       onColorChange: onChangeColor('text'),
       
 13968       colorValue: utils_getColorObjectByAttributeValues(colors, textColor, style === null || style === void 0 ? void 0 : (_style$color8 = style.color) === null || _style$color8 === void 0 ? void 0 : _style$color8.text).color
       
 13969     }, {
       
 13970       label: Object(external_this_wp_i18n_["__"])('Background Color'),
       
 13971       onColorChange: onChangeColor('background'),
       
 13972       colorValue: utils_getColorObjectByAttributeValues(colors, backgroundColor, style === null || style === void 0 ? void 0 : (_style$color9 = style.color) === null || _style$color9 === void 0 ? void 0 : _style$color9.background).color,
       
 13973       gradientValue: gradientValue,
       
 13974       onGradientChange: hasGradient ? onChangeGradient : undefined
       
 13975     }].concat(Object(toConsumableArray["a" /* default */])(__experimentalEnableLinkColor && color_hasLinkColorSupport(blockName) ? [{
       
 13976       label: Object(external_this_wp_i18n_["__"])('Link Color'),
       
 13977       onColorChange: onChangeLinkColor,
       
 13978       colorValue: color_getLinkColorFromAttributeValue(colors, style === null || style === void 0 ? void 0 : (_style$color10 = style.color) === null || _style$color10 === void 0 ? void 0 : _style$color10.link),
       
 13979       clearable: !!((_props$attributes$sty2 = props.attributes.style) === null || _props$attributes$sty2 === void 0 ? void 0 : (_props$attributes$sty3 = _props$attributes$sty2.color) === null || _props$attributes$sty3 === void 0 ? void 0 : _props$attributes$sty3.link)
       
 13980     }] : []))
       
 13981   });
 15355   });
 13982 }
 15356 }
 13983 /**
 15357 /**
 13984  * This adds inline styles for color palette colors.
 15358  * Checks if text-decoration settings have been disabled.
 13985  * Ideally, this is not needed and themes should load their palettes on the editor.
 15359  *
 13986  *
 15360  * @param  {string} name Name of the block.
 13987  * @param  {Function} BlockListBlock Original component
 15361  * @return {boolean}     Whether or not the setting is disabled.
 13988  * @return {Function}                Wrapped component
 15362  */
 13989  */
 15363 
 13990 
 15364 function useIsTextDecorationDisabled({
 13991 var withColorPaletteStyles = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockListBlock) {
 15365   name: blockName
 13992   return function (props) {
 15366 } = {}) {
 13993     var _getColorObjectByAttr, _getColorObjectByAttr2, _props$wrapperProps;
 15367   const notSupported = !Object(external_wp_blocks_["hasBlockSupport"])(blockName, TEXT_DECORATION_SUPPORT_KEY);
 13994 
 15368   const hasTextDecoration = useSetting('typography.customTextDecorations');
 13995     var name = props.name,
 15369   return notSupported || !hasTextDecoration;
 13996         attributes = props.attributes;
 15370 }
 13997     var backgroundColor = attributes.backgroundColor,
 15371 
 13998         textColor = attributes.textColor;
 15372 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-uppercase.js
 13999     var colors = Object(external_this_wp_data_["useSelect"])(function (select) {
 15373 
 14000       return select('core/block-editor').getSettings().colors;
 15374 
 14001     }, []);
 15375 /**
 14002 
 15376  * WordPress dependencies
 14003     if (!color_hasColorSupport(name)) {
 15377  */
 14004       return Object(external_this_wp_element_["createElement"])(BlockListBlock, props);
 15378 
 14005     }
 15379 const formatUppercase = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 14006 
 15380   xmlns: "http://www.w3.org/2000/svg",
 14007     var extraStyles = {
 15381   viewBox: "0 0 24 24"
 14008       color: textColor ? (_getColorObjectByAttr = utils_getColorObjectByAttributeValues(colors, textColor)) === null || _getColorObjectByAttr === void 0 ? void 0 : _getColorObjectByAttr.color : undefined,
 15382 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 14009       backgroundColor: backgroundColor ? (_getColorObjectByAttr2 = utils_getColorObjectByAttributeValues(colors, backgroundColor)) === null || _getColorObjectByAttr2 === void 0 ? void 0 : _getColorObjectByAttr2.color : undefined
 15383   d: "M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"
 14010     };
 15384 }));
 14011     var wrapperProps = props.wrapperProps;
 15385 /* harmony default export */ var format_uppercase = (formatUppercase);
 14012     wrapperProps = color_objectSpread({}, props.wrapperProps, {
 15386 
 14013       style: color_objectSpread({}, extraStyles, {}, (_props$wrapperProps = props.wrapperProps) === null || _props$wrapperProps === void 0 ? void 0 : _props$wrapperProps.style)
 15387 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-lowercase.js
       
 15388 
       
 15389 
       
 15390 /**
       
 15391  * WordPress dependencies
       
 15392  */
       
 15393 
       
 15394 const formatLowercase = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 15395   xmlns: "http://www.w3.org/2000/svg",
       
 15396   viewBox: "0 0 24 24"
       
 15397 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 15398   d: "M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"
       
 15399 }));
       
 15400 /* harmony default export */ var format_lowercase = (formatLowercase);
       
 15401 
       
 15402 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-capitalize.js
       
 15403 
       
 15404 
       
 15405 /**
       
 15406  * WordPress dependencies
       
 15407  */
       
 15408 
       
 15409 const formatCapitalize = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 15410   xmlns: "http://www.w3.org/2000/svg",
       
 15411   viewBox: "0 0 24 24"
       
 15412 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 15413   d: "M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"
       
 15414 }));
       
 15415 /* harmony default export */ var format_capitalize = (formatCapitalize);
       
 15416 
       
 15417 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/text-transform-control/index.js
       
 15418 
       
 15419 
       
 15420 /**
       
 15421  * WordPress dependencies
       
 15422  */
       
 15423 
       
 15424 
       
 15425 
       
 15426 const TEXT_TRANSFORMS = [{
       
 15427   name: Object(external_wp_i18n_["__"])('Uppercase'),
       
 15428   value: 'uppercase',
       
 15429   icon: format_uppercase
       
 15430 }, {
       
 15431   name: Object(external_wp_i18n_["__"])('Lowercase'),
       
 15432   value: 'lowercase',
       
 15433   icon: format_lowercase
       
 15434 }, {
       
 15435   name: Object(external_wp_i18n_["__"])('Capitalize'),
       
 15436   value: 'capitalize',
       
 15437   icon: format_capitalize
       
 15438 }];
       
 15439 /**
       
 15440  * Control to facilitate text transform selections.
       
 15441  *
       
 15442  * @param  {Object}   props                Component props.
       
 15443  * @param  {string}   props.value          Currently selected text transform.
       
 15444  * @param  {Function} props.onChange       Handles change in text transform selection.
       
 15445  * @return {WPElement}                     Text transform control.
       
 15446  */
       
 15447 
       
 15448 function TextTransformControl({
       
 15449   value,
       
 15450   onChange
       
 15451 }) {
       
 15452   return Object(external_wp_element_["createElement"])("fieldset", {
       
 15453     className: "block-editor-text-transform-control"
       
 15454   }, Object(external_wp_element_["createElement"])("legend", null, Object(external_wp_i18n_["__"])('Letter case')), Object(external_wp_element_["createElement"])("div", {
       
 15455     className: "block-editor-text-transform-control__buttons"
       
 15456   }, TEXT_TRANSFORMS.map(textTransform => {
       
 15457     return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 15458       key: textTransform.value,
       
 15459       icon: textTransform.icon,
       
 15460       isSmall: true,
       
 15461       isPressed: value === textTransform.value,
       
 15462       "aria-label": textTransform.name,
       
 15463       onClick: () => onChange(value === textTransform.value ? undefined : textTransform.value)
 14014     });
 15464     });
 14015     return Object(external_this_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, {
 15465   })));
 14016       wrapperProps: wrapperProps
 15466 }
 14017     }));
 15467 
 14018   };
 15468 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/text-transform.js
 14019 });
 15469 
 14020 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/color/addAttribute', addAttributes);
 15470 
 14021 Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/color/addSaveProps', color_addSaveProps);
 15471 /**
 14022 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/color/addEditProps', addEditProps);
 15472  * WordPress dependencies
 14023 Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/color/with-color-palette-styles', withColorPaletteStyles);
 15473  */
 14024 
 15474 
 14025 // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
 15475 /**
 14026 var external_this_wp_keycodes_ = __webpack_require__(21);
 15476  * Internal dependencies
       
 15477  */
       
 15478 
       
 15479 
       
 15480 
       
 15481 
       
 15482 /**
       
 15483  * Key within block settings' supports array indicating support for text
       
 15484  * transforms e.g. settings found in `block.json`.
       
 15485  */
       
 15486 
       
 15487 const TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';
       
 15488 /**
       
 15489  * Inspector control panel containing the text transform options.
       
 15490  *
       
 15491  * @param  {Object} props Block properties.
       
 15492  * @return {WPElement}    Text transform edit element.
       
 15493  */
       
 15494 
       
 15495 function TextTransformEdit(props) {
       
 15496   var _style$typography;
       
 15497 
       
 15498   const {
       
 15499     attributes: {
       
 15500       style
       
 15501     },
       
 15502     setAttributes
       
 15503   } = props;
       
 15504   const isDisabled = useIsTextTransformDisabled(props);
       
 15505 
       
 15506   if (isDisabled) {
       
 15507     return null;
       
 15508   }
       
 15509 
       
 15510   function onChange(newTransform) {
       
 15511     setAttributes({
       
 15512       style: cleanEmptyObject({ ...style,
       
 15513         typography: { ...(style === null || style === void 0 ? void 0 : style.typography),
       
 15514           textTransform: newTransform
       
 15515         }
       
 15516       })
       
 15517     });
       
 15518   }
       
 15519 
       
 15520   return Object(external_wp_element_["createElement"])(TextTransformControl, {
       
 15521     value: style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.textTransform,
       
 15522     onChange: onChange
       
 15523   });
       
 15524 }
       
 15525 /**
       
 15526  * Checks if text-transform settings have been disabled.
       
 15527  *
       
 15528  * @param  {string} name Name of the block.
       
 15529  * @return {boolean}     Whether or not the setting is disabled.
       
 15530  */
       
 15531 
       
 15532 function useIsTextTransformDisabled({
       
 15533   name: blockName
       
 15534 } = {}) {
       
 15535   const notSupported = !Object(external_wp_blocks_["hasBlockSupport"])(blockName, TEXT_TRANSFORM_SUPPORT_KEY);
       
 15536   const hasTextTransforms = useSetting('typography.customTextTransforms');
       
 15537   return notSupported || !hasTextTransforms;
       
 15538 }
       
 15539 
       
 15540 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/text-decoration-and-transform/index.js
       
 15541 
       
 15542 
       
 15543 /**
       
 15544  * Internal dependencies
       
 15545  */
       
 15546 
       
 15547 
       
 15548 /**
       
 15549  * Handles grouping related text decoration and text transform edit components
       
 15550  * so they can be laid out in a more flexible manner within the Typography
       
 15551  * InspectorControls panel.
       
 15552  *
       
 15553  * @param  {Object}   props Block props to be passed on to individual controls.
       
 15554  * @return {WPElement}      Component containing text decoration or transform controls.
       
 15555  */
       
 15556 
       
 15557 function TextDecorationAndTransformEdit(props) {
       
 15558   const decorationAvailable = !useIsTextDecorationDisabled(props);
       
 15559   const transformAvailable = !useIsTextTransformDisabled(props);
       
 15560 
       
 15561   if (!decorationAvailable && !transformAvailable) {
       
 15562     return null;
       
 15563   }
       
 15564 
       
 15565   return Object(external_wp_element_["createElement"])("div", {
       
 15566     className: "block-editor-text-decoration-and-transform"
       
 15567   }, decorationAvailable && Object(external_wp_element_["createElement"])(TextDecorationEdit, props), transformAvailable && Object(external_wp_element_["createElement"])(TextTransformEdit, props));
       
 15568 }
       
 15569 
       
 15570 // EXTERNAL MODULE: external ["wp","keycodes"]
       
 15571 var external_wp_keycodes_ = __webpack_require__("RxS6");
 14027 
 15572 
 14028 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/line-height-control/utils.js
 15573 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/line-height-control/utils.js
 14029 var BASE_DEFAULT_VALUE = 1.5;
 15574 const BASE_DEFAULT_VALUE = 1.5;
 14030 var STEP = 0.1;
 15575 const STEP = 0.1;
 14031 /**
 15576 /**
 14032  * There are varying value types within LineHeightControl:
 15577  * There are varying value types within LineHeightControl:
 14033  *
 15578  *
 14034  * {undefined} Initial value. No changes from the user.
 15579  * {undefined} Initial value. No changes from the user.
 14035  * {string} Input value. Value consumed/outputted by the input. Empty would be ''.
 15580  * {string} Input value. Value consumed/outputted by the input. Empty would be ''.
 14037  *
 15582  *
 14038  * Note: If the value is undefined, the input requires it to be an empty string ('')
 15583  * Note: If the value is undefined, the input requires it to be an empty string ('')
 14039  * in order to be considered "controlled" by props (rather than internal state).
 15584  * in order to be considered "controlled" by props (rather than internal state).
 14040  */
 15585  */
 14041 
 15586 
 14042 var RESET_VALUE = '';
 15587 const RESET_VALUE = '';
 14043 /**
 15588 /**
 14044  * Determines if the lineHeight attribute has been properly defined.
 15589  * Determines if the lineHeight attribute has been properly defined.
 14045  *
 15590  *
 14046  * @param {any} lineHeight The value to check.
 15591  * @param {any} lineHeight The value to check.
 14047  *
 15592  *
 14064 /**
 15609 /**
 14065  * Internal dependencies
 15610  * Internal dependencies
 14066  */
 15611  */
 14067 
 15612 
 14068 
 15613 
 14069 function LineHeightControl(_ref) {
 15614 function LineHeightControl({
 14070   var lineHeight = _ref.value,
 15615   value: lineHeight,
 14071       onChange = _ref.onChange;
 15616   onChange
 14072   var isDefined = isLineHeightDefined(lineHeight);
 15617 }) {
 14073 
 15618   const isDefined = isLineHeightDefined(lineHeight);
 14074   var handleOnKeyDown = function handleOnKeyDown(event) {
 15619 
 14075     var keyCode = event.keyCode;
 15620   const handleOnKeyDown = event => {
 14076 
 15621     const {
 14077     if (keyCode === external_this_wp_keycodes_["ZERO"] && !isDefined) {
 15622       keyCode
       
 15623     } = event;
       
 15624 
       
 15625     if (keyCode === external_wp_keycodes_["ZERO"] && !isDefined) {
 14078       /**
 15626       /**
 14079        * Prevents the onChange callback from firing, which prevents
 15627        * Prevents the onChange callback from firing, which prevents
 14080        * the logic from assuming the change was triggered from
 15628        * the logic from assuming the change was triggered from
 14081        * an input arrow CLICK.
 15629        * an input arrow CLICK.
 14082        */
 15630        */
 14083       event.preventDefault();
 15631       event.preventDefault();
 14084       onChange('0');
 15632       onChange('0');
 14085     }
 15633     }
 14086   };
 15634   };
 14087 
 15635 
 14088   var handleOnChange = function handleOnChange(nextValue) {
 15636   const handleOnChange = nextValue => {
 14089     // Set the next value without modification if lineHeight has been defined
 15637     // Set the next value without modification if lineHeight has been defined
 14090     if (isDefined) {
 15638     if (isDefined) {
 14091       onChange(nextValue);
 15639       onChange(nextValue);
 14092       return;
 15640       return;
 14093     } // Otherwise...
 15641     } // Otherwise...
 14097      * input element. This is so that the next values (from an undefined value state)
 15645      * input element. This is so that the next values (from an undefined value state)
 14098      * are more better suited for line-height rendering.
 15646      * are more better suited for line-height rendering.
 14099      */
 15647      */
 14100 
 15648 
 14101 
 15649 
 14102     var adjustedNextValue = nextValue;
 15650     let adjustedNextValue = nextValue;
 14103 
 15651 
 14104     switch (nextValue) {
 15652     switch (nextValue) {
 14105       case "".concat(STEP):
 15653       case `${STEP}`:
 14106         // Increment by step value
 15654         // Increment by step value
 14107         adjustedNextValue = BASE_DEFAULT_VALUE + STEP;
 15655         adjustedNextValue = BASE_DEFAULT_VALUE + STEP;
 14108         break;
 15656         break;
 14109 
 15657 
 14110       case '0':
 15658       case '0':
 14114     }
 15662     }
 14115 
 15663 
 14116     onChange(adjustedNextValue);
 15664     onChange(adjustedNextValue);
 14117   };
 15665   };
 14118 
 15666 
 14119   var value = isDefined ? lineHeight : RESET_VALUE;
 15667   const value = isDefined ? lineHeight : RESET_VALUE;
 14120   return Object(external_this_wp_element_["createElement"])("div", {
 15668   return Object(external_wp_element_["createElement"])("div", {
 14121     className: "block-editor-line-height-control"
 15669     className: "block-editor-line-height-control"
 14122   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
 15670   }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 14123     autoComplete: "off",
 15671     autoComplete: "off",
 14124     onKeyDown: handleOnKeyDown,
 15672     onKeyDown: handleOnKeyDown,
 14125     onChange: handleOnChange,
 15673     onChange: handleOnChange,
 14126     label: Object(external_this_wp_i18n_["__"])('Line height'),
 15674     label: Object(external_wp_i18n_["__"])('Line height'),
 14127     placeholder: BASE_DEFAULT_VALUE,
 15675     placeholder: BASE_DEFAULT_VALUE,
 14128     step: STEP,
 15676     step: STEP,
 14129     type: "number",
 15677     type: "number",
 14130     value: value,
 15678     value: value,
 14131     min: 0
 15679     min: 0
 14133 }
 15681 }
 14134 
 15682 
 14135 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/line-height.js
 15683 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/line-height.js
 14136 
 15684 
 14137 
 15685 
 14138 
       
 14139 function line_height_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; }
       
 14140 
       
 14141 function line_height_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { line_height_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 { line_height_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 14142 
       
 14143 /**
 15686 /**
 14144  * WordPress dependencies
 15687  * WordPress dependencies
 14145  */
 15688  */
 14146 
 15689 
 14147 
       
 14148 /**
 15690 /**
 14149  * Internal dependencies
 15691  * Internal dependencies
 14150  */
 15692  */
 14151 
 15693 
 14152 
 15694 
 14153 
 15695 
 14154 var LINE_HEIGHT_SUPPORT_KEY = '__experimentalLineHeight';
 15696 
       
 15697 const LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';
 14155 /**
 15698 /**
 14156  * Inspector control panel containing the line height related configuration
 15699  * Inspector control panel containing the line height related configuration
 14157  *
 15700  *
 14158  * @param {Object} props
 15701  * @param {Object} props
 14159  *
 15702  *
 14161  */
 15704  */
 14162 
 15705 
 14163 function LineHeightEdit(props) {
 15706 function LineHeightEdit(props) {
 14164   var _style$typography;
 15707   var _style$typography;
 14165 
 15708 
 14166   var style = props.attributes.style;
 15709   const {
 14167   var isDisabled = useIsLineHeightDisabled(props);
 15710     attributes: {
       
 15711       style
       
 15712     }
       
 15713   } = props;
       
 15714   const isDisabled = useIsLineHeightDisabled(props);
 14168 
 15715 
 14169   if (isDisabled) {
 15716   if (isDisabled) {
 14170     return null;
 15717     return null;
 14171   }
 15718   }
 14172 
 15719 
 14173   var onChange = function onChange(newLineHeightValue) {
 15720   const onChange = newLineHeightValue => {
 14174     var newStyle = line_height_objectSpread({}, style, {
 15721     const newStyle = { ...style,
 14175       typography: line_height_objectSpread({}, style === null || style === void 0 ? void 0 : style.typography, {
 15722       typography: { ...(style === null || style === void 0 ? void 0 : style.typography),
 14176         lineHeight: newLineHeightValue
 15723         lineHeight: newLineHeightValue
 14177       })
 15724       }
 14178     });
 15725     };
 14179 
       
 14180     props.setAttributes({
 15726     props.setAttributes({
 14181       style: utils_cleanEmptyObject(newStyle)
 15727       style: cleanEmptyObject(newStyle)
 14182     });
 15728     });
 14183   };
 15729   };
 14184 
 15730 
 14185   return Object(external_this_wp_element_["createElement"])(LineHeightControl, {
 15731   return Object(external_wp_element_["createElement"])(LineHeightControl, {
 14186     value: style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.lineHeight,
 15732     value: style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.lineHeight,
 14187     onChange: onChange
 15733     onChange: onChange
 14188   });
 15734   });
 14189 }
 15735 }
 14190 /**
 15736 /**
 14192  *
 15738  *
 14193  * @param {string} name The name of the block.
 15739  * @param {string} name The name of the block.
 14194  * @return {boolean} Whether setting is disabled.
 15740  * @return {boolean} Whether setting is disabled.
 14195  */
 15741  */
 14196 
 15742 
 14197 function useIsLineHeightDisabled() {
 15743 function useIsLineHeightDisabled({
 14198   var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
 15744   name: blockName
 14199       blockName = _ref.name;
 15745 } = {}) {
 14200 
 15746   const isDisabled = !useSetting('typography.customLineHeight');
 14201   var isDisabled = Object(external_this_wp_data_["useSelect"])(function (select) {
 15747   return !Object(external_wp_blocks_["hasBlockSupport"])(blockName, LINE_HEIGHT_SUPPORT_KEY) || isDisabled;
 14202     var editorSettings = select('core/block-editor').getSettings();
 15748 }
 14203     return !editorSettings.enableCustomLineHeight;
 15749 
       
 15750 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-appearance-control/index.js
       
 15751 
       
 15752 
       
 15753 /**
       
 15754  * WordPress dependencies
       
 15755  */
       
 15756 
       
 15757 
       
 15758 
       
 15759 const FONT_STYLES = [{
       
 15760   name: Object(external_wp_i18n_["__"])('Regular'),
       
 15761   value: 'normal'
       
 15762 }, {
       
 15763   name: Object(external_wp_i18n_["__"])('Italic'),
       
 15764   value: 'italic'
       
 15765 }];
       
 15766 const FONT_WEIGHTS = [{
       
 15767   name: Object(external_wp_i18n_["__"])('Thin'),
       
 15768   value: '100'
       
 15769 }, {
       
 15770   name: Object(external_wp_i18n_["__"])('Extra Light'),
       
 15771   value: '200'
       
 15772 }, {
       
 15773   name: Object(external_wp_i18n_["__"])('Light'),
       
 15774   value: '300'
       
 15775 }, {
       
 15776   name: Object(external_wp_i18n_["__"])('Regular'),
       
 15777   value: '400'
       
 15778 }, {
       
 15779   name: Object(external_wp_i18n_["__"])('Medium'),
       
 15780   value: '500'
       
 15781 }, {
       
 15782   name: Object(external_wp_i18n_["__"])('Semi Bold'),
       
 15783   value: '600'
       
 15784 }, {
       
 15785   name: Object(external_wp_i18n_["__"])('Bold'),
       
 15786   value: '700'
       
 15787 }, {
       
 15788   name: Object(external_wp_i18n_["__"])('Extra Bold'),
       
 15789   value: '800'
       
 15790 }, {
       
 15791   name: Object(external_wp_i18n_["__"])('Black'),
       
 15792   value: '900'
       
 15793 }];
       
 15794 /**
       
 15795  * Control to display unified font style and weight options.
       
 15796  *
       
 15797  * @param  {Object}   props Component props.
       
 15798  * @return {WPElement}      Font appearance control.
       
 15799  */
       
 15800 
       
 15801 function FontAppearanceControl(props) {
       
 15802   const {
       
 15803     onChange,
       
 15804     hasFontStyles = true,
       
 15805     hasFontWeights = true,
       
 15806     value: {
       
 15807       fontStyle,
       
 15808       fontWeight
       
 15809     }
       
 15810   } = props;
       
 15811   const hasStylesOrWeights = hasFontStyles || hasFontWeights;
       
 15812   const defaultOption = {
       
 15813     key: 'default',
       
 15814     name: Object(external_wp_i18n_["__"])('Default'),
       
 15815     style: {
       
 15816       fontStyle: undefined,
       
 15817       fontWeight: undefined
       
 15818     }
       
 15819   }; // Combines both font style and weight options into a single dropdown.
       
 15820 
       
 15821   const combineOptions = () => {
       
 15822     const combinedOptions = [defaultOption];
       
 15823     FONT_STYLES.forEach(({
       
 15824       name: styleName,
       
 15825       value: styleValue
       
 15826     }) => {
       
 15827       FONT_WEIGHTS.forEach(({
       
 15828         name: weightName,
       
 15829         value: weightValue
       
 15830       }) => {
       
 15831         const optionName = styleValue === 'normal' ? weightName : Object(external_wp_i18n_["sprintf"])(
       
 15832         /* translators: 1: Font weight name. 2: Font style name. */
       
 15833         Object(external_wp_i18n_["__"])('%1$s %2$s'), weightName, styleName);
       
 15834         combinedOptions.push({
       
 15835           key: `${styleValue}-${weightValue}`,
       
 15836           name: optionName,
       
 15837           style: {
       
 15838             fontStyle: styleValue,
       
 15839             fontWeight: weightValue
       
 15840           }
       
 15841         });
       
 15842       });
       
 15843     });
       
 15844     return combinedOptions;
       
 15845   }; // Generates select options for font styles only.
       
 15846 
       
 15847 
       
 15848   const styleOptions = () => {
       
 15849     const combinedOptions = [defaultOption];
       
 15850     FONT_STYLES.forEach(({
       
 15851       name,
       
 15852       value
       
 15853     }) => {
       
 15854       combinedOptions.push({
       
 15855         key: value,
       
 15856         name,
       
 15857         style: {
       
 15858           fontStyle: value,
       
 15859           fontWeight: undefined
       
 15860         }
       
 15861       });
       
 15862     });
       
 15863     return combinedOptions;
       
 15864   }; // Generates select options for font weights only.
       
 15865 
       
 15866 
       
 15867   const weightOptions = () => {
       
 15868     const combinedOptions = [defaultOption];
       
 15869     FONT_WEIGHTS.forEach(({
       
 15870       name,
       
 15871       value
       
 15872     }) => {
       
 15873       combinedOptions.push({
       
 15874         key: value,
       
 15875         name,
       
 15876         style: {
       
 15877           fontStyle: undefined,
       
 15878           fontWeight: value
       
 15879         }
       
 15880       });
       
 15881     });
       
 15882     return combinedOptions;
       
 15883   }; // Map font styles and weights to select options.
       
 15884 
       
 15885 
       
 15886   const selectOptions = Object(external_wp_element_["useMemo"])(() => {
       
 15887     if (hasFontStyles && hasFontWeights) {
       
 15888       return combineOptions();
       
 15889     }
       
 15890 
       
 15891     return hasFontStyles ? styleOptions() : weightOptions();
       
 15892   }, [props.options]); // Find current selection by comparing font style & weight against options.
       
 15893 
       
 15894   const currentSelection = selectOptions.find(option => option.style.fontStyle === fontStyle && option.style.fontWeight === fontWeight); // Adjusts field label in case either styles or weights are disabled.
       
 15895 
       
 15896   const getLabel = () => {
       
 15897     if (!hasFontStyles) {
       
 15898       return Object(external_wp_i18n_["__"])('Font weight');
       
 15899     }
       
 15900 
       
 15901     if (!hasFontWeights) {
       
 15902       return Object(external_wp_i18n_["__"])('Font style');
       
 15903     }
       
 15904 
       
 15905     return Object(external_wp_i18n_["__"])('Appearance');
       
 15906   };
       
 15907 
       
 15908   return Object(external_wp_element_["createElement"])("fieldset", {
       
 15909     className: "components-font-appearance-control"
       
 15910   }, hasStylesOrWeights && Object(external_wp_element_["createElement"])(external_wp_components_["CustomSelectControl"], {
       
 15911     className: "components-font-appearance-control__select",
       
 15912     label: getLabel(),
       
 15913     options: selectOptions,
       
 15914     value: currentSelection,
       
 15915     onChange: ({
       
 15916       selectedItem
       
 15917     }) => onChange(selectedItem.style)
       
 15918   }));
       
 15919 }
       
 15920 
       
 15921 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/font-appearance.js
       
 15922 
       
 15923 
       
 15924 /**
       
 15925  * WordPress dependencies
       
 15926  */
       
 15927 
       
 15928 /**
       
 15929  * Internal dependencies
       
 15930  */
       
 15931 
       
 15932 
       
 15933 
       
 15934 
       
 15935 /**
       
 15936  * Key within block settings' support array indicating support for font style.
       
 15937  */
       
 15938 
       
 15939 const FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';
       
 15940 /**
       
 15941  * Key within block settings' support array indicating support for font weight.
       
 15942  */
       
 15943 
       
 15944 const FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';
       
 15945 /**
       
 15946  * Inspector control panel containing the font appearance options.
       
 15947  *
       
 15948  * @param  {Object} props Block properties.
       
 15949  * @return {WPElement}    Font appearance edit element.
       
 15950  */
       
 15951 
       
 15952 function FontAppearanceEdit(props) {
       
 15953   var _style$typography, _style$typography2;
       
 15954 
       
 15955   const {
       
 15956     attributes: {
       
 15957       style
       
 15958     },
       
 15959     setAttributes
       
 15960   } = props;
       
 15961   const hasFontStyles = !useIsFontStyleDisabled(props);
       
 15962   const hasFontWeights = !useIsFontWeightDisabled(props);
       
 15963 
       
 15964   if (!hasFontStyles && !hasFontWeights) {
       
 15965     return null;
       
 15966   }
       
 15967 
       
 15968   const onChange = newStyles => {
       
 15969     setAttributes({
       
 15970       style: cleanEmptyObject({ ...style,
       
 15971         typography: { ...(style === null || style === void 0 ? void 0 : style.typography),
       
 15972           fontStyle: newStyles.fontStyle,
       
 15973           fontWeight: newStyles.fontWeight
       
 15974         }
       
 15975       })
       
 15976     });
       
 15977   };
       
 15978 
       
 15979   const fontStyle = style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontStyle;
       
 15980   const fontWeight = style === null || style === void 0 ? void 0 : (_style$typography2 = style.typography) === null || _style$typography2 === void 0 ? void 0 : _style$typography2.fontWeight;
       
 15981   return Object(external_wp_element_["createElement"])(FontAppearanceControl, {
       
 15982     onChange: onChange,
       
 15983     hasFontStyles: hasFontStyles,
       
 15984     hasFontWeights: hasFontWeights,
       
 15985     value: {
       
 15986       fontStyle,
       
 15987       fontWeight
       
 15988     }
 14204   });
 15989   });
 14205   return !Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, LINE_HEIGHT_SUPPORT_KEY) || isDisabled;
 15990 }
 14206 }
 15991 /**
 14207 
 15992  * Checks if font style support has been disabled either by not opting in for
 14208 // EXTERNAL MODULE: external {"this":["wp","tokenList"]}
 15993  * support or by failing to provide preset styles.
 14209 var external_this_wp_tokenList_ = __webpack_require__(153);
 15994  *
 14210 var external_this_wp_tokenList_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_tokenList_);
 15995  * @param  {Object} props      Block properties.
       
 15996  * @param  {string} props.name Name for the block type.
       
 15997  * @return {boolean}           Whether font style support has been disabled.
       
 15998  */
       
 15999 
       
 16000 function useIsFontStyleDisabled({
       
 16001   name: blockName
       
 16002 } = {}) {
       
 16003   const styleSupport = Object(external_wp_blocks_["hasBlockSupport"])(blockName, FONT_STYLE_SUPPORT_KEY);
       
 16004   const hasFontStyles = useSetting('typography.customFontStyle');
       
 16005   return !styleSupport || !hasFontStyles;
       
 16006 }
       
 16007 /**
       
 16008  * Checks if font weight support has been disabled either by not opting in for
       
 16009  * support or by failing to provide preset weights.
       
 16010  *
       
 16011  * @param  {Object} props      Block properties.
       
 16012  * @param  {string} props.name Name for the block type.
       
 16013  * @return {boolean}           Whether font weight support has been disabled.
       
 16014  */
       
 16015 
       
 16016 function useIsFontWeightDisabled({
       
 16017   name: blockName
       
 16018 } = {}) {
       
 16019   const weightSupport = Object(external_wp_blocks_["hasBlockSupport"])(blockName, FONT_WEIGHT_SUPPORT_KEY);
       
 16020   const hasFontWeights = useSetting('typography.customFontWeight');
       
 16021   return !weightSupport || !hasFontWeights;
       
 16022 }
       
 16023 /**
       
 16024  * Checks if font appearance support has been disabled.
       
 16025  *
       
 16026  * @param  {Object} props      Block properties.
       
 16027  * @return {boolean}           Whether font appearance support has been disabled.
       
 16028  */
       
 16029 
       
 16030 function useIsFontAppearanceDisabled(props) {
       
 16031   const stylesDisabled = useIsFontStyleDisabled(props);
       
 16032   const weightsDisabled = useIsFontWeightDisabled(props);
       
 16033   return stylesDisabled && weightsDisabled;
       
 16034 }
       
 16035 
       
 16036 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-family/index.js
       
 16037 
       
 16038 
       
 16039 
       
 16040 /**
       
 16041  * External dependencies
       
 16042  */
       
 16043 
       
 16044 /**
       
 16045  * WordPress dependencies
       
 16046  */
       
 16047 
       
 16048 
       
 16049 
       
 16050 /**
       
 16051  * Internal dependencies
       
 16052  */
       
 16053 
       
 16054 
       
 16055 function FontFamilyControl({
       
 16056   value = '',
       
 16057   onChange,
       
 16058   fontFamilies,
       
 16059   ...props
       
 16060 }) {
       
 16061   const blockLevelFontFamilies = useSetting('typography.fontFamilies');
       
 16062 
       
 16063   if (!fontFamilies) {
       
 16064     fontFamilies = blockLevelFontFamilies;
       
 16065   }
       
 16066 
       
 16067   if (Object(external_lodash_["isEmpty"])(fontFamilies)) {
       
 16068     return null;
       
 16069   }
       
 16070 
       
 16071   const options = [{
       
 16072     value: '',
       
 16073     label: Object(external_wp_i18n_["__"])('Default')
       
 16074   }, ...fontFamilies.map(({
       
 16075     fontFamily,
       
 16076     name
       
 16077   }) => {
       
 16078     return {
       
 16079       value: fontFamily,
       
 16080       label: name || fontFamily
       
 16081     };
       
 16082   })];
       
 16083   return Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], Object(esm_extends["a" /* default */])({
       
 16084     label: Object(external_wp_i18n_["__"])('Font family'),
       
 16085     options: options,
       
 16086     value: value,
       
 16087     onChange: onChange,
       
 16088     labelPosition: "top"
       
 16089   }, props));
       
 16090 }
       
 16091 
       
 16092 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/font-family.js
       
 16093 
       
 16094 
       
 16095 /**
       
 16096  * External dependencies
       
 16097  */
       
 16098 
       
 16099 /**
       
 16100  * WordPress dependencies
       
 16101  */
       
 16102 
       
 16103 
       
 16104 /**
       
 16105  * Internal dependencies
       
 16106  */
       
 16107 
       
 16108 
       
 16109 
       
 16110 
       
 16111 const FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';
       
 16112 
       
 16113 const getFontFamilyFromAttributeValue = (fontFamilies, value) => {
       
 16114   const attributeParsed = /var:preset\|font-family\|(.+)/.exec(value);
       
 16115 
       
 16116   if (attributeParsed && attributeParsed[1]) {
       
 16117     const fontFamilyObject = Object(external_lodash_["find"])(fontFamilies, ({
       
 16118       slug
       
 16119     }) => {
       
 16120       return slug === attributeParsed[1];
       
 16121     });
       
 16122 
       
 16123     if (fontFamilyObject) {
       
 16124       return fontFamilyObject.fontFamily;
       
 16125     }
       
 16126   }
       
 16127 
       
 16128   return value;
       
 16129 };
       
 16130 
       
 16131 function FontFamilyEdit({
       
 16132   name,
       
 16133   setAttributes,
       
 16134   attributes: {
       
 16135     style = {}
       
 16136   }
       
 16137 }) {
       
 16138   var _style$typography;
       
 16139 
       
 16140   const fontFamilies = useSetting('typography.fontFamilies');
       
 16141   const isDisable = useIsFontFamilyDisabled({
       
 16142     name
       
 16143   });
       
 16144 
       
 16145   if (isDisable) {
       
 16146     return null;
       
 16147   }
       
 16148 
       
 16149   const value = getFontFamilyFromAttributeValue(fontFamilies, (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontFamily);
       
 16150 
       
 16151   function onChange(newValue) {
       
 16152     const predefinedFontFamily = Object(external_lodash_["find"])(fontFamilies, ({
       
 16153       fontFamily
       
 16154     }) => fontFamily === newValue);
       
 16155     setAttributes({
       
 16156       style: cleanEmptyObject({ ...style,
       
 16157         typography: { ...(style.typography || {}),
       
 16158           fontFamily: predefinedFontFamily ? `var:preset|font-family|${predefinedFontFamily.slug}` : newValue || undefined
       
 16159         }
       
 16160       })
       
 16161     });
       
 16162   }
       
 16163 
       
 16164   return Object(external_wp_element_["createElement"])(FontFamilyControl, {
       
 16165     className: "block-editor-hooks-font-family-control",
       
 16166     fontFamilies: fontFamilies,
       
 16167     value: value,
       
 16168     onChange: onChange
       
 16169   });
       
 16170 }
       
 16171 /**
       
 16172  * Custom hook that checks if font-family functionality is disabled.
       
 16173  *
       
 16174  * @param {string} name The name of the block.
       
 16175  * @return {boolean} Whether setting is disabled.
       
 16176  */
       
 16177 
       
 16178 function useIsFontFamilyDisabled({
       
 16179   name
       
 16180 }) {
       
 16181   const fontFamilies = useSetting('typography.fontFamilies');
       
 16182   return !fontFamilies || fontFamilies.length === 0 || !Object(external_wp_blocks_["hasBlockSupport"])(name, FONT_FAMILY_SUPPORT_KEY);
       
 16183 }
       
 16184 
       
 16185 // EXTERNAL MODULE: external ["wp","tokenList"]
       
 16186 var external_wp_tokenList_ = __webpack_require__("BLeD");
       
 16187 var external_wp_tokenList_default = /*#__PURE__*/__webpack_require__.n(external_wp_tokenList_);
 14211 
 16188 
 14212 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/utils.js
 16189 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/utils.js
 14213 /**
 16190 /**
 14214  * External dependencies
 16191  * External dependencies
 14215  */
 16192  */
 14224  *
 16201  *
 14225  * @return {?Object} If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug.
 16202  * @return {?Object} If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug.
 14226  * 					 Otherwise, an object with just the size value based on customFontSize is returned.
 16203  * 					 Otherwise, an object with just the size value based on customFontSize is returned.
 14227  */
 16204  */
 14228 
 16205 
 14229 var utils_getFontSize = function getFontSize(fontSizes, fontSizeAttribute, customFontSizeAttribute) {
 16206 const getFontSize = (fontSizes, fontSizeAttribute, customFontSizeAttribute) => {
 14230   if (fontSizeAttribute) {
 16207   if (fontSizeAttribute) {
 14231     var fontSizeObject = Object(external_this_lodash_["find"])(fontSizes, {
 16208     const fontSizeObject = Object(external_lodash_["find"])(fontSizes, {
 14232       slug: fontSizeAttribute
 16209       slug: fontSizeAttribute
 14233     });
 16210     });
 14234 
 16211 
 14235     if (fontSizeObject) {
 16212     if (fontSizeObject) {
 14236       return fontSizeObject;
 16213       return fontSizeObject;
 14249  *
 16226  *
 14250  * @return {Object} Font size object.
 16227  * @return {Object} Font size object.
 14251  */
 16228  */
 14252 
 16229 
 14253 function getFontSizeObjectByValue(fontSizes, value) {
 16230 function getFontSizeObjectByValue(fontSizes, value) {
 14254   var fontSizeObject = Object(external_this_lodash_["find"])(fontSizes, {
 16231   const fontSizeObject = Object(external_lodash_["find"])(fontSizes, {
 14255     size: value
 16232     size: value
 14256   });
 16233   });
 14257 
 16234 
 14258   if (fontSizeObject) {
 16235   if (fontSizeObject) {
 14259     return fontSizeObject;
 16236     return fontSizeObject;
 14275 function getFontSizeClass(fontSizeSlug) {
 16252 function getFontSizeClass(fontSizeSlug) {
 14276   if (!fontSizeSlug) {
 16253   if (!fontSizeSlug) {
 14277     return;
 16254     return;
 14278   }
 16255   }
 14279 
 16256 
 14280   return "has-".concat(Object(external_this_lodash_["kebabCase"])(fontSizeSlug), "-font-size");
 16257   return `has-${Object(external_lodash_["kebabCase"])(fontSizeSlug)}-font-size`;
 14281 }
 16258 }
 14282 
 16259 
 14283 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/font-size-picker.js
 16260 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/font-size-picker.js
       
 16261 
       
 16262 
       
 16263 
 14284 /**
 16264 /**
 14285  * WordPress dependencies
 16265  * WordPress dependencies
 14286  */
 16266  */
 14287 
 16267 
 14288 
 16268 /**
 14289 /* harmony default export */ var font_size_picker = (Object(external_this_wp_data_["withSelect"])(function (select) {
 16269  * Internal dependencies
 14290   var _select$getSettings = select('core/block-editor').getSettings(),
 16270  */
 14291       disableCustomFontSizes = _select$getSettings.disableCustomFontSizes,
 16271 
 14292       fontSizes = _select$getSettings.fontSizes;
 16272 
 14293 
 16273 
 14294   return {
 16274 function FontSizePicker(props) {
 14295     disableCustomFontSizes: disableCustomFontSizes,
 16275   const fontSizes = useSetting('typography.fontSizes');
 14296     fontSizes: fontSizes
 16276   const disableCustomFontSizes = !useSetting('typography.customFontSize');
 14297   };
 16277   return Object(external_wp_element_["createElement"])(external_wp_components_["FontSizePicker"], Object(esm_extends["a" /* default */])({}, props, {
 14298 })(external_this_wp_components_["FontSizePicker"]));
 16278     fontSizes: fontSizes,
       
 16279     disableCustomFontSizes: disableCustomFontSizes
       
 16280   }));
       
 16281 }
       
 16282 
       
 16283 /* harmony default export */ var font_size_picker = (FontSizePicker);
 14299 
 16284 
 14300 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/font-size.js
 16285 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/font-size.js
 14301 
 16286 
 14302 
 16287 
 14303 
       
 14304 function font_size_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; }
       
 14305 
       
 14306 function font_size_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { font_size_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 { font_size_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 14307 
       
 14308 /**
 16288 /**
 14309  * WordPress dependencies
 16289  * WordPress dependencies
 14310  */
 16290  */
 14311 
 16291 
 14312 
 16292 
 14317  */
 16297  */
 14318 
 16298 
 14319 
 16299 
 14320 
 16300 
 14321 
 16301 
 14322 var FONT_SIZE_SUPPORT_KEY = '__experimentalFontSize';
 16302 const FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';
 14323 /**
 16303 /**
 14324  * Filters registered block settings, extending attributes to include
 16304  * Filters registered block settings, extending attributes to include
 14325  * `fontSize` and `fontWeight` attributes.
 16305  * `fontSize` and `fontWeight` attributes.
 14326  *
 16306  *
 14327  * @param  {Object} settings Original block settings
 16307  * @param  {Object} settings Original block settings
 14328  * @return {Object}          Filtered block settings
 16308  * @return {Object}          Filtered block settings
 14329  */
 16309  */
 14330 
 16310 
 14331 function font_size_addAttributes(settings) {
 16311 function font_size_addAttributes(settings) {
 14332   if (!Object(external_this_wp_blocks_["hasBlockSupport"])(settings, FONT_SIZE_SUPPORT_KEY)) {
 16312   if (!Object(external_wp_blocks_["hasBlockSupport"])(settings, FONT_SIZE_SUPPORT_KEY)) {
 14333     return settings;
 16313     return settings;
 14334   } // Allow blocks to specify a default value if needed.
 16314   } // Allow blocks to specify a default value if needed.
 14335 
 16315 
 14336 
 16316 
 14337   if (!settings.attributes.fontSize) {
 16317   if (!settings.attributes.fontSize) {
 14353  * @return {Object}            Filtered props applied to save element
 16333  * @return {Object}            Filtered props applied to save element
 14354  */
 16334  */
 14355 
 16335 
 14356 
 16336 
 14357 function font_size_addSaveProps(props, blockType, attributes) {
 16337 function font_size_addSaveProps(props, blockType, attributes) {
 14358   if (!Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, FONT_SIZE_SUPPORT_KEY)) {
 16338   if (!Object(external_wp_blocks_["hasBlockSupport"])(blockType, FONT_SIZE_SUPPORT_KEY)) {
       
 16339     return props;
       
 16340   }
       
 16341 
       
 16342   if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'typography.__experimentalSkipSerialization')) {
 14359     return props;
 16343     return props;
 14360   } // Use TokenList to dedupe classes.
 16344   } // Use TokenList to dedupe classes.
 14361 
 16345 
 14362 
 16346 
 14363   var classes = new external_this_wp_tokenList_default.a(props.className);
 16347   const classes = new external_wp_tokenList_default.a(props.className);
 14364   classes.add(getFontSizeClass(attributes.fontSize));
 16348   classes.add(getFontSizeClass(attributes.fontSize));
 14365   var newClassName = classes.value;
 16349   const newClassName = classes.value;
 14366   props.className = newClassName ? newClassName : undefined;
 16350   props.className = newClassName ? newClassName : undefined;
 14367   return props;
 16351   return props;
 14368 }
 16352 }
 14369 /**
 16353 /**
 14370  * Filters registered block settings to expand the block edit wrapper
 16354  * Filters registered block settings to expand the block edit wrapper
 14374  * @return {Object}          Filtered block settings
 16358  * @return {Object}          Filtered block settings
 14375  */
 16359  */
 14376 
 16360 
 14377 
 16361 
 14378 function font_size_addEditProps(settings) {
 16362 function font_size_addEditProps(settings) {
 14379   if (!Object(external_this_wp_blocks_["hasBlockSupport"])(settings, FONT_SIZE_SUPPORT_KEY)) {
 16363   if (!Object(external_wp_blocks_["hasBlockSupport"])(settings, FONT_SIZE_SUPPORT_KEY)) {
 14380     return settings;
 16364     return settings;
 14381   }
 16365   }
 14382 
 16366 
 14383   var existingGetEditWrapperProps = settings.getEditWrapperProps;
 16367   const existingGetEditWrapperProps = settings.getEditWrapperProps;
 14384 
 16368 
 14385   settings.getEditWrapperProps = function (attributes) {
 16369   settings.getEditWrapperProps = attributes => {
 14386     var props = {};
 16370     let props = {};
 14387 
 16371 
 14388     if (existingGetEditWrapperProps) {
 16372     if (existingGetEditWrapperProps) {
 14389       props = existingGetEditWrapperProps(attributes);
 16373       props = existingGetEditWrapperProps(attributes);
 14390     }
 16374     }
 14391 
 16375 
 14392     return font_size_addSaveProps(props, settings, attributes);
 16376     return font_size_addSaveProps(props, settings, attributes);
 14393   };
 16377   };
 14394 
 16378 
 14395   return settings;
 16379   return settings;
 14396 }
 16380 }
 14397 
       
 14398 function useFontSizes() {
       
 14399   return Object(external_this_wp_data_["useSelect"])(function (select) {
       
 14400     return select('core/block-editor').getSettings().fontSizes;
       
 14401   });
       
 14402 }
       
 14403 /**
 16381 /**
 14404  * Inspector control panel containing the font size related configuration
 16382  * Inspector control panel containing the font size related configuration
 14405  *
 16383  *
 14406  * @param {Object} props
 16384  * @param {Object} props
 14407  *
 16385  *
 14408  * @return {WPElement} Font size edit element.
 16386  * @return {WPElement} Font size edit element.
 14409  */
 16387  */
 14410 
 16388 
 14411 
 16389 
 14412 function FontSizeEdit(props) {
 16390 function FontSizeEdit(props) {
 14413   var _style$typography;
 16391   var _style$typography, _style$typography2;
 14414 
 16392 
 14415   var _props$attributes = props.attributes,
 16393   const {
 14416       fontSize = _props$attributes.fontSize,
 16394     attributes: {
 14417       style = _props$attributes.style,
 16395       fontSize,
 14418       setAttributes = props.setAttributes;
 16396       style
 14419   var isDisabled = useIsFontSizeDisabled(props);
 16397     },
 14420   var fontSizes = useFontSizes();
 16398     setAttributes
 14421 
 16399   } = props;
 14422   if (isDisabled) {
 16400   const isDisabled = useIsFontSizeDisabled(props);
 14423     return null;
 16401   const fontSizes = useSetting('typography.fontSizes');
 14424   }
 16402 
 14425 
 16403   const onChange = value => {
 14426   var fontSizeObject = utils_getFontSize(fontSizes, fontSize, style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontSize);
 16404     const fontSizeSlug = getFontSizeObjectByValue(fontSizes, value).slug;
 14427 
       
 14428   var onChange = function onChange(value) {
       
 14429     var fontSizeSlug = getFontSizeObjectByValue(fontSizes, value).slug;
       
 14430     setAttributes({
 16405     setAttributes({
 14431       style: utils_cleanEmptyObject(font_size_objectSpread({}, style, {
 16406       style: cleanEmptyObject({ ...style,
 14432         typography: font_size_objectSpread({}, style === null || style === void 0 ? void 0 : style.typography, {
 16407         typography: { ...(style === null || style === void 0 ? void 0 : style.typography),
 14433           fontSize: fontSizeSlug ? undefined : value
 16408           fontSize: fontSizeSlug ? undefined : value
 14434         })
 16409         }
 14435       })),
 16410       }),
 14436       fontSize: fontSizeSlug
 16411       fontSize: fontSizeSlug
 14437     });
 16412     });
 14438   };
 16413   };
 14439 
 16414 
 14440   return Object(external_this_wp_element_["createElement"])(font_size_picker, {
 16415   if (isDisabled) {
 14441     value: fontSizeObject.size,
 16416     return null;
 14442     onChange: onChange
 16417   }
       
 16418 
       
 16419   const fontSizeObject = getFontSize(fontSizes, fontSize, style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontSize);
       
 16420   const fontSizeValue = (fontSizeObject === null || fontSizeObject === void 0 ? void 0 : fontSizeObject.size) || (style === null || style === void 0 ? void 0 : (_style$typography2 = style.typography) === null || _style$typography2 === void 0 ? void 0 : _style$typography2.fontSize) || fontSize;
       
 16421   return Object(external_wp_element_["createElement"])(font_size_picker, {
       
 16422     onChange: onChange,
       
 16423     value: fontSizeValue
 14443   });
 16424   });
 14444 }
 16425 }
 14445 /**
 16426 /**
 14446  * Custom hook that checks if font-size settings have been disabled.
 16427  * Custom hook that checks if font-size settings have been disabled.
 14447  *
 16428  *
 14448  * @param {string} name The name of the block.
 16429  * @param {string} name The name of the block.
 14449  * @return {boolean} Whether setting is disabled.
 16430  * @return {boolean} Whether setting is disabled.
 14450  */
 16431  */
 14451 
 16432 
 14452 function useIsFontSizeDisabled() {
 16433 function useIsFontSizeDisabled({
 14453   var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
 16434   name: blockName
 14454       blockName = _ref.name;
 16435 } = {}) {
 14455 
 16436   const fontSizes = useSetting('typography.fontSizes');
 14456   var fontSizes = useFontSizes();
 16437   const hasFontSizes = !!(fontSizes !== null && fontSizes !== void 0 && fontSizes.length);
 14457   var hasFontSizes = fontSizes.length;
 16438   return !Object(external_wp_blocks_["hasBlockSupport"])(blockName, FONT_SIZE_SUPPORT_KEY) || !hasFontSizes;
 14458   return !Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, FONT_SIZE_SUPPORT_KEY) || !hasFontSizes;
       
 14459 }
 16439 }
 14460 /**
 16440 /**
 14461  * Add inline styles for font sizes.
 16441  * Add inline styles for font sizes.
 14462  * Ideally, this is not needed and themes load the font-size classes on the
 16442  * Ideally, this is not needed and themes load the font-size classes on the
 14463  * editor.
 16443  * editor.
 14464  *
 16444  *
 14465  * @param  {Function} BlockListBlock Original component
 16445  * @param  {Function} BlockListBlock Original component
 14466  * @return {Function}                Wrapped component
 16446  * @return {Function}                Wrapped component
 14467  */
 16447  */
 14468 
 16448 
 14469 var withFontSizeInlineStyles = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockListBlock) {
 16449 const withFontSizeInlineStyles = Object(external_wp_compose_["createHigherOrderComponent"])(BlockListBlock => props => {
 14470   return function (props) {
 16450   var _style$typography3, _style$typography4;
 14471     var _style$typography2;
 16451 
 14472 
 16452   const fontSizes = useSetting('typography.fontSizes');
 14473     var fontSizes = useFontSizes();
 16453   const {
 14474     var blockName = props.name,
 16454     name: blockName,
 14475         _props$attributes2 = props.attributes,
 16455     attributes: {
 14476         fontSize = _props$attributes2.fontSize,
 16456       fontSize,
 14477         style = _props$attributes2.style,
 16457       style
 14478         wrapperProps = props.wrapperProps;
 16458     },
 14479 
 16459     wrapperProps
 14480     var newProps = font_size_objectSpread({}, props); // Only add inline styles if the block supports font sizes, doesn't
 16460   } = props; // Only add inline styles if the block supports font sizes,
 14481     // already have an inline font size, and does have a class to extract
 16461   // doesn't skip serialization of font sizes,
 14482     // the font size from.
 16462   // doesn't already have an inline font size,
 14483 
 16463   // and does have a class to extract the font size from.
 14484 
 16464 
 14485     if (Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, FONT_SIZE_SUPPORT_KEY) && fontSize && !(style === null || style === void 0 ? void 0 : (_style$typography2 = style.typography) === null || _style$typography2 === void 0 ? void 0 : _style$typography2.fontSize)) {
 16465   if (!Object(external_wp_blocks_["hasBlockSupport"])(blockName, FONT_SIZE_SUPPORT_KEY) || Object(external_wp_blocks_["hasBlockSupport"])(blockName, 'typography.__experimentalSkipSerialization') || !fontSize || style !== null && style !== void 0 && (_style$typography3 = style.typography) !== null && _style$typography3 !== void 0 && _style$typography3.fontSize) {
 14486       var _style$typography3;
 16466     return Object(external_wp_element_["createElement"])(BlockListBlock, props);
 14487 
 16467   }
 14488       var fontSizeValue = utils_getFontSize(fontSizes, fontSize, style === null || style === void 0 ? void 0 : (_style$typography3 = style.typography) === null || _style$typography3 === void 0 ? void 0 : _style$typography3.fontSize).size;
 16468 
 14489       newProps.wrapperProps = font_size_objectSpread({}, wrapperProps, {
 16469   const fontSizeValue = getFontSize(fontSizes, fontSize, style === null || style === void 0 ? void 0 : (_style$typography4 = style.typography) === null || _style$typography4 === void 0 ? void 0 : _style$typography4.fontSize).size;
 14490         style: font_size_objectSpread({
 16470   const newProps = { ...props,
 14491           fontSize: fontSizeValue
 16471     wrapperProps: { ...wrapperProps,
 14492         }, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style)
 16472       style: {
 14493       });
 16473         fontSize: fontSizeValue,
 14494     }
 16474         ...(wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style)
 14495 
 16475       }
 14496     return Object(external_this_wp_element_["createElement"])(BlockListBlock, newProps);
 16476     }
 14497   };
 16477   };
       
 16478   return Object(external_wp_element_["createElement"])(BlockListBlock, newProps);
 14498 }, 'withFontSizeInlineStyles');
 16479 }, 'withFontSizeInlineStyles');
 14499 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/font/addAttribute', font_size_addAttributes);
 16480 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/font/addAttribute', font_size_addAttributes);
 14500 Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/font/addSaveProps', font_size_addSaveProps);
 16481 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/font/addSaveProps', font_size_addSaveProps);
 14501 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/font/addEditProps', font_size_addEditProps);
 16482 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/font/addEditProps', font_size_addEditProps);
 14502 Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/font-size/with-font-size-inline-styles', withFontSizeInlineStyles);
 16483 Object(external_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/font-size/with-font-size-inline-styles', withFontSizeInlineStyles);
 14503 
 16484 
 14504 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/typography.js
 16485 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/typography.js
 14505 
 16486 
 14506 
 16487 
 14507 /**
 16488 /**
 14508  * WordPress dependencies
 16489  * WordPress dependencies
 14509  */
 16490  */
 14510 
 16491 
       
 16492 /**
       
 16493  * External dependencies
       
 16494  */
       
 16495 
 14511 
 16496 
 14512 
 16497 
 14513 
 16498 
 14514 /**
 16499 /**
 14515  * Internal dependencies
 16500  * Internal dependencies
 14516  */
 16501  */
 14517 
 16502 
 14518 
 16503 
 14519 
 16504 
 14520 
 16505 
 14521 var TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY];
 16506 
       
 16507 
       
 16508 
       
 16509 
       
 16510 
       
 16511 const TYPOGRAPHY_SUPPORT_KEY = 'typography';
       
 16512 const TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, FONT_FAMILY_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY];
 14522 function TypographyPanel(props) {
 16513 function TypographyPanel(props) {
 14523   var isDisabled = useIsTypographyDisabled(props);
 16514   const isDisabled = useIsTypographyDisabled(props);
 14524   var isSupported = typography_hasTypographySupport(props.name);
 16515   const isSupported = hasTypographySupport(props.name);
 14525   if (isDisabled || !isSupported) return null;
 16516   if (isDisabled || !isSupported) return null;
 14526   return Object(external_this_wp_element_["createElement"])(inspector_controls, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
 16517   return Object(external_wp_element_["createElement"])(inspector_controls, null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 14527     title: Object(external_this_wp_i18n_["__"])('Typography')
 16518     title: Object(external_wp_i18n_["__"])('Typography')
 14528   }, Object(external_this_wp_element_["createElement"])(FontSizeEdit, props), Object(external_this_wp_element_["createElement"])(LineHeightEdit, props)));
 16519   }, Object(external_wp_element_["createElement"])(external_wp_components_["__unstableComponentSystemProvider"], {
 14529 }
 16520     __unstableNextInclude: ['WPComponentsFontSizePicker']
 14530 
 16521   }, Object(external_wp_element_["createElement"])(FontFamilyEdit, props), Object(external_wp_element_["createElement"])(FontSizeEdit, props), Object(external_wp_element_["createElement"])(FontAppearanceEdit, props), Object(external_wp_element_["createElement"])(LineHeightEdit, props), Object(external_wp_element_["createElement"])(TextDecorationAndTransformEdit, props))));
 14531 var typography_hasTypographySupport = function hasTypographySupport(blockName) {
 16522 }
 14532   return external_this_wp_element_["Platform"].OS === 'web' && TYPOGRAPHY_SUPPORT_KEYS.some(function (key) {
 16523 
 14533     return Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, key);
 16524 const hasTypographySupport = blockName => {
       
 16525   return external_wp_element_["Platform"].OS === 'web' && TYPOGRAPHY_SUPPORT_KEYS.some(key => Object(external_wp_blocks_["hasBlockSupport"])(blockName, key));
       
 16526 };
       
 16527 
       
 16528 function useIsTypographyDisabled(props = {}) {
       
 16529   const configs = [useIsFontAppearanceDisabled(props), useIsFontSizeDisabled(props), useIsLineHeightDisabled(props), useIsFontFamilyDisabled(props), useIsTextDecorationDisabled(props), useIsTextTransformDisabled(props)];
       
 16530   return configs.filter(Boolean).length === configs.length;
       
 16531 }
       
 16532 
       
 16533 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/margin.js
       
 16534 
       
 16535 
       
 16536 /**
       
 16537  * WordPress dependencies
       
 16538  */
       
 16539 
       
 16540 
       
 16541 
       
 16542 
       
 16543 /**
       
 16544  * Internal dependencies
       
 16545  */
       
 16546 
       
 16547 
       
 16548 
       
 16549 
       
 16550 /**
       
 16551  * Determines if there is margin support.
       
 16552  *
       
 16553  * @param  {string|Object} blockType Block name or Block Type object.
       
 16554  * @return {boolean}                 Whether there is support.
       
 16555  */
       
 16556 
       
 16557 function hasMarginSupport(blockType) {
       
 16558   const support = Object(external_wp_blocks_["getBlockSupport"])(blockType, SPACING_SUPPORT_KEY);
       
 16559   return !!(true === support || support !== null && support !== void 0 && support.margin);
       
 16560 }
       
 16561 /**
       
 16562  * Custom hook that checks if margin settings have been disabled.
       
 16563  *
       
 16564  * @param  {string} name The name of the block.
       
 16565  * @return {boolean}     Whether margin setting is disabled.
       
 16566  */
       
 16567 
       
 16568 function useIsMarginDisabled({
       
 16569   name: blockName
       
 16570 } = {}) {
       
 16571   const isDisabled = !useSetting('spacing.customMargin');
       
 16572   return !hasMarginSupport(blockName) || isDisabled;
       
 16573 }
       
 16574 /**
       
 16575  * Inspector control panel containing the margin related configuration
       
 16576  *
       
 16577  * @param  {Object} props Block props.
       
 16578  * @return {WPElement}    Margin edit element.
       
 16579  */
       
 16580 
       
 16581 function MarginEdit(props) {
       
 16582   var _style$spacing;
       
 16583 
       
 16584   const {
       
 16585     name: blockName,
       
 16586     attributes: {
       
 16587       style
       
 16588     },
       
 16589     setAttributes
       
 16590   } = props;
       
 16591   const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
       
 16592     availableUnits: useSetting('spacing.units') || ['%', 'px', 'em', 'rem', 'vw']
 14534   });
 16593   });
 14535 };
 16594   const sides = useCustomSides(blockName, 'margin');
 14536 
 16595 
 14537 function useIsTypographyDisabled() {
 16596   if (useIsMarginDisabled(props)) {
 14538   var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 14539   var configs = [useIsFontSizeDisabled(props), useIsLineHeightDisabled(props)];
       
 14540   return configs.filter(Boolean).length === configs.length;
       
 14541 }
       
 14542 
       
 14543 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/unit-control/index.js
       
 14544 
       
 14545 
       
 14546 
       
 14547 
       
 14548 /**
       
 14549  * WordPress dependencies
       
 14550  */
       
 14551 
       
 14552 
       
 14553 function UnitControl(_ref) {
       
 14554   var unitsProp = _ref.units,
       
 14555       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["units"]);
       
 14556 
       
 14557   var units = useCustomUnits(unitsProp);
       
 14558   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalUnitControl"], Object(esm_extends["a" /* default */])({
       
 14559     units: units
       
 14560   }, props));
       
 14561 }
       
 14562 /**
       
 14563  * Filters available units based on values defined by settings.
       
 14564  *
       
 14565  * @param {Array} settings Collection of preferred units.
       
 14566  * @param {Array} units Collection of available units.
       
 14567  *
       
 14568  * @return {Array} Filtered units based on settings.
       
 14569  */
       
 14570 
       
 14571 function filterUnitsWithSettings() {
       
 14572   var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
       
 14573   var units = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
       
 14574   return units.filter(function (unit) {
       
 14575     return settings.includes(unit.value);
       
 14576   });
       
 14577 }
       
 14578 /**
       
 14579  * Custom hook to retrieve and consolidate units setting from add_theme_support().
       
 14580  *
       
 14581  * @param {Array} unitsProp Collection of available units.
       
 14582  *
       
 14583  * @return {Array} Filtered units based on settings.
       
 14584  */
       
 14585 
       
 14586 
       
 14587 function useCustomUnits(unitsProp) {
       
 14588   var settings = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 14589     return select('core/block-editor').getSettings().enableCustomUnits;
       
 14590   }, []);
       
 14591   var isDisabled = !settings; // Adjust units based on add_theme_support( 'custom-units' );
       
 14592 
       
 14593   var units;
       
 14594   /**
       
 14595    * Handle extra arguments for add_theme_support
       
 14596    *
       
 14597    * Example: add_theme_support( 'custom-units', 'rem' );
       
 14598    * Or: add_theme_support( 'custom-units', 'px, 'rem', 'em' );
       
 14599    *
       
 14600    * Note: If there are unit argument (e.g. 'em'), these units are enabled
       
 14601    * within the control.
       
 14602    */
       
 14603 
       
 14604   if (Array.isArray(settings)) {
       
 14605     units = filterUnitsWithSettings(settings, unitsProp);
       
 14606   } else {
       
 14607     units = isDisabled ? false : unitsProp;
       
 14608   }
       
 14609 
       
 14610   return units;
       
 14611 }
       
 14612 
       
 14613 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/padding.js
       
 14614 
       
 14615 
       
 14616 
       
 14617 function padding_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; }
       
 14618 
       
 14619 function padding_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { padding_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 { padding_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 14620 
       
 14621 /**
       
 14622  * WordPress dependencies
       
 14623  */
       
 14624 
       
 14625 
       
 14626 
       
 14627 
       
 14628 /**
       
 14629  * Internal dependencies
       
 14630  */
       
 14631 
       
 14632 
       
 14633 
       
 14634 var PADDING_SUPPORT_KEY = '__experimentalPadding';
       
 14635 /**
       
 14636  * Inspector control panel containing the line height related configuration
       
 14637  *
       
 14638  * @param {Object} props
       
 14639  *
       
 14640  * @return {WPElement} Line height edit element.
       
 14641  */
       
 14642 
       
 14643 function PaddingEdit(props) {
       
 14644   var _style$spacing;
       
 14645 
       
 14646   var blockName = props.name,
       
 14647       style = props.attributes.style,
       
 14648       setAttributes = props.setAttributes;
       
 14649   var units = useCustomUnits();
       
 14650 
       
 14651   if (!Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, PADDING_SUPPORT_KEY)) {
       
 14652     return null;
 16597     return null;
 14653   }
 16598   }
 14654 
 16599 
 14655   var onChange = function onChange(next) {
 16600   const onChange = next => {
 14656     var newStyle = padding_objectSpread({}, style, {
 16601     const newStyle = { ...style,
 14657       spacing: {
 16602       spacing: { ...(style === null || style === void 0 ? void 0 : style.spacing),
 14658         padding: next
 16603         margin: next
 14659       }
 16604       }
 14660     });
 16605     };
 14661 
       
 14662     setAttributes({
 16606     setAttributes({
 14663       style: utils_cleanEmptyObject(newStyle)
 16607       style: cleanEmptyObject(newStyle)
 14664     });
 16608     });
 14665   };
 16609   };
 14666 
 16610 
 14667   var onChangeShowVisualizer = function onChangeShowVisualizer(next) {
 16611   const onChangeShowVisualizer = next => {
 14668     var newStyle = padding_objectSpread({}, style, {
 16612     const newStyle = { ...style,
 14669       visualizers: {
 16613       visualizers: {
 14670         padding: next
 16614         margin: next
 14671       }
 16615       }
 14672     });
 16616     };
 14673 
       
 14674     setAttributes({
 16617     setAttributes({
 14675       style: utils_cleanEmptyObject(newStyle)
 16618       style: cleanEmptyObject(newStyle)
 14676     });
 16619     });
 14677   };
 16620   };
 14678 
 16621 
 14679   return external_this_wp_element_["Platform"].select({
 16622   return external_wp_element_["Platform"].select({
 14680     web: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalBoxControl"], {
 16623     web: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalBoxControl"], {
 14681       values: style === null || style === void 0 ? void 0 : (_style$spacing = style.spacing) === null || _style$spacing === void 0 ? void 0 : _style$spacing.padding,
 16624       values: style === null || style === void 0 ? void 0 : (_style$spacing = style.spacing) === null || _style$spacing === void 0 ? void 0 : _style$spacing.margin,
 14682       onChange: onChange,
 16625       onChange: onChange,
 14683       onChangeShowVisualizer: onChangeShowVisualizer,
 16626       onChangeShowVisualizer: onChangeShowVisualizer,
 14684       label: Object(external_this_wp_i18n_["__"])('Padding'),
 16627       label: Object(external_wp_i18n_["__"])('Margin'),
       
 16628       sides: sides,
 14685       units: units
 16629       units: units
 14686     })),
 16630     })),
 14687     native: null
 16631     native: null
 14688   });
 16632   });
 14689 }
 16633 }
 14690 var paddingStyleMappings = {
 16634 
 14691   paddingTop: ['spacing', 'padding', 'top'],
 16635 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/padding.js
 14692   paddingRight: ['spacing', 'padding', 'right'],
 16636 
 14693   paddingBottom: ['spacing', 'padding', 'bottom'],
 16637 
 14694   paddingLeft: ['spacing', 'padding', 'left']
 16638 /**
       
 16639  * WordPress dependencies
       
 16640  */
       
 16641 
       
 16642 
       
 16643 
       
 16644 
       
 16645 /**
       
 16646  * Internal dependencies
       
 16647  */
       
 16648 
       
 16649 
       
 16650 
       
 16651 
       
 16652 /**
       
 16653  * Determines if there is padding support.
       
 16654  *
       
 16655  * @param  {string|Object} blockType Block name or Block Type object.
       
 16656  * @return {boolean}                 Whether there is support.
       
 16657  */
       
 16658 
       
 16659 function hasPaddingSupport(blockType) {
       
 16660   const support = Object(external_wp_blocks_["getBlockSupport"])(blockType, SPACING_SUPPORT_KEY);
       
 16661   return !!(true === support || support !== null && support !== void 0 && support.padding);
       
 16662 }
       
 16663 /**
       
 16664  * Custom hook that checks if padding settings have been disabled.
       
 16665  *
       
 16666  * @param  {string} name The name of the block.
       
 16667  * @return {boolean}                 Whether padding setting is disabled.
       
 16668  */
       
 16669 
       
 16670 function useIsPaddingDisabled({
       
 16671   name: blockName
       
 16672 } = {}) {
       
 16673   const isDisabled = !useSetting('spacing.customPadding');
       
 16674   return !hasPaddingSupport(blockName) || isDisabled;
       
 16675 }
       
 16676 /**
       
 16677  * Inspector control panel containing the padding related configuration
       
 16678  *
       
 16679  * @param {Object} props
       
 16680  *
       
 16681  * @return {WPElement} Padding edit element.
       
 16682  */
       
 16683 
       
 16684 function PaddingEdit(props) {
       
 16685   var _style$spacing;
       
 16686 
       
 16687   const {
       
 16688     name: blockName,
       
 16689     attributes: {
       
 16690       style
       
 16691     },
       
 16692     setAttributes
       
 16693   } = props;
       
 16694   const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
       
 16695     availableUnits: useSetting('spacing.units') || ['%', 'px', 'em', 'rem', 'vw']
       
 16696   });
       
 16697   const sides = useCustomSides(blockName, 'padding');
       
 16698 
       
 16699   if (useIsPaddingDisabled(props)) {
       
 16700     return null;
       
 16701   }
       
 16702 
       
 16703   const onChange = next => {
       
 16704     const newStyle = { ...style,
       
 16705       spacing: { ...(style === null || style === void 0 ? void 0 : style.spacing),
       
 16706         padding: next
       
 16707       }
       
 16708     };
       
 16709     setAttributes({
       
 16710       style: cleanEmptyObject(newStyle)
       
 16711     });
       
 16712   };
       
 16713 
       
 16714   const onChangeShowVisualizer = next => {
       
 16715     const newStyle = { ...style,
       
 16716       visualizers: {
       
 16717         padding: next
       
 16718       }
       
 16719     };
       
 16720     setAttributes({
       
 16721       style: cleanEmptyObject(newStyle)
       
 16722     });
       
 16723   };
       
 16724 
       
 16725   return external_wp_element_["Platform"].select({
       
 16726     web: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalBoxControl"], {
       
 16727       values: style === null || style === void 0 ? void 0 : (_style$spacing = style.spacing) === null || _style$spacing === void 0 ? void 0 : _style$spacing.padding,
       
 16728       onChange: onChange,
       
 16729       onChangeShowVisualizer: onChangeShowVisualizer,
       
 16730       label: Object(external_wp_i18n_["__"])('Padding'),
       
 16731       sides: sides,
       
 16732       units: units
       
 16733     })),
       
 16734     native: null
       
 16735   });
       
 16736 }
       
 16737 
       
 16738 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/spacing.js
       
 16739 
       
 16740 
       
 16741 /**
       
 16742  * WordPress dependencies
       
 16743  */
       
 16744 
       
 16745 
       
 16746 
       
 16747 
       
 16748 /**
       
 16749  * Internal dependencies
       
 16750  */
       
 16751 
       
 16752 
       
 16753 
       
 16754 
       
 16755 const SPACING_SUPPORT_KEY = 'spacing';
       
 16756 /**
       
 16757  * Inspector controls for spacing support.
       
 16758  *
       
 16759  * @param  {Object} props Block props.
       
 16760  * @return {WPElement}    Inspector controls for spacing support features.
       
 16761  */
       
 16762 
       
 16763 function SpacingPanel(props) {
       
 16764   const isDisabled = useIsSpacingDisabled(props);
       
 16765   const isSupported = hasSpacingSupport(props.name);
       
 16766 
       
 16767   if (isDisabled || !isSupported) {
       
 16768     return null;
       
 16769   }
       
 16770 
       
 16771   return Object(external_wp_element_["createElement"])(inspector_controls, {
       
 16772     key: "spacing"
       
 16773   }, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
       
 16774     title: Object(external_wp_i18n_["__"])('Spacing')
       
 16775   }, Object(external_wp_element_["createElement"])(PaddingEdit, props), Object(external_wp_element_["createElement"])(MarginEdit, props)));
       
 16776 }
       
 16777 /**
       
 16778  * Determine whether there is block support for padding or margins.
       
 16779  *
       
 16780  * @param {string} blockName Block name.
       
 16781  * @return {boolean}         Whether there is support.
       
 16782  */
       
 16783 
       
 16784 function hasSpacingSupport(blockName) {
       
 16785   if (external_wp_element_["Platform"].OS !== 'web') {
       
 16786     return false;
       
 16787   }
       
 16788 
       
 16789   return hasPaddingSupport(blockName) || hasMarginSupport(blockName);
       
 16790 }
       
 16791 /**
       
 16792  * Determines whether spacing support has been disabled.
       
 16793  *
       
 16794  * @param  {Object} props Block properties.
       
 16795  * @return {boolean}      If spacing support is completely disabled.
       
 16796  */
       
 16797 
       
 16798 const useIsSpacingDisabled = (props = {}) => {
       
 16799   const paddingDisabled = useIsPaddingDisabled(props);
       
 16800   const marginDisabled = useIsMarginDisabled(props);
       
 16801   return paddingDisabled && marginDisabled;
 14695 };
 16802 };
 14696 
 16803 /**
 14697 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/spacing-panel-control/index.js
 16804  * Custom hook to retrieve which padding/margin is supported
       
 16805  * e.g. top, right, bottom or left.
       
 16806  *
       
 16807  * Sides are opted into by default. It is only if a specific side is set to
       
 16808  * false that it is omitted.
       
 16809  *
       
 16810  * @param  {string} blockName Block name.
       
 16811  * @param  {string} feature   The feature custom sides relate to e.g. padding or margins.
       
 16812  * @return {Object}           Sides supporting custom margin.
       
 16813  */
       
 16814 
       
 16815 
       
 16816 function useCustomSides(blockName, feature) {
       
 16817   const support = Object(external_wp_blocks_["getBlockSupport"])(blockName, SPACING_SUPPORT_KEY); // Skip when setting is boolean as theme isn't setting arbitrary sides.
       
 16818 
       
 16819   if (typeof support[feature] === 'boolean') {
       
 16820     return;
       
 16821   }
       
 16822 
       
 16823   return support[feature];
       
 16824 }
       
 16825 
       
 16826 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/style.js
 14698 
 16827 
 14699 
 16828 
 14700 
 16829 
 14701 /**
 16830 /**
 14702  * External dependencies
 16831  * External dependencies
 14703  */
 16832  */
 14704 
 16833 
       
 16834 
 14705 /**
 16835 /**
 14706  * WordPress dependencies
 16836  * WordPress dependencies
 14707  */
 16837  */
 14708 
 16838 
 14709 
 16839 
 14712 /**
 16842 /**
 14713  * Internal dependencies
 16843  * Internal dependencies
 14714  */
 16844  */
 14715 
 16845 
 14716 
 16846 
 14717 function SpacingPanelControl(_ref) {
 16847 
 14718   var children = _ref.children,
 16848 
 14719       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["children"]);
 16849 
 14720 
 16850 
 14721   var isSpacingEnabled = Object(external_this_wp_data_["useSelect"])(function (select) {
 16851 const styleSupportKeys = [...TYPOGRAPHY_SUPPORT_KEYS, BORDER_SUPPORT_KEY, COLOR_SUPPORT_KEY, SPACING_SUPPORT_KEY];
 14722     var _select = select('core/block-editor'),
 16852 
 14723         getSettings = _select.getSettings;
 16853 const hasStyleSupport = blockType => styleSupportKeys.some(key => Object(external_wp_blocks_["hasBlockSupport"])(blockType, key));
 14724 
 16854 
 14725     return Object(external_this_lodash_["get"])(getSettings(), '__experimentalEnableCustomSpacing');
 16855 const VARIABLE_REFERENCE_PREFIX = 'var:';
 14726   }, []);
 16856 const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';
 14727   if (!isSpacingEnabled) return null;
 16857 const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';
 14728   return Object(external_this_wp_element_["createElement"])(inspector_controls, props, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
       
 14729     title: Object(external_this_wp_i18n_["__"])('Spacing')
       
 14730   }, children));
       
 14731 }
       
 14732 
       
 14733 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/style.js
       
 14734 
       
 14735 
       
 14736 
       
 14737 
       
 14738 
       
 14739 
       
 14740 
       
 14741 function style_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; }
       
 14742 
       
 14743 function style_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { style_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 { style_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 14744 
       
 14745 /**
       
 14746  * External dependencies
       
 14747  */
       
 14748 
       
 14749 /**
       
 14750  * WordPress dependencies
       
 14751  */
       
 14752 
       
 14753 
       
 14754 
       
 14755 
       
 14756 /**
       
 14757  * Internal dependencies
       
 14758  */
       
 14759 
       
 14760 
       
 14761 
       
 14762 
       
 14763 
       
 14764 var styleSupportKeys = [].concat(Object(toConsumableArray["a" /* default */])(TYPOGRAPHY_SUPPORT_KEYS), [COLOR_SUPPORT_KEY, PADDING_SUPPORT_KEY]);
       
 14765 
       
 14766 var style_hasStyleSupport = function hasStyleSupport(blockType) {
       
 14767   return styleSupportKeys.some(function (key) {
       
 14768     return Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, key);
       
 14769   });
       
 14770 };
       
 14771 
       
 14772 var VARIABLE_REFERENCE_PREFIX = 'var:';
       
 14773 var VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';
       
 14774 var VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';
       
 14775 
 16858 
 14776 function compileStyleValue(uncompiledValue) {
 16859 function compileStyleValue(uncompiledValue) {
 14777   if (Object(external_this_lodash_["startsWith"])(uncompiledValue, VARIABLE_REFERENCE_PREFIX)) {
 16860   if (Object(external_lodash_["startsWith"])(uncompiledValue, VARIABLE_REFERENCE_PREFIX)) {
 14778     var variable = uncompiledValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
 16861     const variable = uncompiledValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
 14779     return "var(--wp--".concat(variable, ")");
 16862     return `var(--wp--${variable})`;
 14780   }
 16863   }
 14781 
 16864 
 14782   return uncompiledValue;
 16865   return uncompiledValue;
 14783 }
 16866 }
 14784 /**
 16867 /**
 14787  * @param  {Object} styles Styles configuration
 16870  * @param  {Object} styles Styles configuration
 14788  * @return {Object}        Flattened CSS variables declaration
 16871  * @return {Object}        Flattened CSS variables declaration
 14789  */
 16872  */
 14790 
 16873 
 14791 
 16874 
 14792 function getInlineStyles() {
 16875 function getInlineStyles(styles = {}) {
 14793   var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 16876   const output = {};
 14794 
 16877   Object.keys(external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"]).forEach(propKey => {
 14795   var mappings = style_objectSpread({}, paddingStyleMappings, {
 16878     const path = external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"][propKey].value;
 14796     lineHeight: ['typography', 'lineHeight'],
 16879     const subPaths = external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"][propKey].properties; // Ignore styles on elements because they are handled on the server.
 14797     fontSize: ['typography', 'fontSize'],
 16880 
 14798     background: ['color', 'gradient'],
 16881     if (Object(external_lodash_["has"])(styles, path) && 'elements' !== Object(external_lodash_["first"])(path)) {
 14799     backgroundColor: ['color', 'background'],
 16882       if (!!subPaths) {
 14800     color: ['color', 'text'],
 16883         subPaths.forEach(suffix => {
 14801     '--wp--style--color--link': ['color', 'link']
 16884           output[propKey + Object(external_lodash_["capitalize"])(suffix)] = compileStyleValue(Object(external_lodash_["get"])(styles, [...path, suffix]));
 14802   });
 16885         });
 14803 
 16886       } else {
 14804   var output = {};
 16887         output[propKey] = compileStyleValue(Object(external_lodash_["get"])(styles, path));
 14805   Object.entries(mappings).forEach(function (_ref) {
 16888       }
 14806     var _ref2 = Object(toArray["a" /* default */])(_ref),
       
 14807         styleKey = _ref2[0],
       
 14808         otherObjectKeys = _ref2.slice(1);
       
 14809 
       
 14810     var _otherObjectKeys = Object(slicedToArray["a" /* default */])(otherObjectKeys, 1),
       
 14811         objectKeys = _otherObjectKeys[0];
       
 14812 
       
 14813     if (Object(external_this_lodash_["has"])(styles, objectKeys)) {
       
 14814       output[styleKey] = compileStyleValue(Object(external_this_lodash_["get"])(styles, objectKeys));
       
 14815     }
 16889     }
 14816   });
 16890   });
 14817   return output;
 16891   return output;
 14818 }
 16892 }
       
 16893 
       
 16894 function compileElementsStyles(selector, elements = {}) {
       
 16895   return Object(external_lodash_["map"])(elements, (styles, element) => {
       
 16896     const elementStyles = getInlineStyles(styles);
       
 16897 
       
 16898     if (!Object(external_lodash_["isEmpty"])(elementStyles)) {
       
 16899       return [`.${selector} ${external_wp_blocks_["__EXPERIMENTAL_ELEMENTS"][element]}{`, ...Object(external_lodash_["map"])(elementStyles, (value, property) => `\t${Object(external_lodash_["kebabCase"])(property)}: ${value}${element === 'link' ? '!important' : ''};`), '}'].join('\n');
       
 16900     }
       
 16901 
       
 16902     return '';
       
 16903   }).join('\n');
       
 16904 }
 14819 /**
 16905 /**
 14820  * Filters registered block settings, extending attributes to include `style` attribute.
 16906  * Filters registered block settings, extending attributes to include `style` attribute.
 14821  *
 16907  *
 14822  * @param  {Object} settings Original block settings
 16908  * @param  {Object} settings Original block settings
 14823  * @return {Object}          Filtered block settings
 16909  * @return {Object}          Filtered block settings
 14824  */
 16910  */
 14825 
 16911 
       
 16912 
 14826 function style_addAttribute(settings) {
 16913 function style_addAttribute(settings) {
 14827   if (!style_hasStyleSupport(settings)) {
 16914   if (!hasStyleSupport(settings)) {
 14828     return settings;
 16915     return settings;
 14829   } // allow blocks to specify their own attribute definition with default values if needed.
 16916   } // allow blocks to specify their own attribute definition with default values if needed.
 14830 
 16917 
 14831 
 16918 
 14832   if (!settings.attributes.style) {
 16919   if (!settings.attributes.style) {
 14837     });
 16924     });
 14838   }
 16925   }
 14839 
 16926 
 14840   return settings;
 16927   return settings;
 14841 }
 16928 }
       
 16929 
       
 16930 const skipSerializationPaths = {
       
 16931   [`${BORDER_SUPPORT_KEY}.__experimentalSkipSerialization`]: ['border'],
       
 16932   [`${COLOR_SUPPORT_KEY}.__experimentalSkipSerialization`]: [COLOR_SUPPORT_KEY],
       
 16933   [`${TYPOGRAPHY_SUPPORT_KEY}.__experimentalSkipSerialization`]: [TYPOGRAPHY_SUPPORT_KEY]
       
 16934 };
 14842 /**
 16935 /**
 14843  * Override props assigned to save component to inject the CSS variables definition.
 16936  * Override props assigned to save component to inject the CSS variables definition.
 14844  *
 16937  *
 14845  * @param  {Object} props      Additional props applied to save element
 16938  * @param  {Object} props      Additional props applied to save element
 14846  * @param  {Object} blockType  Block type
 16939  * @param  {Object} blockType  Block type
 14847  * @param  {Object} attributes Block attributes
 16940  * @param  {Object} attributes Block attributes
 14848  * @return {Object}            Filtered props applied to save element
 16941  * @return {Object}            Filtered props applied to save element
 14849  */
 16942  */
 14850 
 16943 
 14851 
       
 14852 function style_addSaveProps(props, blockType, attributes) {
 16944 function style_addSaveProps(props, blockType, attributes) {
 14853   if (!style_hasStyleSupport(blockType)) {
 16945   if (!hasStyleSupport(blockType)) {
 14854     return props;
 16946     return props;
 14855   }
 16947   }
 14856 
 16948 
 14857   var style = attributes.style;
 16949   let {
 14858   props.style = style_objectSpread({}, getInlineStyles(style), {}, props.style);
 16950     style
       
 16951   } = attributes;
       
 16952   Object(external_lodash_["forEach"])(skipSerializationPaths, (path, indicator) => {
       
 16953     if (Object(external_wp_blocks_["getBlockSupport"])(blockType, indicator)) {
       
 16954       style = Object(external_lodash_["omit"])(style, path);
       
 16955     }
       
 16956   });
       
 16957   props.style = { ...getInlineStyles(style),
       
 16958     ...props.style
       
 16959   };
 14859   return props;
 16960   return props;
 14860 }
 16961 }
 14861 /**
 16962 /**
 14862  * Filters registered block settings to extand the block edit wrapper
 16963  * Filters registered block settings to extend the block edit wrapper
 14863  * to apply the desired styles and classnames properly.
 16964  * to apply the desired styles and classnames properly.
 14864  *
 16965  *
 14865  * @param  {Object} settings Original block settings
 16966  * @param  {Object} settings Original block settings
 14866  * @return {Object}          Filtered block settings
 16967  * @return {Object}          Filtered block settings
 14867  */
 16968  */
 14868 
 16969 
 14869 function style_addEditProps(settings) {
 16970 function style_addEditProps(settings) {
 14870   if (!style_hasStyleSupport(settings)) {
 16971   if (!hasStyleSupport(settings)) {
 14871     return settings;
 16972     return settings;
 14872   }
 16973   }
 14873 
 16974 
 14874   var existingGetEditWrapperProps = settings.getEditWrapperProps;
 16975   const existingGetEditWrapperProps = settings.getEditWrapperProps;
 14875 
 16976 
 14876   settings.getEditWrapperProps = function (attributes) {
 16977   settings.getEditWrapperProps = attributes => {
 14877     var props = {};
 16978     let props = {};
 14878 
 16979 
 14879     if (existingGetEditWrapperProps) {
 16980     if (existingGetEditWrapperProps) {
 14880       props = existingGetEditWrapperProps(attributes);
 16981       props = existingGetEditWrapperProps(attributes);
 14881     }
 16982     }
 14882 
 16983 
 14891  *
 16992  *
 14892  * @param  {Function} BlockEdit Original component
 16993  * @param  {Function} BlockEdit Original component
 14893  * @return {Function}           Wrapped component
 16994  * @return {Function}           Wrapped component
 14894  */
 16995  */
 14895 
 16996 
 14896 var withBlockControls = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) {
 16997 const withBlockControls = Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => props => {
 14897   return function (props) {
 16998   const shouldDisplayControls = useDisplayBlockControls();
 14898     var blockName = props.name;
 16999   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, shouldDisplayControls && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(TypographyPanel, props), Object(external_wp_element_["createElement"])(BorderPanel, props), Object(external_wp_element_["createElement"])(ColorEdit, props), Object(external_wp_element_["createElement"])(SpacingPanel, props)), Object(external_wp_element_["createElement"])(BlockEdit, props));
 14899     var hasPaddingSupport = Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, PADDING_SUPPORT_KEY);
 17000 }, 'withToolbarControls');
 14900     return [Object(external_this_wp_element_["createElement"])(TypographyPanel, Object(esm_extends["a" /* default */])({
 17001 /**
 14901       key: "typography"
 17002  * Override the default block element to include duotone styles.
 14902     }, props)), Object(external_this_wp_element_["createElement"])(ColorEdit, Object(esm_extends["a" /* default */])({
 17003  *
 14903       key: "colors"
 17004  * @param  {Function} BlockListBlock Original component
 14904     }, props)), Object(external_this_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
 17005  * @return {Function}                Wrapped component
 14905       key: "edit"
 17006  */
 14906     }, props)), hasPaddingSupport && Object(external_this_wp_element_["createElement"])(SpacingPanelControl, {
 17007 
 14907       key: "spacing"
 17008 const withElementsStyles = Object(external_wp_compose_["createHigherOrderComponent"])(BlockListBlock => props => {
 14908     }, Object(external_this_wp_element_["createElement"])(PaddingEdit, props))];
 17009   var _props$attributes$sty, _props$attributes$sty2;
       
 17010 
       
 17011   const elements = (_props$attributes$sty = props.attributes.style) === null || _props$attributes$sty === void 0 ? void 0 : _props$attributes$sty.elements;
       
 17012   const blockElementsContainerIdentifier = `wp-elements-${Object(external_wp_compose_["useInstanceId"])(BlockListBlock)}`;
       
 17013   const styles = compileElementsStyles(blockElementsContainerIdentifier, (_props$attributes$sty2 = props.attributes.style) === null || _props$attributes$sty2 === void 0 ? void 0 : _props$attributes$sty2.elements);
       
 17014   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, elements && Object(external_wp_element_["createElement"])("style", {
       
 17015     dangerouslySetInnerHTML: {
       
 17016       __html: styles
       
 17017     }
       
 17018   }), Object(external_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, {
       
 17019     className: elements ? classnames_default()(props.className, blockElementsContainerIdentifier) : props.className
       
 17020   })));
       
 17021 });
       
 17022 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/style/addAttribute', style_addAttribute);
       
 17023 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/style/addSaveProps', style_addSaveProps);
       
 17024 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/style/addEditProps', style_addEditProps);
       
 17025 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/style/with-block-controls', withBlockControls);
       
 17026 Object(external_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/editor/with-elements-styles', withElementsStyles);
       
 17027 
       
 17028 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/duotone-control/duotone-picker-popover.js
       
 17029 
       
 17030 
       
 17031 /**
       
 17032  * WordPress dependencies
       
 17033  */
       
 17034 
       
 17035 
       
 17036 
       
 17037 function DuotonePickerPopover({
       
 17038   value,
       
 17039   onChange,
       
 17040   onToggle,
       
 17041   duotonePalette,
       
 17042   colorPalette,
       
 17043   disableCustomColors,
       
 17044   disableCustomDuotone
       
 17045 }) {
       
 17046   return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
       
 17047     className: "block-editor-duotone-control__popover",
       
 17048     headerTitle: Object(external_wp_i18n_["__"])('Duotone'),
       
 17049     onFocusOutside: onToggle
       
 17050   }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
       
 17051     label: Object(external_wp_i18n_["__"])('Duotone')
       
 17052   }, Object(external_wp_element_["createElement"])(external_wp_components_["DuotonePicker"], {
       
 17053     colorPalette: colorPalette,
       
 17054     duotonePalette: duotonePalette,
       
 17055     disableCustomColors: disableCustomColors,
       
 17056     disableCustomDuotone: disableCustomDuotone,
       
 17057     value: value,
       
 17058     onChange: onChange
       
 17059   })));
       
 17060 }
       
 17061 
       
 17062 /* harmony default export */ var duotone_picker_popover = (DuotonePickerPopover);
       
 17063 
       
 17064 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/duotone-control/index.js
       
 17065 
       
 17066 
       
 17067 /**
       
 17068  * WordPress dependencies
       
 17069  */
       
 17070 
       
 17071 
       
 17072 
       
 17073 
       
 17074 /**
       
 17075  * Internal dependencies
       
 17076  */
       
 17077 
       
 17078 
       
 17079 
       
 17080 function DuotoneControl({
       
 17081   colorPalette,
       
 17082   duotonePalette,
       
 17083   disableCustomColors,
       
 17084   disableCustomDuotone,
       
 17085   value,
       
 17086   onChange
       
 17087 }) {
       
 17088   const [isOpen, setIsOpen] = Object(external_wp_element_["useState"])(false);
       
 17089 
       
 17090   const onToggle = () => {
       
 17091     setIsOpen(prev => !prev);
 14909   };
 17092   };
 14910 }, 'withToolbarControls');
 17093 
 14911 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/style/addAttribute', style_addAttribute);
 17094   const openOnArrowDown = event => {
 14912 Object(external_this_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/style/addSaveProps', style_addSaveProps);
 17095     if (!isOpen && event.keyCode === external_wp_keycodes_["DOWN"]) {
 14913 Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/style/addEditProps', style_addEditProps);
 17096       event.preventDefault();
 14914 Object(external_this_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/style/with-block-controls', withBlockControls);
 17097       event.stopPropagation();
       
 17098       onToggle();
       
 17099     }
       
 17100   };
       
 17101 
       
 17102   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
       
 17103     showTooltip: true,
       
 17104     onClick: onToggle,
       
 17105     "aria-haspopup": "true",
       
 17106     "aria-expanded": isOpen,
       
 17107     onKeyDown: openOnArrowDown,
       
 17108     label: Object(external_wp_i18n_["__"])('Apply duotone filter'),
       
 17109     icon: Object(external_wp_element_["createElement"])(external_wp_components_["DuotoneSwatch"], {
       
 17110       values: value
       
 17111     })
       
 17112   }), isOpen && Object(external_wp_element_["createElement"])(duotone_picker_popover, {
       
 17113     value: value,
       
 17114     onChange: onChange,
       
 17115     onToggle: onToggle,
       
 17116     duotonePalette: duotonePalette,
       
 17117     colorPalette: colorPalette,
       
 17118     disableCustomColors: disableCustomColors,
       
 17119     disableCustomDuotone: disableCustomDuotone
       
 17120   }));
       
 17121 }
       
 17122 
       
 17123 /* harmony default export */ var duotone_control = (DuotoneControl);
       
 17124 
       
 17125 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/head.js
       
 17126 
       
 17127 
       
 17128 /**
       
 17129  * WordPress dependencies
       
 17130  */
       
 17131 
       
 17132 const head_context = Object(external_wp_element_["createContext"])();
       
 17133 function Head({
       
 17134   children
       
 17135 }) {
       
 17136   const [element, setElement] = Object(external_wp_element_["useState"])();
       
 17137   return Object(external_wp_element_["createElement"])(head_context.Provider, {
       
 17138     value: element
       
 17139   }, Object(external_wp_element_["createElement"])("div", {
       
 17140     ref: setElement
       
 17141   }), children);
       
 17142 }
       
 17143 Head.context = head_context;
       
 17144 
       
 17145 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/duotone.js
       
 17146 
       
 17147 
       
 17148 
       
 17149 /**
       
 17150  * External dependencies
       
 17151  */
       
 17152 
       
 17153 
       
 17154 /**
       
 17155  * WordPress dependencies
       
 17156  */
       
 17157 
       
 17158 
       
 17159 
       
 17160 
       
 17161 
       
 17162 
       
 17163 /**
       
 17164  * Internal dependencies
       
 17165  */
       
 17166 
       
 17167 
       
 17168 
       
 17169 const duotone_EMPTY_ARRAY = [];
       
 17170 /**
       
 17171  * Convert a list of colors to an object of R, G, and B values.
       
 17172  *
       
 17173  * @param {string[]} colors Array of RBG color strings.
       
 17174  *
       
 17175  * @return {Object} R, G, and B values.
       
 17176  */
       
 17177 
       
 17178 function getValuesFromColors(colors = []) {
       
 17179   const values = {
       
 17180     r: [],
       
 17181     g: [],
       
 17182     b: []
       
 17183   };
       
 17184   colors.forEach(color => {
       
 17185     // Access values directly to skip extra rounding that tinycolor.toRgb() does.
       
 17186     const tcolor = tinycolor_default()(color);
       
 17187     values.r.push(tcolor._r / 255);
       
 17188     values.g.push(tcolor._g / 255);
       
 17189     values.b.push(tcolor._b / 255);
       
 17190   });
       
 17191   return values;
       
 17192 }
       
 17193 /**
       
 17194  * Values for the SVG `feComponentTransfer`.
       
 17195  *
       
 17196  * @typedef Values {Object}
       
 17197  * @property {number[]} r Red values.
       
 17198  * @property {number[]} g Green values.
       
 17199  * @property {number[]} b Blue values.
       
 17200  */
       
 17201 
       
 17202 /**
       
 17203  * SVG and stylesheet needed for rendering the duotone filter.
       
 17204  *
       
 17205  * @param  {Object} props          Duotone props.
       
 17206  * @param  {string} props.selector Selector to apply the filter to.
       
 17207  * @param  {string} props.id       Unique id for this duotone filter.
       
 17208  * @param  {Values} props.values   R, G, and B values to filter with.
       
 17209  * @return {WPElement}             Duotone element.
       
 17210  */
       
 17211 
       
 17212 function DuotoneFilter({
       
 17213   selector,
       
 17214   id,
       
 17215   values
       
 17216 }) {
       
 17217   const stylesheet = `
       
 17218 ${selector} {
       
 17219 	filter: url( #${id} );
       
 17220 }
       
 17221 `;
       
 17222   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
       
 17223     xmlnsXlink: "http://www.w3.org/1999/xlink",
       
 17224     viewBox: "0 0 0 0",
       
 17225     width: "0",
       
 17226     height: "0",
       
 17227     focusable: "false",
       
 17228     role: "none",
       
 17229     style: {
       
 17230       visibility: 'hidden',
       
 17231       position: 'absolute',
       
 17232       left: '-9999px',
       
 17233       overflow: 'hidden'
       
 17234     }
       
 17235   }, Object(external_wp_element_["createElement"])("defs", null, Object(external_wp_element_["createElement"])("filter", {
       
 17236     id: id
       
 17237   }, Object(external_wp_element_["createElement"])("feColorMatrix", {
       
 17238     type: "matrix" // Use perceptual brightness to convert to grayscale.
       
 17239     // prettier-ignore
       
 17240     ,
       
 17241     values: ".299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 0 0 0 1 0"
       
 17242   }), Object(external_wp_element_["createElement"])("feComponentTransfer", {
       
 17243     // Use sRGB instead of linearRGB to be consistent with how CSS gradients work.
       
 17244     colorInterpolationFilters: "sRGB"
       
 17245   }, Object(external_wp_element_["createElement"])("feFuncR", {
       
 17246     type: "table",
       
 17247     tableValues: values.r.join(' ')
       
 17248   }), Object(external_wp_element_["createElement"])("feFuncG", {
       
 17249     type: "table",
       
 17250     tableValues: values.g.join(' ')
       
 17251   }), Object(external_wp_element_["createElement"])("feFuncB", {
       
 17252     type: "table",
       
 17253     tableValues: values.b.join(' ')
       
 17254   }))))), Object(external_wp_element_["createElement"])("style", {
       
 17255     dangerouslySetInnerHTML: {
       
 17256       __html: stylesheet
       
 17257     }
       
 17258   }));
       
 17259 }
       
 17260 
       
 17261 function DuotonePanel({
       
 17262   attributes,
       
 17263   setAttributes
       
 17264 }) {
       
 17265   var _style$color;
       
 17266 
       
 17267   const style = attributes === null || attributes === void 0 ? void 0 : attributes.style;
       
 17268   const duotone = style === null || style === void 0 ? void 0 : (_style$color = style.color) === null || _style$color === void 0 ? void 0 : _style$color.duotone;
       
 17269   const duotonePalette = useSetting('color.duotone') || duotone_EMPTY_ARRAY;
       
 17270   const colorPalette = useSetting('color.palette') || duotone_EMPTY_ARRAY;
       
 17271   const disableCustomColors = !useSetting('color.custom');
       
 17272   const disableCustomDuotone = !useSetting('color.customDuotone') || (colorPalette === null || colorPalette === void 0 ? void 0 : colorPalette.length) === 0 && disableCustomColors;
       
 17273 
       
 17274   if ((duotonePalette === null || duotonePalette === void 0 ? void 0 : duotonePalette.length) === 0 && disableCustomDuotone) {
       
 17275     return null;
       
 17276   }
       
 17277 
       
 17278   return Object(external_wp_element_["createElement"])(block_controls, {
       
 17279     group: "block"
       
 17280   }, Object(external_wp_element_["createElement"])(duotone_control, {
       
 17281     duotonePalette: duotonePalette,
       
 17282     colorPalette: colorPalette,
       
 17283     disableCustomDuotone: disableCustomDuotone,
       
 17284     disableCustomColors: disableCustomColors,
       
 17285     value: duotone,
       
 17286     onChange: newDuotone => {
       
 17287       const newStyle = { ...style,
       
 17288         color: { ...(style === null || style === void 0 ? void 0 : style.color),
       
 17289           duotone: newDuotone
       
 17290         }
       
 17291       };
       
 17292       setAttributes({
       
 17293         style: newStyle
       
 17294       });
       
 17295     }
       
 17296   }));
       
 17297 }
       
 17298 /**
       
 17299  * Filters registered block settings, extending attributes to include
       
 17300  * the `duotone` attribute.
       
 17301  *
       
 17302  * @param  {Object} settings Original block settings
       
 17303  * @return {Object}          Filtered block settings
       
 17304  */
       
 17305 
       
 17306 
       
 17307 function addDuotoneAttributes(settings) {
       
 17308   if (!Object(external_wp_blocks_["hasBlockSupport"])(settings, 'color.__experimentalDuotone')) {
       
 17309     return settings;
       
 17310   } // Allow blocks to specify their own attribute definition with default
       
 17311   // values if needed.
       
 17312 
       
 17313 
       
 17314   if (!settings.attributes.style) {
       
 17315     Object.assign(settings.attributes, {
       
 17316       style: {
       
 17317         type: 'object'
       
 17318       }
       
 17319     });
       
 17320   }
       
 17321 
       
 17322   return settings;
       
 17323 }
       
 17324 /**
       
 17325  * Override the default edit UI to include toolbar controls for duotone if the
       
 17326  * block supports duotone.
       
 17327  *
       
 17328  * @param  {Function} BlockEdit Original component
       
 17329  * @return {Function}           Wrapped component
       
 17330  */
       
 17331 
       
 17332 
       
 17333 const withDuotoneControls = Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => props => {
       
 17334   const hasDuotoneSupport = Object(external_wp_blocks_["hasBlockSupport"])(props.name, 'color.__experimentalDuotone');
       
 17335   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(BlockEdit, props), hasDuotoneSupport && Object(external_wp_element_["createElement"])(DuotonePanel, props));
       
 17336 }, 'withDuotoneControls');
       
 17337 /**
       
 17338  * Override the default block element to include duotone styles.
       
 17339  *
       
 17340  * @param  {Function} BlockListBlock Original component
       
 17341  * @return {Function}                Wrapped component
       
 17342  */
       
 17343 
       
 17344 const withDuotoneStyles = Object(external_wp_compose_["createHigherOrderComponent"])(BlockListBlock => props => {
       
 17345   var _props$attributes, _props$attributes$sty, _props$attributes$sty2;
       
 17346 
       
 17347   const duotoneSupport = Object(external_wp_blocks_["getBlockSupport"])(props.name, 'color.__experimentalDuotone');
       
 17348   const values = props === null || props === void 0 ? void 0 : (_props$attributes = props.attributes) === null || _props$attributes === void 0 ? void 0 : (_props$attributes$sty = _props$attributes.style) === null || _props$attributes$sty === void 0 ? void 0 : (_props$attributes$sty2 = _props$attributes$sty.color) === null || _props$attributes$sty2 === void 0 ? void 0 : _props$attributes$sty2.duotone;
       
 17349 
       
 17350   if (!duotoneSupport || !values) {
       
 17351     return Object(external_wp_element_["createElement"])(BlockListBlock, props);
       
 17352   }
       
 17353 
       
 17354   const id = `wp-duotone-filter-${Object(external_wp_compose_["useInstanceId"])(BlockListBlock)}`;
       
 17355   const selectors = duotoneSupport.split(',');
       
 17356   const selectorsScoped = selectors.map(selector => `.${id} ${selector.trim()}`);
       
 17357   const selectorsGroup = selectorsScoped.join(', ');
       
 17358   const className = classnames_default()(props === null || props === void 0 ? void 0 : props.className, id);
       
 17359   const element = Object(external_wp_element_["useContext"])(Head.context);
       
 17360   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, element && Object(external_wp_element_["createPortal"])(Object(external_wp_element_["createElement"])(DuotoneFilter, {
       
 17361     selector: selectorsGroup,
       
 17362     id: id,
       
 17363     values: getValuesFromColors(values)
       
 17364   }), element), Object(external_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, {
       
 17365     className: className
       
 17366   })));
       
 17367 }, 'withDuotoneStyles');
       
 17368 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/editor/duotone/add-attributes', addDuotoneAttributes);
       
 17369 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/duotone/with-editor-controls', withDuotoneControls);
       
 17370 Object(external_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/editor/duotone/with-styles', withDuotoneStyles);
       
 17371 
       
 17372 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
       
 17373 var build_module_icon = __webpack_require__("iClF");
       
 17374 
       
 17375 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/layout.js
       
 17376 
       
 17377 
       
 17378 
       
 17379 /**
       
 17380  * External dependencies
       
 17381  */
       
 17382 
       
 17383 
       
 17384 /**
       
 17385  * WordPress dependencies
       
 17386  */
       
 17387 
       
 17388 
       
 17389 
       
 17390 
       
 17391 
       
 17392 
       
 17393 
       
 17394 
       
 17395 
       
 17396 /**
       
 17397  * Internal dependencies
       
 17398  */
       
 17399 
       
 17400 
       
 17401 
       
 17402 
       
 17403 
       
 17404 
       
 17405 
       
 17406 function LayoutPanel({
       
 17407   setAttributes,
       
 17408   attributes
       
 17409 }) {
       
 17410   const {
       
 17411     layout = {}
       
 17412   } = attributes;
       
 17413   const {
       
 17414     wideSize,
       
 17415     contentSize,
       
 17416     inherit = false
       
 17417   } = layout;
       
 17418   const defaultLayout = useSetting('layout');
       
 17419   const themeSupportsLayout = Object(external_wp_data_["useSelect"])(select => {
       
 17420     const {
       
 17421       getSettings
       
 17422     } = select(store);
       
 17423     return getSettings().supportsLayout;
       
 17424   }, []);
       
 17425   const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
       
 17426     availableUnits: useSetting('spacing.units') || ['%', 'px', 'em', 'rem', 'vw']
       
 17427   });
       
 17428 
       
 17429   if (!themeSupportsLayout) {
       
 17430     return null;
       
 17431   }
       
 17432 
       
 17433   return Object(external_wp_element_["createElement"])(inspector_controls, null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
       
 17434     title: Object(external_wp_i18n_["__"])('Layout')
       
 17435   }, !!defaultLayout && Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
       
 17436     label: Object(external_wp_i18n_["__"])('Inherit default layout'),
       
 17437     checked: !!inherit,
       
 17438     onChange: () => setAttributes({
       
 17439       layout: {
       
 17440         inherit: !inherit
       
 17441       }
       
 17442     })
       
 17443   }), !inherit && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
       
 17444     className: "block-editor-hooks__layout-controls"
       
 17445   }, Object(external_wp_element_["createElement"])("div", {
       
 17446     className: "block-editor-hooks__layout-controls-unit"
       
 17447   }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalUnitControl"], {
       
 17448     label: Object(external_wp_i18n_["__"])('Content'),
       
 17449     labelPosition: "top",
       
 17450     __unstableInputWidth: "80px",
       
 17451     value: contentSize || wideSize || '',
       
 17452     onChange: nextWidth => {
       
 17453       nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth;
       
 17454       setAttributes({
       
 17455         layout: { ...layout,
       
 17456           contentSize: nextWidth
       
 17457         }
       
 17458       });
       
 17459     },
       
 17460     units: units
       
 17461   }), Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
       
 17462     icon: position_center
       
 17463   })), Object(external_wp_element_["createElement"])("div", {
       
 17464     className: "block-editor-hooks__layout-controls-unit"
       
 17465   }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalUnitControl"], {
       
 17466     label: Object(external_wp_i18n_["__"])('Wide'),
       
 17467     labelPosition: "top",
       
 17468     __unstableInputWidth: "80px",
       
 17469     value: wideSize || contentSize || '',
       
 17470     onChange: nextWidth => {
       
 17471       nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth;
       
 17472       setAttributes({
       
 17473         layout: { ...layout,
       
 17474           wideSize: nextWidth
       
 17475         }
       
 17476       });
       
 17477     },
       
 17478     units: units
       
 17479   }), Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
       
 17480     icon: stretch_wide
       
 17481   }))), Object(external_wp_element_["createElement"])("div", {
       
 17482     className: "block-editor-hooks__layout-controls-reset"
       
 17483   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 17484     isSecondary: true,
       
 17485     isSmall: true,
       
 17486     disabled: !contentSize && !wideSize,
       
 17487     onClick: () => setAttributes({
       
 17488       layout: {
       
 17489         contentSize: undefined,
       
 17490         wideSize: undefined,
       
 17491         inherit: false
       
 17492       }
       
 17493     })
       
 17494   }, Object(external_wp_i18n_["__"])('Reset')))), Object(external_wp_element_["createElement"])("p", {
       
 17495     className: "block-editor-hooks__layout-controls-helptext"
       
 17496   }, Object(external_wp_i18n_["__"])('Customize the width for all elements that are assigned to the center or wide columns.'))));
       
 17497 }
       
 17498 /**
       
 17499  * Filters registered block settings, extending attributes to include `layout`.
       
 17500  *
       
 17501  * @param  {Object} settings Original block settings
       
 17502  * @return {Object}          Filtered block settings
       
 17503  */
       
 17504 
       
 17505 
       
 17506 function layout_addAttribute(settings) {
       
 17507   if (Object(external_lodash_["has"])(settings.attributes, ['layout', 'type'])) {
       
 17508     return settings;
       
 17509   }
       
 17510 
       
 17511   if (Object(external_wp_blocks_["hasBlockSupport"])(settings, '__experimentalLayout')) {
       
 17512     settings.attributes = { ...settings.attributes,
       
 17513       layout: {
       
 17514         type: 'object'
       
 17515       }
       
 17516     };
       
 17517   }
       
 17518 
       
 17519   return settings;
       
 17520 }
       
 17521 /**
       
 17522  * Override the default edit UI to include layout controls
       
 17523  *
       
 17524  * @param  {Function} BlockEdit Original component
       
 17525  * @return {Function}           Wrapped component
       
 17526  */
       
 17527 
       
 17528 const withInspectorControls = Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => props => {
       
 17529   const {
       
 17530     name: blockName
       
 17531   } = props;
       
 17532   const supportLayout = Object(external_wp_blocks_["hasBlockSupport"])(blockName, '__experimentalLayout');
       
 17533   return [supportLayout && Object(external_wp_element_["createElement"])(LayoutPanel, Object(esm_extends["a" /* default */])({
       
 17534     key: "layout"
       
 17535   }, props)), Object(external_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
       
 17536     key: "edit"
       
 17537   }, props))];
       
 17538 }, 'withInspectorControls');
       
 17539 /**
       
 17540  * Override the default block element to add the layout styles.
       
 17541  *
       
 17542  * @param  {Function} BlockListBlock Original component
       
 17543  * @return {Function}                Wrapped component
       
 17544  */
       
 17545 
       
 17546 const withLayoutStyles = Object(external_wp_compose_["createHigherOrderComponent"])(BlockListBlock => props => {
       
 17547   const {
       
 17548     name,
       
 17549     attributes
       
 17550   } = props;
       
 17551   const supportLayout = Object(external_wp_blocks_["hasBlockSupport"])(name, '__experimentalLayout');
       
 17552   const id = Object(external_wp_compose_["useInstanceId"])(BlockListBlock);
       
 17553   const defaultLayout = useSetting('layout') || {};
       
 17554 
       
 17555   if (!supportLayout) {
       
 17556     return Object(external_wp_element_["createElement"])(BlockListBlock, props);
       
 17557   }
       
 17558 
       
 17559   const {
       
 17560     layout = {}
       
 17561   } = attributes;
       
 17562   const usedLayout = !!layout && layout.inherit ? defaultLayout : layout;
       
 17563   const className = classnames_default()(props === null || props === void 0 ? void 0 : props.className, `wp-container-${id}`);
       
 17564   const element = Object(external_wp_element_["useContext"])(Head.context);
       
 17565   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, element && Object(external_wp_element_["createPortal"])(Object(external_wp_element_["createElement"])(LayoutStyle, {
       
 17566     selector: `.wp-container-${id}`,
       
 17567     layout: usedLayout
       
 17568   }), element), Object(external_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, {
       
 17569     className: className
       
 17570   })));
       
 17571 });
       
 17572 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/layout/addAttribute', layout_addAttribute);
       
 17573 Object(external_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/editor/layout/with-layout-styles', withLayoutStyles);
       
 17574 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/layout/with-inspector-controls', withInspectorControls);
       
 17575 
       
 17576 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/use-border-props.js
       
 17577 /**
       
 17578  * External dependencies
       
 17579  */
       
 17580 
       
 17581 /**
       
 17582  * Internal dependencies
       
 17583  */
       
 17584 
       
 17585 
       
 17586 
       
 17587  // This utility is intended to assist where the serialization of the border
       
 17588 // block support is being skipped for a block but the border related CSS classes
       
 17589 // & styles still need to be generated so they can be applied to inner elements.
       
 17590 
       
 17591 const use_border_props_EMPTY_ARRAY = [];
       
 17592 /**
       
 17593  * Provides the CSS class names and inline styles for a block's border support
       
 17594  * attributes.
       
 17595  *
       
 17596  * @param  {Object} attributes             Block attributes.
       
 17597  * @param  {string} attributes.borderColor Selected named border color.
       
 17598  * @param  {Object} attributes.style       Block's styles attribute.
       
 17599  *
       
 17600  * @return {Object} Border block support derived CSS classes & styles.
       
 17601  */
       
 17602 
       
 17603 function getBorderClassesAndStyles({
       
 17604   borderColor,
       
 17605   style
       
 17606 }) {
       
 17607   var _style$border;
       
 17608 
       
 17609   const borderStyles = (style === null || style === void 0 ? void 0 : style.border) || {};
       
 17610   const borderClass = getColorClassName('border-color', borderColor);
       
 17611   const className = classnames_default()({
       
 17612     [borderClass]: !!borderClass,
       
 17613     'has-border-color': borderColor || (style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.color)
       
 17614   });
       
 17615   return {
       
 17616     className: className || undefined,
       
 17617     style: getInlineStyles({
       
 17618       border: borderStyles
       
 17619     })
       
 17620   };
       
 17621 }
       
 17622 /**
       
 17623  * Derives the border related props for a block from its border block support
       
 17624  * attributes.
       
 17625  *
       
 17626  * Inline styles are forced for named colors to ensure these selections are
       
 17627  * reflected when themes do not load their color stylesheets in the editor.
       
 17628  *
       
 17629  * @param  {Object} attributes Block attributes.
       
 17630  * @return {Object}            ClassName & style props from border block support.
       
 17631  */
       
 17632 
       
 17633 function useBorderProps(attributes) {
       
 17634   const colors = useSetting('color.palette') || use_border_props_EMPTY_ARRAY;
       
 17635   const borderProps = getBorderClassesAndStyles(attributes); // Force inline style to apply border color when themes do not load their
       
 17636   // color stylesheets in the editor.
       
 17637 
       
 17638   if (attributes.borderColor) {
       
 17639     const borderColorObject = getColorObjectByAttributeValues(colors, attributes.borderColor);
       
 17640     borderProps.style.borderColor = borderColorObject.color;
       
 17641   }
       
 17642 
       
 17643   return borderProps;
       
 17644 }
       
 17645 
       
 17646 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/use-color-props.js
       
 17647 /**
       
 17648  * External dependencies
       
 17649  */
       
 17650 
       
 17651 /**
       
 17652  * Internal dependencies
       
 17653  */
       
 17654 
       
 17655 
       
 17656 
       
 17657 
       
 17658  // The code in this file has largely been lifted from the color block support
       
 17659 // hook.
       
 17660 //
       
 17661 // This utility is intended to assist where the serialization of the colors
       
 17662 // block support is being skipped for a block but the color related CSS classes
       
 17663 // & styles still need to be generated so they can be applied to inner elements.
       
 17664 
       
 17665 const use_color_props_EMPTY_ARRAY = [];
       
 17666 /**
       
 17667  * Provides the CSS class names and inline styles for a block's color support
       
 17668  * attributes.
       
 17669  *
       
 17670  * @param  {Object} attributes Block attributes.
       
 17671  * @return {Object}            Color block support derived CSS classes & styles.
       
 17672  */
       
 17673 
       
 17674 function getColorClassesAndStyles(attributes) {
       
 17675   var _style$color, _style$color2, _style$color3, _style$color4, _style$elements, _style$elements$link;
       
 17676 
       
 17677   const {
       
 17678     backgroundColor,
       
 17679     textColor,
       
 17680     gradient,
       
 17681     style
       
 17682   } = attributes; // Collect color CSS classes.
       
 17683 
       
 17684   const backgroundClass = getColorClassName('background-color', backgroundColor);
       
 17685   const textClass = getColorClassName('color', textColor);
       
 17686 
       
 17687   const gradientClass = __experimentalGetGradientClass(gradient);
       
 17688 
       
 17689   const hasGradient = gradientClass || (style === null || style === void 0 ? void 0 : (_style$color = style.color) === null || _style$color === void 0 ? void 0 : _style$color.gradient); // Determine color CSS class name list.
       
 17690 
       
 17691   const className = classnames_default()(textClass, gradientClass, {
       
 17692     // Don't apply the background class if there's a gradient.
       
 17693     [backgroundClass]: !hasGradient && !!backgroundClass,
       
 17694     'has-text-color': textColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.text),
       
 17695     'has-background': backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.background) || gradient || (style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.gradient),
       
 17696     'has-link-color': style === null || style === void 0 ? void 0 : (_style$elements = style.elements) === null || _style$elements === void 0 ? void 0 : (_style$elements$link = _style$elements.link) === null || _style$elements$link === void 0 ? void 0 : _style$elements$link.color
       
 17697   }); // Collect inline styles for colors.
       
 17698 
       
 17699   const colorStyles = (style === null || style === void 0 ? void 0 : style.color) || {};
       
 17700   const styleProp = getInlineStyles({
       
 17701     color: colorStyles
       
 17702   });
       
 17703   return {
       
 17704     className: className || undefined,
       
 17705     style: styleProp
       
 17706   };
       
 17707 }
       
 17708 /**
       
 17709  * Determines the color related props for a block derived from its color block
       
 17710  * support attributes.
       
 17711  *
       
 17712  * Inline styles are forced for named colors to ensure these selections are
       
 17713  * reflected when themes do not load their color stylesheets in the editor.
       
 17714  *
       
 17715  * @param  {Object} attributes Block attributes.
       
 17716  * @return {Object}            ClassName & style props from colors block support.
       
 17717  */
       
 17718 
       
 17719 function useColorProps(attributes) {
       
 17720   const {
       
 17721     backgroundColor,
       
 17722     textColor,
       
 17723     gradient
       
 17724   } = attributes;
       
 17725   const colors = useSetting('color.palette') || use_color_props_EMPTY_ARRAY;
       
 17726   const gradients = useSetting('color.gradients') || use_color_props_EMPTY_ARRAY;
       
 17727   const colorProps = getColorClassesAndStyles(attributes); // Force inline styles to apply colors when themes do not load their color
       
 17728   // stylesheets in the editor.
       
 17729 
       
 17730   if (backgroundColor) {
       
 17731     const backgroundColorObject = getColorObjectByAttributeValues(colors, backgroundColor);
       
 17732     colorProps.style.backgroundColor = backgroundColorObject.color;
       
 17733   }
       
 17734 
       
 17735   if (gradient) {
       
 17736     colorProps.style.background = getGradientValueBySlug(gradients, gradient);
       
 17737   }
       
 17738 
       
 17739   if (textColor) {
       
 17740     const textColorObject = getColorObjectByAttributeValues(colors, textColor);
       
 17741     colorProps.style.color = textColorObject.color;
       
 17742   }
       
 17743 
       
 17744   return colorProps;
       
 17745 }
 14915 
 17746 
 14916 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/index.js
 17747 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/index.js
 14917 /**
 17748 /**
 14918  * Internal dependencies
 17749  * Internal dependencies
 14919  */
 17750  */
 14924 
 17755 
 14925 
 17756 
 14926 
 17757 
 14927 
 17758 
 14928 
 17759 
 14929 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
 17760 
 14930 var classCallCheck = __webpack_require__(20);
 17761 
 14931 
 17762 
 14932 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
 17763 
 14933 var createClass = __webpack_require__(19);
       
 14934 
       
 14935 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
       
 14936 var assertThisInitialized = __webpack_require__(12);
       
 14937 
       
 14938 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
       
 14939 var possibleConstructorReturn = __webpack_require__(23);
       
 14940 
       
 14941 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
       
 14942 var getPrototypeOf = __webpack_require__(16);
       
 14943 
       
 14944 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
       
 14945 var inherits = __webpack_require__(22);
       
 14946 
 17764 
 14947 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/with-colors.js
 17765 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/with-colors.js
 14948 
 17766 
 14949 
 17767 
 14950 
 17768 
 14951 
       
 14952 
       
 14953 
       
 14954 
       
 14955 
       
 14956 
       
 14957 
       
 14958 function _createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 14959 
       
 14960 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 14961 
       
 14962 function with_colors_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; }
       
 14963 
       
 14964 function with_colors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { with_colors_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 { with_colors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 14965 
       
 14966 /**
 17769 /**
 14967  * External dependencies
 17770  * External dependencies
 14968  */
 17771  */
 14969 
 17772 
 14970 /**
 17773 /**
 14971  * WordPress dependencies
 17774  * WordPress dependencies
 14972  */
 17775  */
 14973 
 17776 
 14974 
 17777 
 14975 
 17778 
 14976 
       
 14977 /**
 17779 /**
 14978  * Internal dependencies
 17780  * Internal dependencies
 14979  */
 17781  */
 14980 
 17782 
 14981 
 17783 
 14982 var DEFAULT_COLORS = [];
 17784 
       
 17785 const DEFAULT_COLORS = [];
 14983 /**
 17786 /**
 14984  * Higher order component factory for injecting the `colorsArray` argument as
 17787  * Higher order component factory for injecting the `colorsArray` argument as
 14985  * the colors prop in the `withCustomColors` HOC.
 17788  * the colors prop in the `withCustomColors` HOC.
 14986  *
 17789  *
 14987  * @param {Array} colorsArray An array of color objects.
 17790  * @param {Array} colorsArray An array of color objects.
 14988  *
 17791  *
 14989  * @return {Function} The higher order component.
 17792  * @return {Function} The higher order component.
 14990  */
 17793  */
 14991 
 17794 
 14992 var with_colors_withCustomColorPalette = function withCustomColorPalette(colorsArray) {
 17795 const withCustomColorPalette = colorsArray => Object(external_wp_compose_["createHigherOrderComponent"])(WrappedComponent => props => Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, {
 14993   return Object(external_this_wp_compose_["createHigherOrderComponent"])(function (WrappedComponent) {
 17796   colors: colorsArray
 14994     return function (props) {
 17797 })), 'withCustomColorPalette');
 14995       return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, {
       
 14996         colors: colorsArray
       
 14997       }));
       
 14998     };
       
 14999   }, 'withCustomColorPalette');
       
 15000 };
       
 15001 /**
 17798 /**
 15002  * Higher order component factory for injecting the editor colors as the
 17799  * Higher order component factory for injecting the editor colors as the
 15003  * `colors` prop in the `withColors` HOC.
 17800  * `colors` prop in the `withColors` HOC.
 15004  *
 17801  *
 15005  * @return {Function} The higher order component.
 17802  * @return {Function} The higher order component.
 15006  */
 17803  */
 15007 
 17804 
 15008 
 17805 
 15009 var with_colors_withEditorColorPalette = function withEditorColorPalette() {
 17806 const withEditorColorPalette = () => Object(external_wp_compose_["createHigherOrderComponent"])(WrappedComponent => props => {
 15010   return Object(external_this_wp_data_["withSelect"])(function (select) {
 17807   const colors = useSetting('color.palette') || DEFAULT_COLORS;
 15011     var settings = select('core/block-editor').getSettings();
 17808   return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, {
 15012     return {
 17809     colors: colors
 15013       colors: Object(external_this_lodash_["get"])(settings, ['colors'], DEFAULT_COLORS)
 17810   }));
 15014     };
 17811 }, 'withEditorColorPalette');
 15015   });
       
 15016 };
       
 15017 /**
 17812 /**
 15018  * Helper function used with `createHigherOrderComponent` to create
 17813  * Helper function used with `createHigherOrderComponent` to create
 15019  * higher order components for managing color logic.
 17814  * higher order components for managing color logic.
 15020  *
 17815  *
 15021  * @param {Array}    colorTypes       An array of color types (e.g. 'backgroundColor, borderColor).
 17816  * @param {Array}    colorTypes       An array of color types (e.g. 'backgroundColor, borderColor).
 15024  * @return {WPComponent} The component that can be used as a HOC.
 17819  * @return {WPComponent} The component that can be used as a HOC.
 15025  */
 17820  */
 15026 
 17821 
 15027 
 17822 
 15028 function createColorHOC(colorTypes, withColorPalette) {
 17823 function createColorHOC(colorTypes, withColorPalette) {
 15029   var colorMap = Object(external_this_lodash_["reduce"])(colorTypes, function (colorObject, colorType) {
 17824   const colorMap = Object(external_lodash_["reduce"])(colorTypes, (colorObject, colorType) => {
 15030     return with_colors_objectSpread({}, colorObject, {}, Object(external_this_lodash_["isString"])(colorType) ? Object(defineProperty["a" /* default */])({}, colorType, Object(external_this_lodash_["kebabCase"])(colorType)) : colorType);
 17825     return { ...colorObject,
       
 17826       ...(Object(external_lodash_["isString"])(colorType) ? {
       
 17827         [colorType]: Object(external_lodash_["kebabCase"])(colorType)
       
 17828       } : colorType)
       
 17829     };
 15031   }, {});
 17830   }, {});
 15032   return Object(external_this_wp_compose_["compose"])([withColorPalette, function (WrappedComponent) {
 17831   return Object(external_wp_compose_["compose"])([withColorPalette, WrappedComponent => {
 15033     return /*#__PURE__*/function (_Component) {
 17832     return class extends external_wp_element_["Component"] {
 15034       Object(inherits["a" /* default */])(_class, _Component);
 17833       constructor(props) {
 15035 
 17834         super(props);
 15036       var _super = _createSuper(_class);
 17835         this.setters = this.createSetters();
 15037 
 17836         this.colorUtils = {
 15038       function _class(props) {
 17837           getMostReadableColor: this.getMostReadableColor.bind(this)
 15039         var _this;
       
 15040 
       
 15041         Object(classCallCheck["a" /* default */])(this, _class);
       
 15042 
       
 15043         _this = _super.call(this, props);
       
 15044         _this.setters = _this.createSetters();
       
 15045         _this.colorUtils = {
       
 15046           getMostReadableColor: _this.getMostReadableColor.bind(Object(assertThisInitialized["a" /* default */])(_this))
       
 15047         };
 17838         };
 15048         _this.state = {};
 17839         this.state = {};
 15049         return _this;
       
 15050       }
 17840       }
 15051 
 17841 
 15052       Object(createClass["a" /* default */])(_class, [{
 17842       getMostReadableColor(colorValue) {
 15053         key: "getMostReadableColor",
 17843         const {
 15054         value: function getMostReadableColor(colorValue) {
 17844           colors
 15055           var colors = this.props.colors;
 17845         } = this.props;
 15056           return utils_getMostReadableColor(colors, colorValue);
 17846         return getMostReadableColor(colors, colorValue);
 15057         }
 17847       }
 15058       }, {
 17848 
 15059         key: "createSetters",
 17849       createSetters() {
 15060         value: function createSetters() {
 17850         return Object(external_lodash_["reduce"])(colorMap, (settersAccumulator, colorContext, colorAttributeName) => {
 15061           var _this2 = this;
 17851           const upperFirstColorAttributeName = Object(external_lodash_["upperFirst"])(colorAttributeName);
 15062 
 17852           const customColorAttributeName = `custom${upperFirstColorAttributeName}`;
 15063           return Object(external_this_lodash_["reduce"])(colorMap, function (settersAccumulator, colorContext, colorAttributeName) {
 17853           settersAccumulator[`set${upperFirstColorAttributeName}`] = this.createSetColor(colorAttributeName, customColorAttributeName);
 15064             var upperFirstColorAttributeName = Object(external_this_lodash_["upperFirst"])(colorAttributeName);
 17854           return settersAccumulator;
 15065             var customColorAttributeName = "custom".concat(upperFirstColorAttributeName);
 17855         }, {});
 15066             settersAccumulator["set".concat(upperFirstColorAttributeName)] = _this2.createSetColor(colorAttributeName, customColorAttributeName);
 17856       }
 15067             return settersAccumulator;
 17857 
 15068           }, {});
 17858       createSetColor(colorAttributeName, customColorAttributeName) {
 15069         }
 17859         return colorValue => {
 15070       }, {
 17860           const colorObject = getColorObjectByColorValue(this.props.colors, colorValue);
 15071         key: "createSetColor",
 17861           this.props.setAttributes({
 15072         value: function createSetColor(colorAttributeName, customColorAttributeName) {
 17862             [colorAttributeName]: colorObject && colorObject.slug ? colorObject.slug : undefined,
 15073           var _this3 = this;
 17863             [customColorAttributeName]: colorObject && colorObject.slug ? undefined : colorValue
 15074 
 17864           });
 15075           return function (colorValue) {
 17865         };
 15076             var _this3$props$setAttri;
 17866       }
 15077 
 17867 
 15078             var colorObject = utils_getColorObjectByColorValue(_this3.props.colors, colorValue);
 17868       static getDerivedStateFromProps({
 15079 
 17869         attributes,
 15080             _this3.props.setAttributes((_this3$props$setAttri = {}, Object(defineProperty["a" /* default */])(_this3$props$setAttri, colorAttributeName, colorObject && colorObject.slug ? colorObject.slug : undefined), Object(defineProperty["a" /* default */])(_this3$props$setAttri, customColorAttributeName, colorObject && colorObject.slug ? undefined : colorValue), _this3$props$setAttri));
 17870         colors
 15081           };
 17871       }, previousState) {
 15082         }
 17872         return Object(external_lodash_["reduce"])(colorMap, (newState, colorContext, colorAttributeName) => {
 15083       }, {
 17873           const colorObject = getColorObjectByAttributeValues(colors, attributes[colorAttributeName], attributes[`custom${Object(external_lodash_["upperFirst"])(colorAttributeName)}`]);
 15084         key: "render",
 17874           const previousColorObject = previousState[colorAttributeName];
 15085         value: function render() {
 17875           const previousColor = previousColorObject === null || previousColorObject === void 0 ? void 0 : previousColorObject.color;
 15086           return Object(external_this_wp_element_["createElement"])(WrappedComponent, with_colors_objectSpread({}, this.props, {
 17876           /**
 15087             colors: undefined
 17877            * The "and previousColorObject" condition checks that a previous color object was already computed.
 15088           }, this.state, {}, this.setters, {
 17878            * At the start previousColorObject and colorValue are both equal to undefined
 15089             colorUtils: this.colorUtils
 17879            * bus as previousColorObject does not exist we should compute the object.
 15090           }));
 17880            */
 15091         }
 17881 
 15092       }], [{
 17882           if (previousColor === colorObject.color && previousColorObject) {
 15093         key: "getDerivedStateFromProps",
 17883             newState[colorAttributeName] = previousColorObject;
 15094         value: function getDerivedStateFromProps(_ref2, previousState) {
 17884           } else {
 15095           var attributes = _ref2.attributes,
 17885             newState[colorAttributeName] = { ...colorObject,
 15096               colors = _ref2.colors;
 17886               class: getColorClassName(colorContext, colorObject.slug)
 15097           return Object(external_this_lodash_["reduce"])(colorMap, function (newState, colorContext, colorAttributeName) {
 17887             };
 15098             var colorObject = utils_getColorObjectByAttributeValues(colors, attributes[colorAttributeName], attributes["custom".concat(Object(external_this_lodash_["upperFirst"])(colorAttributeName))]);
 17888           }
 15099             var previousColorObject = previousState[colorAttributeName];
 17889 
 15100             var previousColor = Object(external_this_lodash_["get"])(previousColorObject, ['color']);
 17890           return newState;
 15101             /**
 17891         }, {});
 15102              * The "and previousColorObject" condition checks that a previous color object was already computed.
 17892       }
 15103              * At the start previousColorObject and colorValue are both equal to undefined
 17893 
 15104              * bus as previousColorObject does not exist we should compute the object.
 17894       render() {
 15105              */
 17895         return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props, {
 15106 
 17896           colors: undefined
 15107             if (previousColor === colorObject.color && previousColorObject) {
 17897         }, this.state, this.setters, {
 15108               newState[colorAttributeName] = previousColorObject;
 17898           colorUtils: this.colorUtils
 15109             } else {
 17899         }));
 15110               newState[colorAttributeName] = with_colors_objectSpread({}, colorObject, {
 17900       }
 15111                 class: getColorClassName(colorContext, colorObject.slug)
 17901 
 15112               });
 17902     };
 15113             }
       
 15114 
       
 15115             return newState;
       
 15116           }, {});
       
 15117         }
       
 15118       }]);
       
 15119 
       
 15120       return _class;
       
 15121     }(external_this_wp_element_["Component"]);
       
 15122   }]);
 17903   }]);
 15123 }
 17904 }
 15124 /**
 17905 /**
 15125  * A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic
 17906  * A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic
 15126  * for class generation color value, retrieval and color attribute setting.
 17907  * for class generation color value, retrieval and color attribute setting.
 15144  * @return {Function} Higher-order component.
 17925  * @return {Function} Higher-order component.
 15145  */
 17926  */
 15146 
 17927 
 15147 
 17928 
 15148 function createCustomColorsHOC(colorsArray) {
 17929 function createCustomColorsHOC(colorsArray) {
 15149   return function () {
 17930   return (...colorTypes) => {
 15150     var withColorPalette = with_colors_withCustomColorPalette(colorsArray);
 17931     const withColorPalette = withCustomColorPalette(colorsArray);
 15151 
 17932     return Object(external_wp_compose_["createHigherOrderComponent"])(createColorHOC(colorTypes, withColorPalette), 'withCustomColors');
 15152     for (var _len = arguments.length, colorTypes = new Array(_len), _key = 0; _key < _len; _key++) {
       
 15153       colorTypes[_key] = arguments[_key];
       
 15154     }
       
 15155 
       
 15156     return Object(external_this_wp_compose_["createHigherOrderComponent"])(createColorHOC(colorTypes, withColorPalette), 'withCustomColors');
       
 15157   };
 17933   };
 15158 }
 17934 }
 15159 /**
 17935 /**
 15160  * A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.
 17936  * A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.
 15161  *
 17937  *
 15179  *                                        and ending with the color context all in kebab case e.g: has-green-background-color.
 17955  *                                        and ending with the color context all in kebab case e.g: has-green-background-color.
 15180  *
 17956  *
 15181  * @return {Function} Higher-order component.
 17957  * @return {Function} Higher-order component.
 15182  */
 17958  */
 15183 
 17959 
 15184 function withColors() {
 17960 function withColors(...colorTypes) {
 15185   var withColorPalette = with_colors_withEditorColorPalette();
 17961   const withColorPalette = withEditorColorPalette();
 15186 
 17962   return Object(external_wp_compose_["createHigherOrderComponent"])(createColorHOC(colorTypes, withColorPalette), 'withColors');
 15187   for (var _len2 = arguments.length, colorTypes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
       
 15188     colorTypes[_key2] = arguments[_key2];
       
 15189   }
       
 15190 
       
 15191   return Object(external_this_wp_compose_["createHigherOrderComponent"])(createColorHOC(colorTypes, withColorPalette), 'withColors');
       
 15192 }
 17963 }
 15193 
 17964 
 15194 // EXTERNAL MODULE: ./node_modules/memize/index.js
 17965 // EXTERNAL MODULE: ./node_modules/memize/index.js
 15195 var memize = __webpack_require__(60);
 17966 var memize = __webpack_require__("4eJC");
 15196 var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
 17967 var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
 15197 
 17968 
 15198 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/panel-color-settings/index.js
 17969 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/panel-color-settings/index.js
 15199 
 17970 
 15200 
 17971 
 15201 
 17972 
 15202 
       
 15203 
       
 15204 function panel_color_settings_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; }
       
 15205 
       
 15206 function panel_color_settings_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { panel_color_settings_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 { panel_color_settings_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 15207 
       
 15208 /**
 17973 /**
 15209  * Internal dependencies
 17974  * Internal dependencies
 15210  */
 17975  */
 15211 
 17976 
 15212 
 17977 
 15213 var panel_color_settings_PanelColorSettings = function PanelColorSettings(_ref) {
 17978 const PanelColorSettings = ({
 15214   var colorSettings = _ref.colorSettings,
 17979   colorSettings,
 15215       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["colorSettings"]);
 17980   ...props
 15216 
 17981 }) => {
 15217   var settings = colorSettings.map(function (_ref2) {
 17982   const settings = colorSettings.map(({
 15218     var value = _ref2.value,
 17983     value,
 15219         onChange = _ref2.onChange,
 17984     onChange,
 15220         otherSettings = Object(objectWithoutProperties["a" /* default */])(_ref2, ["value", "onChange"]);
 17985     ...otherSettings
 15221 
 17986   }) => ({ ...otherSettings,
 15222     return panel_color_settings_objectSpread({}, otherSettings, {
 17987     colorValue: value,
 15223       colorValue: value,
 17988     onColorChange: onChange
 15224       onColorChange: onChange
 17989   }));
 15225     });
 17990   return Object(external_wp_element_["createElement"])(panel_color_gradient_settings, Object(esm_extends["a" /* default */])({
 15226   });
       
 15227   return Object(external_this_wp_element_["createElement"])(panel_color_gradient_settings, Object(esm_extends["a" /* default */])({
       
 15228     settings: settings,
 17991     settings: settings,
 15229     gradients: [],
 17992     gradients: [],
 15230     disableCustomGradients: true
 17993     disableCustomGradients: true
 15231   }, props));
 17994   }, props));
 15232 };
 17995 };
 15233 
 17996 
 15234 /* harmony default export */ var panel_color_settings = (panel_color_settings_PanelColorSettings);
 17997 /* harmony default export */ var panel_color_settings = (PanelColorSettings);
 15235 
 17998 
 15236 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/color-panel.js
 17999 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/color-panel.js
 15237 
 18000 
 15238 
 18001 
 15239 
 18002 
 15240 
       
 15241 /**
 18003 /**
 15242  * External dependencies
 18004  * External dependencies
 15243  */
 18005  */
 15244 
 18006 
 15245 /**
 18007 /**
 15247  */
 18009  */
 15248 
 18010 
 15249 
 18011 
 15250 
 18012 
 15251 
 18013 
 15252 var resolveContrastCheckerColor = function resolveContrastCheckerColor(color, colorSettings, detectedColor) {
 18014 const resolveContrastCheckerColor = (color, colorSettings, detectedColor) => {
 15253   if (typeof color === 'function') {
 18015   if (typeof color === 'function') {
 15254     return color(colorSettings);
 18016     return color(colorSettings);
 15255   } else if (color === true) {
 18017   } else if (color === true) {
 15256     return detectedColor;
 18018     return detectedColor;
 15257   }
 18019   }
 15258 
 18020 
 15259   return color;
 18021   return color;
 15260 };
 18022 };
 15261 
 18023 
 15262 function color_panel_ColorPanel(_ref) {
 18024 function color_panel_ColorPanel({
 15263   var title = _ref.title,
 18025   title,
 15264       colorSettings = _ref.colorSettings,
 18026   colorSettings,
 15265       colorPanelProps = _ref.colorPanelProps,
 18027   colorPanelProps,
 15266       contrastCheckers = _ref.contrastCheckers,
 18028   contrastCheckers,
 15267       detectedBackgroundColor = _ref.detectedBackgroundColor,
 18029   detectedBackgroundColor,
 15268       detectedColor = _ref.detectedColor,
 18030   detectedColor,
 15269       panelChildren = _ref.panelChildren,
 18031   panelChildren,
 15270       initialOpen = _ref.initialOpen;
 18032   initialOpen
 15271   return Object(external_this_wp_element_["createElement"])(panel_color_settings, Object(esm_extends["a" /* default */])({
 18033 }) {
       
 18034   return Object(external_wp_element_["createElement"])(panel_color_settings, Object(esm_extends["a" /* default */])({
 15272     title: title,
 18035     title: title,
 15273     initialOpen: initialOpen,
 18036     initialOpen: initialOpen,
 15274     colorSettings: Object.values(colorSettings)
 18037     colorSettings: Object.values(colorSettings)
 15275   }, colorPanelProps), contrastCheckers && (Array.isArray(contrastCheckers) ? contrastCheckers.map(function (_ref2) {
 18038   }, colorPanelProps), contrastCheckers && (Array.isArray(contrastCheckers) ? contrastCheckers.map(({
 15276     var backgroundColor = _ref2.backgroundColor,
 18039     backgroundColor,
 15277         textColor = _ref2.textColor,
 18040     textColor,
 15278         rest = Object(objectWithoutProperties["a" /* default */])(_ref2, ["backgroundColor", "textColor"]);
 18041     ...rest
 15279 
 18042   }) => {
 15280     backgroundColor = resolveContrastCheckerColor(backgroundColor, colorSettings, detectedBackgroundColor);
 18043     backgroundColor = resolveContrastCheckerColor(backgroundColor, colorSettings, detectedBackgroundColor);
 15281     textColor = resolveContrastCheckerColor(textColor, colorSettings, detectedColor);
 18044     textColor = resolveContrastCheckerColor(textColor, colorSettings, detectedColor);
 15282     return Object(external_this_wp_element_["createElement"])(contrast_checker, Object(esm_extends["a" /* default */])({
 18045     return Object(external_wp_element_["createElement"])(contrast_checker, Object(esm_extends["a" /* default */])({
 15283       key: "".concat(backgroundColor, "-").concat(textColor),
 18046       key: `${backgroundColor}-${textColor}`,
 15284       backgroundColor: backgroundColor,
 18047       backgroundColor: backgroundColor,
 15285       textColor: textColor
 18048       textColor: textColor
 15286     }, rest));
 18049     }, rest));
 15287   }) : Object(external_this_lodash_["map"])(colorSettings, function (_ref3) {
 18050   }) : Object(external_lodash_["map"])(colorSettings, ({
 15288     var value = _ref3.value;
 18051     value
 15289     var backgroundColor = contrastCheckers.backgroundColor,
 18052   }) => {
 15290         textColor = contrastCheckers.textColor;
 18053     let {
       
 18054       backgroundColor,
       
 18055       textColor
       
 18056     } = contrastCheckers;
 15291     backgroundColor = resolveContrastCheckerColor(backgroundColor || value, colorSettings, detectedBackgroundColor);
 18057     backgroundColor = resolveContrastCheckerColor(backgroundColor || value, colorSettings, detectedBackgroundColor);
 15292     textColor = resolveContrastCheckerColor(textColor || value, colorSettings, detectedColor);
 18058     textColor = resolveContrastCheckerColor(textColor || value, colorSettings, detectedColor);
 15293     return Object(external_this_wp_element_["createElement"])(contrast_checker, Object(esm_extends["a" /* default */])({}, contrastCheckers, {
 18059     return Object(external_wp_element_["createElement"])(contrast_checker, Object(esm_extends["a" /* default */])({}, contrastCheckers, {
 15294       key: "".concat(backgroundColor, "-").concat(textColor),
 18060       key: `${backgroundColor}-${textColor}`,
 15295       backgroundColor: backgroundColor,
 18061       backgroundColor: backgroundColor,
 15296       textColor: textColor
 18062       textColor: textColor
 15297     }));
 18063     }));
 15298   })), typeof panelChildren === 'function' ? panelChildren(colorSettings) : panelChildren);
 18064   })), typeof panelChildren === 'function' ? panelChildren(colorSettings) : panelChildren);
 15299 }
 18065 }
 15300 
 18066 
 15301 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/use-colors.js
 18067 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/use-colors.js
 15302 
 18068 
 15303 
 18069 
 15304 
       
 15305 
       
 15306 
       
 15307 function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { 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 it, 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; } } }; }
       
 15308 
       
 15309 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(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
       
 15310 
       
 15311 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; }
       
 15312 
       
 15313 function use_colors_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; }
       
 15314 
       
 15315 function use_colors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { use_colors_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 { use_colors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 15316 
       
 15317 /**
 18070 /**
 15318  * External dependencies
 18071  * External dependencies
 15319  */
 18072  */
 15320 
 18073 
 15321 
 18074 
 15332  */
 18085  */
 15333 
 18086 
 15334 
 18087 
 15335 
 18088 
 15336 
 18089 
 15337 /**
 18090 
 15338  * Browser dependencies
 18091 
 15339  */
 18092 
 15340 
 18093 function use_colors_getComputedStyle(node) {
 15341 var use_colors_window = window,
 18094   return node.ownerDocument.defaultView.getComputedStyle(node);
 15342     use_colors_getComputedStyle = use_colors_window.getComputedStyle,
 18095 }
 15343     use_colors_Node = use_colors_window.Node;
 18096 
 15344 var use_colors_DEFAULT_COLORS = [];
 18097 const use_colors_DEFAULT_COLORS = [];
 15345 var COMMON_COLOR_LABELS = {
 18098 const COMMON_COLOR_LABELS = {
 15346   textColor: Object(external_this_wp_i18n_["__"])('Text Color'),
 18099   textColor: Object(external_wp_i18n_["__"])('Text color'),
 15347   backgroundColor: Object(external_this_wp_i18n_["__"])('Background Color')
 18100   backgroundColor: Object(external_wp_i18n_["__"])('Background color')
 15348 };
 18101 };
 15349 
 18102 
 15350 var use_colors_InspectorControlsColorPanel = function InspectorControlsColorPanel(props) {
 18103 const InspectorControlsColorPanel = props => Object(external_wp_element_["createElement"])(inspector_controls, null, Object(external_wp_element_["createElement"])(color_panel_ColorPanel, props));
 15351   return Object(external_this_wp_element_["createElement"])(inspector_controls, null, Object(external_this_wp_element_["createElement"])(color_panel_ColorPanel, props));
 18104 
 15352 };
 18105 function __experimentalUseColors(colorConfigs, {
 15353 
 18106   panelTitle = Object(external_wp_i18n_["__"])('Color'),
 15354 function __experimentalUseColors(colorConfigs) {
 18107   colorPanelProps,
 15355   var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
 18108   contrastCheckers,
 15356     panelTitle: Object(external_this_wp_i18n_["__"])('Color settings')
 18109   panelChildren,
 15357   },
 18110   colorDetector: {
 15358       _ref$panelTitle = _ref.panelTitle,
 18111     targetRef,
 15359       panelTitle = _ref$panelTitle === void 0 ? Object(external_this_wp_i18n_["__"])('Color settings') : _ref$panelTitle,
 18112     backgroundColorTargetRef = targetRef,
 15360       colorPanelProps = _ref.colorPanelProps,
 18113     textColorTargetRef = targetRef
 15361       contrastCheckers = _ref.contrastCheckers,
 18114   } = {}
 15362       panelChildren = _ref.panelChildren,
 18115 } = {
 15363       _ref$colorDetector = _ref.colorDetector;
 18116   panelTitle: Object(external_wp_i18n_["__"])('Color')
 15364 
 18117 }, deps = []) {
 15365   _ref$colorDetector = _ref$colorDetector === void 0 ? {} : _ref$colorDetector;
 18118   const {
 15366   var targetRef = _ref$colorDetector.targetRef,
 18119     clientId
 15367       _ref$colorDetector$ba = _ref$colorDetector.backgroundColorTargetRef,
 18120   } = useBlockEditContext();
 15368       backgroundColorTargetRef = _ref$colorDetector$ba === void 0 ? targetRef : _ref$colorDetector$ba,
 18121   const settingsColors = useSetting('color.palette') || use_colors_DEFAULT_COLORS;
 15369       _ref$colorDetector$te = _ref$colorDetector.textColorTargetRef,
 18122   const {
 15370       textColorTargetRef = _ref$colorDetector$te === void 0 ? targetRef : _ref$colorDetector$te;
 18123     attributes
 15371   var deps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
 18124   } = Object(external_wp_data_["useSelect"])(select => {
 15372 
 18125     const {
 15373   var _useBlockEditContext = useBlockEditContext(),
 18126       getBlockAttributes
 15374       clientId = _useBlockEditContext.clientId;
 18127     } = select(store);
 15375 
       
 15376   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 15377     var _select = select('core/block-editor'),
       
 15378         getBlockAttributes = _select.getBlockAttributes,
       
 15379         getSettings = _select.getSettings;
       
 15380 
       
 15381     var colors = getSettings().colors;
       
 15382     return {
 18128     return {
 15383       attributes: getBlockAttributes(clientId),
 18129       attributes: getBlockAttributes(clientId)
 15384       settingsColors: !colors || colors === true ? use_colors_DEFAULT_COLORS : colors
       
 15385     };
 18130     };
 15386   }, [clientId]),
 18131   }, [clientId]);
 15387       attributes = _useSelect.attributes,
 18132   const {
 15388       settingsColors = _useSelect.settingsColors;
 18133     updateBlockAttributes
 15389 
 18134   } = Object(external_wp_data_["useDispatch"])(store);
 15390   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 18135   const setAttributes = Object(external_wp_element_["useCallback"])(newAttributes => updateBlockAttributes(clientId, newAttributes), [updateBlockAttributes, clientId]);
 15391       updateBlockAttributes = _useDispatch.updateBlockAttributes;
 18136   const createComponent = Object(external_wp_element_["useMemo"])(() => memize_default()((name, property, className, color, colorValue, customColor) => ({
 15392 
 18137     children,
 15393   var setAttributes = Object(external_this_wp_element_["useCallback"])(function (newAttributes) {
 18138     className: componentClassName = '',
 15394     return updateBlockAttributes(clientId, newAttributes);
 18139     style: componentStyle = {}
 15395   }, [updateBlockAttributes, clientId]);
 18140   }) => {
 15396   var createComponent = Object(external_this_wp_element_["useMemo"])(function () {
 18141     let colorStyle = {};
 15397     return memize_default()(function (name, property, className, color, colorValue, customColor) {
 18142 
 15398       return function (_ref2) {
 18143     if (color) {
 15399         var _classnames;
 18144       colorStyle = {
 15400 
 18145         [property]: colorValue
 15401         var children = _ref2.children,
       
 15402             _ref2$className = _ref2.className,
       
 15403             componentClassName = _ref2$className === void 0 ? '' : _ref2$className,
       
 15404             _ref2$style = _ref2.style,
       
 15405             componentStyle = _ref2$style === void 0 ? {} : _ref2$style;
       
 15406         var colorStyle = {};
       
 15407 
       
 15408         if (color) {
       
 15409           colorStyle = Object(defineProperty["a" /* default */])({}, property, colorValue);
       
 15410         } else if (customColor) {
       
 15411           colorStyle = Object(defineProperty["a" /* default */])({}, property, customColor);
       
 15412         }
       
 15413 
       
 15414         var extraProps = {
       
 15415           className: classnames_default()(componentClassName, (_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "has-".concat(Object(external_this_lodash_["kebabCase"])(color), "-").concat(Object(external_this_lodash_["kebabCase"])(property)), color), Object(defineProperty["a" /* default */])(_classnames, className || "has-".concat(Object(external_this_lodash_["kebabCase"])(name)), color || customColor), _classnames)),
       
 15416           style: use_colors_objectSpread({}, colorStyle, {}, componentStyle)
       
 15417         };
       
 15418 
       
 15419         if (Object(external_this_lodash_["isFunction"])(children)) {
       
 15420           return children(extraProps);
       
 15421         }
       
 15422 
       
 15423         return (// Clone children, setting the style property from the color configuration,
       
 15424           // if not already set explicitly through props.
       
 15425           external_this_wp_element_["Children"].map(children, function (child) {
       
 15426             return Object(external_this_wp_element_["cloneElement"])(child, {
       
 15427               className: classnames_default()(child.props.className, extraProps.className),
       
 15428               style: use_colors_objectSpread({}, extraProps.style, {}, child.props.style || {})
       
 15429             });
       
 15430           })
       
 15431         );
       
 15432       };
 18146       };
 15433     }, {
 18147     } else if (customColor) {
 15434       maxSize: colorConfigs.length
 18148       colorStyle = {
       
 18149         [property]: customColor
       
 18150       };
       
 18151     }
       
 18152 
       
 18153     const extraProps = {
       
 18154       className: classnames_default()(componentClassName, {
       
 18155         [`has-${Object(external_lodash_["kebabCase"])(color)}-${Object(external_lodash_["kebabCase"])(property)}`]: color,
       
 18156         [className || `has-${Object(external_lodash_["kebabCase"])(name)}`]: color || customColor
       
 18157       }),
       
 18158       style: { ...colorStyle,
       
 18159         ...componentStyle
       
 18160       }
       
 18161     };
       
 18162 
       
 18163     if (Object(external_lodash_["isFunction"])(children)) {
       
 18164       return children(extraProps);
       
 18165     }
       
 18166 
       
 18167     return (// Clone children, setting the style property from the color configuration,
       
 18168       // if not already set explicitly through props.
       
 18169       external_wp_element_["Children"].map(children, child => {
       
 18170         return Object(external_wp_element_["cloneElement"])(child, {
       
 18171           className: classnames_default()(child.props.className, extraProps.className),
       
 18172           style: { ...extraProps.style,
       
 18173             ...(child.props.style || {})
       
 18174           }
       
 18175         });
       
 18176       })
       
 18177     );
       
 18178   }, {
       
 18179     maxSize: colorConfigs.length
       
 18180   }), [colorConfigs.length]);
       
 18181   const createSetColor = Object(external_wp_element_["useMemo"])(() => memize_default()((name, colors) => newColor => {
       
 18182     const color = colors.find(_color => _color.color === newColor);
       
 18183     setAttributes({
       
 18184       [color ? Object(external_lodash_["camelCase"])(`custom ${name}`) : name]: undefined
 15435     });
 18185     });
 15436   }, [colorConfigs.length]);
 18186     setAttributes({
 15437   var createSetColor = Object(external_this_wp_element_["useMemo"])(function () {
 18187       [color ? name : Object(external_lodash_["camelCase"])(`custom ${name}`)]: color ? color.slug : newColor
 15438     return memize_default()(function (name, colors) {
       
 15439       return function (newColor) {
       
 15440         var color = colors.find(function (_color) {
       
 15441           return _color.color === newColor;
       
 15442         });
       
 15443         setAttributes(Object(defineProperty["a" /* default */])({}, color ? Object(external_this_lodash_["camelCase"])("custom ".concat(name)) : name, undefined));
       
 15444         setAttributes(Object(defineProperty["a" /* default */])({}, color ? name : Object(external_this_lodash_["camelCase"])("custom ".concat(name)), color ? color.slug : newColor));
       
 15445       };
       
 15446     }, {
       
 15447       maxSize: colorConfigs.length
       
 15448     });
 18188     });
 15449   }, [setAttributes, colorConfigs.length]);
 18189   }, {
 15450 
 18190     maxSize: colorConfigs.length
 15451   var _useState = Object(external_this_wp_element_["useState"])(),
 18191   }), [setAttributes, colorConfigs.length]);
 15452       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 18192   const [detectedBackgroundColor, setDetectedBackgroundColor] = Object(external_wp_element_["useState"])();
 15453       detectedBackgroundColor = _useState2[0],
 18193   const [detectedColor, setDetectedColor] = Object(external_wp_element_["useState"])();
 15454       setDetectedBackgroundColor = _useState2[1];
 18194   Object(external_wp_element_["useEffect"])(() => {
 15455 
       
 15456   var _useState3 = Object(external_this_wp_element_["useState"])(),
       
 15457       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
       
 15458       detectedColor = _useState4[0],
       
 15459       setDetectedColor = _useState4[1];
       
 15460 
       
 15461   Object(external_this_wp_element_["useEffect"])(function () {
       
 15462     if (!contrastCheckers) {
 18195     if (!contrastCheckers) {
 15463       return undefined;
 18196       return undefined;
 15464     }
 18197     }
 15465 
 18198 
 15466     var needsBackgroundColor = false;
 18199     let needsBackgroundColor = false;
 15467     var needsColor = false;
 18200     let needsColor = false;
 15468 
 18201 
 15469     var _iterator = _createForOfIteratorHelper(Object(external_this_lodash_["castArray"])(contrastCheckers)),
 18202     for (const {
 15470         _step;
 18203       backgroundColor,
 15471 
 18204       textColor
 15472     try {
 18205     } of Object(external_lodash_["castArray"])(contrastCheckers)) {
 15473       for (_iterator.s(); !(_step = _iterator.n()).done;) {
 18206       if (!needsBackgroundColor) {
 15474         var _step$value = _step.value,
 18207         needsBackgroundColor = backgroundColor === true;
 15475             _backgroundColor = _step$value.backgroundColor,
       
 15476             textColor = _step$value.textColor;
       
 15477 
       
 15478         if (!needsBackgroundColor) {
       
 15479           needsBackgroundColor = _backgroundColor === true;
       
 15480         }
       
 15481 
       
 15482         if (!needsColor) {
       
 15483           needsColor = textColor === true;
       
 15484         }
       
 15485 
       
 15486         if (needsBackgroundColor && needsColor) {
       
 15487           break;
       
 15488         }
       
 15489       }
 18208       }
 15490     } catch (err) {
 18209 
 15491       _iterator.e(err);
 18210       if (!needsColor) {
 15492     } finally {
 18211         needsColor = textColor === true;
 15493       _iterator.f();
 18212       }
       
 18213 
       
 18214       if (needsBackgroundColor && needsColor) {
       
 18215         break;
       
 18216       }
 15494     }
 18217     }
 15495 
 18218 
 15496     if (needsColor) {
 18219     if (needsColor) {
 15497       setDetectedColor(use_colors_getComputedStyle(textColorTargetRef.current).color);
 18220       setDetectedColor(use_colors_getComputedStyle(textColorTargetRef.current).color);
 15498     }
 18221     }
 15499 
 18222 
 15500     if (needsBackgroundColor) {
 18223     if (needsBackgroundColor) {
 15501       var backgroundColorNode = backgroundColorTargetRef.current;
 18224       let backgroundColorNode = backgroundColorTargetRef.current;
 15502       var backgroundColor = use_colors_getComputedStyle(backgroundColorNode).backgroundColor;
 18225       let backgroundColor = use_colors_getComputedStyle(backgroundColorNode).backgroundColor;
 15503 
 18226 
 15504       while (backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === use_colors_Node.ELEMENT_NODE) {
 18227       while (backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === backgroundColorNode.parentNode.ELEMENT_NODE) {
 15505         backgroundColorNode = backgroundColorNode.parentNode;
 18228         backgroundColorNode = backgroundColorNode.parentNode;
 15506         backgroundColor = use_colors_getComputedStyle(backgroundColorNode).backgroundColor;
 18229         backgroundColor = use_colors_getComputedStyle(backgroundColorNode).backgroundColor;
 15507       }
 18230       }
 15508 
 18231 
 15509       setDetectedBackgroundColor(backgroundColor);
 18232       setDetectedBackgroundColor(backgroundColor);
 15510     }
 18233     }
 15511   }, [colorConfigs.reduce(function (acc, colorConfig) {
 18234   }, [colorConfigs.reduce((acc, colorConfig) => `${acc} | ${attributes[colorConfig.name]} | ${attributes[Object(external_lodash_["camelCase"])(`custom ${colorConfig.name}`)]}`, ''), ...deps]);
 15512     return "".concat(acc, " | ").concat(attributes[colorConfig.name], " | ").concat(attributes[Object(external_this_lodash_["camelCase"])("custom ".concat(colorConfig.name))]);
 18235   return Object(external_wp_element_["useMemo"])(() => {
 15513   }, '')].concat(Object(toConsumableArray["a" /* default */])(deps)));
 18236     const colorSettings = {};
 15514   return Object(external_this_wp_element_["useMemo"])(function () {
 18237     const components = colorConfigs.reduce((acc, colorConfig) => {
 15515     var colorSettings = {};
       
 15516     var components = colorConfigs.reduce(function (acc, colorConfig) {
       
 15517       if (typeof colorConfig === 'string') {
 18238       if (typeof colorConfig === 'string') {
 15518         colorConfig = {
 18239         colorConfig = {
 15519           name: colorConfig
 18240           name: colorConfig
 15520         };
 18241         };
 15521       }
 18242       }
 15522 
 18243 
 15523       var _colorConfig$color = use_colors_objectSpread({}, colorConfig, {
 18244       const {
       
 18245         name,
       
 18246         // E.g. 'backgroundColor'.
       
 18247         property = name,
       
 18248         // E.g. 'backgroundColor'.
       
 18249         className,
       
 18250         panelLabel = colorConfig.label || COMMON_COLOR_LABELS[name] || Object(external_lodash_["startCase"])(name),
       
 18251         // E.g. 'Background color'.
       
 18252         componentName = Object(external_lodash_["startCase"])(name).replace(/\s/g, ''),
       
 18253         // E.g. 'BackgroundColor'.
       
 18254         color = colorConfig.color,
       
 18255         colors = settingsColors
       
 18256       } = { ...colorConfig,
 15524         color: attributes[colorConfig.name]
 18257         color: attributes[colorConfig.name]
 15525       }),
 18258       };
 15526           name = _colorConfig$color.name,
 18259       const customColor = attributes[Object(external_lodash_["camelCase"])(`custom ${name}`)]; // We memoize the non-primitives to avoid unnecessary updates
 15527           _colorConfig$color$pr = _colorConfig$color.property,
       
 15528           property = _colorConfig$color$pr === void 0 ? name : _colorConfig$color$pr,
       
 15529           className = _colorConfig$color.className,
       
 15530           _colorConfig$color$pa = _colorConfig$color.panelLabel,
       
 15531           panelLabel = _colorConfig$color$pa === void 0 ? colorConfig.label || COMMON_COLOR_LABELS[name] || Object(external_this_lodash_["startCase"])(name) : _colorConfig$color$pa,
       
 15532           _colorConfig$color$co = _colorConfig$color.componentName,
       
 15533           componentName = _colorConfig$color$co === void 0 ? Object(external_this_lodash_["startCase"])(name).replace(/\s/g, '') : _colorConfig$color$co,
       
 15534           _colorConfig$color$co2 = _colorConfig$color.color,
       
 15535           color = _colorConfig$color$co2 === void 0 ? colorConfig.color : _colorConfig$color$co2,
       
 15536           _colorConfig$color$co3 = _colorConfig$color.colors,
       
 15537           colors = _colorConfig$color$co3 === void 0 ? settingsColors : _colorConfig$color$co3;
       
 15538 
       
 15539       var customColor = attributes[Object(external_this_lodash_["camelCase"])("custom ".concat(name))]; // We memoize the non-primitives to avoid unnecessary updates
       
 15540       // when they are used as props for other components.
 18260       // when they are used as props for other components.
 15541 
 18261 
 15542       var _color = customColor ? undefined : colors.find(function (__color) {
 18262       const _color = customColor ? undefined : colors.find(__color => __color.slug === color);
 15543         return __color.slug === color;
       
 15544       });
       
 15545 
 18263 
 15546       acc[componentName] = createComponent(name, property, className, color, _color && _color.color, customColor);
 18264       acc[componentName] = createComponent(name, property, className, color, _color && _color.color, customColor);
 15547       acc[componentName].displayName = componentName;
 18265       acc[componentName].displayName = componentName;
 15548       acc[componentName].color = customColor ? customColor : _color && _color.color;
 18266       acc[componentName].color = customColor ? customColor : _color && _color.color;
 15549       acc[componentName].slug = color;
 18267       acc[componentName].slug = color;
 15550       acc[componentName].setColor = createSetColor(name, colors);
 18268       acc[componentName].setColor = createSetColor(name, colors);
 15551       colorSettings[componentName] = {
 18269       colorSettings[componentName] = {
 15552         value: _color ? _color.color : attributes[Object(external_this_lodash_["camelCase"])("custom ".concat(name))],
 18270         value: _color ? _color.color : attributes[Object(external_lodash_["camelCase"])(`custom ${name}`)],
 15553         onChange: acc[componentName].setColor,
 18271         onChange: acc[componentName].setColor,
 15554         label: panelLabel,
 18272         label: panelLabel,
 15555         colors: colors
 18273         colors
 15556       }; // These settings will be spread over the `colors` in
 18274       }; // These settings will be spread over the `colors` in
 15557       // `colorPanelProps`, so we need to unset the key here,
 18275       // `colorPanelProps`, so we need to unset the key here,
 15558       // if not set to an actual value, to avoid overwriting
 18276       // if not set to an actual value, to avoid overwriting
 15559       // an actual value in `colorPanelProps`.
 18277       // an actual value in `colorPanelProps`.
 15560 
 18278 
 15562         delete colorSettings[componentName].colors;
 18280         delete colorSettings[componentName].colors;
 15563       }
 18281       }
 15564 
 18282 
 15565       return acc;
 18283       return acc;
 15566     }, {});
 18284     }, {});
 15567     var wrappedColorPanelProps = {
 18285     const wrappedColorPanelProps = {
 15568       title: panelTitle,
 18286       title: panelTitle,
 15569       initialOpen: false,
 18287       initialOpen: false,
 15570       colorSettings: colorSettings,
 18288       colorSettings,
 15571       colorPanelProps: colorPanelProps,
 18289       colorPanelProps,
 15572       contrastCheckers: contrastCheckers,
 18290       contrastCheckers,
 15573       detectedBackgroundColor: detectedBackgroundColor,
 18291       detectedBackgroundColor,
 15574       detectedColor: detectedColor,
 18292       detectedColor,
 15575       panelChildren: panelChildren
 18293       panelChildren
 15576     };
 18294     };
 15577     return use_colors_objectSpread({}, components, {
 18295     return { ...components,
 15578       ColorPanel: Object(external_this_wp_element_["createElement"])(color_panel_ColorPanel, wrappedColorPanelProps),
 18296       ColorPanel: Object(external_wp_element_["createElement"])(color_panel_ColorPanel, wrappedColorPanelProps),
 15579       InspectorControlsColorPanel: Object(external_this_wp_element_["createElement"])(use_colors_InspectorControlsColorPanel, wrappedColorPanelProps)
 18297       InspectorControlsColorPanel: Object(external_wp_element_["createElement"])(InspectorControlsColorPanel, wrappedColorPanelProps)
 15580     });
 18298     };
 15581   }, [attributes, setAttributes, detectedColor, detectedBackgroundColor].concat(Object(toConsumableArray["a" /* default */])(deps)));
 18299   }, [attributes, setAttributes, detectedColor, detectedBackgroundColor, ...deps]);
 15582 }
 18300 }
 15583 
 18301 
 15584 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/index.js
 18302 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/index.js
 15585 
 18303 
 15586 
 18304 
 15591 
 18309 
 15592 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/with-font-sizes.js
 18310 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/with-font-sizes.js
 15593 
 18311 
 15594 
 18312 
 15595 
 18313 
 15596 
       
 15597 
       
 15598 
       
 15599 
       
 15600 
       
 15601 function with_font_sizes_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; }
       
 15602 
       
 15603 function with_font_sizes_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { with_font_sizes_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 { with_font_sizes_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 15604 
       
 15605 function with_font_sizes_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (with_font_sizes_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 15606 
       
 15607 function with_font_sizes_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 15608 
       
 15609 /**
 18314 /**
 15610  * External dependencies
 18315  * External dependencies
 15611  */
 18316  */
 15612 
 18317 
 15613 /**
 18318 /**
 15614  * WordPress dependencies
 18319  * WordPress dependencies
 15615  */
 18320  */
 15616 
 18321 
 15617 
 18322 
 15618 
 18323 
 15619 
       
 15620 /**
 18324 /**
 15621  * Internal dependencies
 18325  * Internal dependencies
 15622  */
 18326  */
 15623 
 18327 
 15624 
 18328 
       
 18329 
       
 18330 const DEFAULT_FONT_SIZES = [];
 15625 /**
 18331 /**
 15626  * Higher-order component, which handles font size logic for class generation,
 18332  * Higher-order component, which handles font size logic for class generation,
 15627  * font size value retrieval, and font size change handling.
 18333  * font size value retrieval, and font size change handling.
 15628  *
 18334  *
 15629  * @param {...(Object|string)} fontSizeNames The arguments should all be strings.
 18335  * @param {...(Object|string)} fontSizeNames The arguments should all be strings.
 15631  *                                           attribute name e.g: 'fontSize'.
 18337  *                                           attribute name e.g: 'fontSize'.
 15632  *
 18338  *
 15633  * @return {Function} Higher-order component.
 18339  * @return {Function} Higher-order component.
 15634  */
 18340  */
 15635 
 18341 
 15636 /* harmony default export */ var with_font_sizes = (function () {
 18342 /* harmony default export */ var with_font_sizes = ((...fontSizeNames) => {
 15637   for (var _len = arguments.length, fontSizeNames = new Array(_len), _key = 0; _key < _len; _key++) {
       
 15638     fontSizeNames[_key] = arguments[_key];
       
 15639   }
       
 15640 
       
 15641   /*
 18343   /*
 15642    * Computes an object whose key is the font size attribute name as passed in the array,
 18344    * Computes an object whose key is the font size attribute name as passed in the array,
 15643    * and the value is the custom font size attribute name.
 18345    * and the value is the custom font size attribute name.
 15644    * Custom font size is automatically compted by appending custom followed by the font size attribute name in with the first letter capitalized.
 18346    * Custom font size is automatically compted by appending custom followed by the font size attribute name in with the first letter capitalized.
 15645    */
 18347    */
 15646   var fontSizeAttributeNames = Object(external_this_lodash_["reduce"])(fontSizeNames, function (fontSizeAttributeNamesAccumulator, fontSizeAttributeName) {
 18348   const fontSizeAttributeNames = Object(external_lodash_["reduce"])(fontSizeNames, (fontSizeAttributeNamesAccumulator, fontSizeAttributeName) => {
 15647     fontSizeAttributeNamesAccumulator[fontSizeAttributeName] = "custom".concat(Object(external_this_lodash_["upperFirst"])(fontSizeAttributeName));
 18349     fontSizeAttributeNamesAccumulator[fontSizeAttributeName] = `custom${Object(external_lodash_["upperFirst"])(fontSizeAttributeName)}`;
 15648     return fontSizeAttributeNamesAccumulator;
 18350     return fontSizeAttributeNamesAccumulator;
 15649   }, {});
 18351   }, {});
 15650   return Object(external_this_wp_compose_["createHigherOrderComponent"])(Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
 18352   return Object(external_wp_compose_["createHigherOrderComponent"])(Object(external_wp_compose_["compose"])([Object(external_wp_compose_["createHigherOrderComponent"])(WrappedComponent => props => {
 15651     var _select$getSettings = select('core/block-editor').getSettings(),
 18353     const fontSizes = useSetting('typography.fontSizes') || DEFAULT_FONT_SIZES;
 15652         fontSizes = _select$getSettings.fontSizes;
 18354     return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, {
 15653 
       
 15654     return {
       
 15655       fontSizes: fontSizes
 18355       fontSizes: fontSizes
       
 18356     }));
       
 18357   }, 'withFontSizes'), WrappedComponent => {
       
 18358     return class extends external_wp_element_["Component"] {
       
 18359       constructor(props) {
       
 18360         super(props);
       
 18361         this.setters = this.createSetters();
       
 18362         this.state = {};
       
 18363       }
       
 18364 
       
 18365       createSetters() {
       
 18366         return Object(external_lodash_["reduce"])(fontSizeAttributeNames, (settersAccumulator, customFontSizeAttributeName, fontSizeAttributeName) => {
       
 18367           const upperFirstFontSizeAttributeName = Object(external_lodash_["upperFirst"])(fontSizeAttributeName);
       
 18368           settersAccumulator[`set${upperFirstFontSizeAttributeName}`] = this.createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName);
       
 18369           return settersAccumulator;
       
 18370         }, {});
       
 18371       }
       
 18372 
       
 18373       createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName) {
       
 18374         return fontSizeValue => {
       
 18375           const fontSizeObject = Object(external_lodash_["find"])(this.props.fontSizes, {
       
 18376             size: Number(fontSizeValue)
       
 18377           });
       
 18378           this.props.setAttributes({
       
 18379             [fontSizeAttributeName]: fontSizeObject && fontSizeObject.slug ? fontSizeObject.slug : undefined,
       
 18380             [customFontSizeAttributeName]: fontSizeObject && fontSizeObject.slug ? undefined : fontSizeValue
       
 18381           });
       
 18382         };
       
 18383       }
       
 18384 
       
 18385       static getDerivedStateFromProps({
       
 18386         attributes,
       
 18387         fontSizes
       
 18388       }, previousState) {
       
 18389         const didAttributesChange = (customFontSizeAttributeName, fontSizeAttributeName) => {
       
 18390           if (previousState[fontSizeAttributeName]) {
       
 18391             // if new font size is name compare with the previous slug
       
 18392             if (attributes[fontSizeAttributeName]) {
       
 18393               return attributes[fontSizeAttributeName] !== previousState[fontSizeAttributeName].slug;
       
 18394             } // if font size is not named, update when the font size value changes.
       
 18395 
       
 18396 
       
 18397             return previousState[fontSizeAttributeName].size !== attributes[customFontSizeAttributeName];
       
 18398           } // in this case we need to build the font size object
       
 18399 
       
 18400 
       
 18401           return true;
       
 18402         };
       
 18403 
       
 18404         if (!Object(external_lodash_["some"])(fontSizeAttributeNames, didAttributesChange)) {
       
 18405           return null;
       
 18406         }
       
 18407 
       
 18408         const newState = Object(external_lodash_["reduce"])(Object(external_lodash_["pickBy"])(fontSizeAttributeNames, didAttributesChange), (newStateAccumulator, customFontSizeAttributeName, fontSizeAttributeName) => {
       
 18409           const fontSizeAttributeValue = attributes[fontSizeAttributeName];
       
 18410           const fontSizeObject = getFontSize(fontSizes, fontSizeAttributeValue, attributes[customFontSizeAttributeName]);
       
 18411           newStateAccumulator[fontSizeAttributeName] = { ...fontSizeObject,
       
 18412             class: getFontSizeClass(fontSizeAttributeValue)
       
 18413           };
       
 18414           return newStateAccumulator;
       
 18415         }, {});
       
 18416         return { ...previousState,
       
 18417           ...newState
       
 18418         };
       
 18419       }
       
 18420 
       
 18421       render() {
       
 18422         return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props, {
       
 18423           fontSizes: undefined
       
 18424         }, this.state, this.setters));
       
 18425       }
       
 18426 
 15656     };
 18427     };
 15657   }), function (WrappedComponent) {
       
 15658     return /*#__PURE__*/function (_Component) {
       
 15659       Object(inherits["a" /* default */])(_class, _Component);
       
 15660 
       
 15661       var _super = with_font_sizes_createSuper(_class);
       
 15662 
       
 15663       function _class(props) {
       
 15664         var _this;
       
 15665 
       
 15666         Object(classCallCheck["a" /* default */])(this, _class);
       
 15667 
       
 15668         _this = _super.call(this, props);
       
 15669         _this.setters = _this.createSetters();
       
 15670         _this.state = {};
       
 15671         return _this;
       
 15672       }
       
 15673 
       
 15674       Object(createClass["a" /* default */])(_class, [{
       
 15675         key: "createSetters",
       
 15676         value: function createSetters() {
       
 15677           var _this2 = this;
       
 15678 
       
 15679           return Object(external_this_lodash_["reduce"])(fontSizeAttributeNames, function (settersAccumulator, customFontSizeAttributeName, fontSizeAttributeName) {
       
 15680             var upperFirstFontSizeAttributeName = Object(external_this_lodash_["upperFirst"])(fontSizeAttributeName);
       
 15681             settersAccumulator["set".concat(upperFirstFontSizeAttributeName)] = _this2.createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName);
       
 15682             return settersAccumulator;
       
 15683           }, {});
       
 15684         }
       
 15685       }, {
       
 15686         key: "createSetFontSize",
       
 15687         value: function createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName) {
       
 15688           var _this3 = this;
       
 15689 
       
 15690           return function (fontSizeValue) {
       
 15691             var _this3$props$setAttri;
       
 15692 
       
 15693             var fontSizeObject = Object(external_this_lodash_["find"])(_this3.props.fontSizes, {
       
 15694               size: Number(fontSizeValue)
       
 15695             });
       
 15696 
       
 15697             _this3.props.setAttributes((_this3$props$setAttri = {}, Object(defineProperty["a" /* default */])(_this3$props$setAttri, fontSizeAttributeName, fontSizeObject && fontSizeObject.slug ? fontSizeObject.slug : undefined), Object(defineProperty["a" /* default */])(_this3$props$setAttri, customFontSizeAttributeName, fontSizeObject && fontSizeObject.slug ? undefined : fontSizeValue), _this3$props$setAttri));
       
 15698           };
       
 15699         }
       
 15700       }, {
       
 15701         key: "render",
       
 15702         value: function render() {
       
 15703           return Object(external_this_wp_element_["createElement"])(WrappedComponent, with_font_sizes_objectSpread({}, this.props, {
       
 15704             fontSizes: undefined
       
 15705           }, this.state, {}, this.setters));
       
 15706         }
       
 15707       }], [{
       
 15708         key: "getDerivedStateFromProps",
       
 15709         value: function getDerivedStateFromProps(_ref, previousState) {
       
 15710           var attributes = _ref.attributes,
       
 15711               fontSizes = _ref.fontSizes;
       
 15712 
       
 15713           var didAttributesChange = function didAttributesChange(customFontSizeAttributeName, fontSizeAttributeName) {
       
 15714             if (previousState[fontSizeAttributeName]) {
       
 15715               // if new font size is name compare with the previous slug
       
 15716               if (attributes[fontSizeAttributeName]) {
       
 15717                 return attributes[fontSizeAttributeName] !== previousState[fontSizeAttributeName].slug;
       
 15718               } // if font size is not named, update when the font size value changes.
       
 15719 
       
 15720 
       
 15721               return previousState[fontSizeAttributeName].size !== attributes[customFontSizeAttributeName];
       
 15722             } // in this case we need to build the font size object
       
 15723 
       
 15724 
       
 15725             return true;
       
 15726           };
       
 15727 
       
 15728           if (!Object(external_this_lodash_["some"])(fontSizeAttributeNames, didAttributesChange)) {
       
 15729             return null;
       
 15730           }
       
 15731 
       
 15732           var newState = Object(external_this_lodash_["reduce"])(Object(external_this_lodash_["pickBy"])(fontSizeAttributeNames, didAttributesChange), function (newStateAccumulator, customFontSizeAttributeName, fontSizeAttributeName) {
       
 15733             var fontSizeAttributeValue = attributes[fontSizeAttributeName];
       
 15734             var fontSizeObject = utils_getFontSize(fontSizes, fontSizeAttributeValue, attributes[customFontSizeAttributeName]);
       
 15735             newStateAccumulator[fontSizeAttributeName] = with_font_sizes_objectSpread({}, fontSizeObject, {
       
 15736               class: getFontSizeClass(fontSizeAttributeValue)
       
 15737             });
       
 15738             return newStateAccumulator;
       
 15739           }, {});
       
 15740           return with_font_sizes_objectSpread({}, previousState, {}, newState);
       
 15741         }
       
 15742       }]);
       
 15743 
       
 15744       return _class;
       
 15745     }(external_this_wp_element_["Component"]);
       
 15746   }]), 'withFontSizes');
 18428   }]), 'withFontSizes');
 15747 });
 18429 });
 15748 
 18430 
 15749 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/index.js
 18431 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/index.js
 15750 
 18432 
 15751 
 18433 
 15752 
 18434 
 15753 
 18435 
 15754 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-left.js
 18436 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-left.js
 15755 var align_left = __webpack_require__(287);
 18437 var align_left = __webpack_require__("fPbg");
 15756 
 18438 
 15757 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-center.js
 18439 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-center.js
 15758 var align_center = __webpack_require__(288);
 18440 var align_center = __webpack_require__("plpT");
 15759 
 18441 
 15760 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-right.js
 18442 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-right.js
 15761 var align_right = __webpack_require__(289);
 18443 var align_right = __webpack_require__("ziDm");
 15762 
 18444 
 15763 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/alignment-toolbar/index.js
 18445 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/alignment-control/ui.js
 15764 
 18446 
 15765 
 18447 
 15766 
       
 15767 function alignment_toolbar_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; }
       
 15768 
       
 15769 function alignment_toolbar_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { alignment_toolbar_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 { alignment_toolbar_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 15770 
 18448 
 15771 /**
 18449 /**
 15772  * External dependencies
 18450  * External dependencies
 15773  */
 18451  */
 15774 
 18452 
 15777  */
 18455  */
 15778 
 18456 
 15779 
 18457 
 15780 
 18458 
 15781 
 18459 
 15782 var DEFAULT_ALIGNMENT_CONTROLS = [{
 18460 const DEFAULT_ALIGNMENT_CONTROLS = [{
 15783   icon: align_left["a" /* default */],
 18461   icon: align_left["a" /* default */],
 15784   title: Object(external_this_wp_i18n_["__"])('Align text left'),
 18462   title: Object(external_wp_i18n_["__"])('Align text left'),
 15785   align: 'left'
 18463   align: 'left'
 15786 }, {
 18464 }, {
 15787   icon: align_center["a" /* default */],
 18465   icon: align_center["a" /* default */],
 15788   title: Object(external_this_wp_i18n_["__"])('Align text center'),
 18466   title: Object(external_wp_i18n_["__"])('Align text center'),
 15789   align: 'center'
 18467   align: 'center'
 15790 }, {
 18468 }, {
 15791   icon: align_right["a" /* default */],
 18469   icon: align_right["a" /* default */],
 15792   title: Object(external_this_wp_i18n_["__"])('Align text right'),
 18470   title: Object(external_wp_i18n_["__"])('Align text right'),
 15793   align: 'right'
 18471   align: 'right'
 15794 }];
 18472 }];
 15795 var alignment_toolbar_POPOVER_PROPS = {
 18473 const alignment_control_ui_POPOVER_PROPS = {
 15796   position: 'bottom right',
 18474   position: 'bottom right',
 15797   isAlternate: true
 18475   isAlternate: true
 15798 };
 18476 };
 15799 function AlignmentToolbar(props) {
 18477 
 15800   var value = props.value,
 18478 function AlignmentUI({
 15801       onChange = props.onChange,
 18479   value,
 15802       _props$alignmentContr = props.alignmentControls,
 18480   onChange,
 15803       alignmentControls = _props$alignmentContr === void 0 ? DEFAULT_ALIGNMENT_CONTROLS : _props$alignmentContr,
 18481   alignmentControls = DEFAULT_ALIGNMENT_CONTROLS,
 15804       _props$label = props.label,
 18482   label = Object(external_wp_i18n_["__"])('Align'),
 15805       label = _props$label === void 0 ? Object(external_this_wp_i18n_["__"])('Change text alignment') : _props$label,
 18483   describedBy = Object(external_wp_i18n_["__"])('Change text alignment'),
 15806       _props$isCollapsed = props.isCollapsed,
 18484   isCollapsed = true,
 15807       isCollapsed = _props$isCollapsed === void 0 ? true : _props$isCollapsed,
 18485   isToolbar
 15808       isRTL = props.isRTL;
 18486 }) {
 15809 
       
 15810   function applyOrUnset(align) {
 18487   function applyOrUnset(align) {
 15811     return function () {
 18488     return () => onChange(value === align ? undefined : align);
 15812       return onChange(value === align ? undefined : align);
 18489   }
 15813     };
 18490 
 15814   }
 18491   const activeAlignment = Object(external_lodash_["find"])(alignmentControls, control => control.align === value);
 15815 
       
 15816   var activeAlignment = Object(external_this_lodash_["find"])(alignmentControls, function (control) {
       
 15817     return control.align === value;
       
 15818   });
       
 15819 
 18492 
 15820   function setIcon() {
 18493   function setIcon() {
 15821     if (activeAlignment) return activeAlignment.icon;
 18494     if (activeAlignment) return activeAlignment.icon;
 15822     return isRTL ? align_right["a" /* default */] : align_left["a" /* default */];
 18495     return Object(external_wp_i18n_["isRTL"])() ? align_right["a" /* default */] : align_left["a" /* default */];
 15823   }
 18496   }
 15824 
 18497 
 15825   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
 18498   const UIComponent = isToolbar ? external_wp_components_["ToolbarGroup"] : external_wp_components_["ToolbarDropdownMenu"];
 15826     isCollapsed: isCollapsed,
 18499   const extraProps = isToolbar ? {
       
 18500     isCollapsed
       
 18501   } : {};
       
 18502   return Object(external_wp_element_["createElement"])(UIComponent, Object(esm_extends["a" /* default */])({
 15827     icon: setIcon(),
 18503     icon: setIcon(),
 15828     label: label,
 18504     label: label,
 15829     popoverProps: alignment_toolbar_POPOVER_PROPS,
 18505     toggleProps: {
 15830     controls: alignmentControls.map(function (control) {
 18506       describedBy
 15831       var align = control.align;
 18507     },
 15832       var isActive = value === align;
 18508     popoverProps: alignment_control_ui_POPOVER_PROPS,
 15833       return alignment_toolbar_objectSpread({}, control, {
 18509     controls: alignmentControls.map(control => {
 15834         isActive: isActive,
 18510       const {
       
 18511         align
       
 18512       } = control;
       
 18513       const isActive = value === align;
       
 18514       return { ...control,
       
 18515         isActive,
 15835         role: isCollapsed ? 'menuitemradio' : undefined,
 18516         role: isCollapsed ? 'menuitemradio' : undefined,
 15836         onClick: applyOrUnset(align)
 18517         onClick: applyOrUnset(align)
 15837       });
 18518       };
 15838     })
 18519     })
 15839   });
 18520   }, extraProps));
 15840 }
 18521 }
 15841 /* harmony default export */ var alignment_toolbar = (AlignmentToolbar);
 18522 
       
 18523 /* harmony default export */ var alignment_control_ui = (AlignmentUI);
       
 18524 
       
 18525 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/alignment-control/index.js
       
 18526 
       
 18527 
       
 18528 
       
 18529 /**
       
 18530  * Internal dependencies
       
 18531  */
       
 18532 
       
 18533 function AlignmentControl(props) {
       
 18534   return Object(external_wp_element_["createElement"])(alignment_control_ui, Object(esm_extends["a" /* default */])({}, props, {
       
 18535     isToolbar: false
       
 18536   }));
       
 18537 }
       
 18538 function AlignmentToolbar(props) {
       
 18539   return Object(external_wp_element_["createElement"])(alignment_control_ui, Object(esm_extends["a" /* default */])({}, props, {
       
 18540     isToolbar: true
       
 18541   }));
       
 18542 }
 15842 
 18543 
 15843 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/search-items.js
 18544 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/search-items.js
 15844 
       
 15845 
       
 15846 
       
 15847 function search_items_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; }
       
 15848 
       
 15849 function search_items_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { search_items_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 { search_items_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 15850 
       
 15851 /**
 18545 /**
 15852  * External dependencies
 18546  * External dependencies
 15853  */
 18547  */
 15854 
 18548  // Default search helpers
 15855 /**
 18549 
 15856  * Converts the search term into a list of normalized terms.
 18550 const defaultGetName = item => item.name || '';
 15857  *
 18551 
 15858  * @param {string} term The search term to normalize.
 18552 const defaultGetTitle = item => item.title;
 15859  *
 18553 
 15860  * @return {string[]} The normalized list of search terms.
 18554 const defaultGetDescription = item => item.description || '';
 15861  */
 18555 
 15862 
 18556 const defaultGetKeywords = item => item.keywords || [];
 15863 var search_items_normalizeSearchTerm = function normalizeSearchTerm() {
 18557 
 15864   var term = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
 18558 const defaultGetCategory = item => item.category;
       
 18559 
       
 18560 const defaultGetCollection = () => null;
       
 18561 /**
       
 18562  * Sanitizes the search input string.
       
 18563  *
       
 18564  * @param {string} input The search input to normalize.
       
 18565  *
       
 18566  * @return {string} The normalized search input.
       
 18567  */
       
 18568 
       
 18569 
       
 18570 function normalizeSearchInput(input = '') {
 15865   // Disregard diacritics.
 18571   // Disregard diacritics.
 15866   //  Input: "média"
 18572   //  Input: "média"
 15867   term = Object(external_this_lodash_["deburr"])(term); // Accommodate leading slash, matching autocomplete expectations.
 18573   input = Object(external_lodash_["deburr"])(input); // Accommodate leading slash, matching autocomplete expectations.
 15868   //  Input: "/media"
 18574   //  Input: "/media"
 15869 
 18575 
 15870   term = term.replace(/^\//, ''); // Lowercase.
 18576   input = input.replace(/^\//, ''); // Lowercase.
 15871   //  Input: "MEDIA"
 18577   //  Input: "MEDIA"
 15872 
 18578 
 15873   term = term.toLowerCase(); // Extract words.
 18579   input = input.toLowerCase();
 15874 
 18580   return input;
 15875   return Object(external_this_lodash_["words"])(term);
 18581 }
       
 18582 /**
       
 18583  * Converts the search term into a list of normalized terms.
       
 18584  *
       
 18585  * @param {string} input The search term to normalize.
       
 18586  *
       
 18587  * @return {string[]} The normalized list of search terms.
       
 18588  */
       
 18589 
       
 18590 
       
 18591 const getNormalizedSearchTerms = (input = '') => {
       
 18592   // Extract words.
       
 18593   return Object(external_lodash_["words"])(normalizeSearchInput(input));
 15876 };
 18594 };
 15877 
 18595 
 15878 var search_items_removeMatchingTerms = function removeMatchingTerms(unmatchedTerms, unprocessedTerms) {
 18596 const removeMatchingTerms = (unmatchedTerms, unprocessedTerms) => {
 15879   return Object(external_this_lodash_["differenceWith"])(unmatchedTerms, search_items_normalizeSearchTerm(unprocessedTerms), function (unmatchedTerm, unprocessedTerm) {
 18597   return Object(external_lodash_["differenceWith"])(unmatchedTerms, getNormalizedSearchTerms(unprocessedTerms), (unmatchedTerm, unprocessedTerm) => unprocessedTerm.includes(unmatchedTerm));
 15880     return unprocessedTerm.includes(unmatchedTerm);
       
 15881   });
       
 15882 };
 18598 };
 15883 
 18599 
 15884 var search_items_searchBlockItems = function searchBlockItems(items, categories, collections, searchTerm) {
 18600 const searchBlockItems = (items, categories, collections, searchInput) => {
 15885   var normalizedSearchTerms = search_items_normalizeSearchTerm(searchTerm);
 18601   const normalizedSearchTerms = getNormalizedSearchTerms(searchInput);
 15886 
 18602 
 15887   if (normalizedSearchTerms.length === 0) {
 18603   if (normalizedSearchTerms.length === 0) {
 15888     return items;
 18604     return items;
 15889   }
 18605   }
 15890 
 18606 
 15891   return search_items_searchItems(items, searchTerm, {
 18607   const config = {
 15892     getCategory: function getCategory(item) {
 18608     getCategory: item => {
 15893       var _find;
 18609       var _find;
 15894 
 18610 
 15895       return (_find = Object(external_this_lodash_["find"])(categories, {
 18611       return (_find = Object(external_lodash_["find"])(categories, {
 15896         slug: item.category
 18612         slug: item.category
 15897       })) === null || _find === void 0 ? void 0 : _find.title;
 18613       })) === null || _find === void 0 ? void 0 : _find.title;
 15898     },
 18614     },
 15899     getCollection: function getCollection(item) {
 18615     getCollection: item => {
 15900       var _collections$item$nam;
 18616       var _collections$item$nam;
 15901 
 18617 
 15902       return (_collections$item$nam = collections[item.name.split('/')[0]]) === null || _collections$item$nam === void 0 ? void 0 : _collections$item$nam.title;
 18618       return (_collections$item$nam = collections[item.name.split('/')[0]]) === null || _collections$item$nam === void 0 ? void 0 : _collections$item$nam.title;
 15903     },
 18619     }
 15904     getVariations: function getVariations(item) {
 18620   };
 15905       return (item.variations || []).map(function (variation) {
 18621   return searchItems(items, searchInput, config);
 15906         return variation.title;
       
 15907       });
       
 15908     }
       
 15909   }).map(function (item) {
       
 15910     if (Object(external_this_lodash_["isEmpty"])(item.variations)) {
       
 15911       return item;
       
 15912     }
       
 15913 
       
 15914     var matchedVariations = item.variations.filter(function (variation) {
       
 15915       return Object(external_this_lodash_["intersectionWith"])(normalizedSearchTerms, search_items_normalizeSearchTerm(variation.title), function (termToMatch, labelTerm) {
       
 15916         return labelTerm.includes(termToMatch);
       
 15917       }).length > 0;
       
 15918     }); // When no variations matched, fallback to all variations.
       
 15919 
       
 15920     if (Object(external_this_lodash_["isEmpty"])(matchedVariations)) {
       
 15921       return item;
       
 15922     }
       
 15923 
       
 15924     return search_items_objectSpread({}, item, {
       
 15925       variations: matchedVariations
       
 15926     });
       
 15927   });
       
 15928 };
 18622 };
 15929 /**
 18623 /**
 15930  * Filters an item list given a search term.
 18624  * Filters an item list given a search term.
 15931  *
 18625  *
 15932  * @param {Array} items       Item list
 18626  * @param {Array}  items       Item list
       
 18627  * @param {string} searchInput Search input.
       
 18628  * @param {Object} config      Search Config.
       
 18629  * @return {Array}             Filtered item list.
       
 18630  */
       
 18631 
       
 18632 const searchItems = (items = [], searchInput = '', config = {}) => {
       
 18633   const normalizedSearchTerms = getNormalizedSearchTerms(searchInput);
       
 18634 
       
 18635   if (normalizedSearchTerms.length === 0) {
       
 18636     return items;
       
 18637   }
       
 18638 
       
 18639   const rankedItems = items.map(item => {
       
 18640     return [item, getItemSearchRank(item, searchInput, config)];
       
 18641   }).filter(([, rank]) => rank > 0);
       
 18642   rankedItems.sort(([, rank1], [, rank2]) => rank2 - rank1);
       
 18643   return rankedItems.map(([item]) => item);
       
 18644 };
       
 18645 /**
       
 18646  * Get the search rank for a given item and a specific search term.
       
 18647  * The better the match, the higher the rank.
       
 18648  * If the rank equals 0, it should be excluded from the results.
       
 18649  *
       
 18650  * @param {Object} item       Item to filter.
 15933  * @param {string} searchTerm Search term.
 18651  * @param {string} searchTerm Search term.
 15934  * @param {Object} config     Search Config.
 18652  * @param {Object} config     Search Config.
 15935  * @return {Array}            Filtered item list.
 18653  * @return {number}           Search Rank.
 15936  */
 18654  */
 15937 
 18655 
 15938 var search_items_searchItems = function searchItems() {
 18656 function getItemSearchRank(item, searchTerm, config = {}) {
 15939   var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
 18657   const {
 15940   var searchTerm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
 18658     getName = defaultGetName,
 15941   var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
 18659     getTitle = defaultGetTitle,
 15942   var normalizedSearchTerms = search_items_normalizeSearchTerm(searchTerm);
 18660     getDescription = defaultGetDescription,
 15943 
 18661     getKeywords = defaultGetKeywords,
 15944   if (normalizedSearchTerms.length === 0) {
 18662     getCategory = defaultGetCategory,
 15945     return items;
 18663     getCollection = defaultGetCollection
 15946   }
 18664   } = config;
 15947 
 18665   const name = getName(item);
 15948   var defaultGetTitle = function defaultGetTitle(item) {
 18666   const title = getTitle(item);
 15949     return item.title;
 18667   const description = getDescription(item);
 15950   };
 18668   const keywords = getKeywords(item);
 15951 
 18669   const category = getCategory(item);
 15952   var defaultGetKeywords = function defaultGetKeywords(item) {
 18670   const collection = getCollection(item);
 15953     return item.keywords || [];
 18671   const normalizedSearchInput = normalizeSearchInput(searchTerm);
 15954   };
 18672   const normalizedTitle = normalizeSearchInput(title);
 15955 
 18673   let rank = 0; // Prefers exact matches
 15956   var defaultGetCategory = function defaultGetCategory(item) {
 18674   // Then prefers if the beginning of the title matches the search term
 15957     return item.category;
 18675   // name, keywords, categories, collection, variations match come later.
 15958   };
 18676 
 15959 
 18677   if (normalizedSearchInput === normalizedTitle) {
 15960   var defaultGetCollection = function defaultGetCollection() {
 18678     rank += 30;
 15961     return null;
 18679   } else if (normalizedTitle.startsWith(normalizedSearchInput)) {
 15962   };
 18680     rank += 20;
 15963 
 18681   } else {
 15964   var defaultGetVariations = function defaultGetVariations() {
 18682     const terms = [name, title, description, ...keywords, category, collection].join(' ');
 15965     return [];
 18683     const normalizedSearchTerms = Object(external_lodash_["words"])(normalizedSearchInput);
 15966   };
 18684     const unmatchedTerms = removeMatchingTerms(normalizedSearchTerms, terms);
 15967 
 18685 
 15968   var _config$getTitle = config.getTitle,
 18686     if (unmatchedTerms.length === 0) {
 15969       getTitle = _config$getTitle === void 0 ? defaultGetTitle : _config$getTitle,
 18687       rank += 10;
 15970       _config$getKeywords = config.getKeywords,
 18688     }
 15971       getKeywords = _config$getKeywords === void 0 ? defaultGetKeywords : _config$getKeywords,
 18689   } // Give a better rank to "core" namespaced items.
 15972       _config$getCategory = config.getCategory,
 18690 
 15973       getCategory = _config$getCategory === void 0 ? defaultGetCategory : _config$getCategory,
 18691 
 15974       _config$getCollection = config.getCollection,
 18692   if (rank !== 0 && name.startsWith('core/')) {
 15975       getCollection = _config$getCollection === void 0 ? defaultGetCollection : _config$getCollection,
 18693     rank++;
 15976       _config$getVariations = config.getVariations,
 18694   }
 15977       getVariations = _config$getVariations === void 0 ? defaultGetVariations : _config$getVariations;
 18695 
 15978   return items.filter(function (item) {
 18696   return rank;
 15979     var title = getTitle(item);
 18697 }
 15980     var keywords = getKeywords(item);
       
 15981     var category = getCategory(item);
       
 15982     var collection = getCollection(item);
       
 15983     var variations = getVariations(item);
       
 15984     var terms = [title].concat(Object(toConsumableArray["a" /* default */])(keywords), [category, collection], Object(toConsumableArray["a" /* default */])(variations)).join(' ');
       
 15985     var unmatchedTerms = search_items_removeMatchingTerms(normalizedSearchTerms, terms);
       
 15986     return unmatchedTerms.length === 0;
       
 15987   });
       
 15988 };
       
 15989 
 18698 
 15990 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/hooks/use-block-types-state.js
 18699 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/hooks/use-block-types-state.js
 15991 
       
 15992 
       
 15993 /**
       
 15994  * External dependencies
       
 15995  */
       
 15996 
       
 15997 /**
 18700 /**
 15998  * WordPress dependencies
 18701  * WordPress dependencies
 15999  */
 18702  */
 16000 
 18703 
 16001 
 18704 
 16002 
 18705 
 16003  // Copied over from the Columns block. It seems like it should become part of public API.
 18706 /**
 16004 
 18707  * Internal dependencies
 16005 var use_block_types_state_createBlocksFromInnerBlocksTemplate = function createBlocksFromInnerBlocksTemplate(innerBlocksTemplate) {
 18708  */
 16006   return Object(external_this_lodash_["map"])(innerBlocksTemplate, function (_ref) {
 18709 
 16007     var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 3),
 18710 
 16008         name = _ref2[0],
       
 16009         attributes = _ref2[1],
       
 16010         _ref2$ = _ref2[2],
       
 16011         innerBlocks = _ref2$ === void 0 ? [] : _ref2$;
       
 16012 
       
 16013     return Object(external_this_wp_blocks_["createBlock"])(name, attributes, createBlocksFromInnerBlocksTemplate(innerBlocks));
       
 16014   });
       
 16015 };
       
 16016 /**
 18711 /**
 16017  * Retrieves the block types inserter state.
 18712  * Retrieves the block types inserter state.
 16018  *
 18713  *
 16019  * @param {string=}  rootClientId        Insertion's root client ID.
 18714  * @param {string=}  rootClientId        Insertion's root client ID.
 16020  * @param {Function} onInsert            function called when inserter a list of blocks.
 18715  * @param {Function} onInsert            function called when inserter a list of blocks.
 16021  * @return {Array} Returns the block types state. (block types, categories, collections, onSelect handler)
 18716  * @return {Array} Returns the block types state. (block types, categories, collections, onSelect handler)
 16022  */
 18717  */
 16023 
 18718 
 16024 
 18719 const useBlockTypesState = (rootClientId, onInsert) => {
 16025 var use_block_types_state_useBlockTypesState = function useBlockTypesState(rootClientId, onInsert) {
 18720   const {
 16026   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 18721     categories,
 16027     var _select = select('core/block-editor'),
 18722     collections,
 16028         getInserterItems = _select.getInserterItems,
 18723     items
 16029         getSettings = _select.getSettings;
 18724   } = Object(external_wp_data_["useSelect"])(select => {
 16030 
 18725     const {
 16031     var _select2 = select('core/blocks'),
 18726       getInserterItems
 16032         getCategories = _select2.getCategories,
 18727     } = select(store);
 16033         getCollections = _select2.getCollections;
 18728     const {
 16034 
 18729       getCategories,
 16035     var _getSettings = getSettings(),
 18730       getCollections
 16036         __experimentalFetchReusableBlocks = _getSettings.__experimentalFetchReusableBlocks;
 18731     } = select(external_wp_blocks_["store"]);
 16037 
       
 16038     return {
 18732     return {
 16039       categories: getCategories(),
 18733       categories: getCategories(),
 16040       collections: getCollections(),
 18734       collections: getCollections(),
 16041       items: getInserterItems(rootClientId),
 18735       items: getInserterItems(rootClientId)
 16042       fetchReusableBlocks: __experimentalFetchReusableBlocks
       
 16043     };
 18736     };
 16044   }, [rootClientId]),
 18737   }, [rootClientId]);
 16045       categories = _useSelect.categories,
 18738   const onSelectItem = Object(external_wp_element_["useCallback"])(({
 16046       collections = _useSelect.collections,
 18739     name,
 16047       items = _useSelect.items,
 18740     initialAttributes,
 16048       fetchReusableBlocks = _useSelect.fetchReusableBlocks; // Fetch resuable blocks on mount
 18741     innerBlocks
 16049 
 18742   }, shouldFocusBlock) => {
 16050 
 18743     const insertedBlock = Object(external_wp_blocks_["createBlock"])(name, initialAttributes, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(innerBlocks));
 16051   Object(external_this_wp_element_["useEffect"])(function () {
 18744     onInsert(insertedBlock, undefined, shouldFocusBlock);
 16052     if (fetchReusableBlocks) {
 18745   }, [onInsert]);
 16053       fetchReusableBlocks();
       
 16054     }
       
 16055   }, []);
       
 16056 
       
 16057   var onSelectItem = function onSelectItem(_ref3) {
       
 16058     var name = _ref3.name,
       
 16059         initialAttributes = _ref3.initialAttributes,
       
 16060         innerBlocks = _ref3.innerBlocks;
       
 16061     var insertedBlock = Object(external_this_wp_blocks_["createBlock"])(name, initialAttributes, use_block_types_state_createBlocksFromInnerBlocksTemplate(innerBlocks));
       
 16062     onInsert(insertedBlock);
       
 16063   };
       
 16064 
       
 16065   return [items, categories, collections, onSelectItem];
 18746   return [items, categories, collections, onSelectItem];
 16066 };
 18747 };
 16067 
 18748 
 16068 /* harmony default export */ var use_block_types_state = (use_block_types_state_useBlockTypesState);
 18749 /* harmony default export */ var use_block_types_state = (useBlockTypesState);
 16069 
       
 16070 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/utils.js
       
 16071 
       
 16072 
       
 16073 function utils_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; }
       
 16074 
       
 16075 function utils_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { utils_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 { utils_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 16076 
       
 16077 /**
       
 16078  * Normalizes an inserter block types list and includes variations as separate items.
       
 16079  *
       
 16080  * @param {Array} items Denormalized inserter items
       
 16081  * @return {Array} Normalized inserter items.
       
 16082  */
       
 16083 function includeVariationsInInserterItems(items) {
       
 16084   return items.reduce(function (result, item) {
       
 16085     var _item$variations = item.variations,
       
 16086         variations = _item$variations === void 0 ? [] : _item$variations;
       
 16087     var hasDefaultVariation = variations.some(function (_ref) {
       
 16088       var isDefault = _ref.isDefault;
       
 16089       return isDefault;
       
 16090     }); // If there is no default inserter variation provided,
       
 16091     // then default block type is displayed.
       
 16092 
       
 16093     if (!hasDefaultVariation) {
       
 16094       result.push(item);
       
 16095     }
       
 16096 
       
 16097     if (variations.length) {
       
 16098       result = result.concat(variations.map(function (variation) {
       
 16099         return utils_objectSpread({}, item, {
       
 16100           id: "".concat(item.id, "-").concat(variation.name),
       
 16101           icon: variation.icon || item.icon,
       
 16102           title: variation.title || item.title,
       
 16103           description: variation.description || item.description,
       
 16104           // If `example` is explicitly undefined for the variation, the preview will not be shown.
       
 16105           example: variation.hasOwnProperty('example') ? variation.example : item.example,
       
 16106           initialAttributes: utils_objectSpread({}, item.initialAttributes, {}, variation.attributes),
       
 16107           innerBlocks: variation.innerBlocks
       
 16108         });
       
 16109       }));
       
 16110     }
       
 16111 
       
 16112     return result;
       
 16113   }, []);
       
 16114 }
       
 16115 
 18750 
 16116 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
 18751 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
 16117 var block_default = __webpack_require__(202);
 18752 var block_default = __webpack_require__("//Lo");
 16118 
 18753 
 16119 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-icon/index.js
 18754 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-icon/index.js
 16120 
 18755 
 16121 
 18756 
 16122 /**
 18757 /**
 16123  * External dependencies
 18758  * External dependencies
 16124  */
 18759  */
 16125 
 18760 
 16126 
       
 16127 /**
 18761 /**
 16128  * WordPress dependencies
 18762  * WordPress dependencies
 16129  */
 18763  */
 16130 
 18764 
 16131 
 18765 
 16132 
 18766 
 16133 function BlockIcon(_ref) {
 18767 function BlockIcon({
 16134   var icon = _ref.icon,
 18768   icon,
 16135       _ref$showColors = _ref.showColors,
 18769   showColors = false,
 16136       showColors = _ref$showColors === void 0 ? false : _ref$showColors,
 18770   className
 16137       className = _ref.className;
 18771 }) {
 16138 
 18772   var _icon;
 16139   if (Object(external_this_lodash_["get"])(icon, ['src']) === 'block-default') {
 18773 
       
 18774   if (((_icon = icon) === null || _icon === void 0 ? void 0 : _icon.src) === 'block-default') {
 16140     icon = {
 18775     icon = {
 16141       src: block_default["a" /* default */]
 18776       src: block_default["a" /* default */]
 16142     };
 18777     };
 16143   }
 18778   }
 16144 
 18779 
 16145   var renderedIcon = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Icon"], {
 18780   const renderedIcon = Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
 16146     icon: icon && icon.src ? icon.src : icon
 18781     icon: icon && icon.src ? icon.src : icon
 16147   });
 18782   });
 16148   var style = showColors ? {
 18783   const style = showColors ? {
 16149     backgroundColor: icon && icon.background,
 18784     backgroundColor: icon && icon.background,
 16150     color: icon && icon.foreground
 18785     color: icon && icon.foreground
 16151   } : {};
 18786   } : {};
 16152   return Object(external_this_wp_element_["createElement"])("span", {
 18787   return Object(external_wp_element_["createElement"])("span", {
 16153     style: style,
 18788     style: style,
 16154     className: classnames_default()('block-editor-block-icon', className, {
 18789     className: classnames_default()('block-editor-block-icon', className, {
 16155       'has-colors': showColors
 18790       'has-colors': showColors
 16156     })
 18791     })
 16157   }, renderedIcon);
 18792   }, renderedIcon);
 16158 }
 18793 }
 16159 
 18794 
 16160 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/autocompleters/block.js
 18795 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/autocompleters/block.js
 16161 
 18796 
 16162 
 18797 
 16163 
       
 16164 /**
 18798 /**
 16165  * External dependencies
 18799  * External dependencies
 16166  */
 18800  */
 16167 
 18801 
 16168 /**
 18802 /**
 16178 
 18812 
 16179 
 18813 
 16180 
 18814 
 16181 
 18815 
 16182 
 18816 
 16183 
 18817 const SHOWN_BLOCK_TYPES = 9;
 16184 var block_createBlocksFromInnerBlocksTemplate = function createBlocksFromInnerBlocksTemplate(innerBlocksTemplate) {
       
 16185   return Object(external_this_lodash_["map"])(innerBlocksTemplate, function (_ref) {
       
 16186     var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 3),
       
 16187         name = _ref2[0],
       
 16188         attributes = _ref2[1],
       
 16189         _ref2$ = _ref2[2],
       
 16190         innerBlocks = _ref2$ === void 0 ? [] : _ref2$;
       
 16191 
       
 16192     return Object(external_this_wp_blocks_["createBlock"])(name, attributes, createBlocksFromInnerBlocksTemplate(innerBlocks));
       
 16193   });
       
 16194 };
       
 16195 /** @typedef {import('@wordpress/block-editor').WPEditorInserterItem} WPEditorInserterItem */
       
 16196 
       
 16197 /** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
 18818 /** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
 16198 
 18819 
 16199 /**
 18820 /**
 16200  * Creates a blocks repeater for replacing the current block with a selected block type.
 18821  * Creates a blocks repeater for replacing the current block with a selected block type.
 16201  *
 18822  *
 16202  * @param {Object} props                                   Component props.
       
 16203  * @param {string} [props.getBlockInsertionParentClientId] Client ID of the parent.
       
 16204  * @param {string} [props.getInserterItems]                Inserter items for parent.
       
 16205  * @param {string} [props.getSelectedBlockName]            Name of selected block or null.
       
 16206  *
       
 16207  * @return {WPCompleter} A blocks completer.
 18823  * @return {WPCompleter} A blocks completer.
 16208  */
 18824  */
 16209 
       
 16210 
 18825 
 16211 function createBlockCompleter() {
 18826 function createBlockCompleter() {
 16212   return {
 18827   return {
 16213     name: 'blocks',
 18828     name: 'blocks',
 16214     className: 'block-editor-autocompleters__block',
 18829     className: 'block-editor-autocompleters__block',
 16215     triggerPrefix: '/',
 18830     triggerPrefix: '/',
 16216     useItems: function useItems(filterValue) {
 18831 
 16217       var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 18832     useItems(filterValue) {
 16218         var _select = select('core/block-editor'),
 18833       const {
 16219             getSelectedBlockClientId = _select.getSelectedBlockClientId,
 18834         rootClientId,
 16220             getBlockName = _select.getBlockName,
 18835         selectedBlockName
 16221             getBlockInsertionPoint = _select.getBlockInsertionPoint;
 18836       } = Object(external_wp_data_["useSelect"])(select => {
 16222 
 18837         const {
 16223         var selectedBlockClientId = getSelectedBlockClientId();
 18838           getSelectedBlockClientId,
       
 18839           getBlockName,
       
 18840           getBlockInsertionPoint
       
 18841         } = select(store);
       
 18842         const selectedBlockClientId = getSelectedBlockClientId();
 16224         return {
 18843         return {
 16225           selectedBlockName: selectedBlockClientId ? getBlockName(selectedBlockClientId) : null,
 18844           selectedBlockName: selectedBlockClientId ? getBlockName(selectedBlockClientId) : null,
 16226           rootClientId: getBlockInsertionPoint().rootClientId
 18845           rootClientId: getBlockInsertionPoint().rootClientId
 16227         };
 18846         };
 16228       }, []),
 18847       }, []);
 16229           rootClientId = _useSelect.rootClientId,
 18848       const [items, categories, collections] = use_block_types_state(rootClientId, external_lodash_["noop"]);
 16230           selectedBlockName = _useSelect.selectedBlockName;
 18849       const filteredItems = Object(external_wp_element_["useMemo"])(() => {
 16231 
 18850         const initialFilteredItems = !!filterValue.trim() ? searchBlockItems(items, categories, collections, filterValue) : Object(external_lodash_["orderBy"])(items, ['frecency'], ['desc']);
 16232       var _useBlockTypesState = use_block_types_state(rootClientId, external_this_lodash_["noop"]),
 18851         return initialFilteredItems.filter(item => item.name !== selectedBlockName).slice(0, SHOWN_BLOCK_TYPES);
 16233           _useBlockTypesState2 = Object(slicedToArray["a" /* default */])(_useBlockTypesState, 3),
       
 16234           items = _useBlockTypesState2[0],
       
 16235           categories = _useBlockTypesState2[1],
       
 16236           collections = _useBlockTypesState2[2];
       
 16237 
       
 16238       var filteredItems = Object(external_this_wp_element_["useMemo"])(function () {
       
 16239         return search_items_searchBlockItems(items, categories, collections, filterValue).filter(function (item) {
       
 16240           return item.name !== selectedBlockName;
       
 16241         });
       
 16242       }, [filterValue, selectedBlockName, items, categories, collections]);
 18852       }, [filterValue, selectedBlockName, items, categories, collections]);
 16243       var options = Object(external_this_wp_element_["useMemo"])(function () {
 18853       const options = Object(external_wp_element_["useMemo"])(() => filteredItems.map(blockItem => {
 16244         return includeVariationsInInserterItems(filteredItems).map(function (blockItem) {
 18854         const {
 16245           var title = blockItem.title,
 18855           title,
 16246               icon = blockItem.icon,
 18856           icon,
 16247               isDisabled = blockItem.isDisabled;
 18857           isDisabled
 16248           return {
 18858         } = blockItem;
 16249             key: "block-".concat(blockItem.id),
 18859         return {
 16250             value: blockItem,
 18860           key: `block-${blockItem.id}`,
 16251             label: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(BlockIcon, {
 18861           value: blockItem,
 16252               key: "icon",
 18862           label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(BlockIcon, {
 16253               icon: icon,
 18863             key: "icon",
 16254               showColors: true
 18864             icon: icon,
 16255             }), title),
 18865             showColors: true
 16256             isDisabled: isDisabled
 18866           }), title),
 16257           };
 18867           isDisabled
 16258         });
 18868         };
 16259       }, [filteredItems]);
 18869       }), [filteredItems]);
 16260       return [options];
 18870       return [options];
 16261     },
 18871     },
 16262     allowContext: function allowContext(before, after) {
 18872 
       
 18873     allowContext(before, after) {
 16263       return !(/\S/.test(before) || /\S/.test(after));
 18874       return !(/\S/.test(before) || /\S/.test(after));
 16264     },
 18875     },
 16265     getOptionCompletion: function getOptionCompletion(inserterItem) {
 18876 
 16266       var name = inserterItem.name,
 18877     getOptionCompletion(inserterItem) {
 16267           initialAttributes = inserterItem.initialAttributes,
 18878       const {
 16268           innerBlocks = inserterItem.innerBlocks;
 18879         name,
       
 18880         initialAttributes,
       
 18881         innerBlocks
       
 18882       } = inserterItem;
 16269       return {
 18883       return {
 16270         action: 'replace',
 18884         action: 'replace',
 16271         value: Object(external_this_wp_blocks_["createBlock"])(name, initialAttributes, block_createBlocksFromInnerBlocksTemplate(innerBlocks))
 18885         value: Object(external_wp_blocks_["createBlock"])(name, initialAttributes, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(innerBlocks))
 16272       };
 18886       };
 16273     }
 18887     }
       
 18888 
 16274   };
 18889   };
 16275 }
 18890 }
 16276 /**
 18891 /**
 16277  * Creates a blocks repeater for replacing the current block with a selected block type.
 18892  * Creates a blocks repeater for replacing the current block with a selected block type.
 16278  *
 18893  *
 16309  * returning a new array reference on every invocation.
 18924  * returning a new array reference on every invocation.
 16310  *
 18925  *
 16311  * @type {Array}
 18926  * @type {Array}
 16312  */
 18927  */
 16313 
 18928 
 16314 var EMPTY_ARRAY = [];
 18929 const autocomplete_EMPTY_ARRAY = [];
       
 18930 
       
 18931 function useCompleters({
       
 18932   completers = autocomplete_EMPTY_ARRAY
       
 18933 }) {
       
 18934   const {
       
 18935     name
       
 18936   } = useBlockEditContext();
       
 18937   return Object(external_wp_element_["useMemo"])(() => {
       
 18938     let filteredCompleters = completers;
       
 18939 
       
 18940     if (name === Object(external_wp_blocks_["getDefaultBlockName"])()) {
       
 18941       filteredCompleters = filteredCompleters.concat([autocompleters_block]);
       
 18942     }
       
 18943 
       
 18944     if (Object(external_wp_hooks_["hasFilter"])('editor.Autocomplete.completers')) {
       
 18945       // Provide copies so filters may directly modify them.
       
 18946       if (filteredCompleters === completers) {
       
 18947         filteredCompleters = filteredCompleters.map(external_lodash_["clone"]);
       
 18948       }
       
 18949 
       
 18950       filteredCompleters = Object(external_wp_hooks_["applyFilters"])('editor.Autocomplete.completers', filteredCompleters, name);
       
 18951     }
       
 18952 
       
 18953     return filteredCompleters;
       
 18954   }, [completers, name]);
       
 18955 }
       
 18956 
       
 18957 function useBlockEditorAutocompleteProps(props) {
       
 18958   return Object(external_wp_components_["__unstableUseAutocompleteProps"])({ ...props,
       
 18959     completers: useCompleters(props)
       
 18960   });
       
 18961 }
 16315 /**
 18962 /**
 16316  * Wrap the default Autocomplete component with one that supports a filter hook
 18963  * Wrap the default Autocomplete component with one that supports a filter hook
 16317  * for customizing its list of autocompleters.
 18964  * for customizing its list of autocompleters.
 16318  *
 18965  *
 16319  * @type {import('react').FC}
 18966  * @type {import('react').FC}
 16320  */
 18967  */
 16321 
 18968 
 16322 function BlockEditorAutocomplete(props) {
 18969 function BlockEditorAutocomplete(props) {
 16323   var _useBlockEditContext = useBlockEditContext(),
 18970   return Object(external_wp_element_["createElement"])(external_wp_components_["Autocomplete"], Object(esm_extends["a" /* default */])({}, props, {
 16324       name = _useBlockEditContext.name;
 18971     completers: useCompleters(props)
 16325 
       
 16326   var _props$completers = props.completers,
       
 16327       completers = _props$completers === void 0 ? EMPTY_ARRAY : _props$completers;
       
 16328   completers = Object(external_this_wp_element_["useMemo"])(function () {
       
 16329     var filteredCompleters = completers;
       
 16330 
       
 16331     if (name === Object(external_this_wp_blocks_["getDefaultBlockName"])()) {
       
 16332       filteredCompleters = filteredCompleters.concat([autocompleters_block]);
       
 16333     }
       
 16334 
       
 16335     if (Object(external_this_wp_hooks_["hasFilter"])('editor.Autocomplete.completers')) {
       
 16336       // Provide copies so filters may directly modify them.
       
 16337       if (filteredCompleters === completers) {
       
 16338         filteredCompleters = filteredCompleters.map(external_this_lodash_["clone"]);
       
 16339       }
       
 16340 
       
 16341       filteredCompleters = Object(external_this_wp_hooks_["applyFilters"])('editor.Autocomplete.completers', filteredCompleters, name);
       
 16342     }
       
 16343 
       
 16344     return filteredCompleters;
       
 16345   }, [completers, name]);
       
 16346   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Autocomplete"], Object(esm_extends["a" /* default */])({}, props, {
       
 16347     completers: completers
       
 16348   }));
 18972   }));
 16349 }
 18973 }
 16350 /**
 18974 /**
 16351  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/autocomplete/README.md
 18975  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/autocomplete/README.md
 16352  */
 18976  */
 16353 
 18977 
 16354 
 18978 
 16355 /* harmony default export */ var autocomplete = (BlockEditorAutocomplete);
 18979 /* harmony default export */ var autocomplete = (BlockEditorAutocomplete);
 16356 
 18980 
 16357 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-matrix-toolbar/index.js
 18981 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
       
 18982 
       
 18983 
       
 18984 /**
       
 18985  * WordPress dependencies
       
 18986  */
       
 18987 
       
 18988 const fullscreen = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 18989   xmlns: "http://www.w3.org/2000/svg",
       
 18990   viewBox: "0 0 24 24"
       
 18991 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 18992   d: "M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"
       
 18993 }));
       
 18994 /* harmony default export */ var library_fullscreen = (fullscreen);
       
 18995 
       
 18996 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-full-height-alignment-control/index.js
       
 18997 
       
 18998 
       
 18999 /**
       
 19000  * WordPress dependencies
       
 19001  */
       
 19002 
       
 19003 
       
 19004 
       
 19005 
       
 19006 function BlockFullHeightAlignmentControl({
       
 19007   isActive,
       
 19008   label = Object(external_wp_i18n_["__"])('Toggle full height'),
       
 19009   onToggle,
       
 19010   isDisabled
       
 19011 }) {
       
 19012   return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
       
 19013     isActive: isActive,
       
 19014     icon: library_fullscreen,
       
 19015     label: label,
       
 19016     onClick: () => onToggle(!isActive),
       
 19017     disabled: isDisabled
       
 19018   });
       
 19019 }
       
 19020 
       
 19021 /* harmony default export */ var block_full_height_alignment_control = (BlockFullHeightAlignmentControl);
       
 19022 
       
 19023 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-matrix-control/index.js
 16358 
 19024 
 16359 
 19025 
 16360 /**
 19026 /**
 16361  * External dependencies
 19027  * External dependencies
 16362  */
 19028  */
 16366  */
 19032  */
 16367 
 19033 
 16368 
 19034 
 16369 
 19035 
 16370 
 19036 
 16371 function BlockAlignmentMatrixToolbar(props) {
 19037 
 16372   var _props$label = props.label,
 19038 function BlockAlignmentMatrixControl(props) {
 16373       label = _props$label === void 0 ? Object(external_this_wp_i18n_["__"])('Change matrix alignment') : _props$label,
 19039   const {
 16374       _props$onChange = props.onChange,
 19040     label = Object(external_wp_i18n_["__"])('Change matrix alignment'),
 16375       onChange = _props$onChange === void 0 ? external_this_lodash_["noop"] : _props$onChange,
 19041     onChange = external_lodash_["noop"],
 16376       _props$value = props.value,
 19042     value = 'center',
 16377       value = _props$value === void 0 ? 'center' : _props$value;
 19043     isDisabled
 16378   var icon = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalAlignmentMatrixControl"].Icon, {
 19044   } = props;
       
 19045   const icon = Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalAlignmentMatrixControl"].Icon, {
 16379     value: value
 19046     value: value
 16380   });
 19047   });
 16381   var className = 'block-editor-block-alignment-matrix-toolbar';
 19048   const className = 'block-editor-block-alignment-matrix-control';
 16382   var popoverClassName = "".concat(className, "__popover");
 19049   const popoverClassName = `${className}__popover`;
 16383   var isAlternate = true;
 19050   const isAlternate = true;
 16384   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
 19051   return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
 16385     position: "bottom right",
 19052     position: "bottom right",
 16386     className: className,
 19053     className: className,
 16387     popoverProps: {
 19054     popoverProps: {
 16388       className: popoverClassName,
 19055       className: popoverClassName,
 16389       isAlternate: isAlternate
 19056       isAlternate
 16390     },
 19057     },
 16391     renderToggle: function renderToggle(_ref) {
 19058     renderToggle: ({
 16392       var onToggle = _ref.onToggle,
 19059       onToggle,
 16393           isOpen = _ref.isOpen;
 19060       isOpen
 16394 
 19061     }) => {
 16395       var openOnArrowDown = function openOnArrowDown(event) {
 19062       const openOnArrowDown = event => {
 16396         if (!isOpen && event.keyCode === external_this_wp_keycodes_["DOWN"]) {
 19063         if (!isOpen && event.keyCode === external_wp_keycodes_["DOWN"]) {
 16397           event.preventDefault();
 19064           event.preventDefault();
 16398           event.stopPropagation();
 19065           event.stopPropagation();
 16399           onToggle();
 19066           onToggle();
 16400         }
 19067         }
 16401       };
 19068       };
 16402 
 19069 
 16403       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
 19070       return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
 16404         onClick: onToggle,
 19071         onClick: onToggle,
 16405         "aria-haspopup": "true",
 19072         "aria-haspopup": "true",
 16406         "aria-expanded": isOpen,
 19073         "aria-expanded": isOpen,
 16407         onKeyDown: openOnArrowDown,
 19074         onKeyDown: openOnArrowDown,
 16408         label: label,
 19075         label: label,
 16409         icon: icon,
 19076         icon: icon,
 16410         showTooltip: true
 19077         showTooltip: true,
 16411       }));
 19078         disabled: isDisabled
       
 19079       });
 16412     },
 19080     },
 16413     renderContent: function renderContent() {
 19081     renderContent: () => Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalAlignmentMatrixControl"], {
 16414       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalAlignmentMatrixControl"], {
 19082       hasFocusBorder: false,
 16415         hasFocusBorder: false,
 19083       onChange: onChange,
 16416         onChange: onChange,
 19084       value: value
 16417         value: value
 19085     })
 16418       });
       
 16419     }
       
 16420   });
 19086   });
 16421 }
 19087 }
 16422 /* harmony default export */ var block_alignment_matrix_toolbar = (BlockAlignmentMatrixToolbar);
 19088 
       
 19089 /* harmony default export */ var block_alignment_matrix_control = (BlockAlignmentMatrixControl);
       
 19090 
       
 19091 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-block-display-information/index.js
       
 19092 /**
       
 19093  * WordPress dependencies
       
 19094  */
       
 19095 
       
 19096 
       
 19097 /**
       
 19098  * Internal dependencies
       
 19099  */
       
 19100 
       
 19101 
       
 19102 /** @typedef {import('@wordpress/blocks').WPIcon} WPIcon */
       
 19103 
       
 19104 /**
       
 19105  * Contains basic block's information for display reasons.
       
 19106  *
       
 19107  * @typedef {Object} WPBlockDisplayInformation
       
 19108  *
       
 19109  * @property {string} title Human-readable block type label.
       
 19110  * @property {WPIcon} icon Block type icon.
       
 19111  * @property {string} description A detailed block type description.
       
 19112  */
       
 19113 
       
 19114 /**
       
 19115  * Hook used to try to find a matching block variation and return
       
 19116  * the appropriate information for display reasons. In order to
       
 19117  * to try to find a match we need to things:
       
 19118  * 1. Block's client id to extract it's current attributes.
       
 19119  * 2. A block variation should have set `isActive` prop to a proper function.
       
 19120  *
       
 19121  * If for any reason a block variaton match cannot be found,
       
 19122  * the returned information come from the Block Type.
       
 19123  * If no blockType is found with the provided clientId, returns null.
       
 19124  *
       
 19125  * @param {string} clientId Block's client id.
       
 19126  * @return {?WPBlockDisplayInformation} Block's display information, or `null` when the block or its type not found.
       
 19127  */
       
 19128 
       
 19129 function useBlockDisplayInformation(clientId) {
       
 19130   return Object(external_wp_data_["useSelect"])(select => {
       
 19131     if (!clientId) return null;
       
 19132     const {
       
 19133       getBlockName,
       
 19134       getBlockAttributes
       
 19135     } = select(store);
       
 19136     const {
       
 19137       getBlockType,
       
 19138       getActiveBlockVariation
       
 19139     } = select(external_wp_blocks_["store"]);
       
 19140     const blockName = getBlockName(clientId);
       
 19141     const blockType = getBlockType(blockName);
       
 19142     if (!blockType) return null;
       
 19143     const attributes = getBlockAttributes(clientId);
       
 19144     const match = getActiveBlockVariation(blockName, attributes);
       
 19145     const blockTypeInfo = {
       
 19146       title: blockType.title,
       
 19147       icon: blockType.icon,
       
 19148       description: blockType.description,
       
 19149       anchor: attributes === null || attributes === void 0 ? void 0 : attributes.anchor
       
 19150     };
       
 19151     if (!match) return blockTypeInfo;
       
 19152     return {
       
 19153       title: match.title || blockType.title,
       
 19154       icon: match.icon || blockType.icon,
       
 19155       description: match.description || blockType.description
       
 19156     };
       
 19157   }, [clientId]);
       
 19158 }
 16423 
 19159 
 16424 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-title/index.js
 19160 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-title/index.js
 16425 /**
 19161 /**
       
 19162  * External dependencies
       
 19163  */
       
 19164 
       
 19165 /**
 16426  * WordPress dependencies
 19166  * WordPress dependencies
 16427  */
 19167  */
       
 19168 
       
 19169 
       
 19170 
       
 19171 /**
       
 19172  * Internal dependencies
       
 19173  */
       
 19174 
 16428 
 19175 
 16429 
 19176 
 16430 /**
 19177 /**
 16431  * Renders the block's configured title as a string, or empty if the title
 19178  * Renders the block's configured title as a string, or empty if the title
 16432  * cannot be determined.
 19179  * cannot be determined.
 16441  * @param {string} props.clientId Client ID of block.
 19188  * @param {string} props.clientId Client ID of block.
 16442  *
 19189  *
 16443  * @return {?string} Block title.
 19190  * @return {?string} Block title.
 16444  */
 19191  */
 16445 
 19192 
 16446 function BlockTitle(_ref) {
 19193 function BlockTitle({
 16447   var clientId = _ref.clientId;
 19194   clientId
 16448   var name = Object(external_this_wp_data_["useSelect"])(function (select) {
 19195 }) {
       
 19196   const {
       
 19197     attributes,
       
 19198     name,
       
 19199     reusableBlockTitle
       
 19200   } = Object(external_wp_data_["useSelect"])(select => {
 16449     if (!clientId) {
 19201     if (!clientId) {
 16450       return null;
 19202       return {};
 16451     }
 19203     }
 16452 
 19204 
 16453     var _select = select('core/block-editor'),
 19205     const {
 16454         getBlockName = _select.getBlockName;
 19206       getBlockName,
 16455 
 19207       getBlockAttributes,
 16456     return getBlockName(clientId);
 19208       __experimentalGetReusableBlockTitle
       
 19209     } = select(store);
       
 19210     const blockName = getBlockName(clientId);
       
 19211 
       
 19212     if (!blockName) {
       
 19213       return {};
       
 19214     }
       
 19215 
       
 19216     const isReusable = Object(external_wp_blocks_["isReusableBlock"])(Object(external_wp_blocks_["getBlockType"])(blockName));
       
 19217     return {
       
 19218       attributes: getBlockAttributes(clientId),
       
 19219       name: blockName,
       
 19220       reusableBlockTitle: isReusable && __experimentalGetReusableBlockTitle(getBlockAttributes(clientId).ref)
       
 19221     };
 16457   }, [clientId]);
 19222   }, [clientId]);
 16458 
 19223   const blockInformation = useBlockDisplayInformation(clientId);
 16459   if (!name) {
 19224   if (!name || !blockInformation) return null;
 16460     return null;
 19225   const blockType = Object(external_wp_blocks_["getBlockType"])(name);
 16461   }
 19226   const label = reusableBlockTitle || Object(external_wp_blocks_["__experimentalGetBlockLabel"])(blockType, attributes); // Label will fallback to the title if no label is defined for the current
 16462 
 19227   // label context. If the label is defined we prioritize it over possible
 16463   var blockType = Object(external_this_wp_blocks_["getBlockType"])(name);
 19228   // possible block variation title match.
 16464 
 19229 
 16465   if (!blockType) {
 19230   if (label !== blockType.title) {
 16466     return null;
 19231     return Object(external_lodash_["truncate"])(label, {
 16467   }
 19232       length: 35
 16468 
 19233     });
 16469   return blockType.title;
 19234   }
       
 19235 
       
 19236   return blockInformation.title;
 16470 }
 19237 }
 16471 
 19238 
 16472 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-breadcrumb/index.js
 19239 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-breadcrumb/index.js
 16473 
 19240 
 16474 
 19241 
 16481 /**
 19248 /**
 16482  * Internal dependencies
 19249  * Internal dependencies
 16483  */
 19250  */
 16484 
 19251 
 16485 
 19252 
       
 19253 
 16486 /**
 19254 /**
 16487  * Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.
 19255  * Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.
 16488  *
 19256  *
 16489  * @return {WPElement} Block Breadcrumb.
 19257  * @param  {Object}   props               Component props.
 16490  */
 19258  * @param  {string}   props.rootLabelText Translated label for the root element of the breadcrumb trail.
 16491 
 19259  * @return {WPElement}                    Block Breadcrumb.
 16492 function BlockBreadcrumb() {
 19260  */
 16493   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 19261 
 16494       selectBlock = _useDispatch.selectBlock,
 19262 function BlockBreadcrumb({
 16495       clearSelectedBlock = _useDispatch.clearSelectedBlock;
 19263   rootLabelText
 16496 
 19264 }) {
 16497   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 19265   const {
 16498     var _select = select('core/block-editor'),
 19266     selectBlock,
 16499         getSelectionStart = _select.getSelectionStart,
 19267     clearSelectedBlock
 16500         getSelectedBlockClientId = _select.getSelectedBlockClientId,
 19268   } = Object(external_wp_data_["useDispatch"])(store);
 16501         getBlockParents = _select.getBlockParents;
 19269   const {
 16502 
 19270     clientId,
 16503     var selectedBlockClientId = getSelectedBlockClientId();
 19271     parents,
       
 19272     hasSelection
       
 19273   } = Object(external_wp_data_["useSelect"])(select => {
       
 19274     const {
       
 19275       getSelectionStart,
       
 19276       getSelectedBlockClientId,
       
 19277       getBlockParents
       
 19278     } = select(store);
       
 19279     const selectedBlockClientId = getSelectedBlockClientId();
 16504     return {
 19280     return {
 16505       parents: getBlockParents(selectedBlockClientId),
 19281       parents: getBlockParents(selectedBlockClientId),
 16506       clientId: selectedBlockClientId,
 19282       clientId: selectedBlockClientId,
 16507       hasSelection: !!getSelectionStart().clientId
 19283       hasSelection: !!getSelectionStart().clientId
 16508     };
 19284     };
 16509   }, []),
 19285   }, []);
 16510       clientId = _useSelect.clientId,
 19286 
 16511       parents = _useSelect.parents,
 19287   const rootLabel = rootLabelText || Object(external_wp_i18n_["__"])('Document');
 16512       hasSelection = _useSelect.hasSelection;
       
 16513   /*
 19288   /*
 16514    * Disable reason: The `list` ARIA role is redundant but
 19289    * Disable reason: The `list` ARIA role is redundant but
 16515    * Safari+VoiceOver won't announce the list otherwise.
 19290    * Safari+VoiceOver won't announce the list otherwise.
 16516    */
 19291    */
 16517 
 19292 
 16518   /* eslint-disable jsx-a11y/no-redundant-roles */
 19293   /* eslint-disable jsx-a11y/no-redundant-roles */
 16519 
 19294 
 16520 
 19295 
 16521   return Object(external_this_wp_element_["createElement"])("ul", {
 19296   return Object(external_wp_element_["createElement"])("ul", {
 16522     className: "block-editor-block-breadcrumb",
 19297     className: "block-editor-block-breadcrumb",
 16523     role: "list",
 19298     role: "list",
 16524     "aria-label": Object(external_this_wp_i18n_["__"])('Block breadcrumb')
 19299     "aria-label": Object(external_wp_i18n_["__"])('Block breadcrumb')
 16525   }, Object(external_this_wp_element_["createElement"])("li", {
 19300   }, Object(external_wp_element_["createElement"])("li", {
 16526     className: !hasSelection ? 'block-editor-block-breadcrumb__current' : undefined,
 19301     className: !hasSelection ? 'block-editor-block-breadcrumb__current' : undefined,
 16527     "aria-current": !hasSelection ? 'true' : undefined
 19302     "aria-current": !hasSelection ? 'true' : undefined
 16528   }, hasSelection && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 19303   }, hasSelection && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 16529     className: "block-editor-block-breadcrumb__button",
 19304     className: "block-editor-block-breadcrumb__button",
 16530     isTertiary: true,
 19305     isTertiary: true,
 16531     onClick: clearSelectedBlock
 19306     onClick: clearSelectedBlock
 16532   }, Object(external_this_wp_i18n_["__"])('Document')), !hasSelection && Object(external_this_wp_i18n_["__"])('Document')), parents.map(function (parentClientId) {
 19307   }, rootLabel), !hasSelection && rootLabel), parents.map(parentClientId => Object(external_wp_element_["createElement"])("li", {
 16533     return Object(external_this_wp_element_["createElement"])("li", {
 19308     key: parentClientId
 16534       key: parentClientId
 19309   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 16535     }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 19310     className: "block-editor-block-breadcrumb__button",
 16536       className: "block-editor-block-breadcrumb__button",
 19311     isTertiary: true,
 16537       isTertiary: true,
 19312     onClick: () => selectBlock(parentClientId)
 16538       onClick: function onClick() {
 19313   }, Object(external_wp_element_["createElement"])(BlockTitle, {
 16539         return selectBlock(parentClientId);
 19314     clientId: parentClientId
 16540       }
 19315   })))), !!clientId && Object(external_wp_element_["createElement"])("li", {
 16541     }, Object(external_this_wp_element_["createElement"])(BlockTitle, {
       
 16542       clientId: parentClientId
       
 16543     })));
       
 16544   }), !!clientId && Object(external_this_wp_element_["createElement"])("li", {
       
 16545     className: "block-editor-block-breadcrumb__current",
 19316     className: "block-editor-block-breadcrumb__current",
 16546     "aria-current": "true"
 19317     "aria-current": "true"
 16547   }, Object(external_this_wp_element_["createElement"])(BlockTitle, {
 19318   }, Object(external_wp_element_["createElement"])(BlockTitle, {
 16548     clientId: clientId
 19319     clientId: clientId
 16549   })))
 19320   })))
 16550   /* eslint-enable jsx-a11y/no-redundant-roles */
 19321   /* eslint-enable jsx-a11y/no-redundant-roles */
 16551   ;
 19322   ;
 16552 }
 19323 }
 16554 /* harmony default export */ var block_breadcrumb = (BlockBreadcrumb);
 19325 /* harmony default export */ var block_breadcrumb = (BlockBreadcrumb);
 16555 
 19326 
 16556 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-context/index.js
 19327 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-context/index.js
 16557 
 19328 
 16558 
 19329 
 16559 
       
 16560 function block_context_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; }
       
 16561 
       
 16562 function block_context_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_context_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 { block_context_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 16563 
       
 16564 /**
 19330 /**
 16565  * WordPress dependencies
 19331  * WordPress dependencies
 16566  */
 19332  */
 16567 
 19333 
 16568 /** @typedef {import('react').ReactNode} ReactNode */
 19334 /** @typedef {import('react').ReactNode} ReactNode */
 16575  * @property {ReactNode}        children Component children.
 19341  * @property {ReactNode}        children Component children.
 16576  */
 19342  */
 16577 
 19343 
 16578 /** @type {import('react').Context<Record<string,*>>} */
 19344 /** @type {import('react').Context<Record<string,*>>} */
 16579 
 19345 
 16580 var block_context_Context = Object(external_this_wp_element_["createContext"])({});
 19346 const block_context_Context = Object(external_wp_element_["createContext"])({});
 16581 /**
 19347 /**
 16582  * Component which merges passed value with current consumed block context.
 19348  * Component which merges passed value with current consumed block context.
 16583  *
 19349  *
 16584  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-context/README.md
 19350  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-context/README.md
 16585  *
 19351  *
 16586  * @param {BlockContextProviderProps} props
 19352  * @param {BlockContextProviderProps} props
 16587  */
 19353  */
 16588 
 19354 
 16589 function BlockContextProvider(_ref) {
 19355 function BlockContextProvider({
 16590   var value = _ref.value,
 19356   value,
 16591       children = _ref.children;
 19357   children
 16592   var context = Object(external_this_wp_element_["useContext"])(block_context_Context);
 19358 }) {
 16593   var nextValue = Object(external_this_wp_element_["useMemo"])(function () {
 19359   const context = Object(external_wp_element_["useContext"])(block_context_Context);
 16594     return block_context_objectSpread({}, context, {}, value);
 19360   const nextValue = Object(external_wp_element_["useMemo"])(() => ({ ...context,
 16595   }, [context, value]);
 19361     ...value
 16596   return Object(external_this_wp_element_["createElement"])(block_context_Context.Provider, {
 19362   }), [context, value]);
       
 19363   return Object(external_wp_element_["createElement"])(block_context_Context.Provider, {
 16597     value: nextValue,
 19364     value: nextValue,
 16598     children: children
 19365     children: children
 16599   });
 19366   });
 16600 }
 19367 }
 16601 /* harmony default export */ var block_context = (block_context_Context);
 19368 /* harmony default export */ var block_context = (block_context_Context);
 16602 
 19369 
 16603 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-style-selector/index.js
 19370 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-style-selector/index.js
 16604 
 19371 
 16605 
 19372 
 16606 
       
 16607 /**
 19373 /**
 16608  * WordPress dependencies
 19374  * WordPress dependencies
 16609  */
 19375  */
 16610 
 19376 
 16611 
 19377 
 16612 
 19378 
 16613 
 19379 
 16614 var color_style_selector_ColorSelectorSVGIcon = function ColorSelectorSVGIcon() {
 19380 const ColorSelectorSVGIcon = () => Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
 16615   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
 19381   xmlns: "https://www.w3.org/2000/svg",
 16616     xmlns: "https://www.w3.org/2000/svg",
 19382   viewBox: "0 0 20 20"
 16617     viewBox: "0 0 20 20"
 19383 }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 16618   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 19384   d: "M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"
 16619     d: "M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"
 19385 }));
 16620   }));
       
 16621 };
       
 16622 /**
 19386 /**
 16623  * Color Selector Icon component.
 19387  * Color Selector Icon component.
 16624  *
 19388  *
 16625  * @param {Object} props           Component properties.
 19389  * @param {Object} props           Component properties.
 16626  * @param {Object} props.style     Style object.
 19390  * @param {Object} props.style     Style object.
 16628  *
 19392  *
 16629  * @return {*} React Icon component.
 19393  * @return {*} React Icon component.
 16630  */
 19394  */
 16631 
 19395 
 16632 
 19396 
 16633 var color_style_selector_ColorSelectorIcon = function ColorSelectorIcon(_ref) {
 19397 const ColorSelectorIcon = ({
 16634   var style = _ref.style,
 19398   style,
 16635       className = _ref.className;
 19399   className
 16636   return Object(external_this_wp_element_["createElement"])("div", {
 19400 }) => {
       
 19401   return Object(external_wp_element_["createElement"])("div", {
 16637     className: "block-library-colors-selector__icon-container"
 19402     className: "block-library-colors-selector__icon-container"
 16638   }, Object(external_this_wp_element_["createElement"])("div", {
 19403   }, Object(external_wp_element_["createElement"])("div", {
 16639     className: "".concat(className, " block-library-colors-selector__state-selection"),
 19404     className: `${className} block-library-colors-selector__state-selection`,
 16640     style: style
 19405     style: style
 16641   }, Object(external_this_wp_element_["createElement"])(color_style_selector_ColorSelectorSVGIcon, null)));
 19406   }, Object(external_wp_element_["createElement"])(ColorSelectorSVGIcon, null)));
 16642 };
 19407 };
 16643 /**
 19408 /**
 16644  * Renders the Colors Selector Toolbar with the icon button.
 19409  * Renders the Colors Selector Toolbar with the icon button.
 16645  *
 19410  *
 16646  * @param {Object} props                 Component properties.
 19411  * @param {Object} props                 Component properties.
 16649  *
 19414  *
 16650  * @return {*} React toggle button component.
 19415  * @return {*} React toggle button component.
 16651  */
 19416  */
 16652 
 19417 
 16653 
 19418 
 16654 var color_style_selector_renderToggleComponent = function renderToggleComponent(_ref2) {
 19419 const renderToggleComponent = ({
 16655   var TextColor = _ref2.TextColor,
 19420   TextColor,
 16656       BackgroundColor = _ref2.BackgroundColor;
 19421   BackgroundColor
 16657   return function (_ref3) {
 19422 }) => ({
 16658     var onToggle = _ref3.onToggle,
 19423   onToggle,
 16659         isOpen = _ref3.isOpen;
 19424   isOpen
 16660 
 19425 }) => {
 16661     var openOnArrowDown = function openOnArrowDown(event) {
 19426   const openOnArrowDown = event => {
 16662       if (!isOpen && event.keyCode === external_this_wp_keycodes_["DOWN"]) {
 19427     if (!isOpen && event.keyCode === external_wp_keycodes_["DOWN"]) {
 16663         event.preventDefault();
 19428       event.preventDefault();
 16664         event.stopPropagation();
 19429       event.stopPropagation();
 16665         onToggle();
 19430       onToggle();
 16666       }
 19431     }
 16667     };
       
 16668 
       
 16669     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
       
 16670       className: "components-toolbar__control block-library-colors-selector__toggle",
       
 16671       label: Object(external_this_wp_i18n_["__"])('Open Colors Selector'),
       
 16672       onClick: onToggle,
       
 16673       onKeyDown: openOnArrowDown,
       
 16674       icon: Object(external_this_wp_element_["createElement"])(BackgroundColor, null, Object(external_this_wp_element_["createElement"])(TextColor, null, Object(external_this_wp_element_["createElement"])(color_style_selector_ColorSelectorIcon, null)))
       
 16675     }));
       
 16676   };
 19432   };
       
 19433 
       
 19434   return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
       
 19435     className: "components-toolbar__control block-library-colors-selector__toggle",
       
 19436     label: Object(external_wp_i18n_["__"])('Open Colors Selector'),
       
 19437     onClick: onToggle,
       
 19438     onKeyDown: openOnArrowDown,
       
 19439     icon: Object(external_wp_element_["createElement"])(BackgroundColor, null, Object(external_wp_element_["createElement"])(TextColor, null, Object(external_wp_element_["createElement"])(ColorSelectorIcon, null)))
       
 19440   }));
 16677 };
 19441 };
 16678 
 19442 
 16679 var color_style_selector_BlockColorsStyleSelector = function BlockColorsStyleSelector(_ref4) {
 19443 const BlockColorsStyleSelector = ({
 16680   var children = _ref4.children,
 19444   children,
 16681       other = Object(objectWithoutProperties["a" /* default */])(_ref4, ["children"]);
 19445   ...other
 16682 
 19446 }) => Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
 16683   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
 19447   position: "bottom right",
 16684     position: "bottom right",
 19448   className: "block-library-colors-selector",
 16685     className: "block-library-colors-selector",
 19449   contentClassName: "block-library-colors-selector__popover",
 16686     contentClassName: "block-library-colors-selector__popover",
 19450   renderToggle: renderToggleComponent(other),
 16687     renderToggle: color_style_selector_renderToggleComponent(other),
 19451   renderContent: () => children
 16688     renderContent: function renderContent() {
 19452 });
 16689       return children;
 19453 
 16690     }
 19454 /* harmony default export */ var color_style_selector = (BlockColorsStyleSelector);
 16691   });
       
 16692 };
       
 16693 
       
 16694 /* harmony default export */ var color_style_selector = (color_style_selector_BlockColorsStyleSelector);
       
 16695 
       
 16696 // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
       
 16697 var external_this_wp_deprecated_ = __webpack_require__(37);
       
 16698 var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
       
 16699 
 19455 
 16700 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/edit.js
 19456 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/edit.js
 16701 
 19457 
 16702 
 19458 
 16703 
 19459 
 16707 
 19463 
 16708 
 19464 
 16709 /**
 19465 /**
 16710  * WordPress dependencies
 19466  * WordPress dependencies
 16711  */
 19467  */
 16712 
       
 16713 
 19468 
 16714 
 19469 
 16715 
 19470 
 16716 
 19471 
 16717 /**
 19472 /**
 16726  * and in order to avoid unnecessary React reconciliations of a changing object.
 19481  * and in order to avoid unnecessary React reconciliations of a changing object.
 16727  *
 19482  *
 16728  * @type {{}}
 19483  * @type {{}}
 16729  */
 19484  */
 16730 
 19485 
 16731 var DEFAULT_BLOCK_CONTEXT = {};
 19486 const DEFAULT_BLOCK_CONTEXT = {};
 16732 var edit_Edit = function Edit(props) {
 19487 const edit_Edit = props => {
 16733   var _props$attributes = props.attributes,
 19488   const {
 16734       attributes = _props$attributes === void 0 ? {} : _props$attributes,
 19489     attributes = {},
 16735       name = props.name;
 19490     name
 16736   var blockType = Object(external_this_wp_blocks_["getBlockType"])(name);
 19491   } = props;
 16737   var blockContext = Object(external_this_wp_element_["useContext"])(block_context); // Assign context values using the block type's declared context needs.
 19492   const blockType = Object(external_wp_blocks_["getBlockType"])(name);
 16738 
 19493   const blockContext = Object(external_wp_element_["useContext"])(block_context); // Assign context values using the block type's declared context needs.
 16739   var context = Object(external_this_wp_element_["useMemo"])(function () {
 19494 
 16740     if (blockType && blockType.context) {
 19495   const context = Object(external_wp_element_["useMemo"])(() => {
 16741       external_this_wp_deprecated_default()('Block type "context" option', {
 19496     return blockType && blockType.usesContext ? Object(external_lodash_["pick"])(blockContext, blockType.usesContext) : DEFAULT_BLOCK_CONTEXT;
 16742         alternative: '"usesContext"',
       
 16743         version: '8.6.0',
       
 16744         hint: "Block \"".concat(name, "\"."),
       
 16745         link: 'https://developer.wordpress.org/block-editor/developers/block-api/block-context/'
       
 16746       });
       
 16747       return Object(external_this_lodash_["pick"])(blockContext, blockType.context);
       
 16748     }
       
 16749 
       
 16750     return blockType && blockType.usesContext ? Object(external_this_lodash_["pick"])(blockContext, blockType.usesContext) : DEFAULT_BLOCK_CONTEXT;
       
 16751   }, [blockType, blockContext]);
 19497   }, [blockType, blockContext]);
 16752 
 19498 
 16753   if (!blockType) {
 19499   if (!blockType) {
 16754     return null;
 19500     return null;
 16755   } // `edit` and `save` are functions or components describing the markup
 19501   } // `edit` and `save` are functions or components describing the markup
 16756   // with which a block is displayed. If `blockType` is valid, assign
 19502   // with which a block is displayed. If `blockType` is valid, assign
 16757   // them preferentially as the render value for the block.
 19503   // them preferentially as the render value for the block.
 16758 
 19504 
 16759 
 19505 
 16760   var Component = blockType.edit || blockType.save;
 19506   const Component = blockType.edit || blockType.save;
 16761   var lightBlockWrapper = Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'lightBlockWrapper', false);
 19507 
 16762 
 19508   if (blockType.apiVersion > 1 || Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'lightBlockWrapper', false)) {
 16763   if (lightBlockWrapper) {
 19509     return Object(external_wp_element_["createElement"])(Component, Object(esm_extends["a" /* default */])({}, props, {
 16764     return Object(external_this_wp_element_["createElement"])(Component, Object(esm_extends["a" /* default */])({}, props, {
       
 16765       context: context
 19510       context: context
 16766     }));
 19511     }));
 16767   } // Generate a class name for the block's editable form
 19512   } // Generate a class name for the block's editable form
 16768 
 19513 
 16769 
 19514 
 16770   var generatedClassName = Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'className', true) ? Object(external_this_wp_blocks_["getBlockDefaultClassName"])(name) : null;
 19515   const generatedClassName = Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'className', true) ? Object(external_wp_blocks_["getBlockDefaultClassName"])(name) : null;
 16771   var className = classnames_default()(generatedClassName, attributes.className);
 19516   const className = classnames_default()(generatedClassName, attributes.className);
 16772   return Object(external_this_wp_element_["createElement"])(Component, Object(esm_extends["a" /* default */])({}, props, {
 19517   return Object(external_wp_element_["createElement"])(Component, Object(esm_extends["a" /* default */])({}, props, {
 16773     context: context,
 19518     context: context,
 16774     className: className
 19519     className: className
 16775   }));
 19520   }));
 16776 };
 19521 };
 16777 /* harmony default export */ var edit = (Object(external_this_wp_components_["withFilters"])('editor.BlockEdit')(edit_Edit));
 19522 /* harmony default export */ var edit = (Object(external_wp_components_["withFilters"])('editor.BlockEdit')(edit_Edit));
 16778 
 19523 
 16779 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/index.js
 19524 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/index.js
 16780 
 19525 
 16781 
 19526 
 16782 /**
 19527 /**
 16789 
 19534 
 16790 
 19535 
 16791 
 19536 
 16792 
 19537 
 16793 function block_edit_BlockEdit(props) {
 19538 function block_edit_BlockEdit(props) {
 16794   var name = props.name,
 19539   const {
 16795       isSelected = props.isSelected,
 19540     name,
 16796       clientId = props.clientId,
 19541     isSelected,
 16797       onFocus = props.onFocus,
 19542     clientId
 16798       onCaretVerticalPositionChange = props.onCaretVerticalPositionChange;
 19543   } = props;
 16799   var context = {
 19544   const context = {
 16800     name: name,
 19545     name,
 16801     isSelected: isSelected,
 19546     isSelected,
 16802     clientId: clientId,
 19547     clientId
 16803     onFocus: onFocus,
       
 16804     onCaretVerticalPositionChange: onCaretVerticalPositionChange
       
 16805   };
 19548   };
 16806   return Object(external_this_wp_element_["createElement"])(Provider // It is important to return the same object if props haven't
 19549   return Object(external_wp_element_["createElement"])(context_Provider // It is important to return the same object if props haven't
 16807   // changed to avoid  unnecessary rerenders.
 19550   // changed to avoid  unnecessary rerenders.
 16808   // See https://reactjs.org/docs/context.html#caveats.
 19551   // See https://reactjs.org/docs/context.html#caveats.
 16809   , {
 19552   , {
 16810     value: Object(external_this_wp_element_["useMemo"])(function () {
 19553     value: Object(external_wp_element_["useMemo"])(() => context, Object.values(context))
 16811       return context;
 19554   }, Object(external_wp_element_["createElement"])(edit, props));
 16812     }, Object.values(context))
 19555 }
 16813   }, Object(external_this_wp_element_["createElement"])(edit, props));
 19556 
 16814 }
 19557 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/list-view.js
 16815 
 19558 var list_view = __webpack_require__("OzlF");
 16816 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-format-controls/index.js
       
 16817 
       
 16818 
       
 16819 
       
 16820 /**
       
 16821  * External dependencies
       
 16822  */
       
 16823 
       
 16824 /**
       
 16825  * WordPress dependencies
       
 16826  */
       
 16827 
       
 16828 
       
 16829 
       
 16830 /**
       
 16831  * Internal dependencies
       
 16832  */
       
 16833 
       
 16834 
       
 16835 
       
 16836 var block_format_controls_createSlotFill = Object(external_this_wp_components_["createSlotFill"])('BlockFormatControls'),
       
 16837     block_format_controls_Fill = block_format_controls_createSlotFill.Fill,
       
 16838     block_format_controls_Slot = block_format_controls_createSlotFill.Slot;
       
 16839 
       
 16840 function BlockFormatControlsSlot(props) {
       
 16841   var accessibleToolbarState = Object(external_this_wp_element_["useContext"])(external_this_wp_components_["__experimentalToolbarContext"]);
       
 16842   return Object(external_this_wp_element_["createElement"])(block_format_controls_Slot, Object(esm_extends["a" /* default */])({}, props, {
       
 16843     fillProps: accessibleToolbarState
       
 16844   }));
       
 16845 }
       
 16846 
       
 16847 function BlockFormatControlsFill(props) {
       
 16848   var _useBlockEditContext = useBlockEditContext(),
       
 16849       isSelected = _useBlockEditContext.isSelected;
       
 16850 
       
 16851   if (!isSelected) {
       
 16852     return null;
       
 16853   }
       
 16854 
       
 16855   return Object(external_this_wp_element_["createElement"])(block_format_controls_Fill, null, function (fillProps) {
       
 16856     var value = !Object(external_this_lodash_["isEmpty"])(fillProps) ? fillProps : null;
       
 16857     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalToolbarContext"].Provider, {
       
 16858       value: value
       
 16859     }, props.children);
       
 16860   });
       
 16861 }
       
 16862 
       
 16863 var BlockFormatControls = BlockFormatControlsFill;
       
 16864 BlockFormatControls.Slot = BlockFormatControlsSlot;
       
 16865 /* harmony default export */ var block_format_controls = (BlockFormatControls);
       
 16866 
       
 16867 // EXTERNAL MODULE: external {"this":"regeneratorRuntime"}
       
 16868 var external_this_regeneratorRuntime_ = __webpack_require__(24);
       
 16869 var external_this_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_this_regeneratorRuntime_);
       
 16870 
       
 16871 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
       
 16872 var asyncToGenerator = __webpack_require__(50);
       
 16873 
 19559 
 16874 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
 19560 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
 16875 var more_vertical = __webpack_require__(296);
 19561 var more_vertical = __webpack_require__("VKE3");
 16876 
 19562 
 16877 // EXTERNAL MODULE: ./node_modules/react-spring/web.cjs.js
 19563 // EXTERNAL MODULE: ./node_modules/react-spring/web.cjs.js
 16878 var web_cjs = __webpack_require__(113);
 19564 var web_cjs = __webpack_require__("ZO3Q");
 16879 
 19565 
 16880 // EXTERNAL MODULE: external {"this":["wp","dom"]}
 19566 // EXTERNAL MODULE: external ["wp","dom"]
 16881 var external_this_wp_dom_ = __webpack_require__(30);
 19567 var external_wp_dom_ = __webpack_require__("1CF3");
 16882 
 19568 
 16883 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-moving-animation/index.js
 19569 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-moving-animation/index.js
 16884 
       
 16885 
       
 16886 /**
 19570 /**
 16887  * External dependencies
 19571  * External dependencies
 16888  */
 19572  */
 16889 
 19573 
 16890 /**
 19574 /**
 16899  *
 19583  *
 16900  * @param {number} state  Previous counter value.
 19584  * @param {number} state  Previous counter value.
 16901  * @return {number} New state value.
 19585  * @return {number} New state value.
 16902  */
 19586  */
 16903 
 19587 
 16904 var counterReducer = function counterReducer(state) {
 19588 const counterReducer = state => state + 1;
 16905   return state + 1;
 19589 
 16906 };
 19590 const getAbsolutePosition = element => {
 16907 
       
 16908 var getAbsolutePosition = function getAbsolutePosition(element) {
       
 16909   return {
 19591   return {
 16910     top: element.offsetTop,
 19592     top: element.offsetTop,
 16911     left: element.offsetLeft
 19593     left: element.offsetLeft
 16912   };
 19594   };
 16913 };
 19595 };
 16920  *    as a destination point for the animation.
 19602  *    as a destination point for the animation.
 16921  *  - It restores the element to the previous position using a CSS transform
 19603  *  - It restores the element to the previous position using a CSS transform
 16922  *  - It uses the "resetAnimation" flag to reset the animation
 19604  *  - It uses the "resetAnimation" flag to reset the animation
 16923  *    from the beginning in order to animate to the new destination point.
 19605  *    from the beginning in order to animate to the new destination point.
 16924  *
 19606  *
 16925  * @param {Object}  ref                      Reference to the element to animate.
 19607  * @param {Object}  $1                          Options
 16926  * @param {boolean} isSelected               Whether it's the current block or not.
 19608  * @param {boolean} $1.isSelected               Whether it's the current block or not.
 16927  * @param {boolean} adjustScrolling          Adjust the scroll position to the current block.
 19609  * @param {boolean} $1.adjustScrolling          Adjust the scroll position to the current block.
 16928  * @param {boolean} enableAnimation          Enable/Disable animation.
 19610  * @param {boolean} $1.enableAnimation          Enable/Disable animation.
 16929  * @param {*}       triggerAnimationOnChange Variable used to trigger the animation if it changes.
 19611  * @param {*}       $1.triggerAnimationOnChange Variable used to trigger the animation if it changes.
 16930  */
 19612  */
 16931 
 19613 
 16932 
 19614 
 16933 function useMovingAnimation(ref, isSelected, adjustScrolling, enableAnimation, triggerAnimationOnChange) {
 19615 function useMovingAnimation({
 16934   var prefersReducedMotion = Object(external_this_wp_compose_["useReducedMotion"])() || !enableAnimation;
 19616   isSelected,
 16935 
 19617   adjustScrolling,
 16936   var _useReducer = Object(external_this_wp_element_["useReducer"])(counterReducer, 0),
 19618   enableAnimation,
 16937       _useReducer2 = Object(slicedToArray["a" /* default */])(_useReducer, 2),
 19619   triggerAnimationOnChange
 16938       triggeredAnimation = _useReducer2[0],
 19620 }) {
 16939       triggerAnimation = _useReducer2[1];
 19621   const ref = Object(external_wp_element_["useRef"])();
 16940 
 19622   const prefersReducedMotion = Object(external_wp_compose_["useReducedMotion"])() || !enableAnimation;
 16941   var _useReducer3 = Object(external_this_wp_element_["useReducer"])(counterReducer, 0),
 19623   const [triggeredAnimation, triggerAnimation] = Object(external_wp_element_["useReducer"])(counterReducer, 0);
 16942       _useReducer4 = Object(slicedToArray["a" /* default */])(_useReducer3, 2),
 19624   const [finishedAnimation, endAnimation] = Object(external_wp_element_["useReducer"])(counterReducer, 0);
 16943       finishedAnimation = _useReducer4[0],
 19625   const [transform, setTransform] = Object(external_wp_element_["useState"])({
 16944       endAnimation = _useReducer4[1];
       
 16945 
       
 16946   var _useState = Object(external_this_wp_element_["useState"])({
       
 16947     x: 0,
 19626     x: 0,
 16948     y: 0
 19627     y: 0
 16949   }),
 19628   });
 16950       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 19629   const previous = Object(external_wp_element_["useMemo"])(() => ref.current ? getAbsolutePosition(ref.current) : null, [triggerAnimationOnChange]); // Calculate the previous position of the block relative to the viewport and
 16951       transform = _useState2[0],
       
 16952       setTransform = _useState2[1];
       
 16953 
       
 16954   var previous = Object(external_this_wp_element_["useMemo"])(function () {
       
 16955     return ref.current ? getAbsolutePosition(ref.current) : null;
       
 16956   }, [triggerAnimationOnChange]); // Calculate the previous position of the block relative to the viewport and
       
 16957   // return a function to maintain that position by scrolling.
 19630   // return a function to maintain that position by scrolling.
 16958 
 19631 
 16959   var preserveScrollPosition = Object(external_this_wp_element_["useMemo"])(function () {
 19632   const preserveScrollPosition = Object(external_wp_element_["useMemo"])(() => {
 16960     if (!adjustScrolling || !ref.current) {
 19633     if (!adjustScrolling || !ref.current) {
 16961       return function () {};
 19634       return () => {};
 16962     }
 19635     }
 16963 
 19636 
 16964     var scrollContainer = Object(external_this_wp_dom_["getScrollContainer"])(ref.current);
 19637     const scrollContainer = Object(external_wp_dom_["getScrollContainer"])(ref.current);
 16965 
 19638 
 16966     if (!scrollContainer) {
 19639     if (!scrollContainer) {
 16967       return function () {};
 19640       return () => {};
 16968     }
 19641     }
 16969 
 19642 
 16970     var prevRect = ref.current.getBoundingClientRect();
 19643     const prevRect = ref.current.getBoundingClientRect();
 16971     return function () {
 19644     return () => {
 16972       var blockRect = ref.current.getBoundingClientRect();
 19645       const blockRect = ref.current.getBoundingClientRect();
 16973       var diff = blockRect.top - prevRect.top;
 19646       const diff = blockRect.top - prevRect.top;
 16974 
 19647 
 16975       if (diff) {
 19648       if (diff) {
 16976         scrollContainer.scrollTop += diff;
 19649         scrollContainer.scrollTop += diff;
 16977       }
 19650       }
 16978     };
 19651     };
 16979   }, [triggerAnimationOnChange, adjustScrolling]);
 19652   }, [triggerAnimationOnChange, adjustScrolling]);
 16980   Object(external_this_wp_element_["useLayoutEffect"])(function () {
 19653   Object(external_wp_element_["useLayoutEffect"])(() => {
 16981     if (triggeredAnimation) {
 19654     if (triggeredAnimation) {
 16982       endAnimation();
 19655       endAnimation();
 16983     }
 19656     }
 16984   }, [triggeredAnimation]);
 19657   }, [triggeredAnimation]);
 16985   Object(external_this_wp_element_["useLayoutEffect"])(function () {
 19658   Object(external_wp_element_["useLayoutEffect"])(() => {
 16986     if (!previous) {
 19659     if (!previous) {
 16987       return;
 19660       return;
 16988     }
 19661     }
 16989 
 19662 
 16990     if (prefersReducedMotion) {
 19663     if (prefersReducedMotion) {
 16993       preserveScrollPosition();
 19666       preserveScrollPosition();
 16994       return;
 19667       return;
 16995     }
 19668     }
 16996 
 19669 
 16997     ref.current.style.transform = '';
 19670     ref.current.style.transform = '';
 16998     var destination = getAbsolutePosition(ref.current);
 19671     const destination = getAbsolutePosition(ref.current);
 16999     triggerAnimation();
 19672     triggerAnimation();
 17000     setTransform({
 19673     setTransform({
 17001       x: Math.round(previous.left - destination.left),
 19674       x: Math.round(previous.left - destination.left),
 17002       y: Math.round(previous.top - destination.top)
 19675       y: Math.round(previous.top - destination.top)
 17003     });
 19676     });
 17004   }, [triggerAnimationOnChange]); // Only called when either the x or y value changes.
 19677   }, [triggerAnimationOnChange]); // Only called when either the x or y value changes.
 17005 
 19678 
 17006   function onFrameChange(_ref) {
 19679   function onFrameChange({
 17007     var x = _ref.x,
 19680     x,
 17008         y = _ref.y;
 19681     y
 17009 
 19682   }) {
 17010     if (!ref.current) {
 19683     if (!ref.current) {
 17011       return;
 19684       return;
 17012     }
 19685     }
 17013 
 19686 
 17014     var isMoving = x === 0 && y === 0;
 19687     const isMoving = x === 0 && y === 0;
 17015     ref.current.style.transformOrigin = isMoving ? '' : 'center';
 19688     ref.current.style.transformOrigin = isMoving ? '' : 'center';
 17016     ref.current.style.transform = isMoving ? '' : "translate3d(".concat(x, "px,").concat(y, "px,0)");
 19689     ref.current.style.transform = isMoving ? '' : `translate3d(${x}px,${y}px,0)`;
 17017     ref.current.style.zIndex = !isSelected || isMoving ? '' : '1';
 19690     ref.current.style.zIndex = !isSelected || isMoving ? '' : '1';
 17018     preserveScrollPosition();
 19691     preserveScrollPosition();
 17019   } // Called for every frame computed by useSpring.
 19692   } // Called for every frame computed by useSpring.
 17020 
 19693 
 17021 
 19694 
 17022   function onFrame(_ref2) {
 19695   function onFrame({
 17023     var x = _ref2.x,
 19696     x,
 17024         y = _ref2.y;
 19697     y
       
 19698   }) {
 17025     x = Math.round(x);
 19699     x = Math.round(x);
 17026     y = Math.round(y);
 19700     y = Math.round(y);
 17027 
 19701 
 17028     if (x !== onFrame.x || y !== onFrame.y) {
 19702     if (x !== onFrame.x || y !== onFrame.y) {
 17029       onFrameChange({
 19703       onFrameChange({
 17030         x: x,
 19704         x,
 17031         y: y
 19705         y
 17032       });
 19706       });
 17033       onFrame.x = x;
 19707       onFrame.x = x;
 17034       onFrame.y = y;
 19708       onFrame.y = y;
 17035     }
 19709     }
 17036   }
 19710   }
 17051       mass: 5,
 19725       mass: 5,
 17052       tension: 2000,
 19726       tension: 2000,
 17053       friction: 200
 19727       friction: 200
 17054     },
 19728     },
 17055     immediate: prefersReducedMotion,
 19729     immediate: prefersReducedMotion,
 17056     onFrame: onFrame
 19730     onFrame
 17057   });
 19731   });
       
 19732   return ref;
 17058 }
 19733 }
 17059 
 19734 
 17060 /* harmony default export */ var use_moving_animation = (useMovingAnimation);
 19735 /* harmony default export */ var use_moving_animation = (useMovingAnimation);
 17061 
 19736 
 17062 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/leaf.js
 19737 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/leaf.js
 17063 
 19738 
 17064 
 19739 
 17065 
 19740 
 17066 
       
 17067 /**
 19741 /**
 17068  * External dependencies
 19742  * External dependencies
 17069  */
 19743  */
 17070 
 19744 
 17071 
 19745 
 17072 /**
 19746 /**
 17073  * WordPress dependencies
 19747  * WordPress dependencies
 17074  */
 19748  */
 17075 
 19749 
 17076 
 19750 
 17077 
       
 17078 /**
 19751 /**
 17079  * Internal dependencies
 19752  * Internal dependencies
 17080  */
 19753  */
 17081 
 19754 
 17082 
 19755 
 17083 var AnimatedTreeGridRow = Object(web_cjs["animated"])(external_this_wp_components_["__experimentalTreeGridRow"]);
 19756 const AnimatedTreeGridRow = Object(web_cjs["animated"])(external_wp_components_["__experimentalTreeGridRow"]);
 17084 function BlockNavigationLeaf(_ref) {
 19757 function BlockNavigationLeaf({
 17085   var isSelected = _ref.isSelected,
 19758   isSelected,
 17086       position = _ref.position,
 19759   position,
 17087       level = _ref.level,
 19760   level,
 17088       rowCount = _ref.rowCount,
 19761   rowCount,
 17089       children = _ref.children,
 19762   children,
 17090       className = _ref.className,
 19763   className,
 17091       path = _ref.path,
 19764   path,
 17092       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isSelected", "position", "level", "rowCount", "children", "className", "path"]);
 19765   ...props
 17093 
 19766 }) {
 17094   var wrapper = Object(external_this_wp_element_["useRef"])(null);
 19767   const ref = use_moving_animation({
 17095   var adjustScrolling = false;
 19768     isSelected,
 17096   var enableAnimation = true;
 19769     adjustScrolling: false,
 17097   var animateOnChange = path.join('_');
 19770     enableAnimation: true,
 17098   var style = use_moving_animation(wrapper, isSelected, adjustScrolling, enableAnimation, animateOnChange);
 19771     triggerAnimationOnChange: path.join('_')
 17099   return Object(external_this_wp_element_["createElement"])(AnimatedTreeGridRow, Object(esm_extends["a" /* default */])({
 19772   });
 17100     ref: wrapper,
 19773   return Object(external_wp_element_["createElement"])(AnimatedTreeGridRow, Object(esm_extends["a" /* default */])({
 17101     style: style,
 19774     ref: ref,
 17102     className: classnames_default()('block-editor-block-navigation-leaf', className),
 19775     className: classnames_default()('block-editor-block-navigation-leaf', className),
 17103     level: level,
 19776     level: level,
 17104     positionInSet: position,
 19777     positionInSet: position,
 17105     setSize: rowCount
 19778     setSize: rowCount
 17106   }, props), children);
 19779   }, props), children);
 17107 }
 19780 }
 17108 
 19781 
 17109 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
 19782 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
 17110 var chevron_right = __webpack_require__(292);
 19783 var chevron_right = __webpack_require__("1iEr");
 17111 
 19784 
 17112 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
 19785 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
 17113 var chevron_left = __webpack_require__(293);
 19786 var chevron_left = __webpack_require__("2gm7");
 17114 
 19787 
 17115 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
 19788 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
 17116 var chevron_up = __webpack_require__(294);
 19789 var chevron_up = __webpack_require__("XgzB");
 17117 
 19790 
 17118 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
 19791 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
 17119 var chevron_down = __webpack_require__(295);
 19792 var chevron_down = __webpack_require__("NWDH");
 17120 
 19793 
 17121 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/mover-description.js
 19794 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/mover-description.js
 17122 /**
 19795 /**
 17123  * WordPress dependencies
 19796  * WordPress dependencies
 17124  */
 19797  */
 17134  * @param {boolean} isLast        This is the last block.
 19807  * @param {boolean} isLast        This is the last block.
 17135  * @param {number}  dir           Direction of movement (> 0 is considered to be going
 19808  * @param {number}  dir           Direction of movement (> 0 is considered to be going
 17136  *                                 down, < 0 is up).
 19809  *                                 down, < 0 is up).
 17137  * @param {string}  orientation   The orientation of the block movers, vertical or
 19810  * @param {string}  orientation   The orientation of the block movers, vertical or
 17138  * 								   horizontal.
 19811  * 								   horizontal.
 17139  * @param {boolean} isRTL   	  True if current writing system is right to left.
       
 17140  *
 19812  *
 17141  * @return {string} Label for the block movement controls.
 19813  * @return {string} Label for the block movement controls.
 17142  */
 19814  */
 17143 
 19815 
 17144 function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLast, dir, orientation, isRTL) {
 19816 function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLast, dir, orientation) {
 17145   var position = firstIndex + 1;
 19817   const position = firstIndex + 1;
 17146 
 19818 
 17147   var getMovementDirection = function getMovementDirection(moveDirection) {
 19819   const getMovementDirection = moveDirection => {
 17148     if (moveDirection === 'up') {
 19820     if (moveDirection === 'up') {
 17149       if (orientation === 'horizontal') {
 19821       if (orientation === 'horizontal') {
 17150         return isRTL ? 'right' : 'left';
 19822         return Object(external_wp_i18n_["isRTL"])() ? 'right' : 'left';
 17151       }
 19823       }
 17152 
 19824 
 17153       return 'up';
 19825       return 'up';
 17154     } else if (moveDirection === 'down') {
 19826     } else if (moveDirection === 'down') {
 17155       if (orientation === 'horizontal') {
 19827       if (orientation === 'horizontal') {
 17156         return isRTL ? 'left' : 'right';
 19828         return Object(external_wp_i18n_["isRTL"])() ? 'left' : 'right';
 17157       }
 19829       }
 17158 
 19830 
 17159       return 'down';
 19831       return 'down';
 17160     }
 19832     }
 17161 
 19833 
 17165   if (selectedCount > 1) {
 19837   if (selectedCount > 1) {
 17166     return getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir);
 19838     return getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir);
 17167   }
 19839   }
 17168 
 19840 
 17169   if (isFirst && isLast) {
 19841   if (isFirst && isLast) {
 17170     return Object(external_this_wp_i18n_["sprintf"])( // translators: %s: Type of block (i.e. Text, Image etc)
 19842     return Object(external_wp_i18n_["sprintf"])( // translators: %s: Type of block (i.e. Text, Image etc)
 17171     Object(external_this_wp_i18n_["__"])('Block %s is the only block, and cannot be moved'), type);
 19843     Object(external_wp_i18n_["__"])('Block %s is the only block, and cannot be moved'), type);
 17172   }
 19844   }
 17173 
 19845 
 17174   if (dir > 0 && !isLast) {
 19846   if (dir > 0 && !isLast) {
 17175     // moving down
 19847     // moving down
 17176     var movementDirection = getMovementDirection('down');
 19848     const movementDirection = getMovementDirection('down');
 17177 
 19849 
 17178     if (movementDirection === 'down') {
 19850     if (movementDirection === 'down') {
 17179       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 19851       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 17180       Object(external_this_wp_i18n_["__"])('Move %1$s block from position %2$d down to position %3$d'), type, position, position + 1);
 19852       Object(external_wp_i18n_["__"])('Move %1$s block from position %2$d down to position %3$d'), type, position, position + 1);
 17181     }
 19853     }
 17182 
 19854 
 17183     if (movementDirection === 'left') {
 19855     if (movementDirection === 'left') {
 17184       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 19856       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 17185       Object(external_this_wp_i18n_["__"])('Move %1$s block from position %2$d left to position %3$d'), type, position, position + 1);
 19857       Object(external_wp_i18n_["__"])('Move %1$s block from position %2$d left to position %3$d'), type, position, position + 1);
 17186     }
 19858     }
 17187 
 19859 
 17188     if (movementDirection === 'right') {
 19860     if (movementDirection === 'right') {
 17189       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 19861       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 17190       Object(external_this_wp_i18n_["__"])('Move %1$s block from position %2$d right to position %3$d'), type, position, position + 1);
 19862       Object(external_wp_i18n_["__"])('Move %1$s block from position %2$d right to position %3$d'), type, position, position + 1);
 17191     }
 19863     }
 17192   }
 19864   }
 17193 
 19865 
 17194   if (dir > 0 && isLast) {
 19866   if (dir > 0 && isLast) {
 17195     // moving down, and is the last item
 19867     // moving down, and is the last item
 17196     var _movementDirection = getMovementDirection('down');
 19868     const movementDirection = getMovementDirection('down');
 17197 
 19869 
 17198     if (_movementDirection === 'down') {
 19870     if (movementDirection === 'down') {
 17199       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 19871       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 17200       Object(external_this_wp_i18n_["__"])('Block %1$s is at the end of the content and can’t be moved down'), type);
 19872       Object(external_wp_i18n_["__"])('Block %1$s is at the end of the content and can’t be moved down'), type);
 17201     }
 19873     }
 17202 
 19874 
 17203     if (_movementDirection === 'left') {
 19875     if (movementDirection === 'left') {
 17204       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 19876       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 17205       Object(external_this_wp_i18n_["__"])('Block %1$s is at the end of the content and can’t be moved left'), type);
 19877       Object(external_wp_i18n_["__"])('Block %1$s is at the end of the content and can’t be moved left'), type);
 17206     }
 19878     }
 17207 
 19879 
 17208     if (_movementDirection === 'right') {
 19880     if (movementDirection === 'right') {
 17209       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 19881       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 17210       Object(external_this_wp_i18n_["__"])('Block %1$s is at the end of the content and can’t be moved right'), type);
 19882       Object(external_wp_i18n_["__"])('Block %1$s is at the end of the content and can’t be moved right'), type);
 17211     }
 19883     }
 17212   }
 19884   }
 17213 
 19885 
 17214   if (dir < 0 && !isFirst) {
 19886   if (dir < 0 && !isFirst) {
 17215     // moving up
 19887     // moving up
 17216     var _movementDirection2 = getMovementDirection('up');
 19888     const movementDirection = getMovementDirection('up');
 17217 
 19889 
 17218     if (_movementDirection2 === 'up') {
 19890     if (movementDirection === 'up') {
 17219       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 19891       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 17220       Object(external_this_wp_i18n_["__"])('Move %1$s block from position %2$d up to position %3$d'), type, position, position - 1);
 19892       Object(external_wp_i18n_["__"])('Move %1$s block from position %2$d up to position %3$d'), type, position, position - 1);
 17221     }
 19893     }
 17222 
 19894 
 17223     if (_movementDirection2 === 'left') {
 19895     if (movementDirection === 'left') {
 17224       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 19896       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 17225       Object(external_this_wp_i18n_["__"])('Move %1$s block from position %2$d left to position %3$d'), type, position, position - 1);
 19897       Object(external_wp_i18n_["__"])('Move %1$s block from position %2$d left to position %3$d'), type, position, position - 1);
 17226     }
 19898     }
 17227 
 19899 
 17228     if (_movementDirection2 === 'right') {
 19900     if (movementDirection === 'right') {
 17229       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 19901       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
 17230       Object(external_this_wp_i18n_["__"])('Move %1$s block from position %2$d right to position %3$d'), type, position, position - 1);
 19902       Object(external_wp_i18n_["__"])('Move %1$s block from position %2$d right to position %3$d'), type, position, position - 1);
 17231     }
 19903     }
 17232   }
 19904   }
 17233 
 19905 
 17234   if (dir < 0 && isFirst) {
 19906   if (dir < 0 && isFirst) {
 17235     // moving up, and is the first item
 19907     // moving up, and is the first item
 17236     var _movementDirection3 = getMovementDirection('up');
 19908     const movementDirection = getMovementDirection('up');
 17237 
 19909 
 17238     if (_movementDirection3 === 'up') {
 19910     if (movementDirection === 'up') {
 17239       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 19911       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 17240       Object(external_this_wp_i18n_["__"])('Block %1$s is at the beginning of the content and can’t be moved up'), type);
 19912       Object(external_wp_i18n_["__"])('Block %1$s is at the beginning of the content and can’t be moved up'), type);
 17241     }
 19913     }
 17242 
 19914 
 17243     if (_movementDirection3 === 'left') {
 19915     if (movementDirection === 'left') {
 17244       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 19916       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 17245       Object(external_this_wp_i18n_["__"])('Block %1$s is at the beginning of the content and can’t be moved left'), type);
 19917       Object(external_wp_i18n_["__"])('Block %1$s is at the beginning of the content and can’t be moved left'), type);
 17246     }
 19918     }
 17247 
 19919 
 17248     if (_movementDirection3 === 'right') {
 19920     if (movementDirection === 'right') {
 17249       return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 19921       return Object(external_wp_i18n_["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc)
 17250       Object(external_this_wp_i18n_["__"])('Block %1$s is at the beginning of the content and can’t be moved right'), type);
 19922       Object(external_wp_i18n_["__"])('Block %1$s is at the beginning of the content and can’t be moved right'), type);
 17251     }
 19923     }
 17252   }
 19924   }
 17253 }
 19925 }
 17254 /**
 19926 /**
 17255  * Return a label for the block movement controls depending on block position.
 19927  * Return a label for the block movement controls depending on block position.
 17263  *
 19935  *
 17264  * @return {string} Label for the block movement controls.
 19936  * @return {string} Label for the block movement controls.
 17265  */
 19937  */
 17266 
 19938 
 17267 function getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir) {
 19939 function getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir) {
 17268   var position = firstIndex + 1;
 19940   const position = firstIndex + 1;
 17269 
 19941 
 17270   if (dir < 0 && isFirst) {
 19942   if (dir < 0 && isFirst) {
 17271     return Object(external_this_wp_i18n_["__"])('Blocks cannot be moved up as they are already at the top');
 19943     return Object(external_wp_i18n_["__"])('Blocks cannot be moved up as they are already at the top');
 17272   }
 19944   }
 17273 
 19945 
 17274   if (dir > 0 && isLast) {
 19946   if (dir > 0 && isLast) {
 17275     return Object(external_this_wp_i18n_["__"])('Blocks cannot be moved down as they are already at the bottom');
 19947     return Object(external_wp_i18n_["__"])('Blocks cannot be moved down as they are already at the bottom');
 17276   }
 19948   }
 17277 
 19949 
 17278   if (dir < 0 && !isFirst) {
 19950   if (dir < 0 && !isFirst) {
 17279     return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Number of selected blocks, 2: Position of selected blocks
 19951     return Object(external_wp_i18n_["sprintf"])( // translators: 1: Number of selected blocks, 2: Position of selected blocks
 17280     Object(external_this_wp_i18n_["_n"])('Move %1$d block from position %2$d up by one place', 'Move %1$d blocks from position %2$d up by one place', selectedCount), selectedCount, position);
 19952     Object(external_wp_i18n_["_n"])('Move %1$d block from position %2$d up by one place', 'Move %1$d blocks from position %2$d up by one place', selectedCount), selectedCount, position);
 17281   }
 19953   }
 17282 
 19954 
 17283   if (dir > 0 && !isLast) {
 19955   if (dir > 0 && !isLast) {
 17284     return Object(external_this_wp_i18n_["sprintf"])( // translators: 1: Number of selected blocks, 2: Position of selected blocks
 19956     return Object(external_wp_i18n_["sprintf"])( // translators: 1: Number of selected blocks, 2: Position of selected blocks
 17285     Object(external_this_wp_i18n_["_n"])('Move %1$d block from position %2$d down by one place', 'Move %1$d blocks from position %2$d down by one place', selectedCount), selectedCount, position);
 19957     Object(external_wp_i18n_["_n"])('Move %1$d block from position %2$d down by one place', 'Move %1$d blocks from position %2$d down by one place', selectedCount), selectedCount, position);
 17286   }
 19958   }
 17287 }
 19959 }
 17288 
 19960 
 17289 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/button.js
 19961 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/button.js
 17290 
 19962 
 17291 
 19963 
 17292 
 19964 
 17293 
       
 17294 /**
 19965 /**
 17295  * External dependencies
 19966  * External dependencies
 17296  */
 19967  */
 17297 
 19968 
 17298 
 19969 
 17311  */
 19982  */
 17312 
 19983 
 17313 
 19984 
 17314 
 19985 
 17315 
 19986 
 17316 var button_getArrowIcon = function getArrowIcon(direction, orientation, isRTL) {
 19987 
       
 19988 const getArrowIcon = (direction, orientation) => {
 17317   if (direction === 'up') {
 19989   if (direction === 'up') {
 17318     if (orientation === 'horizontal') {
 19990     if (orientation === 'horizontal') {
 17319       return isRTL ? chevron_right["a" /* default */] : chevron_left["a" /* default */];
 19991       return Object(external_wp_i18n_["isRTL"])() ? chevron_right["a" /* default */] : chevron_left["a" /* default */];
 17320     }
 19992     }
 17321 
 19993 
 17322     return chevron_up["a" /* default */];
 19994     return chevron_up["a" /* default */];
 17323   } else if (direction === 'down') {
 19995   } else if (direction === 'down') {
 17324     if (orientation === 'horizontal') {
 19996     if (orientation === 'horizontal') {
 17325       return isRTL ? chevron_left["a" /* default */] : chevron_right["a" /* default */];
 19997       return Object(external_wp_i18n_["isRTL"])() ? chevron_left["a" /* default */] : chevron_right["a" /* default */];
 17326     }
 19998     }
 17327 
 19999 
 17328     return chevron_down["a" /* default */];
 20000     return chevron_down["a" /* default */];
 17329   }
 20001   }
 17330 
 20002 
 17331   return null;
 20003   return null;
 17332 };
 20004 };
 17333 
 20005 
 17334 var button_getMovementDirectionLabel = function getMovementDirectionLabel(moveDirection, orientation, isRTL) {
 20006 const getMovementDirectionLabel = (moveDirection, orientation) => {
 17335   if (moveDirection === 'up') {
 20007   if (moveDirection === 'up') {
 17336     if (orientation === 'horizontal') {
 20008     if (orientation === 'horizontal') {
 17337       return isRTL ? Object(external_this_wp_i18n_["__"])('Move right') : Object(external_this_wp_i18n_["__"])('Move left');
 20009       return Object(external_wp_i18n_["isRTL"])() ? Object(external_wp_i18n_["__"])('Move right') : Object(external_wp_i18n_["__"])('Move left');
 17338     }
 20010     }
 17339 
 20011 
 17340     return Object(external_this_wp_i18n_["__"])('Move up');
 20012     return Object(external_wp_i18n_["__"])('Move up');
 17341   } else if (moveDirection === 'down') {
 20013   } else if (moveDirection === 'down') {
 17342     if (orientation === 'horizontal') {
 20014     if (orientation === 'horizontal') {
 17343       return isRTL ? Object(external_this_wp_i18n_["__"])('Move left') : Object(external_this_wp_i18n_["__"])('Move right');
 20015       return Object(external_wp_i18n_["isRTL"])() ? Object(external_wp_i18n_["__"])('Move left') : Object(external_wp_i18n_["__"])('Move right');
 17344     }
 20016     }
 17345 
 20017 
 17346     return Object(external_this_wp_i18n_["__"])('Move down');
 20018     return Object(external_wp_i18n_["__"])('Move down');
 17347   }
 20019   }
 17348 
 20020 
 17349   return null;
 20021   return null;
 17350 };
 20022 };
 17351 
 20023 
 17352 var BlockMoverButton = Object(external_this_wp_element_["forwardRef"])(function (_ref, ref) {
 20024 const BlockMoverButton = Object(external_wp_element_["forwardRef"])(({
 17353   var clientIds = _ref.clientIds,
 20025   clientIds,
 17354       direction = _ref.direction,
 20026   direction,
 17355       moverOrientation = _ref.orientation,
 20027   orientation: moverOrientation,
 17356       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["clientIds", "direction", "orientation"]);
 20028   ...props
 17357 
 20029 }, ref) => {
 17358   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(BlockMoverButton);
 20030   const instanceId = Object(external_wp_compose_["useInstanceId"])(BlockMoverButton);
 17359   var blocksCount = Object(external_this_lodash_["castArray"])(clientIds).length;
 20031   const blocksCount = Object(external_lodash_["castArray"])(clientIds).length;
 17360 
 20032   const {
 17361   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 20033     blockType,
 17362     var _select = select('core/block-editor'),
 20034     isDisabled,
 17363         getBlockIndex = _select.getBlockIndex,
 20035     rootClientId,
 17364         getBlockRootClientId = _select.getBlockRootClientId,
 20036     isFirst,
 17365         getBlockOrder = _select.getBlockOrder,
 20037     isLast,
 17366         getBlock = _select.getBlock,
 20038     firstIndex,
 17367         getSettings = _select.getSettings,
 20039     orientation = 'vertical'
 17368         getBlockListSettings = _select.getBlockListSettings;
 20040   } = Object(external_wp_data_["useSelect"])(select => {
 17369 
 20041     const {
 17370     var normalizedClientIds = Object(external_this_lodash_["castArray"])(clientIds);
 20042       getBlockIndex,
 17371     var firstClientId = Object(external_this_lodash_["first"])(normalizedClientIds);
 20043       getBlockRootClientId,
 17372     var blockRootClientId = getBlockRootClientId(firstClientId);
 20044       getBlockOrder,
 17373     var firstBlockIndex = getBlockIndex(firstClientId, blockRootClientId);
 20045       getBlock,
 17374     var lastBlockIndex = getBlockIndex(Object(external_this_lodash_["last"])(normalizedClientIds), blockRootClientId);
 20046       getBlockListSettings
 17375     var blockOrder = getBlockOrder(blockRootClientId);
 20047     } = select(store);
 17376     var block = getBlock(firstClientId);
 20048     const normalizedClientIds = Object(external_lodash_["castArray"])(clientIds);
 17377     var isFirstBlock = firstBlockIndex === 0;
 20049     const firstClientId = Object(external_lodash_["first"])(normalizedClientIds);
 17378     var isLastBlock = lastBlockIndex === blockOrder.length - 1;
 20050     const blockRootClientId = getBlockRootClientId(firstClientId);
 17379 
 20051     const firstBlockIndex = getBlockIndex(firstClientId, blockRootClientId);
 17380     var _ref2 = getBlockListSettings(blockRootClientId) || {},
 20052     const lastBlockIndex = getBlockIndex(Object(external_lodash_["last"])(normalizedClientIds), blockRootClientId);
 17381         blockListOrientation = _ref2.orientation;
 20053     const blockOrder = getBlockOrder(blockRootClientId);
 17382 
 20054     const block = getBlock(firstClientId);
       
 20055     const isFirstBlock = firstBlockIndex === 0;
       
 20056     const isLastBlock = lastBlockIndex === blockOrder.length - 1;
       
 20057     const {
       
 20058       orientation: blockListOrientation
       
 20059     } = getBlockListSettings(blockRootClientId) || {};
 17383     return {
 20060     return {
 17384       blockType: block ? Object(external_this_wp_blocks_["getBlockType"])(block.name) : null,
 20061       blockType: block ? Object(external_wp_blocks_["getBlockType"])(block.name) : null,
 17385       isDisabled: direction === 'up' ? isFirstBlock : isLastBlock,
 20062       isDisabled: direction === 'up' ? isFirstBlock : isLastBlock,
 17386       rootClientId: blockRootClientId,
 20063       rootClientId: blockRootClientId,
 17387       firstIndex: firstBlockIndex,
 20064       firstIndex: firstBlockIndex,
 17388       isFirst: isFirstBlock,
 20065       isFirst: isFirstBlock,
 17389       isLast: isLastBlock,
 20066       isLast: isLastBlock,
 17390       isRTL: getSettings().isRTL,
       
 17391       orientation: moverOrientation || blockListOrientation
 20067       orientation: moverOrientation || blockListOrientation
 17392     };
 20068     };
 17393   }, [clientIds, direction]),
 20069   }, [clientIds, direction]);
 17394       blockType = _useSelect.blockType,
 20070   const {
 17395       isDisabled = _useSelect.isDisabled,
 20071     moveBlocksDown,
 17396       rootClientId = _useSelect.rootClientId,
 20072     moveBlocksUp
 17397       isFirst = _useSelect.isFirst,
 20073   } = Object(external_wp_data_["useDispatch"])(store);
 17398       isLast = _useSelect.isLast,
 20074   const moverFunction = direction === 'up' ? moveBlocksUp : moveBlocksDown;
 17399       firstIndex = _useSelect.firstIndex,
 20075 
 17400       isRTL = _useSelect.isRTL,
 20076   const onClick = event => {
 17401       _useSelect$orientatio = _useSelect.orientation,
       
 17402       orientation = _useSelect$orientatio === void 0 ? 'vertical' : _useSelect$orientatio;
       
 17403 
       
 17404   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 17405       moveBlocksDown = _useDispatch.moveBlocksDown,
       
 17406       moveBlocksUp = _useDispatch.moveBlocksUp;
       
 17407 
       
 17408   var moverFunction = direction === 'up' ? moveBlocksUp : moveBlocksDown;
       
 17409 
       
 17410   var onClick = function onClick(event) {
       
 17411     moverFunction(clientIds, rootClientId);
 20077     moverFunction(clientIds, rootClientId);
 17412 
 20078 
 17413     if (props.onClick) {
 20079     if (props.onClick) {
 17414       props.onClick(event);
 20080       props.onClick(event);
 17415     }
 20081     }
 17416   };
 20082   };
 17417 
 20083 
 17418   var descriptionId = "block-editor-block-mover-button__description-".concat(instanceId);
 20084   const descriptionId = `block-editor-block-mover-button__description-${instanceId}`;
 17419   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({
 20085   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({
 17420     ref: ref,
 20086     ref: ref,
 17421     className: classnames_default()('block-editor-block-mover-button', "is-".concat(direction, "-button")),
 20087     className: classnames_default()('block-editor-block-mover-button', `is-${direction}-button`),
 17422     icon: button_getArrowIcon(direction, orientation, isRTL),
 20088     icon: getArrowIcon(direction, orientation),
 17423     label: button_getMovementDirectionLabel(direction, orientation, isRTL),
 20089     label: getMovementDirectionLabel(direction, orientation),
 17424     "aria-describedby": descriptionId
 20090     "aria-describedby": descriptionId
 17425   }, props, {
 20091   }, props, {
 17426     onClick: isDisabled ? null : onClick,
 20092     onClick: isDisabled ? null : onClick,
 17427     "aria-disabled": isDisabled
 20093     "aria-disabled": isDisabled
 17428   })), Object(external_this_wp_element_["createElement"])("span", {
 20094   })), Object(external_wp_element_["createElement"])("span", {
 17429     id: descriptionId,
 20095     id: descriptionId,
 17430     className: "block-editor-block-mover-button__description"
 20096     className: "block-editor-block-mover-button__description"
 17431   }, getBlockMoverDescription(blocksCount, blockType && blockType.title, firstIndex, isFirst, isLast, direction === 'up' ? -1 : 1, orientation, isRTL)));
 20097   }, getBlockMoverDescription(blocksCount, blockType && blockType.title, firstIndex, isFirst, isLast, direction === 'up' ? -1 : 1, orientation)));
 17432 });
 20098 });
 17433 var BlockMoverUpButton = Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
 20099 const BlockMoverUpButton = Object(external_wp_element_["forwardRef"])((props, ref) => {
 17434   return Object(external_this_wp_element_["createElement"])(BlockMoverButton, Object(esm_extends["a" /* default */])({
 20100   return Object(external_wp_element_["createElement"])(BlockMoverButton, Object(esm_extends["a" /* default */])({
 17435     direction: "up",
 20101     direction: "up",
 17436     ref: ref
 20102     ref: ref
 17437   }, props));
 20103   }, props));
 17438 });
 20104 });
 17439 var BlockMoverDownButton = Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
 20105 const BlockMoverDownButton = Object(external_wp_element_["forwardRef"])((props, ref) => {
 17440   return Object(external_this_wp_element_["createElement"])(BlockMoverButton, Object(esm_extends["a" /* default */])({
 20106   return Object(external_wp_element_["createElement"])(BlockMoverButton, Object(esm_extends["a" /* default */])({
 17441     direction: "down",
 20107     direction: "down",
 17442     ref: ref
 20108     ref: ref
 17443   }, props));
 20109   }, props));
 17444 });
 20110 });
 17445 
 20111 
 17446 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/descender-lines.js
       
 17447 
       
 17448 
       
 17449 /**
       
 17450  * External dependencies
       
 17451  */
       
 17452 
       
 17453 
       
 17454 var lineClassName = 'block-editor-block-navigator-descender-line';
       
 17455 function DescenderLines(_ref) {
       
 17456   var level = _ref.level,
       
 17457       isLastRow = _ref.isLastRow,
       
 17458       terminatedLevels = _ref.terminatedLevels;
       
 17459   return Object(external_this_lodash_["times"])(level - 1, function (index) {
       
 17460     // The first 'level' that has a descender line is level 2.
       
 17461     // Add 2 to the zero-based index below to reflect that.
       
 17462     var currentLevel = index + 2;
       
 17463     var hasItem = currentLevel === level;
       
 17464     return Object(external_this_wp_element_["createElement"])("div", {
       
 17465       key: index,
       
 17466       "aria-hidden": "true",
       
 17467       className: classnames_default()(lineClassName, {
       
 17468         'has-item': hasItem,
       
 17469         'is-last-row': isLastRow,
       
 17470         'is-terminated': terminatedLevels.includes(currentLevel)
       
 17471       })
       
 17472     });
       
 17473   });
       
 17474 }
       
 17475 
       
 17476 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/context.js
 20112 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/context.js
 17477 /**
 20113 /**
 17478  * WordPress dependencies
 20114  * WordPress dependencies
 17479  */
 20115  */
 17480 
 20116 
 17481 var BlockNavigationContext = Object(external_this_wp_element_["createContext"])({
 20117 const BlockNavigationContext = Object(external_wp_element_["createContext"])({
 17482   __experimentalFeatures: false
 20118   __experimentalFeatures: false,
       
 20119   __experimentalPersistentListViewFeatures: false
 17483 });
 20120 });
 17484 var context_useBlockNavigationContext = function useBlockNavigationContext() {
 20121 const useBlockNavigationContext = () => Object(external_wp_element_["useContext"])(BlockNavigationContext);
 17485   return Object(external_this_wp_element_["useContext"])(BlockNavigationContext);
       
 17486 };
       
 17487 
 20122 
 17488 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-horizontal.js
 20123 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-horizontal.js
 17489 
 20124 
 17490 
 20125 
 17491 /**
 20126 /**
 17492  * WordPress dependencies
 20127  * WordPress dependencies
 17493  */
 20128  */
 17494 
 20129 
 17495 var moreHorizontal = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 20130 const moreHorizontal = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 17496   xmlns: "http://www.w3.org/2000/svg",
 20131   xmlns: "http://www.w3.org/2000/svg",
 17497   viewBox: "0 0 24 24"
 20132   viewBox: "0 0 24 24"
 17498 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 20133 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 17499   d: "M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"
 20134   d: "M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"
 17500 }));
 20135 }));
 17501 /* harmony default export */ var more_horizontal = (moreHorizontal);
 20136 /* harmony default export */ var more_horizontal = (moreHorizontal);
 17502 
 20137 
 17503 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/warning/index.js
 20138 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/warning/index.js
 17514 
 20149 
 17515 
 20150 
 17516 
 20151 
 17517 
 20152 
 17518 
 20153 
 17519 function Warning(_ref) {
 20154 function Warning({
 17520   var className = _ref.className,
 20155   className,
 17521       actions = _ref.actions,
 20156   actions,
 17522       children = _ref.children,
 20157   children,
 17523       secondaryActions = _ref.secondaryActions;
 20158   secondaryActions
 17524   return Object(external_this_wp_element_["createElement"])("div", {
 20159 }) {
       
 20160   return Object(external_wp_element_["createElement"])("div", {
 17525     className: classnames_default()(className, 'block-editor-warning')
 20161     className: classnames_default()(className, 'block-editor-warning')
 17526   }, Object(external_this_wp_element_["createElement"])("div", {
 20162   }, Object(external_wp_element_["createElement"])("div", {
 17527     className: "block-editor-warning__contents"
 20163     className: "block-editor-warning__contents"
 17528   }, Object(external_this_wp_element_["createElement"])("p", {
 20164   }, Object(external_wp_element_["createElement"])("p", {
 17529     className: "block-editor-warning__message"
 20165     className: "block-editor-warning__message"
 17530   }, children), (external_this_wp_element_["Children"].count(actions) > 0 || secondaryActions) && Object(external_this_wp_element_["createElement"])("div", {
 20166   }, children), (external_wp_element_["Children"].count(actions) > 0 || secondaryActions) && Object(external_wp_element_["createElement"])("div", {
 17531     className: "block-editor-warning__actions"
 20167     className: "block-editor-warning__actions"
 17532   }, external_this_wp_element_["Children"].count(actions) > 0 && external_this_wp_element_["Children"].map(actions, function (action, i) {
 20168   }, external_wp_element_["Children"].count(actions) > 0 && external_wp_element_["Children"].map(actions, (action, i) => Object(external_wp_element_["createElement"])("span", {
 17533     return Object(external_this_wp_element_["createElement"])("span", {
 20169     key: i,
 17534       key: i,
 20170     className: "block-editor-warning__action"
 17535       className: "block-editor-warning__action"
 20171   }, action)), secondaryActions && Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
 17536     }, action);
       
 17537   }), secondaryActions && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
       
 17538     className: "block-editor-warning__secondary",
 20172     className: "block-editor-warning__secondary",
 17539     position: "bottom left",
 20173     icon: more_horizontal,
 17540     renderToggle: function renderToggle(_ref2) {
 20174     label: Object(external_wp_i18n_["__"])('More options'),
 17541       var isOpen = _ref2.isOpen,
 20175     popoverProps: {
 17542           onToggle = _ref2.onToggle;
 20176       position: 'bottom left',
 17543       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 20177       className: 'block-editor-warning__dropdown'
 17544         icon: more_horizontal,
       
 17545         label: Object(external_this_wp_i18n_["__"])('More options'),
       
 17546         onClick: onToggle,
       
 17547         "aria-expanded": isOpen
       
 17548       });
       
 17549     },
 20178     },
 17550     renderContent: function renderContent() {
 20179     noIcons: true
 17551       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], null, secondaryActions.map(function (item, pos) {
 20180   }, () => Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, secondaryActions.map((item, pos) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 17552         return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 20181     onClick: item.onClick,
 17553           onClick: item.onClick,
 20182     key: pos
 17554           key: pos
 20183   }, item.title)))))));
 17555         }, item.title);
 20184 }
 17556       }));
 20185 /**
 17557     }
 20186  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md
 17558   }))));
 20187  */
 17559 }
 20188 
 17560 
 20189 
 17561 /* harmony default export */ var warning = (Warning);
 20190 /* harmony default export */ var warning = (Warning);
 17562 
 20191 
 17563 // EXTERNAL MODULE: ./node_modules/@wordpress/block-editor/node_modules/diff/lib/diff/character.js
 20192 // EXTERNAL MODULE: ./node_modules/diff/lib/diff/character.js
 17564 var diff_character = __webpack_require__(264);
 20193 var diff_character = __webpack_require__("iA5R");
 17565 
 20194 
 17566 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-compare/block-view.js
 20195 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-compare/block-view.js
 17567 
 20196 
 17568 
 20197 
 17569 /**
 20198 /**
 17570  * WordPress dependencies
 20199  * WordPress dependencies
 17571  */
 20200  */
 17572 
 20201 
 17573 
 20202 
 17574 var block_view_BlockView = function BlockView(_ref) {
 20203 
 17575   var title = _ref.title,
 20204 function BlockView({
 17576       rawContent = _ref.rawContent,
 20205   title,
 17577       renderedContent = _ref.renderedContent,
 20206   rawContent,
 17578       action = _ref.action,
 20207   renderedContent,
 17579       actionText = _ref.actionText,
 20208   action,
 17580       className = _ref.className;
 20209   actionText,
 17581   return Object(external_this_wp_element_["createElement"])("div", {
 20210   className
       
 20211 }) {
       
 20212   return Object(external_wp_element_["createElement"])("div", {
 17582     className: className
 20213     className: className
 17583   }, Object(external_this_wp_element_["createElement"])("div", {
 20214   }, Object(external_wp_element_["createElement"])("div", {
 17584     className: "block-editor-block-compare__content"
 20215     className: "block-editor-block-compare__content"
 17585   }, Object(external_this_wp_element_["createElement"])("h2", {
 20216   }, Object(external_wp_element_["createElement"])("h2", {
 17586     className: "block-editor-block-compare__heading"
 20217     className: "block-editor-block-compare__heading"
 17587   }, title), Object(external_this_wp_element_["createElement"])("div", {
 20218   }, title), Object(external_wp_element_["createElement"])("div", {
 17588     className: "block-editor-block-compare__html"
 20219     className: "block-editor-block-compare__html"
 17589   }, rawContent), Object(external_this_wp_element_["createElement"])("div", {
 20220   }, rawContent), Object(external_wp_element_["createElement"])("div", {
 17590     className: "block-editor-block-compare__preview edit-post-visual-editor"
 20221     className: "block-editor-block-compare__preview edit-post-visual-editor"
 17591   }, renderedContent)), Object(external_this_wp_element_["createElement"])("div", {
 20222   }, Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, Object(external_wp_dom_["safeHTML"])(renderedContent)))), Object(external_wp_element_["createElement"])("div", {
 17592     className: "block-editor-block-compare__action"
 20223     className: "block-editor-block-compare__action"
 17593   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 20224   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 17594     isSecondary: true,
 20225     isSecondary: true,
 17595     tabIndex: "0",
 20226     tabIndex: "0",
 17596     onClick: action
 20227     onClick: action
 17597   }, actionText)));
 20228   }, actionText)));
 17598 };
 20229 }
 17599 
       
 17600 /* harmony default export */ var block_view = (block_view_BlockView);
       
 17601 
 20230 
 17602 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-compare/index.js
 20231 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-compare/index.js
 17603 
 20232 
 17604 
 20233 
 17605 /**
 20234 /**
 17620  * Internal dependencies
 20249  * Internal dependencies
 17621  */
 20250  */
 17622 
 20251 
 17623 
 20252 
 17624 
 20253 
 17625 function BlockCompare(_ref) {
 20254 function BlockCompare({
 17626   var block = _ref.block,
 20255   block,
 17627       onKeep = _ref.onKeep,
 20256   onKeep,
 17628       onConvert = _ref.onConvert,
 20257   onConvert,
 17629       convertor = _ref.convertor,
 20258   convertor,
 17630       convertButtonText = _ref.convertButtonText;
 20259   convertButtonText
 17631 
 20260 }) {
 17632   function getDifference(originalContent, newContent) {
 20261   function getDifference(originalContent, newContent) {
 17633     var difference = Object(diff_character["diffChars"])(originalContent, newContent);
 20262     const difference = Object(diff_character["diffChars"])(originalContent, newContent);
 17634     return difference.map(function (item, pos) {
 20263     return difference.map((item, pos) => {
 17635       var classes = classnames_default()({
 20264       const classes = classnames_default()({
 17636         'block-editor-block-compare__added': item.added,
 20265         'block-editor-block-compare__added': item.added,
 17637         'block-editor-block-compare__removed': item.removed
 20266         'block-editor-block-compare__removed': item.removed
 17638       });
 20267       });
 17639       return Object(external_this_wp_element_["createElement"])("span", {
 20268       return Object(external_wp_element_["createElement"])("span", {
 17640         key: pos,
 20269         key: pos,
 17641         className: classes
 20270         className: classes
 17642       }, item.value);
 20271       }, item.value);
 17643     });
 20272     });
 17644   }
 20273   }
 17645 
 20274 
 17646   function getConvertedContent(convertedBlock) {
 20275   function getConvertedContent(convertedBlock) {
 17647     // The convertor may return an array of items or a single item
 20276     // The convertor may return an array of items or a single item
 17648     var newBlocks = Object(external_this_lodash_["castArray"])(convertedBlock); // Get converted block details
 20277     const newBlocks = Object(external_lodash_["castArray"])(convertedBlock); // Get converted block details
 17649 
 20278 
 17650     var newContent = newBlocks.map(function (item) {
 20279     const newContent = newBlocks.map(item => Object(external_wp_blocks_["getSaveContent"])(item.name, item.attributes, item.innerBlocks));
 17651       return Object(external_this_wp_blocks_["getSaveContent"])(item.name, item.attributes, item.innerBlocks);
 20280     return newContent.join('');
 17652     });
 20281   }
 17653     var renderedContent = newBlocks.map(function (item) {
 20282 
 17654       return Object(external_this_wp_blocks_["getSaveElement"])(item.name, item.attributes, item.innerBlocks);
 20283   const converted = getConvertedContent(convertor(block));
 17655     });
 20284   const difference = getDifference(block.originalContent, converted);
 17656     return {
 20285   return Object(external_wp_element_["createElement"])("div", {
 17657       rawContent: newContent.join(''),
       
 17658       renderedContent: renderedContent
       
 17659     };
       
 17660   }
       
 17661 
       
 17662   var original = {
       
 17663     rawContent: block.originalContent,
       
 17664     renderedContent: Object(external_this_wp_blocks_["getSaveElement"])(block.name, block.attributes)
       
 17665   };
       
 17666   var converted = getConvertedContent(convertor(block));
       
 17667   var difference = getDifference(original.rawContent, converted.rawContent);
       
 17668   return Object(external_this_wp_element_["createElement"])("div", {
       
 17669     className: "block-editor-block-compare__wrapper"
 20286     className: "block-editor-block-compare__wrapper"
 17670   }, Object(external_this_wp_element_["createElement"])(block_view, {
 20287   }, Object(external_wp_element_["createElement"])(BlockView, {
 17671     title: Object(external_this_wp_i18n_["__"])('Current'),
 20288     title: Object(external_wp_i18n_["__"])('Current'),
 17672     className: "block-editor-block-compare__current",
 20289     className: "block-editor-block-compare__current",
 17673     action: onKeep,
 20290     action: onKeep,
 17674     actionText: Object(external_this_wp_i18n_["__"])('Convert to HTML'),
 20291     actionText: Object(external_wp_i18n_["__"])('Convert to HTML'),
 17675     rawContent: original.rawContent,
 20292     rawContent: block.originalContent,
 17676     renderedContent: original.renderedContent
 20293     renderedContent: block.originalContent
 17677   }), Object(external_this_wp_element_["createElement"])(block_view, {
 20294   }), Object(external_wp_element_["createElement"])(BlockView, {
 17678     title: Object(external_this_wp_i18n_["__"])('After Conversion'),
 20295     title: Object(external_wp_i18n_["__"])('After Conversion'),
 17679     className: "block-editor-block-compare__converted",
 20296     className: "block-editor-block-compare__converted",
 17680     action: onConvert,
 20297     action: onConvert,
 17681     actionText: convertButtonText,
 20298     actionText: convertButtonText,
 17682     rawContent: difference,
 20299     rawContent: difference,
 17683     renderedContent: converted.renderedContent
 20300     renderedContent: converted
 17684   }));
 20301   }));
 17685 }
 20302 }
 17686 
 20303 
 17687 /* harmony default export */ var block_compare = (BlockCompare);
 20304 /* harmony default export */ var block_compare = (BlockCompare);
 17688 
 20305 
 17689 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-invalid-warning.js
 20306 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-invalid-warning.js
 17690 
 20307 
 17691 
 20308 
 17692 
       
 17693 
       
 17694 
       
 17695 
       
 17696 
       
 17697 
       
 17698 function block_invalid_warning_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (block_invalid_warning_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 17699 
       
 17700 function block_invalid_warning_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 17701 
       
 17702 /**
 20309 /**
 17703  * WordPress dependencies
 20310  * WordPress dependencies
 17704  */
 20311  */
 17705 
 20312 
 17706 
 20313 
 17712  * Internal dependencies
 20319  * Internal dependencies
 17713  */
 20320  */
 17714 
 20321 
 17715 
 20322 
 17716 
 20323 
 17717 var block_invalid_warning_BlockInvalidWarning = /*#__PURE__*/function (_Component) {
 20324 
 17718   Object(inherits["a" /* default */])(BlockInvalidWarning, _Component);
 20325 function BlockInvalidWarning({
 17719 
 20326   convertToHTML,
 17720   var _super = block_invalid_warning_createSuper(BlockInvalidWarning);
 20327   convertToBlocks,
 17721 
 20328   convertToClassic,
 17722   function BlockInvalidWarning(props) {
 20329   attemptBlockRecovery,
 17723     var _this;
 20330   block
 17724 
 20331 }) {
 17725     Object(classCallCheck["a" /* default */])(this, BlockInvalidWarning);
 20332   const hasHTMLBlock = !!Object(external_wp_blocks_["getBlockType"])('core/html');
 17726 
 20333   const [compare, setCompare] = Object(external_wp_element_["useState"])(false);
 17727     _this = _super.call(this, props);
 20334   const onCompare = Object(external_wp_element_["useCallback"])(() => setCompare(true), []);
 17728     _this.state = {
 20335   const onCompareClose = Object(external_wp_element_["useCallback"])(() => setCompare(false), []); // We memo the array here to prevent the children components from being updated unexpectedly
 17729       compare: false
 20336 
 17730     };
 20337   const hiddenActions = Object(external_wp_element_["useMemo"])(() => [{
 17731     _this.onCompare = _this.onCompare.bind(Object(assertThisInitialized["a" /* default */])(_this));
 20338     // translators: Button to fix block content
 17732     _this.onCompareClose = _this.onCompareClose.bind(Object(assertThisInitialized["a" /* default */])(_this));
 20339     title: Object(external_wp_i18n_["_x"])('Resolve', 'imperative verb'),
 17733     return _this;
 20340     onClick: onCompare
 17734   }
 20341   }, hasHTMLBlock && {
 17735 
 20342     title: Object(external_wp_i18n_["__"])('Convert to HTML'),
 17736   Object(createClass["a" /* default */])(BlockInvalidWarning, [{
 20343     onClick: convertToHTML
 17737     key: "onCompare",
       
 17738     value: function onCompare() {
       
 17739       this.setState({
       
 17740         compare: true
       
 17741       });
       
 17742     }
       
 17743   }, {
 20344   }, {
 17744     key: "onCompareClose",
 20345     title: Object(external_wp_i18n_["__"])('Convert to Classic Block'),
 17745     value: function onCompareClose() {
 20346     onClick: convertToClassic
 17746       this.setState({
 20347   }].filter(Boolean), [onCompare, convertToHTML, convertToClassic]);
 17747         compare: false
 20348   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(warning, {
 17748       });
 20349     actions: [Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 17749     }
 20350       key: "recover",
 17750   }, {
 20351       onClick: attemptBlockRecovery,
 17751     key: "render",
 20352       isPrimary: true
 17752     value: function render() {
 20353     }, Object(external_wp_i18n_["__"])('Attempt Block Recovery'))],
 17753       var _this$props = this.props,
 20354     secondaryActions: hiddenActions
 17754           convertToHTML = _this$props.convertToHTML,
 20355   }, Object(external_wp_i18n_["__"])('This block contains unexpected or invalid content.')), compare && Object(external_wp_element_["createElement"])(external_wp_components_["Modal"], {
 17755           convertToBlocks = _this$props.convertToBlocks,
 20356     title: // translators: Dialog title to fix block content
 17756           convertToClassic = _this$props.convertToClassic,
 20357     Object(external_wp_i18n_["__"])('Resolve Block'),
 17757           attemptBlockRecovery = _this$props.attemptBlockRecovery,
 20358     onRequestClose: onCompareClose,
 17758           block = _this$props.block;
 20359     className: "block-editor-block-compare"
 17759       var hasHTMLBlock = !!Object(external_this_wp_blocks_["getBlockType"])('core/html');
 20360   }, Object(external_wp_element_["createElement"])(block_compare, {
 17760       var compare = this.state.compare;
 20361     block: block,
 17761       var hiddenActions = [{
 20362     onKeep: convertToHTML,
 17762         title: Object(external_this_wp_i18n_["__"])('Convert to Classic Block'),
 20363     onConvert: convertToBlocks,
 17763         onClick: convertToClassic
 20364     convertor: blockToBlocks,
 17764       }, {
 20365     convertButtonText: Object(external_wp_i18n_["__"])('Convert to Blocks')
 17765         title: Object(external_this_wp_i18n_["__"])('Attempt Block Recovery'),
 20366   })));
 17766         onClick: attemptBlockRecovery
 20367 }
 17767       }];
 20368 
 17768       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(warning, {
 20369 const blockToClassic = block => Object(external_wp_blocks_["createBlock"])('core/freeform', {
 17769         actions: [Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 20370   content: block.originalContent
 17770           key: "convert",
 20371 });
 17771           onClick: this.onCompare,
 20372 
 17772           isSecondary: hasHTMLBlock,
 20373 const blockToHTML = block => Object(external_wp_blocks_["createBlock"])('core/html', {
 17773           isPrimary: !hasHTMLBlock
 20374   content: block.originalContent
 17774         }, // translators: Button to fix block content
 20375 });
 17775         Object(external_this_wp_i18n_["_x"])('Resolve', 'imperative verb')), hasHTMLBlock && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 20376 
 17776           key: "edit",
 20377 const blockToBlocks = block => Object(external_wp_blocks_["rawHandler"])({
 17777           onClick: convertToHTML,
 20378   HTML: block.originalContent
 17778           isPrimary: true
 20379 });
 17779         }, Object(external_this_wp_i18n_["__"])('Convert to HTML'))],
 20380 
 17780         secondaryActions: hiddenActions
 20381 const recoverBlock = ({
 17781       }, Object(external_this_wp_i18n_["__"])('This block contains unexpected or invalid content.')), compare && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Modal"], {
 20382   name,
 17782         title: // translators: Dialog title to fix block content
 20383   attributes,
 17783         Object(external_this_wp_i18n_["__"])('Resolve Block'),
 20384   innerBlocks
 17784         onRequestClose: this.onCompareClose,
 20385 }) => Object(external_wp_blocks_["createBlock"])(name, attributes, innerBlocks);
 17785         className: "block-editor-block-compare"
 20386 
 17786       }, Object(external_this_wp_element_["createElement"])(block_compare, {
 20387 /* harmony default export */ var block_invalid_warning = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, {
 17787         block: block,
 20388   clientId
 17788         onKeep: convertToHTML,
 20389 }) => ({
 17789         onConvert: convertToBlocks,
 20390   block: select(store).getBlock(clientId)
 17790         convertor: block_invalid_warning_blockToBlocks,
 20391 })), Object(external_wp_data_["withDispatch"])((dispatch, {
 17791         convertButtonText: Object(external_this_wp_i18n_["__"])('Convert to Blocks')
 20392   block
 17792       })));
 20393 }) => {
 17793     }
 20394   const {
 17794   }]);
 20395     replaceBlock
 17795 
 20396   } = dispatch(store);
 17796   return BlockInvalidWarning;
       
 17797 }(external_this_wp_element_["Component"]);
       
 17798 
       
 17799 var block_invalid_warning_blockToClassic = function blockToClassic(block) {
       
 17800   return Object(external_this_wp_blocks_["createBlock"])('core/freeform', {
       
 17801     content: block.originalContent
       
 17802   });
       
 17803 };
       
 17804 
       
 17805 var block_invalid_warning_blockToHTML = function blockToHTML(block) {
       
 17806   return Object(external_this_wp_blocks_["createBlock"])('core/html', {
       
 17807     content: block.originalContent
       
 17808   });
       
 17809 };
       
 17810 
       
 17811 var block_invalid_warning_blockToBlocks = function blockToBlocks(block) {
       
 17812   return Object(external_this_wp_blocks_["rawHandler"])({
       
 17813     HTML: block.originalContent
       
 17814   });
       
 17815 };
       
 17816 
       
 17817 var block_invalid_warning_recoverBlock = function recoverBlock(_ref) {
       
 17818   var name = _ref.name,
       
 17819       attributes = _ref.attributes,
       
 17820       innerBlocks = _ref.innerBlocks;
       
 17821   return Object(external_this_wp_blocks_["createBlock"])(name, attributes, innerBlocks);
       
 17822 };
       
 17823 
       
 17824 /* harmony default export */ var block_invalid_warning = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref2) {
       
 17825   var clientId = _ref2.clientId;
       
 17826   return {
 20397   return {
 17827     block: select('core/block-editor').getBlock(clientId)
 20398     convertToClassic() {
       
 20399       replaceBlock(block.clientId, blockToClassic(block));
       
 20400     },
       
 20401 
       
 20402     convertToHTML() {
       
 20403       replaceBlock(block.clientId, blockToHTML(block));
       
 20404     },
       
 20405 
       
 20406     convertToBlocks() {
       
 20407       replaceBlock(block.clientId, blockToBlocks(block));
       
 20408     },
       
 20409 
       
 20410     attemptBlockRecovery() {
       
 20411       replaceBlock(block.clientId, recoverBlock(block));
       
 20412     }
       
 20413 
 17828   };
 20414   };
 17829 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref3) {
 20415 })])(BlockInvalidWarning));
 17830   var block = _ref3.block;
       
 17831 
       
 17832   var _dispatch = dispatch('core/block-editor'),
       
 17833       replaceBlock = _dispatch.replaceBlock;
       
 17834 
       
 17835   return {
       
 17836     convertToClassic: function convertToClassic() {
       
 17837       replaceBlock(block.clientId, block_invalid_warning_blockToClassic(block));
       
 17838     },
       
 17839     convertToHTML: function convertToHTML() {
       
 17840       replaceBlock(block.clientId, block_invalid_warning_blockToHTML(block));
       
 17841     },
       
 17842     convertToBlocks: function convertToBlocks() {
       
 17843       replaceBlock(block.clientId, block_invalid_warning_blockToBlocks(block));
       
 17844     },
       
 17845     attemptBlockRecovery: function attemptBlockRecovery() {
       
 17846       replaceBlock(block.clientId, block_invalid_warning_recoverBlock(block));
       
 17847     }
       
 17848   };
       
 17849 })])(block_invalid_warning_BlockInvalidWarning));
       
 17850 
 20416 
 17851 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-crash-warning.js
 20417 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-crash-warning.js
 17852 
 20418 
 17853 
 20419 
 17854 /**
 20420 /**
 17858 /**
 20424 /**
 17859  * Internal dependencies
 20425  * Internal dependencies
 17860  */
 20426  */
 17861 
 20427 
 17862 
 20428 
 17863 var block_crash_warning_warning = Object(external_this_wp_element_["createElement"])(warning, {
 20429 const block_crash_warning_warning = Object(external_wp_element_["createElement"])(warning, {
 17864   className: "block-editor-block-list__block-crash-warning"
 20430   className: "block-editor-block-list__block-crash-warning"
 17865 }, Object(external_this_wp_i18n_["__"])('This block has encountered an error and cannot be previewed.'));
 20431 }, Object(external_wp_i18n_["__"])('This block has encountered an error and cannot be previewed.'));
 17866 /* harmony default export */ var block_crash_warning = (function () {
 20432 /* harmony default export */ var block_crash_warning = (() => block_crash_warning_warning);
 17867   return block_crash_warning_warning;
       
 17868 });
       
 17869 
 20433 
 17870 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-crash-boundary.js
 20434 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-crash-boundary.js
 17871 
       
 17872 
       
 17873 
       
 17874 
       
 17875 
       
 17876 
       
 17877 function block_crash_boundary_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (block_crash_boundary_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 17878 
       
 17879 function block_crash_boundary_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 17880 
       
 17881 /**
 20435 /**
 17882  * WordPress dependencies
 20436  * WordPress dependencies
 17883  */
 20437  */
 17884 
 20438 
 17885 
 20439 
 17886 var block_crash_boundary_BlockCrashBoundary = /*#__PURE__*/function (_Component) {
 20440 class block_crash_boundary_BlockCrashBoundary extends external_wp_element_["Component"] {
 17887   Object(inherits["a" /* default */])(BlockCrashBoundary, _Component);
 20441   constructor() {
 17888 
 20442     super(...arguments);
 17889   var _super = block_crash_boundary_createSuper(BlockCrashBoundary);
 20443     this.state = {
 17890 
       
 17891   function BlockCrashBoundary() {
       
 17892     var _this;
       
 17893 
       
 17894     Object(classCallCheck["a" /* default */])(this, BlockCrashBoundary);
       
 17895 
       
 17896     _this = _super.apply(this, arguments);
       
 17897     _this.state = {
       
 17898       hasError: false
 20444       hasError: false
 17899     };
 20445     };
 17900     return _this;
 20446   }
 17901   }
 20447 
 17902 
 20448   componentDidCatch() {
 17903   Object(createClass["a" /* default */])(BlockCrashBoundary, [{
 20449     this.setState({
 17904     key: "componentDidCatch",
 20450       hasError: true
 17905     value: function componentDidCatch(error) {
 20451     });
 17906       this.props.onError(error);
 20452   }
 17907       this.setState({
 20453 
 17908         hasError: true
 20454   render() {
 17909       });
 20455     if (this.state.hasError) {
 17910     }
 20456       return this.props.fallback;
 17911   }, {
 20457     }
 17912     key: "render",
 20458 
 17913     value: function render() {
 20459     return this.props.children;
 17914       if (this.state.hasError) {
 20460   }
 17915         return null;
 20461 
 17916       }
 20462 }
 17917 
       
 17918       return this.props.children;
       
 17919     }
       
 17920   }]);
       
 17921 
       
 17922   return BlockCrashBoundary;
       
 17923 }(external_this_wp_element_["Component"]);
       
 17924 
 20463 
 17925 /* harmony default export */ var block_crash_boundary = (block_crash_boundary_BlockCrashBoundary);
 20464 /* harmony default export */ var block_crash_boundary = (block_crash_boundary_BlockCrashBoundary);
 17926 
 20465 
 17927 // EXTERNAL MODULE: ./node_modules/react-autosize-textarea/lib/index.js
 20466 // EXTERNAL MODULE: ./node_modules/react-autosize-textarea/lib/index.js
 17928 var lib = __webpack_require__(97);
 20467 var lib = __webpack_require__("O6Fj");
 17929 var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
 20468 var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
 17930 
 20469 
 17931 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-html.js
 20470 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-html.js
 17932 
 20471 
 17933 
 20472 
 17934 
       
 17935 /**
 20473 /**
 17936  * External dependencies
 20474  * External dependencies
 17937  */
 20475  */
 17938 
 20476 
 17939 /**
 20477 /**
 17941  */
 20479  */
 17942 
 20480 
 17943 
 20481 
 17944 
 20482 
 17945 
 20483 
 17946 
 20484 /**
 17947 function BlockHTML(_ref) {
 20485  * Internal dependencies
 17948   var clientId = _ref.clientId;
 20486  */
 17949 
 20487 
 17950   var _useState = Object(external_this_wp_element_["useState"])(''),
 20488 
 17951       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 20489 
 17952       html = _useState2[0],
 20490 function BlockHTML({
 17953       setHtml = _useState2[1];
 20491   clientId
 17954 
 20492 }) {
 17955   var block = Object(external_this_wp_data_["useSelect"])(function (select) {
 20493   const [html, setHtml] = Object(external_wp_element_["useState"])('');
 17956     return select('core/block-editor').getBlock(clientId);
 20494   const block = Object(external_wp_data_["useSelect"])(select => select(store).getBlock(clientId), [clientId]);
 17957   }, [clientId]);
 20495   const {
 17958 
 20496     updateBlock
 17959   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 20497   } = Object(external_wp_data_["useDispatch"])(store);
 17960       updateBlock = _useDispatch.updateBlock;
 20498 
 17961 
 20499   const onChange = () => {
 17962   var onChange = function onChange() {
 20500     const blockType = Object(external_wp_blocks_["getBlockType"])(block.name);
 17963     var blockType = Object(external_this_wp_blocks_["getBlockType"])(block.name);
 20501     const attributes = Object(external_wp_blocks_["getBlockAttributes"])(blockType, html, block.attributes); // If html is empty  we reset the block to the default HTML and mark it as valid to avoid triggering an error
 17964     var attributes = Object(external_this_wp_blocks_["getBlockAttributes"])(blockType, html, block.attributes); // If html is empty  we reset the block to the default HTML and mark it as valid to avoid triggering an error
 20502 
 17965 
 20503     const content = html ? html : Object(external_wp_blocks_["getSaveContent"])(blockType, attributes);
 17966     var content = html ? html : Object(external_this_wp_blocks_["getSaveContent"])(blockType, attributes);
 20504     const isValid = html ? Object(external_wp_blocks_["isValidBlockContent"])(blockType, attributes, content) : true;
 17967     var isValid = html ? Object(external_this_wp_blocks_["isValidBlockContent"])(blockType, attributes, content) : true;
       
 17968     updateBlock(clientId, {
 20505     updateBlock(clientId, {
 17969       attributes: attributes,
 20506       attributes,
 17970       originalContent: content,
 20507       originalContent: content,
 17971       isValid: isValid
 20508       isValid
 17972     }); // Ensure the state is updated if we reset so it displays the default content
 20509     }); // Ensure the state is updated if we reset so it displays the default content
 17973 
 20510 
 17974     if (!html) {
 20511     if (!html) {
 17975       setHtml({
 20512       setHtml({
 17976         content: content
 20513         content
 17977       });
 20514       });
 17978     }
 20515     }
 17979   };
 20516   };
 17980 
 20517 
 17981   Object(external_this_wp_element_["useEffect"])(function () {
 20518   Object(external_wp_element_["useEffect"])(() => {
 17982     setHtml(Object(external_this_wp_blocks_["getBlockContent"])(block));
 20519     setHtml(Object(external_wp_blocks_["getBlockContent"])(block));
 17983   }, [block]);
 20520   }, [block]);
 17984   return Object(external_this_wp_element_["createElement"])(lib_default.a, {
 20521   return Object(external_wp_element_["createElement"])(lib_default.a, {
 17985     className: "block-editor-block-list__block-html-textarea",
 20522     className: "block-editor-block-list__block-html-textarea",
 17986     value: html,
 20523     value: html,
 17987     onBlur: onChange,
 20524     onBlur: onChange,
 17988     onChange: function onChange(event) {
 20525     onChange: event => setHtml(event.target.value)
 17989       return setHtml(event.target.value);
       
 17990     }
       
 17991   });
 20526   });
 17992 }
 20527 }
 17993 
 20528 
 17994 /* harmony default export */ var block_html = (BlockHTML);
 20529 /* harmony default export */ var block_html = (BlockHTML);
 17995 
 20530 
 17996 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-multi-selection.js
 20531 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/dom.js
 17997 
 20532 const BLOCK_SELECTOR = '.block-editor-block-list__block';
       
 20533 /**
       
 20534  * Returns true if two elements are contained within the same block.
       
 20535  *
       
 20536  * @param {Element} a First element.
       
 20537  * @param {Element} b Second element.
       
 20538  *
       
 20539  * @return {boolean} Whether elements are in the same block.
       
 20540  */
       
 20541 
       
 20542 function isInSameBlock(a, b) {
       
 20543   return a.closest(BLOCK_SELECTOR) === b.closest(BLOCK_SELECTOR);
       
 20544 }
       
 20545 /**
       
 20546  * Returns true if an element is considered part of the block and not its
       
 20547  * children.
       
 20548  *
       
 20549  * @param {Element} blockElement Block container element.
       
 20550  * @param {Element} element      Element.
       
 20551  *
       
 20552  * @return {boolean} Whether element is in the block Element but not its
       
 20553  *                   children.
       
 20554  */
       
 20555 
       
 20556 function isInsideRootBlock(blockElement, element) {
       
 20557   const parentBlock = element.closest(BLOCK_SELECTOR);
       
 20558   return parentBlock === blockElement;
       
 20559 }
       
 20560 /**
       
 20561  * Finds the block client ID given any DOM node inside the block.
       
 20562  *
       
 20563  * @param {Node?} node DOM node.
       
 20564  *
       
 20565  * @return {string|undefined} Client ID or undefined if the node is not part of
       
 20566  *                            a block.
       
 20567  */
       
 20568 
       
 20569 function getBlockClientId(node) {
       
 20570   while (node && node.nodeType !== node.ELEMENT_NODE) {
       
 20571     node = node.parentNode;
       
 20572   }
       
 20573 
       
 20574   if (!node) {
       
 20575     return;
       
 20576   }
       
 20577 
       
 20578   const elementNode =
       
 20579   /** @type {Element} */
       
 20580   node;
       
 20581   const blockNode = elementNode.closest(BLOCK_SELECTOR);
       
 20582 
       
 20583   if (!blockNode) {
       
 20584     return;
       
 20585   }
       
 20586 
       
 20587   return blockNode.id.slice('block-'.length);
       
 20588 }
       
 20589 
       
 20590 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-focus-first-element.js
       
 20591 /**
       
 20592  * External dependencies
       
 20593  */
 17998 
 20594 
 17999 /**
 20595 /**
 18000  * WordPress dependencies
 20596  * WordPress dependencies
 18001  */
 20597  */
 18002 
 20598 
 18003 
 20599 
       
 20600 
       
 20601 
 18004 /**
 20602 /**
 18005  * Internal dependencies
 20603  * Internal dependencies
 18006  */
 20604  */
 18007 
 20605 
 18008 
 20606 
 18009 /**
 20607 
 18010  * Returns for the deepest node at the start or end of a container node. Ignores
 20608 /** @typedef {import('@wordpress/element').RefObject} RefObject */
 18011  * any text nodes that only contain HTML formatting whitespace.
 20609 
 18012  *
 20610 /**
 18013  * @param {Element} node Container to search.
 20611  * Returns the initial position if the block needs to be focussed, `undefined`
 18014  * @param {string} type 'start' or 'end'.
 20612  * otherwise. The initial position is either 0 (start) or -1 (end).
 18015  */
 20613  *
 18016 
 20614  * @param {string} clientId Block client ID.
 18017 function getDeepestNode(node, type) {
 20615  *
 18018   var child = type === 'start' ? 'firstChild' : 'lastChild';
 20616  * @return {number} The initial position, either 0 (start) or -1 (end).
 18019   var sibling = type === 'start' ? 'nextSibling' : 'previousSibling';
 20617  */
 18020 
 20618 
 18021   while (node[child]) {
 20619 function useInitialPosition(clientId) {
 18022     node = node[child];
 20620   return Object(external_wp_data_["useSelect"])(select => {
 18023 
 20621     const {
 18024     while (node.nodeType === node.TEXT_NODE && /^[ \t\n]*$/.test(node.data) && node[sibling]) {
 20622       getSelectedBlocksInitialCaretPosition,
 18025       node = node[sibling];
 20623       isMultiSelecting,
 18026     }
 20624       isNavigationMode,
 18027   }
 20625       isBlockSelected
 18028 
 20626     } = select(store);
 18029   return node;
 20627 
 18030 }
 20628     if (!isBlockSelected(clientId)) {
 18031 
 20629       return;
 18032 function use_multi_selection_selector(select) {
 20630     }
 18033   var _select = select('core/block-editor'),
 20631 
 18034       isSelectionEnabled = _select.isSelectionEnabled,
 20632     if (isMultiSelecting() || isNavigationMode()) {
 18035       isMultiSelecting = _select.isMultiSelecting,
 20633       return;
 18036       getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds,
 20634     } // If there's no initial position, return 0 to focus the start.
 18037       hasMultiSelection = _select.hasMultiSelection,
 20635 
 18038       getBlockParents = _select.getBlockParents,
 20636 
 18039       getSelectedBlockClientId = _select.getSelectedBlockClientId;
 20637     return getSelectedBlocksInitialCaretPosition();
 18040 
 20638   }, [clientId]);
 18041   return {
 20639 }
 18042     isSelectionEnabled: isSelectionEnabled(),
 20640 /**
 18043     isMultiSelecting: isMultiSelecting(),
 20641  * Transitions focus to the block or inner tabbable when the block becomes
 18044     multiSelectedBlockClientIds: getMultiSelectedBlockClientIds(),
 20642  * selected and an initial position is set.
 18045     hasMultiSelection: hasMultiSelection(),
 20643  *
 18046     getBlockParents: getBlockParents,
 20644  * @param {string} clientId Block client ID.
 18047     selectedBlockClientId: getSelectedBlockClientId()
 20645  *
 18048   };
 20646  * @return {RefObject} React ref with the block element.
 18049 }
 20647  */
       
 20648 
       
 20649 
       
 20650 function useFocusFirstElement(clientId) {
       
 20651   const ref = Object(external_wp_element_["useRef"])();
       
 20652   const initialPosition = useInitialPosition(clientId);
       
 20653   Object(external_wp_element_["useEffect"])(() => {
       
 20654     if (initialPosition === undefined || initialPosition === null) {
       
 20655       return;
       
 20656     }
       
 20657 
       
 20658     if (!ref.current) {
       
 20659       return;
       
 20660     }
       
 20661 
       
 20662     const {
       
 20663       ownerDocument
       
 20664     } = ref.current; // Do not focus the block if it already contains the active element.
       
 20665 
       
 20666     if (ref.current.contains(ownerDocument.activeElement)) {
       
 20667       return;
       
 20668     } // Find all tabbables within node.
       
 20669 
       
 20670 
       
 20671     const textInputs = external_wp_dom_["focus"].tabbable.find(ref.current).filter(node => Object(external_wp_dom_["isTextField"])(node)); // If reversed (e.g. merge via backspace), use the last in the set of
       
 20672     // tabbables.
       
 20673 
       
 20674     const isReverse = -1 === initialPosition;
       
 20675     const target = (isReverse ? external_lodash_["last"] : external_lodash_["first"])(textInputs) || ref.current;
       
 20676 
       
 20677     if ( // Don't focus inner block or block appenders.
       
 20678     !isInsideRootBlock(ref.current, target) || target.closest('.block-list-appender')) {
       
 20679       ref.current.focus();
       
 20680       return;
       
 20681     }
       
 20682 
       
 20683     Object(external_wp_dom_["placeCaretAtHorizontalEdge"])(target, isReverse);
       
 20684   }, [initialPosition]);
       
 20685   return ref;
       
 20686 }
       
 20687 
       
 20688 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-is-hovered.js
       
 20689 /**
       
 20690  * WordPress dependencies
       
 20691  */
       
 20692 
       
 20693 
       
 20694 /**
       
 20695  * Internal dependencies
       
 20696  */
       
 20697 
       
 20698 
       
 20699 
       
 20700 function listener(event) {
       
 20701   if (event.defaultPrevented) {
       
 20702     return;
       
 20703   }
       
 20704 
       
 20705   const action = event.type === 'mouseover' ? 'add' : 'remove';
       
 20706   event.preventDefault();
       
 20707   event.currentTarget.classList[action]('is-hovered');
       
 20708 }
       
 20709 /**
       
 20710  * Adds `is-hovered` class when the block is hovered and in navigation or
       
 20711  * outline mode.
       
 20712  */
       
 20713 
       
 20714 
       
 20715 function useIsHovered() {
       
 20716   const isEnabled = Object(external_wp_data_["useSelect"])(select => {
       
 20717     const {
       
 20718       isNavigationMode,
       
 20719       getSettings
       
 20720     } = select(store);
       
 20721     return isNavigationMode() || getSettings().outlineMode;
       
 20722   }, []);
       
 20723   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 20724     if (isEnabled) {
       
 20725       node.addEventListener('mouseout', listener);
       
 20726       node.addEventListener('mouseover', listener);
       
 20727       return () => {
       
 20728         node.removeEventListener('mouseout', listener);
       
 20729         node.removeEventListener('mouseover', listener); // Remove class in case it lingers.
       
 20730 
       
 20731         node.classList.remove('is-hovered');
       
 20732       };
       
 20733     }
       
 20734   }, [isEnabled]);
       
 20735 }
       
 20736 
       
 20737 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-block-class-names.js
       
 20738 /**
       
 20739  * External dependencies
       
 20740  */
       
 20741 
       
 20742 /**
       
 20743  * WordPress dependencies
       
 20744  */
       
 20745 
       
 20746 
       
 20747 
       
 20748 /**
       
 20749  * Internal dependencies
       
 20750  */
       
 20751 
       
 20752 
       
 20753 /**
       
 20754  * Returns the class names used for the different states of the block.
       
 20755  *
       
 20756  * @param {string} clientId The block client ID.
       
 20757  *
       
 20758  * @return {string} The class names.
       
 20759  */
       
 20760 
       
 20761 function useBlockClassNames(clientId) {
       
 20762   return Object(external_wp_data_["useSelect"])(select => {
       
 20763     const {
       
 20764       isBlockBeingDragged,
       
 20765       isBlockHighlighted,
       
 20766       isBlockSelected,
       
 20767       isBlockMultiSelected,
       
 20768       getBlockName,
       
 20769       getSettings,
       
 20770       hasSelectedInnerBlock,
       
 20771       isTyping,
       
 20772       __experimentalGetActiveBlockIdByBlockNames: getActiveBlockIdByBlockNames
       
 20773     } = select(store);
       
 20774     const {
       
 20775       __experimentalSpotlightEntityBlocks: spotlightEntityBlocks,
       
 20776       outlineMode
       
 20777     } = getSettings();
       
 20778     const isDragging = isBlockBeingDragged(clientId);
       
 20779     const isSelected = isBlockSelected(clientId);
       
 20780     const name = getBlockName(clientId);
       
 20781     const checkDeep = true; // "ancestor" is the more appropriate label due to "deep" check
       
 20782 
       
 20783     const isAncestorOfSelectedBlock = hasSelectedInnerBlock(clientId, checkDeep);
       
 20784     const activeEntityBlockId = getActiveBlockIdByBlockNames(spotlightEntityBlocks);
       
 20785     return classnames_default()({
       
 20786       'is-selected': isSelected,
       
 20787       'is-highlighted': isBlockHighlighted(clientId),
       
 20788       'is-multi-selected': isBlockMultiSelected(clientId),
       
 20789       'is-reusable': Object(external_wp_blocks_["isReusableBlock"])(Object(external_wp_blocks_["getBlockType"])(name)),
       
 20790       'is-dragging': isDragging,
       
 20791       'has-child-selected': isAncestorOfSelectedBlock,
       
 20792       'has-active-entity': activeEntityBlockId,
       
 20793       // Determine if there is an active entity area to spotlight.
       
 20794       'is-active-entity': activeEntityBlockId === clientId,
       
 20795       'remove-outline': isSelected && outlineMode && isTyping()
       
 20796     });
       
 20797   }, [clientId]);
       
 20798 }
       
 20799 
       
 20800 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-block-default-class-name.js
       
 20801 /**
       
 20802  * WordPress dependencies
       
 20803  */
       
 20804 
       
 20805 
       
 20806 /**
       
 20807  * Internal dependencies
       
 20808  */
       
 20809 
       
 20810 
       
 20811 /**
       
 20812  * Returns the default class name if the block is a light block and it supports
       
 20813  * `className`.
       
 20814  *
       
 20815  * @param {string} clientId The block client ID.
       
 20816  *
       
 20817  * @return {string} The class name, e.g. `wp-block-paragraph`.
       
 20818  */
       
 20819 
       
 20820 function useBlockDefaultClassName(clientId) {
       
 20821   return Object(external_wp_data_["useSelect"])(select => {
       
 20822     const name = select(store).getBlockName(clientId);
       
 20823     const blockType = Object(external_wp_blocks_["getBlockType"])(name);
       
 20824     const hasLightBlockWrapper = blockType.apiVersion > 1 || Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'lightBlockWrapper', false);
       
 20825 
       
 20826     if (!hasLightBlockWrapper) {
       
 20827       return;
       
 20828     }
       
 20829 
       
 20830     return Object(external_wp_blocks_["getBlockDefaultClassName"])(name);
       
 20831   }, [clientId]);
       
 20832 }
       
 20833 
       
 20834 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-block-custom-class-name.js
       
 20835 /**
       
 20836  * WordPress dependencies
       
 20837  */
       
 20838 
       
 20839 
       
 20840 /**
       
 20841  * Internal dependencies
       
 20842  */
       
 20843 
       
 20844 
       
 20845 /**
       
 20846  * Returns the custom class name if the block is a light block.
       
 20847  *
       
 20848  * @param {string} clientId The block client ID.
       
 20849  *
       
 20850  * @return {string} The custom class name.
       
 20851  */
       
 20852 
       
 20853 function useBlockCustomClassName(clientId) {
       
 20854   // It's good for this to be a separate selector because it will be executed
       
 20855   // on every attribute change, while the other selectors are not re-evaluated
       
 20856   // as much.
       
 20857   return Object(external_wp_data_["useSelect"])(select => {
       
 20858     const {
       
 20859       getBlockName,
       
 20860       getBlockAttributes
       
 20861     } = select(store);
       
 20862     const {
       
 20863       className
       
 20864     } = getBlockAttributes(clientId);
       
 20865 
       
 20866     if (!className) {
       
 20867       return;
       
 20868     }
       
 20869 
       
 20870     const blockType = Object(external_wp_blocks_["getBlockType"])(getBlockName(clientId));
       
 20871     const hasLightBlockWrapper = blockType.apiVersion > 1 || Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'lightBlockWrapper', false);
       
 20872 
       
 20873     if (!hasLightBlockWrapper) {
       
 20874       return;
       
 20875     }
       
 20876 
       
 20877     return className;
       
 20878   }, [clientId]);
       
 20879 }
       
 20880 
       
 20881 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js
       
 20882 /**
       
 20883  * External dependencies
       
 20884  */
       
 20885 
       
 20886 /**
       
 20887  * WordPress dependencies
       
 20888  */
       
 20889 
       
 20890 
       
 20891 /**
       
 20892  * Internal dependencies
       
 20893  */
       
 20894 
       
 20895 
       
 20896 /**
       
 20897  * Returns the class names used for block moving mode.
       
 20898  *
       
 20899  * @param {string} clientId The block client ID to insert above.
       
 20900  *
       
 20901  * @return {string} The class names.
       
 20902  */
       
 20903 
       
 20904 function useBlockMovingModeClassNames(clientId) {
       
 20905   return Object(external_wp_data_["useSelect"])(select => {
       
 20906     const {
       
 20907       hasBlockMovingClientId,
       
 20908       canInsertBlockType,
       
 20909       getBlockName,
       
 20910       getBlockRootClientId,
       
 20911       isBlockSelected
       
 20912     } = select(store); // The classes are only relevant for the selected block. Avoid
       
 20913     // re-rendering all blocks!
       
 20914 
       
 20915     if (!isBlockSelected(clientId)) {
       
 20916       return;
       
 20917     }
       
 20918 
       
 20919     const movingClientId = hasBlockMovingClientId();
       
 20920 
       
 20921     if (!movingClientId) {
       
 20922       return;
       
 20923     }
       
 20924 
       
 20925     return classnames_default()('is-block-moving-mode', {
       
 20926       'can-insert-moving-block': canInsertBlockType(getBlockName(movingClientId), getBlockRootClientId(clientId))
       
 20927     });
       
 20928   }, [clientId]);
       
 20929 }
       
 20930 
       
 20931 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-focus-handler.js
       
 20932 /**
       
 20933  * WordPress dependencies
       
 20934  */
       
 20935 
       
 20936 
       
 20937 /**
       
 20938  * Internal dependencies
       
 20939  */
       
 20940 
       
 20941 
       
 20942 
       
 20943 /**
       
 20944  * Selects the block if it receives focus.
       
 20945  *
       
 20946  * @param {string} clientId Block client ID.
       
 20947  */
       
 20948 
       
 20949 function useFocusHandler(clientId) {
       
 20950   const {
       
 20951     isBlockSelected
       
 20952   } = Object(external_wp_data_["useSelect"])(store);
       
 20953   const {
       
 20954     selectBlock,
       
 20955     selectionChange
       
 20956   } = Object(external_wp_data_["useDispatch"])(store);
       
 20957   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 20958     /**
       
 20959      * Marks the block as selected when focused and not already
       
 20960      * selected. This specifically handles the case where block does not
       
 20961      * set focus on its own (via `setFocus`), typically if there is no
       
 20962      * focusable input in the block.
       
 20963      *
       
 20964      * @param {FocusEvent} event Focus event.
       
 20965      */
       
 20966     function onFocus(event) {
       
 20967       // Check synchronously because a non-selected block might be
       
 20968       // getting data through `useSelect` asynchronously.
       
 20969       if (isBlockSelected(clientId)) {
       
 20970         // Potentially change selection away from rich text.
       
 20971         if (!event.target.isContentEditable) {
       
 20972           selectionChange(clientId);
       
 20973         }
       
 20974 
       
 20975         return;
       
 20976       } // If an inner block is focussed, that block is resposible for
       
 20977       // setting the selected block.
       
 20978 
       
 20979 
       
 20980       if (!isInsideRootBlock(node, event.target)) {
       
 20981         return;
       
 20982       }
       
 20983 
       
 20984       selectBlock(clientId);
       
 20985     }
       
 20986 
       
 20987     node.addEventListener('focusin', onFocus);
       
 20988     return () => {
       
 20989       node.removeEventListener('focusin', onFocus);
       
 20990     };
       
 20991   }, [isBlockSelected, selectBlock]);
       
 20992 }
       
 20993 
       
 20994 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js
       
 20995 /**
       
 20996  * WordPress dependencies
       
 20997  */
       
 20998 
       
 20999 
       
 21000 
       
 21001 
       
 21002 /**
       
 21003  * Internal dependencies
       
 21004  */
       
 21005 
       
 21006 
       
 21007 /**
       
 21008  * Adds block behaviour:
       
 21009  *   - Removes the block on BACKSPACE.
       
 21010  *   - Inserts a default block on ENTER.
       
 21011  *   - Disables dragging of block contents.
       
 21012  *
       
 21013  * @param {string} clientId Block client ID.
       
 21014  */
       
 21015 
       
 21016 function useEventHandlers(clientId) {
       
 21017   const isSelected = Object(external_wp_data_["useSelect"])(select => select(store).isBlockSelected(clientId), [clientId]);
       
 21018   const {
       
 21019     getBlockRootClientId,
       
 21020     getBlockIndex
       
 21021   } = Object(external_wp_data_["useSelect"])(store);
       
 21022   const {
       
 21023     insertDefaultBlock,
       
 21024     removeBlock
       
 21025   } = Object(external_wp_data_["useDispatch"])(store);
       
 21026   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 21027     if (!isSelected) {
       
 21028       return;
       
 21029     }
       
 21030     /**
       
 21031      * Interprets keydown event intent to remove or insert after block if
       
 21032      * key event occurs on wrapper node. This can occur when the block has
       
 21033      * no text fields of its own, particularly after initial insertion, to
       
 21034      * allow for easy deletion and continuous writing flow to add additional
       
 21035      * content.
       
 21036      *
       
 21037      * @param {KeyboardEvent} event Keydown event.
       
 21038      */
       
 21039 
       
 21040 
       
 21041     function onKeyDown(event) {
       
 21042       const {
       
 21043         keyCode,
       
 21044         target
       
 21045       } = event;
       
 21046 
       
 21047       if (keyCode !== external_wp_keycodes_["ENTER"] && keyCode !== external_wp_keycodes_["BACKSPACE"] && keyCode !== external_wp_keycodes_["DELETE"]) {
       
 21048         return;
       
 21049       }
       
 21050 
       
 21051       if (target !== node || Object(external_wp_dom_["isTextField"])(target)) {
       
 21052         return;
       
 21053       }
       
 21054 
       
 21055       event.preventDefault();
       
 21056 
       
 21057       if (keyCode === external_wp_keycodes_["ENTER"]) {
       
 21058         insertDefaultBlock({}, getBlockRootClientId(clientId), getBlockIndex(clientId) + 1);
       
 21059       } else {
       
 21060         removeBlock(clientId);
       
 21061       }
       
 21062     }
       
 21063     /**
       
 21064      * Prevents default dragging behavior within a block. To do: we must
       
 21065      * handle this in the future and clean up the drag target.
       
 21066      *
       
 21067      * @param {DragEvent} event Drag event.
       
 21068      */
       
 21069 
       
 21070 
       
 21071     function onDragStart(event) {
       
 21072       event.preventDefault();
       
 21073     }
       
 21074 
       
 21075     node.addEventListener('keydown', onKeyDown);
       
 21076     node.addEventListener('dragstart', onDragStart);
       
 21077     return () => {
       
 21078       node.removeEventListener('keydown', onKeyDown);
       
 21079       node.removeEventListener('dragstart', onDragStart);
       
 21080     };
       
 21081   }, [clientId, isSelected, getBlockRootClientId, getBlockIndex, insertDefaultBlock, removeBlock]);
       
 21082 }
       
 21083 
       
 21084 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-nav-mode-exit.js
       
 21085 /**
       
 21086  * WordPress dependencies
       
 21087  */
       
 21088 
       
 21089 
       
 21090 /**
       
 21091  * Internal dependencies
       
 21092  */
       
 21093 
       
 21094 
       
 21095 /**
       
 21096  * Allows navigation mode to be exited by clicking in the selected block.
       
 21097  *
       
 21098  * @param {string} clientId Block client ID.
       
 21099  */
       
 21100 
       
 21101 function useNavModeExit(clientId) {
       
 21102   const {
       
 21103     isNavigationMode,
       
 21104     isBlockSelected
       
 21105   } = Object(external_wp_data_["useSelect"])(store);
       
 21106   const {
       
 21107     setNavigationMode,
       
 21108     selectBlock
       
 21109   } = Object(external_wp_data_["useDispatch"])(store);
       
 21110   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 21111     function onMouseDown(event) {
       
 21112       // Don't select a block if it's already handled by a child
       
 21113       // block.
       
 21114       if (isNavigationMode() && !event.defaultPrevented) {
       
 21115         // Prevent focus from moving to the block.
       
 21116         event.preventDefault(); // When clicking on a selected block, exit navigation mode.
       
 21117 
       
 21118         if (isBlockSelected(clientId)) {
       
 21119           setNavigationMode(false);
       
 21120         } else {
       
 21121           selectBlock(clientId);
       
 21122         }
       
 21123       }
       
 21124     }
       
 21125 
       
 21126     node.addEventListener('mousedown', onMouseDown);
       
 21127     return () => {
       
 21128       node.addEventListener('mousedown', onMouseDown);
       
 21129     };
       
 21130   }, [clientId, isNavigationMode, isBlockSelected, setNavigationMode]);
       
 21131 }
       
 21132 
       
 21133 // EXTERNAL MODULE: ./node_modules/dom-scroll-into-view/lib/index.js
       
 21134 var dom_scroll_into_view_lib = __webpack_require__("9Do8");
       
 21135 var dom_scroll_into_view_lib_default = /*#__PURE__*/__webpack_require__.n(dom_scroll_into_view_lib);
       
 21136 
       
 21137 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-scroll-into-view.js
       
 21138 /**
       
 21139  * External dependencies
       
 21140  */
       
 21141 
       
 21142 /**
       
 21143  * WordPress dependencies
       
 21144  */
       
 21145 
       
 21146 /**
       
 21147  * WordPress dependencies
       
 21148  */
       
 21149 
       
 21150 
       
 21151 
       
 21152 
       
 21153 /**
       
 21154  * Internal dependencies
       
 21155  */
       
 21156 
       
 21157 
       
 21158 function useScrollIntoView(clientId) {
       
 21159   const ref = Object(external_wp_element_["useRef"])();
       
 21160   const isSelectionEnd = Object(external_wp_data_["useSelect"])(select => {
       
 21161     const {
       
 21162       isBlockSelected,
       
 21163       getBlockSelectionEnd
       
 21164     } = select(store);
       
 21165     return isBlockSelected(clientId) || getBlockSelectionEnd() === clientId;
       
 21166   }, [clientId]); // Note that we can't use `useRefEffect` here, since an element change does
       
 21167   // not mean we can scroll. `isSelectionEnd` should be the sole dependency,
       
 21168   // while with `useRefEffect`, the element is a dependency as well.
       
 21169 
       
 21170   Object(external_wp_element_["useEffect"])(() => {
       
 21171     if (!isSelectionEnd) {
       
 21172       return;
       
 21173     }
       
 21174 
       
 21175     const extentNode = ref.current;
       
 21176 
       
 21177     if (!extentNode) {
       
 21178       return;
       
 21179     } // If the block is focused, the browser will already have scrolled into
       
 21180     // view if necessary.
       
 21181 
       
 21182 
       
 21183     if (extentNode.contains(extentNode.ownerDocument.activeElement)) {
       
 21184       return;
       
 21185     }
       
 21186 
       
 21187     const scrollContainer = Object(external_wp_dom_["getScrollContainer"])(extentNode) || extentNode.ownerDocument.defaultView; // If there's no scroll container, it follows that there's no scrollbar
       
 21188     // and thus there's no need to try to scroll into view.
       
 21189 
       
 21190     if (!scrollContainer) {
       
 21191       return;
       
 21192     }
       
 21193 
       
 21194     dom_scroll_into_view_lib_default()(extentNode, scrollContainer, {
       
 21195       onlyScrollIfNeeded: true
       
 21196     });
       
 21197   }, [isSelectionEnd]);
       
 21198   return ref;
       
 21199 }
       
 21200 
       
 21201 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-multi-selection.js
       
 21202 /**
       
 21203  * WordPress dependencies
       
 21204  */
       
 21205 
       
 21206 
       
 21207 /**
       
 21208  * Internal dependencies
       
 21209  */
       
 21210 
       
 21211 
       
 21212 
 18050 
 21213 
 18051 function toggleRichText(container, toggle) {
 21214 function toggleRichText(container, toggle) {
 18052   Array.from(container.querySelectorAll('.rich-text')).forEach(function (node) {
 21215   Array.from(container.closest('.is-root-container').querySelectorAll('.rich-text')).forEach(node => {
 18053     if (toggle) {
 21216     if (toggle) {
 18054       node.setAttribute('contenteditable', true);
 21217       node.setAttribute('contenteditable', true);
 18055     } else {
 21218     } else {
 18056       node.removeAttribute('contenteditable');
 21219       node.removeAttribute('contenteditable');
 18057     }
 21220     }
 18058   });
 21221   });
 18059 }
 21222 }
 18060 
 21223 /**
 18061 function useMultiSelection(ref) {
 21224  * Sets a multi-selection based on the native selection across blocks.
 18062   var _useSelect = Object(external_this_wp_data_["useSelect"])(use_multi_selection_selector, []),
 21225  *
 18063       isSelectionEnabled = _useSelect.isSelectionEnabled,
 21226  * @param {string} clientId Block client ID.
 18064       isMultiSelecting = _useSelect.isMultiSelecting,
 21227  */
 18065       multiSelectedBlockClientIds = _useSelect.multiSelectedBlockClientIds,
 21228 
 18066       hasMultiSelection = _useSelect.hasMultiSelection,
 21229 
 18067       getBlockParents = _useSelect.getBlockParents,
 21230 function useMultiSelection(clientId) {
 18068       selectedBlockClientId = _useSelect.selectedBlockClientId;
 21231   const {
 18069 
 21232     startMultiSelect,
 18070   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 21233     stopMultiSelect,
 18071       startMultiSelect = _useDispatch.startMultiSelect,
 21234     multiSelect,
 18072       stopMultiSelect = _useDispatch.stopMultiSelect,
 21235     selectBlock
 18073       multiSelect = _useDispatch.multiSelect,
 21236   } = Object(external_wp_data_["useDispatch"])(store);
 18074       selectBlock = _useDispatch.selectBlock;
 21237   const {
 18075 
 21238     isSelectionEnabled,
 18076   var rafId = Object(external_this_wp_element_["useRef"])();
 21239     isBlockSelected,
 18077   var startClientId = Object(external_this_wp_element_["useRef"])();
 21240     getBlockParents,
 18078   var anchorElement = Object(external_this_wp_element_["useRef"])();
 21241     getBlockSelectionStart,
 18079   /**
 21242     hasMultiSelection
 18080    * When the component updates, and there is multi selection, we need to
 21243   } = Object(external_wp_data_["useSelect"])(store);
 18081    * select the entire block contents.
 21244   return Object(external_wp_compose_["useRefEffect"])(node => {
 18082    */
 21245     const {
 18083 
 21246       ownerDocument
 18084   Object(external_this_wp_element_["useEffect"])(function () {
 21247     } = node;
 18085     if (!hasMultiSelection || isMultiSelecting) {
 21248     const {
 18086       if (!selectedBlockClientId || isMultiSelecting) {
 21249       defaultView
       
 21250     } = ownerDocument;
       
 21251     let anchorElement;
       
 21252     let rafId;
       
 21253 
       
 21254     function onSelectionChange({
       
 21255       isSelectionEnd
       
 21256     }) {
       
 21257       const selection = defaultView.getSelection(); // If no selection is found, end multi selection and enable all rich
       
 21258       // text areas.
       
 21259 
       
 21260       if (!selection.rangeCount || selection.isCollapsed) {
       
 21261         toggleRichText(node, true);
 18087         return;
 21262         return;
 18088       }
 21263       }
 18089 
 21264 
 18090       var _selection = window.getSelection();
 21265       const endClientId = getBlockClientId(selection.focusNode);
 18091 
 21266       const isSingularSelection = clientId === endClientId;
 18092       if (_selection.rangeCount && !_selection.isCollapsed) {
 21267 
 18093         var blockNode = getBlockDOMNode(selectedBlockClientId);
 21268       if (isSingularSelection) {
 18094 
 21269         selectBlock(clientId); // If the selection is complete (on mouse up), and no
 18095         var _selection$getRangeAt = _selection.getRangeAt(0),
 21270         // multiple blocks have been selected, set focus back to the
 18096             startContainer = _selection$getRangeAt.startContainer,
 21271         // anchor element. if the anchor element contains the
 18097             endContainer = _selection$getRangeAt.endContainer;
 21272         // selection. Additionally, rich text elements that were
 18098 
 21273         // previously disabled can now be enabled again.
 18099         if (!!blockNode && (!blockNode.contains(startContainer) || !blockNode.contains(endContainer))) {
 21274 
 18100           _selection.removeAllRanges();
 21275         if (isSelectionEnd) {
 18101         }
 21276           toggleRichText(node, true);
 18102       }
 21277 
 18103 
 21278           if (selection.rangeCount) {
 18104       return;
 21279             const {
 18105     }
 21280               commonAncestorContainer
 18106 
 21281             } = selection.getRangeAt(0);
 18107     var length = multiSelectedBlockClientIds.length;
 21282 
 18108 
 21283             if (anchorElement.contains(commonAncestorContainer)) {
 18109     if (length < 2) {
 21284               anchorElement.focus();
 18110       return;
 21285             }
 18111     } // These must be in the right DOM order.
       
 18112 
       
 18113 
       
 18114     var start = multiSelectedBlockClientIds[0];
       
 18115     var end = multiSelectedBlockClientIds[length - 1];
       
 18116     var startNode = getBlockDOMNode(start);
       
 18117     var endNode = getBlockDOMNode(end);
       
 18118     var selection = window.getSelection();
       
 18119     var range = document.createRange(); // The most stable way to select the whole block contents is to start
       
 18120     // and end at the deepest points.
       
 18121 
       
 18122     startNode = getDeepestNode(startNode, 'start');
       
 18123     endNode = getDeepestNode(endNode, 'end');
       
 18124     range.setStartBefore(startNode);
       
 18125     range.setEndAfter(endNode);
       
 18126     selection.removeAllRanges();
       
 18127     selection.addRange(range);
       
 18128   }, [hasMultiSelection, isMultiSelecting, multiSelectedBlockClientIds, selectBlock, selectedBlockClientId]);
       
 18129   var onSelectionChange = Object(external_this_wp_element_["useCallback"])(function (_ref) {
       
 18130     var isSelectionEnd = _ref.isSelectionEnd;
       
 18131     var selection = window.getSelection(); // If no selection is found, end multi selection and enable all rich
       
 18132     // text areas.
       
 18133 
       
 18134     if (!selection.rangeCount || selection.isCollapsed) {
       
 18135       toggleRichText(ref.current, true);
       
 18136       return;
       
 18137     }
       
 18138 
       
 18139     var clientId = getBlockClientId(selection.focusNode);
       
 18140     var isSingularSelection = startClientId.current === clientId;
       
 18141 
       
 18142     if (isSingularSelection) {
       
 18143       selectBlock(clientId); // If the selection is complete (on mouse up), and no multiple
       
 18144       // blocks have been selected, set focus back to the anchor element
       
 18145       // if the anchor element contains the selection. Additionally, rich
       
 18146       // text elements that were previously disabled can now be enabled
       
 18147       // again.
       
 18148 
       
 18149       if (isSelectionEnd) {
       
 18150         toggleRichText(ref.current, true);
       
 18151 
       
 18152         if (selection.rangeCount) {
       
 18153           var _selection$getRangeAt2 = selection.getRangeAt(0),
       
 18154               commonAncestorContainer = _selection$getRangeAt2.commonAncestorContainer;
       
 18155 
       
 18156           if (anchorElement.current.contains(commonAncestorContainer)) {
       
 18157             anchorElement.current.focus();
       
 18158           }
 21286           }
 18159         }
 21287         }
       
 21288       } else {
       
 21289         const startPath = [...getBlockParents(clientId), clientId];
       
 21290         const endPath = [...getBlockParents(endClientId), endClientId];
       
 21291         const depth = Math.min(startPath.length, endPath.length) - 1;
       
 21292         multiSelect(startPath[depth], endPath[depth]);
 18160       }
 21293       }
 18161     } else {
 21294     }
 18162       var startPath = [].concat(Object(toConsumableArray["a" /* default */])(getBlockParents(startClientId.current)), [startClientId.current]);
 21295 
 18163       var endPath = [].concat(Object(toConsumableArray["a" /* default */])(getBlockParents(clientId)), [clientId]);
 21296     function onSelectionEnd() {
 18164       var depth = Math.min(startPath.length, endPath.length) - 1;
 21297       ownerDocument.removeEventListener('selectionchange', onSelectionChange); // Equivalent to attaching the listener once.
 18165       multiSelect(startPath[depth], endPath[depth]);
 21298 
 18166     }
 21299       defaultView.removeEventListener('mouseup', onSelectionEnd); // The browser selection won't have updated yet at this point,
 18167   }, [selectBlock, getBlockParents, multiSelect]);
 21300       // so wait until the next animation frame to get the browser
 18168   /**
 21301       // selection.
 18169    * Handles a mouseup event to end the current mouse multi-selection.
 21302 
 18170    */
 21303       rafId = defaultView.requestAnimationFrame(() => {
 18171 
 21304         onSelectionChange({
 18172   var onSelectionEnd = Object(external_this_wp_element_["useCallback"])(function () {
 21305           isSelectionEnd: true
 18173     document.removeEventListener('selectionchange', onSelectionChange); // Equivalent to attaching the listener once.
 21306         });
 18174 
 21307         stopMultiSelect();
 18175     window.removeEventListener('mouseup', onSelectionEnd); // The browser selection won't have updated yet at this point, so wait
       
 18176     // until the next animation frame to get the browser selection.
       
 18177 
       
 18178     rafId.current = window.requestAnimationFrame(function () {
       
 18179       onSelectionChange({
       
 18180         isSelectionEnd: true
       
 18181       });
 21308       });
 18182       stopMultiSelect();
 21309     }
 18183     });
 21310 
 18184   }, [onSelectionChange, stopMultiSelect]); // Only clean up when unmounting, these are added and cleaned up elsewhere.
 21311     function onMouseLeave({
 18185 
 21312       buttons
 18186   Object(external_this_wp_element_["useEffect"])(function () {
 21313     }) {
 18187     return function () {
 21314       // The primary button must be pressed to initiate selection.
 18188       document.removeEventListener('selectionchange', onSelectionChange);
 21315       // See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
 18189       window.removeEventListener('mouseup', onSelectionEnd);
 21316       if (buttons !== 1) {
 18190       window.cancelAnimationFrame(rafId.current);
 21317         return;
       
 21318       }
       
 21319 
       
 21320       if (!isSelectionEnabled() || !isBlockSelected(clientId)) {
       
 21321         return;
       
 21322       }
       
 21323 
       
 21324       anchorElement = ownerDocument.activeElement;
       
 21325       startMultiSelect(); // `onSelectionStart` is called after `mousedown` and
       
 21326       // `mouseleave` (from a block). The selection ends when
       
 21327       // `mouseup` happens anywhere in the window.
       
 21328 
       
 21329       ownerDocument.addEventListener('selectionchange', onSelectionChange);
       
 21330       defaultView.addEventListener('mouseup', onSelectionEnd); // Removing the contenteditable attributes within the block
       
 21331       // editor is essential for selection to work across editable
       
 21332       // areas. The edible hosts are removed, allowing selection to be
       
 21333       // extended outside the DOM element. `startMultiSelect` sets a
       
 21334       // flag in the store so the rich text components are updated,
       
 21335       // but the rerender may happen very slowly, especially in Safari
       
 21336       // for the blocks that are asynchonously rendered. To ensure the
       
 21337       // browser instantly removes the selection boundaries, we remove
       
 21338       // the contenteditable attributes manually.
       
 21339 
       
 21340       toggleRichText(node, false);
       
 21341     }
       
 21342 
       
 21343     function onMouseDown(event) {
       
 21344       // The main button.
       
 21345       // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
       
 21346       if (!isSelectionEnabled() || event.button !== 0) {
       
 21347         return;
       
 21348       }
       
 21349 
       
 21350       if (event.shiftKey) {
       
 21351         const blockSelectionStart = getBlockSelectionStart();
       
 21352 
       
 21353         if (blockSelectionStart !== clientId) {
       
 21354           toggleRichText(node, false);
       
 21355           multiSelect(blockSelectionStart, clientId);
       
 21356           event.preventDefault();
       
 21357         }
       
 21358       } else if (hasMultiSelection()) {
       
 21359         // Allow user to escape out of a multi-selection to a
       
 21360         // singular selection of a block via click. This is handled
       
 21361         // here since focus handling excludes blocks when there is
       
 21362         // multiselection, as focus can be incurred by starting a
       
 21363         // multiselection (focus moved to first block's multi-
       
 21364         // controls).
       
 21365         selectBlock(clientId);
       
 21366       }
       
 21367     }
       
 21368 
       
 21369     node.addEventListener('mousedown', onMouseDown);
       
 21370     node.addEventListener('mouseleave', onMouseLeave);
       
 21371     return () => {
       
 21372       node.removeEventListener('mousedown', onMouseDown);
       
 21373       node.removeEventListener('mouseleave', onMouseLeave);
       
 21374       ownerDocument.removeEventListener('selectionchange', onSelectionChange);
       
 21375       defaultView.removeEventListener('mouseup', onSelectionEnd);
       
 21376       defaultView.cancelAnimationFrame(rafId);
 18191     };
 21377     };
 18192   }, [onSelectionChange, onSelectionEnd]);
 21378   }, [clientId, startMultiSelect, stopMultiSelect, multiSelect, selectBlock, isSelectionEnabled, isBlockSelected, getBlockParents]);
 18193   /**
 21379 }
 18194    * Binds event handlers to the document for tracking a pending multi-select
 21380 
 18195    * in response to a mousedown event occurring in a rendered block.
 21381 // EXTERNAL MODULE: external ["wp","htmlEntities"]
 18196    */
 21382 var external_wp_htmlEntities_ = __webpack_require__("rmEH");
 18197 
       
 18198   return Object(external_this_wp_element_["useCallback"])(function (clientId) {
       
 18199     if (!isSelectionEnabled) {
       
 18200       return;
       
 18201     }
       
 18202 
       
 18203     startClientId.current = clientId;
       
 18204     anchorElement.current = document.activeElement;
       
 18205     startMultiSelect(); // `onSelectionStart` is called after `mousedown` and `mouseleave`
       
 18206     // (from a block). The selection ends when `mouseup` happens anywhere
       
 18207     // in the window.
       
 18208 
       
 18209     document.addEventListener('selectionchange', onSelectionChange);
       
 18210     window.addEventListener('mouseup', onSelectionEnd); // Removing the contenteditable attributes within the block editor is
       
 18211     // essential for selection to work across editable areas. The edible
       
 18212     // hosts are removed, allowing selection to be extended outside the
       
 18213     // DOM element. `startMultiSelect` sets a flag in the store so the rich
       
 18214     // text components are updated, but the rerender may happen very slowly,
       
 18215     // especially in Safari for the blocks that are asynchonously rendered.
       
 18216     // To ensure the browser instantly removes the selection boundaries, we
       
 18217     // remove the contenteditable attributes manually.
       
 18218 
       
 18219     toggleRichText(ref.current, false);
       
 18220   }, [isSelectionEnabled, startMultiSelect, onSelectionEnd]);
       
 18221 }
       
 18222 
 21383 
 18223 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
 21384 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
 18224 var plus = __webpack_require__(290);
 21385 var plus = __webpack_require__("Q4Sy");
 18225 
 21386 
 18226 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/tips.js
 21387 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/tips.js
 18227 
 21388 
 18228 
 21389 
 18229 
       
 18230 /**
 21390 /**
 18231  * WordPress dependencies
 21391  * WordPress dependencies
 18232  */
 21392  */
 18233 
 21393 
 18234 
 21394 
 18235 
 21395 
 18236 var globalTips = [Object(external_this_wp_element_["createInterpolateElement"])(Object(external_this_wp_i18n_["__"])('While writing, you can press <kbd>/</kbd> to quickly insert new blocks.'), {
 21396 const globalTips = [Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["__"])('While writing, you can press <kbd>/</kbd> to quickly insert new blocks.'), {
 18237   kbd: Object(external_this_wp_element_["createElement"])("kbd", null)
 21397   kbd: Object(external_wp_element_["createElement"])("kbd", null)
 18238 }), Object(external_this_wp_element_["createInterpolateElement"])(Object(external_this_wp_i18n_["__"])('Indent a list by pressing <kbd>space</kbd> at the beginning of a line.'), {
 21398 }), Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["__"])('Indent a list by pressing <kbd>space</kbd> at the beginning of a line.'), {
 18239   kbd: Object(external_this_wp_element_["createElement"])("kbd", null)
 21399   kbd: Object(external_wp_element_["createElement"])("kbd", null)
 18240 }), Object(external_this_wp_element_["createInterpolateElement"])(Object(external_this_wp_i18n_["__"])('Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line.'), {
 21400 }), Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["__"])('Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line.'), {
 18241   kbd: Object(external_this_wp_element_["createElement"])("kbd", null)
 21401   kbd: Object(external_wp_element_["createElement"])("kbd", null)
 18242 }), Object(external_this_wp_i18n_["__"])('Drag files into the editor to automatically insert media blocks.'), Object(external_this_wp_i18n_["__"])("Change a block's type by pressing the block icon on the toolbar.")];
 21402 }), Object(external_wp_i18n_["__"])('Drag files into the editor to automatically insert media blocks.'), Object(external_wp_i18n_["__"])("Change a block's type by pressing the block icon on the toolbar.")];
 18243 
 21403 
 18244 function Tips() {
 21404 function Tips() {
 18245   var _useState = Object(external_this_wp_element_["useState"])( // Disable Reason: I'm not generating an HTML id.
 21405   const [randomIndex] = Object(external_wp_element_["useState"])( // Disable Reason: I'm not generating an HTML id.
 18246   // eslint-disable-next-line no-restricted-syntax
 21406   // eslint-disable-next-line no-restricted-syntax
 18247   Math.floor(Math.random() * globalTips.length)),
 21407   Math.floor(Math.random() * globalTips.length));
 18248       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 1),
 21408   return Object(external_wp_element_["createElement"])(external_wp_components_["Tip"], null, globalTips[randomIndex]);
 18249       randomIndex = _useState2[0];
       
 18250 
       
 18251   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Tip"], null, globalTips[randomIndex]);
       
 18252 }
 21409 }
 18253 
 21410 
 18254 /* harmony default export */ var tips = (Tips);
 21411 /* harmony default export */ var tips = (Tips);
 18255 
 21412 
 18256 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
 21413 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
 18257 var close_small = __webpack_require__(177);
 21414 var close_small = __webpack_require__("bWcr");
 18258 
       
 18259 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
       
 18260 var build_module_icon = __webpack_require__(137);
       
 18261 
 21415 
 18262 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
 21416 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
 18263 var search = __webpack_require__(291);
 21417 var search = __webpack_require__("cGtP");
 18264 
 21418 
 18265 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/search-form.js
 21419 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/search-form.js
 18266 
 21420 
 18267 
 21421 
 18268 /**
 21422 /**
 18277 
 21431 
 18278 
 21432 
 18279 
 21433 
 18280 
 21434 
 18281 
 21435 
 18282 function InserterSearchForm(_ref) {
 21436 function InserterSearchForm({
 18283   var className = _ref.className,
 21437   className,
 18284       _onChange = _ref.onChange,
 21438   onChange,
 18285       value = _ref.value;
 21439   value,
 18286   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(InserterSearchForm);
 21440   label,
 18287   var searchInput = Object(external_this_wp_element_["useRef"])(); // Disable reason (no-autofocus): The inserter menu is a modal display, not one which
 21441   placeholder
 18288   // is always visible, and one which already incurs this behavior of autoFocus via
 21442 }) {
 18289   // Popover's focusOnMount.
 21443   const instanceId = Object(external_wp_compose_["useInstanceId"])(InserterSearchForm);
 18290 
 21444   const searchInput = Object(external_wp_element_["useRef"])();
 18291   /* eslint-disable jsx-a11y/no-autofocus */
 21445   return Object(external_wp_element_["createElement"])("div", {
 18292 
       
 18293   return Object(external_this_wp_element_["createElement"])("div", {
       
 18294     className: classnames_default()('block-editor-inserter__search', className)
 21446     className: classnames_default()('block-editor-inserter__search', className)
 18295   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
 21447   }, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
 18296     as: "label",
 21448     as: "label",
 18297     htmlFor: "block-editor-inserter__search-".concat(instanceId)
 21449     htmlFor: `block-editor-inserter__search-${instanceId}`
 18298   }, Object(external_this_wp_i18n_["__"])('Search for a block')), Object(external_this_wp_element_["createElement"])("input", {
 21450   }, label || placeholder), Object(external_wp_element_["createElement"])("input", {
 18299     ref: searchInput,
 21451     ref: searchInput,
 18300     className: "block-editor-inserter__search-input",
 21452     className: "block-editor-inserter__search-input",
 18301     id: "block-editor-inserter__search-".concat(instanceId),
 21453     id: `block-editor-inserter__search-${instanceId}`,
 18302     type: "search",
 21454     type: "search",
 18303     placeholder: Object(external_this_wp_i18n_["__"])('Search for a block'),
 21455     placeholder: placeholder,
 18304     autoFocus: true,
 21456     onChange: event => onChange(event.target.value),
 18305     onChange: function onChange(event) {
       
 18306       return _onChange(event.target.value);
       
 18307     },
       
 18308     autoComplete: "off",
 21457     autoComplete: "off",
 18309     value: value || ''
 21458     value: value || ''
 18310   }), Object(external_this_wp_element_["createElement"])("div", {
 21459   }), Object(external_wp_element_["createElement"])("div", {
 18311     className: "block-editor-inserter__search-icon"
 21460     className: "block-editor-inserter__search-icon"
 18312   }, !!value && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 21461   }, !!value && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 18313     icon: close_small["a" /* default */],
 21462     icon: close_small["a" /* default */],
 18314     label: Object(external_this_wp_i18n_["__"])('Reset search'),
 21463     label: Object(external_wp_i18n_["__"])('Reset search'),
 18315     onClick: function onClick() {
 21464     onClick: () => {
 18316       _onChange('');
 21465       onChange('');
 18317 
       
 18318       searchInput.current.focus();
 21466       searchInput.current.focus();
 18319     }
 21467     }
 18320   }), !value && Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 21468   }), !value && Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 18321     icon: search["a" /* default */]
 21469     icon: search["a" /* default */]
 18322   })));
 21470   })));
 18323   /* eslint-enable jsx-a11y/no-autofocus */
       
 18324 }
 21471 }
 18325 
 21472 
 18326 /* harmony default export */ var search_form = (InserterSearchForm);
 21473 /* harmony default export */ var search_form = (InserterSearchForm);
 18327 
 21474 
 18328 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-card/index.js
 21475 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-card/index.js
 18329 
 21476 
 18330 
 21477 
 18331 /**
 21478 /**
       
 21479  * WordPress dependencies
       
 21480  */
       
 21481 
       
 21482 /**
 18332  * Internal dependencies
 21483  * Internal dependencies
 18333  */
 21484  */
 18334 
 21485 
 18335 
 21486 
 18336 function BlockCard(_ref) {
 21487 
 18337   var blockType = _ref.blockType;
 21488 function BlockCard({
 18338   return Object(external_this_wp_element_["createElement"])("div", {
 21489   title,
       
 21490   icon,
       
 21491   description,
       
 21492   blockType
       
 21493 }) {
       
 21494   if (blockType) {
       
 21495     external_wp_deprecated_default()('`blockType` property in `BlockCard component`', {
       
 21496       since: '5.7',
       
 21497       alternative: '`title, icon and description` properties'
       
 21498     });
       
 21499     ({
       
 21500       title,
       
 21501       icon,
       
 21502       description
       
 21503     } = blockType);
       
 21504   }
       
 21505 
       
 21506   return Object(external_wp_element_["createElement"])("div", {
 18339     className: "block-editor-block-card"
 21507     className: "block-editor-block-card"
 18340   }, Object(external_this_wp_element_["createElement"])(BlockIcon, {
 21508   }, Object(external_wp_element_["createElement"])(BlockIcon, {
 18341     icon: blockType.icon,
 21509     icon: icon,
 18342     showColors: true
 21510     showColors: true
 18343   }), Object(external_this_wp_element_["createElement"])("div", {
 21511   }), Object(external_wp_element_["createElement"])("div", {
 18344     className: "block-editor-block-card__content"
 21512     className: "block-editor-block-card__content"
 18345   }, Object(external_this_wp_element_["createElement"])("h2", {
 21513   }, Object(external_wp_element_["createElement"])("h2", {
 18346     className: "block-editor-block-card__title"
 21514     className: "block-editor-block-card__title"
 18347   }, blockType.title), Object(external_this_wp_element_["createElement"])("span", {
 21515   }, title), Object(external_wp_element_["createElement"])("span", {
 18348     className: "block-editor-block-card__description"
 21516     className: "block-editor-block-card__description"
 18349   }, blockType.description)));
 21517   }, description)));
 18350 }
 21518 }
 18351 
 21519 
 18352 /* harmony default export */ var block_card = (BlockCard);
 21520 /* harmony default export */ var block_card = (BlockCard);
 18353 
 21521 
 18354 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/defaults.js
 21522 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/provider/with-registry-provider.js
       
 21523 
       
 21524 
       
 21525 
 18355 /**
 21526 /**
 18356  * WordPress dependencies
 21527  * WordPress dependencies
 18357  */
 21528  */
 18358 
 21529 
 18359 var PREFERENCES_DEFAULTS = {
       
 18360   insertUsage: {}
       
 18361 };
       
 18362 /**
       
 18363  * The default editor settings
       
 18364  *
       
 18365  * @typedef {Object} SETTINGS_DEFAULT
       
 18366  * @property {boolean} alignWide Enable/Disable Wide/Full Alignments
       
 18367  * @property {Array} availableLegacyWidgets Array of objects representing the legacy widgets available.
       
 18368  * @property {Array} colors Palette colors
       
 18369  * @property {boolean} disableCustomColors Whether or not the custom colors are disabled
       
 18370  * @property {Array} fontSizes Available font sizes
       
 18371  * @property {boolean} disableCustomFontSizes Whether or not the custom font sizes are disabled
       
 18372  * @property {boolean} imageEditing Image Editing settings set to false to disable.
       
 18373  * @property {Array} imageSizes Available image sizes
       
 18374  * @property {number} maxWidth Max width to constraint resizing
       
 18375  * @property {boolean|Array} allowedBlockTypes Allowed block types
       
 18376  * @property {boolean} hasFixedToolbar Whether or not the editor toolbar is fixed
       
 18377  * @property {boolean} hasPermissionsToManageWidgets Whether or not the user is able to manage widgets.
       
 18378  * @property {boolean} focusMode Whether the focus mode is enabled or not
       
 18379  * @property {Array} styles Editor Styles
       
 18380  * @property {boolean} isRTL Whether the editor is in RTL mode
       
 18381  * @property {boolean} keepCaretInsideBlock Whether caret should move between blocks in edit mode
       
 18382  * @property {string} bodyPlaceholder Empty post placeholder
       
 18383  * @property {string} titlePlaceholder Empty title placeholder
       
 18384  * @property {boolean} codeEditingEnabled Whether or not the user can switch to the code editor
       
 18385  * @property {boolean} __experimentalCanUserUseUnfilteredHTML Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.
       
 18386  * @property {boolean} __experimentalEnableLegacyWidgetBlock Whether the user has enabled the Legacy Widget Block
       
 18387  * @property {boolean} __experimentalBlockDirectory Whether the user has enabled the Block Directory
       
 18388  * @property {boolean} __experimentalEnableFullSiteEditing Whether the user has enabled Full Site Editing
       
 18389  * @property {boolean} __experimentalEnableFullSiteEditingDemo Whether the user has enabled Full Site Editing Demo Templates
       
 18390  */
       
 18391 
       
 18392 var SETTINGS_DEFAULTS = {
       
 18393   alignWide: false,
       
 18394   colors: [{
       
 18395     name: Object(external_this_wp_i18n_["__"])('Black'),
       
 18396     slug: 'black',
       
 18397     color: '#000000'
       
 18398   }, {
       
 18399     name: Object(external_this_wp_i18n_["__"])('Cyan bluish gray'),
       
 18400     slug: 'cyan-bluish-gray',
       
 18401     color: '#abb8c3'
       
 18402   }, {
       
 18403     name: Object(external_this_wp_i18n_["__"])('White'),
       
 18404     slug: 'white',
       
 18405     color: '#ffffff'
       
 18406   }, {
       
 18407     name: Object(external_this_wp_i18n_["__"])('Pale pink'),
       
 18408     slug: 'pale-pink',
       
 18409     color: '#f78da7'
       
 18410   }, {
       
 18411     name: Object(external_this_wp_i18n_["__"])('Vivid red'),
       
 18412     slug: 'vivid-red',
       
 18413     color: '#cf2e2e'
       
 18414   }, {
       
 18415     name: Object(external_this_wp_i18n_["__"])('Luminous vivid orange'),
       
 18416     slug: 'luminous-vivid-orange',
       
 18417     color: '#ff6900'
       
 18418   }, {
       
 18419     name: Object(external_this_wp_i18n_["__"])('Luminous vivid amber'),
       
 18420     slug: 'luminous-vivid-amber',
       
 18421     color: '#fcb900'
       
 18422   }, {
       
 18423     name: Object(external_this_wp_i18n_["__"])('Light green cyan'),
       
 18424     slug: 'light-green-cyan',
       
 18425     color: '#7bdcb5'
       
 18426   }, {
       
 18427     name: Object(external_this_wp_i18n_["__"])('Vivid green cyan'),
       
 18428     slug: 'vivid-green-cyan',
       
 18429     color: '#00d084'
       
 18430   }, {
       
 18431     name: Object(external_this_wp_i18n_["__"])('Pale cyan blue'),
       
 18432     slug: 'pale-cyan-blue',
       
 18433     color: '#8ed1fc'
       
 18434   }, {
       
 18435     name: Object(external_this_wp_i18n_["__"])('Vivid cyan blue'),
       
 18436     slug: 'vivid-cyan-blue',
       
 18437     color: '#0693e3'
       
 18438   }, {
       
 18439     name: Object(external_this_wp_i18n_["__"])('Vivid purple'),
       
 18440     slug: 'vivid-purple',
       
 18441     color: '#9b51e0'
       
 18442   }],
       
 18443   fontSizes: [{
       
 18444     name: Object(external_this_wp_i18n_["_x"])('Small', 'font size name'),
       
 18445     size: 13,
       
 18446     slug: 'small'
       
 18447   }, {
       
 18448     name: Object(external_this_wp_i18n_["_x"])('Normal', 'font size name'),
       
 18449     size: 16,
       
 18450     slug: 'normal'
       
 18451   }, {
       
 18452     name: Object(external_this_wp_i18n_["_x"])('Medium', 'font size name'),
       
 18453     size: 20,
       
 18454     slug: 'medium'
       
 18455   }, {
       
 18456     name: Object(external_this_wp_i18n_["_x"])('Large', 'font size name'),
       
 18457     size: 36,
       
 18458     slug: 'large'
       
 18459   }, {
       
 18460     name: Object(external_this_wp_i18n_["_x"])('Huge', 'font size name'),
       
 18461     size: 48,
       
 18462     slug: 'huge'
       
 18463   }],
       
 18464   imageSizes: [{
       
 18465     slug: 'thumbnail',
       
 18466     name: Object(external_this_wp_i18n_["__"])('Thumbnail')
       
 18467   }, {
       
 18468     slug: 'medium',
       
 18469     name: Object(external_this_wp_i18n_["__"])('Medium')
       
 18470   }, {
       
 18471     slug: 'large',
       
 18472     name: Object(external_this_wp_i18n_["__"])('Large')
       
 18473   }, {
       
 18474     slug: 'full',
       
 18475     name: Object(external_this_wp_i18n_["__"])('Full Size')
       
 18476   }],
       
 18477   // Allow plugin to disable Image Editor if need be
       
 18478   imageEditing: true,
       
 18479   // This is current max width of the block inner area
       
 18480   // It's used to constraint image resizing and this value could be overridden later by themes
       
 18481   maxWidth: 580,
       
 18482   // Allowed block types for the editor, defaulting to true (all supported).
       
 18483   allowedBlockTypes: true,
       
 18484   // Maximum upload size in bytes allowed for the site.
       
 18485   maxUploadFileSize: 0,
       
 18486   // List of allowed mime types and file extensions.
       
 18487   allowedMimeTypes: null,
       
 18488   availableLegacyWidgets: {},
       
 18489   hasPermissionsToManageWidgets: false,
       
 18490   __experimentalCanUserUseUnfilteredHTML: false,
       
 18491   __experimentalEnableLegacyWidgetBlock: false,
       
 18492   __experimentalBlockDirectory: false,
       
 18493   __experimentalEnableFullSiteEditing: false,
       
 18494   __experimentalEnableFullSiteEditingDemo: false,
       
 18495   __mobileEnablePageTemplates: false,
       
 18496   gradients: [{
       
 18497     name: Object(external_this_wp_i18n_["__"])('Vivid cyan blue to vivid purple'),
       
 18498     gradient: 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',
       
 18499     slug: 'vivid-cyan-blue-to-vivid-purple'
       
 18500   }, {
       
 18501     name: Object(external_this_wp_i18n_["__"])('Light green cyan to vivid green cyan'),
       
 18502     gradient: 'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',
       
 18503     slug: 'light-green-cyan-to-vivid-green-cyan'
       
 18504   }, {
       
 18505     name: Object(external_this_wp_i18n_["__"])('Luminous vivid amber to luminous vivid orange'),
       
 18506     gradient: 'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',
       
 18507     slug: 'luminous-vivid-amber-to-luminous-vivid-orange'
       
 18508   }, {
       
 18509     name: Object(external_this_wp_i18n_["__"])('Luminous vivid orange to vivid red'),
       
 18510     gradient: 'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',
       
 18511     slug: 'luminous-vivid-orange-to-vivid-red'
       
 18512   }, {
       
 18513     name: Object(external_this_wp_i18n_["__"])('Very light gray to cyan bluish gray'),
       
 18514     gradient: 'linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)',
       
 18515     slug: 'very-light-gray-to-cyan-bluish-gray'
       
 18516   }, {
       
 18517     name: Object(external_this_wp_i18n_["__"])('Cool to warm spectrum'),
       
 18518     gradient: 'linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)',
       
 18519     slug: 'cool-to-warm-spectrum'
       
 18520   }, {
       
 18521     name: Object(external_this_wp_i18n_["__"])('Blush light purple'),
       
 18522     gradient: 'linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)',
       
 18523     slug: 'blush-light-purple'
       
 18524   }, {
       
 18525     name: Object(external_this_wp_i18n_["__"])('Blush bordeaux'),
       
 18526     gradient: 'linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)',
       
 18527     slug: 'blush-bordeaux'
       
 18528   }, {
       
 18529     name: Object(external_this_wp_i18n_["__"])('Luminous dusk'),
       
 18530     gradient: 'linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)',
       
 18531     slug: 'luminous-dusk'
       
 18532   }, {
       
 18533     name: Object(external_this_wp_i18n_["__"])('Pale ocean'),
       
 18534     gradient: 'linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)',
       
 18535     slug: 'pale-ocean'
       
 18536   }, {
       
 18537     name: Object(external_this_wp_i18n_["__"])('Electric grass'),
       
 18538     gradient: 'linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)',
       
 18539     slug: 'electric-grass'
       
 18540   }, {
       
 18541     name: Object(external_this_wp_i18n_["__"])('Midnight'),
       
 18542     gradient: 'linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)',
       
 18543     slug: 'midnight'
       
 18544   }]
       
 18545 };
       
 18546 
       
 18547 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/array.js
       
 18548 
       
 18549 
       
 18550 /**
       
 18551  * External dependencies
       
 18552  */
       
 18553 
       
 18554 /**
       
 18555  * Insert one or multiple elements into a given position of an array.
       
 18556  *
       
 18557  * @param {Array}  array    Source array.
       
 18558  * @param {*}      elements Elements to insert.
       
 18559  * @param {number} index    Insert Position.
       
 18560  *
       
 18561  * @return {Array}          Result.
       
 18562  */
       
 18563 
       
 18564 function insertAt(array, elements, index) {
       
 18565   return [].concat(Object(toConsumableArray["a" /* default */])(array.slice(0, index)), Object(toConsumableArray["a" /* default */])(Object(external_this_lodash_["castArray"])(elements)), Object(toConsumableArray["a" /* default */])(array.slice(index)));
       
 18566 }
       
 18567 /**
       
 18568  * Moves an element in an array.
       
 18569  *
       
 18570  * @param {Array}  array Source array.
       
 18571  * @param {number} from  Source index.
       
 18572  * @param {number} to    Destination index.
       
 18573  * @param {number} count Number of elements to move.
       
 18574  *
       
 18575  * @return {Array}       Result.
       
 18576  */
       
 18577 
       
 18578 function moveTo(array, from, to) {
       
 18579   var count = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
       
 18580 
       
 18581   var withoutMovedElements = Object(toConsumableArray["a" /* default */])(array);
       
 18582 
       
 18583   withoutMovedElements.splice(from, count);
       
 18584   return insertAt(withoutMovedElements, array.slice(from, from + count), to);
       
 18585 }
       
 18586 
       
 18587 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/reducer.js
       
 18588 
       
 18589 
       
 18590 
       
 18591 
       
 18592 function reducer_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; }
       
 18593 
       
 18594 function reducer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { reducer_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 { reducer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 18595 
       
 18596 /**
       
 18597  * External dependencies
       
 18598  */
       
 18599 
       
 18600 /**
       
 18601  * WordPress dependencies
       
 18602  */
       
 18603 
       
 18604 
 21530 
 18605 
 21531 
 18606 /**
 21532 /**
 18607  * Internal dependencies
 21533  * Internal dependencies
 18608  */
 21534  */
 18609 
 21535 
 18610 
 21536 
 18611 
 21537 
 18612 /**
 21538 const withRegistryProvider = Object(external_wp_compose_["createHigherOrderComponent"])(WrappedComponent => {
 18613  * Given an array of blocks, returns an object where each key is a nesting
 21539   return Object(external_wp_data_["withRegistry"])(({
 18614  * context, the value of which is an array of block client IDs existing within
 21540     useSubRegistry = true,
 18615  * that nesting context.
 21541     registry,
 18616  *
 21542     ...props
 18617  * @param {Array}   blocks       Blocks to map.
 21543   }) => {
 18618  * @param {?string} rootClientId Assumed root client ID.
       
 18619  *
       
 18620  * @return {Object} Block order map object.
       
 18621  */
       
 18622 
       
 18623 function mapBlockOrder(blocks) {
       
 18624   var rootClientId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
       
 18625 
       
 18626   var result = Object(defineProperty["a" /* default */])({}, rootClientId, []);
       
 18627 
       
 18628   blocks.forEach(function (block) {
       
 18629     var clientId = block.clientId,
       
 18630         innerBlocks = block.innerBlocks;
       
 18631     result[rootClientId].push(clientId);
       
 18632     Object.assign(result, mapBlockOrder(innerBlocks, clientId));
       
 18633   });
       
 18634   return result;
       
 18635 }
       
 18636 /**
       
 18637  * Given an array of blocks, returns an object where each key contains
       
 18638  * the clientId of the block and the value is the parent of the block.
       
 18639  *
       
 18640  * @param {Array}   blocks       Blocks to map.
       
 18641  * @param {?string} rootClientId Assumed root client ID.
       
 18642  *
       
 18643  * @return {Object} Block order map object.
       
 18644  */
       
 18645 
       
 18646 
       
 18647 function mapBlockParents(blocks) {
       
 18648   var rootClientId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
       
 18649   return blocks.reduce(function (result, block) {
       
 18650     return Object.assign(result, Object(defineProperty["a" /* default */])({}, block.clientId, rootClientId), mapBlockParents(block.innerBlocks, block.clientId));
       
 18651   }, {});
       
 18652 }
       
 18653 /**
       
 18654  * Helper method to iterate through all blocks, recursing into inner blocks,
       
 18655  * applying a transformation function to each one.
       
 18656  * Returns a flattened object with the transformed blocks.
       
 18657  *
       
 18658  * @param {Array} blocks Blocks to flatten.
       
 18659  * @param {Function} transform Transforming function to be applied to each block.
       
 18660  *
       
 18661  * @return {Object} Flattened object.
       
 18662  */
       
 18663 
       
 18664 
       
 18665 function flattenBlocks(blocks) {
       
 18666   var transform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : external_this_lodash_["identity"];
       
 18667   var result = {};
       
 18668 
       
 18669   var stack = Object(toConsumableArray["a" /* default */])(blocks);
       
 18670 
       
 18671   while (stack.length) {
       
 18672     var _stack$shift = stack.shift(),
       
 18673         innerBlocks = _stack$shift.innerBlocks,
       
 18674         block = Object(objectWithoutProperties["a" /* default */])(_stack$shift, ["innerBlocks"]);
       
 18675 
       
 18676     stack.push.apply(stack, Object(toConsumableArray["a" /* default */])(innerBlocks));
       
 18677     result[block.clientId] = transform(block);
       
 18678   }
       
 18679 
       
 18680   return result;
       
 18681 }
       
 18682 /**
       
 18683  * Given an array of blocks, returns an object containing all blocks, without
       
 18684  * attributes, recursing into inner blocks. Keys correspond to the block client
       
 18685  * ID, the value of which is the attributes object.
       
 18686  *
       
 18687  * @param {Array} blocks Blocks to flatten.
       
 18688  *
       
 18689  * @return {Object} Flattened block attributes object.
       
 18690  */
       
 18691 
       
 18692 
       
 18693 function getFlattenedBlocksWithoutAttributes(blocks) {
       
 18694   return flattenBlocks(blocks, function (block) {
       
 18695     return Object(external_this_lodash_["omit"])(block, 'attributes');
       
 18696   });
       
 18697 }
       
 18698 /**
       
 18699  * Given an array of blocks, returns an object containing all block attributes,
       
 18700  * recursing into inner blocks. Keys correspond to the block client ID, the
       
 18701  * value of which is the attributes object.
       
 18702  *
       
 18703  * @param {Array} blocks Blocks to flatten.
       
 18704  *
       
 18705  * @return {Object} Flattened block attributes object.
       
 18706  */
       
 18707 
       
 18708 
       
 18709 function getFlattenedBlockAttributes(blocks) {
       
 18710   return flattenBlocks(blocks, function (block) {
       
 18711     return block.attributes;
       
 18712   });
       
 18713 }
       
 18714 /**
       
 18715  * Given a block order map object, returns *all* of the block client IDs that are
       
 18716  * a descendant of the given root client ID.
       
 18717  *
       
 18718  * Calling this with `rootClientId` set to `''` results in a list of client IDs
       
 18719  * that are in the post. That is, it excludes blocks like fetched reusable
       
 18720  * blocks which are stored into state but not visible. It also excludes
       
 18721  * InnerBlocks controllers, like template parts.
       
 18722  *
       
 18723  * It is important to exclude the full inner block controller and not just the
       
 18724  * inner blocks because in many cases, we need to persist the previous value of
       
 18725  * an inner block controller. To do so, it must be excluded from the list of
       
 18726  * client IDs which are considered to be part of the top-level entity.
       
 18727  *
       
 18728  * @param {Object}  blocksOrder  Object that maps block client IDs to a list of
       
 18729  *                               nested block client IDs.
       
 18730  * @param {?string} rootClientId The root client ID to search. Defaults to ''.
       
 18731  * @param {?Object} controlledInnerBlocks The InnerBlocks controller state.
       
 18732  *
       
 18733  * @return {Array} List of descendant client IDs.
       
 18734  */
       
 18735 
       
 18736 
       
 18737 function getNestedBlockClientIds(blocksOrder) {
       
 18738   var rootClientId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
       
 18739   var controlledInnerBlocks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
       
 18740   return Object(external_this_lodash_["reduce"])(blocksOrder[rootClientId], function (result, clientId) {
       
 18741     if (!!controlledInnerBlocks[clientId]) {
       
 18742       return result;
       
 18743     }
       
 18744 
       
 18745     return [].concat(Object(toConsumableArray["a" /* default */])(result), [clientId], Object(toConsumableArray["a" /* default */])(getNestedBlockClientIds(blocksOrder, clientId)));
       
 18746   }, []);
       
 18747 }
       
 18748 /**
       
 18749  * Returns an object against which it is safe to perform mutating operations,
       
 18750  * given the original object and its current working copy.
       
 18751  *
       
 18752  * @param {Object} original Original object.
       
 18753  * @param {Object} working  Working object.
       
 18754  *
       
 18755  * @return {Object} Mutation-safe object.
       
 18756  */
       
 18757 
       
 18758 
       
 18759 function getMutateSafeObject(original, working) {
       
 18760   if (original === working) {
       
 18761     return reducer_objectSpread({}, original);
       
 18762   }
       
 18763 
       
 18764   return working;
       
 18765 }
       
 18766 /**
       
 18767  * Returns true if the two object arguments have the same keys, or false
       
 18768  * otherwise.
       
 18769  *
       
 18770  * @param {Object} a First object.
       
 18771  * @param {Object} b Second object.
       
 18772  *
       
 18773  * @return {boolean} Whether the two objects have the same keys.
       
 18774  */
       
 18775 
       
 18776 
       
 18777 function hasSameKeys(a, b) {
       
 18778   return Object(external_this_lodash_["isEqual"])(Object(external_this_lodash_["keys"])(a), Object(external_this_lodash_["keys"])(b));
       
 18779 }
       
 18780 /**
       
 18781  * Returns true if, given the currently dispatching action and the previously
       
 18782  * dispatched action, the two actions are updating the same block attribute, or
       
 18783  * false otherwise.
       
 18784  *
       
 18785  * @param {Object} action     Currently dispatching action.
       
 18786  * @param {Object} lastAction Previously dispatched action.
       
 18787  *
       
 18788  * @return {boolean} Whether actions are updating the same block attribute.
       
 18789  */
       
 18790 
       
 18791 function isUpdatingSameBlockAttribute(action, lastAction) {
       
 18792   return action.type === 'UPDATE_BLOCK_ATTRIBUTES' && lastAction !== undefined && lastAction.type === 'UPDATE_BLOCK_ATTRIBUTES' && Object(external_this_lodash_["isEqual"])(action.clientIds, lastAction.clientIds) && hasSameKeys(action.attributes, lastAction.attributes);
       
 18793 }
       
 18794 /**
       
 18795  * Utility returning an object with an empty object value for each key.
       
 18796  *
       
 18797  * @param {Array} objectKeys Keys to fill.
       
 18798  * @return {Object} Object filled with empty object as values for each clientId.
       
 18799  */
       
 18800 
       
 18801 var fillKeysWithEmptyObject = function fillKeysWithEmptyObject(objectKeys) {
       
 18802   return objectKeys.reduce(function (result, key) {
       
 18803     result[key] = {};
       
 18804     return result;
       
 18805   }, {});
       
 18806 };
       
 18807 /**
       
 18808  * Higher-order reducer intended to compute a cache key for each block in the post.
       
 18809  * A new instance of the cache key (empty object) is created each time the block object
       
 18810  * needs to be refreshed (for any change in the block or its children).
       
 18811  *
       
 18812  * @param {Function} reducer Original reducer function.
       
 18813  *
       
 18814  * @return {Function} Enhanced reducer function.
       
 18815  */
       
 18816 
       
 18817 
       
 18818 var reducer_withBlockCache = function withBlockCache(reducer) {
       
 18819   return function () {
       
 18820     var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 18821     var action = arguments.length > 1 ? arguments[1] : undefined;
       
 18822     var newState = reducer(state, action);
       
 18823 
       
 18824     if (newState === state) {
       
 18825       return state;
       
 18826     }
       
 18827 
       
 18828     newState.cache = state.cache ? state.cache : {};
       
 18829     /**
       
 18830      * For each clientId provided, traverses up parents, adding the provided clientIds
       
 18831      * and each parent's clientId to the returned array.
       
 18832      *
       
 18833      * When calling this function consider that it uses the old state, so any state
       
 18834      * modifications made by the `reducer` will not be present.
       
 18835      *
       
 18836      * @param {Array} clientIds an Array of block clientIds.
       
 18837      *
       
 18838      * @return {Array} The provided clientIds and all of their parent clientIds.
       
 18839      */
       
 18840 
       
 18841     var getBlocksWithParentsClientIds = function getBlocksWithParentsClientIds(clientIds) {
       
 18842       return clientIds.reduce(function (result, clientId) {
       
 18843         var current = clientId;
       
 18844 
       
 18845         do {
       
 18846           result.push(current);
       
 18847           current = state.parents[current];
       
 18848         } while (current && !state.controlledInnerBlocks[current]);
       
 18849 
       
 18850         return result;
       
 18851       }, []);
       
 18852     };
       
 18853 
       
 18854     switch (action.type) {
       
 18855       case 'RESET_BLOCKS':
       
 18856         newState.cache = Object(external_this_lodash_["mapValues"])(flattenBlocks(action.blocks), function () {
       
 18857           return {};
       
 18858         });
       
 18859         break;
       
 18860 
       
 18861       case 'RECEIVE_BLOCKS':
       
 18862       case 'INSERT_BLOCKS':
       
 18863         {
       
 18864           var updatedBlockUids = Object(external_this_lodash_["keys"])(flattenBlocks(action.blocks));
       
 18865 
       
 18866           if (action.rootClientId && !state.controlledInnerBlocks[action.rootClientId]) {
       
 18867             updatedBlockUids.push(action.rootClientId);
       
 18868           }
       
 18869 
       
 18870           newState.cache = reducer_objectSpread({}, newState.cache, {}, fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids)));
       
 18871           break;
       
 18872         }
       
 18873 
       
 18874       case 'UPDATE_BLOCK':
       
 18875         newState.cache = reducer_objectSpread({}, newState.cache, {}, fillKeysWithEmptyObject(getBlocksWithParentsClientIds([action.clientId])));
       
 18876         break;
       
 18877 
       
 18878       case 'UPDATE_BLOCK_ATTRIBUTES':
       
 18879         newState.cache = reducer_objectSpread({}, newState.cache, {}, fillKeysWithEmptyObject(getBlocksWithParentsClientIds(action.clientIds)));
       
 18880         break;
       
 18881 
       
 18882       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 18883         var parentClientIds = fillKeysWithEmptyObject(getBlocksWithParentsClientIds(action.replacedClientIds));
       
 18884         newState.cache = reducer_objectSpread({}, Object(external_this_lodash_["omit"])(newState.cache, action.replacedClientIds), {}, Object(external_this_lodash_["omit"])(parentClientIds, action.replacedClientIds), {}, fillKeysWithEmptyObject(Object(external_this_lodash_["keys"])(flattenBlocks(action.blocks))));
       
 18885         break;
       
 18886 
       
 18887       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 18888         newState.cache = reducer_objectSpread({}, Object(external_this_lodash_["omit"])(newState.cache, action.removedClientIds), {}, fillKeysWithEmptyObject(Object(external_this_lodash_["difference"])(getBlocksWithParentsClientIds(action.clientIds), action.clientIds)));
       
 18889         break;
       
 18890 
       
 18891       case 'MOVE_BLOCKS_TO_POSITION':
       
 18892         {
       
 18893           var _updatedBlockUids = Object(toConsumableArray["a" /* default */])(action.clientIds);
       
 18894 
       
 18895           if (action.fromRootClientId) {
       
 18896             _updatedBlockUids.push(action.fromRootClientId);
       
 18897           }
       
 18898 
       
 18899           if (action.toRootClientId) {
       
 18900             _updatedBlockUids.push(action.toRootClientId);
       
 18901           }
       
 18902 
       
 18903           newState.cache = reducer_objectSpread({}, newState.cache, {}, fillKeysWithEmptyObject(getBlocksWithParentsClientIds(_updatedBlockUids)));
       
 18904           break;
       
 18905         }
       
 18906 
       
 18907       case 'MOVE_BLOCKS_UP':
       
 18908       case 'MOVE_BLOCKS_DOWN':
       
 18909         {
       
 18910           var _updatedBlockUids2 = [];
       
 18911 
       
 18912           if (action.rootClientId) {
       
 18913             _updatedBlockUids2.push(action.rootClientId);
       
 18914           }
       
 18915 
       
 18916           newState.cache = reducer_objectSpread({}, newState.cache, {}, fillKeysWithEmptyObject(getBlocksWithParentsClientIds(_updatedBlockUids2)));
       
 18917           break;
       
 18918         }
       
 18919 
       
 18920       case 'SAVE_REUSABLE_BLOCK_SUCCESS':
       
 18921         {
       
 18922           var _updatedBlockUids3 = Object(external_this_lodash_["keys"])(Object(external_this_lodash_["omitBy"])(newState.attributes, function (attributes, clientId) {
       
 18923             return newState.byClientId[clientId].name !== 'core/block' || attributes.ref !== action.updatedId;
       
 18924           }));
       
 18925 
       
 18926           newState.cache = reducer_objectSpread({}, newState.cache, {}, fillKeysWithEmptyObject(getBlocksWithParentsClientIds(_updatedBlockUids3)));
       
 18927         }
       
 18928     }
       
 18929 
       
 18930     return newState;
       
 18931   };
       
 18932 };
       
 18933 /**
       
 18934  * Higher-order reducer intended to augment the blocks reducer, assigning an
       
 18935  * `isPersistentChange` property value corresponding to whether a change in
       
 18936  * state can be considered as persistent. All changes are considered persistent
       
 18937  * except when updating the same block attribute as in the previous action.
       
 18938  *
       
 18939  * @param {Function} reducer Original reducer function.
       
 18940  *
       
 18941  * @return {Function} Enhanced reducer function.
       
 18942  */
       
 18943 
       
 18944 
       
 18945 function withPersistentBlockChange(reducer) {
       
 18946   var lastAction;
       
 18947   var markNextChangeAsNotPersistent = false;
       
 18948   return function (state, action) {
       
 18949     var nextState = reducer(state, action);
       
 18950     var isExplicitPersistentChange = action.type === 'MARK_LAST_CHANGE_AS_PERSISTENT' || markNextChangeAsNotPersistent; // Defer to previous state value (or default) unless changing or
       
 18951     // explicitly marking as persistent.
       
 18952 
       
 18953     if (state === nextState && !isExplicitPersistentChange) {
       
 18954       markNextChangeAsNotPersistent = action.type === 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT';
       
 18955       var nextIsPersistentChange = Object(external_this_lodash_["get"])(state, ['isPersistentChange'], true);
       
 18956 
       
 18957       if (state.isPersistentChange === nextIsPersistentChange) {
       
 18958         return state;
       
 18959       }
       
 18960 
       
 18961       return reducer_objectSpread({}, nextState, {
       
 18962         isPersistentChange: nextIsPersistentChange
       
 18963       });
       
 18964     }
       
 18965 
       
 18966     nextState = reducer_objectSpread({}, nextState, {
       
 18967       isPersistentChange: isExplicitPersistentChange ? !markNextChangeAsNotPersistent : !isUpdatingSameBlockAttribute(action, lastAction)
       
 18968     }); // In comparing against the previous action, consider only those which
       
 18969     // would have qualified as one which would have been ignored or not
       
 18970     // have resulted in a changed state.
       
 18971 
       
 18972     lastAction = action;
       
 18973     markNextChangeAsNotPersistent = action.type === 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT';
       
 18974     return nextState;
       
 18975   };
       
 18976 }
       
 18977 /**
       
 18978  * Higher-order reducer intended to augment the blocks reducer, assigning an
       
 18979  * `isIgnoredChange` property value corresponding to whether a change in state
       
 18980  * can be considered as ignored. A change is considered ignored when the result
       
 18981  * of an action not incurred by direct user interaction.
       
 18982  *
       
 18983  * @param {Function} reducer Original reducer function.
       
 18984  *
       
 18985  * @return {Function} Enhanced reducer function.
       
 18986  */
       
 18987 
       
 18988 
       
 18989 function withIgnoredBlockChange(reducer) {
       
 18990   /**
       
 18991    * Set of action types for which a blocks state change should be ignored.
       
 18992    *
       
 18993    * @type {Set}
       
 18994    */
       
 18995   var IGNORED_ACTION_TYPES = new Set(['RECEIVE_BLOCKS']);
       
 18996   return function (state, action) {
       
 18997     var nextState = reducer(state, action);
       
 18998 
       
 18999     if (nextState !== state) {
       
 19000       nextState.isIgnoredChange = IGNORED_ACTION_TYPES.has(action.type);
       
 19001     }
       
 19002 
       
 19003     return nextState;
       
 19004   };
       
 19005 }
       
 19006 /**
       
 19007  * Higher-order reducer targeting the combined blocks reducer, augmenting
       
 19008  * block client IDs in remove action to include cascade of inner blocks.
       
 19009  *
       
 19010  * @param {Function} reducer Original reducer function.
       
 19011  *
       
 19012  * @return {Function} Enhanced reducer function.
       
 19013  */
       
 19014 
       
 19015 
       
 19016 var reducer_withInnerBlocksRemoveCascade = function withInnerBlocksRemoveCascade(reducer) {
       
 19017   return function (state, action) {
       
 19018     // Gets all children which need to be removed.
       
 19019     var getAllChildren = function getAllChildren(clientIds) {
       
 19020       var result = clientIds;
       
 19021 
       
 19022       for (var i = 0; i < result.length; i++) {
       
 19023         var _result2;
       
 19024 
       
 19025         if (!state.order[result[i]] || action.keepControlledInnerBlocks && action.keepControlledInnerBlocks[result[i]]) {
       
 19026           continue;
       
 19027         }
       
 19028 
       
 19029         if (result === clientIds) {
       
 19030           result = Object(toConsumableArray["a" /* default */])(result);
       
 19031         }
       
 19032 
       
 19033         (_result2 = result).push.apply(_result2, Object(toConsumableArray["a" /* default */])(state.order[result[i]]));
       
 19034       }
       
 19035 
       
 19036       return result;
       
 19037     };
       
 19038 
       
 19039     if (state) {
       
 19040       switch (action.type) {
       
 19041         case 'REMOVE_BLOCKS':
       
 19042           action = reducer_objectSpread({}, action, {
       
 19043             type: 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN',
       
 19044             removedClientIds: getAllChildren(action.clientIds)
       
 19045           });
       
 19046           break;
       
 19047 
       
 19048         case 'REPLACE_BLOCKS':
       
 19049           action = reducer_objectSpread({}, action, {
       
 19050             type: 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN',
       
 19051             replacedClientIds: getAllChildren(action.clientIds)
       
 19052           });
       
 19053           break;
       
 19054       }
       
 19055     }
       
 19056 
       
 19057     return reducer(state, action);
       
 19058   };
       
 19059 };
       
 19060 /**
       
 19061  * Higher-order reducer which targets the combined blocks reducer and handles
       
 19062  * the `RESET_BLOCKS` action. When dispatched, this action will replace all
       
 19063  * blocks that exist in the post, leaving blocks that exist only in state (e.g.
       
 19064  * reusable blocks and blocks controlled by inner blocks controllers) alone.
       
 19065  *
       
 19066  * @param {Function} reducer Original reducer function.
       
 19067  *
       
 19068  * @return {Function} Enhanced reducer function.
       
 19069  */
       
 19070 
       
 19071 
       
 19072 var reducer_withBlockReset = function withBlockReset(reducer) {
       
 19073   return function (state, action) {
       
 19074     if (state && action.type === 'RESET_BLOCKS') {
       
 19075       /**
       
 19076        * A list of client IDs associated with the top level entity (like a
       
 19077        * post or template). It excludes the client IDs of blocks associated
       
 19078        * with other entities, like inner block controllers or reusable blocks.
       
 19079        */
       
 19080       var visibleClientIds = getNestedBlockClientIds(state.order, '', state.controlledInnerBlocks); // pickBy returns only the truthy values from controlledInnerBlocks
       
 19081 
       
 19082       var controlledInnerBlocks = Object.keys(Object(external_this_lodash_["pickBy"])(state.controlledInnerBlocks));
       
 19083       /**
       
 19084        * Each update operation consists of a few parts:
       
 19085        * 1. First, the client IDs associated with the top level entity are
       
 19086        *    removed from the existing state key, leaving in place controlled
       
 19087        *    blocks (like reusable blocks and inner block controllers).
       
 19088        * 2. Second, the blocks from the reset action are used to calculate the
       
 19089        *    individual state keys. This will re-populate the clientIDs which
       
 19090        *    were removed in step 1.
       
 19091        * 3. In some cases, we remove the recalculated inner block controllers,
       
 19092        *    letting their old values persist. We need to do this because the
       
 19093        *    reset block action from a top-level entity is not aware of any
       
 19094        *    inner blocks inside InnerBlock controllers. So if the new values
       
 19095        *    were used, it would not take into account the existing InnerBlocks
       
 19096        *    which already exist in the state for inner block controllers. For
       
 19097        *    example, `attributes` uses the newly computed value for controllers
       
 19098        *    since attributes are stored in the top-level entity. But `order`
       
 19099        *    uses the previous value for the controllers since the new value
       
 19100        *    does not include the order of controlled inner blocks. So if the
       
 19101        *    new value was used, template parts would disappear from the editor
       
 19102        *    whenever you try to undo a change in the top level entity.
       
 19103        */
       
 19104 
       
 19105       return reducer_objectSpread({}, state, {
       
 19106         byClientId: reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state.byClientId, visibleClientIds), {}, getFlattenedBlocksWithoutAttributes(action.blocks)),
       
 19107         attributes: reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state.attributes, visibleClientIds), {}, getFlattenedBlockAttributes(action.blocks)),
       
 19108         order: reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state.order, visibleClientIds), {}, Object(external_this_lodash_["omit"])(mapBlockOrder(action.blocks), controlledInnerBlocks)),
       
 19109         parents: reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state.parents, visibleClientIds), {}, mapBlockParents(action.blocks)),
       
 19110         cache: reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state.cache, visibleClientIds), {}, Object(external_this_lodash_["omit"])(Object(external_this_lodash_["mapValues"])(flattenBlocks(action.blocks), function () {
       
 19111           return {};
       
 19112         }), controlledInnerBlocks))
       
 19113       });
       
 19114     }
       
 19115 
       
 19116     return reducer(state, action);
       
 19117   };
       
 19118 };
       
 19119 /**
       
 19120  * Higher-order reducer which targets the combined blocks reducer and handles
       
 19121  * the `REPLACE_INNER_BLOCKS` action. When dispatched, this action the state
       
 19122  * should become equivalent to the execution of a `REMOVE_BLOCKS` action
       
 19123  * containing all the child's of the root block followed by the execution of
       
 19124  * `INSERT_BLOCKS` with the new blocks.
       
 19125  *
       
 19126  * @param {Function} reducer Original reducer function.
       
 19127  *
       
 19128  * @return {Function} Enhanced reducer function.
       
 19129  */
       
 19130 
       
 19131 
       
 19132 var reducer_withReplaceInnerBlocks = function withReplaceInnerBlocks(reducer) {
       
 19133   return function (state, action) {
       
 19134     if (action.type !== 'REPLACE_INNER_BLOCKS') {
       
 19135       return reducer(state, action);
       
 19136     } // Finds every nested inner block controller. We must check the action blocks
       
 19137     // and not just the block parent state because some inner block controllers
       
 19138     // should be deleted if specified, whereas others should not be deleted. If
       
 19139     // a controlled should not be deleted, then we need to avoid deleting its
       
 19140     // inner blocks from the block state because its inner blocks will not be
       
 19141     // attached to the block in the action.
       
 19142 
       
 19143 
       
 19144     var nestedControllers = {};
       
 19145 
       
 19146     if (Object.keys(state.controlledInnerBlocks).length) {
       
 19147       var stack = Object(toConsumableArray["a" /* default */])(action.blocks);
       
 19148 
       
 19149       while (stack.length) {
       
 19150         var _stack$shift2 = stack.shift(),
       
 19151             innerBlocks = _stack$shift2.innerBlocks,
       
 19152             block = Object(objectWithoutProperties["a" /* default */])(_stack$shift2, ["innerBlocks"]);
       
 19153 
       
 19154         stack.push.apply(stack, Object(toConsumableArray["a" /* default */])(innerBlocks));
       
 19155 
       
 19156         if (!!state.controlledInnerBlocks[block.clientId]) {
       
 19157           nestedControllers[block.clientId] = true;
       
 19158         }
       
 19159       }
       
 19160     } // The `keepControlledInnerBlocks` prop will keep the inner blocks of the
       
 19161     // marked block in the block state so that they can be reattached to the
       
 19162     // marked block when we re-insert everything a few lines below.
       
 19163 
       
 19164 
       
 19165     var stateAfterBlocksRemoval = state;
       
 19166 
       
 19167     if (state.order[action.rootClientId]) {
       
 19168       stateAfterBlocksRemoval = reducer(stateAfterBlocksRemoval, {
       
 19169         type: 'REMOVE_BLOCKS',
       
 19170         keepControlledInnerBlocks: nestedControllers,
       
 19171         clientIds: state.order[action.rootClientId]
       
 19172       });
       
 19173     }
       
 19174 
       
 19175     var stateAfterInsert = stateAfterBlocksRemoval;
       
 19176 
       
 19177     if (action.blocks.length) {
       
 19178       stateAfterInsert = reducer(stateAfterInsert, reducer_objectSpread({}, action, {
       
 19179         type: 'INSERT_BLOCKS',
       
 19180         index: 0
       
 19181       })); // We need to re-attach the block order of the controlled inner blocks.
       
 19182       // Otherwise, an inner block controller's blocks will be deleted entirely
       
 19183       // from its entity..
       
 19184 
       
 19185       stateAfterInsert.order = reducer_objectSpread({}, stateAfterInsert.order, {}, Object(external_this_lodash_["reduce"])(nestedControllers, function (result, value, key) {
       
 19186         if (state.order[key]) {
       
 19187           result[key] = state.order[key];
       
 19188         }
       
 19189 
       
 19190         return result;
       
 19191       }, {}));
       
 19192     }
       
 19193 
       
 19194     return stateAfterInsert;
       
 19195   };
       
 19196 };
       
 19197 /**
       
 19198  * Higher-order reducer which targets the combined blocks reducer and handles
       
 19199  * the `SAVE_REUSABLE_BLOCK_SUCCESS` action. This action can't be handled by
       
 19200  * regular reducers and needs a higher-order reducer since it needs access to
       
 19201  * both `byClientId` and `attributes` simultaneously.
       
 19202  *
       
 19203  * @param {Function} reducer Original reducer function.
       
 19204  *
       
 19205  * @return {Function} Enhanced reducer function.
       
 19206  */
       
 19207 
       
 19208 
       
 19209 var reducer_withSaveReusableBlock = function withSaveReusableBlock(reducer) {
       
 19210   return function (state, action) {
       
 19211     if (state && action.type === 'SAVE_REUSABLE_BLOCK_SUCCESS') {
       
 19212       var id = action.id,
       
 19213           updatedId = action.updatedId; // If a temporary reusable block is saved, we swap the temporary id with the final one
       
 19214 
       
 19215       if (id === updatedId) {
       
 19216         return state;
       
 19217       }
       
 19218 
       
 19219       state = reducer_objectSpread({}, state);
       
 19220       state.attributes = Object(external_this_lodash_["mapValues"])(state.attributes, function (attributes, clientId) {
       
 19221         var name = state.byClientId[clientId].name;
       
 19222 
       
 19223         if (name === 'core/block' && attributes.ref === id) {
       
 19224           return reducer_objectSpread({}, attributes, {
       
 19225             ref: updatedId
       
 19226           });
       
 19227         }
       
 19228 
       
 19229         return attributes;
       
 19230       });
       
 19231     }
       
 19232 
       
 19233     return reducer(state, action);
       
 19234   };
       
 19235 };
       
 19236 /**
       
 19237  * Reducer returning the blocks state.
       
 19238  *
       
 19239  * @param {Object} state  Current state.
       
 19240  * @param {Object} action Dispatched action.
       
 19241  *
       
 19242  * @return {Object} Updated state.
       
 19243  */
       
 19244 
       
 19245 
       
 19246 var reducer_blocks = Object(external_this_lodash_["flow"])(external_this_wp_data_["combineReducers"], reducer_withSaveReusableBlock, // needs to be before withBlockCache
       
 19247 reducer_withBlockCache, // needs to be before withInnerBlocksRemoveCascade
       
 19248 reducer_withInnerBlocksRemoveCascade, reducer_withReplaceInnerBlocks, // needs to be after withInnerBlocksRemoveCascade
       
 19249 reducer_withBlockReset, withPersistentBlockChange, withIgnoredBlockChange)({
       
 19250   byClientId: function byClientId() {
       
 19251     var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19252     var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19253 
       
 19254     switch (action.type) {
       
 19255       case 'RESET_BLOCKS':
       
 19256         return getFlattenedBlocksWithoutAttributes(action.blocks);
       
 19257 
       
 19258       case 'RECEIVE_BLOCKS':
       
 19259       case 'INSERT_BLOCKS':
       
 19260         return reducer_objectSpread({}, state, {}, getFlattenedBlocksWithoutAttributes(action.blocks));
       
 19261 
       
 19262       case 'UPDATE_BLOCK':
       
 19263         // Ignore updates if block isn't known
       
 19264         if (!state[action.clientId]) {
       
 19265           return state;
       
 19266         } // Do nothing if only attributes change.
       
 19267 
       
 19268 
       
 19269         var changes = Object(external_this_lodash_["omit"])(action.updates, 'attributes');
       
 19270 
       
 19271         if (Object(external_this_lodash_["isEmpty"])(changes)) {
       
 19272           return state;
       
 19273         }
       
 19274 
       
 19275         return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.clientId, reducer_objectSpread({}, state[action.clientId], {}, changes)));
       
 19276 
       
 19277       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 19278         if (!action.blocks) {
       
 19279           return state;
       
 19280         }
       
 19281 
       
 19282         return reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state, action.replacedClientIds), {}, getFlattenedBlocksWithoutAttributes(action.blocks));
       
 19283 
       
 19284       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 19285         return Object(external_this_lodash_["omit"])(state, action.removedClientIds);
       
 19286     }
       
 19287 
       
 19288     return state;
       
 19289   },
       
 19290   attributes: function attributes() {
       
 19291     var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19292     var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19293 
       
 19294     switch (action.type) {
       
 19295       case 'RESET_BLOCKS':
       
 19296         return getFlattenedBlockAttributes(action.blocks);
       
 19297 
       
 19298       case 'RECEIVE_BLOCKS':
       
 19299       case 'INSERT_BLOCKS':
       
 19300         return reducer_objectSpread({}, state, {}, getFlattenedBlockAttributes(action.blocks));
       
 19301 
       
 19302       case 'UPDATE_BLOCK':
       
 19303         // Ignore updates if block isn't known or there are no attribute changes.
       
 19304         if (!state[action.clientId] || !action.updates.attributes) {
       
 19305           return state;
       
 19306         }
       
 19307 
       
 19308         return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.clientId, reducer_objectSpread({}, state[action.clientId], {}, action.updates.attributes)));
       
 19309 
       
 19310       case 'UPDATE_BLOCK_ATTRIBUTES':
       
 19311         {
       
 19312           // Avoid a state change if none of the block IDs are known.
       
 19313           if (action.clientIds.every(function (id) {
       
 19314             return !state[id];
       
 19315           })) {
       
 19316             return state;
       
 19317           }
       
 19318 
       
 19319           var next = action.clientIds.reduce(function (accumulator, id) {
       
 19320             return reducer_objectSpread({}, accumulator, Object(defineProperty["a" /* default */])({}, id, Object(external_this_lodash_["reduce"])(action.attributes, function (result, value, key) {
       
 19321               // Consider as updates only changed values.
       
 19322               if (value !== result[key]) {
       
 19323                 result = getMutateSafeObject(state[id], result);
       
 19324                 result[key] = value;
       
 19325               }
       
 19326 
       
 19327               return result;
       
 19328             }, state[id])));
       
 19329           }, {});
       
 19330 
       
 19331           if (action.clientIds.every(function (id) {
       
 19332             return next[id] === state[id];
       
 19333           })) {
       
 19334             return state;
       
 19335           }
       
 19336 
       
 19337           return reducer_objectSpread({}, state, {}, next);
       
 19338         }
       
 19339 
       
 19340       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 19341         if (!action.blocks) {
       
 19342           return state;
       
 19343         }
       
 19344 
       
 19345         return reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state, action.replacedClientIds), {}, getFlattenedBlockAttributes(action.blocks));
       
 19346 
       
 19347       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 19348         return Object(external_this_lodash_["omit"])(state, action.removedClientIds);
       
 19349     }
       
 19350 
       
 19351     return state;
       
 19352   },
       
 19353   order: function order() {
       
 19354     var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19355     var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19356 
       
 19357     switch (action.type) {
       
 19358       case 'RESET_BLOCKS':
       
 19359         return mapBlockOrder(action.blocks);
       
 19360 
       
 19361       case 'RECEIVE_BLOCKS':
       
 19362         return reducer_objectSpread({}, state, {}, Object(external_this_lodash_["omit"])(mapBlockOrder(action.blocks), ''));
       
 19363 
       
 19364       case 'INSERT_BLOCKS':
       
 19365         {
       
 19366           var _action$rootClientId = action.rootClientId,
       
 19367               rootClientId = _action$rootClientId === void 0 ? '' : _action$rootClientId;
       
 19368           var subState = state[rootClientId] || [];
       
 19369           var mappedBlocks = mapBlockOrder(action.blocks, rootClientId);
       
 19370           var _action$index = action.index,
       
 19371               index = _action$index === void 0 ? subState.length : _action$index;
       
 19372           return reducer_objectSpread({}, state, {}, mappedBlocks, Object(defineProperty["a" /* default */])({}, rootClientId, insertAt(subState, mappedBlocks[rootClientId], index)));
       
 19373         }
       
 19374 
       
 19375       case 'MOVE_BLOCKS_TO_POSITION':
       
 19376         {
       
 19377           var _objectSpread7;
       
 19378 
       
 19379           var _action$fromRootClien = action.fromRootClientId,
       
 19380               fromRootClientId = _action$fromRootClien === void 0 ? '' : _action$fromRootClien,
       
 19381               _action$toRootClientI = action.toRootClientId,
       
 19382               toRootClientId = _action$toRootClientI === void 0 ? '' : _action$toRootClientI,
       
 19383               clientIds = action.clientIds;
       
 19384 
       
 19385           var _action$index2 = action.index,
       
 19386               _index = _action$index2 === void 0 ? state[toRootClientId].length : _action$index2; // Moving inside the same parent block
       
 19387 
       
 19388 
       
 19389           if (fromRootClientId === toRootClientId) {
       
 19390             var _subState = state[toRootClientId];
       
 19391 
       
 19392             var fromIndex = _subState.indexOf(clientIds[0]);
       
 19393 
       
 19394             return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, toRootClientId, moveTo(state[toRootClientId], fromIndex, _index, clientIds.length)));
       
 19395           } // Moving from a parent block to another
       
 19396 
       
 19397 
       
 19398           return reducer_objectSpread({}, state, (_objectSpread7 = {}, Object(defineProperty["a" /* default */])(_objectSpread7, fromRootClientId, external_this_lodash_["without"].apply(void 0, [state[fromRootClientId]].concat(Object(toConsumableArray["a" /* default */])(clientIds)))), Object(defineProperty["a" /* default */])(_objectSpread7, toRootClientId, insertAt(state[toRootClientId], clientIds, _index)), _objectSpread7));
       
 19399         }
       
 19400 
       
 19401       case 'MOVE_BLOCKS_UP':
       
 19402         {
       
 19403           var _clientIds = action.clientIds,
       
 19404               _action$rootClientId2 = action.rootClientId,
       
 19405               _rootClientId = _action$rootClientId2 === void 0 ? '' : _action$rootClientId2;
       
 19406 
       
 19407           var firstClientId = Object(external_this_lodash_["first"])(_clientIds);
       
 19408           var _subState2 = state[_rootClientId];
       
 19409 
       
 19410           if (!_subState2.length || firstClientId === Object(external_this_lodash_["first"])(_subState2)) {
       
 19411             return state;
       
 19412           }
       
 19413 
       
 19414           var firstIndex = _subState2.indexOf(firstClientId);
       
 19415 
       
 19416           return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, _rootClientId, moveTo(_subState2, firstIndex, firstIndex - 1, _clientIds.length)));
       
 19417         }
       
 19418 
       
 19419       case 'MOVE_BLOCKS_DOWN':
       
 19420         {
       
 19421           var _clientIds2 = action.clientIds,
       
 19422               _action$rootClientId3 = action.rootClientId,
       
 19423               _rootClientId2 = _action$rootClientId3 === void 0 ? '' : _action$rootClientId3;
       
 19424 
       
 19425           var _firstClientId = Object(external_this_lodash_["first"])(_clientIds2);
       
 19426 
       
 19427           var lastClientId = Object(external_this_lodash_["last"])(_clientIds2);
       
 19428           var _subState3 = state[_rootClientId2];
       
 19429 
       
 19430           if (!_subState3.length || lastClientId === Object(external_this_lodash_["last"])(_subState3)) {
       
 19431             return state;
       
 19432           }
       
 19433 
       
 19434           var _firstIndex = _subState3.indexOf(_firstClientId);
       
 19435 
       
 19436           return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, _rootClientId2, moveTo(_subState3, _firstIndex, _firstIndex + 1, _clientIds2.length)));
       
 19437         }
       
 19438 
       
 19439       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 19440         {
       
 19441           var _clientIds3 = action.clientIds;
       
 19442 
       
 19443           if (!action.blocks) {
       
 19444             return state;
       
 19445           }
       
 19446 
       
 19447           var _mappedBlocks = mapBlockOrder(action.blocks);
       
 19448 
       
 19449           return Object(external_this_lodash_["flow"])([function (nextState) {
       
 19450             return Object(external_this_lodash_["omit"])(nextState, action.replacedClientIds);
       
 19451           }, function (nextState) {
       
 19452             return reducer_objectSpread({}, nextState, {}, Object(external_this_lodash_["omit"])(_mappedBlocks, ''));
       
 19453           }, function (nextState) {
       
 19454             return Object(external_this_lodash_["mapValues"])(nextState, function (subState) {
       
 19455               return Object(external_this_lodash_["reduce"])(subState, function (result, clientId) {
       
 19456                 if (clientId === _clientIds3[0]) {
       
 19457                   return [].concat(Object(toConsumableArray["a" /* default */])(result), Object(toConsumableArray["a" /* default */])(_mappedBlocks['']));
       
 19458                 }
       
 19459 
       
 19460                 if (_clientIds3.indexOf(clientId) === -1) {
       
 19461                   result.push(clientId);
       
 19462                 }
       
 19463 
       
 19464                 return result;
       
 19465               }, []);
       
 19466             });
       
 19467           }])(state);
       
 19468         }
       
 19469 
       
 19470       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 19471         return Object(external_this_lodash_["flow"])([// Remove inner block ordering for removed blocks
       
 19472         function (nextState) {
       
 19473           return Object(external_this_lodash_["omit"])(nextState, action.removedClientIds);
       
 19474         }, // Remove deleted blocks from other blocks' orderings
       
 19475         function (nextState) {
       
 19476           return Object(external_this_lodash_["mapValues"])(nextState, function (subState) {
       
 19477             return external_this_lodash_["without"].apply(void 0, [subState].concat(Object(toConsumableArray["a" /* default */])(action.removedClientIds)));
       
 19478           });
       
 19479         }])(state);
       
 19480     }
       
 19481 
       
 19482     return state;
       
 19483   },
       
 19484   // While technically redundant data as the inverse of `order`, it serves as
       
 19485   // an optimization for the selectors which derive the ancestry of a block.
       
 19486   parents: function parents() {
       
 19487     var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19488     var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19489 
       
 19490     switch (action.type) {
       
 19491       case 'RESET_BLOCKS':
       
 19492         return mapBlockParents(action.blocks);
       
 19493 
       
 19494       case 'RECEIVE_BLOCKS':
       
 19495         return reducer_objectSpread({}, state, {}, mapBlockParents(action.blocks));
       
 19496 
       
 19497       case 'INSERT_BLOCKS':
       
 19498         return reducer_objectSpread({}, state, {}, mapBlockParents(action.blocks, action.rootClientId || ''));
       
 19499 
       
 19500       case 'MOVE_BLOCKS_TO_POSITION':
       
 19501         {
       
 19502           return reducer_objectSpread({}, state, {}, action.clientIds.reduce(function (accumulator, id) {
       
 19503             accumulator[id] = action.toRootClientId || '';
       
 19504             return accumulator;
       
 19505           }, {}));
       
 19506         }
       
 19507 
       
 19508       case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 19509         return reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state, action.replacedClientIds), {}, mapBlockParents(action.blocks, state[action.clientIds[0]]));
       
 19510 
       
 19511       case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
       
 19512         return Object(external_this_lodash_["omit"])(state, action.removedClientIds);
       
 19513     }
       
 19514 
       
 19515     return state;
       
 19516   },
       
 19517   controlledInnerBlocks: function controlledInnerBlocks() {
       
 19518     var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19519 
       
 19520     var _ref = arguments.length > 1 ? arguments[1] : undefined,
       
 19521         type = _ref.type,
       
 19522         clientId = _ref.clientId,
       
 19523         hasControlledInnerBlocks = _ref.hasControlledInnerBlocks;
       
 19524 
       
 19525     if (type === 'SET_HAS_CONTROLLED_INNER_BLOCKS') {
       
 19526       return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, clientId, hasControlledInnerBlocks));
       
 19527     }
       
 19528 
       
 19529     return state;
       
 19530   }
       
 19531 });
       
 19532 /**
       
 19533  * Reducer returning typing state.
       
 19534  *
       
 19535  * @param {boolean} state  Current state.
       
 19536  * @param {Object}  action Dispatched action.
       
 19537  *
       
 19538  * @return {boolean} Updated state.
       
 19539  */
       
 19540 
       
 19541 function reducer_isTyping() {
       
 19542   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
 19543   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19544 
       
 19545   switch (action.type) {
       
 19546     case 'START_TYPING':
       
 19547       return true;
       
 19548 
       
 19549     case 'STOP_TYPING':
       
 19550       return false;
       
 19551   }
       
 19552 
       
 19553   return state;
       
 19554 }
       
 19555 /**
       
 19556  * Reducer returning dragging state.
       
 19557  *
       
 19558  * @param {boolean} state  Current state.
       
 19559  * @param {Object}  action Dispatched action.
       
 19560  *
       
 19561  * @return {boolean} Updated state.
       
 19562  */
       
 19563 
       
 19564 function isDraggingBlocks() {
       
 19565   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
 19566   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19567 
       
 19568   switch (action.type) {
       
 19569     case 'START_DRAGGING_BLOCKS':
       
 19570       return true;
       
 19571 
       
 19572     case 'STOP_DRAGGING_BLOCKS':
       
 19573       return false;
       
 19574   }
       
 19575 
       
 19576   return state;
       
 19577 }
       
 19578 /**
       
 19579  * Reducer returning whether the caret is within formatted text.
       
 19580  *
       
 19581  * @param {boolean} state  Current state.
       
 19582  * @param {Object}  action Dispatched action.
       
 19583  *
       
 19584  * @return {boolean} Updated state.
       
 19585  */
       
 19586 
       
 19587 function reducer_isCaretWithinFormattedText() {
       
 19588   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
 19589   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19590 
       
 19591   switch (action.type) {
       
 19592     case 'ENTER_FORMATTED_TEXT':
       
 19593       return true;
       
 19594 
       
 19595     case 'EXIT_FORMATTED_TEXT':
       
 19596       return false;
       
 19597   }
       
 19598 
       
 19599   return state;
       
 19600 }
       
 19601 /**
       
 19602  * Internal helper reducer for selectionStart and selectionEnd. Can hold a block
       
 19603  * selection, represented by an object with property clientId.
       
 19604  *
       
 19605  * @param {Object} state  Current state.
       
 19606  * @param {Object} action Dispatched action.
       
 19607  *
       
 19608  * @return {Object} Updated state.
       
 19609  */
       
 19610 
       
 19611 function reducer_selection() {
       
 19612   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19613   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19614 
       
 19615   switch (action.type) {
       
 19616     case 'CLEAR_SELECTED_BLOCK':
       
 19617       {
       
 19618         if (state.clientId) {
       
 19619           return {};
       
 19620         }
       
 19621 
       
 19622         return state;
       
 19623       }
       
 19624 
       
 19625     case 'SELECT_BLOCK':
       
 19626       if (action.clientId === state.clientId) {
       
 19627         return state;
       
 19628       }
       
 19629 
       
 19630       return {
       
 19631         clientId: action.clientId
       
 19632       };
       
 19633 
       
 19634     case 'REPLACE_INNER_BLOCKS': // REPLACE_INNER_BLOCKS and INSERT_BLOCKS should follow the same logic.
       
 19635 
       
 19636     case 'INSERT_BLOCKS':
       
 19637       {
       
 19638         // REPLACE_INNER_BLOCKS can be called with an empty array.
       
 19639         if (!action.updateSelection || !action.blocks.length) {
       
 19640           return state;
       
 19641         }
       
 19642 
       
 19643         return {
       
 19644           clientId: action.blocks[0].clientId
       
 19645         };
       
 19646       }
       
 19647 
       
 19648     case 'REMOVE_BLOCKS':
       
 19649       if (!action.clientIds || !action.clientIds.length || action.clientIds.indexOf(state.clientId) === -1) {
       
 19650         return state;
       
 19651       }
       
 19652 
       
 19653       return {};
       
 19654 
       
 19655     case 'REPLACE_BLOCKS':
       
 19656       {
       
 19657         if (action.clientIds.indexOf(state.clientId) === -1) {
       
 19658           return state;
       
 19659         }
       
 19660 
       
 19661         var indexToSelect = action.indexToSelect || action.blocks.length - 1;
       
 19662         var blockToSelect = action.blocks[indexToSelect];
       
 19663 
       
 19664         if (!blockToSelect) {
       
 19665           return {};
       
 19666         }
       
 19667 
       
 19668         if (blockToSelect.clientId === state.clientId) {
       
 19669           return state;
       
 19670         }
       
 19671 
       
 19672         var newState = {
       
 19673           clientId: blockToSelect.clientId
       
 19674         };
       
 19675 
       
 19676         if (typeof action.initialPosition === 'number') {
       
 19677           newState.initialPosition = action.initialPosition;
       
 19678         }
       
 19679 
       
 19680         return newState;
       
 19681       }
       
 19682   }
       
 19683 
       
 19684   return state;
       
 19685 }
       
 19686 /**
       
 19687  * Reducer returning the block selection's start.
       
 19688  *
       
 19689  * @param {Object} state  Current state.
       
 19690  * @param {Object} action Dispatched action.
       
 19691  *
       
 19692  * @return {Object} Updated state.
       
 19693  */
       
 19694 
       
 19695 
       
 19696 function reducer_selectionStart() {
       
 19697   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19698   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19699 
       
 19700   switch (action.type) {
       
 19701     case 'SELECTION_CHANGE':
       
 19702       return {
       
 19703         clientId: action.clientId,
       
 19704         attributeKey: action.attributeKey,
       
 19705         offset: action.startOffset
       
 19706       };
       
 19707 
       
 19708     case 'RESET_SELECTION':
       
 19709       return action.selectionStart;
       
 19710 
       
 19711     case 'MULTI_SELECT':
       
 19712       return {
       
 19713         clientId: action.start
       
 19714       };
       
 19715   }
       
 19716 
       
 19717   return reducer_selection(state, action);
       
 19718 }
       
 19719 /**
       
 19720  * Reducer returning the block selection's end.
       
 19721  *
       
 19722  * @param {Object} state  Current state.
       
 19723  * @param {Object} action Dispatched action.
       
 19724  *
       
 19725  * @return {Object} Updated state.
       
 19726  */
       
 19727 
       
 19728 function reducer_selectionEnd() {
       
 19729   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19730   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19731 
       
 19732   switch (action.type) {
       
 19733     case 'SELECTION_CHANGE':
       
 19734       return {
       
 19735         clientId: action.clientId,
       
 19736         attributeKey: action.attributeKey,
       
 19737         offset: action.endOffset
       
 19738       };
       
 19739 
       
 19740     case 'RESET_SELECTION':
       
 19741       return action.selectionEnd;
       
 19742 
       
 19743     case 'MULTI_SELECT':
       
 19744       return {
       
 19745         clientId: action.end
       
 19746       };
       
 19747   }
       
 19748 
       
 19749   return reducer_selection(state, action);
       
 19750 }
       
 19751 /**
       
 19752  * Reducer returning whether the user is multi-selecting.
       
 19753  *
       
 19754  * @param {boolean} state  Current state.
       
 19755  * @param {Object}  action Dispatched action.
       
 19756  *
       
 19757  * @return {boolean} Updated state.
       
 19758  */
       
 19759 
       
 19760 function reducer_isMultiSelecting() {
       
 19761   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
 19762   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19763 
       
 19764   switch (action.type) {
       
 19765     case 'START_MULTI_SELECT':
       
 19766       return true;
       
 19767 
       
 19768     case 'STOP_MULTI_SELECT':
       
 19769       return false;
       
 19770   }
       
 19771 
       
 19772   return state;
       
 19773 }
       
 19774 /**
       
 19775  * Reducer returning whether selection is enabled.
       
 19776  *
       
 19777  * @param {boolean} state  Current state.
       
 19778  * @param {Object}  action Dispatched action.
       
 19779  *
       
 19780  * @return {boolean} Updated state.
       
 19781  */
       
 19782 
       
 19783 function reducer_isSelectionEnabled() {
       
 19784   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
       
 19785   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19786 
       
 19787   switch (action.type) {
       
 19788     case 'TOGGLE_SELECTION':
       
 19789       return action.isSelectionEnabled;
       
 19790   }
       
 19791 
       
 19792   return state;
       
 19793 }
       
 19794 /**
       
 19795  * Reducer returning the intial block selection.
       
 19796  *
       
 19797  * Currently this in only used to restore the selection after block deletion and
       
 19798  * pasting new content.This reducer should eventually be removed in favour of setting
       
 19799  * selection directly.
       
 19800  *
       
 19801  * @param {boolean} state  Current state.
       
 19802  * @param {Object}  action Dispatched action.
       
 19803  *
       
 19804  * @return {?number} Initial position: -1 or undefined.
       
 19805  */
       
 19806 
       
 19807 function reducer_initialPosition(state, action) {
       
 19808   if (action.type === 'REPLACE_BLOCKS' && typeof action.initialPosition === 'number') {
       
 19809     return action.initialPosition;
       
 19810   } else if (action.type === 'SELECT_BLOCK') {
       
 19811     return action.initialPosition;
       
 19812   } else if (action.type === 'REMOVE_BLOCKS') {
       
 19813     return state;
       
 19814   } else if (action.type === 'START_TYPING') {
       
 19815     return state;
       
 19816   } // Reset the state by default (for any action not handled).
       
 19817 
       
 19818 }
       
 19819 function blocksMode() {
       
 19820   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19821   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19822 
       
 19823   if (action.type === 'TOGGLE_BLOCK_MODE') {
       
 19824     var clientId = action.clientId;
       
 19825     return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, clientId, state[clientId] && state[clientId] === 'html' ? 'visual' : 'html'));
       
 19826   }
       
 19827 
       
 19828   return state;
       
 19829 }
       
 19830 /**
       
 19831  * Reducer returning the block insertion point visibility, either null if there
       
 19832  * is not an explicit insertion point assigned, or an object of its `index` and
       
 19833  * `rootClientId`.
       
 19834  *
       
 19835  * @param {Object} state  Current state.
       
 19836  * @param {Object} action Dispatched action.
       
 19837  *
       
 19838  * @return {Object} Updated state.
       
 19839  */
       
 19840 
       
 19841 function insertionPoint() {
       
 19842   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
       
 19843   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19844 
       
 19845   switch (action.type) {
       
 19846     case 'SHOW_INSERTION_POINT':
       
 19847       var rootClientId = action.rootClientId,
       
 19848           index = action.index;
       
 19849       return {
       
 19850         rootClientId: rootClientId,
       
 19851         index: index
       
 19852       };
       
 19853 
       
 19854     case 'HIDE_INSERTION_POINT':
       
 19855       return null;
       
 19856   }
       
 19857 
       
 19858   return state;
       
 19859 }
       
 19860 /**
       
 19861  * Reducer returning whether the post blocks match the defined template or not.
       
 19862  *
       
 19863  * @param {Object} state  Current state.
       
 19864  * @param {Object} action Dispatched action.
       
 19865  *
       
 19866  * @return {boolean} Updated state.
       
 19867  */
       
 19868 
       
 19869 function reducer_template() {
       
 19870   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
       
 19871     isValid: true
       
 19872   };
       
 19873   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19874 
       
 19875   switch (action.type) {
       
 19876     case 'SET_TEMPLATE_VALIDITY':
       
 19877       return reducer_objectSpread({}, state, {
       
 19878         isValid: action.isValid
       
 19879       });
       
 19880   }
       
 19881 
       
 19882   return state;
       
 19883 }
       
 19884 /**
       
 19885  * Reducer returning the editor setting.
       
 19886  *
       
 19887  * @param {Object} state  Current state.
       
 19888  * @param {Object} action Dispatched action.
       
 19889  *
       
 19890  * @return {Object} Updated state.
       
 19891  */
       
 19892 
       
 19893 function reducer_settings() {
       
 19894   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SETTINGS_DEFAULTS;
       
 19895   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19896 
       
 19897   switch (action.type) {
       
 19898     case 'UPDATE_SETTINGS':
       
 19899       return reducer_objectSpread({}, state, {}, action.settings);
       
 19900   }
       
 19901 
       
 19902   return state;
       
 19903 }
       
 19904 /**
       
 19905  * Reducer returning the user preferences.
       
 19906  *
       
 19907  * @param {Object}  state                 Current state.
       
 19908  * @param {Object}  action                Dispatched action.
       
 19909  *
       
 19910  * @return {string} Updated state.
       
 19911  */
       
 19912 
       
 19913 function preferences() {
       
 19914   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PREFERENCES_DEFAULTS;
       
 19915   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19916 
       
 19917   switch (action.type) {
       
 19918     case 'INSERT_BLOCKS':
       
 19919     case 'REPLACE_BLOCKS':
       
 19920       return action.blocks.reduce(function (prevState, block) {
       
 19921         var id = block.name;
       
 19922         var insert = {
       
 19923           name: block.name
       
 19924         };
       
 19925 
       
 19926         if (Object(external_this_wp_blocks_["isReusableBlock"])(block)) {
       
 19927           insert.ref = block.attributes.ref;
       
 19928           id += '/' + block.attributes.ref;
       
 19929         }
       
 19930 
       
 19931         return reducer_objectSpread({}, prevState, {
       
 19932           insertUsage: reducer_objectSpread({}, prevState.insertUsage, Object(defineProperty["a" /* default */])({}, id, {
       
 19933             time: action.time,
       
 19934             count: prevState.insertUsage[id] ? prevState.insertUsage[id].count + 1 : 1,
       
 19935             insert: insert
       
 19936           }))
       
 19937         });
       
 19938       }, state);
       
 19939   }
       
 19940 
       
 19941   return state;
       
 19942 }
       
 19943 /**
       
 19944  * Reducer returning an object where each key is a block client ID, its value
       
 19945  * representing the settings for its nested blocks.
       
 19946  *
       
 19947  * @param {Object} state  Current state.
       
 19948  * @param {Object} action Dispatched action.
       
 19949  *
       
 19950  * @return {Object} Updated state.
       
 19951  */
       
 19952 
       
 19953 var reducer_blockListSettings = function blockListSettings() {
       
 19954   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 19955   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 19956 
       
 19957   switch (action.type) {
       
 19958     // Even if the replaced blocks have the same client ID, our logic
       
 19959     // should correct the state.
       
 19960     case 'REPLACE_BLOCKS':
       
 19961     case 'REMOVE_BLOCKS':
       
 19962       {
       
 19963         return Object(external_this_lodash_["omit"])(state, action.clientIds);
       
 19964       }
       
 19965 
       
 19966     case 'UPDATE_BLOCK_LIST_SETTINGS':
       
 19967       {
       
 19968         var clientId = action.clientId;
       
 19969 
       
 19970         if (!action.settings) {
       
 19971           if (state.hasOwnProperty(clientId)) {
       
 19972             return Object(external_this_lodash_["omit"])(state, clientId);
       
 19973           }
       
 19974 
       
 19975           return state;
       
 19976         }
       
 19977 
       
 19978         if (Object(external_this_lodash_["isEqual"])(state[clientId], action.settings)) {
       
 19979           return state;
       
 19980         }
       
 19981 
       
 19982         return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, clientId, action.settings));
       
 19983       }
       
 19984   }
       
 19985 
       
 19986   return state;
       
 19987 };
       
 19988 /**
       
 19989  * Reducer returning whether the navigation mode is enabled or not.
       
 19990  *
       
 19991  * @param {string} state  Current state.
       
 19992  * @param {Object} action Dispatched action.
       
 19993  *
       
 19994  * @return {string} Updated state.
       
 19995  */
       
 19996 
       
 19997 function reducer_isNavigationMode() {
       
 19998   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
 19999   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 20000 
       
 20001   // Let inserting block always trigger Edit mode.
       
 20002   if (action.type === 'INSERT_BLOCKS') {
       
 20003     return false;
       
 20004   }
       
 20005 
       
 20006   if (action.type === 'SET_NAVIGATION_MODE') {
       
 20007     return action.isNavigationMode;
       
 20008   }
       
 20009 
       
 20010   return state;
       
 20011 }
       
 20012 /**
       
 20013  * Reducer returning whether the block moving mode is enabled or not.
       
 20014  *
       
 20015  * @param {string|null} state  Current state.
       
 20016  * @param {Object} action Dispatched action.
       
 20017  *
       
 20018  * @return {string|null} Updated state.
       
 20019  */
       
 20020 
       
 20021 function reducer_hasBlockMovingClientId() {
       
 20022   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
       
 20023   var action = arguments.length > 1 ? arguments[1] : undefined;
       
 20024 
       
 20025   // Let inserting block always trigger Edit mode.
       
 20026   if (action.type === 'SET_BLOCK_MOVING_MODE') {
       
 20027     return action.hasBlockMovingClientId;
       
 20028   }
       
 20029 
       
 20030   return state;
       
 20031 }
       
 20032 /**
       
 20033  * Reducer return an updated state representing the most recent block attribute
       
 20034  * update. The state is structured as an object where the keys represent the
       
 20035  * client IDs of blocks, the values a subset of attributes from the most recent
       
 20036  * block update. The state is always reset to null if the last action is
       
 20037  * anything other than an attributes update.
       
 20038  *
       
 20039  * @param {Object<string,Object>} state  Current state.
       
 20040  * @param {Object}                action Action object.
       
 20041  *
       
 20042  * @return {[string,Object]} Updated state.
       
 20043  */
       
 20044 
       
 20045 function lastBlockAttributesChange(state, action) {
       
 20046   switch (action.type) {
       
 20047     case 'UPDATE_BLOCK':
       
 20048       if (!action.updates.attributes) {
       
 20049         break;
       
 20050       }
       
 20051 
       
 20052       return Object(defineProperty["a" /* default */])({}, action.clientId, action.updates.attributes);
       
 20053 
       
 20054     case 'UPDATE_BLOCK_ATTRIBUTES':
       
 20055       return action.clientIds.reduce(function (accumulator, id) {
       
 20056         return reducer_objectSpread({}, accumulator, Object(defineProperty["a" /* default */])({}, id, action.attributes));
       
 20057       }, {});
       
 20058   }
       
 20059 
       
 20060   return null;
       
 20061 }
       
 20062 /**
       
 20063  * Reducer returning automatic change state.
       
 20064  *
       
 20065  * @param {boolean} state  Current state.
       
 20066  * @param {Object}  action Dispatched action.
       
 20067  *
       
 20068  * @return {string} Updated state.
       
 20069  */
       
 20070 
       
 20071 function automaticChangeStatus(state, action) {
       
 20072   switch (action.type) {
       
 20073     case 'MARK_AUTOMATIC_CHANGE':
       
 20074       return 'pending';
       
 20075 
       
 20076     case 'MARK_AUTOMATIC_CHANGE_FINAL':
       
 20077       if (state === 'pending') {
       
 20078         return 'final';
       
 20079       }
       
 20080 
       
 20081       return;
       
 20082 
       
 20083     case 'SELECTION_CHANGE':
       
 20084       // As long as the state is not final, ignore any selection changes.
       
 20085       if (state !== 'final') {
       
 20086         return state;
       
 20087       }
       
 20088 
       
 20089       return;
       
 20090     // Undoing an automatic change should still be possible after mouse
       
 20091     // move.
       
 20092 
       
 20093     case 'STOP_TYPING':
       
 20094       return state;
       
 20095   } // Reset the state by default (for any action not handled).
       
 20096 
       
 20097 }
       
 20098 /**
       
 20099  * Reducer returning current highlighted block.
       
 20100  *
       
 20101  * @param {boolean} state  Current highlighted block.
       
 20102  * @param {Object}  action Dispatched action.
       
 20103  *
       
 20104  * @return {string} Updated state.
       
 20105  */
       
 20106 
       
 20107 function highlightedBlock(state, action) {
       
 20108   switch (action.type) {
       
 20109     case 'TOGGLE_BLOCK_HIGHLIGHT':
       
 20110       var clientId = action.clientId,
       
 20111           isHighlighted = action.isHighlighted;
       
 20112 
       
 20113       if (isHighlighted) {
       
 20114         return clientId;
       
 20115       } else if (state === clientId) {
       
 20116         return null;
       
 20117       }
       
 20118 
       
 20119       return state;
       
 20120 
       
 20121     case 'SELECT_BLOCK':
       
 20122       if (action.clientId !== state) {
       
 20123         return null;
       
 20124       }
       
 20125 
       
 20126   }
       
 20127 
       
 20128   return state;
       
 20129 }
       
 20130 /* harmony default export */ var store_reducer = (Object(external_this_wp_data_["combineReducers"])({
       
 20131   blocks: reducer_blocks,
       
 20132   isTyping: reducer_isTyping,
       
 20133   isDraggingBlocks: isDraggingBlocks,
       
 20134   isCaretWithinFormattedText: reducer_isCaretWithinFormattedText,
       
 20135   selectionStart: reducer_selectionStart,
       
 20136   selectionEnd: reducer_selectionEnd,
       
 20137   isMultiSelecting: reducer_isMultiSelecting,
       
 20138   isSelectionEnabled: reducer_isSelectionEnabled,
       
 20139   initialPosition: reducer_initialPosition,
       
 20140   blocksMode: blocksMode,
       
 20141   blockListSettings: reducer_blockListSettings,
       
 20142   insertionPoint: insertionPoint,
       
 20143   template: reducer_template,
       
 20144   settings: reducer_settings,
       
 20145   preferences: preferences,
       
 20146   lastBlockAttributesChange: lastBlockAttributesChange,
       
 20147   isNavigationMode: reducer_isNavigationMode,
       
 20148   hasBlockMovingClientId: reducer_hasBlockMovingClientId,
       
 20149   automaticChangeStatus: automaticChangeStatus,
       
 20150   highlightedBlock: highlightedBlock
       
 20151 }));
       
 20152 
       
 20153 // EXTERNAL MODULE: ./node_modules/refx/refx.js
       
 20154 var refx = __webpack_require__(110);
       
 20155 var refx_default = /*#__PURE__*/__webpack_require__.n(refx);
       
 20156 
       
 20157 // EXTERNAL MODULE: ./node_modules/redux-multi/lib/index.js
       
 20158 var redux_multi_lib = __webpack_require__(263);
       
 20159 var redux_multi_lib_default = /*#__PURE__*/__webpack_require__.n(redux_multi_lib);
       
 20160 
       
 20161 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
       
 20162 var esm_typeof = __webpack_require__(40);
       
 20163 
       
 20164 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/controls.js
       
 20165 
       
 20166 
       
 20167 /**
       
 20168  * WordPress dependencies
       
 20169  */
       
 20170 
       
 20171 /**
       
 20172  * Calls a selector using the current state.
       
 20173  *
       
 20174  * @param {string} storeName    Store name.
       
 20175  * @param {string} selectorName Selector name.
       
 20176  * @param  {Array} args         Selector arguments.
       
 20177  *
       
 20178  * @return {Object} control descriptor.
       
 20179  */
       
 20180 
       
 20181 function controls_select(storeName, selectorName) {
       
 20182   for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
       
 20183     args[_key - 2] = arguments[_key];
       
 20184   }
       
 20185 
       
 20186   return {
       
 20187     type: 'SELECT',
       
 20188     storeName: storeName,
       
 20189     selectorName: selectorName,
       
 20190     args: args
       
 20191   };
       
 20192 }
       
 20193 var controls_controls = {
       
 20194   SELECT: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
       
 20195     return function (_ref) {
       
 20196       var _registry$select;
       
 20197 
       
 20198       var storeName = _ref.storeName,
       
 20199           selectorName = _ref.selectorName,
       
 20200           args = _ref.args;
       
 20201       return (_registry$select = registry.select(storeName))[selectorName].apply(_registry$select, Object(toConsumableArray["a" /* default */])(args));
       
 20202     };
       
 20203   }),
       
 20204   SLEEP: function SLEEP(_ref2) {
       
 20205     var duration = _ref2.duration;
       
 20206     return new Promise(function (resolve) {
       
 20207       setTimeout(resolve, duration);
       
 20208     });
       
 20209   }
       
 20210 };
       
 20211 /* harmony default export */ var store_controls = (controls_controls);
       
 20212 
       
 20213 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/actions.js
       
 20214 
       
 20215 
       
 20216 
       
 20217 function actions_createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = actions_unsupportedIterableToArray(o))) { 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 it, 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; } } }; }
       
 20218 
       
 20219 function actions_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return actions_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(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return actions_arrayLikeToArray(o, minLen); }
       
 20220 
       
 20221 function actions_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; }
       
 20222 
       
 20223 function actions_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; }
       
 20224 
       
 20225 function actions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { actions_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 { actions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 20226 
       
 20227 var _marked = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(ensureDefaultBlock),
       
 20228     _marked2 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(selectPreviousBlock),
       
 20229     _marked3 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(selectNextBlock),
       
 20230     _marked4 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_replaceBlocks),
       
 20231     _marked5 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_moveBlocksToPosition),
       
 20232     _marked6 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_moveBlockToPosition),
       
 20233     _marked7 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_insertBlocks),
       
 20234     _marked8 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_removeBlocks),
       
 20235     _marked9 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_setNavigationMode),
       
 20236     _marked10 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_setBlockMovingClientId),
       
 20237     _marked11 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_duplicateBlocks),
       
 20238     _marked12 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_insertBeforeBlock),
       
 20239     _marked13 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_insertAfterBlock),
       
 20240     _marked14 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_flashBlock);
       
 20241 
       
 20242 /**
       
 20243  * External dependencies
       
 20244  */
       
 20245 
       
 20246 /**
       
 20247  * WordPress dependencies
       
 20248  */
       
 20249 
       
 20250 
       
 20251 
       
 20252 
       
 20253 /**
       
 20254  * Internal dependencies
       
 20255  */
       
 20256 
       
 20257 
       
 20258 /**
       
 20259  * Generator which will yield a default block insert action if there
       
 20260  * are no other blocks at the root of the editor. This generator should be used
       
 20261  * in actions which may result in no blocks remaining in the editor (removal,
       
 20262  * replacement, etc).
       
 20263  */
       
 20264 
       
 20265 function ensureDefaultBlock() {
       
 20266   var count;
       
 20267   return external_this_regeneratorRuntime_default.a.wrap(function ensureDefaultBlock$(_context) {
       
 20268     while (1) {
       
 20269       switch (_context.prev = _context.next) {
       
 20270         case 0:
       
 20271           _context.next = 2;
       
 20272           return controls_select('core/block-editor', 'getBlockCount');
       
 20273 
       
 20274         case 2:
       
 20275           count = _context.sent;
       
 20276 
       
 20277           if (!(count === 0)) {
       
 20278             _context.next = 7;
       
 20279             break;
       
 20280           }
       
 20281 
       
 20282           _context.next = 6;
       
 20283           return actions_insertDefaultBlock();
       
 20284 
       
 20285         case 6:
       
 20286           return _context.abrupt("return", _context.sent);
       
 20287 
       
 20288         case 7:
       
 20289         case "end":
       
 20290           return _context.stop();
       
 20291       }
       
 20292     }
       
 20293   }, _marked);
       
 20294 }
       
 20295 /**
       
 20296  * Returns an action object used in signalling that blocks state should be
       
 20297  * reset to the specified array of blocks, taking precedence over any other
       
 20298  * content reflected as an edit in state.
       
 20299  *
       
 20300  * @param {Array} blocks Array of blocks.
       
 20301  *
       
 20302  * @return {Object} Action object.
       
 20303  */
       
 20304 
       
 20305 
       
 20306 function actions_resetBlocks(blocks) {
       
 20307   return {
       
 20308     type: 'RESET_BLOCKS',
       
 20309     blocks: blocks
       
 20310   };
       
 20311 }
       
 20312 /**
       
 20313  * A block selection object.
       
 20314  *
       
 20315  * @typedef {Object} WPBlockSelection
       
 20316  *
       
 20317  * @property {string} clientId     A block client ID.
       
 20318  * @property {string} attributeKey A block attribute key.
       
 20319  * @property {number} offset       An attribute value offset, based on the rich
       
 20320  *                                 text value. See `wp.richText.create`.
       
 20321  */
       
 20322 
       
 20323 /**
       
 20324  * Returns an action object used in signalling that selection state should be
       
 20325  * reset to the specified selection.
       
 20326  *
       
 20327  * @param {WPBlockSelection} selectionStart The selection start.
       
 20328  * @param {WPBlockSelection} selectionEnd   The selection end.
       
 20329  *
       
 20330  * @return {Object} Action object.
       
 20331  */
       
 20332 
       
 20333 function actions_resetSelection(selectionStart, selectionEnd) {
       
 20334   return {
       
 20335     type: 'RESET_SELECTION',
       
 20336     selectionStart: selectionStart,
       
 20337     selectionEnd: selectionEnd
       
 20338   };
       
 20339 }
       
 20340 /**
       
 20341  * Returns an action object used in signalling that blocks have been received.
       
 20342  * Unlike resetBlocks, these should be appended to the existing known set, not
       
 20343  * replacing.
       
 20344  *
       
 20345  * @param {Object[]} blocks Array of block objects.
       
 20346  *
       
 20347  * @return {Object} Action object.
       
 20348  */
       
 20349 
       
 20350 function receiveBlocks(blocks) {
       
 20351   return {
       
 20352     type: 'RECEIVE_BLOCKS',
       
 20353     blocks: blocks
       
 20354   };
       
 20355 }
       
 20356 /**
       
 20357  * Returns an action object used in signalling that the multiple blocks'
       
 20358  * attributes with the specified client IDs have been updated.
       
 20359  *
       
 20360  * @param {string|string[]} clientIds  Block client IDs.
       
 20361  * @param {Object}          attributes Block attributes to be merged.
       
 20362  *
       
 20363  * @return {Object} Action object.
       
 20364  */
       
 20365 
       
 20366 function actions_updateBlockAttributes(clientIds, attributes) {
       
 20367   return {
       
 20368     type: 'UPDATE_BLOCK_ATTRIBUTES',
       
 20369     clientIds: Object(external_this_lodash_["castArray"])(clientIds),
       
 20370     attributes: attributes
       
 20371   };
       
 20372 }
       
 20373 /**
       
 20374  * Returns an action object used in signalling that the block with the
       
 20375  * specified client ID has been updated.
       
 20376  *
       
 20377  * @param {string} clientId Block client ID.
       
 20378  * @param {Object} updates  Block attributes to be merged.
       
 20379  *
       
 20380  * @return {Object} Action object.
       
 20381  */
       
 20382 
       
 20383 function actions_updateBlock(clientId, updates) {
       
 20384   return {
       
 20385     type: 'UPDATE_BLOCK',
       
 20386     clientId: clientId,
       
 20387     updates: updates
       
 20388   };
       
 20389 }
       
 20390 /**
       
 20391  * Returns an action object used in signalling that the block with the
       
 20392  * specified client ID has been selected, optionally accepting a position
       
 20393  * value reflecting its selection directionality. An initialPosition of -1
       
 20394  * reflects a reverse selection.
       
 20395  *
       
 20396  * @param {string}  clientId        Block client ID.
       
 20397  * @param {?number} initialPosition Optional initial position. Pass as -1 to
       
 20398  *                                  reflect reverse selection.
       
 20399  *
       
 20400  * @return {Object} Action object.
       
 20401  */
       
 20402 
       
 20403 function actions_selectBlock(clientId) {
       
 20404   var initialPosition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
       
 20405   return {
       
 20406     type: 'SELECT_BLOCK',
       
 20407     initialPosition: initialPosition,
       
 20408     clientId: clientId
       
 20409   };
       
 20410 }
       
 20411 /**
       
 20412  * Yields action objects used in signalling that the block preceding the given
       
 20413  * clientId should be selected.
       
 20414  *
       
 20415  * @param {string} clientId Block client ID.
       
 20416  */
       
 20417 
       
 20418 function selectPreviousBlock(clientId) {
       
 20419   var previousBlockClientId;
       
 20420   return external_this_regeneratorRuntime_default.a.wrap(function selectPreviousBlock$(_context2) {
       
 20421     while (1) {
       
 20422       switch (_context2.prev = _context2.next) {
       
 20423         case 0:
       
 20424           _context2.next = 2;
       
 20425           return controls_select('core/block-editor', 'getPreviousBlockClientId', clientId);
       
 20426 
       
 20427         case 2:
       
 20428           previousBlockClientId = _context2.sent;
       
 20429 
       
 20430           if (!previousBlockClientId) {
       
 20431             _context2.next = 7;
       
 20432             break;
       
 20433           }
       
 20434 
       
 20435           _context2.next = 6;
       
 20436           return actions_selectBlock(previousBlockClientId, -1);
       
 20437 
       
 20438         case 6:
       
 20439           return _context2.abrupt("return", [previousBlockClientId]);
       
 20440 
       
 20441         case 7:
       
 20442         case "end":
       
 20443           return _context2.stop();
       
 20444       }
       
 20445     }
       
 20446   }, _marked2);
       
 20447 }
       
 20448 /**
       
 20449  * Yields action objects used in signalling that the block following the given
       
 20450  * clientId should be selected.
       
 20451  *
       
 20452  * @param {string} clientId Block client ID.
       
 20453  */
       
 20454 
       
 20455 function selectNextBlock(clientId) {
       
 20456   var nextBlockClientId;
       
 20457   return external_this_regeneratorRuntime_default.a.wrap(function selectNextBlock$(_context3) {
       
 20458     while (1) {
       
 20459       switch (_context3.prev = _context3.next) {
       
 20460         case 0:
       
 20461           _context3.next = 2;
       
 20462           return controls_select('core/block-editor', 'getNextBlockClientId', clientId);
       
 20463 
       
 20464         case 2:
       
 20465           nextBlockClientId = _context3.sent;
       
 20466 
       
 20467           if (!nextBlockClientId) {
       
 20468             _context3.next = 7;
       
 20469             break;
       
 20470           }
       
 20471 
       
 20472           _context3.next = 6;
       
 20473           return actions_selectBlock(nextBlockClientId);
       
 20474 
       
 20475         case 6:
       
 20476           return _context3.abrupt("return", [nextBlockClientId]);
       
 20477 
       
 20478         case 7:
       
 20479         case "end":
       
 20480           return _context3.stop();
       
 20481       }
       
 20482     }
       
 20483   }, _marked3);
       
 20484 }
       
 20485 /**
       
 20486  * Returns an action object used in signalling that a block multi-selection has started.
       
 20487  *
       
 20488  * @return {Object} Action object.
       
 20489  */
       
 20490 
       
 20491 function actions_startMultiSelect() {
       
 20492   return {
       
 20493     type: 'START_MULTI_SELECT'
       
 20494   };
       
 20495 }
       
 20496 /**
       
 20497  * Returns an action object used in signalling that block multi-selection stopped.
       
 20498  *
       
 20499  * @return {Object} Action object.
       
 20500  */
       
 20501 
       
 20502 function actions_stopMultiSelect() {
       
 20503   return {
       
 20504     type: 'STOP_MULTI_SELECT'
       
 20505   };
       
 20506 }
       
 20507 /**
       
 20508  * Returns an action object used in signalling that block multi-selection changed.
       
 20509  *
       
 20510  * @param {string} start First block of the multi selection.
       
 20511  * @param {string} end   Last block of the multiselection.
       
 20512  *
       
 20513  * @return {Object} Action object.
       
 20514  */
       
 20515 
       
 20516 function actions_multiSelect(start, end) {
       
 20517   return {
       
 20518     type: 'MULTI_SELECT',
       
 20519     start: start,
       
 20520     end: end
       
 20521   };
       
 20522 }
       
 20523 /**
       
 20524  * Returns an action object used in signalling that the block selection is cleared.
       
 20525  *
       
 20526  * @return {Object} Action object.
       
 20527  */
       
 20528 
       
 20529 function actions_clearSelectedBlock() {
       
 20530   return {
       
 20531     type: 'CLEAR_SELECTED_BLOCK'
       
 20532   };
       
 20533 }
       
 20534 /**
       
 20535  * Returns an action object that enables or disables block selection.
       
 20536  *
       
 20537  * @param {boolean} [isSelectionEnabled=true] Whether block selection should
       
 20538  *                                            be enabled.
       
 20539  *
       
 20540  * @return {Object} Action object.
       
 20541  */
       
 20542 
       
 20543 function actions_toggleSelection() {
       
 20544   var isSelectionEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
       
 20545   return {
       
 20546     type: 'TOGGLE_SELECTION',
       
 20547     isSelectionEnabled: isSelectionEnabled
       
 20548   };
       
 20549 }
       
 20550 
       
 20551 function getBlocksWithDefaultStylesApplied(blocks, blockEditorSettings) {
       
 20552   var preferredStyleVariations = Object(external_this_lodash_["get"])(blockEditorSettings, ['__experimentalPreferredStyleVariations', 'value'], {});
       
 20553   return blocks.map(function (block) {
       
 20554     var blockName = block.name;
       
 20555 
       
 20556     if (!Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, 'defaultStylePicker', true)) {
       
 20557       return block;
       
 20558     }
       
 20559 
       
 20560     if (!preferredStyleVariations[blockName]) {
       
 20561       return block;
       
 20562     }
       
 20563 
       
 20564     var className = Object(external_this_lodash_["get"])(block, ['attributes', 'className']);
       
 20565 
       
 20566     if (className === null || className === void 0 ? void 0 : className.includes('is-style-')) {
       
 20567       return block;
       
 20568     }
       
 20569 
       
 20570     var _block$attributes = block.attributes,
       
 20571         attributes = _block$attributes === void 0 ? {} : _block$attributes;
       
 20572     var blockStyle = preferredStyleVariations[blockName];
       
 20573     return actions_objectSpread({}, block, {
       
 20574       attributes: actions_objectSpread({}, attributes, {
       
 20575         className: "".concat(className || '', " is-style-").concat(blockStyle).trim()
       
 20576       })
       
 20577     });
       
 20578   });
       
 20579 }
       
 20580 /**
       
 20581  * Returns an action object signalling that a blocks should be replaced with
       
 20582  * one or more replacement blocks.
       
 20583  *
       
 20584  * @param {(string|string[])} clientIds     Block client ID(s) to replace.
       
 20585  * @param {(Object|Object[])} blocks        Replacement block(s).
       
 20586  * @param {number}            indexToSelect Index of replacement block to select.
       
 20587  * @param {number}            initialPosition Index of caret after in the selected block after the operation.
       
 20588  *
       
 20589  * @yield {Object} Action object.
       
 20590  */
       
 20591 
       
 20592 
       
 20593 function actions_replaceBlocks(clientIds, blocks, indexToSelect, initialPosition) {
       
 20594   var rootClientId, index, block, canInsertBlock;
       
 20595   return external_this_regeneratorRuntime_default.a.wrap(function replaceBlocks$(_context4) {
       
 20596     while (1) {
       
 20597       switch (_context4.prev = _context4.next) {
       
 20598         case 0:
       
 20599           clientIds = Object(external_this_lodash_["castArray"])(clientIds);
       
 20600           _context4.t0 = getBlocksWithDefaultStylesApplied;
       
 20601           _context4.t1 = Object(external_this_lodash_["castArray"])(blocks);
       
 20602           _context4.next = 5;
       
 20603           return controls_select('core/block-editor', 'getSettings');
       
 20604 
       
 20605         case 5:
       
 20606           _context4.t2 = _context4.sent;
       
 20607           blocks = (0, _context4.t0)(_context4.t1, _context4.t2);
       
 20608           _context4.next = 9;
       
 20609           return controls_select('core/block-editor', 'getBlockRootClientId', Object(external_this_lodash_["first"])(clientIds));
       
 20610 
       
 20611         case 9:
       
 20612           rootClientId = _context4.sent;
       
 20613           index = 0;
       
 20614 
       
 20615         case 11:
       
 20616           if (!(index < blocks.length)) {
       
 20617             _context4.next = 21;
       
 20618             break;
       
 20619           }
       
 20620 
       
 20621           block = blocks[index];
       
 20622           _context4.next = 15;
       
 20623           return controls_select('core/block-editor', 'canInsertBlockType', block.name, rootClientId);
       
 20624 
       
 20625         case 15:
       
 20626           canInsertBlock = _context4.sent;
       
 20627 
       
 20628           if (canInsertBlock) {
       
 20629             _context4.next = 18;
       
 20630             break;
       
 20631           }
       
 20632 
       
 20633           return _context4.abrupt("return");
       
 20634 
       
 20635         case 18:
       
 20636           index++;
       
 20637           _context4.next = 11;
       
 20638           break;
       
 20639 
       
 20640         case 21:
       
 20641           _context4.next = 23;
       
 20642           return {
       
 20643             type: 'REPLACE_BLOCKS',
       
 20644             clientIds: clientIds,
       
 20645             blocks: blocks,
       
 20646             time: Date.now(),
       
 20647             indexToSelect: indexToSelect,
       
 20648             initialPosition: initialPosition
       
 20649           };
       
 20650 
       
 20651         case 23:
       
 20652           return _context4.delegateYield(ensureDefaultBlock(), "t3", 24);
       
 20653 
       
 20654         case 24:
       
 20655         case "end":
       
 20656           return _context4.stop();
       
 20657       }
       
 20658     }
       
 20659   }, _marked4);
       
 20660 }
       
 20661 /**
       
 20662  * Returns an action object signalling that a single block should be replaced
       
 20663  * with one or more replacement blocks.
       
 20664  *
       
 20665  * @param {(string|string[])} clientId Block client ID to replace.
       
 20666  * @param {(Object|Object[])} block    Replacement block(s).
       
 20667  *
       
 20668  * @return {Object} Action object.
       
 20669  */
       
 20670 
       
 20671 function replaceBlock(clientId, block) {
       
 20672   return actions_replaceBlocks(clientId, block);
       
 20673 }
       
 20674 /**
       
 20675  * Higher-order action creator which, given the action type to dispatch creates
       
 20676  * an action creator for managing block movement.
       
 20677  *
       
 20678  * @param {string} type Action type to dispatch.
       
 20679  *
       
 20680  * @return {Function} Action creator.
       
 20681  */
       
 20682 
       
 20683 function createOnMove(type) {
       
 20684   return function (clientIds, rootClientId) {
       
 20685     return {
       
 20686       clientIds: Object(external_this_lodash_["castArray"])(clientIds),
       
 20687       type: type,
       
 20688       rootClientId: rootClientId
       
 20689     };
       
 20690   };
       
 20691 }
       
 20692 
       
 20693 var actions_moveBlocksDown = createOnMove('MOVE_BLOCKS_DOWN');
       
 20694 var actions_moveBlocksUp = createOnMove('MOVE_BLOCKS_UP');
       
 20695 /**
       
 20696  * Returns an action object signalling that the given blocks should be moved to
       
 20697  * a new position.
       
 20698  *
       
 20699  * @param  {?string} clientIds        The client IDs of the blocks.
       
 20700  * @param  {?string} fromRootClientId Root client ID source.
       
 20701  * @param  {?string} toRootClientId   Root client ID destination.
       
 20702  * @param  {number}  index            The index to move the blocks to.
       
 20703  *
       
 20704  * @yield {Object} Action object.
       
 20705  */
       
 20706 
       
 20707 function actions_moveBlocksToPosition(clientIds) {
       
 20708   var fromRootClientId,
       
 20709       toRootClientId,
       
 20710       index,
       
 20711       templateLock,
       
 20712       action,
       
 20713       canInsertBlocks,
       
 20714       _args5 = arguments;
       
 20715   return external_this_regeneratorRuntime_default.a.wrap(function moveBlocksToPosition$(_context5) {
       
 20716     while (1) {
       
 20717       switch (_context5.prev = _context5.next) {
       
 20718         case 0:
       
 20719           fromRootClientId = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : '';
       
 20720           toRootClientId = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : '';
       
 20721           index = _args5.length > 3 ? _args5[3] : undefined;
       
 20722           _context5.next = 5;
       
 20723           return controls_select('core/block-editor', 'getTemplateLock', fromRootClientId);
       
 20724 
       
 20725         case 5:
       
 20726           templateLock = _context5.sent;
       
 20727 
       
 20728           if (!(templateLock === 'all')) {
       
 20729             _context5.next = 8;
       
 20730             break;
       
 20731           }
       
 20732 
       
 20733           return _context5.abrupt("return");
       
 20734 
       
 20735         case 8:
       
 20736           action = {
       
 20737             type: 'MOVE_BLOCKS_TO_POSITION',
       
 20738             fromRootClientId: fromRootClientId,
       
 20739             toRootClientId: toRootClientId,
       
 20740             clientIds: clientIds,
       
 20741             index: index
       
 20742           }; // If moving inside the same root block the move is always possible.
       
 20743 
       
 20744           if (!(fromRootClientId === toRootClientId)) {
       
 20745             _context5.next = 13;
       
 20746             break;
       
 20747           }
       
 20748 
       
 20749           _context5.next = 12;
       
 20750           return action;
       
 20751 
       
 20752         case 12:
       
 20753           return _context5.abrupt("return");
       
 20754 
       
 20755         case 13:
       
 20756           if (!(templateLock === 'insert')) {
       
 20757             _context5.next = 15;
       
 20758             break;
       
 20759           }
       
 20760 
       
 20761           return _context5.abrupt("return");
       
 20762 
       
 20763         case 15:
       
 20764           _context5.next = 17;
       
 20765           return controls_select('core/block-editor', 'canInsertBlocks', clientIds, toRootClientId);
       
 20766 
       
 20767         case 17:
       
 20768           canInsertBlocks = _context5.sent;
       
 20769 
       
 20770           if (!canInsertBlocks) {
       
 20771             _context5.next = 21;
       
 20772             break;
       
 20773           }
       
 20774 
       
 20775           _context5.next = 21;
       
 20776           return action;
       
 20777 
       
 20778         case 21:
       
 20779         case "end":
       
 20780           return _context5.stop();
       
 20781       }
       
 20782     }
       
 20783   }, _marked5);
       
 20784 }
       
 20785 /**
       
 20786  * Returns an action object signalling that the given block should be moved to a
       
 20787  * new position.
       
 20788  *
       
 20789  * @param  {?string} clientId         The client ID of the block.
       
 20790  * @param  {?string} fromRootClientId Root client ID source.
       
 20791  * @param  {?string} toRootClientId   Root client ID destination.
       
 20792  * @param  {number}  index            The index to move the block to.
       
 20793  *
       
 20794  * @yield {Object} Action object.
       
 20795  */
       
 20796 
       
 20797 function actions_moveBlockToPosition(clientId) {
       
 20798   var fromRootClientId,
       
 20799       toRootClientId,
       
 20800       index,
       
 20801       _args6 = arguments;
       
 20802   return external_this_regeneratorRuntime_default.a.wrap(function moveBlockToPosition$(_context6) {
       
 20803     while (1) {
       
 20804       switch (_context6.prev = _context6.next) {
       
 20805         case 0:
       
 20806           fromRootClientId = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : '';
       
 20807           toRootClientId = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : '';
       
 20808           index = _args6.length > 3 ? _args6[3] : undefined;
       
 20809           _context6.next = 5;
       
 20810           return actions_moveBlocksToPosition([clientId], fromRootClientId, toRootClientId, index);
       
 20811 
       
 20812         case 5:
       
 20813         case "end":
       
 20814           return _context6.stop();
       
 20815       }
       
 20816     }
       
 20817   }, _marked6);
       
 20818 }
       
 20819 /**
       
 20820  * Returns an action object used in signalling that a single block should be
       
 20821  * inserted, optionally at a specific index respective a root block list.
       
 20822  *
       
 20823  * @param {Object}  block            Block object to insert.
       
 20824  * @param {?number} index            Index at which block should be inserted.
       
 20825  * @param {?string} rootClientId     Optional root client ID of block list on which to insert.
       
 20826  * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.
       
 20827  *
       
 20828  * @return {Object} Action object.
       
 20829  */
       
 20830 
       
 20831 function actions_insertBlock(block, index, rootClientId) {
       
 20832   var updateSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
       
 20833   return actions_insertBlocks([block], index, rootClientId, updateSelection);
       
 20834 }
       
 20835 /**
       
 20836  * Returns an action object used in signalling that an array of blocks should
       
 20837  * be inserted, optionally at a specific index respective a root block list.
       
 20838  *
       
 20839  * @param {Object[]} blocks          Block objects to insert.
       
 20840  * @param {?number}  index           Index at which block should be inserted.
       
 20841  * @param {?string}  rootClientId    Optional root client ID of block list on which to insert.
       
 20842  * @param {?boolean} updateSelection If true block selection will be updated.  If false, block selection will not change. Defaults to true.
       
 20843  *
       
 20844  *  @return {Object} Action object.
       
 20845  */
       
 20846 
       
 20847 function actions_insertBlocks(blocks, index, rootClientId) {
       
 20848   var updateSelection,
       
 20849       allowedBlocks,
       
 20850       _iterator,
       
 20851       _step,
       
 20852       block,
       
 20853       isValid,
       
 20854       _args7 = arguments;
       
 20855 
       
 20856   return external_this_regeneratorRuntime_default.a.wrap(function insertBlocks$(_context7) {
       
 20857     while (1) {
       
 20858       switch (_context7.prev = _context7.next) {
       
 20859         case 0:
       
 20860           updateSelection = _args7.length > 3 && _args7[3] !== undefined ? _args7[3] : true;
       
 20861           _context7.t0 = getBlocksWithDefaultStylesApplied;
       
 20862           _context7.t1 = Object(external_this_lodash_["castArray"])(blocks);
       
 20863           _context7.next = 5;
       
 20864           return controls_select('core/block-editor', 'getSettings');
       
 20865 
       
 20866         case 5:
       
 20867           _context7.t2 = _context7.sent;
       
 20868           blocks = (0, _context7.t0)(_context7.t1, _context7.t2);
       
 20869           allowedBlocks = [];
       
 20870           _iterator = actions_createForOfIteratorHelper(blocks);
       
 20871           _context7.prev = 9;
       
 20872 
       
 20873           _iterator.s();
       
 20874 
       
 20875         case 11:
       
 20876           if ((_step = _iterator.n()).done) {
       
 20877             _context7.next = 19;
       
 20878             break;
       
 20879           }
       
 20880 
       
 20881           block = _step.value;
       
 20882           _context7.next = 15;
       
 20883           return controls_select('core/block-editor', 'canInsertBlockType', block.name, rootClientId);
       
 20884 
       
 20885         case 15:
       
 20886           isValid = _context7.sent;
       
 20887 
       
 20888           if (isValid) {
       
 20889             allowedBlocks.push(block);
       
 20890           }
       
 20891 
       
 20892         case 17:
       
 20893           _context7.next = 11;
       
 20894           break;
       
 20895 
       
 20896         case 19:
       
 20897           _context7.next = 24;
       
 20898           break;
       
 20899 
       
 20900         case 21:
       
 20901           _context7.prev = 21;
       
 20902           _context7.t3 = _context7["catch"](9);
       
 20903 
       
 20904           _iterator.e(_context7.t3);
       
 20905 
       
 20906         case 24:
       
 20907           _context7.prev = 24;
       
 20908 
       
 20909           _iterator.f();
       
 20910 
       
 20911           return _context7.finish(24);
       
 20912 
       
 20913         case 27:
       
 20914           if (!allowedBlocks.length) {
       
 20915             _context7.next = 29;
       
 20916             break;
       
 20917           }
       
 20918 
       
 20919           return _context7.abrupt("return", {
       
 20920             type: 'INSERT_BLOCKS',
       
 20921             blocks: allowedBlocks,
       
 20922             index: index,
       
 20923             rootClientId: rootClientId,
       
 20924             time: Date.now(),
       
 20925             updateSelection: updateSelection
       
 20926           });
       
 20927 
       
 20928         case 29:
       
 20929         case "end":
       
 20930           return _context7.stop();
       
 20931       }
       
 20932     }
       
 20933   }, _marked7, null, [[9, 21, 24, 27]]);
       
 20934 }
       
 20935 /**
       
 20936  * Returns an action object used in signalling that the insertion point should
       
 20937  * be shown.
       
 20938  *
       
 20939  * @param {?string} rootClientId Optional root client ID of block list on
       
 20940  *                               which to insert.
       
 20941  * @param {?number} index        Index at which block should be inserted.
       
 20942  *
       
 20943  * @return {Object} Action object.
       
 20944  */
       
 20945 
       
 20946 function actions_showInsertionPoint(rootClientId, index) {
       
 20947   return {
       
 20948     type: 'SHOW_INSERTION_POINT',
       
 20949     rootClientId: rootClientId,
       
 20950     index: index
       
 20951   };
       
 20952 }
       
 20953 /**
       
 20954  * Returns an action object hiding the insertion point.
       
 20955  *
       
 20956  * @return {Object} Action object.
       
 20957  */
       
 20958 
       
 20959 function actions_hideInsertionPoint() {
       
 20960   return {
       
 20961     type: 'HIDE_INSERTION_POINT'
       
 20962   };
       
 20963 }
       
 20964 /**
       
 20965  * Returns an action object resetting the template validity.
       
 20966  *
       
 20967  * @param {boolean}  isValid  template validity flag.
       
 20968  *
       
 20969  * @return {Object} Action object.
       
 20970  */
       
 20971 
       
 20972 function setTemplateValidity(isValid) {
       
 20973   return {
       
 20974     type: 'SET_TEMPLATE_VALIDITY',
       
 20975     isValid: isValid
       
 20976   };
       
 20977 }
       
 20978 /**
       
 20979  * Returns an action object synchronize the template with the list of blocks
       
 20980  *
       
 20981  * @return {Object} Action object.
       
 20982  */
       
 20983 
       
 20984 function synchronizeTemplate() {
       
 20985   return {
       
 20986     type: 'SYNCHRONIZE_TEMPLATE'
       
 20987   };
       
 20988 }
       
 20989 /**
       
 20990  * Returns an action object used in signalling that two blocks should be merged
       
 20991  *
       
 20992  * @param {string} firstBlockClientId  Client ID of the first block to merge.
       
 20993  * @param {string} secondBlockClientId Client ID of the second block to merge.
       
 20994  *
       
 20995  * @return {Object} Action object.
       
 20996  */
       
 20997 
       
 20998 function actions_mergeBlocks(firstBlockClientId, secondBlockClientId) {
       
 20999   return {
       
 21000     type: 'MERGE_BLOCKS',
       
 21001     blocks: [firstBlockClientId, secondBlockClientId]
       
 21002   };
       
 21003 }
       
 21004 /**
       
 21005  * Yields action objects used in signalling that the blocks corresponding to
       
 21006  * the set of specified client IDs are to be removed.
       
 21007  *
       
 21008  * @param {string|string[]} clientIds      Client IDs of blocks to remove.
       
 21009  * @param {boolean}         selectPrevious True if the previous block should be
       
 21010  *                                         selected when a block is removed.
       
 21011  */
       
 21012 
       
 21013 function actions_removeBlocks(clientIds) {
       
 21014   var selectPrevious,
       
 21015       rootClientId,
       
 21016       isLocked,
       
 21017       previousBlockId,
       
 21018       defaultBlockId,
       
 21019       _args8 = arguments;
       
 21020   return external_this_regeneratorRuntime_default.a.wrap(function removeBlocks$(_context8) {
       
 21021     while (1) {
       
 21022       switch (_context8.prev = _context8.next) {
       
 21023         case 0:
       
 21024           selectPrevious = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : true;
       
 21025 
       
 21026           if (!(!clientIds || !clientIds.length)) {
       
 21027             _context8.next = 3;
       
 21028             break;
       
 21029           }
       
 21030 
       
 21031           return _context8.abrupt("return");
       
 21032 
       
 21033         case 3:
       
 21034           clientIds = Object(external_this_lodash_["castArray"])(clientIds);
       
 21035           _context8.next = 6;
       
 21036           return controls_select('core/block-editor', 'getBlockRootClientId', clientIds[0]);
       
 21037 
       
 21038         case 6:
       
 21039           rootClientId = _context8.sent;
       
 21040           _context8.next = 9;
       
 21041           return controls_select('core/block-editor', 'getTemplateLock', rootClientId);
       
 21042 
       
 21043         case 9:
       
 21044           isLocked = _context8.sent;
       
 21045 
       
 21046           if (!isLocked) {
       
 21047             _context8.next = 12;
       
 21048             break;
       
 21049           }
       
 21050 
       
 21051           return _context8.abrupt("return");
       
 21052 
       
 21053         case 12:
       
 21054           if (!selectPrevious) {
       
 21055             _context8.next = 18;
       
 21056             break;
       
 21057           }
       
 21058 
       
 21059           _context8.next = 15;
       
 21060           return selectPreviousBlock(clientIds[0]);
       
 21061 
       
 21062         case 15:
       
 21063           previousBlockId = _context8.sent;
       
 21064           _context8.next = 21;
       
 21065           break;
       
 21066 
       
 21067         case 18:
       
 21068           _context8.next = 20;
       
 21069           return controls_select('core/block-editor', 'getPreviousBlockClientId', clientIds[0]);
       
 21070 
       
 21071         case 20:
       
 21072           previousBlockId = _context8.sent;
       
 21073 
       
 21074         case 21:
       
 21075           _context8.next = 23;
       
 21076           return {
       
 21077             type: 'REMOVE_BLOCKS',
       
 21078             clientIds: clientIds
       
 21079           };
       
 21080 
       
 21081         case 23:
       
 21082           return _context8.delegateYield(ensureDefaultBlock(), "t0", 24);
       
 21083 
       
 21084         case 24:
       
 21085           defaultBlockId = _context8.t0;
       
 21086           return _context8.abrupt("return", [previousBlockId || defaultBlockId]);
       
 21087 
       
 21088         case 26:
       
 21089         case "end":
       
 21090           return _context8.stop();
       
 21091       }
       
 21092     }
       
 21093   }, _marked8);
       
 21094 }
       
 21095 /**
       
 21096  * Returns an action object used in signalling that the block with the
       
 21097  * specified client ID is to be removed.
       
 21098  *
       
 21099  * @param {string}  clientId       Client ID of block to remove.
       
 21100  * @param {boolean} selectPrevious True if the previous block should be
       
 21101  *                                 selected when a block is removed.
       
 21102  *
       
 21103  * @return {Object} Action object.
       
 21104  */
       
 21105 
       
 21106 function actions_removeBlock(clientId, selectPrevious) {
       
 21107   return actions_removeBlocks([clientId], selectPrevious);
       
 21108 }
       
 21109 /**
       
 21110  * Returns an action object used in signalling that the inner blocks with the
       
 21111  * specified client ID should be replaced.
       
 21112  *
       
 21113  * @param {string}   rootClientId    Client ID of the block whose InnerBlocks will re replaced.
       
 21114  * @param {Object[]} blocks          Block objects to insert as new InnerBlocks
       
 21115  * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.
       
 21116  *
       
 21117  * @return {Object} Action object.
       
 21118  */
       
 21119 
       
 21120 function actions_replaceInnerBlocks(rootClientId, blocks) {
       
 21121   var updateSelection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
       
 21122   return {
       
 21123     type: 'REPLACE_INNER_BLOCKS',
       
 21124     rootClientId: rootClientId,
       
 21125     blocks: blocks,
       
 21126     updateSelection: updateSelection,
       
 21127     time: Date.now()
       
 21128   };
       
 21129 }
       
 21130 /**
       
 21131  * Returns an action object used to toggle the block editing mode between
       
 21132  * visual and HTML modes.
       
 21133  *
       
 21134  * @param {string} clientId Block client ID.
       
 21135  *
       
 21136  * @return {Object} Action object.
       
 21137  */
       
 21138 
       
 21139 function toggleBlockMode(clientId) {
       
 21140   return {
       
 21141     type: 'TOGGLE_BLOCK_MODE',
       
 21142     clientId: clientId
       
 21143   };
       
 21144 }
       
 21145 /**
       
 21146  * Returns an action object used in signalling that the user has begun to type.
       
 21147  *
       
 21148  * @return {Object} Action object.
       
 21149  */
       
 21150 
       
 21151 function actions_startTyping() {
       
 21152   return {
       
 21153     type: 'START_TYPING'
       
 21154   };
       
 21155 }
       
 21156 /**
       
 21157  * Returns an action object used in signalling that the user has stopped typing.
       
 21158  *
       
 21159  * @return {Object} Action object.
       
 21160  */
       
 21161 
       
 21162 function actions_stopTyping() {
       
 21163   return {
       
 21164     type: 'STOP_TYPING'
       
 21165   };
       
 21166 }
       
 21167 /**
       
 21168  * Returns an action object used in signalling that the user has begun to drag blocks.
       
 21169  *
       
 21170  * @return {Object} Action object.
       
 21171  */
       
 21172 
       
 21173 function actions_startDraggingBlocks() {
       
 21174   return {
       
 21175     type: 'START_DRAGGING_BLOCKS'
       
 21176   };
       
 21177 }
       
 21178 /**
       
 21179  * Returns an action object used in signalling that the user has stopped dragging blocks.
       
 21180  *
       
 21181  * @return {Object} Action object.
       
 21182  */
       
 21183 
       
 21184 function actions_stopDraggingBlocks() {
       
 21185   return {
       
 21186     type: 'STOP_DRAGGING_BLOCKS'
       
 21187   };
       
 21188 }
       
 21189 /**
       
 21190  * Returns an action object used in signalling that the caret has entered formatted text.
       
 21191  *
       
 21192  * @return {Object} Action object.
       
 21193  */
       
 21194 
       
 21195 function actions_enterFormattedText() {
       
 21196   return {
       
 21197     type: 'ENTER_FORMATTED_TEXT'
       
 21198   };
       
 21199 }
       
 21200 /**
       
 21201  * Returns an action object used in signalling that the user caret has exited formatted text.
       
 21202  *
       
 21203  * @return {Object} Action object.
       
 21204  */
       
 21205 
       
 21206 function actions_exitFormattedText() {
       
 21207   return {
       
 21208     type: 'EXIT_FORMATTED_TEXT'
       
 21209   };
       
 21210 }
       
 21211 /**
       
 21212  * Returns an action object used in signalling that the user caret has changed
       
 21213  * position.
       
 21214  *
       
 21215  * @param {string} clientId     The selected block client ID.
       
 21216  * @param {string} attributeKey The selected block attribute key.
       
 21217  * @param {number} startOffset  The start offset.
       
 21218  * @param {number} endOffset    The end offset.
       
 21219  *
       
 21220  * @return {Object} Action object.
       
 21221  */
       
 21222 
       
 21223 function actions_selectionChange(clientId, attributeKey, startOffset, endOffset) {
       
 21224   return {
       
 21225     type: 'SELECTION_CHANGE',
       
 21226     clientId: clientId,
       
 21227     attributeKey: attributeKey,
       
 21228     startOffset: startOffset,
       
 21229     endOffset: endOffset
       
 21230   };
       
 21231 }
       
 21232 /**
       
 21233  * Returns an action object used in signalling that a new block of the default
       
 21234  * type should be added to the block list.
       
 21235  *
       
 21236  * @param {?Object} attributes   Optional attributes of the block to assign.
       
 21237  * @param {?string} rootClientId Optional root client ID of block list on which
       
 21238  *                               to append.
       
 21239  * @param {?number} index        Optional index where to insert the default block
       
 21240  *
       
 21241  * @return {Object} Action object
       
 21242  */
       
 21243 
       
 21244 function actions_insertDefaultBlock(attributes, rootClientId, index) {
       
 21245   // Abort if there is no default block type (if it has been unregistered).
       
 21246   var defaultBlockName = Object(external_this_wp_blocks_["getDefaultBlockName"])();
       
 21247 
       
 21248   if (!defaultBlockName) {
       
 21249     return;
       
 21250   }
       
 21251 
       
 21252   var block = Object(external_this_wp_blocks_["createBlock"])(defaultBlockName, attributes);
       
 21253   return actions_insertBlock(block, index, rootClientId);
       
 21254 }
       
 21255 /**
       
 21256  * Returns an action object that changes the nested settings of a given block.
       
 21257  *
       
 21258  * @param {string} clientId Client ID of the block whose nested setting are
       
 21259  *                          being received.
       
 21260  * @param {Object} settings Object with the new settings for the nested block.
       
 21261  *
       
 21262  * @return {Object} Action object
       
 21263  */
       
 21264 
       
 21265 function actions_updateBlockListSettings(clientId, settings) {
       
 21266   return {
       
 21267     type: 'UPDATE_BLOCK_LIST_SETTINGS',
       
 21268     clientId: clientId,
       
 21269     settings: settings
       
 21270   };
       
 21271 }
       
 21272 /**
       
 21273  * Returns an action object used in signalling that the block editor settings have been updated.
       
 21274  *
       
 21275  * @param {Object} settings Updated settings
       
 21276  *
       
 21277  * @return {Object} Action object
       
 21278  */
       
 21279 
       
 21280 function actions_updateSettings(settings) {
       
 21281   return {
       
 21282     type: 'UPDATE_SETTINGS',
       
 21283     settings: settings
       
 21284   };
       
 21285 }
       
 21286 /**
       
 21287  * Returns an action object used in signalling that a temporary reusable blocks have been saved
       
 21288  * in order to switch its temporary id with the real id.
       
 21289  *
       
 21290  * @param {string} id        Reusable block's id.
       
 21291  * @param {string} updatedId Updated block's id.
       
 21292  *
       
 21293  * @return {Object} Action object.
       
 21294  */
       
 21295 
       
 21296 function __unstableSaveReusableBlock(id, updatedId) {
       
 21297   return {
       
 21298     type: 'SAVE_REUSABLE_BLOCK_SUCCESS',
       
 21299     id: id,
       
 21300     updatedId: updatedId
       
 21301   };
       
 21302 }
       
 21303 /**
       
 21304  * Returns an action object used in signalling that the last block change should be marked explicitely as persistent.
       
 21305  *
       
 21306  * @return {Object} Action object.
       
 21307  */
       
 21308 
       
 21309 function actions_unstableMarkLastChangeAsPersistent() {
       
 21310   return {
       
 21311     type: 'MARK_LAST_CHANGE_AS_PERSISTENT'
       
 21312   };
       
 21313 }
       
 21314 /**
       
 21315  * Returns an action object used in signalling that the next block change should be marked explicitly as not persistent.
       
 21316  *
       
 21317  * @return {Object} Action object.
       
 21318  */
       
 21319 
       
 21320 function actions_unstableMarkNextChangeAsNotPersistent() {
       
 21321   return {
       
 21322     type: 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT'
       
 21323   };
       
 21324 }
       
 21325 /**
       
 21326  * Returns an action object used in signalling that the last block change is
       
 21327  * an automatic change, meaning it was not performed by the user, and can be
       
 21328  * undone using the `Escape` and `Backspace` keys. This action must be called
       
 21329  * after the change was made, and any actions that are a consequence of it, so
       
 21330  * it is recommended to be called at the next idle period to ensure all
       
 21331  * selection changes have been recorded.
       
 21332  *
       
 21333  * @return {Object} Action object.
       
 21334  */
       
 21335 
       
 21336 function actions_unstableMarkAutomaticChange() {
       
 21337   return {
       
 21338     type: 'MARK_AUTOMATIC_CHANGE'
       
 21339   };
       
 21340 }
       
 21341 /**
       
 21342  * Generators that triggers an action used to enable or disable the navigation mode.
       
 21343  *
       
 21344  * @param {string} isNavigationMode Enable/Disable navigation mode.
       
 21345  */
       
 21346 
       
 21347 function actions_setNavigationMode() {
       
 21348   var isNavigationMode,
       
 21349       _args9 = arguments;
       
 21350   return external_this_regeneratorRuntime_default.a.wrap(function setNavigationMode$(_context9) {
       
 21351     while (1) {
       
 21352       switch (_context9.prev = _context9.next) {
       
 21353         case 0:
       
 21354           isNavigationMode = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : true;
       
 21355           _context9.next = 3;
       
 21356           return {
       
 21357             type: 'SET_NAVIGATION_MODE',
       
 21358             isNavigationMode: isNavigationMode
       
 21359           };
       
 21360 
       
 21361         case 3:
       
 21362           if (isNavigationMode) {
       
 21363             Object(external_this_wp_a11y_["speak"])(Object(external_this_wp_i18n_["__"])('You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.'));
       
 21364           } else {
       
 21365             Object(external_this_wp_a11y_["speak"])(Object(external_this_wp_i18n_["__"])('You are currently in edit mode. To return to the navigation mode, press Escape.'));
       
 21366           }
       
 21367 
       
 21368         case 4:
       
 21369         case "end":
       
 21370           return _context9.stop();
       
 21371       }
       
 21372     }
       
 21373   }, _marked9);
       
 21374 }
       
 21375 /**
       
 21376  * Generator that triggers an action used to enable or disable the block moving mode.
       
 21377  *
       
 21378  * @param {string|null} hasBlockMovingClientId Enable/Disable block moving mode.
       
 21379  */
       
 21380 
       
 21381 function actions_setBlockMovingClientId() {
       
 21382   var hasBlockMovingClientId,
       
 21383       _args10 = arguments;
       
 21384   return external_this_regeneratorRuntime_default.a.wrap(function setBlockMovingClientId$(_context10) {
       
 21385     while (1) {
       
 21386       switch (_context10.prev = _context10.next) {
       
 21387         case 0:
       
 21388           hasBlockMovingClientId = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : null;
       
 21389           _context10.next = 3;
       
 21390           return {
       
 21391             type: 'SET_BLOCK_MOVING_MODE',
       
 21392             hasBlockMovingClientId: hasBlockMovingClientId
       
 21393           };
       
 21394 
       
 21395         case 3:
       
 21396           if (hasBlockMovingClientId) {
       
 21397             Object(external_this_wp_a11y_["speak"])(Object(external_this_wp_i18n_["__"])('Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block.'));
       
 21398           }
       
 21399 
       
 21400         case 4:
       
 21401         case "end":
       
 21402           return _context10.stop();
       
 21403       }
       
 21404     }
       
 21405   }, _marked10);
       
 21406 }
       
 21407 /**
       
 21408  * Generator that triggers an action used to duplicate a list of blocks.
       
 21409  *
       
 21410  * @param {string[]} clientIds
       
 21411  * @param {boolean} updateSelection
       
 21412  */
       
 21413 
       
 21414 function actions_duplicateBlocks(clientIds) {
       
 21415   var updateSelection,
       
 21416       blocks,
       
 21417       rootClientId,
       
 21418       blockNames,
       
 21419       lastSelectedIndex,
       
 21420       clonedBlocks,
       
 21421       _args11 = arguments;
       
 21422   return external_this_regeneratorRuntime_default.a.wrap(function duplicateBlocks$(_context11) {
       
 21423     while (1) {
       
 21424       switch (_context11.prev = _context11.next) {
       
 21425         case 0:
       
 21426           updateSelection = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : true;
       
 21427 
       
 21428           if (!(!clientIds && !clientIds.length)) {
       
 21429             _context11.next = 3;
       
 21430             break;
       
 21431           }
       
 21432 
       
 21433           return _context11.abrupt("return");
       
 21434 
       
 21435         case 3:
       
 21436           _context11.next = 5;
       
 21437           return controls_select('core/block-editor', 'getBlocksByClientId', clientIds);
       
 21438 
       
 21439         case 5:
       
 21440           blocks = _context11.sent;
       
 21441           _context11.next = 8;
       
 21442           return controls_select('core/block-editor', 'getBlockRootClientId', clientIds[0]);
       
 21443 
       
 21444         case 8:
       
 21445           rootClientId = _context11.sent;
       
 21446 
       
 21447           if (!Object(external_this_lodash_["some"])(blocks, function (block) {
       
 21448             return !block;
       
 21449           })) {
       
 21450             _context11.next = 11;
       
 21451             break;
       
 21452           }
       
 21453 
       
 21454           return _context11.abrupt("return");
       
 21455 
       
 21456         case 11:
       
 21457           blockNames = blocks.map(function (block) {
       
 21458             return block.name;
       
 21459           }); // Return early if blocks don't support multiple usage.
       
 21460 
       
 21461           if (!Object(external_this_lodash_["some"])(blockNames, function (blockName) {
       
 21462             return !Object(external_this_wp_blocks_["hasBlockSupport"])(blockName, 'multiple', true);
       
 21463           })) {
       
 21464             _context11.next = 14;
       
 21465             break;
       
 21466           }
       
 21467 
       
 21468           return _context11.abrupt("return");
       
 21469 
       
 21470         case 14:
       
 21471           _context11.next = 16;
       
 21472           return controls_select('core/block-editor', 'getBlockIndex', Object(external_this_lodash_["last"])(Object(external_this_lodash_["castArray"])(clientIds)), rootClientId);
       
 21473 
       
 21474         case 16:
       
 21475           lastSelectedIndex = _context11.sent;
       
 21476           clonedBlocks = blocks.map(function (block) {
       
 21477             return Object(external_this_wp_blocks_["cloneBlock"])(block);
       
 21478           });
       
 21479           _context11.next = 20;
       
 21480           return actions_insertBlocks(clonedBlocks, lastSelectedIndex + 1, rootClientId, updateSelection);
       
 21481 
       
 21482         case 20:
       
 21483           if (!(clonedBlocks.length > 1 && updateSelection)) {
       
 21484             _context11.next = 23;
       
 21485             break;
       
 21486           }
       
 21487 
       
 21488           _context11.next = 23;
       
 21489           return actions_multiSelect(Object(external_this_lodash_["first"])(clonedBlocks).clientId, Object(external_this_lodash_["last"])(clonedBlocks).clientId);
       
 21490 
       
 21491         case 23:
       
 21492           return _context11.abrupt("return", clonedBlocks.map(function (block) {
       
 21493             return block.clientId;
       
 21494           }));
       
 21495 
       
 21496         case 24:
       
 21497         case "end":
       
 21498           return _context11.stop();
       
 21499       }
       
 21500     }
       
 21501   }, _marked11);
       
 21502 }
       
 21503 /**
       
 21504  * Generator used to insert an empty block after a given block.
       
 21505  *
       
 21506  * @param {string} clientId
       
 21507  */
       
 21508 
       
 21509 function actions_insertBeforeBlock(clientId) {
       
 21510   var rootClientId, isLocked, firstSelectedIndex;
       
 21511   return external_this_regeneratorRuntime_default.a.wrap(function insertBeforeBlock$(_context12) {
       
 21512     while (1) {
       
 21513       switch (_context12.prev = _context12.next) {
       
 21514         case 0:
       
 21515           if (clientId) {
       
 21516             _context12.next = 2;
       
 21517             break;
       
 21518           }
       
 21519 
       
 21520           return _context12.abrupt("return");
       
 21521 
       
 21522         case 2:
       
 21523           _context12.next = 4;
       
 21524           return controls_select('core/block-editor', 'getBlockRootClientId', clientId);
       
 21525 
       
 21526         case 4:
       
 21527           rootClientId = _context12.sent;
       
 21528           _context12.next = 7;
       
 21529           return controls_select('core/block-editor', 'getTemplateLock', rootClientId);
       
 21530 
       
 21531         case 7:
       
 21532           isLocked = _context12.sent;
       
 21533 
       
 21534           if (!isLocked) {
       
 21535             _context12.next = 10;
       
 21536             break;
       
 21537           }
       
 21538 
       
 21539           return _context12.abrupt("return");
       
 21540 
       
 21541         case 10:
       
 21542           _context12.next = 12;
       
 21543           return controls_select('core/block-editor', 'getBlockIndex', clientId, rootClientId);
       
 21544 
       
 21545         case 12:
       
 21546           firstSelectedIndex = _context12.sent;
       
 21547           _context12.next = 15;
       
 21548           return actions_insertDefaultBlock({}, rootClientId, firstSelectedIndex);
       
 21549 
       
 21550         case 15:
       
 21551           return _context12.abrupt("return", _context12.sent);
       
 21552 
       
 21553         case 16:
       
 21554         case "end":
       
 21555           return _context12.stop();
       
 21556       }
       
 21557     }
       
 21558   }, _marked12);
       
 21559 }
       
 21560 /**
       
 21561  * Generator used to insert an empty block before a given block.
       
 21562  *
       
 21563  * @param {string} clientId
       
 21564  */
       
 21565 
       
 21566 function actions_insertAfterBlock(clientId) {
       
 21567   var rootClientId, isLocked, firstSelectedIndex;
       
 21568   return external_this_regeneratorRuntime_default.a.wrap(function insertAfterBlock$(_context13) {
       
 21569     while (1) {
       
 21570       switch (_context13.prev = _context13.next) {
       
 21571         case 0:
       
 21572           if (clientId) {
       
 21573             _context13.next = 2;
       
 21574             break;
       
 21575           }
       
 21576 
       
 21577           return _context13.abrupt("return");
       
 21578 
       
 21579         case 2:
       
 21580           _context13.next = 4;
       
 21581           return controls_select('core/block-editor', 'getBlockRootClientId', clientId);
       
 21582 
       
 21583         case 4:
       
 21584           rootClientId = _context13.sent;
       
 21585           _context13.next = 7;
       
 21586           return controls_select('core/block-editor', 'getTemplateLock', rootClientId);
       
 21587 
       
 21588         case 7:
       
 21589           isLocked = _context13.sent;
       
 21590 
       
 21591           if (!isLocked) {
       
 21592             _context13.next = 10;
       
 21593             break;
       
 21594           }
       
 21595 
       
 21596           return _context13.abrupt("return");
       
 21597 
       
 21598         case 10:
       
 21599           _context13.next = 12;
       
 21600           return controls_select('core/block-editor', 'getBlockIndex', clientId, rootClientId);
       
 21601 
       
 21602         case 12:
       
 21603           firstSelectedIndex = _context13.sent;
       
 21604           _context13.next = 15;
       
 21605           return actions_insertDefaultBlock({}, rootClientId, firstSelectedIndex + 1);
       
 21606 
       
 21607         case 15:
       
 21608           return _context13.abrupt("return", _context13.sent);
       
 21609 
       
 21610         case 16:
       
 21611         case "end":
       
 21612           return _context13.stop();
       
 21613       }
       
 21614     }
       
 21615   }, _marked13);
       
 21616 }
       
 21617 /**
       
 21618  * Returns an action object that toggles the highlighted block state.
       
 21619  *
       
 21620  * @param {string} clientId The block's clientId.
       
 21621  * @param {boolean} isHighlighted The highlight state.
       
 21622  */
       
 21623 
       
 21624 function actions_toggleBlockHighlight(clientId, isHighlighted) {
       
 21625   return {
       
 21626     type: 'TOGGLE_BLOCK_HIGHLIGHT',
       
 21627     clientId: clientId,
       
 21628     isHighlighted: isHighlighted
       
 21629   };
       
 21630 }
       
 21631 /**
       
 21632  * Yields action objects used in signalling that the block corresponding to the
       
 21633  * given clientId should appear to "flash" by rhythmically highlighting it.
       
 21634  *
       
 21635  * @param {string} clientId Target block client ID.
       
 21636  */
       
 21637 
       
 21638 function actions_flashBlock(clientId) {
       
 21639   return external_this_regeneratorRuntime_default.a.wrap(function flashBlock$(_context14) {
       
 21640     while (1) {
       
 21641       switch (_context14.prev = _context14.next) {
       
 21642         case 0:
       
 21643           _context14.next = 2;
       
 21644           return actions_toggleBlockHighlight(clientId, true);
       
 21645 
       
 21646         case 2:
       
 21647           _context14.next = 4;
       
 21648           return {
       
 21649             type: 'SLEEP',
       
 21650             duration: 150
       
 21651           };
       
 21652 
       
 21653         case 4:
       
 21654           _context14.next = 6;
       
 21655           return actions_toggleBlockHighlight(clientId, false);
       
 21656 
       
 21657         case 6:
       
 21658         case "end":
       
 21659           return _context14.stop();
       
 21660       }
       
 21661     }
       
 21662   }, _marked14);
       
 21663 }
       
 21664 /**
       
 21665  * Returns an action object that sets whether the block has controlled innerblocks.
       
 21666  *
       
 21667  * @param {string} clientId The block's clientId.
       
 21668  * @param {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled.
       
 21669  */
       
 21670 
       
 21671 function actions_setHasControlledInnerBlocks(clientId, hasControlledInnerBlocks) {
       
 21672   return {
       
 21673     type: 'SET_HAS_CONTROLLED_INNER_BLOCKS',
       
 21674     hasControlledInnerBlocks: hasControlledInnerBlocks,
       
 21675     clientId: clientId
       
 21676   };
       
 21677 }
       
 21678 
       
 21679 // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
       
 21680 var rememo = __webpack_require__(42);
       
 21681 
       
 21682 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/selectors.js
       
 21683 
       
 21684 
       
 21685 
       
 21686 
       
 21687 function selectors_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; }
       
 21688 
       
 21689 function selectors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { selectors_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 { selectors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 21690 
       
 21691 /**
       
 21692  * External dependencies
       
 21693  */
       
 21694 
       
 21695 
       
 21696 /**
       
 21697  * WordPress dependencies
       
 21698  */
       
 21699 
       
 21700 
       
 21701 
       
 21702 /**
       
 21703  * A block selection object.
       
 21704  *
       
 21705  * @typedef {Object} WPBlockSelection
       
 21706  *
       
 21707  * @property {string} clientId     A block client ID.
       
 21708  * @property {string} attributeKey A block attribute key.
       
 21709  * @property {number} offset       An attribute value offset, based on the rich
       
 21710  *                                 text value. See `wp.richText.create`.
       
 21711  */
       
 21712 // Module constants
       
 21713 
       
 21714 var MILLISECONDS_PER_HOUR = 3600 * 1000;
       
 21715 var MILLISECONDS_PER_DAY = 24 * 3600 * 1000;
       
 21716 var MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;
       
 21717 var templateIcon = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
       
 21718   xmlns: "http://www.w3.org/2000/svg",
       
 21719   viewBox: "0 0 24 24"
       
 21720 }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Rect"], {
       
 21721   x: "0",
       
 21722   fill: "none",
       
 21723   width: "24",
       
 21724   height: "24"
       
 21725 }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["G"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
       
 21726   d: "M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"
       
 21727 })));
       
 21728 /**
       
 21729  * Shared reference to an empty array for cases where it is important to avoid
       
 21730  * returning a new array reference on every invocation, as in a connected or
       
 21731  * other pure component which performs `shouldComponentUpdate` check on props.
       
 21732  * This should be used as a last resort, since the normalized data should be
       
 21733  * maintained by the reducer result in state.
       
 21734  *
       
 21735  * @type {Array}
       
 21736  */
       
 21737 
       
 21738 var selectors_EMPTY_ARRAY = [];
       
 21739 /**
       
 21740  * Returns a block's name given its client ID, or null if no block exists with
       
 21741  * the client ID.
       
 21742  *
       
 21743  * @param {Object} state    Editor state.
       
 21744  * @param {string} clientId Block client ID.
       
 21745  *
       
 21746  * @return {string} Block name.
       
 21747  */
       
 21748 
       
 21749 function selectors_getBlockName(state, clientId) {
       
 21750   var block = state.blocks.byClientId[clientId];
       
 21751   return block ? block.name : null;
       
 21752 }
       
 21753 /**
       
 21754  * Returns whether a block is valid or not.
       
 21755  *
       
 21756  * @param {Object} state    Editor state.
       
 21757  * @param {string} clientId Block client ID.
       
 21758  *
       
 21759  * @return {boolean} Is Valid.
       
 21760  */
       
 21761 
       
 21762 function selectors_isBlockValid(state, clientId) {
       
 21763   var block = state.blocks.byClientId[clientId];
       
 21764   return !!block && block.isValid;
       
 21765 }
       
 21766 /**
       
 21767  * Returns a block's attributes given its client ID, or null if no block exists with
       
 21768  * the client ID.
       
 21769  *
       
 21770  * @param {Object} state    Editor state.
       
 21771  * @param {string} clientId Block client ID.
       
 21772  *
       
 21773  * @return {Object?} Block attributes.
       
 21774  */
       
 21775 
       
 21776 function getBlockAttributes(state, clientId) {
       
 21777   var block = state.blocks.byClientId[clientId];
       
 21778 
       
 21779   if (!block) {
       
 21780     return null;
       
 21781   }
       
 21782 
       
 21783   return state.blocks.attributes[clientId];
       
 21784 }
       
 21785 /**
       
 21786  * Returns a block given its client ID. This is a parsed copy of the block,
       
 21787  * containing its `blockName`, `clientId`, and current `attributes` state. This
       
 21788  * is not the block's registration settings, which must be retrieved from the
       
 21789  * blocks module registration store.
       
 21790  *
       
 21791  * getBlock recurses through its inner blocks until all its children blocks have
       
 21792  * been retrieved. Note that getBlock will not return the child inner blocks of
       
 21793  * an inner block controller. This is because an inner block controller syncs
       
 21794  * itself with its own entity, and should therefore not be included with the
       
 21795  * blocks of a different entity. For example, say you call `getBlocks( TP )` to
       
 21796  * get the blocks of a template part. If another template part is a child of TP,
       
 21797  * then the nested template part's child blocks will not be returned. This way,
       
 21798  * the template block itself is considered part of the parent, but the children
       
 21799  * are not.
       
 21800  *
       
 21801  * @param {Object} state    Editor state.
       
 21802  * @param {string} clientId Block client ID.
       
 21803  *
       
 21804  * @return {Object} Parsed block object.
       
 21805  */
       
 21806 
       
 21807 var selectors_getBlock = Object(rememo["a" /* default */])(function (state, clientId) {
       
 21808   var block = state.blocks.byClientId[clientId];
       
 21809 
       
 21810   if (!block) {
       
 21811     return null;
       
 21812   }
       
 21813 
       
 21814   return selectors_objectSpread({}, block, {
       
 21815     attributes: getBlockAttributes(state, clientId),
       
 21816     innerBlocks: areInnerBlocksControlled(state, clientId) ? selectors_EMPTY_ARRAY : selectors_getBlocks(state, clientId)
       
 21817   });
       
 21818 }, function (state, clientId) {
       
 21819   return [// Normally, we'd have both `getBlockAttributes` dependencies and
       
 21820   // `getBlocks` (children) dependancies here but for performance reasons
       
 21821   // we use a denormalized cache key computed in the reducer that takes both
       
 21822   // the attributes and inner blocks into account. The value of the cache key
       
 21823   // is being changed whenever one of these dependencies is out of date.
       
 21824   state.blocks.cache[clientId]];
       
 21825 });
       
 21826 var selectors_unstableGetBlockWithoutInnerBlocks = Object(rememo["a" /* default */])(function (state, clientId) {
       
 21827   var block = state.blocks.byClientId[clientId];
       
 21828 
       
 21829   if (!block) {
       
 21830     return null;
       
 21831   }
       
 21832 
       
 21833   return selectors_objectSpread({}, block, {
       
 21834     attributes: getBlockAttributes(state, clientId)
       
 21835   });
       
 21836 }, function (state, clientId) {
       
 21837   return [state.blocks.byClientId[clientId], state.blocks.attributes[clientId]];
       
 21838 });
       
 21839 /**
       
 21840  * Returns all block objects for the current post being edited as an array in
       
 21841  * the order they appear in the post. Note that this will exclude child blocks
       
 21842  * of nested inner block controllers.
       
 21843  *
       
 21844  * Note: It's important to memoize this selector to avoid return a new instance
       
 21845  * on each call. We use the block cache state for each top-level block of the
       
 21846  * given clientID. This way, the selector only refreshes on changes to blocks
       
 21847  * associated with the given entity, and does not refresh when changes are made
       
 21848  * to blocks which are part of different inner block controllers.
       
 21849  *
       
 21850  * @param {Object}  state        Editor state.
       
 21851  * @param {?string} rootClientId Optional root client ID of block list.
       
 21852  *
       
 21853  * @return {Object[]} Post blocks.
       
 21854  */
       
 21855 
       
 21856 var selectors_getBlocks = Object(rememo["a" /* default */])(function (state, rootClientId) {
       
 21857   return Object(external_this_lodash_["map"])(selectors_getBlockOrder(state, rootClientId), function (clientId) {
       
 21858     return selectors_getBlock(state, clientId);
       
 21859   });
       
 21860 }, function (state, rootClientId) {
       
 21861   return Object(external_this_lodash_["map"])(state.blocks.order[rootClientId || ''], function (id) {
       
 21862     return state.blocks.cache[id];
       
 21863   });
       
 21864 });
       
 21865 /**
       
 21866  * Returns an array containing the clientIds of all descendants
       
 21867  * of the blocks given.
       
 21868  *
       
 21869  * @param {Object} state Global application state.
       
 21870  * @param {Array} clientIds Array of blocks to inspect.
       
 21871  *
       
 21872  * @return {Array} ids of descendants.
       
 21873  */
       
 21874 
       
 21875 var selectors_getClientIdsOfDescendants = function getClientIdsOfDescendants(state, clientIds) {
       
 21876   return Object(external_this_lodash_["flatMap"])(clientIds, function (clientId) {
       
 21877     var descendants = selectors_getBlockOrder(state, clientId);
       
 21878     return [].concat(Object(toConsumableArray["a" /* default */])(descendants), Object(toConsumableArray["a" /* default */])(getClientIdsOfDescendants(state, descendants)));
       
 21879   });
       
 21880 };
       
 21881 /**
       
 21882  * Returns an array containing the clientIds of the top-level blocks
       
 21883  * and their descendants of any depth (for nested blocks).
       
 21884  *
       
 21885  * @param {Object} state Global application state.
       
 21886  *
       
 21887  * @return {Array} ids of top-level and descendant blocks.
       
 21888  */
       
 21889 
       
 21890 var getClientIdsWithDescendants = Object(rememo["a" /* default */])(function (state) {
       
 21891   var topLevelIds = selectors_getBlockOrder(state);
       
 21892   return [].concat(Object(toConsumableArray["a" /* default */])(topLevelIds), Object(toConsumableArray["a" /* default */])(selectors_getClientIdsOfDescendants(state, topLevelIds)));
       
 21893 }, function (state) {
       
 21894   return [state.blocks.order];
       
 21895 });
       
 21896 /**
       
 21897  * Returns the total number of blocks, or the total number of blocks with a specific name in a post.
       
 21898  * The number returned includes nested blocks.
       
 21899  *
       
 21900  * @param {Object}  state     Global application state.
       
 21901  * @param {?string} blockName Optional block name, if specified only blocks of that type will be counted.
       
 21902  *
       
 21903  * @return {number} Number of blocks in the post, or number of blocks with name equal to blockName.
       
 21904  */
       
 21905 
       
 21906 var getGlobalBlockCount = Object(rememo["a" /* default */])(function (state, blockName) {
       
 21907   var clientIds = getClientIdsWithDescendants(state);
       
 21908 
       
 21909   if (!blockName) {
       
 21910     return clientIds.length;
       
 21911   }
       
 21912 
       
 21913   return Object(external_this_lodash_["reduce"])(clientIds, function (accumulator, clientId) {
       
 21914     var block = state.blocks.byClientId[clientId];
       
 21915     return block.name === blockName ? accumulator + 1 : accumulator;
       
 21916   }, 0);
       
 21917 }, function (state) {
       
 21918   return [state.blocks.order, state.blocks.byClientId];
       
 21919 });
       
 21920 /**
       
 21921  * Given an array of block client IDs, returns the corresponding array of block
       
 21922  * objects.
       
 21923  *
       
 21924  * @param {Object}   state     Editor state.
       
 21925  * @param {string[]} clientIds Client IDs for which blocks are to be returned.
       
 21926  *
       
 21927  * @return {WPBlock[]} Block objects.
       
 21928  */
       
 21929 
       
 21930 var selectors_getBlocksByClientId = Object(rememo["a" /* default */])(function (state, clientIds) {
       
 21931   return Object(external_this_lodash_["map"])(Object(external_this_lodash_["castArray"])(clientIds), function (clientId) {
       
 21932     return selectors_getBlock(state, clientId);
       
 21933   });
       
 21934 }, function (state) {
       
 21935   return [state.blocks.byClientId, state.blocks.order, state.blocks.attributes];
       
 21936 });
       
 21937 /**
       
 21938  * Returns the number of blocks currently present in the post.
       
 21939  *
       
 21940  * @param {Object}  state        Editor state.
       
 21941  * @param {?string} rootClientId Optional root client ID of block list.
       
 21942  *
       
 21943  * @return {number} Number of blocks in the post.
       
 21944  */
       
 21945 
       
 21946 function selectors_getBlockCount(state, rootClientId) {
       
 21947   return selectors_getBlockOrder(state, rootClientId).length;
       
 21948 }
       
 21949 /**
       
 21950  * Returns the current selection start block client ID, attribute key and text
       
 21951  * offset.
       
 21952  *
       
 21953  * @param {Object} state Block editor state.
       
 21954  *
       
 21955  * @return {WPBlockSelection} Selection start information.
       
 21956  */
       
 21957 
       
 21958 function selectors_getSelectionStart(state) {
       
 21959   return state.selectionStart;
       
 21960 }
       
 21961 /**
       
 21962  * Returns the current selection end block client ID, attribute key and text
       
 21963  * offset.
       
 21964  *
       
 21965  * @param {Object} state Block editor state.
       
 21966  *
       
 21967  * @return {WPBlockSelection} Selection end information.
       
 21968  */
       
 21969 
       
 21970 function selectors_getSelectionEnd(state) {
       
 21971   return state.selectionEnd;
       
 21972 }
       
 21973 /**
       
 21974  * Returns the current block selection start. This value may be null, and it
       
 21975  * may represent either a singular block selection or multi-selection start.
       
 21976  * A selection is singular if its start and end match.
       
 21977  *
       
 21978  * @param {Object} state Global application state.
       
 21979  *
       
 21980  * @return {?string} Client ID of block selection start.
       
 21981  */
       
 21982 
       
 21983 function getBlockSelectionStart(state) {
       
 21984   return state.selectionStart.clientId;
       
 21985 }
       
 21986 /**
       
 21987  * Returns the current block selection end. This value may be null, and it
       
 21988  * may represent either a singular block selection or multi-selection end.
       
 21989  * A selection is singular if its start and end match.
       
 21990  *
       
 21991  * @param {Object} state Global application state.
       
 21992  *
       
 21993  * @return {?string} Client ID of block selection end.
       
 21994  */
       
 21995 
       
 21996 function selectors_getBlockSelectionEnd(state) {
       
 21997   return state.selectionEnd.clientId;
       
 21998 }
       
 21999 /**
       
 22000  * Returns the number of blocks currently selected in the post.
       
 22001  *
       
 22002  * @param {Object} state Global application state.
       
 22003  *
       
 22004  * @return {number} Number of blocks selected in the post.
       
 22005  */
       
 22006 
       
 22007 function selectors_getSelectedBlockCount(state) {
       
 22008   var multiSelectedBlockCount = getMultiSelectedBlockClientIds(state).length;
       
 22009 
       
 22010   if (multiSelectedBlockCount) {
       
 22011     return multiSelectedBlockCount;
       
 22012   }
       
 22013 
       
 22014   return state.selectionStart.clientId ? 1 : 0;
       
 22015 }
       
 22016 /**
       
 22017  * Returns true if there is a single selected block, or false otherwise.
       
 22018  *
       
 22019  * @param {Object} state Editor state.
       
 22020  *
       
 22021  * @return {boolean} Whether a single block is selected.
       
 22022  */
       
 22023 
       
 22024 function hasSelectedBlock(state) {
       
 22025   var selectionStart = state.selectionStart,
       
 22026       selectionEnd = state.selectionEnd;
       
 22027   return !!selectionStart.clientId && selectionStart.clientId === selectionEnd.clientId;
       
 22028 }
       
 22029 /**
       
 22030  * Returns the currently selected block client ID, or null if there is no
       
 22031  * selected block.
       
 22032  *
       
 22033  * @param {Object} state Editor state.
       
 22034  *
       
 22035  * @return {?string} Selected block client ID.
       
 22036  */
       
 22037 
       
 22038 function selectors_getSelectedBlockClientId(state) {
       
 22039   var selectionStart = state.selectionStart,
       
 22040       selectionEnd = state.selectionEnd;
       
 22041   var clientId = selectionStart.clientId;
       
 22042 
       
 22043   if (!clientId || clientId !== selectionEnd.clientId) {
       
 22044     return null;
       
 22045   }
       
 22046 
       
 22047   return clientId;
       
 22048 }
       
 22049 /**
       
 22050  * Returns the currently selected block, or null if there is no selected block.
       
 22051  *
       
 22052  * @param {Object} state Global application state.
       
 22053  *
       
 22054  * @return {?Object} Selected block.
       
 22055  */
       
 22056 
       
 22057 function selectors_getSelectedBlock(state) {
       
 22058   var clientId = selectors_getSelectedBlockClientId(state);
       
 22059   return clientId ? selectors_getBlock(state, clientId) : null;
       
 22060 }
       
 22061 /**
       
 22062  * Given a block client ID, returns the root block from which the block is
       
 22063  * nested, an empty string for top-level blocks, or null if the block does not
       
 22064  * exist.
       
 22065  *
       
 22066  * @param {Object} state    Editor state.
       
 22067  * @param {string} clientId Block from which to find root client ID.
       
 22068  *
       
 22069  * @return {?string} Root client ID, if exists
       
 22070  */
       
 22071 
       
 22072 function selectors_getBlockRootClientId(state, clientId) {
       
 22073   return state.blocks.parents[clientId] !== undefined ? state.blocks.parents[clientId] : null;
       
 22074 }
       
 22075 /**
       
 22076  * Given a block client ID, returns the list of all its parents from top to bottom.
       
 22077  *
       
 22078  * @param {Object} state    Editor state.
       
 22079  * @param {string} clientId Block from which to find root client ID.
       
 22080  * @param {boolean} ascending Order results from bottom to top (true) or top to bottom (false).
       
 22081  *
       
 22082  * @return {Array} ClientIDs of the parent blocks.
       
 22083  */
       
 22084 
       
 22085 var selectors_getBlockParents = Object(rememo["a" /* default */])(function (state, clientId) {
       
 22086   var ascending = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
       
 22087   var parents = [];
       
 22088   var current = clientId;
       
 22089 
       
 22090   while (!!state.blocks.parents[current]) {
       
 22091     current = state.blocks.parents[current];
       
 22092     parents.push(current);
       
 22093   }
       
 22094 
       
 22095   return ascending ? parents : parents.reverse();
       
 22096 }, function (state) {
       
 22097   return [state.blocks.parents];
       
 22098 });
       
 22099 /**
       
 22100  * Given a block client ID and a block name,
       
 22101  * returns the list of all its parents from top to bottom,
       
 22102  * filtered by the given name.
       
 22103  *
       
 22104  * @param {Object} state     Editor state.
       
 22105  * @param {string} clientId  Block from which to find root client ID.
       
 22106  * @param {string} blockName Block name to filter.
       
 22107  * @param {boolean} ascending Order results from bottom to top (true) or top to bottom (false).
       
 22108  *
       
 22109  * @return {Array} ClientIDs of the parent blocks.
       
 22110  */
       
 22111 
       
 22112 var getBlockParentsByBlockName = Object(rememo["a" /* default */])(function (state, clientId, blockName) {
       
 22113   var ascending = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
       
 22114   var parents = selectors_getBlockParents(state, clientId, ascending);
       
 22115   return Object(external_this_lodash_["map"])(Object(external_this_lodash_["filter"])(Object(external_this_lodash_["map"])(parents, function (id) {
       
 22116     return {
       
 22117       id: id,
       
 22118       name: selectors_getBlockName(state, id)
       
 22119     };
       
 22120   }), {
       
 22121     name: blockName
       
 22122   }), function (_ref) {
       
 22123     var id = _ref.id;
       
 22124     return id;
       
 22125   });
       
 22126 }, function (state) {
       
 22127   return [state.blocks.parents];
       
 22128 });
       
 22129 /**
       
 22130  * Given a block client ID, returns the root of the hierarchy from which the block is nested, return the block itself for root level blocks.
       
 22131  *
       
 22132  * @param {Object} state    Editor state.
       
 22133  * @param {string} clientId Block from which to find root client ID.
       
 22134  *
       
 22135  * @return {string} Root client ID
       
 22136  */
       
 22137 
       
 22138 function getBlockHierarchyRootClientId(state, clientId) {
       
 22139   var current = clientId;
       
 22140   var parent;
       
 22141 
       
 22142   do {
       
 22143     parent = current;
       
 22144     current = state.blocks.parents[current];
       
 22145   } while (current);
       
 22146 
       
 22147   return parent;
       
 22148 }
       
 22149 /**
       
 22150  * Given a block client ID, returns the lowest common ancestor with selected client ID.
       
 22151  *
       
 22152  * @param {Object} state    Editor state.
       
 22153  * @param {string} clientId Block from which to find common ancestor client ID.
       
 22154  *
       
 22155  * @return {string} Common ancestor client ID or undefined
       
 22156  */
       
 22157 
       
 22158 function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
       
 22159   var selectedId = selectors_getSelectedBlockClientId(state);
       
 22160   var clientParents = [].concat(Object(toConsumableArray["a" /* default */])(selectors_getBlockParents(state, clientId)), [clientId]);
       
 22161   var selectedParents = [].concat(Object(toConsumableArray["a" /* default */])(selectors_getBlockParents(state, selectedId)), [selectedId]);
       
 22162   var lowestCommonAncestor;
       
 22163   var maxDepth = Math.min(clientParents.length, selectedParents.length);
       
 22164 
       
 22165   for (var index = 0; index < maxDepth; index++) {
       
 22166     if (clientParents[index] === selectedParents[index]) {
       
 22167       lowestCommonAncestor = clientParents[index];
       
 22168     } else {
       
 22169       break;
       
 22170     }
       
 22171   }
       
 22172 
       
 22173   return lowestCommonAncestor;
       
 22174 }
       
 22175 /**
       
 22176  * Returns the client ID of the block adjacent one at the given reference
       
 22177  * startClientId and modifier directionality. Defaults start startClientId to
       
 22178  * the selected block, and direction as next block. Returns null if there is no
       
 22179  * adjacent block.
       
 22180  *
       
 22181  * @param {Object}  state         Editor state.
       
 22182  * @param {?string} startClientId Optional client ID of block from which to
       
 22183  *                                search.
       
 22184  * @param {?number} modifier      Directionality multiplier (1 next, -1
       
 22185  *                                previous).
       
 22186  *
       
 22187  * @return {?string} Return the client ID of the block, or null if none exists.
       
 22188  */
       
 22189 
       
 22190 function getAdjacentBlockClientId(state, startClientId) {
       
 22191   var modifier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
       
 22192 
       
 22193   // Default to selected block.
       
 22194   if (startClientId === undefined) {
       
 22195     startClientId = selectors_getSelectedBlockClientId(state);
       
 22196   } // Try multi-selection starting at extent based on modifier.
       
 22197 
       
 22198 
       
 22199   if (startClientId === undefined) {
       
 22200     if (modifier < 0) {
       
 22201       startClientId = selectors_getFirstMultiSelectedBlockClientId(state);
       
 22202     } else {
       
 22203       startClientId = getLastMultiSelectedBlockClientId(state);
       
 22204     }
       
 22205   } // Validate working start client ID.
       
 22206 
       
 22207 
       
 22208   if (!startClientId) {
       
 22209     return null;
       
 22210   } // Retrieve start block root client ID, being careful to allow the falsey
       
 22211   // empty string top-level root by explicitly testing against null.
       
 22212 
       
 22213 
       
 22214   var rootClientId = selectors_getBlockRootClientId(state, startClientId);
       
 22215 
       
 22216   if (rootClientId === null) {
       
 22217     return null;
       
 22218   }
       
 22219 
       
 22220   var order = state.blocks.order;
       
 22221   var orderSet = order[rootClientId];
       
 22222   var index = orderSet.indexOf(startClientId);
       
 22223   var nextIndex = index + 1 * modifier; // Block was first in set and we're attempting to get previous.
       
 22224 
       
 22225   if (nextIndex < 0) {
       
 22226     return null;
       
 22227   } // Block was last in set and we're attempting to get next.
       
 22228 
       
 22229 
       
 22230   if (nextIndex === orderSet.length) {
       
 22231     return null;
       
 22232   } // Assume incremented index is within the set.
       
 22233 
       
 22234 
       
 22235   return orderSet[nextIndex];
       
 22236 }
       
 22237 /**
       
 22238  * Returns the previous block's client ID from the given reference start ID.
       
 22239  * Defaults start to the selected block. Returns null if there is no previous
       
 22240  * block.
       
 22241  *
       
 22242  * @param {Object}  state         Editor state.
       
 22243  * @param {?string} startClientId Optional client ID of block from which to
       
 22244  *                                search.
       
 22245  *
       
 22246  * @return {?string} Adjacent block's client ID, or null if none exists.
       
 22247  */
       
 22248 
       
 22249 function getPreviousBlockClientId(state, startClientId) {
       
 22250   return getAdjacentBlockClientId(state, startClientId, -1);
       
 22251 }
       
 22252 /**
       
 22253  * Returns the next block's client ID from the given reference start ID.
       
 22254  * Defaults start to the selected block. Returns null if there is no next
       
 22255  * block.
       
 22256  *
       
 22257  * @param {Object}  state         Editor state.
       
 22258  * @param {?string} startClientId Optional client ID of block from which to
       
 22259  *                                search.
       
 22260  *
       
 22261  * @return {?string} Adjacent block's client ID, or null if none exists.
       
 22262  */
       
 22263 
       
 22264 function getNextBlockClientId(state, startClientId) {
       
 22265   return getAdjacentBlockClientId(state, startClientId, 1);
       
 22266 }
       
 22267 /**
       
 22268  * Returns the initial caret position for the selected block.
       
 22269  * This position is to used to position the caret properly when the selected block changes.
       
 22270  *
       
 22271  * @param {Object} state Global application state.
       
 22272  *
       
 22273  * @return {?Object} Selected block.
       
 22274  */
       
 22275 
       
 22276 function getSelectedBlocksInitialCaretPosition(state) {
       
 22277   return state.initialPosition;
       
 22278 }
       
 22279 /**
       
 22280  * Returns the current selection set of block client IDs (multiselection or single selection).
       
 22281  *
       
 22282  * @param {Object} state Editor state.
       
 22283  *
       
 22284  * @return {Array} Multi-selected block client IDs.
       
 22285  */
       
 22286 
       
 22287 var selectors_getSelectedBlockClientIds = Object(rememo["a" /* default */])(function (state) {
       
 22288   var selectionStart = state.selectionStart,
       
 22289       selectionEnd = state.selectionEnd;
       
 22290 
       
 22291   if (selectionStart.clientId === undefined || selectionEnd.clientId === undefined) {
       
 22292     return selectors_EMPTY_ARRAY;
       
 22293   }
       
 22294 
       
 22295   if (selectionStart.clientId === selectionEnd.clientId) {
       
 22296     return [selectionStart.clientId];
       
 22297   } // Retrieve root client ID to aid in retrieving relevant nested block
       
 22298   // order, being careful to allow the falsey empty string top-level root
       
 22299   // by explicitly testing against null.
       
 22300 
       
 22301 
       
 22302   var rootClientId = selectors_getBlockRootClientId(state, selectionStart.clientId);
       
 22303 
       
 22304   if (rootClientId === null) {
       
 22305     return selectors_EMPTY_ARRAY;
       
 22306   }
       
 22307 
       
 22308   var blockOrder = selectors_getBlockOrder(state, rootClientId);
       
 22309   var startIndex = blockOrder.indexOf(selectionStart.clientId);
       
 22310   var endIndex = blockOrder.indexOf(selectionEnd.clientId);
       
 22311 
       
 22312   if (startIndex > endIndex) {
       
 22313     return blockOrder.slice(endIndex, startIndex + 1);
       
 22314   }
       
 22315 
       
 22316   return blockOrder.slice(startIndex, endIndex + 1);
       
 22317 }, function (state) {
       
 22318   return [state.blocks.order, state.selectionStart.clientId, state.selectionEnd.clientId];
       
 22319 });
       
 22320 /**
       
 22321  * Returns the current multi-selection set of block client IDs, or an empty
       
 22322  * array if there is no multi-selection.
       
 22323  *
       
 22324  * @param {Object} state Editor state.
       
 22325  *
       
 22326  * @return {Array} Multi-selected block client IDs.
       
 22327  */
       
 22328 
       
 22329 function getMultiSelectedBlockClientIds(state) {
       
 22330   var selectionStart = state.selectionStart,
       
 22331       selectionEnd = state.selectionEnd;
       
 22332 
       
 22333   if (selectionStart.clientId === selectionEnd.clientId) {
       
 22334     return selectors_EMPTY_ARRAY;
       
 22335   }
       
 22336 
       
 22337   return selectors_getSelectedBlockClientIds(state);
       
 22338 }
       
 22339 /**
       
 22340  * Returns the current multi-selection set of blocks, or an empty array if
       
 22341  * there is no multi-selection.
       
 22342  *
       
 22343  * @param {Object} state Editor state.
       
 22344  *
       
 22345  * @return {Array} Multi-selected block objects.
       
 22346  */
       
 22347 
       
 22348 var getMultiSelectedBlocks = Object(rememo["a" /* default */])(function (state) {
       
 22349   var multiSelectedBlockClientIds = getMultiSelectedBlockClientIds(state);
       
 22350 
       
 22351   if (!multiSelectedBlockClientIds.length) {
       
 22352     return selectors_EMPTY_ARRAY;
       
 22353   }
       
 22354 
       
 22355   return multiSelectedBlockClientIds.map(function (clientId) {
       
 22356     return selectors_getBlock(state, clientId);
       
 22357   });
       
 22358 }, function (state) {
       
 22359   return [].concat(Object(toConsumableArray["a" /* default */])(selectors_getSelectedBlockClientIds.getDependants(state)), [state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
       
 22360 });
       
 22361 /**
       
 22362  * Returns the client ID of the first block in the multi-selection set, or null
       
 22363  * if there is no multi-selection.
       
 22364  *
       
 22365  * @param {Object} state Editor state.
       
 22366  *
       
 22367  * @return {?string} First block client ID in the multi-selection set.
       
 22368  */
       
 22369 
       
 22370 function selectors_getFirstMultiSelectedBlockClientId(state) {
       
 22371   return Object(external_this_lodash_["first"])(getMultiSelectedBlockClientIds(state)) || null;
       
 22372 }
       
 22373 /**
       
 22374  * Returns the client ID of the last block in the multi-selection set, or null
       
 22375  * if there is no multi-selection.
       
 22376  *
       
 22377  * @param {Object} state Editor state.
       
 22378  *
       
 22379  * @return {?string} Last block client ID in the multi-selection set.
       
 22380  */
       
 22381 
       
 22382 function getLastMultiSelectedBlockClientId(state) {
       
 22383   return Object(external_this_lodash_["last"])(getMultiSelectedBlockClientIds(state)) || null;
       
 22384 }
       
 22385 /**
       
 22386  * Returns true if a multi-selection exists, and the block corresponding to the
       
 22387  * specified client ID is the first block of the multi-selection set, or false
       
 22388  * otherwise.
       
 22389  *
       
 22390  * @param {Object} state    Editor state.
       
 22391  * @param {string} clientId Block client ID.
       
 22392  *
       
 22393  * @return {boolean} Whether block is first in multi-selection.
       
 22394  */
       
 22395 
       
 22396 function isFirstMultiSelectedBlock(state, clientId) {
       
 22397   return selectors_getFirstMultiSelectedBlockClientId(state) === clientId;
       
 22398 }
       
 22399 /**
       
 22400  * Returns true if the client ID occurs within the block multi-selection, or
       
 22401  * false otherwise.
       
 22402  *
       
 22403  * @param {Object} state    Editor state.
       
 22404  * @param {string} clientId Block client ID.
       
 22405  *
       
 22406  * @return {boolean} Whether block is in multi-selection set.
       
 22407  */
       
 22408 
       
 22409 function isBlockMultiSelected(state, clientId) {
       
 22410   return getMultiSelectedBlockClientIds(state).indexOf(clientId) !== -1;
       
 22411 }
       
 22412 /**
       
 22413  * Returns true if an ancestor of the block is multi-selected, or false
       
 22414  * otherwise.
       
 22415  *
       
 22416  * @param {Object} state    Editor state.
       
 22417  * @param {string} clientId Block client ID.
       
 22418  *
       
 22419  * @return {boolean} Whether an ancestor of the block is in multi-selection
       
 22420  *                   set.
       
 22421  */
       
 22422 
       
 22423 var isAncestorMultiSelected = Object(rememo["a" /* default */])(function (state, clientId) {
       
 22424   var ancestorClientId = clientId;
       
 22425   var isMultiSelected = false;
       
 22426 
       
 22427   while (ancestorClientId && !isMultiSelected) {
       
 22428     ancestorClientId = selectors_getBlockRootClientId(state, ancestorClientId);
       
 22429     isMultiSelected = isBlockMultiSelected(state, ancestorClientId);
       
 22430   }
       
 22431 
       
 22432   return isMultiSelected;
       
 22433 }, function (state) {
       
 22434   return [state.blocks.order, state.selectionStart.clientId, state.selectionEnd.clientId];
       
 22435 });
       
 22436 /**
       
 22437  * Returns the client ID of the block which begins the multi-selection set, or
       
 22438  * null if there is no multi-selection.
       
 22439  *
       
 22440  * This is not necessarily the first client ID in the selection.
       
 22441  *
       
 22442  * @see getFirstMultiSelectedBlockClientId
       
 22443  *
       
 22444  * @param {Object} state Editor state.
       
 22445  *
       
 22446  * @return {?string} Client ID of block beginning multi-selection.
       
 22447  */
       
 22448 
       
 22449 function getMultiSelectedBlocksStartClientId(state) {
       
 22450   var selectionStart = state.selectionStart,
       
 22451       selectionEnd = state.selectionEnd;
       
 22452 
       
 22453   if (selectionStart.clientId === selectionEnd.clientId) {
       
 22454     return null;
       
 22455   }
       
 22456 
       
 22457   return selectionStart.clientId || null;
       
 22458 }
       
 22459 /**
       
 22460  * Returns the client ID of the block which ends the multi-selection set, or
       
 22461  * null if there is no multi-selection.
       
 22462  *
       
 22463  * This is not necessarily the last client ID in the selection.
       
 22464  *
       
 22465  * @see getLastMultiSelectedBlockClientId
       
 22466  *
       
 22467  * @param {Object} state Editor state.
       
 22468  *
       
 22469  * @return {?string} Client ID of block ending multi-selection.
       
 22470  */
       
 22471 
       
 22472 function getMultiSelectedBlocksEndClientId(state) {
       
 22473   var selectionStart = state.selectionStart,
       
 22474       selectionEnd = state.selectionEnd;
       
 22475 
       
 22476   if (selectionStart.clientId === selectionEnd.clientId) {
       
 22477     return null;
       
 22478   }
       
 22479 
       
 22480   return selectionEnd.clientId || null;
       
 22481 }
       
 22482 /**
       
 22483  * Returns an array containing all block client IDs in the editor in the order
       
 22484  * they appear. Optionally accepts a root client ID of the block list for which
       
 22485  * the order should be returned, defaulting to the top-level block order.
       
 22486  *
       
 22487  * @param {Object}  state        Editor state.
       
 22488  * @param {?string} rootClientId Optional root client ID of block list.
       
 22489  *
       
 22490  * @return {Array} Ordered client IDs of editor blocks.
       
 22491  */
       
 22492 
       
 22493 function selectors_getBlockOrder(state, rootClientId) {
       
 22494   return state.blocks.order[rootClientId || ''] || selectors_EMPTY_ARRAY;
       
 22495 }
       
 22496 /**
       
 22497  * Returns the index at which the block corresponding to the specified client
       
 22498  * ID occurs within the block order, or `-1` if the block does not exist.
       
 22499  *
       
 22500  * @param {Object}  state        Editor state.
       
 22501  * @param {string}  clientId     Block client ID.
       
 22502  * @param {?string} rootClientId Optional root client ID of block list.
       
 22503  *
       
 22504  * @return {number} Index at which block exists in order.
       
 22505  */
       
 22506 
       
 22507 function selectors_getBlockIndex(state, clientId, rootClientId) {
       
 22508   return selectors_getBlockOrder(state, rootClientId).indexOf(clientId);
       
 22509 }
       
 22510 /**
       
 22511  * Returns true if the block corresponding to the specified client ID is
       
 22512  * currently selected and no multi-selection exists, or false otherwise.
       
 22513  *
       
 22514  * @param {Object} state    Editor state.
       
 22515  * @param {string} clientId Block client ID.
       
 22516  *
       
 22517  * @return {boolean} Whether block is selected and multi-selection exists.
       
 22518  */
       
 22519 
       
 22520 function isBlockSelected(state, clientId) {
       
 22521   var selectionStart = state.selectionStart,
       
 22522       selectionEnd = state.selectionEnd;
       
 22523 
       
 22524   if (selectionStart.clientId !== selectionEnd.clientId) {
       
 22525     return false;
       
 22526   }
       
 22527 
       
 22528   return selectionStart.clientId === clientId;
       
 22529 }
       
 22530 /**
       
 22531  * Returns true if one of the block's inner blocks is selected.
       
 22532  *
       
 22533  * @param {Object}  state    Editor state.
       
 22534  * @param {string}  clientId Block client ID.
       
 22535  * @param {boolean} deep     Perform a deep check.
       
 22536  *
       
 22537  * @return {boolean} Whether the block as an inner block selected
       
 22538  */
       
 22539 
       
 22540 function hasSelectedInnerBlock(state, clientId) {
       
 22541   var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
       
 22542   return Object(external_this_lodash_["some"])(selectors_getBlockOrder(state, clientId), function (innerClientId) {
       
 22543     return isBlockSelected(state, innerClientId) || isBlockMultiSelected(state, innerClientId) || deep && hasSelectedInnerBlock(state, innerClientId, deep);
       
 22544   });
       
 22545 }
       
 22546 /**
       
 22547  * Returns true if the block corresponding to the specified client ID is
       
 22548  * currently selected but isn't the last of the selected blocks. Here "last"
       
 22549  * refers to the block sequence in the document, _not_ the sequence of
       
 22550  * multi-selection, which is why `state.selectionEnd` isn't used.
       
 22551  *
       
 22552  * @param {Object} state    Editor state.
       
 22553  * @param {string} clientId Block client ID.
       
 22554  *
       
 22555  * @return {boolean} Whether block is selected and not the last in the
       
 22556  *                   selection.
       
 22557  */
       
 22558 
       
 22559 function isBlockWithinSelection(state, clientId) {
       
 22560   if (!clientId) {
       
 22561     return false;
       
 22562   }
       
 22563 
       
 22564   var clientIds = getMultiSelectedBlockClientIds(state);
       
 22565   var index = clientIds.indexOf(clientId);
       
 22566   return index > -1 && index < clientIds.length - 1;
       
 22567 }
       
 22568 /**
       
 22569  * Returns true if a multi-selection has been made, or false otherwise.
       
 22570  *
       
 22571  * @param {Object} state Editor state.
       
 22572  *
       
 22573  * @return {boolean} Whether multi-selection has been made.
       
 22574  */
       
 22575 
       
 22576 function selectors_hasMultiSelection(state) {
       
 22577   var selectionStart = state.selectionStart,
       
 22578       selectionEnd = state.selectionEnd;
       
 22579   return selectionStart.clientId !== selectionEnd.clientId;
       
 22580 }
       
 22581 /**
       
 22582  * Whether in the process of multi-selecting or not. This flag is only true
       
 22583  * while the multi-selection is being selected (by mouse move), and is false
       
 22584  * once the multi-selection has been settled.
       
 22585  *
       
 22586  * @see hasMultiSelection
       
 22587  *
       
 22588  * @param {Object} state Global application state.
       
 22589  *
       
 22590  * @return {boolean} True if multi-selecting, false if not.
       
 22591  */
       
 22592 
       
 22593 function selectors_isMultiSelecting(state) {
       
 22594   return state.isMultiSelecting;
       
 22595 }
       
 22596 /**
       
 22597  * Selector that returns if multi-selection is enabled or not.
       
 22598  *
       
 22599  * @param {Object} state Global application state.
       
 22600  *
       
 22601  * @return {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled.
       
 22602  */
       
 22603 
       
 22604 function selectors_isSelectionEnabled(state) {
       
 22605   return state.isSelectionEnabled;
       
 22606 }
       
 22607 /**
       
 22608  * Returns the block's editing mode, defaulting to "visual" if not explicitly
       
 22609  * assigned.
       
 22610  *
       
 22611  * @param {Object} state    Editor state.
       
 22612  * @param {string} clientId Block client ID.
       
 22613  *
       
 22614  * @return {Object} Block editing mode.
       
 22615  */
       
 22616 
       
 22617 function selectors_getBlockMode(state, clientId) {
       
 22618   return state.blocksMode[clientId] || 'visual';
       
 22619 }
       
 22620 /**
       
 22621  * Returns true if the user is typing, or false otherwise.
       
 22622  *
       
 22623  * @param {Object} state Global application state.
       
 22624  *
       
 22625  * @return {boolean} Whether user is typing.
       
 22626  */
       
 22627 
       
 22628 function selectors_isTyping(state) {
       
 22629   return state.isTyping;
       
 22630 }
       
 22631 /**
       
 22632  * Returns true if the user is dragging blocks, or false otherwise.
       
 22633  *
       
 22634  * @param {Object} state Global application state.
       
 22635  *
       
 22636  * @return {boolean} Whether user is dragging blocks.
       
 22637  */
       
 22638 
       
 22639 function selectors_isDraggingBlocks(state) {
       
 22640   return state.isDraggingBlocks;
       
 22641 }
       
 22642 /**
       
 22643  * Returns true if the caret is within formatted text, or false otherwise.
       
 22644  *
       
 22645  * @param {Object} state Global application state.
       
 22646  *
       
 22647  * @return {boolean} Whether the caret is within formatted text.
       
 22648  */
       
 22649 
       
 22650 function selectors_isCaretWithinFormattedText(state) {
       
 22651   return state.isCaretWithinFormattedText;
       
 22652 }
       
 22653 /**
       
 22654  * Returns the insertion point, the index at which the new inserted block would
       
 22655  * be placed. Defaults to the last index.
       
 22656  *
       
 22657  * @param {Object} state Editor state.
       
 22658  *
       
 22659  * @return {Object} Insertion point object with `rootClientId`, `index`.
       
 22660  */
       
 22661 
       
 22662 function getBlockInsertionPoint(state) {
       
 22663   var rootClientId, index;
       
 22664   var insertionPoint = state.insertionPoint,
       
 22665       selectionEnd = state.selectionEnd;
       
 22666 
       
 22667   if (insertionPoint !== null) {
       
 22668     return insertionPoint;
       
 22669   }
       
 22670 
       
 22671   var clientId = selectionEnd.clientId;
       
 22672 
       
 22673   if (clientId) {
       
 22674     rootClientId = selectors_getBlockRootClientId(state, clientId) || undefined;
       
 22675     index = selectors_getBlockIndex(state, selectionEnd.clientId, rootClientId) + 1;
       
 22676   } else {
       
 22677     index = selectors_getBlockOrder(state).length;
       
 22678   }
       
 22679 
       
 22680   return {
       
 22681     rootClientId: rootClientId,
       
 22682     index: index
       
 22683   };
       
 22684 }
       
 22685 /**
       
 22686  * Returns true if we should show the block insertion point.
       
 22687  *
       
 22688  * @param {Object} state Global application state.
       
 22689  *
       
 22690  * @return {?boolean} Whether the insertion point is visible or not.
       
 22691  */
       
 22692 
       
 22693 function isBlockInsertionPointVisible(state) {
       
 22694   return state.insertionPoint !== null;
       
 22695 }
       
 22696 /**
       
 22697  * Returns whether the blocks matches the template or not.
       
 22698  *
       
 22699  * @param {boolean} state
       
 22700  * @return {?boolean} Whether the template is valid or not.
       
 22701  */
       
 22702 
       
 22703 function isValidTemplate(state) {
       
 22704   return state.template.isValid;
       
 22705 }
       
 22706 /**
       
 22707  * Returns the defined block template
       
 22708  *
       
 22709  * @param {boolean} state
       
 22710  * @return {?Array}        Block Template
       
 22711  */
       
 22712 
       
 22713 function getTemplate(state) {
       
 22714   return state.settings.template;
       
 22715 }
       
 22716 /**
       
 22717  * Returns the defined block template lock. Optionally accepts a root block
       
 22718  * client ID as context, otherwise defaulting to the global context.
       
 22719  *
       
 22720  * @param {Object}  state        Editor state.
       
 22721  * @param {?string} rootClientId Optional block root client ID.
       
 22722  *
       
 22723  * @return {?string} Block Template Lock
       
 22724  */
       
 22725 
       
 22726 function selectors_getTemplateLock(state, rootClientId) {
       
 22727   if (!rootClientId) {
       
 22728     return state.settings.templateLock;
       
 22729   }
       
 22730 
       
 22731   var blockListSettings = selectors_getBlockListSettings(state, rootClientId);
       
 22732 
       
 22733   if (!blockListSettings) {
       
 22734     return null;
       
 22735   }
       
 22736 
       
 22737   return blockListSettings.templateLock;
       
 22738 }
       
 22739 /**
       
 22740  * Determines if the given block type is allowed to be inserted into the block list.
       
 22741  * This function is not exported and not memoized because using a memoized selector
       
 22742  * inside another memoized selector is just a waste of time.
       
 22743  *
       
 22744  * @param {Object}  state        Editor state.
       
 22745  * @param {string}  blockName    The name of the block type, e.g.' core/paragraph'.
       
 22746  * @param {?string} rootClientId Optional root client ID of block list.
       
 22747  *
       
 22748  * @return {boolean} Whether the given block type is allowed to be inserted.
       
 22749  */
       
 22750 
       
 22751 var selectors_canInsertBlockTypeUnmemoized = function canInsertBlockTypeUnmemoized(state, blockName) {
       
 22752   var rootClientId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
       
 22753 
       
 22754   var checkAllowList = function checkAllowList(list, item) {
       
 22755     var defaultResult = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
       
 22756 
       
 22757     if (Object(external_this_lodash_["isBoolean"])(list)) {
       
 22758       return list;
       
 22759     }
       
 22760 
       
 22761     if (Object(external_this_lodash_["isArray"])(list)) {
       
 22762       // TODO: when there is a canonical way to detect that we are editing a post
       
 22763       // the following check should be changed to something like:
       
 22764       // if ( list.includes( 'core/post-content' ) && getEditorMode() === 'post-content' && item === null )
       
 22765       if (list.includes('core/post-content') && item === null) {
       
 22766         return true;
       
 22767       }
       
 22768 
       
 22769       return list.includes(item);
       
 22770     }
       
 22771 
       
 22772     return defaultResult;
       
 22773   };
       
 22774 
       
 22775   var blockType = Object(external_this_wp_blocks_["getBlockType"])(blockName);
       
 22776 
       
 22777   if (!blockType) {
       
 22778     return false;
       
 22779   }
       
 22780 
       
 22781   var _getSettings = selectors_getSettings(state),
       
 22782       allowedBlockTypes = _getSettings.allowedBlockTypes;
       
 22783 
       
 22784   var isBlockAllowedInEditor = checkAllowList(allowedBlockTypes, blockName, true);
       
 22785 
       
 22786   if (!isBlockAllowedInEditor) {
       
 22787     return false;
       
 22788   }
       
 22789 
       
 22790   var isLocked = !!selectors_getTemplateLock(state, rootClientId);
       
 22791 
       
 22792   if (isLocked) {
       
 22793     return false;
       
 22794   }
       
 22795 
       
 22796   var parentBlockListSettings = selectors_getBlockListSettings(state, rootClientId);
       
 22797   var parentAllowedBlocks = Object(external_this_lodash_["get"])(parentBlockListSettings, ['allowedBlocks']);
       
 22798   var hasParentAllowedBlock = checkAllowList(parentAllowedBlocks, blockName);
       
 22799   var blockAllowedParentBlocks = blockType.parent;
       
 22800   var parentName = selectors_getBlockName(state, rootClientId);
       
 22801   var hasBlockAllowedParent = checkAllowList(blockAllowedParentBlocks, parentName);
       
 22802 
       
 22803   if (hasParentAllowedBlock !== null && hasBlockAllowedParent !== null) {
       
 22804     return hasParentAllowedBlock || hasBlockAllowedParent;
       
 22805   } else if (hasParentAllowedBlock !== null) {
       
 22806     return hasParentAllowedBlock;
       
 22807   } else if (hasBlockAllowedParent !== null) {
       
 22808     return hasBlockAllowedParent;
       
 22809   }
       
 22810 
       
 22811   return true;
       
 22812 };
       
 22813 /**
       
 22814  * Determines if the given block type is allowed to be inserted into the block list.
       
 22815  *
       
 22816  * @param {Object}  state        Editor state.
       
 22817  * @param {string}  blockName    The name of the block type, e.g.' core/paragraph'.
       
 22818  * @param {?string} rootClientId Optional root client ID of block list.
       
 22819  *
       
 22820  * @return {boolean} Whether the given block type is allowed to be inserted.
       
 22821  */
       
 22822 
       
 22823 
       
 22824 var selectors_canInsertBlockType = Object(rememo["a" /* default */])(selectors_canInsertBlockTypeUnmemoized, function (state, blockName, rootClientId) {
       
 22825   return [state.blockListSettings[rootClientId], state.blocks.byClientId[rootClientId], state.settings.allowedBlockTypes, state.settings.templateLock];
       
 22826 });
       
 22827 /**
       
 22828  * Determines if the given blocks are allowed to be inserted into the block
       
 22829  * list.
       
 22830  *
       
 22831  * @param {Object}  state        Editor state.
       
 22832  * @param {string}  clientIds    The block client IDs to be inserted.
       
 22833  * @param {?string} rootClientId Optional root client ID of block list.
       
 22834  *
       
 22835  * @return {boolean} Whether the given blocks are allowed to be inserted.
       
 22836  */
       
 22837 
       
 22838 function selectors_canInsertBlocks(state, clientIds) {
       
 22839   var rootClientId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
       
 22840   return clientIds.every(function (id) {
       
 22841     return selectors_canInsertBlockType(state, selectors_getBlockName(state, id), rootClientId);
       
 22842   });
       
 22843 }
       
 22844 /**
       
 22845  * Returns information about how recently and frequently a block has been inserted.
       
 22846  *
       
 22847  * @param {Object} state Global application state.
       
 22848  * @param {string} id    A string which identifies the insert, e.g. 'core/block/12'
       
 22849  *
       
 22850  * @return {?{ time: number, count: number }} An object containing `time` which is when the last
       
 22851  *                                            insert occurred as a UNIX epoch, and `count` which is
       
 22852  *                                            the number of inserts that have occurred.
       
 22853  */
       
 22854 
       
 22855 function getInsertUsage(state, id) {
       
 22856   return Object(external_this_lodash_["get"])(state.preferences.insertUsage, [id], null);
       
 22857 }
       
 22858 /**
       
 22859  * Returns whether we can show a block type in the inserter
       
 22860  *
       
 22861  * @param {Object} state Global State
       
 22862  * @param {Object} blockType BlockType
       
 22863  * @param {?string} rootClientId Optional root client ID of block list.
       
 22864  *
       
 22865  * @return {boolean} Whether the given block type is allowed to be shown in the inserter.
       
 22866  */
       
 22867 
       
 22868 
       
 22869 var selectors_canIncludeBlockTypeInInserter = function canIncludeBlockTypeInInserter(state, blockType, rootClientId) {
       
 22870   if (!Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'inserter', true)) {
       
 22871     return false;
       
 22872   }
       
 22873 
       
 22874   return selectors_canInsertBlockTypeUnmemoized(state, blockType.name, rootClientId);
       
 22875 };
       
 22876 /**
       
 22877  * Determines the items that appear in the inserter. Includes both static
       
 22878  * items (e.g. a regular block type) and dynamic items (e.g. a reusable block).
       
 22879  *
       
 22880  * Each item object contains what's necessary to display a button in the
       
 22881  * inserter and handle its selection.
       
 22882  *
       
 22883  * The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency)
       
 22884  * that combines block usage frequenty and recency.
       
 22885  *
       
 22886  * Items are returned ordered descendingly by their 'utility' and 'frecency'.
       
 22887  *
       
 22888  * @param {Object}  state        Editor state.
       
 22889  * @param {?string} rootClientId Optional root client ID of block list.
       
 22890  *
       
 22891  * @return {WPEditorInserterItem[]} Items that appear in inserter.
       
 22892  *
       
 22893  * @typedef {Object} WPEditorInserterItem
       
 22894  * @property {string}   id                Unique identifier for the item.
       
 22895  * @property {string}   name              The type of block to create.
       
 22896  * @property {Object}   initialAttributes Attributes to pass to the newly created block.
       
 22897  * @property {string}   title             Title of the item, as it appears in the inserter.
       
 22898  * @property {string}   icon              Dashicon for the item, as it appears in the inserter.
       
 22899  * @property {string}   category          Block category that the item is associated with.
       
 22900  * @property {string[]} keywords          Keywords that can be searched to find this item.
       
 22901  * @property {boolean}  isDisabled        Whether or not the user should be prevented from inserting
       
 22902  *                                        this item.
       
 22903  * @property {number}   frecency          Hueristic that combines frequency and recency.
       
 22904  */
       
 22905 
       
 22906 
       
 22907 var selectors_getInserterItems = Object(rememo["a" /* default */])(function (state) {
       
 22908   var rootClientId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
       
 22909 
       
 22910   var calculateFrecency = function calculateFrecency(time, count) {
       
 22911     if (!time) {
       
 22912       return count;
       
 22913     } // The selector is cached, which means Date.now() is the last time that the
       
 22914     // relevant state changed. This suits our needs.
       
 22915 
       
 22916 
       
 22917     var duration = Date.now() - time;
       
 22918 
       
 22919     switch (true) {
       
 22920       case duration < MILLISECONDS_PER_HOUR:
       
 22921         return count * 4;
       
 22922 
       
 22923       case duration < MILLISECONDS_PER_DAY:
       
 22924         return count * 2;
       
 22925 
       
 22926       case duration < MILLISECONDS_PER_WEEK:
       
 22927         return count / 2;
       
 22928 
       
 22929       default:
       
 22930         return count / 4;
       
 22931     }
       
 22932   };
       
 22933 
       
 22934   var buildBlockTypeInserterItem = function buildBlockTypeInserterItem(blockType) {
       
 22935     var id = blockType.name;
       
 22936     var isDisabled = false;
       
 22937 
       
 22938     if (!Object(external_this_wp_blocks_["hasBlockSupport"])(blockType.name, 'multiple', true)) {
       
 22939       isDisabled = Object(external_this_lodash_["some"])(selectors_getBlocksByClientId(state, getClientIdsWithDescendants(state)), {
       
 22940         name: blockType.name
       
 22941       });
       
 22942     }
       
 22943 
       
 22944     var _ref2 = getInsertUsage(state, id) || {},
       
 22945         time = _ref2.time,
       
 22946         _ref2$count = _ref2.count,
       
 22947         count = _ref2$count === void 0 ? 0 : _ref2$count;
       
 22948 
       
 22949     var inserterVariations = blockType.variations.filter(function (_ref3) {
       
 22950       var scope = _ref3.scope;
       
 22951       return !scope || scope.includes('inserter');
       
 22952     });
       
 22953     return {
       
 22954       id: id,
       
 22955       name: blockType.name,
       
 22956       initialAttributes: {},
       
 22957       title: blockType.title,
       
 22958       description: blockType.description,
       
 22959       icon: blockType.icon,
       
 22960       category: blockType.category,
       
 22961       keywords: blockType.keywords,
       
 22962       variations: inserterVariations,
       
 22963       example: blockType.example,
       
 22964       isDisabled: isDisabled,
       
 22965       utility: 1,
       
 22966       // deprecated
       
 22967       frecency: calculateFrecency(time, count)
       
 22968     };
       
 22969   };
       
 22970 
       
 22971   var buildReusableBlockInserterItem = function buildReusableBlockInserterItem(reusableBlock) {
       
 22972     var id = "core/block/".concat(reusableBlock.id);
       
 22973 
       
 22974     var referencedBlocks = __experimentalGetParsedReusableBlock(state, reusableBlock.id);
       
 22975 
       
 22976     var referencedBlockType;
       
 22977 
       
 22978     if (referencedBlocks.length === 1) {
       
 22979       referencedBlockType = Object(external_this_wp_blocks_["getBlockType"])(referencedBlocks[0].name);
       
 22980     }
       
 22981 
       
 22982     var _ref4 = getInsertUsage(state, id) || {},
       
 22983         time = _ref4.time,
       
 22984         _ref4$count = _ref4.count,
       
 22985         count = _ref4$count === void 0 ? 0 : _ref4$count;
       
 22986 
       
 22987     var frecency = calculateFrecency(time, count);
       
 22988     return {
       
 22989       id: id,
       
 22990       name: 'core/block',
       
 22991       initialAttributes: {
       
 22992         ref: reusableBlock.id
       
 22993       },
       
 22994       title: reusableBlock.title,
       
 22995       icon: referencedBlockType ? referencedBlockType.icon : templateIcon,
       
 22996       category: 'reusable',
       
 22997       keywords: [],
       
 22998       isDisabled: false,
       
 22999       utility: 1,
       
 23000       // deprecated
       
 23001       frecency: frecency
       
 23002     };
       
 23003   };
       
 23004 
       
 23005   var blockTypeInserterItems = Object(external_this_wp_blocks_["getBlockTypes"])().filter(function (blockType) {
       
 23006     return selectors_canIncludeBlockTypeInInserter(state, blockType, rootClientId);
       
 23007   }).map(buildBlockTypeInserterItem);
       
 23008   var reusableBlockInserterItems = selectors_canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).map(buildReusableBlockInserterItem) : [];
       
 23009   return [].concat(Object(toConsumableArray["a" /* default */])(blockTypeInserterItems), Object(toConsumableArray["a" /* default */])(reusableBlockInserterItems));
       
 23010 }, function (state, rootClientId) {
       
 23011   return [state.blockListSettings[rootClientId], state.blocks.byClientId, state.blocks.order, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), Object(external_this_wp_blocks_["getBlockTypes"])()];
       
 23012 });
       
 23013 /**
       
 23014  * Determines whether there are items to show in the inserter.
       
 23015  *
       
 23016  * @param {Object}  state        Editor state.
       
 23017  * @param {?string} rootClientId Optional root client ID of block list.
       
 23018  *
       
 23019  * @return {boolean} Items that appear in inserter.
       
 23020  */
       
 23021 
       
 23022 var selectors_hasInserterItems = Object(rememo["a" /* default */])(function (state) {
       
 23023   var rootClientId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
       
 23024   var hasBlockType = Object(external_this_lodash_["some"])(Object(external_this_wp_blocks_["getBlockTypes"])(), function (blockType) {
       
 23025     return selectors_canIncludeBlockTypeInInserter(state, blockType, rootClientId);
       
 23026   });
       
 23027 
       
 23028   if (hasBlockType) {
       
 23029     return true;
       
 23030   }
       
 23031 
       
 23032   var hasReusableBlock = selectors_canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) && getReusableBlocks(state).length > 0;
       
 23033   return hasReusableBlock;
       
 23034 }, function (state, rootClientId) {
       
 23035   return [state.blockListSettings[rootClientId], state.blocks.byClientId, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), Object(external_this_wp_blocks_["getBlockTypes"])()];
       
 23036 });
       
 23037 /**
       
 23038  * Returns the list of allowed inserter blocks for inner blocks children
       
 23039  *
       
 23040  * @param {Object}  state        Editor state.
       
 23041  * @param {?string} rootClientId Optional root client ID of block list.
       
 23042  *
       
 23043  * @return {Array?} The list of allowed block types.
       
 23044  */
       
 23045 
       
 23046 var selectors_experimentalGetAllowedBlocks = Object(rememo["a" /* default */])(function (state) {
       
 23047   var rootClientId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
       
 23048 
       
 23049   if (!rootClientId) {
       
 23050     return;
       
 23051   }
       
 23052 
       
 23053   return Object(external_this_lodash_["filter"])(Object(external_this_wp_blocks_["getBlockTypes"])(), function (blockType) {
       
 23054     return selectors_canIncludeBlockTypeInInserter(state, blockType, rootClientId);
       
 23055   });
       
 23056 }, function (state, rootClientId) {
       
 23057   return [state.blockListSettings[rootClientId], state.blocks.byClientId, state.settings.allowedBlockTypes, state.settings.templateLock, Object(external_this_wp_blocks_["getBlockTypes"])()];
       
 23058 });
       
 23059 /**
       
 23060  * Returns the Block List settings of a block, if any exist.
       
 23061  *
       
 23062  * @param {Object}  state    Editor state.
       
 23063  * @param {?string} clientId Block client ID.
       
 23064  *
       
 23065  * @return {?Object} Block settings of the block if set.
       
 23066  */
       
 23067 
       
 23068 function selectors_getBlockListSettings(state, clientId) {
       
 23069   return state.blockListSettings[clientId];
       
 23070 }
       
 23071 /**
       
 23072  * Returns the editor settings.
       
 23073  *
       
 23074  * @param {Object} state Editor state.
       
 23075  *
       
 23076  * @return {Object} The editor settings object.
       
 23077  */
       
 23078 
       
 23079 function selectors_getSettings(state) {
       
 23080   return state.settings;
       
 23081 }
       
 23082 /**
       
 23083  * Returns true if the most recent block change is be considered persistent, or
       
 23084  * false otherwise. A persistent change is one committed by BlockEditorProvider
       
 23085  * via its `onChange` callback, in addition to `onInput`.
       
 23086  *
       
 23087  * @param {Object} state Block editor state.
       
 23088  *
       
 23089  * @return {boolean} Whether the most recent block change was persistent.
       
 23090  */
       
 23091 
       
 23092 function isLastBlockChangePersistent(state) {
       
 23093   return state.blocks.isPersistentChange;
       
 23094 }
       
 23095 /**
       
 23096  * Returns the Block List settings for an array of blocks, if any exist.
       
 23097  *
       
 23098  * @param {Object}  state    Editor state.
       
 23099  * @param {Array} clientIds Block client IDs.
       
 23100  *
       
 23101  * @return {Array} Block List Settings for each of the found blocks
       
 23102  */
       
 23103 
       
 23104 var selectors_experimentalGetBlockListSettingsForBlocks = Object(rememo["a" /* default */])(function (state, clientIds) {
       
 23105   return Object(external_this_lodash_["filter"])(state.blockListSettings, function (value, key) {
       
 23106     return clientIds.includes(key);
       
 23107   });
       
 23108 }, function (state) {
       
 23109   return [state.blockListSettings];
       
 23110 });
       
 23111 /**
       
 23112  * Returns the parsed block saved as shared block with the given ID.
       
 23113  *
       
 23114  * @param {Object}        state Global application state.
       
 23115  * @param {number|string} ref   The shared block's ID.
       
 23116  *
       
 23117  * @return {Object} The parsed block.
       
 23118  */
       
 23119 
       
 23120 var __experimentalGetParsedReusableBlock = Object(rememo["a" /* default */])(function (state, ref) {
       
 23121   var reusableBlock = Object(external_this_lodash_["find"])(getReusableBlocks(state), function (block) {
       
 23122     return block.id === ref;
       
 23123   });
       
 23124 
       
 23125   if (!reusableBlock) {
       
 23126     return null;
       
 23127   }
       
 23128 
       
 23129   return Object(external_this_wp_blocks_["parse"])(reusableBlock.content);
       
 23130 }, function (state) {
       
 23131   return [getReusableBlocks(state)];
       
 23132 });
       
 23133 /**
       
 23134  * Returns true if the most recent block change is be considered ignored, or
       
 23135  * false otherwise. An ignored change is one not to be committed by
       
 23136  * BlockEditorProvider, neither via `onChange` nor `onInput`.
       
 23137  *
       
 23138  * @param {Object} state Block editor state.
       
 23139  *
       
 23140  * @return {boolean} Whether the most recent block change was ignored.
       
 23141  */
       
 23142 
       
 23143 function __unstableIsLastBlockChangeIgnored(state) {
       
 23144   // TODO: Removal Plan: Changes incurred by RECEIVE_BLOCKS should not be
       
 23145   // ignored if in-fact they result in a change in blocks state. The current
       
 23146   // need to ignore changes not a result of user interaction should be
       
 23147   // accounted for in the refactoring of reusable blocks as occurring within
       
 23148   // their own separate block editor / state (#7119).
       
 23149   return state.blocks.isIgnoredChange;
       
 23150 }
       
 23151 /**
       
 23152  * Returns the block attributes changed as a result of the last dispatched
       
 23153  * action.
       
 23154  *
       
 23155  * @param {Object} state Block editor state.
       
 23156  *
       
 23157  * @return {Object<string,Object>} Subsets of block attributes changed, keyed
       
 23158  *                                 by block client ID.
       
 23159  */
       
 23160 
       
 23161 function __experimentalGetLastBlockAttributeChanges(state) {
       
 23162   return state.lastBlockAttributesChange;
       
 23163 }
       
 23164 /**
       
 23165  * Returns the available reusable blocks
       
 23166  *
       
 23167  * @param {Object} state Global application state.
       
 23168  *
       
 23169  * @return {Array} Reusable blocks
       
 23170  */
       
 23171 
       
 23172 function getReusableBlocks(state) {
       
 23173   return Object(external_this_lodash_["get"])(state, ['settings', '__experimentalReusableBlocks'], selectors_EMPTY_ARRAY);
       
 23174 }
       
 23175 /**
       
 23176  * Returns whether the navigation mode is enabled.
       
 23177  *
       
 23178  * @param {Object} state Editor state.
       
 23179  *
       
 23180  * @return {boolean}     Is navigation mode enabled.
       
 23181  */
       
 23182 
       
 23183 
       
 23184 function selectors_isNavigationMode(state) {
       
 23185   return state.isNavigationMode;
       
 23186 }
       
 23187 /**
       
 23188  * Returns whether block moving mode is enabled.
       
 23189  *
       
 23190  * @param {Object} state Editor state.
       
 23191  *
       
 23192  * @return {string}     Client Id of moving block.
       
 23193  */
       
 23194 
       
 23195 function selectors_hasBlockMovingClientId(state) {
       
 23196   return state.hasBlockMovingClientId;
       
 23197 }
       
 23198 /**
       
 23199  * Returns true if the last change was an automatic change, false otherwise.
       
 23200  *
       
 23201  * @param {Object} state Global application state.
       
 23202  *
       
 23203  * @return {boolean} Whether the last change was automatic.
       
 23204  */
       
 23205 
       
 23206 function selectors_didAutomaticChange(state) {
       
 23207   return !!state.automaticChangeStatus;
       
 23208 }
       
 23209 /**
       
 23210  * Returns true if the current highlighted block matches the block clientId.
       
 23211  *
       
 23212  * @param {Object} state Global application state.
       
 23213  * @param {string} clientId The block to check.
       
 23214  *
       
 23215  * @return {boolean} Whether the block is currently highlighted.
       
 23216  */
       
 23217 
       
 23218 function isBlockHighlighted(state, clientId) {
       
 23219   return state.highlightedBlock === clientId;
       
 23220 }
       
 23221 /**
       
 23222  * Checks if a given block has controlled inner blocks.
       
 23223  *
       
 23224  * @param {Object} state Global application state.
       
 23225  * @param {string} clientId The block to check.
       
 23226  *
       
 23227  * @return {boolean} True if the block has controlled inner blocks.
       
 23228  */
       
 23229 
       
 23230 function areInnerBlocksControlled(state, clientId) {
       
 23231   return !!state.blocks.controlledInnerBlocks[clientId];
       
 23232 }
       
 23233 
       
 23234 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/effects.js
       
 23235 
       
 23236 
       
 23237 
       
 23238 
       
 23239 
       
 23240 function effects_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; }
       
 23241 
       
 23242 function effects_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { effects_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 { effects_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 23243 
       
 23244 /**
       
 23245  * External dependencies
       
 23246  */
       
 23247 
       
 23248 /**
       
 23249  * WordPress dependencies
       
 23250  */
       
 23251 
       
 23252 
       
 23253 
       
 23254 
       
 23255 
       
 23256 /**
       
 23257  * Internal dependencies
       
 23258  */
       
 23259 
       
 23260 
       
 23261 
       
 23262 /**
       
 23263  * Block validity is a function of blocks state (at the point of a
       
 23264  * reset) and the template setting. As a compromise to its placement
       
 23265  * across distinct parts of state, it is implemented here as a side-
       
 23266  * effect of the block reset action.
       
 23267  *
       
 23268  * @param {Object} action RESET_BLOCKS action.
       
 23269  * @param {Object} store  Store instance.
       
 23270  *
       
 23271  * @return {?Object} New validity set action if validity has changed.
       
 23272  */
       
 23273 
       
 23274 function validateBlocksToTemplate(action, store) {
       
 23275   var state = store.getState();
       
 23276   var template = getTemplate(state);
       
 23277   var templateLock = selectors_getTemplateLock(state); // Unlocked templates are considered always valid because they act
       
 23278   // as default values only.
       
 23279 
       
 23280   var isBlocksValidToTemplate = !template || templateLock !== 'all' || Object(external_this_wp_blocks_["doBlocksMatchTemplate"])(action.blocks, template); // Update if validity has changed.
       
 23281 
       
 23282   if (isBlocksValidToTemplate !== isValidTemplate(state)) {
       
 23283     return setTemplateValidity(isBlocksValidToTemplate);
       
 23284   }
       
 23285 }
       
 23286 /* harmony default export */ var effects = ({
       
 23287   MERGE_BLOCKS: function MERGE_BLOCKS(action, store) {
       
 23288     var dispatch = store.dispatch;
       
 23289     var state = store.getState();
       
 23290 
       
 23291     var _action$blocks = Object(slicedToArray["a" /* default */])(action.blocks, 2),
       
 23292         clientIdA = _action$blocks[0],
       
 23293         clientIdB = _action$blocks[1];
       
 23294 
       
 23295     var blockA = selectors_getBlock(state, clientIdA);
       
 23296     var blockAType = Object(external_this_wp_blocks_["getBlockType"])(blockA.name); // Only focus the previous block if it's not mergeable
       
 23297 
       
 23298     if (!blockAType.merge) {
       
 23299       dispatch(actions_selectBlock(blockA.clientId));
       
 23300       return;
       
 23301     }
       
 23302 
       
 23303     var blockB = selectors_getBlock(state, clientIdB);
       
 23304     var blockBType = Object(external_this_wp_blocks_["getBlockType"])(blockB.name);
       
 23305 
       
 23306     var _getSelectionStart = selectors_getSelectionStart(state),
       
 23307         clientId = _getSelectionStart.clientId,
       
 23308         attributeKey = _getSelectionStart.attributeKey,
       
 23309         offset = _getSelectionStart.offset;
       
 23310 
       
 23311     var selectedBlockType = clientId === clientIdA ? blockAType : blockBType;
       
 23312     var attributeDefinition = selectedBlockType.attributes[attributeKey];
       
 23313     var canRestoreTextSelection = (clientId === clientIdA || clientId === clientIdB) && attributeKey !== undefined && offset !== undefined && // We cannot restore text selection if the RichText identifier
       
 23314     // is not a defined block attribute key. This can be the case if the
       
 23315     // fallback intance ID is used to store selection (and no RichText
       
 23316     // identifier is set), or when the identifier is wrong.
       
 23317     !!attributeDefinition;
       
 23318 
       
 23319     if (!attributeDefinition) {
       
 23320       if (typeof attributeKey === 'number') {
       
 23321         window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(esm_typeof["a" /* default */])(attributeKey)));
       
 23322       } else {
       
 23323         window.console.error('The RichText identifier prop does not match any attributes defined by the block.');
       
 23324       }
       
 23325     } // A robust way to retain selection position through various transforms
       
 23326     // is to insert a special character at the position and then recover it.
       
 23327 
       
 23328 
       
 23329     var START_OF_SELECTED_AREA = "\x86"; // Clone the blocks so we don't insert the character in a "live" block.
       
 23330 
       
 23331     var cloneA = Object(external_this_wp_blocks_["cloneBlock"])(blockA);
       
 23332     var cloneB = Object(external_this_wp_blocks_["cloneBlock"])(blockB);
       
 23333 
       
 23334     if (canRestoreTextSelection) {
       
 23335       var selectedBlock = clientId === clientIdA ? cloneA : cloneB;
       
 23336       var html = selectedBlock.attributes[attributeKey];
       
 23337       var multilineTag = attributeDefinition.multiline,
       
 23338           multilineWrapperTags = attributeDefinition.__unstableMultilineWrapperTags,
       
 23339           preserveWhiteSpace = attributeDefinition.__unstablePreserveWhiteSpace;
       
 23340       var value = Object(external_this_wp_richText_["insert"])(Object(external_this_wp_richText_["create"])({
       
 23341         html: html,
       
 23342         multilineTag: multilineTag,
       
 23343         multilineWrapperTags: multilineWrapperTags,
       
 23344         preserveWhiteSpace: preserveWhiteSpace
       
 23345       }), START_OF_SELECTED_AREA, offset, offset);
       
 23346       selectedBlock.attributes[attributeKey] = Object(external_this_wp_richText_["toHTMLString"])({
       
 23347         value: value,
       
 23348         multilineTag: multilineTag,
       
 23349         preserveWhiteSpace: preserveWhiteSpace
       
 23350       });
       
 23351     } // We can only merge blocks with similar types
       
 23352     // thus, we transform the block to merge first
       
 23353 
       
 23354 
       
 23355     var blocksWithTheSameType = blockA.name === blockB.name ? [cloneB] : Object(external_this_wp_blocks_["switchToBlockType"])(cloneB, blockA.name); // If the block types can not match, do nothing
       
 23356 
       
 23357     if (!blocksWithTheSameType || !blocksWithTheSameType.length) {
       
 23358       return;
       
 23359     } // Calling the merge to update the attributes and remove the block to be merged
       
 23360 
       
 23361 
       
 23362     var updatedAttributes = blockAType.merge(cloneA.attributes, blocksWithTheSameType[0].attributes);
       
 23363 
       
 23364     if (canRestoreTextSelection) {
       
 23365       var newAttributeKey = Object(external_this_lodash_["findKey"])(updatedAttributes, function (v) {
       
 23366         return typeof v === 'string' && v.indexOf(START_OF_SELECTED_AREA) !== -1;
       
 23367       });
       
 23368       var convertedHtml = updatedAttributes[newAttributeKey];
       
 23369       var _blockAType$attribute = blockAType.attributes[newAttributeKey],
       
 23370           _multilineTag = _blockAType$attribute.multiline,
       
 23371           _multilineWrapperTags = _blockAType$attribute.__unstableMultilineWrapperTags,
       
 23372           _preserveWhiteSpace = _blockAType$attribute.__unstablePreserveWhiteSpace;
       
 23373       var convertedValue = Object(external_this_wp_richText_["create"])({
       
 23374         html: convertedHtml,
       
 23375         multilineTag: _multilineTag,
       
 23376         multilineWrapperTags: _multilineWrapperTags,
       
 23377         preserveWhiteSpace: _preserveWhiteSpace
       
 23378       });
       
 23379       var newOffset = convertedValue.text.indexOf(START_OF_SELECTED_AREA);
       
 23380       var newValue = Object(external_this_wp_richText_["remove"])(convertedValue, newOffset, newOffset + 1);
       
 23381       var newHtml = Object(external_this_wp_richText_["toHTMLString"])({
       
 23382         value: newValue,
       
 23383         multilineTag: _multilineTag,
       
 23384         preserveWhiteSpace: _preserveWhiteSpace
       
 23385       });
       
 23386       updatedAttributes[newAttributeKey] = newHtml;
       
 23387       dispatch(actions_selectionChange(blockA.clientId, newAttributeKey, newOffset, newOffset));
       
 23388     }
       
 23389 
       
 23390     dispatch(actions_replaceBlocks([blockA.clientId, blockB.clientId], [effects_objectSpread({}, blockA, {
       
 23391       attributes: effects_objectSpread({}, blockA.attributes, {}, updatedAttributes)
       
 23392     })].concat(Object(toConsumableArray["a" /* default */])(blocksWithTheSameType.slice(1)))));
       
 23393   },
       
 23394   RESET_BLOCKS: [validateBlocksToTemplate],
       
 23395   MULTI_SELECT: function MULTI_SELECT(action, _ref) {
       
 23396     var getState = _ref.getState;
       
 23397     var blockCount = selectors_getSelectedBlockCount(getState());
       
 23398     Object(external_this_wp_a11y_["speak"])(Object(external_this_wp_i18n_["sprintf"])(
       
 23399     /* translators: %s: number of selected blocks */
       
 23400     Object(external_this_wp_i18n_["_n"])('%s block selected.', '%s blocks selected.', blockCount), blockCount), 'assertive');
       
 23401   },
       
 23402   SYNCHRONIZE_TEMPLATE: function SYNCHRONIZE_TEMPLATE(action, _ref2) {
       
 23403     var getState = _ref2.getState;
       
 23404     var state = getState();
       
 23405     var blocks = selectors_getBlocks(state);
       
 23406     var template = getTemplate(state);
       
 23407     var updatedBlockList = Object(external_this_wp_blocks_["synchronizeBlocksWithTemplate"])(blocks, template);
       
 23408     return actions_resetBlocks(updatedBlockList);
       
 23409   },
       
 23410   MARK_AUTOMATIC_CHANGE: function MARK_AUTOMATIC_CHANGE(action, store) {
       
 23411     var _window = window,
       
 23412         setTimeout = _window.setTimeout,
       
 23413         _window$requestIdleCa = _window.requestIdleCallback,
       
 23414         requestIdleCallback = _window$requestIdleCa === void 0 ? function (callback) {
       
 23415       return setTimeout(callback, 100);
       
 23416     } : _window$requestIdleCa;
       
 23417     requestIdleCallback(function () {
       
 23418       store.dispatch({
       
 23419         type: 'MARK_AUTOMATIC_CHANGE_FINAL'
       
 23420       });
       
 23421     });
       
 23422   }
       
 23423 });
       
 23424 
       
 23425 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/middlewares.js
       
 23426 
       
 23427 
       
 23428 /**
       
 23429  * External dependencies
       
 23430  */
       
 23431 
       
 23432 
       
 23433 
       
 23434 /**
       
 23435  * Internal dependencies
       
 23436  */
       
 23437 
       
 23438 
       
 23439 /**
       
 23440  * Applies the custom middlewares used specifically in the editor module.
       
 23441  *
       
 23442  * @param {Object} store Store Object.
       
 23443  *
       
 23444  * @return {Object} Update Store Object.
       
 23445  */
       
 23446 
       
 23447 function applyMiddlewares(store) {
       
 23448   var middlewares = [refx_default()(effects), redux_multi_lib_default.a];
       
 23449 
       
 23450   var enhancedDispatch = function enhancedDispatch() {
       
 23451     throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
       
 23452   };
       
 23453 
       
 23454   var chain = [];
       
 23455   var middlewareAPI = {
       
 23456     getState: store.getState,
       
 23457     dispatch: function dispatch() {
       
 23458       return enhancedDispatch.apply(void 0, arguments);
       
 23459     }
       
 23460   };
       
 23461   chain = middlewares.map(function (middleware) {
       
 23462     return middleware(middlewareAPI);
       
 23463   });
       
 23464   enhancedDispatch = external_this_lodash_["flowRight"].apply(void 0, Object(toConsumableArray["a" /* default */])(chain))(store.dispatch);
       
 23465   store.dispatch = enhancedDispatch;
       
 23466   return store;
       
 23467 }
       
 23468 
       
 23469 /* harmony default export */ var store_middlewares = (applyMiddlewares);
       
 23470 
       
 23471 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/index.js
       
 23472 
       
 23473 
       
 23474 function store_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; }
       
 23475 
       
 23476 function store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { store_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 { store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 23477 
       
 23478 /**
       
 23479  * WordPress dependencies
       
 23480  */
       
 23481 
       
 23482 /**
       
 23483  * Internal dependencies
       
 23484  */
       
 23485 
       
 23486 
       
 23487 
       
 23488 
       
 23489 
       
 23490 
       
 23491 /**
       
 23492  * Module Constants
       
 23493  */
       
 23494 
       
 23495 var MODULE_KEY = 'core/block-editor';
       
 23496 /**
       
 23497  * Block editor data store configuration.
       
 23498  *
       
 23499  * @see https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#registerStore
       
 23500  *
       
 23501  * @type {Object}
       
 23502  */
       
 23503 
       
 23504 var storeConfig = {
       
 23505   reducer: store_reducer,
       
 23506   selectors: selectors_namespaceObject,
       
 23507   actions: actions_namespaceObject,
       
 23508   controls: store_controls
       
 23509 };
       
 23510 var store_store = Object(external_this_wp_data_["registerStore"])(MODULE_KEY, store_objectSpread({}, storeConfig, {
       
 23511   persist: ['preferences']
       
 23512 }));
       
 23513 store_middlewares(store_store);
       
 23514 /* harmony default export */ var build_module_store = (store_store);
       
 23515 
       
 23516 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/provider/with-registry-provider.js
       
 23517 
       
 23518 
       
 23519 
       
 23520 
       
 23521 
       
 23522 /**
       
 23523  * WordPress dependencies
       
 23524  */
       
 23525 
       
 23526 
       
 23527 
       
 23528 /**
       
 23529  * Internal dependencies
       
 23530  */
       
 23531 
       
 23532 
       
 23533 
       
 23534 var withRegistryProvider = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (WrappedComponent) {
       
 23535   return Object(external_this_wp_data_["withRegistry"])(function (_ref) {
       
 23536     var _ref$useSubRegistry = _ref.useSubRegistry,
       
 23537         useSubRegistry = _ref$useSubRegistry === void 0 ? true : _ref$useSubRegistry,
       
 23538         registry = _ref.registry,
       
 23539         props = Object(objectWithoutProperties["a" /* default */])(_ref, ["useSubRegistry", "registry"]);
       
 23540 
       
 23541     if (!useSubRegistry) {
 21544     if (!useSubRegistry) {
 23542       return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({
 21545       return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({
 23543         registry: registry
 21546         registry: registry
 23544       }, props));
 21547       }, props));
 23545     }
 21548     }
 23546 
 21549 
 23547     var _useState = Object(external_this_wp_element_["useState"])(null),
 21550     const [subRegistry, setSubRegistry] = Object(external_wp_element_["useState"])(null);
 23548         _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 21551     Object(external_wp_element_["useEffect"])(() => {
 23549         subRegistry = _useState2[0],
 21552       const newRegistry = Object(external_wp_data_["createRegistry"])({}, registry);
 23550         setSubRegistry = _useState2[1];
 21553       newRegistry.registerStore(STORE_NAME, storeConfig);
 23551 
       
 23552     Object(external_this_wp_element_["useEffect"])(function () {
       
 23553       var newRegistry = Object(external_this_wp_data_["createRegistry"])({}, registry);
       
 23554       var store = newRegistry.registerStore('core/block-editor', storeConfig); // This should be removed after the refactoring of the effects to controls.
       
 23555 
       
 23556       store_middlewares(store);
       
 23557       setSubRegistry(newRegistry);
 21554       setSubRegistry(newRegistry);
 23558     }, [registry]);
 21555     }, [registry]);
 23559 
 21556 
 23560     if (!subRegistry) {
 21557     if (!subRegistry) {
 23561       return null;
 21558       return null;
 23562     }
 21559     }
 23563 
 21560 
 23564     return Object(external_this_wp_element_["createElement"])(external_this_wp_data_["RegistryProvider"], {
 21561     return Object(external_wp_element_["createElement"])(external_wp_data_["RegistryProvider"], {
 23565       value: subRegistry
 21562       value: subRegistry
 23566     }, Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({
 21563     }, Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({
 23567       registry: subRegistry
 21564       registry: subRegistry
 23568     }, props)));
 21565     }, props)));
 23569   });
 21566   });
 23570 }, 'withRegistryProvider');
 21567 }, 'withRegistryProvider');
 23571 /* harmony default export */ var with_registry_provider = (withRegistryProvider);
 21568 /* harmony default export */ var with_registry_provider = (withRegistryProvider);
 23577 
 21574 
 23578 /**
 21575 /**
 23579  * WordPress dependencies
 21576  * WordPress dependencies
 23580  */
 21577  */
 23581 
 21578 
       
 21579 
       
 21580 
       
 21581 
       
 21582 /**
       
 21583  * Internal dependencies
       
 21584  */
 23582 
 21585 
 23583 
 21586 
 23584 /**
 21587 /**
 23585  * A function to call when the block value has been updated in the block-editor
 21588  * A function to call when the block value has been updated in the block-editor
 23586  * store.
 21589  * store.
 23619  *                                controller.
 21622  *                                controller.
 23620  * @param {Object[]} props.value  The control value for the blocks. This value
 21623  * @param {Object[]} props.value  The control value for the blocks. This value
 23621  *                                is used to initalize the block-editor store
 21624  *                                is used to initalize the block-editor store
 23622  *                                and for resetting the blocks to incoming
 21625  *                                and for resetting the blocks to incoming
 23623  *                                changes like undo.
 21626  *                                changes like undo.
 23624  * @param {Object} props.selectionStart The selection start vlaue from the
 21627  * @param {Object} props.selection The selection state responsible to restore the selection on undo/redo.
 23625  *                                controlling component.
       
 23626  * @param {Object} props.selectionEnd The selection end vlaue from the
       
 23627  *                                controlling component.
       
 23628  * @param {onBlockUpdate} props.onChange Function to call when a persistent
 21628  * @param {onBlockUpdate} props.onChange Function to call when a persistent
 23629  *                                change has been made in the block-editor blocks
 21629  *                                change has been made in the block-editor blocks
 23630  *                                for the given clientId. For example, after
 21630  *                                for the given clientId. For example, after
 23631  *                                this function is called, an entity is marked
 21631  *                                this function is called, an entity is marked
 23632  *                                dirty because it has changes to save.
 21632  *                                dirty because it has changes to save.
 23634  *                                change has been made in the block-editor blocks
 21634  *                                change has been made in the block-editor blocks
 23635  *                                for the given clientId. When this is called,
 21635  *                                for the given clientId. When this is called,
 23636  *                                controlling sources do not become dirty.
 21636  *                                controlling sources do not become dirty.
 23637  */
 21637  */
 23638 
 21638 
 23639 function useBlockSync(_ref) {
 21639 function useBlockSync({
 23640   var _ref$clientId = _ref.clientId,
 21640   clientId = null,
 23641       clientId = _ref$clientId === void 0 ? null : _ref$clientId,
 21641   value: controlledBlocks,
 23642       controlledBlocks = _ref.value,
 21642   selection: controlledSelection,
 23643       controlledSelectionStart = _ref.selectionStart,
 21643   onChange = external_lodash_["noop"],
 23644       controlledSelectionEnd = _ref.selectionEnd,
 21644   onInput = external_lodash_["noop"]
 23645       _ref$onChange = _ref.onChange,
 21645 }) {
 23646       onChange = _ref$onChange === void 0 ? external_this_lodash_["noop"] : _ref$onChange,
 21646   const registry = Object(external_wp_data_["useRegistry"])();
 23647       _ref$onInput = _ref.onInput,
 21647   const {
 23648       onInput = _ref$onInput === void 0 ? external_this_lodash_["noop"] : _ref$onInput;
 21648     resetBlocks,
 23649   var registry = Object(external_this_wp_data_["useRegistry"])();
 21649     resetSelection,
 23650 
 21650     replaceInnerBlocks,
 23651   var _registry$dispatch = registry.dispatch('core/block-editor'),
 21651     setHasControlledInnerBlocks,
 23652       resetBlocks = _registry$dispatch.resetBlocks,
 21652     __unstableMarkNextChangeAsNotPersistent
 23653       resetSelection = _registry$dispatch.resetSelection,
 21653   } = registry.dispatch(store);
 23654       replaceInnerBlocks = _registry$dispatch.replaceInnerBlocks,
 21654   const {
 23655       setHasControlledInnerBlocks = _registry$dispatch.setHasControlledInnerBlocks,
 21655     getBlockName,
 23656       __unstableMarkNextChangeAsNotPersistent = _registry$dispatch.__unstableMarkNextChangeAsNotPersistent;
 21656     getBlocks
 23657 
 21657   } = registry.select(store);
 23658   var _registry$select = registry.select('core/block-editor'),
 21658   const pendingChanges = Object(external_wp_element_["useRef"])({
 23659       getBlockName = _registry$select.getBlockName,
       
 23660       getBlocks = _registry$select.getBlocks;
       
 23661 
       
 23662   var pendingChanges = Object(external_this_wp_element_["useRef"])({
       
 23663     incoming: null,
 21659     incoming: null,
 23664     outgoing: []
 21660     outgoing: []
 23665   });
 21661   });
 23666 
 21662   const subscribed = Object(external_wp_element_["useRef"])(false);
 23667   var setControlledBlocks = function setControlledBlocks() {
 21663 
       
 21664   const setControlledBlocks = () => {
 23668     if (!controlledBlocks) {
 21665     if (!controlledBlocks) {
 23669       return;
 21666       return;
 23670     } // We don't need to persist this change because we only replace
 21667     } // We don't need to persist this change because we only replace
 23671     // controlled inner blocks when the change was caused by an entity,
 21668     // controlled inner blocks when the change was caused by an entity,
 23672     // and so it would already be persisted.
 21669     // and so it would already be persisted.
 23677     if (clientId) {
 21674     if (clientId) {
 23678       setHasControlledInnerBlocks(clientId, true);
 21675       setHasControlledInnerBlocks(clientId, true);
 23679 
 21676 
 23680       __unstableMarkNextChangeAsNotPersistent();
 21677       __unstableMarkNextChangeAsNotPersistent();
 23681 
 21678 
 23682       replaceInnerBlocks(clientId, controlledBlocks, false);
 21679       const storeBlocks = controlledBlocks.map(block => Object(external_wp_blocks_["cloneBlock"])(block));
       
 21680 
       
 21681       if (subscribed.current) {
       
 21682         pendingChanges.current.incoming = storeBlocks;
       
 21683       }
       
 21684 
       
 21685       replaceInnerBlocks(clientId, storeBlocks);
 23683     } else {
 21686     } else {
       
 21687       if (subscribed.current) {
       
 21688         pendingChanges.current.incoming = controlledBlocks;
       
 21689       }
       
 21690 
 23684       resetBlocks(controlledBlocks);
 21691       resetBlocks(controlledBlocks);
 23685     }
 21692     }
 23686   }; // Add a subscription to the block-editor registry to detect when changes
 21693   }; // Add a subscription to the block-editor registry to detect when changes
 23687   // have been made. This lets us inform the data source of changes. This
 21694   // have been made. This lets us inform the data source of changes. This
 23688   // is an effect so that the subscriber can run synchronously without
 21695   // is an effect so that the subscriber can run synchronously without
 23689   // waiting for React renders for changes.
 21696   // waiting for React renders for changes.
 23690 
 21697 
 23691 
 21698 
 23692   var onInputRef = Object(external_this_wp_element_["useRef"])(onInput);
 21699   const onInputRef = Object(external_wp_element_["useRef"])(onInput);
 23693   var onChangeRef = Object(external_this_wp_element_["useRef"])(onChange);
 21700   const onChangeRef = Object(external_wp_element_["useRef"])(onChange);
 23694   Object(external_this_wp_element_["useEffect"])(function () {
 21701   Object(external_wp_element_["useEffect"])(() => {
 23695     onInputRef.current = onInput;
 21702     onInputRef.current = onInput;
 23696     onChangeRef.current = onChange;
 21703     onChangeRef.current = onChange;
 23697   }, [onInput, onChange]);
 21704   }, [onInput, onChange]); // Determine if blocks need to be reset when they change.
 23698   Object(external_this_wp_element_["useEffect"])(function () {
 21705 
 23699     var _registry$select2 = registry.select('core/block-editor'),
 21706   Object(external_wp_element_["useEffect"])(() => {
 23700         getSelectionStart = _registry$select2.getSelectionStart,
 21707     if (pendingChanges.current.outgoing.includes(controlledBlocks)) {
 23701         getSelectionEnd = _registry$select2.getSelectionEnd,
 21708       // Skip block reset if the value matches expected outbound sync
 23702         isLastBlockChangePersistent = _registry$select2.isLastBlockChangePersistent,
 21709       // triggered by this component by a preceding change detection.
 23703         __unstableIsLastBlockChangeIgnored = _registry$select2.__unstableIsLastBlockChangeIgnored;
 21710       // Only skip if the value matches expectation, since a reset should
 23704 
 21711       // still occur if the value is modified (not equal by reference),
 23705     var blocks;
 21712       // to allow that the consumer may apply modifications to reflect
 23706     var isPersistent = isLastBlockChangePersistent();
 21713       // back on the editor.
 23707     var previousAreBlocksDifferent = false;
 21714       if (Object(external_lodash_["last"])(pendingChanges.current.outgoing) === controlledBlocks) {
 23708     var unsubscribe = registry.subscribe(function () {
 21715         pendingChanges.current.outgoing = [];
       
 21716       }
       
 21717     } else if (getBlocks(clientId) !== controlledBlocks) {
       
 21718       // Reset changing value in all other cases than the sync described
       
 21719       // above. Since this can be reached in an update following an out-
       
 21720       // bound sync, unset the outbound value to avoid considering it in
       
 21721       // subsequent renders.
       
 21722       pendingChanges.current.outgoing = [];
       
 21723       setControlledBlocks();
       
 21724 
       
 21725       if (controlledSelection) {
       
 21726         resetSelection(controlledSelection.selectionStart, controlledSelection.selectionEnd, controlledSelection.initialPosition);
       
 21727       }
       
 21728     }
       
 21729   }, [controlledBlocks, clientId]);
       
 21730   Object(external_wp_element_["useEffect"])(() => {
       
 21731     const {
       
 21732       getSelectionStart,
       
 21733       getSelectionEnd,
       
 21734       getSelectedBlocksInitialCaretPosition,
       
 21735       isLastBlockChangePersistent,
       
 21736       __unstableIsLastBlockChangeIgnored
       
 21737     } = registry.select(store);
       
 21738     let blocks = getBlocks(clientId);
       
 21739     let isPersistent = isLastBlockChangePersistent();
       
 21740     let previousAreBlocksDifferent = false;
       
 21741     subscribed.current = true;
       
 21742     const unsubscribe = registry.subscribe(() => {
 23709       // Sometimes, when changing block lists, lingering subscriptions
 21743       // Sometimes, when changing block lists, lingering subscriptions
 23710       // might trigger before they are cleaned up. If the block for which
 21744       // might trigger before they are cleaned up. If the block for which
 23711       // the subscription runs is no longer in the store, this would clear
 21745       // the subscription runs is no longer in the store, this would clear
 23712       // its parent entity's block list. To avoid this, we bail out if
 21746       // its parent entity's block list. To avoid this, we bail out if
 23713       // the subscription is triggering for a block (`clientId !== null`)
 21747       // the subscription is triggering for a block (`clientId !== null`)
 23714       // and its block name can't be found because it's not on the list.
 21748       // and its block name can't be found because it's not on the list.
 23715       // (`getBlockName( clientId ) === null`).
 21749       // (`getBlockName( clientId ) === null`).
 23716       if (clientId !== null && getBlockName(clientId) === null) return;
 21750       if (clientId !== null && getBlockName(clientId) === null) return;
 23717       var newIsPersistent = isLastBlockChangePersistent();
 21751       const newIsPersistent = isLastBlockChangePersistent();
 23718       var newBlocks = getBlocks(clientId);
 21752       const newBlocks = getBlocks(clientId);
 23719       var areBlocksDifferent = newBlocks !== blocks;
 21753       const areBlocksDifferent = newBlocks !== blocks;
 23720       blocks = newBlocks;
 21754       blocks = newBlocks;
 23721 
 21755 
 23722       if (areBlocksDifferent && (pendingChanges.current.incoming || __unstableIsLastBlockChangeIgnored())) {
 21756       if (areBlocksDifferent && (pendingChanges.current.incoming || __unstableIsLastBlockChangeIgnored())) {
 23723         pendingChanges.current.incoming = null;
 21757         pendingChanges.current.incoming = null;
 23724         isPersistent = newIsPersistent;
 21758         isPersistent = newIsPersistent;
 23726       } // Since we often dispatch an action to mark the previous action as
 21760       } // Since we often dispatch an action to mark the previous action as
 23727       // persistent, we need to make sure that the blocks changed on the
 21761       // persistent, we need to make sure that the blocks changed on the
 23728       // previous action before committing the change.
 21762       // previous action before committing the change.
 23729 
 21763 
 23730 
 21764 
 23731       var didPersistenceChange = previousAreBlocksDifferent && !areBlocksDifferent && newIsPersistent && !isPersistent;
 21765       const didPersistenceChange = previousAreBlocksDifferent && !areBlocksDifferent && newIsPersistent && !isPersistent;
 23732 
 21766 
 23733       if (areBlocksDifferent || didPersistenceChange) {
 21767       if (areBlocksDifferent || didPersistenceChange) {
 23734         isPersistent = newIsPersistent; // We know that onChange/onInput will update controlledBlocks.
 21768         isPersistent = newIsPersistent; // We know that onChange/onInput will update controlledBlocks.
 23735         // We need to be aware that it was caused by an outgoing change
 21769         // We need to be aware that it was caused by an outgoing change
 23736         // so that we do not treat it as an incoming change later on,
 21770         // so that we do not treat it as an incoming change later on,
 23737         // which would cause a block reset.
 21771         // which would cause a block reset.
 23738 
 21772 
 23739         pendingChanges.current.outgoing.push(blocks); // Inform the controlling entity that changes have been made to
 21773         pendingChanges.current.outgoing.push(blocks); // Inform the controlling entity that changes have been made to
 23740         // the block-editor store they should be aware about.
 21774         // the block-editor store they should be aware about.
 23741 
 21775 
 23742         var updateParent = isPersistent ? onChangeRef.current : onInputRef.current;
 21776         const updateParent = isPersistent ? onChangeRef.current : onInputRef.current;
 23743         updateParent(blocks, {
 21777         updateParent(blocks, {
 23744           selectionStart: getSelectionStart(),
 21778           selection: {
 23745           selectionEnd: getSelectionEnd()
 21779             selectionStart: getSelectionStart(),
       
 21780             selectionEnd: getSelectionEnd(),
       
 21781             initialPosition: getSelectedBlocksInitialCaretPosition()
       
 21782           }
 23746         });
 21783         });
 23747       }
 21784       }
 23748 
 21785 
 23749       previousAreBlocksDifferent = areBlocksDifferent;
 21786       previousAreBlocksDifferent = areBlocksDifferent;
 23750     });
 21787     });
 23751     return function () {
 21788     return () => unsubscribe();
 23752       return unsubscribe();
 21789   }, [registry, clientId]);
 23753     };
       
 23754   }, [registry, clientId]); // Determine if blocks need to be reset when they change.
       
 23755 
       
 23756   Object(external_this_wp_element_["useEffect"])(function () {
       
 23757     if (pendingChanges.current.outgoing.includes(controlledBlocks)) {
       
 23758       // Skip block reset if the value matches expected outbound sync
       
 23759       // triggered by this component by a preceding change detection.
       
 23760       // Only skip if the value matches expectation, since a reset should
       
 23761       // still occur if the value is modified (not equal by reference),
       
 23762       // to allow that the consumer may apply modifications to reflect
       
 23763       // back on the editor.
       
 23764       if (Object(external_this_lodash_["last"])(pendingChanges.current.outgoing) === controlledBlocks) {
       
 23765         pendingChanges.current.outgoing = [];
       
 23766       }
       
 23767     } else if (getBlocks(clientId) !== controlledBlocks) {
       
 23768       // Reset changing value in all other cases than the sync described
       
 23769       // above. Since this can be reached in an update following an out-
       
 23770       // bound sync, unset the outbound value to avoid considering it in
       
 23771       // subsequent renders.
       
 23772       pendingChanges.current.outgoing = [];
       
 23773       pendingChanges.current.incoming = controlledBlocks;
       
 23774       setControlledBlocks();
       
 23775 
       
 23776       if (controlledSelectionStart && controlledSelectionEnd) {
       
 23777         resetSelection(controlledSelectionStart, controlledSelectionEnd);
       
 23778       }
       
 23779     }
       
 23780   }, [controlledBlocks, clientId]);
       
 23781 }
 21790 }
 23782 
 21791 
 23783 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/provider/index.js
 21792 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/provider/index.js
       
 21793 
       
 21794 
 23784 /**
 21795 /**
 23785  * WordPress dependencies
 21796  * WordPress dependencies
 23786  */
 21797  */
 23787 
 21798 
 23788 
 21799 
 23790  * Internal dependencies
 21801  * Internal dependencies
 23791  */
 21802  */
 23792 
 21803 
 23793 
 21804 
 23794 
 21805 
       
 21806 
       
 21807 
 23795 /** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */
 21808 /** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */
 23796 
 21809 
 23797 function BlockEditorProvider(props) {
 21810 function BlockEditorProvider(props) {
 23798   var children = props.children,
 21811   const {
 23799       settings = props.settings;
 21812     children,
 23800 
 21813     settings
 23801   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 21814   } = props;
 23802       updateSettings = _useDispatch.updateSettings;
 21815   const {
 23803 
 21816     updateSettings
 23804   Object(external_this_wp_element_["useEffect"])(function () {
 21817   } = Object(external_wp_data_["useDispatch"])(store);
       
 21818   Object(external_wp_element_["useEffect"])(() => {
 23805     updateSettings(settings);
 21819     updateSettings(settings);
 23806   }, [settings]); // Syncs the entity provider with changes in the block-editor store.
 21820   }, [settings]); // Syncs the entity provider with changes in the block-editor store.
 23807 
 21821 
 23808   useBlockSync(props);
 21822   useBlockSync(props);
 23809   return children;
 21823   return Object(external_wp_element_["createElement"])(BlockRefsProvider, null, children);
 23810 }
 21824 }
 23811 
 21825 
 23812 /* harmony default export */ var provider = (with_registry_provider(BlockEditorProvider));
 21826 /* harmony default export */ var provider = (with_registry_provider(BlockEditorProvider));
 23813 
 21827 
 23814 // EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
 21828 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-preview/live.js
 23815 var external_this_wp_htmlEntities_ = __webpack_require__(75);
 21829 
       
 21830 
       
 21831 /**
       
 21832  * WordPress dependencies
       
 21833  */
       
 21834 
       
 21835 /**
       
 21836  * Internal dependencies
       
 21837  */
       
 21838 
       
 21839 
       
 21840 function LiveBlockPreview({
       
 21841   onClick
       
 21842 }) {
       
 21843   return Object(external_wp_element_["createElement"])("div", {
       
 21844     tabIndex: 0,
       
 21845     role: "button",
       
 21846     onClick: onClick,
       
 21847     onKeyPress: onClick
       
 21848   }, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(BlockList, null)));
       
 21849 }
       
 21850 
       
 21851 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-preview/auto.js
       
 21852 
       
 21853 
       
 21854 /**
       
 21855  * WordPress dependencies
       
 21856  */
       
 21857 
       
 21858 
       
 21859 /**
       
 21860  * Internal dependencies
       
 21861  */
       
 21862 
       
 21863  // This is used to avoid rendering the block list if the sizes change.
       
 21864 
       
 21865 let MemoizedBlockList;
       
 21866 
       
 21867 function AutoBlockPreview({
       
 21868   viewportWidth,
       
 21869   __experimentalPadding
       
 21870 }) {
       
 21871   const [containerResizeListener, {
       
 21872     width: containerWidth
       
 21873   }] = Object(external_wp_compose_["useResizeObserver"])();
       
 21874   const [containtResizeListener, {
       
 21875     height: contentHeight
       
 21876   }] = Object(external_wp_compose_["useResizeObserver"])(); // Initialize on render instead of module top level, to avoid circular dependency issues.
       
 21877 
       
 21878   MemoizedBlockList = MemoizedBlockList || Object(external_wp_compose_["pure"])(BlockList);
       
 21879   const scale = (containerWidth - 2 * __experimentalPadding) / viewportWidth;
       
 21880   return Object(external_wp_element_["createElement"])("div", {
       
 21881     className: "block-editor-block-preview__container editor-styles-wrapper",
       
 21882     "aria-hidden": true,
       
 21883     style: {
       
 21884       height: contentHeight * scale + 2 * __experimentalPadding
       
 21885     }
       
 21886   }, containerResizeListener, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], {
       
 21887     style: {
       
 21888       transform: `scale(${scale})`,
       
 21889       width: viewportWidth,
       
 21890       left: __experimentalPadding,
       
 21891       right: __experimentalPadding,
       
 21892       top: __experimentalPadding
       
 21893     },
       
 21894     className: "block-editor-block-preview__content"
       
 21895   }, containtResizeListener, Object(external_wp_element_["createElement"])(MemoizedBlockList, null)));
       
 21896 }
       
 21897 
       
 21898 /* harmony default export */ var auto = (AutoBlockPreview);
       
 21899 
       
 21900 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-preview/index.js
       
 21901 
       
 21902 
       
 21903 /**
       
 21904  * External dependencies
       
 21905  */
       
 21906 
       
 21907 /**
       
 21908  * WordPress dependencies
       
 21909  */
       
 21910 
       
 21911 
       
 21912 
       
 21913 /**
       
 21914  * Internal dependencies
       
 21915  */
       
 21916 
       
 21917 
       
 21918 
       
 21919 
       
 21920 
       
 21921 function BlockPreview({
       
 21922   blocks,
       
 21923   __experimentalPadding = 0,
       
 21924   viewportWidth = 1200,
       
 21925   __experimentalLive = false,
       
 21926   __experimentalOnClick
       
 21927 }) {
       
 21928   const originalSettings = Object(external_wp_data_["useSelect"])(select => select(store).getSettings(), []);
       
 21929   const settings = Object(external_wp_element_["useMemo"])(() => {
       
 21930     const _settings = { ...originalSettings
       
 21931     };
       
 21932     _settings.__experimentalBlockPatterns = [];
       
 21933     return _settings;
       
 21934   }, [originalSettings]);
       
 21935   const renderedBlocks = Object(external_wp_element_["useMemo"])(() => Object(external_lodash_["castArray"])(blocks), [blocks]);
       
 21936 
       
 21937   if (!blocks || blocks.length === 0) {
       
 21938     return null;
       
 21939   }
       
 21940 
       
 21941   return Object(external_wp_element_["createElement"])(provider, {
       
 21942     value: renderedBlocks,
       
 21943     settings: settings
       
 21944   }, __experimentalLive ? Object(external_wp_element_["createElement"])(LiveBlockPreview, {
       
 21945     onClick: __experimentalOnClick
       
 21946   }) : Object(external_wp_element_["createElement"])(auto, {
       
 21947     viewportWidth: viewportWidth,
       
 21948     __experimentalPadding: __experimentalPadding
       
 21949   }));
       
 21950 }
       
 21951 /**
       
 21952  * BlockPreview renders a preview of a block or array of blocks.
       
 21953  *
       
 21954  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-preview/README.md
       
 21955  *
       
 21956  * @param {Object} preview options for how the preview should be shown
       
 21957  * @param {Array|Object} preview.blocks A block instance (object) or an array of blocks to be previewed.
       
 21958  * @param {number} preview.viewportWidth Width of the preview container in pixels. Controls at what size the blocks will be rendered inside the preview. Default: 700.
       
 21959  *
       
 21960  * @return {WPComponent} The component to be rendered.
       
 21961  */
       
 21962 
       
 21963 /* harmony default export */ var block_preview = (Object(external_wp_element_["memo"])(BlockPreview));
       
 21964 
       
 21965 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/preview-panel.js
       
 21966 
       
 21967 
       
 21968 /**
       
 21969  * WordPress dependencies
       
 21970  */
       
 21971 
       
 21972 
       
 21973 /**
       
 21974  * Internal dependencies
       
 21975  */
       
 21976 
       
 21977 
       
 21978 
       
 21979 
       
 21980 function InserterPreviewPanel({
       
 21981   item
       
 21982 }) {
       
 21983   var _hoveredItemBlockType, _hoveredItemBlockType2;
       
 21984 
       
 21985   const {
       
 21986     name,
       
 21987     title,
       
 21988     icon,
       
 21989     description,
       
 21990     initialAttributes
       
 21991   } = item;
       
 21992   const hoveredItemBlockType = Object(external_wp_blocks_["getBlockType"])(name);
       
 21993   const isReusable = Object(external_wp_blocks_["isReusableBlock"])(item);
       
 21994   return Object(external_wp_element_["createElement"])("div", {
       
 21995     className: "block-editor-inserter__preview-container"
       
 21996   }, Object(external_wp_element_["createElement"])("div", {
       
 21997     className: "block-editor-inserter__preview"
       
 21998   }, isReusable || hoveredItemBlockType.example ? Object(external_wp_element_["createElement"])("div", {
       
 21999     className: "block-editor-inserter__preview-content"
       
 22000   }, Object(external_wp_element_["createElement"])(block_preview, {
       
 22001     __experimentalPadding: 16,
       
 22002     viewportWidth: (_hoveredItemBlockType = (_hoveredItemBlockType2 = hoveredItemBlockType.example) === null || _hoveredItemBlockType2 === void 0 ? void 0 : _hoveredItemBlockType2.viewportWidth) !== null && _hoveredItemBlockType !== void 0 ? _hoveredItemBlockType : 500,
       
 22003     blocks: hoveredItemBlockType.example ? Object(external_wp_blocks_["getBlockFromExample"])(item.name, {
       
 22004       attributes: { ...hoveredItemBlockType.example.attributes,
       
 22005         ...initialAttributes
       
 22006       },
       
 22007       innerBlocks: hoveredItemBlockType.example.innerBlocks
       
 22008     }) : Object(external_wp_blocks_["createBlock"])(name, initialAttributes)
       
 22009   })) : Object(external_wp_element_["createElement"])("div", {
       
 22010     className: "block-editor-inserter__preview-content-missing"
       
 22011   }, Object(external_wp_i18n_["__"])('No Preview Available.'))), !isReusable && Object(external_wp_element_["createElement"])(block_card, {
       
 22012     title: title,
       
 22013     icon: icon,
       
 22014     description: description
       
 22015   }));
       
 22016 }
       
 22017 
       
 22018 /* harmony default export */ var preview_panel = (InserterPreviewPanel);
       
 22019 
       
 22020 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-listbox/context.js
       
 22021 /**
       
 22022  * WordPress dependencies
       
 22023  */
       
 22024 
       
 22025 const InserterListboxContext = Object(external_wp_element_["createContext"])();
       
 22026 /* harmony default export */ var inserter_listbox_context = (InserterListboxContext);
       
 22027 
       
 22028 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-listbox/item.js
       
 22029 
       
 22030 
       
 22031 
       
 22032 /**
       
 22033  * WordPress dependencies
       
 22034  */
       
 22035 
       
 22036 
       
 22037 /**
       
 22038  * Internal dependencies
       
 22039  */
       
 22040 
       
 22041 
       
 22042 
       
 22043 function InserterListboxItem({
       
 22044   isFirst,
       
 22045   as: Component,
       
 22046   children,
       
 22047   ...props
       
 22048 }, ref) {
       
 22049   const state = Object(external_wp_element_["useContext"])(inserter_listbox_context);
       
 22050   return Object(external_wp_element_["createElement"])(external_wp_components_["__unstableCompositeItem"], Object(esm_extends["a" /* default */])({
       
 22051     ref: ref,
       
 22052     state: state,
       
 22053     role: "option" // Use the CompositeItem `focusable` prop over Button's
       
 22054     // isFocusable. The latter was shown to cause an issue
       
 22055     // with tab order in the inserter list.
       
 22056     ,
       
 22057     focusable: true
       
 22058   }, props), htmlProps => {
       
 22059     const propsWithTabIndex = { ...htmlProps,
       
 22060       tabIndex: isFirst ? 0 : htmlProps.tabIndex
       
 22061     };
       
 22062 
       
 22063     if (Component) {
       
 22064       return Object(external_wp_element_["createElement"])(Component, propsWithTabIndex, children);
       
 22065     }
       
 22066 
       
 22067     if (typeof children === 'function') {
       
 22068       return children(propsWithTabIndex);
       
 22069     }
       
 22070 
       
 22071     return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], propsWithTabIndex, children);
       
 22072   });
       
 22073 }
       
 22074 
       
 22075 /* harmony default export */ var inserter_listbox_item = (Object(external_wp_element_["forwardRef"])(InserterListboxItem));
       
 22076 
       
 22077 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drag-handle.js
       
 22078 
       
 22079 
       
 22080 /**
       
 22081  * WordPress dependencies
       
 22082  */
       
 22083 
       
 22084 const dragHandle = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 22085   width: "18",
       
 22086   height: "18",
       
 22087   xmlns: "http://www.w3.org/2000/svg",
       
 22088   viewBox: "0 0 18 18"
       
 22089 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 22090   d: "M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"
       
 22091 }));
       
 22092 /* harmony default export */ var drag_handle = (dragHandle);
       
 22093 
       
 22094 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-draggable/draggable-chip.js
       
 22095 
       
 22096 
       
 22097 /**
       
 22098  * WordPress dependencies
       
 22099  */
       
 22100 
       
 22101 
       
 22102 
       
 22103 /**
       
 22104  * Internal dependencies
       
 22105  */
       
 22106 
       
 22107 
       
 22108 function BlockDraggableChip({
       
 22109   count,
       
 22110   icon
       
 22111 }) {
       
 22112   return Object(external_wp_element_["createElement"])("div", {
       
 22113     className: "block-editor-block-draggable-chip-wrapper"
       
 22114   }, Object(external_wp_element_["createElement"])("div", {
       
 22115     className: "block-editor-block-draggable-chip"
       
 22116   }, Object(external_wp_element_["createElement"])(external_wp_components_["Flex"], {
       
 22117     justify: "center",
       
 22118     className: "block-editor-block-draggable-chip__content"
       
 22119   }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, icon ? Object(external_wp_element_["createElement"])(BlockIcon, {
       
 22120     icon: icon
       
 22121   }) : Object(external_wp_i18n_["sprintf"])(
       
 22122   /* translators: %d: Number of blocks. */
       
 22123   Object(external_wp_i18n_["_n"])('%d block', '%d blocks', count), count)), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(BlockIcon, {
       
 22124     icon: drag_handle
       
 22125   })))));
       
 22126 }
       
 22127 
       
 22128 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-draggable-blocks/index.js
       
 22129 
       
 22130 
       
 22131 /**
       
 22132  * WordPress dependencies
       
 22133  */
       
 22134 
       
 22135 /**
       
 22136  * Internal dependencies
       
 22137  */
       
 22138 
       
 22139 
       
 22140 
       
 22141 const InserterDraggableBlocks = ({
       
 22142   isEnabled,
       
 22143   blocks,
       
 22144   icon,
       
 22145   children
       
 22146 }) => {
       
 22147   const transferData = {
       
 22148     type: 'inserter',
       
 22149     blocks
       
 22150   };
       
 22151   return Object(external_wp_element_["createElement"])(external_wp_components_["Draggable"], {
       
 22152     __experimentalTransferDataType: "wp-blocks",
       
 22153     transferData: transferData,
       
 22154     __experimentalDragComponent: Object(external_wp_element_["createElement"])(BlockDraggableChip, {
       
 22155       count: blocks.length,
       
 22156       icon: icon
       
 22157     })
       
 22158   }, ({
       
 22159     onDraggableStart,
       
 22160     onDraggableEnd
       
 22161   }) => {
       
 22162     return children({
       
 22163       draggable: isEnabled,
       
 22164       onDragStart: isEnabled ? onDraggableStart : undefined,
       
 22165       onDragEnd: isEnabled ? onDraggableEnd : undefined
       
 22166     });
       
 22167   });
       
 22168 };
       
 22169 
       
 22170 /* harmony default export */ var inserter_draggable_blocks = (InserterDraggableBlocks);
       
 22171 
       
 22172 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-list-item/index.js
       
 22173 
       
 22174 
       
 22175 
       
 22176 /**
       
 22177  * External dependencies
       
 22178  */
       
 22179 
       
 22180 /**
       
 22181  * WordPress dependencies
       
 22182  */
       
 22183 
       
 22184 
       
 22185 
       
 22186 
       
 22187 /**
       
 22188  * Internal dependencies
       
 22189  */
       
 22190 
       
 22191 
       
 22192 
       
 22193 
       
 22194 /**
       
 22195  * Return true if platform is MacOS.
       
 22196  *
       
 22197  * @param {Object} _window   window object by default; used for DI testing.
       
 22198  *
       
 22199  * @return {boolean} True if MacOS; false otherwise.
       
 22200  */
       
 22201 
       
 22202 function isAppleOS(_window = window) {
       
 22203   const {
       
 22204     platform
       
 22205   } = _window.navigator;
       
 22206   return platform.indexOf('Mac') !== -1 || ['iPad', 'iPhone'].includes(platform);
       
 22207 }
       
 22208 
       
 22209 function InserterListItem({
       
 22210   className,
       
 22211   isFirst,
       
 22212   item,
       
 22213   onSelect,
       
 22214   onHover,
       
 22215   isDraggable,
       
 22216   ...props
       
 22217 }) {
       
 22218   const isDragging = Object(external_wp_element_["useRef"])(false);
       
 22219   const itemIconStyle = item.icon ? {
       
 22220     backgroundColor: item.icon.background,
       
 22221     color: item.icon.foreground
       
 22222   } : {};
       
 22223   const blocks = Object(external_wp_element_["useMemo"])(() => {
       
 22224     return [Object(external_wp_blocks_["createBlock"])(item.name, item.initialAttributes, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(item.innerBlocks))];
       
 22225   }, [item.name, item.initialAttributes, item.initialAttributes]);
       
 22226   return Object(external_wp_element_["createElement"])(inserter_draggable_blocks, {
       
 22227     isEnabled: isDraggable && !item.disabled,
       
 22228     blocks: blocks,
       
 22229     icon: item.icon
       
 22230   }, ({
       
 22231     draggable,
       
 22232     onDragStart,
       
 22233     onDragEnd
       
 22234   }) => Object(external_wp_element_["createElement"])("div", {
       
 22235     className: "block-editor-block-types-list__list-item",
       
 22236     draggable: draggable,
       
 22237     onDragStart: event => {
       
 22238       isDragging.current = true;
       
 22239 
       
 22240       if (onDragStart) {
       
 22241         onHover(null);
       
 22242         onDragStart(event);
       
 22243       }
       
 22244     },
       
 22245     onDragEnd: event => {
       
 22246       isDragging.current = false;
       
 22247 
       
 22248       if (onDragEnd) {
       
 22249         onDragEnd(event);
       
 22250       }
       
 22251     }
       
 22252   }, Object(external_wp_element_["createElement"])(inserter_listbox_item, Object(esm_extends["a" /* default */])({
       
 22253     isFirst: isFirst,
       
 22254     className: classnames_default()('block-editor-block-types-list__item', className),
       
 22255     disabled: item.isDisabled,
       
 22256     onClick: event => {
       
 22257       event.preventDefault();
       
 22258       onSelect(item, isAppleOS() ? event.metaKey : event.ctrlKey);
       
 22259       onHover(null);
       
 22260     },
       
 22261     onKeyDown: event => {
       
 22262       const {
       
 22263         keyCode
       
 22264       } = event;
       
 22265 
       
 22266       if (keyCode === external_wp_keycodes_["ENTER"]) {
       
 22267         event.preventDefault();
       
 22268         onSelect(item, isAppleOS() ? event.metaKey : event.ctrlKey);
       
 22269         onHover(null);
       
 22270       }
       
 22271     },
       
 22272     onFocus: () => {
       
 22273       if (isDragging.current) {
       
 22274         return;
       
 22275       }
       
 22276 
       
 22277       onHover(item);
       
 22278     },
       
 22279     onMouseEnter: () => {
       
 22280       if (isDragging.current) {
       
 22281         return;
       
 22282       }
       
 22283 
       
 22284       onHover(item);
       
 22285     },
       
 22286     onMouseLeave: () => onHover(null),
       
 22287     onBlur: () => onHover(null)
       
 22288   }, props), Object(external_wp_element_["createElement"])("span", {
       
 22289     className: "block-editor-block-types-list__item-icon",
       
 22290     style: itemIconStyle
       
 22291   }, Object(external_wp_element_["createElement"])(BlockIcon, {
       
 22292     icon: item.icon,
       
 22293     showColors: true
       
 22294   })), Object(external_wp_element_["createElement"])("span", {
       
 22295     className: "block-editor-block-types-list__item-title"
       
 22296   }, item.title))));
       
 22297 }
       
 22298 
       
 22299 /* harmony default export */ var inserter_list_item = (Object(external_wp_element_["memo"])(InserterListItem));
       
 22300 
       
 22301 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-listbox/group.js
       
 22302 
       
 22303 
       
 22304 
       
 22305 /**
       
 22306  * WordPress dependencies
       
 22307  */
       
 22308 
       
 22309 
       
 22310 
       
 22311 
       
 22312 function InserterListboxGroup(props, ref) {
       
 22313   const [shouldSpeak, setShouldSpeak] = Object(external_wp_element_["useState"])(false);
       
 22314   Object(external_wp_element_["useEffect"])(() => {
       
 22315     if (shouldSpeak) {
       
 22316       Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('Use left and right arrow keys to move through blocks'));
       
 22317     }
       
 22318   }, [shouldSpeak]);
       
 22319   return Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
       
 22320     ref: ref,
       
 22321     role: "listbox",
       
 22322     "aria-orientation": "horizontal",
       
 22323     onFocus: () => {
       
 22324       setShouldSpeak(true);
       
 22325     },
       
 22326     onBlur: event => {
       
 22327       const focusingOutsideGroup = !event.currentTarget.contains(event.relatedTarget);
       
 22328 
       
 22329       if (focusingOutsideGroup) {
       
 22330         setShouldSpeak(false);
       
 22331       }
       
 22332     }
       
 22333   }, props));
       
 22334 }
       
 22335 
       
 22336 /* harmony default export */ var inserter_listbox_group = (Object(external_wp_element_["forwardRef"])(InserterListboxGroup));
       
 22337 
       
 22338 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-listbox/row.js
       
 22339 
       
 22340 
       
 22341 
       
 22342 /**
       
 22343  * WordPress dependencies
       
 22344  */
       
 22345 
       
 22346 
       
 22347 /**
       
 22348  * Internal dependencies
       
 22349  */
       
 22350 
       
 22351 
       
 22352 
       
 22353 function InserterListboxRow(props, ref) {
       
 22354   const state = Object(external_wp_element_["useContext"])(inserter_listbox_context);
       
 22355   return Object(external_wp_element_["createElement"])(external_wp_components_["__unstableCompositeGroup"], Object(esm_extends["a" /* default */])({
       
 22356     state: state,
       
 22357     role: "presentation",
       
 22358     ref: ref
       
 22359   }, props));
       
 22360 }
       
 22361 
       
 22362 /* harmony default export */ var inserter_listbox_row = (Object(external_wp_element_["forwardRef"])(InserterListboxRow));
       
 22363 
       
 22364 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-types-list/index.js
       
 22365 
       
 22366 
       
 22367 /**
       
 22368  * WordPress dependencies
       
 22369  */
       
 22370 
       
 22371 /**
       
 22372  * Internal dependencies
       
 22373  */
       
 22374 
       
 22375 
       
 22376 
       
 22377 
       
 22378 function chunk(array, size) {
       
 22379   const chunks = [];
       
 22380 
       
 22381   for (let i = 0, j = array.length; i < j; i += size) {
       
 22382     chunks.push(array.slice(i, i + size));
       
 22383   }
       
 22384 
       
 22385   return chunks;
       
 22386 }
       
 22387 
       
 22388 function BlockTypesList({
       
 22389   items = [],
       
 22390   onSelect,
       
 22391   onHover = () => {},
       
 22392   children,
       
 22393   label,
       
 22394   isDraggable = true
       
 22395 }) {
       
 22396   return Object(external_wp_element_["createElement"])(inserter_listbox_group, {
       
 22397     className: "block-editor-block-types-list",
       
 22398     "aria-label": label
       
 22399   }, chunk(items, 3).map((row, i) => Object(external_wp_element_["createElement"])(inserter_listbox_row, {
       
 22400     key: i
       
 22401   }, row.map((item, j) => Object(external_wp_element_["createElement"])(inserter_list_item, {
       
 22402     key: item.id,
       
 22403     item: item,
       
 22404     className: Object(external_wp_blocks_["getBlockMenuDefaultClassName"])(item.id),
       
 22405     onSelect: onSelect,
       
 22406     onHover: onHover,
       
 22407     isDraggable: isDraggable,
       
 22408     isFirst: i === 0 && j === 0
       
 22409   })))), children);
       
 22410 }
       
 22411 
       
 22412 /* harmony default export */ var block_types_list = (BlockTypesList);
       
 22413 
       
 22414 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/panel.js
       
 22415 
       
 22416 
       
 22417 /**
       
 22418  * WordPress dependencies
       
 22419  */
       
 22420 
       
 22421 
       
 22422 function InserterPanel({
       
 22423   title,
       
 22424   icon,
       
 22425   children
       
 22426 }) {
       
 22427   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
       
 22428     className: "block-editor-inserter__panel-header"
       
 22429   }, Object(external_wp_element_["createElement"])("h2", {
       
 22430     className: "block-editor-inserter__panel-title"
       
 22431   }, title), Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
       
 22432     icon: icon
       
 22433   })), Object(external_wp_element_["createElement"])("div", {
       
 22434     className: "block-editor-inserter__panel-content"
       
 22435   }, children));
       
 22436 }
       
 22437 
       
 22438 /* harmony default export */ var panel = (InserterPanel);
       
 22439 
       
 22440 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-listbox/index.js
       
 22441 
       
 22442 
       
 22443 /**
       
 22444  * WordPress dependencies
       
 22445  */
       
 22446 
       
 22447 /**
       
 22448  * Internal dependencies
       
 22449  */
       
 22450 
       
 22451 
       
 22452 
       
 22453 
       
 22454 
       
 22455 
       
 22456 function InserterListbox({
       
 22457   children
       
 22458 }) {
       
 22459   const compositeState = Object(external_wp_components_["__unstableUseCompositeState"])({
       
 22460     shift: true,
       
 22461     wrap: 'horizontal'
       
 22462   });
       
 22463   return Object(external_wp_element_["createElement"])(inserter_listbox_context.Provider, {
       
 22464     value: compositeState
       
 22465   }, children);
       
 22466 }
       
 22467 
       
 22468 /* harmony default export */ var inserter_listbox = (InserterListbox);
       
 22469 
       
 22470 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/block-types-tab.js
       
 22471 
       
 22472 
       
 22473 /**
       
 22474  * External dependencies
       
 22475  */
       
 22476 
       
 22477 /**
       
 22478  * WordPress dependencies
       
 22479  */
       
 22480 
       
 22481 
       
 22482 
       
 22483 /**
       
 22484  * Internal dependencies
       
 22485  */
       
 22486 
       
 22487 
       
 22488 
       
 22489 
       
 22490 
       
 22491 
       
 22492 const getBlockNamespace = item => item.name.split('/')[0];
       
 22493 
       
 22494 const MAX_SUGGESTED_ITEMS = 6;
       
 22495 function BlockTypesTab({
       
 22496   rootClientId,
       
 22497   onInsert,
       
 22498   onHover,
       
 22499   showMostUsedBlocks
       
 22500 }) {
       
 22501   const [items, categories, collections, onSelectItem] = use_block_types_state(rootClientId, onInsert);
       
 22502   const suggestedItems = Object(external_wp_element_["useMemo"])(() => {
       
 22503     return Object(external_lodash_["orderBy"])(items, ['frecency'], ['desc']).slice(0, MAX_SUGGESTED_ITEMS);
       
 22504   }, [items]);
       
 22505   const uncategorizedItems = Object(external_wp_element_["useMemo"])(() => {
       
 22506     return items.filter(item => !item.category);
       
 22507   }, [items]);
       
 22508   const itemsPerCategory = Object(external_wp_element_["useMemo"])(() => {
       
 22509     return Object(external_lodash_["flow"])(itemList => itemList.filter(item => item.category && item.category !== 'reusable'), itemList => Object(external_lodash_["groupBy"])(itemList, 'category'))(items);
       
 22510   }, [items]);
       
 22511   const itemsPerCollection = Object(external_wp_element_["useMemo"])(() => {
       
 22512     // Create a new Object to avoid mutating collection.
       
 22513     const result = { ...collections
       
 22514     };
       
 22515     Object.keys(collections).forEach(namespace => {
       
 22516       result[namespace] = items.filter(item => getBlockNamespace(item) === namespace);
       
 22517 
       
 22518       if (result[namespace].length === 0) {
       
 22519         delete result[namespace];
       
 22520       }
       
 22521     });
       
 22522     return result;
       
 22523   }, [items, collections]); // Hide block preview on unmount.
       
 22524 
       
 22525   Object(external_wp_element_["useEffect"])(() => () => onHover(null), []);
       
 22526   return Object(external_wp_element_["createElement"])(inserter_listbox, null, Object(external_wp_element_["createElement"])("div", null, showMostUsedBlocks && !!suggestedItems.length && Object(external_wp_element_["createElement"])(panel, {
       
 22527     title: Object(external_wp_i18n_["_x"])('Most used', 'blocks')
       
 22528   }, Object(external_wp_element_["createElement"])(block_types_list, {
       
 22529     items: suggestedItems,
       
 22530     onSelect: onSelectItem,
       
 22531     onHover: onHover,
       
 22532     label: Object(external_wp_i18n_["_x"])('Most used', 'blocks')
       
 22533   })), Object(external_lodash_["map"])(categories, category => {
       
 22534     const categoryItems = itemsPerCategory[category.slug];
       
 22535 
       
 22536     if (!categoryItems || !categoryItems.length) {
       
 22537       return null;
       
 22538     }
       
 22539 
       
 22540     return Object(external_wp_element_["createElement"])(panel, {
       
 22541       key: category.slug,
       
 22542       title: category.title,
       
 22543       icon: category.icon
       
 22544     }, Object(external_wp_element_["createElement"])(block_types_list, {
       
 22545       items: categoryItems,
       
 22546       onSelect: onSelectItem,
       
 22547       onHover: onHover,
       
 22548       label: category.title
       
 22549     }));
       
 22550   }), uncategorizedItems.length > 0 && Object(external_wp_element_["createElement"])(panel, {
       
 22551     className: "block-editor-inserter__uncategorized-blocks-panel",
       
 22552     title: Object(external_wp_i18n_["__"])('Uncategorized')
       
 22553   }, Object(external_wp_element_["createElement"])(block_types_list, {
       
 22554     items: uncategorizedItems,
       
 22555     onSelect: onSelectItem,
       
 22556     onHover: onHover,
       
 22557     label: Object(external_wp_i18n_["__"])('Uncategorized')
       
 22558   })), Object(external_lodash_["map"])(collections, (collection, namespace) => {
       
 22559     const collectionItems = itemsPerCollection[namespace];
       
 22560 
       
 22561     if (!collectionItems || !collectionItems.length) {
       
 22562       return null;
       
 22563     }
       
 22564 
       
 22565     return Object(external_wp_element_["createElement"])(panel, {
       
 22566       key: namespace,
       
 22567       title: collection.title,
       
 22568       icon: collection.icon
       
 22569     }, Object(external_wp_element_["createElement"])(block_types_list, {
       
 22570       items: collectionItems,
       
 22571       onSelect: onSelectItem,
       
 22572       onHover: onHover,
       
 22573       label: collection.title
       
 22574     }));
       
 22575   })));
       
 22576 }
       
 22577 /* harmony default export */ var block_types_tab = (BlockTypesTab);
       
 22578 
       
 22579 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/pattern-panel.js
       
 22580 
       
 22581 
       
 22582 /**
       
 22583  * External dependencies
       
 22584  */
       
 22585 
       
 22586 /**
       
 22587  * WordPress dependencies
       
 22588  */
       
 22589 
       
 22590 
       
 22591 
       
 22592 
       
 22593 function PatternInserterPanel({
       
 22594   selectedCategory,
       
 22595   patternCategories,
       
 22596   onClickCategory,
       
 22597   children
       
 22598 }) {
       
 22599   const categoryOptions = () => {
       
 22600     const options = [];
       
 22601     patternCategories.map(patternCategory => {
       
 22602       return options.push({
       
 22603         value: patternCategory.name,
       
 22604         label: patternCategory.label
       
 22605       });
       
 22606     });
       
 22607     return options;
       
 22608   };
       
 22609 
       
 22610   const onChangeSelect = selected => {
       
 22611     onClickCategory(patternCategories.find(patternCategory => selected === patternCategory.name));
       
 22612   };
       
 22613 
       
 22614   const getPanelHeaderClassName = () => {
       
 22615     return classnames_default()('block-editor-inserter__panel-header', 'block-editor-inserter__panel-header-patterns');
       
 22616   }; // In iOS-based mobile devices, the onBlur will fire when selecting an option
       
 22617   // from a Select element. To prevent closing the useDialog on iOS devices, we
       
 22618   // stop propagating the onBlur event if there is no relatedTarget, which means
       
 22619   // that the user most likely did not click on an element within the editor canvas.
       
 22620 
       
 22621 
       
 22622   const onBlur = event => {
       
 22623     if (!(event !== null && event !== void 0 && event.relatedTarget)) {
       
 22624       event.stopPropagation();
       
 22625     }
       
 22626   };
       
 22627 
       
 22628   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
       
 22629     className: getPanelHeaderClassName()
       
 22630   }, Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
       
 22631     className: "block-editor-inserter__panel-dropdown",
       
 22632     label: Object(external_wp_i18n_["__"])('Filter patterns'),
       
 22633     hideLabelFromVision: true,
       
 22634     value: selectedCategory.name,
       
 22635     onChange: onChangeSelect,
       
 22636     onBlur: onBlur,
       
 22637     options: categoryOptions()
       
 22638   })), Object(external_wp_element_["createElement"])("div", {
       
 22639     className: "block-editor-inserter__panel-content"
       
 22640   }, children));
       
 22641 }
       
 22642 
       
 22643 /* harmony default export */ var pattern_panel = (PatternInserterPanel);
       
 22644 
       
 22645 // EXTERNAL MODULE: external ["wp","notices"]
       
 22646 var external_wp_notices_ = __webpack_require__("onLe");
       
 22647 
       
 22648 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/hooks/use-patterns-state.js
       
 22649 /**
       
 22650  * External dependencies
       
 22651  */
       
 22652 
       
 22653 /**
       
 22654  * WordPress dependencies
       
 22655  */
       
 22656 
       
 22657 
       
 22658 
       
 22659 
       
 22660 
       
 22661 
       
 22662 /**
       
 22663  * Internal dependencies
       
 22664  */
       
 22665 
       
 22666 
       
 22667 /**
       
 22668  * Retrieves the block patterns inserter state.
       
 22669  *
       
 22670  * @param {Function} onInsert     function called when inserter a list of blocks.
       
 22671  * @param {string=}  rootClientId Insertion's root client ID.
       
 22672  *
       
 22673  * @return {Array} Returns the patterns state. (patterns, categories, onSelect handler)
       
 22674  */
       
 22675 
       
 22676 const usePatternsState = (onInsert, rootClientId) => {
       
 22677   const {
       
 22678     patternCategories,
       
 22679     patterns
       
 22680   } = Object(external_wp_data_["useSelect"])(select => {
       
 22681     const {
       
 22682       __experimentalGetAllowedPatterns,
       
 22683       getSettings
       
 22684     } = select(store);
       
 22685     return {
       
 22686       patterns: __experimentalGetAllowedPatterns(rootClientId),
       
 22687       patternCategories: getSettings().__experimentalBlockPatternCategories
       
 22688     };
       
 22689   }, [rootClientId]);
       
 22690   const {
       
 22691     createSuccessNotice
       
 22692   } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
       
 22693   const onClickPattern = Object(external_wp_element_["useCallback"])((pattern, blocks) => {
       
 22694     onInsert(Object(external_lodash_["map"])(blocks, block => Object(external_wp_blocks_["cloneBlock"])(block)), pattern.name);
       
 22695     createSuccessNotice(Object(external_wp_i18n_["sprintf"])(
       
 22696     /* translators: %s: block pattern title. */
       
 22697     Object(external_wp_i18n_["__"])('Block pattern "%s" inserted.'), pattern.title), {
       
 22698       type: 'snackbar'
       
 22699     });
       
 22700   }, []);
       
 22701   return [patterns, patternCategories, onClickPattern];
       
 22702 };
       
 22703 
       
 22704 /* harmony default export */ var use_patterns_state = (usePatternsState);
       
 22705 
       
 22706 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-patterns-list/index.js
       
 22707 
       
 22708 
       
 22709 
       
 22710 /**
       
 22711  * WordPress dependencies
       
 22712  */
       
 22713 
       
 22714 
       
 22715 
       
 22716 
       
 22717 /**
       
 22718  * Internal dependencies
       
 22719  */
       
 22720 
       
 22721 
       
 22722 
       
 22723 
       
 22724 
       
 22725 function BlockPattern({
       
 22726   isDraggable,
       
 22727   pattern,
       
 22728   onClick,
       
 22729   composite
       
 22730 }) {
       
 22731   const {
       
 22732     name,
       
 22733     viewportWidth
       
 22734   } = pattern;
       
 22735   const {
       
 22736     blocks
       
 22737   } = Object(external_wp_data_["useSelect"])(select => select(store).__experimentalGetParsedPattern(name), [name]);
       
 22738   const instanceId = Object(external_wp_compose_["useInstanceId"])(BlockPattern);
       
 22739   const descriptionId = `block-editor-block-patterns-list__item-description-${instanceId}`;
       
 22740   return Object(external_wp_element_["createElement"])(inserter_draggable_blocks, {
       
 22741     isEnabled: isDraggable,
       
 22742     blocks: blocks
       
 22743   }, ({
       
 22744     draggable,
       
 22745     onDragStart,
       
 22746     onDragEnd
       
 22747   }) => Object(external_wp_element_["createElement"])("div", {
       
 22748     className: "block-editor-block-patterns-list__list-item",
       
 22749     "aria-label": pattern.title,
       
 22750     "aria-describedby": pattern.description ? descriptionId : undefined,
       
 22751     draggable: draggable,
       
 22752     onDragStart: onDragStart,
       
 22753     onDragEnd: onDragEnd
       
 22754   }, Object(external_wp_element_["createElement"])(external_wp_components_["__unstableCompositeItem"], Object(esm_extends["a" /* default */])({
       
 22755     role: "option",
       
 22756     as: "div"
       
 22757   }, composite, {
       
 22758     className: "block-editor-block-patterns-list__item",
       
 22759     onClick: () => onClick(pattern, blocks)
       
 22760   }), Object(external_wp_element_["createElement"])(block_preview, {
       
 22761     blocks: blocks,
       
 22762     viewportWidth: viewportWidth
       
 22763   }), Object(external_wp_element_["createElement"])("div", {
       
 22764     className: "block-editor-block-patterns-list__item-title"
       
 22765   }, pattern.title), !!pattern.description && Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
       
 22766     id: descriptionId
       
 22767   }, pattern.description))));
       
 22768 }
       
 22769 
       
 22770 function BlockPatternPlaceholder() {
       
 22771   return Object(external_wp_element_["createElement"])("div", {
       
 22772     className: "block-editor-block-patterns-list__item is-placeholder"
       
 22773   });
       
 22774 }
       
 22775 
       
 22776 function BlockPatternList({
       
 22777   isDraggable,
       
 22778   blockPatterns,
       
 22779   shownPatterns,
       
 22780   onClickPattern,
       
 22781   orientation,
       
 22782   label = Object(external_wp_i18n_["__"])('Block Patterns')
       
 22783 }) {
       
 22784   const composite = Object(external_wp_components_["__unstableUseCompositeState"])({
       
 22785     orientation
       
 22786   });
       
 22787   return Object(external_wp_element_["createElement"])(external_wp_components_["__unstableComposite"], Object(esm_extends["a" /* default */])({}, composite, {
       
 22788     role: "listbox",
       
 22789     className: "block-editor-block-patterns-list",
       
 22790     "aria-label": label
       
 22791   }), blockPatterns.map(pattern => {
       
 22792     const isShown = shownPatterns.includes(pattern);
       
 22793     return isShown ? Object(external_wp_element_["createElement"])(BlockPattern, {
       
 22794       key: pattern.name,
       
 22795       pattern: pattern,
       
 22796       onClick: onClickPattern,
       
 22797       isDraggable: isDraggable,
       
 22798       composite: composite
       
 22799     }) : Object(external_wp_element_["createElement"])(BlockPatternPlaceholder, {
       
 22800       key: pattern.name
       
 22801     });
       
 22802   }));
       
 22803 }
       
 22804 
       
 22805 /* harmony default export */ var block_patterns_list = (BlockPatternList);
       
 22806 
       
 22807 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/block-patterns-tab.js
       
 22808 
       
 22809 
       
 22810 /**
       
 22811  * External dependencies
       
 22812  */
       
 22813 
       
 22814 /**
       
 22815  * WordPress dependencies
       
 22816  */
       
 22817 
       
 22818 
       
 22819 
       
 22820 
       
 22821 /**
       
 22822  * Internal dependencies
       
 22823  */
       
 22824 
       
 22825 
       
 22826 
       
 22827 
       
 22828 
       
 22829 function BlockPatternsCategory({
       
 22830   rootClientId,
       
 22831   onInsert,
       
 22832   selectedCategory,
       
 22833   onClickCategory
       
 22834 }) {
       
 22835   const [allPatterns, allCategories, onClick] = use_patterns_state(onInsert, rootClientId); // Remove any empty categories
       
 22836 
       
 22837   const populatedCategories = Object(external_wp_element_["useMemo"])(() => allCategories.filter(category => allPatterns.some(pattern => {
       
 22838     var _pattern$categories;
       
 22839 
       
 22840     return (_pattern$categories = pattern.categories) === null || _pattern$categories === void 0 ? void 0 : _pattern$categories.includes(category.name);
       
 22841   })), [allPatterns, allCategories]);
       
 22842   const patternCategory = selectedCategory ? selectedCategory : populatedCategories[0];
       
 22843   Object(external_wp_element_["useEffect"])(() => {
       
 22844     if (allPatterns.some(pattern => getPatternIndex(pattern) === Infinity) && !populatedCategories.find(category => category.name === 'uncategorized')) {
       
 22845       populatedCategories.push({
       
 22846         name: 'uncategorized',
       
 22847         label: Object(external_wp_i18n_["_x"])('Uncategorized')
       
 22848       });
       
 22849     }
       
 22850   }, [populatedCategories, allPatterns]);
       
 22851   const getPatternIndex = Object(external_wp_element_["useCallback"])(pattern => {
       
 22852     if (!pattern.categories || !pattern.categories.length) {
       
 22853       return Infinity;
       
 22854     }
       
 22855 
       
 22856     const indexedCategories = Object(external_lodash_["fromPairs"])(populatedCategories.map(({
       
 22857       name
       
 22858     }, index) => [name, index]));
       
 22859     return Math.min(...pattern.categories.map(cat => indexedCategories[cat] !== undefined ? indexedCategories[cat] : Infinity));
       
 22860   }, [populatedCategories]);
       
 22861   const currentCategoryPatterns = Object(external_wp_element_["useMemo"])(() => allPatterns.filter(pattern => patternCategory.name === 'uncategorized' ? getPatternIndex(pattern) === Infinity : pattern.categories && pattern.categories.includes(patternCategory.name)), [allPatterns, patternCategory]); // Ordering the patterns is important for the async rendering.
       
 22862 
       
 22863   const orderedPatterns = Object(external_wp_element_["useMemo"])(() => {
       
 22864     return currentCategoryPatterns.sort((a, b) => {
       
 22865       return getPatternIndex(a) - getPatternIndex(b);
       
 22866     });
       
 22867   }, [currentCategoryPatterns, getPatternIndex]);
       
 22868   const currentShownPatterns = Object(external_wp_compose_["useAsyncList"])(orderedPatterns);
       
 22869   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, !!currentCategoryPatterns.length && Object(external_wp_element_["createElement"])(pattern_panel, {
       
 22870     selectedCategory: patternCategory,
       
 22871     patternCategories: populatedCategories,
       
 22872     onClickCategory: onClickCategory
       
 22873   }, Object(external_wp_element_["createElement"])(block_patterns_list, {
       
 22874     shownPatterns: currentShownPatterns,
       
 22875     blockPatterns: currentCategoryPatterns,
       
 22876     onClickPattern: onClick,
       
 22877     label: patternCategory.label,
       
 22878     orientation: "vertical",
       
 22879     isDraggable: true
       
 22880   })));
       
 22881 }
       
 22882 
       
 22883 function BlockPatternsTabs({
       
 22884   rootClientId,
       
 22885   onInsert,
       
 22886   onClickCategory,
       
 22887   selectedCategory
       
 22888 }) {
       
 22889   return Object(external_wp_element_["createElement"])(BlockPatternsCategory, {
       
 22890     rootClientId: rootClientId,
       
 22891     selectedCategory: selectedCategory,
       
 22892     onInsert: onInsert,
       
 22893     onClickCategory: onClickCategory
       
 22894   });
       
 22895 }
       
 22896 
       
 22897 /* harmony default export */ var block_patterns_tab = (BlockPatternsTabs);
       
 22898 
       
 22899 // EXTERNAL MODULE: external ["wp","url"]
       
 22900 var external_wp_url_ = __webpack_require__("Mmq9");
       
 22901 
       
 22902 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/no-results.js
       
 22903 
       
 22904 
       
 22905 /**
       
 22906  * WordPress dependencies
       
 22907  */
       
 22908 
       
 22909 
       
 22910 
       
 22911 function InserterNoResults() {
       
 22912   return Object(external_wp_element_["createElement"])("div", {
       
 22913     className: "block-editor-inserter__no-results"
       
 22914   }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
       
 22915     className: "block-editor-inserter__no-results-icon",
       
 22916     icon: block_default["a" /* default */]
       
 22917   }), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('No results found.')));
       
 22918 }
       
 22919 
       
 22920 /* harmony default export */ var no_results = (InserterNoResults);
       
 22921 
       
 22922 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/reusable-blocks-tab.js
       
 22923 
       
 22924 
       
 22925 /**
       
 22926  * WordPress dependencies
       
 22927  */
       
 22928 
       
 22929 
       
 22930 
       
 22931 /**
       
 22932  * Internal dependencies
       
 22933  */
       
 22934 
       
 22935 
       
 22936 
       
 22937 
       
 22938 
       
 22939 
       
 22940 function ReusableBlocksList({
       
 22941   onHover,
       
 22942   onInsert,
       
 22943   rootClientId
       
 22944 }) {
       
 22945   const [items,,, onSelectItem] = use_block_types_state(rootClientId, onInsert);
       
 22946   const filteredItems = Object(external_wp_element_["useMemo"])(() => {
       
 22947     return items.filter(({
       
 22948       category
       
 22949     }) => category === 'reusable');
       
 22950   }, [items]);
       
 22951 
       
 22952   if (filteredItems.length === 0) {
       
 22953     return Object(external_wp_element_["createElement"])(no_results, null);
       
 22954   }
       
 22955 
       
 22956   return Object(external_wp_element_["createElement"])(panel, {
       
 22957     title: Object(external_wp_i18n_["__"])('Reusable blocks')
       
 22958   }, Object(external_wp_element_["createElement"])(block_types_list, {
       
 22959     items: filteredItems,
       
 22960     onSelect: onSelectItem,
       
 22961     onHover: onHover,
       
 22962     label: Object(external_wp_i18n_["__"])('Reusable blocks')
       
 22963   }));
       
 22964 } // The unwrapped component is only exported for use by unit tests.
       
 22965 
       
 22966 /**
       
 22967  * List of reusable blocks shown in the "Reusable" tab of the inserter.
       
 22968  *
       
 22969  * @param {Object}   props                Component props.
       
 22970  * @param {?string}  props.rootClientId   Client id of block to insert into.
       
 22971  * @param {Function} props.onInsert       Callback to run when item is inserted.
       
 22972  * @param {Function} props.onHover        Callback to run when item is hovered.
       
 22973  *
       
 22974  * @return {WPComponent} The component.
       
 22975  */
       
 22976 
       
 22977 
       
 22978 function ReusableBlocksTab({
       
 22979   rootClientId,
       
 22980   onInsert,
       
 22981   onHover
       
 22982 }) {
       
 22983   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(ReusableBlocksList, {
       
 22984     onHover: onHover,
       
 22985     onInsert: onInsert,
       
 22986     rootClientId: rootClientId
       
 22987   }), Object(external_wp_element_["createElement"])("div", {
       
 22988     className: "block-editor-inserter__manage-reusable-blocks-container"
       
 22989   }, Object(external_wp_element_["createElement"])("a", {
       
 22990     className: "block-editor-inserter__manage-reusable-blocks",
       
 22991     href: Object(external_wp_url_["addQueryArgs"])('edit.php', {
       
 22992       post_type: 'wp_block'
       
 22993     })
       
 22994   }, Object(external_wp_i18n_["__"])('Manage Reusable blocks'))));
       
 22995 }
       
 22996 /* harmony default export */ var reusable_blocks_tab = (ReusableBlocksTab);
       
 22997 
       
 22998 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-menu-extension/index.js
       
 22999 /**
       
 23000  * WordPress dependencies
       
 23001  */
       
 23002 
       
 23003 const {
       
 23004   Fill: __unstableInserterMenuExtension,
       
 23005   Slot: inserter_menu_extension_Slot
       
 23006 } = Object(external_wp_components_["createSlotFill"])('__unstableInserterMenuExtension');
       
 23007 __unstableInserterMenuExtension.Slot = inserter_menu_extension_Slot;
       
 23008 /* harmony default export */ var inserter_menu_extension = (__unstableInserterMenuExtension);
       
 23009 
       
 23010 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/hooks/use-insertion-point.js
       
 23011 /**
       
 23012  * External dependencies
       
 23013  */
       
 23014 
       
 23015 /**
       
 23016  * WordPress dependencies
       
 23017  */
       
 23018 
       
 23019 
       
 23020 
       
 23021 
       
 23022 
       
 23023 
       
 23024 /**
       
 23025  * Internal dependencies
       
 23026  */
       
 23027 
       
 23028 
       
 23029 /**
       
 23030  * @typedef WPInserterConfig
       
 23031  *
       
 23032  * @property {string=}   rootClientId        If set, insertion will be into the
       
 23033  *                                           block with this ID.
       
 23034  * @property {number=}   insertionIndex      If set, insertion will be into this
       
 23035  *                                           explicit position.
       
 23036  * @property {string=}   clientId            If set, insertion will be after the
       
 23037  *                                           block with this ID.
       
 23038  * @property {boolean=}  isAppender          Whether the inserter is an appender
       
 23039  *                                           or not.
       
 23040  * @property {Function=} onSelect            Called after insertion.
       
 23041  */
       
 23042 
       
 23043 /**
       
 23044  * Returns the insertion point state given the inserter config.
       
 23045  *
       
 23046  * @param {WPInserterConfig} config Inserter Config.
       
 23047  * @return {Array} Insertion Point State (rootClientID, onInsertBlocks and onToggle).
       
 23048  */
       
 23049 
       
 23050 function useInsertionPoint({
       
 23051   rootClientId = '',
       
 23052   insertionIndex,
       
 23053   clientId,
       
 23054   isAppender,
       
 23055   onSelect,
       
 23056   shouldFocusBlock = true
       
 23057 }) {
       
 23058   const {
       
 23059     getSelectedBlock
       
 23060   } = Object(external_wp_data_["useSelect"])(store);
       
 23061   const {
       
 23062     destinationRootClientId,
       
 23063     destinationIndex
       
 23064   } = Object(external_wp_data_["useSelect"])(select => {
       
 23065     const {
       
 23066       getSelectedBlockClientId,
       
 23067       getBlockRootClientId,
       
 23068       getBlockIndex,
       
 23069       getBlockOrder
       
 23070     } = select(store);
       
 23071     const selectedBlockClientId = getSelectedBlockClientId();
       
 23072     let _destinationRootClientId = rootClientId;
       
 23073 
       
 23074     let _destinationIndex;
       
 23075 
       
 23076     if (insertionIndex !== undefined) {
       
 23077       // Insert into a specific index.
       
 23078       _destinationIndex = insertionIndex;
       
 23079     } else if (clientId) {
       
 23080       // Insert after a specific client ID.
       
 23081       _destinationIndex = getBlockIndex(clientId, _destinationRootClientId);
       
 23082     } else if (!isAppender && selectedBlockClientId) {
       
 23083       _destinationRootClientId = getBlockRootClientId(selectedBlockClientId);
       
 23084       _destinationIndex = getBlockIndex(selectedBlockClientId, _destinationRootClientId) + 1;
       
 23085     } else {
       
 23086       // Insert at the end of the list.
       
 23087       _destinationIndex = getBlockOrder(_destinationRootClientId).length;
       
 23088     }
       
 23089 
       
 23090     return {
       
 23091       destinationRootClientId: _destinationRootClientId,
       
 23092       destinationIndex: _destinationIndex
       
 23093     };
       
 23094   }, [rootClientId, insertionIndex, clientId, isAppender]);
       
 23095   const {
       
 23096     replaceBlocks,
       
 23097     insertBlocks,
       
 23098     showInsertionPoint,
       
 23099     hideInsertionPoint
       
 23100   } = Object(external_wp_data_["useDispatch"])(store);
       
 23101   const onInsertBlocks = Object(external_wp_element_["useCallback"])((blocks, meta, shouldForceFocusBlock = false) => {
       
 23102     const selectedBlock = getSelectedBlock();
       
 23103 
       
 23104     if (!isAppender && selectedBlock && Object(external_wp_blocks_["isUnmodifiedDefaultBlock"])(selectedBlock)) {
       
 23105       replaceBlocks(selectedBlock.clientId, blocks, null, shouldFocusBlock || shouldForceFocusBlock ? 0 : null, meta);
       
 23106     } else {
       
 23107       insertBlocks(blocks, destinationIndex, destinationRootClientId, true, shouldFocusBlock || shouldForceFocusBlock ? 0 : null, meta);
       
 23108     }
       
 23109 
       
 23110     const message = Object(external_wp_i18n_["sprintf"])( // translators: %d: the name of the block that has been added
       
 23111     Object(external_wp_i18n_["_n"])('%d block added.', '%d blocks added.', Object(external_lodash_["castArray"])(blocks).length), Object(external_lodash_["castArray"])(blocks).length);
       
 23112     Object(external_wp_a11y_["speak"])(message);
       
 23113 
       
 23114     if (onSelect) {
       
 23115       onSelect();
       
 23116     }
       
 23117   }, [isAppender, getSelectedBlock, replaceBlocks, insertBlocks, destinationRootClientId, destinationIndex, onSelect, shouldFocusBlock]);
       
 23118   const onToggleInsertionPoint = Object(external_wp_element_["useCallback"])(show => {
       
 23119     if (show) {
       
 23120       showInsertionPoint(destinationRootClientId, destinationIndex);
       
 23121     } else {
       
 23122       hideInsertionPoint();
       
 23123     }
       
 23124   }, [showInsertionPoint, hideInsertionPoint, destinationRootClientId, destinationIndex]);
       
 23125   return [destinationRootClientId, onInsertBlocks, onToggleInsertionPoint];
       
 23126 }
       
 23127 
       
 23128 /* harmony default export */ var use_insertion_point = (useInsertionPoint);
       
 23129 
       
 23130 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/search-results.js
       
 23131 
       
 23132 
       
 23133 /**
       
 23134  * External dependencies
       
 23135  */
       
 23136 
       
 23137 /**
       
 23138  * WordPress dependencies
       
 23139  */
       
 23140 
       
 23141 
       
 23142 
       
 23143 
       
 23144 
       
 23145 
       
 23146 /**
       
 23147  * Internal dependencies
       
 23148  */
       
 23149 
       
 23150 
       
 23151 
       
 23152 
       
 23153 
       
 23154 
       
 23155 
       
 23156 
       
 23157 
       
 23158 
       
 23159 
       
 23160 
       
 23161 function InserterSearchResults({
       
 23162   filterValue,
       
 23163   onSelect,
       
 23164   onHover,
       
 23165   rootClientId,
       
 23166   clientId,
       
 23167   isAppender,
       
 23168   __experimentalInsertionIndex,
       
 23169   maxBlockPatterns,
       
 23170   maxBlockTypes,
       
 23171   showBlockDirectory = false,
       
 23172   isDraggable = true,
       
 23173   shouldFocusBlock = true
       
 23174 }) {
       
 23175   const debouncedSpeak = Object(external_wp_compose_["useDebounce"])(external_wp_a11y_["speak"], 500);
       
 23176   const [destinationRootClientId, onInsertBlocks] = use_insertion_point({
       
 23177     onSelect,
       
 23178     rootClientId,
       
 23179     clientId,
       
 23180     isAppender,
       
 23181     insertionIndex: __experimentalInsertionIndex,
       
 23182     shouldFocusBlock
       
 23183   });
       
 23184   const [blockTypes, blockTypeCategories, blockTypeCollections, onSelectBlockType] = use_block_types_state(destinationRootClientId, onInsertBlocks);
       
 23185   const [patterns,, onSelectBlockPattern] = use_patterns_state(onInsertBlocks, destinationRootClientId);
       
 23186   const filteredBlockTypes = Object(external_wp_element_["useMemo"])(() => {
       
 23187     const results = searchBlockItems(Object(external_lodash_["orderBy"])(blockTypes, ['frecency'], ['desc']), blockTypeCategories, blockTypeCollections, filterValue);
       
 23188     return maxBlockTypes !== undefined ? results.slice(0, maxBlockTypes) : results;
       
 23189   }, [filterValue, blockTypes, blockTypeCategories, blockTypeCollections, maxBlockTypes]);
       
 23190   const filteredBlockPatterns = Object(external_wp_element_["useMemo"])(() => {
       
 23191     const results = searchItems(patterns, filterValue);
       
 23192     return maxBlockPatterns !== undefined ? results.slice(0, maxBlockPatterns) : results;
       
 23193   }, [filterValue, patterns, maxBlockPatterns]); // Announce search results on change
       
 23194 
       
 23195   Object(external_wp_element_["useEffect"])(() => {
       
 23196     if (!filterValue) {
       
 23197       return;
       
 23198     }
       
 23199 
       
 23200     const count = filteredBlockTypes.length + filteredBlockPatterns.length;
       
 23201     const resultsFoundMessage = Object(external_wp_i18n_["sprintf"])(
       
 23202     /* translators: %d: number of results. */
       
 23203     Object(external_wp_i18n_["_n"])('%d result found.', '%d results found.', count), count);
       
 23204     debouncedSpeak(resultsFoundMessage);
       
 23205   }, [filterValue, debouncedSpeak]);
       
 23206   const currentShownPatterns = Object(external_wp_compose_["useAsyncList"])(filteredBlockPatterns);
       
 23207   const hasItems = !Object(external_lodash_["isEmpty"])(filteredBlockTypes) || !Object(external_lodash_["isEmpty"])(filteredBlockPatterns);
       
 23208   return Object(external_wp_element_["createElement"])(inserter_listbox, null, !showBlockDirectory && !hasItems && Object(external_wp_element_["createElement"])(no_results, null), !!filteredBlockTypes.length && Object(external_wp_element_["createElement"])(panel, {
       
 23209     title: Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], null, Object(external_wp_i18n_["__"])('Blocks'))
       
 23210   }, Object(external_wp_element_["createElement"])(block_types_list, {
       
 23211     items: filteredBlockTypes,
       
 23212     onSelect: onSelectBlockType,
       
 23213     onHover: onHover,
       
 23214     label: Object(external_wp_i18n_["__"])('Blocks'),
       
 23215     isDraggable: isDraggable
       
 23216   })), !!filteredBlockTypes.length && !!filteredBlockPatterns.length && Object(external_wp_element_["createElement"])("div", {
       
 23217     className: "block-editor-inserter__quick-inserter-separator"
       
 23218   }), !!filteredBlockPatterns.length && Object(external_wp_element_["createElement"])(panel, {
       
 23219     title: Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], null, Object(external_wp_i18n_["__"])('Block Patterns'))
       
 23220   }, Object(external_wp_element_["createElement"])("div", {
       
 23221     className: "block-editor-inserter__quick-inserter-patterns"
       
 23222   }, Object(external_wp_element_["createElement"])(block_patterns_list, {
       
 23223     shownPatterns: currentShownPatterns,
       
 23224     blockPatterns: filteredBlockPatterns,
       
 23225     onClickPattern: onSelectBlockPattern,
       
 23226     isDraggable: isDraggable
       
 23227   }))), showBlockDirectory && Object(external_wp_element_["createElement"])(inserter_menu_extension.Slot, {
       
 23228     fillProps: {
       
 23229       onSelect: onSelectBlockType,
       
 23230       onHover,
       
 23231       filterValue,
       
 23232       hasItems,
       
 23233       rootClientId: destinationRootClientId
       
 23234     }
       
 23235   }, fills => {
       
 23236     if (fills.length) {
       
 23237       return fills;
       
 23238     }
       
 23239 
       
 23240     if (!hasItems) {
       
 23241       return Object(external_wp_element_["createElement"])(no_results, null);
       
 23242     }
       
 23243 
       
 23244     return null;
       
 23245   }));
       
 23246 }
       
 23247 
       
 23248 /* harmony default export */ var search_results = (InserterSearchResults);
       
 23249 
       
 23250 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/tabs.js
       
 23251 
       
 23252 
       
 23253 /**
       
 23254  * WordPress dependencies
       
 23255  */
       
 23256 
       
 23257 
       
 23258 
       
 23259 const tabs_blocksTab = {
       
 23260   name: 'blocks',
       
 23261 
       
 23262   /* translators: Blocks tab title in the block inserter. */
       
 23263   title: Object(external_wp_i18n_["__"])('Blocks')
       
 23264 };
       
 23265 const tabs_patternsTab = {
       
 23266   name: 'patterns',
       
 23267 
       
 23268   /* translators: Patterns tab title in the block inserter. */
       
 23269   title: Object(external_wp_i18n_["__"])('Patterns')
       
 23270 };
       
 23271 const tabs_reusableBlocksTab = {
       
 23272   name: 'reusable',
       
 23273 
       
 23274   /* translators: Reusable blocks tab title in the block inserter. */
       
 23275   title: Object(external_wp_i18n_["__"])('Reusable')
       
 23276 };
       
 23277 
       
 23278 function InserterTabs({
       
 23279   children,
       
 23280   showPatterns = false,
       
 23281   showReusableBlocks = false,
       
 23282   onSelect
       
 23283 }) {
       
 23284   const tabs = Object(external_wp_element_["useMemo"])(() => {
       
 23285     const tempTabs = [tabs_blocksTab];
       
 23286 
       
 23287     if (showPatterns) {
       
 23288       tempTabs.push(tabs_patternsTab);
       
 23289     }
       
 23290 
       
 23291     if (showReusableBlocks) {
       
 23292       tempTabs.push(tabs_reusableBlocksTab);
       
 23293     }
       
 23294 
       
 23295     return tempTabs;
       
 23296   }, [tabs_blocksTab, showPatterns, tabs_patternsTab, showReusableBlocks, tabs_reusableBlocksTab]);
       
 23297   return Object(external_wp_element_["createElement"])(external_wp_components_["TabPanel"], {
       
 23298     className: "block-editor-inserter__tabs",
       
 23299     tabs: tabs,
       
 23300     onSelect: onSelect
       
 23301   }, children);
       
 23302 }
       
 23303 
       
 23304 /* harmony default export */ var inserter_tabs = (InserterTabs);
       
 23305 
       
 23306 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/menu.js
       
 23307 
       
 23308 
       
 23309 /**
       
 23310  * WordPress dependencies
       
 23311  */
       
 23312 
       
 23313 
       
 23314 
       
 23315 
       
 23316 /**
       
 23317  * Internal dependencies
       
 23318  */
       
 23319 
       
 23320 
       
 23321 
       
 23322 
       
 23323 
       
 23324 
       
 23325 
       
 23326 
       
 23327 
       
 23328 
       
 23329 
       
 23330 
       
 23331 function InserterMenu({
       
 23332   rootClientId,
       
 23333   clientId,
       
 23334   isAppender,
       
 23335   __experimentalInsertionIndex,
       
 23336   onSelect,
       
 23337   showInserterHelpPanel,
       
 23338   showMostUsedBlocks,
       
 23339   shouldFocusBlock = true
       
 23340 }) {
       
 23341   const [filterValue, setFilterValue] = Object(external_wp_element_["useState"])('');
       
 23342   const [hoveredItem, setHoveredItem] = Object(external_wp_element_["useState"])(null);
       
 23343   const [selectedPatternCategory, setSelectedPatternCategory] = Object(external_wp_element_["useState"])(null);
       
 23344   const [destinationRootClientId, onInsertBlocks, onToggleInsertionPoint] = use_insertion_point({
       
 23345     rootClientId,
       
 23346     clientId,
       
 23347     isAppender,
       
 23348     insertionIndex: __experimentalInsertionIndex,
       
 23349     shouldFocusBlock
       
 23350   });
       
 23351   const {
       
 23352     showPatterns,
       
 23353     hasReusableBlocks
       
 23354   } = Object(external_wp_data_["useSelect"])(select => {
       
 23355     var _getSettings$__experi;
       
 23356 
       
 23357     const {
       
 23358       __experimentalGetAllowedPatterns,
       
 23359       getSettings
       
 23360     } = select(store);
       
 23361     return {
       
 23362       showPatterns: !!__experimentalGetAllowedPatterns(destinationRootClientId).length,
       
 23363       hasReusableBlocks: !!((_getSettings$__experi = getSettings().__experimentalReusableBlocks) !== null && _getSettings$__experi !== void 0 && _getSettings$__experi.length)
       
 23364     };
       
 23365   }, [destinationRootClientId]);
       
 23366   const onInsert = Object(external_wp_element_["useCallback"])((blocks, meta, shouldForceFocusBlock) => {
       
 23367     onInsertBlocks(blocks, meta, shouldForceFocusBlock);
       
 23368     onSelect();
       
 23369   }, [onInsertBlocks, onSelect]);
       
 23370   const onInsertPattern = Object(external_wp_element_["useCallback"])((blocks, patternName) => {
       
 23371     onInsertBlocks(blocks, {
       
 23372       patternName
       
 23373     });
       
 23374     onSelect();
       
 23375   }, [onInsertBlocks, onSelect]);
       
 23376   const onHover = Object(external_wp_element_["useCallback"])(item => {
       
 23377     onToggleInsertionPoint(!!item);
       
 23378     setHoveredItem(item);
       
 23379   }, [onToggleInsertionPoint, setHoveredItem]);
       
 23380   const onClickPatternCategory = Object(external_wp_element_["useCallback"])(patternCategory => {
       
 23381     setSelectedPatternCategory(patternCategory);
       
 23382   }, [setSelectedPatternCategory]);
       
 23383   const blocksTab = Object(external_wp_element_["useMemo"])(() => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
       
 23384     className: "block-editor-inserter__block-list"
       
 23385   }, Object(external_wp_element_["createElement"])(block_types_tab, {
       
 23386     rootClientId: destinationRootClientId,
       
 23387     onInsert: onInsert,
       
 23388     onHover: onHover,
       
 23389     showMostUsedBlocks: showMostUsedBlocks
       
 23390   })), showInserterHelpPanel && Object(external_wp_element_["createElement"])("div", {
       
 23391     className: "block-editor-inserter__tips"
       
 23392   }, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
       
 23393     as: "h2"
       
 23394   }, Object(external_wp_i18n_["__"])('A tip for using the block editor')), Object(external_wp_element_["createElement"])(tips, null))), [destinationRootClientId, onInsert, onHover, filterValue, showMostUsedBlocks, showInserterHelpPanel]);
       
 23395   const patternsTab = Object(external_wp_element_["useMemo"])(() => Object(external_wp_element_["createElement"])(block_patterns_tab, {
       
 23396     rootClientId: destinationRootClientId,
       
 23397     onInsert: onInsertPattern,
       
 23398     onClickCategory: onClickPatternCategory,
       
 23399     selectedCategory: selectedPatternCategory
       
 23400   }), [destinationRootClientId, onInsertPattern, onClickPatternCategory, selectedPatternCategory]);
       
 23401   const reusableBlocksTab = Object(external_wp_element_["useMemo"])(() => Object(external_wp_element_["createElement"])(reusable_blocks_tab, {
       
 23402     rootClientId: destinationRootClientId,
       
 23403     onInsert: onInsert,
       
 23404     onHover: onHover
       
 23405   }), [destinationRootClientId, onInsert, onHover]);
       
 23406   const getCurrentTab = Object(external_wp_element_["useCallback"])(tab => {
       
 23407     if (tab.name === 'blocks') {
       
 23408       return blocksTab;
       
 23409     } else if (tab.name === 'patterns') {
       
 23410       return patternsTab;
       
 23411     }
       
 23412 
       
 23413     return reusableBlocksTab;
       
 23414   }, [blocksTab, patternsTab, reusableBlocksTab]);
       
 23415   return Object(external_wp_element_["createElement"])("div", {
       
 23416     className: "block-editor-inserter__menu"
       
 23417   }, Object(external_wp_element_["createElement"])("div", {
       
 23418     className: "block-editor-inserter__main-area"
       
 23419   }, Object(external_wp_element_["createElement"])("div", {
       
 23420     className: "block-editor-inserter__content"
       
 23421   }, Object(external_wp_element_["createElement"])(search_form, {
       
 23422     onChange: value => {
       
 23423       if (hoveredItem) setHoveredItem(null);
       
 23424       setFilterValue(value);
       
 23425     },
       
 23426     value: filterValue,
       
 23427     label: Object(external_wp_i18n_["__"])('Search for blocks and patterns'),
       
 23428     placeholder: Object(external_wp_i18n_["__"])('Search')
       
 23429   }), !!filterValue && Object(external_wp_element_["createElement"])(search_results, {
       
 23430     filterValue: filterValue,
       
 23431     onSelect: onSelect,
       
 23432     onHover: onHover,
       
 23433     rootClientId: rootClientId,
       
 23434     clientId: clientId,
       
 23435     isAppender: isAppender,
       
 23436     __experimentalInsertionIndex: __experimentalInsertionIndex,
       
 23437     showBlockDirectory: true,
       
 23438     shouldFocusBlock: shouldFocusBlock
       
 23439   }), !filterValue && (showPatterns || hasReusableBlocks) && Object(external_wp_element_["createElement"])(inserter_tabs, {
       
 23440     showPatterns: showPatterns,
       
 23441     showReusableBlocks: hasReusableBlocks
       
 23442   }, getCurrentTab), !filterValue && !showPatterns && !hasReusableBlocks && blocksTab)), showInserterHelpPanel && hoveredItem && Object(external_wp_element_["createElement"])(preview_panel, {
       
 23443     item: hoveredItem
       
 23444   }));
       
 23445 }
       
 23446 
       
 23447 /* harmony default export */ var menu = (InserterMenu);
       
 23448 
       
 23449 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/quick-inserter.js
       
 23450 
       
 23451 
       
 23452 /**
       
 23453  * External dependencies
       
 23454  */
       
 23455 
       
 23456 /**
       
 23457  * WordPress dependencies
       
 23458  */
       
 23459 
       
 23460 
       
 23461 
       
 23462 
       
 23463 
       
 23464 /**
       
 23465  * Internal dependencies
       
 23466  */
       
 23467 
       
 23468 
       
 23469 
       
 23470 
       
 23471 
       
 23472 
       
 23473 
       
 23474 const SEARCH_THRESHOLD = 6;
       
 23475 const quick_inserter_SHOWN_BLOCK_TYPES = 6;
       
 23476 const SHOWN_BLOCK_PATTERNS = 2;
       
 23477 function QuickInserter({
       
 23478   onSelect,
       
 23479   rootClientId,
       
 23480   clientId,
       
 23481   isAppender
       
 23482 }) {
       
 23483   const [filterValue, setFilterValue] = Object(external_wp_element_["useState"])('');
       
 23484   const [destinationRootClientId, onInsertBlocks] = use_insertion_point({
       
 23485     onSelect,
       
 23486     rootClientId,
       
 23487     clientId,
       
 23488     isAppender
       
 23489   });
       
 23490   const [blockTypes] = use_block_types_state(destinationRootClientId, onInsertBlocks);
       
 23491   const [patterns] = use_patterns_state(onInsertBlocks, destinationRootClientId);
       
 23492   const showPatterns = patterns.length && !!filterValue;
       
 23493   const showSearch = showPatterns && patterns.length > SEARCH_THRESHOLD || blockTypes.length > SEARCH_THRESHOLD;
       
 23494   const {
       
 23495     setInserterIsOpened,
       
 23496     insertionIndex
       
 23497   } = Object(external_wp_data_["useSelect"])(select => {
       
 23498     const {
       
 23499       getSettings,
       
 23500       getBlockIndex,
       
 23501       getBlockCount
       
 23502     } = select(store);
       
 23503     const index = getBlockIndex(clientId, rootClientId);
       
 23504     return {
       
 23505       setInserterIsOpened: getSettings().__experimentalSetIsInserterOpened,
       
 23506       insertionIndex: index === -1 ? getBlockCount() : index
       
 23507     };
       
 23508   }, [clientId, rootClientId]);
       
 23509   Object(external_wp_element_["useEffect"])(() => {
       
 23510     if (setInserterIsOpened) {
       
 23511       setInserterIsOpened(false);
       
 23512     }
       
 23513   }, [setInserterIsOpened]); // When clicking Browse All select the appropriate block so as
       
 23514   // the insertion point can work as expected
       
 23515 
       
 23516   const onBrowseAll = () => {
       
 23517     setInserterIsOpened({
       
 23518       rootClientId,
       
 23519       insertionIndex
       
 23520     });
       
 23521   };
       
 23522 
       
 23523   return Object(external_wp_element_["createElement"])("div", {
       
 23524     className: classnames_default()('block-editor-inserter__quick-inserter', {
       
 23525       'has-search': showSearch,
       
 23526       'has-expand': setInserterIsOpened
       
 23527     })
       
 23528   }, showSearch && Object(external_wp_element_["createElement"])(search_form, {
       
 23529     value: filterValue,
       
 23530     onChange: value => {
       
 23531       setFilterValue(value);
       
 23532     },
       
 23533     label: Object(external_wp_i18n_["__"])('Search for blocks and patterns'),
       
 23534     placeholder: Object(external_wp_i18n_["__"])('Search')
       
 23535   }), Object(external_wp_element_["createElement"])("div", {
       
 23536     className: "block-editor-inserter__quick-inserter-results"
       
 23537   }, Object(external_wp_element_["createElement"])(search_results, {
       
 23538     filterValue: filterValue,
       
 23539     onSelect: onSelect,
       
 23540     rootClientId: rootClientId,
       
 23541     clientId: clientId,
       
 23542     isAppender: isAppender,
       
 23543     maxBlockPatterns: showPatterns ? SHOWN_BLOCK_PATTERNS : 0,
       
 23544     maxBlockTypes: quick_inserter_SHOWN_BLOCK_TYPES,
       
 23545     isDraggable: false
       
 23546   })), setInserterIsOpened && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 23547     className: "block-editor-inserter__quick-inserter-expand",
       
 23548     onClick: onBrowseAll,
       
 23549     "aria-label": Object(external_wp_i18n_["__"])('Browse all. This will open the main inserter panel in the editor toolbar.')
       
 23550   }, Object(external_wp_i18n_["__"])('Browse all')));
       
 23551 }
       
 23552 
       
 23553 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/index.js
       
 23554 
       
 23555 
       
 23556 
       
 23557 /**
       
 23558  * External dependencies
       
 23559  */
       
 23560 
       
 23561 
       
 23562 /**
       
 23563  * WordPress dependencies
       
 23564  */
       
 23565 
       
 23566 
       
 23567 
       
 23568 
       
 23569 
       
 23570 
       
 23571 
       
 23572 
       
 23573 
       
 23574 /**
       
 23575  * Internal dependencies
       
 23576  */
       
 23577 
       
 23578 
       
 23579 
       
 23580 
       
 23581 
       
 23582 const defaultRenderToggle = ({
       
 23583   onToggle,
       
 23584   disabled,
       
 23585   isOpen,
       
 23586   blockTitle,
       
 23587   hasSingleBlockType,
       
 23588   toggleProps = {}
       
 23589 }) => {
       
 23590   let label;
       
 23591 
       
 23592   if (hasSingleBlockType) {
       
 23593     label = Object(external_wp_i18n_["sprintf"])( // translators: %s: the name of the block when there is only one
       
 23594     Object(external_wp_i18n_["_x"])('Add %s', 'directly add the only allowed block'), blockTitle);
       
 23595   } else {
       
 23596     label = Object(external_wp_i18n_["_x"])('Add block', 'Generic label for block inserter button');
       
 23597   }
       
 23598 
       
 23599   const {
       
 23600     onClick,
       
 23601     ...rest
       
 23602   } = toggleProps; // Handle both onClick functions from the toggle and the parent component
       
 23603 
       
 23604   function handleClick(event) {
       
 23605     if (onToggle) {
       
 23606       onToggle(event);
       
 23607     }
       
 23608 
       
 23609     if (onClick) {
       
 23610       onClick(event);
       
 23611     }
       
 23612   }
       
 23613 
       
 23614   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({
       
 23615     icon: plus["a" /* default */],
       
 23616     label: label,
       
 23617     tooltipPosition: "bottom",
       
 23618     onClick: handleClick,
       
 23619     className: "block-editor-inserter__toggle",
       
 23620     "aria-haspopup": !hasSingleBlockType ? 'true' : false,
       
 23621     "aria-expanded": !hasSingleBlockType ? isOpen : false,
       
 23622     disabled: disabled
       
 23623   }, rest));
       
 23624 };
       
 23625 
       
 23626 class inserter_Inserter extends external_wp_element_["Component"] {
       
 23627   constructor() {
       
 23628     super(...arguments);
       
 23629     this.onToggle = this.onToggle.bind(this);
       
 23630     this.renderToggle = this.renderToggle.bind(this);
       
 23631     this.renderContent = this.renderContent.bind(this);
       
 23632   }
       
 23633 
       
 23634   onToggle(isOpen) {
       
 23635     const {
       
 23636       onToggle
       
 23637     } = this.props; // Surface toggle callback to parent component
       
 23638 
       
 23639     if (onToggle) {
       
 23640       onToggle(isOpen);
       
 23641     }
       
 23642   }
       
 23643   /**
       
 23644    * Render callback to display Dropdown toggle element.
       
 23645    *
       
 23646    * @param {Object}   options
       
 23647    * @param {Function} options.onToggle Callback to invoke when toggle is
       
 23648    *                                    pressed.
       
 23649    * @param {boolean}  options.isOpen   Whether dropdown is currently open.
       
 23650    *
       
 23651    * @return {WPElement} Dropdown toggle element.
       
 23652    */
       
 23653 
       
 23654 
       
 23655   renderToggle({
       
 23656     onToggle,
       
 23657     isOpen
       
 23658   }) {
       
 23659     const {
       
 23660       disabled,
       
 23661       blockTitle,
       
 23662       hasSingleBlockType,
       
 23663       toggleProps,
       
 23664       hasItems,
       
 23665       renderToggle = defaultRenderToggle
       
 23666     } = this.props;
       
 23667     return renderToggle({
       
 23668       onToggle,
       
 23669       isOpen,
       
 23670       disabled: disabled || !hasItems,
       
 23671       blockTitle,
       
 23672       hasSingleBlockType,
       
 23673       toggleProps
       
 23674     });
       
 23675   }
       
 23676   /**
       
 23677    * Render callback to display Dropdown content element.
       
 23678    *
       
 23679    * @param {Object}   options
       
 23680    * @param {Function} options.onClose Callback to invoke when dropdown is
       
 23681    *                                   closed.
       
 23682    *
       
 23683    * @return {WPElement} Dropdown content element.
       
 23684    */
       
 23685 
       
 23686 
       
 23687   renderContent({
       
 23688     onClose
       
 23689   }) {
       
 23690     const {
       
 23691       rootClientId,
       
 23692       clientId,
       
 23693       isAppender,
       
 23694       showInserterHelpPanel,
       
 23695       // This prop is experimental to give some time for the quick inserter to mature
       
 23696       // Feel free to make them stable after a few releases.
       
 23697       __experimentalIsQuick: isQuick
       
 23698     } = this.props;
       
 23699 
       
 23700     if (isQuick) {
       
 23701       return Object(external_wp_element_["createElement"])(QuickInserter, {
       
 23702         onSelect: () => {
       
 23703           onClose();
       
 23704         },
       
 23705         rootClientId: rootClientId,
       
 23706         clientId: clientId,
       
 23707         isAppender: isAppender
       
 23708       });
       
 23709     }
       
 23710 
       
 23711     return Object(external_wp_element_["createElement"])(menu, {
       
 23712       onSelect: () => {
       
 23713         onClose();
       
 23714       },
       
 23715       rootClientId: rootClientId,
       
 23716       clientId: clientId,
       
 23717       isAppender: isAppender,
       
 23718       showInserterHelpPanel: showInserterHelpPanel
       
 23719     });
       
 23720   }
       
 23721 
       
 23722   render() {
       
 23723     const {
       
 23724       position,
       
 23725       hasSingleBlockType,
       
 23726       insertOnlyAllowedBlock,
       
 23727       __experimentalIsQuick: isQuick,
       
 23728       onSelectOrClose
       
 23729     } = this.props;
       
 23730 
       
 23731     if (hasSingleBlockType) {
       
 23732       return this.renderToggle({
       
 23733         onToggle: insertOnlyAllowedBlock
       
 23734       });
       
 23735     }
       
 23736 
       
 23737     return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
       
 23738       className: "block-editor-inserter",
       
 23739       contentClassName: classnames_default()('block-editor-inserter__popover', {
       
 23740         'is-quick': isQuick
       
 23741       }),
       
 23742       position: position,
       
 23743       onToggle: this.onToggle,
       
 23744       expandOnMobile: true,
       
 23745       headerTitle: Object(external_wp_i18n_["__"])('Add a block'),
       
 23746       renderToggle: this.renderToggle,
       
 23747       renderContent: this.renderContent,
       
 23748       onClose: onSelectOrClose
       
 23749     });
       
 23750   }
       
 23751 
       
 23752 }
       
 23753 
       
 23754 /* harmony default export */ var inserter = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, {
       
 23755   clientId,
       
 23756   rootClientId
       
 23757 }) => {
       
 23758   const {
       
 23759     getBlockRootClientId,
       
 23760     hasInserterItems,
       
 23761     __experimentalGetAllowedBlocks
       
 23762   } = select(store);
       
 23763   const {
       
 23764     getBlockVariations
       
 23765   } = select(external_wp_blocks_["store"]);
       
 23766   rootClientId = rootClientId || getBlockRootClientId(clientId) || undefined;
       
 23767 
       
 23768   const allowedBlocks = __experimentalGetAllowedBlocks(rootClientId);
       
 23769 
       
 23770   const hasSingleBlockType = Object(external_lodash_["size"])(allowedBlocks) === 1 && Object(external_lodash_["size"])(getBlockVariations(allowedBlocks[0].name, 'inserter')) === 0;
       
 23771   let allowedBlockType = false;
       
 23772 
       
 23773   if (hasSingleBlockType) {
       
 23774     allowedBlockType = allowedBlocks[0];
       
 23775   }
       
 23776 
       
 23777   return {
       
 23778     hasItems: hasInserterItems(rootClientId),
       
 23779     hasSingleBlockType,
       
 23780     blockTitle: allowedBlockType ? allowedBlockType.title : '',
       
 23781     allowedBlockType,
       
 23782     rootClientId
       
 23783   };
       
 23784 }), Object(external_wp_data_["withDispatch"])((dispatch, ownProps, {
       
 23785   select
       
 23786 }) => {
       
 23787   return {
       
 23788     insertOnlyAllowedBlock() {
       
 23789       const {
       
 23790         rootClientId,
       
 23791         clientId,
       
 23792         isAppender,
       
 23793         hasSingleBlockType,
       
 23794         allowedBlockType,
       
 23795         onSelectOrClose
       
 23796       } = ownProps;
       
 23797 
       
 23798       if (!hasSingleBlockType) {
       
 23799         return;
       
 23800       }
       
 23801 
       
 23802       function getInsertionIndex() {
       
 23803         const {
       
 23804           getBlockIndex,
       
 23805           getBlockSelectionEnd,
       
 23806           getBlockOrder,
       
 23807           getBlockRootClientId
       
 23808         } = select(store); // If the clientId is defined, we insert at the position of the block.
       
 23809 
       
 23810         if (clientId) {
       
 23811           return getBlockIndex(clientId, rootClientId);
       
 23812         } // If there a selected block, we insert after the selected block.
       
 23813 
       
 23814 
       
 23815         const end = getBlockSelectionEnd();
       
 23816 
       
 23817         if (!isAppender && end && getBlockRootClientId(end) === rootClientId) {
       
 23818           return getBlockIndex(end, rootClientId) + 1;
       
 23819         } // Otherwise, we insert at the end of the current rootClientId
       
 23820 
       
 23821 
       
 23822         return getBlockOrder(rootClientId).length;
       
 23823       }
       
 23824 
       
 23825       const {
       
 23826         insertBlock
       
 23827       } = dispatch(store);
       
 23828       const blockToInsert = Object(external_wp_blocks_["createBlock"])(allowedBlockType.name);
       
 23829       insertBlock(blockToInsert, getInsertionIndex(), rootClientId);
       
 23830 
       
 23831       if (onSelectOrClose) {
       
 23832         onSelectOrClose();
       
 23833       }
       
 23834 
       
 23835       const message = Object(external_wp_i18n_["sprintf"])( // translators: %s: the name of the block that has been added
       
 23836       Object(external_wp_i18n_["__"])('%s block added'), allowedBlockType.title);
       
 23837       Object(external_wp_a11y_["speak"])(message);
       
 23838     }
       
 23839 
       
 23840   };
       
 23841 }), // The global inserter should always be visible, we are using ( ! isAppender && ! rootClientId && ! clientId ) as
       
 23842 // a way to detect the global Inserter.
       
 23843 Object(external_wp_compose_["ifCondition"])(({
       
 23844   hasItems,
       
 23845   isAppender,
       
 23846   rootClientId,
       
 23847   clientId
       
 23848 }) => hasItems || !isAppender && !rootClientId && !clientId)])(inserter_Inserter));
 23816 
 23849 
 23817 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/default-block-appender/index.js
 23850 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/default-block-appender/index.js
 23818 
 23851 
 23819 
 23852 
 23820 /**
 23853 /**
 23821  * External dependencies
       
 23822  */
       
 23823 
       
 23824 /**
       
 23825  * WordPress dependencies
 23854  * WordPress dependencies
 23826  */
 23855  */
 23827 
 23856 
 23828 
 23857 
 23829 
 23858 
 23830 
 23859 
 23831 
 23860 
 23832 
       
 23833 /**
 23861 /**
 23834  * Internal dependencies
 23862  * Internal dependencies
 23835  */
 23863  */
 23836 
 23864 
 23837 
 23865 
 23838 function default_block_appender_DefaultBlockAppender(_ref) {
 23866 
 23839   var isLocked = _ref.isLocked,
 23867 /**
 23840       isVisible = _ref.isVisible,
 23868  * Zero width non-breaking space, used as padding for the paragraph when it is
 23841       onAppend = _ref.onAppend,
 23869  * empty.
 23842       showPrompt = _ref.showPrompt,
 23870  */
 23843       placeholder = _ref.placeholder,
 23871 
 23844       rootClientId = _ref.rootClientId;
 23872 const ZWNBSP = '\ufeff';
 23845 
 23873 function DefaultBlockAppender({
       
 23874   isLocked,
       
 23875   isVisible,
       
 23876   onAppend,
       
 23877   showPrompt,
       
 23878   placeholder,
       
 23879   rootClientId
       
 23880 }) {
 23846   if (isLocked || !isVisible) {
 23881   if (isLocked || !isVisible) {
 23847     return null;
 23882     return null;
 23848   }
 23883   }
 23849 
 23884 
 23850   var value = Object(external_this_wp_htmlEntities_["decodeEntities"])(placeholder) || Object(external_this_wp_i18n_["__"])('Start writing or type / to choose a block'); // The appender "button" is in-fact a text field so as to support
 23885   const value = Object(external_wp_htmlEntities_["decodeEntities"])(placeholder) || Object(external_wp_i18n_["__"])('Type / to choose a block');
 23851   // transitions by WritingFlow occurring by arrow key press. WritingFlow
 23886 
 23852   // only supports tab transitions into text fields and to the block focus
 23887   return Object(external_wp_element_["createElement"])("div", {
 23853   // boundary.
       
 23854   //
       
 23855   // See: https://github.com/WordPress/gutenberg/issues/4829#issuecomment-374213658
       
 23856   //
       
 23857   // If it were ever to be made to be a proper `button` element, it is
       
 23858   // important to note that `onFocus` alone would not be sufficient to
       
 23859   // capture click events, notably in Firefox.
       
 23860   //
       
 23861   // See: https://gist.github.com/cvrebert/68659d0333a578d75372
       
 23862   // The wp-block className is important for editor styles.
       
 23863 
       
 23864 
       
 23865   return Object(external_this_wp_element_["createElement"])("div", {
       
 23866     "data-root-client-id": rootClientId || '',
 23888     "data-root-client-id": rootClientId || '',
 23867     className: "wp-block block-editor-default-block-appender"
 23889     className: "block-editor-default-block-appender"
 23868   }, Object(external_this_wp_element_["createElement"])(lib_default.a, {
 23890   }, Object(external_wp_element_["createElement"])("p", {
       
 23891     tabIndex: "0" // Only necessary for `useCanvasClickRedirect` to consider it
       
 23892     // as a target. Ideally it should consider any tabbable target,
       
 23893     // but the inserter is rendered in place while it should be
       
 23894     // rendered in a popover, just like it does for an empty
       
 23895     // paragraph block.
       
 23896     ,
       
 23897     contentEditable: true,
       
 23898     suppressContentEditableWarning: true // We want this element to be styled as a paragraph by themes.
       
 23899     // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
       
 23900     ,
 23869     role: "button",
 23901     role: "button",
 23870     "aria-label": Object(external_this_wp_i18n_["__"])('Add block'),
 23902     "aria-label": Object(external_wp_i18n_["__"])('Add block') // The wp-block className is important for editor styles.
 23871     className: "block-editor-default-block-appender__content",
 23903     ,
 23872     readOnly: true,
 23904     className: "wp-block block-editor-default-block-appender__content",
 23873     onFocus: onAppend,
 23905     onFocus: onAppend
 23874     value: showPrompt ? value : ''
 23906   }, showPrompt ? value : ZWNBSP), Object(external_wp_element_["createElement"])(inserter, {
 23875   }), Object(external_this_wp_element_["createElement"])(inserter, {
       
 23876     rootClientId: rootClientId,
 23907     rootClientId: rootClientId,
 23877     position: "bottom right",
 23908     position: "bottom right",
 23878     isAppender: true,
 23909     isAppender: true,
 23879     __experimentalIsQuick: true
 23910     __experimentalIsQuick: true
 23880   }));
 23911   }));
 23881 }
 23912 }
 23882 /* harmony default export */ var default_block_appender = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select, ownProps) {
 23913 /* harmony default export */ var default_block_appender = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])((select, ownProps) => {
 23883   var _select = select('core/block-editor'),
 23914   const {
 23884       getBlockCount = _select.getBlockCount,
 23915     getBlockCount,
 23885       getBlockName = _select.getBlockName,
 23916     getBlockName,
 23886       isBlockValid = _select.isBlockValid,
 23917     isBlockValid,
 23887       getSettings = _select.getSettings,
 23918     getSettings,
 23888       getTemplateLock = _select.getTemplateLock;
 23919     getTemplateLock
 23889 
 23920   } = select(store);
 23890   var isEmpty = !getBlockCount(ownProps.rootClientId);
 23921   const isEmpty = !getBlockCount(ownProps.rootClientId);
 23891   var isLastBlockDefault = getBlockName(ownProps.lastBlockClientId) === Object(external_this_wp_blocks_["getDefaultBlockName"])();
 23922   const isLastBlockDefault = getBlockName(ownProps.lastBlockClientId) === Object(external_wp_blocks_["getDefaultBlockName"])();
 23892   var isLastBlockValid = isBlockValid(ownProps.lastBlockClientId);
 23923   const isLastBlockValid = isBlockValid(ownProps.lastBlockClientId);
 23893 
 23924   const {
 23894   var _getSettings = getSettings(),
 23925     bodyPlaceholder
 23895       bodyPlaceholder = _getSettings.bodyPlaceholder;
 23926   } = getSettings();
 23896 
       
 23897   return {
 23927   return {
 23898     isVisible: isEmpty || !isLastBlockDefault || !isLastBlockValid,
 23928     isVisible: isEmpty || !isLastBlockDefault || !isLastBlockValid,
 23899     showPrompt: isEmpty,
 23929     showPrompt: isEmpty,
 23900     isLocked: !!getTemplateLock(ownProps.rootClientId),
 23930     isLocked: !!getTemplateLock(ownProps.rootClientId),
 23901     placeholder: bodyPlaceholder
 23931     placeholder: bodyPlaceholder
 23902   };
 23932   };
 23903 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps) {
 23933 }), Object(external_wp_data_["withDispatch"])((dispatch, ownProps) => {
 23904   var _dispatch = dispatch('core/block-editor'),
 23934   const {
 23905       insertDefaultBlock = _dispatch.insertDefaultBlock,
 23935     insertDefaultBlock,
 23906       startTyping = _dispatch.startTyping;
 23936     startTyping
 23907 
 23937   } = dispatch(store);
 23908   return {
 23938   return {
 23909     onAppend: function onAppend() {
 23939     onAppend() {
 23910       var rootClientId = ownProps.rootClientId;
 23940       const {
       
 23941         rootClientId
       
 23942       } = ownProps;
 23911       insertDefaultBlock(undefined, rootClientId);
 23943       insertDefaultBlock(undefined, rootClientId);
 23912       startTyping();
 23944       startTyping();
 23913     }
 23945     }
       
 23946 
 23914   };
 23947   };
 23915 }))(default_block_appender_DefaultBlockAppender));
 23948 }))(DefaultBlockAppender));
 23916 
 23949 
 23917 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/button-block-appender/index.js
 23950 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/button-block-appender/index.js
 23918 
 23951 
 23919 
 23952 
 23920 /**
 23953 /**
 23927 
 23960 
 23928 
 23961 
 23929 
 23962 
 23930 
 23963 
 23931 
 23964 
       
 23965 
 23932 /**
 23966 /**
 23933  * Internal dependencies
 23967  * Internal dependencies
 23934  */
 23968  */
 23935 
 23969 
 23936 
 23970 
 23937 
 23971 
 23938 function button_block_appender_ButtonBlockAppender(_ref, ref) {
 23972 function ButtonBlockAppender({
 23939   var rootClientId = _ref.rootClientId,
 23973   rootClientId,
 23940       className = _ref.className,
 23974   className,
 23941       selectBlockOnInsert = _ref.__experimentalSelectBlockOnInsert,
 23975   onFocus,
 23942       onFocus = _ref.onFocus,
 23976   tabIndex
 23943       tabIndex = _ref.tabIndex;
 23977 }, ref) {
 23944   return Object(external_this_wp_element_["createElement"])(inserter, {
 23978   return Object(external_wp_element_["createElement"])(inserter, {
 23945     position: "bottom center",
 23979     position: "bottom center",
 23946     rootClientId: rootClientId,
 23980     rootClientId: rootClientId,
 23947     __experimentalSelectBlockOnInsert: selectBlockOnInsert,
       
 23948     __experimentalIsQuick: true,
 23981     __experimentalIsQuick: true,
 23949     renderToggle: function renderToggle(_ref2) {
 23982     renderToggle: ({
 23950       var onToggle = _ref2.onToggle,
 23983       onToggle,
 23951           disabled = _ref2.disabled,
 23984       disabled,
 23952           isOpen = _ref2.isOpen,
 23985       isOpen,
 23953           blockTitle = _ref2.blockTitle,
 23986       blockTitle,
 23954           hasSingleBlockType = _ref2.hasSingleBlockType;
 23987       hasSingleBlockType
 23955       var label;
 23988     }) => {
       
 23989       let label;
 23956 
 23990 
 23957       if (hasSingleBlockType) {
 23991       if (hasSingleBlockType) {
 23958         label = Object(external_this_wp_i18n_["sprintf"])( // translators: %s: the name of the block when there is only one
 23992         label = Object(external_wp_i18n_["sprintf"])( // translators: %s: the name of the block when there is only one
 23959         Object(external_this_wp_i18n_["_x"])('Add %s', 'directly add the only allowed block'), blockTitle);
 23993         Object(external_wp_i18n_["_x"])('Add %s', 'directly add the only allowed block'), blockTitle);
 23960       } else {
 23994       } else {
 23961         label = Object(external_this_wp_i18n_["_x"])('Add block', 'Generic label for block inserter button');
 23995         label = Object(external_wp_i18n_["_x"])('Add block', 'Generic label for block inserter button');
 23962       }
 23996       }
 23963 
 23997 
 23964       var isToggleButton = !hasSingleBlockType;
 23998       const isToggleButton = !hasSingleBlockType;
 23965       var inserterButton = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 23999       let inserterButton = Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 23966         ref: ref,
 24000         ref: ref,
 23967         onFocus: onFocus,
 24001         onFocus: onFocus,
 23968         tabIndex: tabIndex,
 24002         tabIndex: tabIndex,
 23969         className: classnames_default()(className, 'block-editor-button-block-appender'),
 24003         className: classnames_default()(className, 'block-editor-button-block-appender'),
 23970         onClick: onToggle,
 24004         onClick: onToggle,
 23971         "aria-haspopup": isToggleButton ? 'true' : undefined,
 24005         "aria-haspopup": isToggleButton ? 'true' : undefined,
 23972         "aria-expanded": isToggleButton ? isOpen : undefined,
 24006         "aria-expanded": isToggleButton ? isOpen : undefined,
 23973         disabled: disabled,
 24007         disabled: disabled,
 23974         label: label
 24008         label: label
 23975       }, !hasSingleBlockType && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
 24009       }, !hasSingleBlockType && Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
 23976         as: "span"
 24010         as: "span"
 23977       }, label), Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 24011       }, label), Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 23978         icon: plus["a" /* default */]
 24012         icon: plus["a" /* default */]
 23979       }));
 24013       }));
 23980 
 24014 
 23981       if (isToggleButton || hasSingleBlockType) {
 24015       if (isToggleButton || hasSingleBlockType) {
 23982         inserterButton = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Tooltip"], {
 24016         inserterButton = Object(external_wp_element_["createElement"])(external_wp_components_["Tooltip"], {
 23983           text: label
 24017           text: label
 23984         }, inserterButton);
 24018         }, inserterButton);
 23985       }
 24019       }
 23986 
 24020 
 23987       return inserterButton;
 24021       return inserterButton;
 23988     },
 24022     },
 23989     isAppender: true
 24023     isAppender: true
 23990   });
 24024   });
 23991 }
 24025 }
 23992 /**
 24026 /**
 23993  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/button-block-appender/README.md
 24027  * Use `ButtonBlockAppender` instead.
 23994  */
 24028  *
 23995 
 24029  * @deprecated
 23996 
 24030  */
 23997 /* harmony default export */ var button_block_appender = (Object(external_this_wp_element_["forwardRef"])(button_block_appender_ButtonBlockAppender));
 24031 
       
 24032 
       
 24033 const ButtonBlockerAppender = Object(external_wp_element_["forwardRef"])((props, ref) => {
       
 24034   external_wp_deprecated_default()(`wp.blockEditor.ButtonBlockerAppender`, {
       
 24035     alternative: 'wp.blockEditor.ButtonBlockAppender'
       
 24036   });
       
 24037   return ButtonBlockAppender(props, ref);
       
 24038 });
       
 24039 /**
       
 24040  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/button-block-appender/README.md
       
 24041  */
       
 24042 
       
 24043 /* harmony default export */ var button_block_appender = (Object(external_wp_element_["forwardRef"])(ButtonBlockAppender));
 23998 
 24044 
 23999 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list-appender/index.js
 24045 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list-appender/index.js
 24000 
 24046 
 24001 
 24047 
 24002 /**
 24048 /**
 24008  * WordPress dependencies
 24054  * WordPress dependencies
 24009  */
 24055  */
 24010 
 24056 
 24011 
 24057 
 24012 
 24058 
       
 24059 
 24013 /**
 24060 /**
 24014  * Internal dependencies
 24061  * Internal dependencies
 24015  */
 24062  */
 24016 
 24063 
 24017 
 24064 
 24018 
 24065 
 24019 
 24066  // A Context to store the map of the appender map.
 24020 function block_list_appender_stopPropagation(event) {
 24067 
       
 24068 const AppenderNodesContext = Object(external_wp_element_["createContext"])();
       
 24069 
       
 24070 function stopPropagation(event) {
 24021   event.stopPropagation();
 24071   event.stopPropagation();
 24022 }
 24072 }
 24023 
 24073 
 24024 function BlockListAppender(_ref) {
 24074 function BlockListAppender({
 24025   var blockClientIds = _ref.blockClientIds,
 24075   blockClientIds,
 24026       rootClientId = _ref.rootClientId,
 24076   rootClientId,
 24027       canInsertDefaultBlock = _ref.canInsertDefaultBlock,
 24077   canInsertDefaultBlock,
 24028       isLocked = _ref.isLocked,
 24078   isLocked,
 24029       CustomAppender = _ref.renderAppender,
 24079   renderAppender: CustomAppender,
 24030       className = _ref.className,
 24080   className,
 24031       _ref$tagName = _ref.tagName,
 24081   selectedBlockClientId,
 24032       TagName = _ref$tagName === void 0 ? 'div' : _ref$tagName;
 24082   tagName: TagName = 'div'
 24033 
 24083 }) {
 24034   if (isLocked || CustomAppender === false) {
 24084   if (isLocked || CustomAppender === false) {
 24035     return null;
 24085     return null;
 24036   }
 24086   }
 24037 
 24087 
 24038   var appender;
 24088   let appender;
 24039 
 24089 
 24040   if (CustomAppender) {
 24090   if (CustomAppender) {
 24041     // Prefer custom render prop if provided.
 24091     // Prefer custom render prop if provided.
 24042     appender = Object(external_this_wp_element_["createElement"])(CustomAppender, null);
 24092     appender = Object(external_wp_element_["createElement"])(CustomAppender, null);
 24043   } else if (canInsertDefaultBlock) {
       
 24044     // Render the default block appender when renderAppender has not been
       
 24045     // provided and the context supports use of the default appender.
       
 24046     appender = Object(external_this_wp_element_["createElement"])(default_block_appender, {
       
 24047       rootClientId: rootClientId,
       
 24048       lastBlockClientId: Object(external_this_lodash_["last"])(blockClientIds)
       
 24049     });
       
 24050   } else {
 24093   } else {
 24051     // Fallback in the case no renderAppender has been provided and the
 24094     const isDocumentAppender = !rootClientId;
 24052     // default block can't be inserted.
 24095     const isParentSelected = selectedBlockClientId === rootClientId;
 24053     appender = Object(external_this_wp_element_["createElement"])(button_block_appender, {
 24096     const isAnotherDefaultAppenderAlreadyDisplayed = selectedBlockClientId && !blockClientIds.includes(selectedBlockClientId);
 24054       rootClientId: rootClientId,
 24097 
 24055       className: "block-list-appender__toggle"
 24098     if (!isDocumentAppender && !isParentSelected && (!selectedBlockClientId || isAnotherDefaultAppenderAlreadyDisplayed)) {
 24056     });
 24099       return null;
 24057   }
 24100     }
 24058 
 24101 
 24059   return Object(external_this_wp_element_["createElement"])(TagName // A `tabIndex` is used on the wrapping `div` element in order to
 24102     if (canInsertDefaultBlock) {
       
 24103       // Render the default block appender when renderAppender has not been
       
 24104       // provided and the context supports use of the default appender.
       
 24105       appender = Object(external_wp_element_["createElement"])(default_block_appender, {
       
 24106         rootClientId: rootClientId,
       
 24107         lastBlockClientId: Object(external_lodash_["last"])(blockClientIds)
       
 24108       });
       
 24109     } else {
       
 24110       // Fallback in the case no renderAppender has been provided and the
       
 24111       // default block can't be inserted.
       
 24112       appender = Object(external_wp_element_["createElement"])(button_block_appender, {
       
 24113         rootClientId: rootClientId,
       
 24114         className: "block-list-appender__toggle"
       
 24115       });
       
 24116     }
       
 24117   }
       
 24118 
       
 24119   return Object(external_wp_element_["createElement"])(TagName // A `tabIndex` is used on the wrapping `div` element in order to
 24060   // force a focus event to occur when an appender `button` element
 24120   // force a focus event to occur when an appender `button` element
 24061   // is clicked. In some browsers (Firefox, Safari), button clicks do
 24121   // is clicked. In some browsers (Firefox, Safari), button clicks do
 24062   // not emit a focus event, which could cause this event to propagate
 24122   // not emit a focus event, which could cause this event to propagate
 24063   // unexpectedly. The `tabIndex` ensures that the interaction is
 24123   // unexpectedly. The `tabIndex` ensures that the interaction is
 24064   // captured as a focus, without also adding an extra tab stop.
 24124   // captured as a focus, without also adding an extra tab stop.
 24066   // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
 24126   // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
 24067   , {
 24127   , {
 24068     tabIndex: -1 // Prevent the block from being selected when the appender is
 24128     tabIndex: -1 // Prevent the block from being selected when the appender is
 24069     // clicked.
 24129     // clicked.
 24070     ,
 24130     ,
 24071     onFocus: block_list_appender_stopPropagation,
 24131     onFocus: stopPropagation,
 24072     className: classnames_default()('block-list-appender', className)
 24132     className: classnames_default()('block-list-appender', className)
 24073   }, appender);
 24133   }, appender);
 24074 }
 24134 }
 24075 
 24135 
 24076 /* harmony default export */ var block_list_appender = (Object(external_this_wp_data_["withSelect"])(function (select, _ref2) {
 24136 /* harmony default export */ var block_list_appender = (Object(external_wp_data_["withSelect"])((select, {
 24077   var rootClientId = _ref2.rootClientId;
 24137   rootClientId
 24078 
 24138 }) => {
 24079   var _select = select('core/block-editor'),
 24139   const {
 24080       getBlockOrder = _select.getBlockOrder,
 24140     getBlockOrder,
 24081       canInsertBlockType = _select.canInsertBlockType,
 24141     canInsertBlockType,
 24082       getTemplateLock = _select.getTemplateLock;
 24142     getTemplateLock,
 24083 
 24143     getSelectedBlockClientId
       
 24144   } = select(store);
 24084   return {
 24145   return {
 24085     isLocked: !!getTemplateLock(rootClientId),
 24146     isLocked: !!getTemplateLock(rootClientId),
 24086     blockClientIds: getBlockOrder(rootClientId),
 24147     blockClientIds: getBlockOrder(rootClientId),
 24087     canInsertDefaultBlock: canInsertBlockType(Object(external_this_wp_blocks_["getDefaultBlockName"])(), rootClientId)
 24148     canInsertDefaultBlock: canInsertBlockType(Object(external_wp_blocks_["getDefaultBlockName"])(), rootClientId),
       
 24149     selectedBlockClientId: getSelectedBlockClientId()
 24088   };
 24150   };
 24089 })(BlockListAppender));
 24151 })(BlockListAppender));
 24090 
 24152 
       
 24153 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-on-block-drop/index.js
       
 24154 /**
       
 24155  * WordPress dependencies
       
 24156  */
       
 24157 
       
 24158 
       
 24159 
       
 24160 /**
       
 24161  * Internal dependencies
       
 24162  */
       
 24163 
       
 24164 
       
 24165 /** @typedef {import('@wordpress/element').WPSyntheticEvent} WPSyntheticEvent */
       
 24166 
       
 24167 /**
       
 24168  * Retrieve the data for a block drop event.
       
 24169  *
       
 24170  * @param {WPSyntheticEvent} event The drop event.
       
 24171  *
       
 24172  * @return {Object} An object with block drag and drop data.
       
 24173  */
       
 24174 
       
 24175 function parseDropEvent(event) {
       
 24176   let result = {
       
 24177     srcRootClientId: null,
       
 24178     srcClientIds: null,
       
 24179     srcIndex: null,
       
 24180     type: null,
       
 24181     blocks: null
       
 24182   };
       
 24183 
       
 24184   if (!event.dataTransfer) {
       
 24185     return result;
       
 24186   }
       
 24187 
       
 24188   try {
       
 24189     result = Object.assign(result, JSON.parse(event.dataTransfer.getData('wp-blocks')));
       
 24190   } catch (err) {
       
 24191     return result;
       
 24192   }
       
 24193 
       
 24194   return result;
       
 24195 }
       
 24196 /**
       
 24197  * A function that returns an event handler function for block drop events.
       
 24198  *
       
 24199  * @param {string} targetRootClientId        The root client id where the block(s) will be inserted.
       
 24200  * @param {number} targetBlockIndex          The index where the block(s) will be inserted.
       
 24201  * @param {Function} getBlockIndex             A function that gets the index of a block.
       
 24202  * @param {Function} getClientIdsOfDescendants A function that gets the client ids of descendant blocks.
       
 24203  * @param {Function} moveBlocksToPosition      A function that moves blocks.
       
 24204  * @param {Function} insertBlocks              A function that inserts blocks.
       
 24205  * @param {Function} clearSelectedBlock        A function that clears block selection.
       
 24206  * @return {Function} The event handler for a block drop event.
       
 24207  */
       
 24208 
       
 24209 function use_on_block_drop_onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants, moveBlocksToPosition, insertBlocks, clearSelectedBlock) {
       
 24210   return event => {
       
 24211     const {
       
 24212       srcRootClientId: sourceRootClientId,
       
 24213       srcClientIds: sourceClientIds,
       
 24214       type: dropType,
       
 24215       blocks
       
 24216     } = parseDropEvent(event); // If the user is inserting a block
       
 24217 
       
 24218     if (dropType === 'inserter') {
       
 24219       clearSelectedBlock();
       
 24220       insertBlocks(blocks, targetBlockIndex, targetRootClientId, true, null);
       
 24221     } // If the user is moving a block
       
 24222 
       
 24223 
       
 24224     if (dropType === 'block') {
       
 24225       const sourceBlockIndex = getBlockIndex(sourceClientIds[0], sourceRootClientId); // If the user is dropping to the same position, return early.
       
 24226 
       
 24227       if (sourceRootClientId === targetRootClientId && sourceBlockIndex === targetBlockIndex) {
       
 24228         return;
       
 24229       } // If the user is attempting to drop a block within its own
       
 24230       // nested blocks, return early as this would create infinite
       
 24231       // recursion.
       
 24232 
       
 24233 
       
 24234       if (sourceClientIds.includes(targetRootClientId) || getClientIdsOfDescendants(sourceClientIds).some(id => id === targetRootClientId)) {
       
 24235         return;
       
 24236       }
       
 24237 
       
 24238       const isAtSameLevel = sourceRootClientId === targetRootClientId;
       
 24239       const draggedBlockCount = sourceClientIds.length; // If the block is kept at the same level and moved downwards,
       
 24240       // subtract to take into account that the blocks being dragged
       
 24241       // were removed from the block list above the insertion point.
       
 24242 
       
 24243       const insertIndex = isAtSameLevel && sourceBlockIndex < targetBlockIndex ? targetBlockIndex - draggedBlockCount : targetBlockIndex;
       
 24244       moveBlocksToPosition(sourceClientIds, sourceRootClientId, targetRootClientId, insertIndex);
       
 24245     }
       
 24246   };
       
 24247 }
       
 24248 /**
       
 24249  * A function that returns an event handler function for block-related file drop events.
       
 24250  *
       
 24251  * @param {string}   targetRootClientId    The root client id where the block(s) will be inserted.
       
 24252  * @param {number}   targetBlockIndex      The index where the block(s) will be inserted.
       
 24253  * @param {boolean}  hasUploadPermissions  Whether the user has upload permissions.
       
 24254  * @param {Function} updateBlockAttributes A function that updates a block's attributes.
       
 24255  * @param {Function} canInsertBlockType    A function that returns checks whether a block type can be inserted.
       
 24256  * @param {Function} insertBlocks          A function that inserts blocks.
       
 24257  *
       
 24258  * @return {Function} The event handler for a block-related file drop event.
       
 24259  */
       
 24260 
       
 24261 function onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions, updateBlockAttributes, canInsertBlockType, insertBlocks) {
       
 24262   return files => {
       
 24263     if (!hasUploadPermissions) {
       
 24264       return;
       
 24265     }
       
 24266 
       
 24267     const transformation = Object(external_wp_blocks_["findTransform"])(Object(external_wp_blocks_["getBlockTransforms"])('from'), transform => transform.type === 'files' && canInsertBlockType(transform.blockName, targetRootClientId) && transform.isMatch(files));
       
 24268 
       
 24269     if (transformation) {
       
 24270       const blocks = transformation.transform(files, updateBlockAttributes);
       
 24271       insertBlocks(blocks, targetBlockIndex, targetRootClientId);
       
 24272     }
       
 24273   };
       
 24274 }
       
 24275 /**
       
 24276  * A function that returns an event handler function for block-related HTML drop events.
       
 24277  *
       
 24278  * @param {string}   targetRootClientId The root client id where the block(s) will be inserted.
       
 24279  * @param {number}   targetBlockIndex   The index where the block(s) will be inserted.
       
 24280  * @param {Function} insertBlocks       A function that inserts blocks.
       
 24281  *
       
 24282  * @return {Function} The event handler for a block-related HTML drop event.
       
 24283  */
       
 24284 
       
 24285 function use_on_block_drop_onHTMLDrop(targetRootClientId, targetBlockIndex, insertBlocks) {
       
 24286   return HTML => {
       
 24287     const blocks = Object(external_wp_blocks_["pasteHandler"])({
       
 24288       HTML,
       
 24289       mode: 'BLOCKS'
       
 24290     });
       
 24291 
       
 24292     if (blocks.length) {
       
 24293       insertBlocks(blocks, targetBlockIndex, targetRootClientId);
       
 24294     }
       
 24295   };
       
 24296 }
       
 24297 /**
       
 24298  * A React hook for handling block drop events.
       
 24299  *
       
 24300  * @param {string} targetRootClientId The root client id where the block(s) will be inserted.
       
 24301  * @param {number} targetBlockIndex   The index where the block(s) will be inserted.
       
 24302  *
       
 24303  * @return {Object} An object that contains the event handlers `onDrop`, `onFilesDrop` and `onHTMLDrop`.
       
 24304  */
       
 24305 
       
 24306 function useOnBlockDrop(targetRootClientId, targetBlockIndex) {
       
 24307   const hasUploadPermissions = Object(external_wp_data_["useSelect"])(select => select(store).getSettings().mediaUpload, []);
       
 24308   const {
       
 24309     canInsertBlockType,
       
 24310     getBlockIndex,
       
 24311     getClientIdsOfDescendants
       
 24312   } = Object(external_wp_data_["useSelect"])(store);
       
 24313   const {
       
 24314     insertBlocks,
       
 24315     moveBlocksToPosition,
       
 24316     updateBlockAttributes,
       
 24317     clearSelectedBlock
       
 24318   } = Object(external_wp_data_["useDispatch"])(store);
       
 24319 
       
 24320   const _onDrop = use_on_block_drop_onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants, moveBlocksToPosition, insertBlocks, clearSelectedBlock);
       
 24321 
       
 24322   const _onFilesDrop = onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions, updateBlockAttributes, canInsertBlockType, insertBlocks);
       
 24323 
       
 24324   const _onHTMLDrop = use_on_block_drop_onHTMLDrop(targetRootClientId, targetBlockIndex, insertBlocks);
       
 24325 
       
 24326   return event => {
       
 24327     const files = Object(external_wp_dom_["getFilesFromDataTransfer"])(event.dataTransfer);
       
 24328     const html = event.dataTransfer.getData('text/html');
       
 24329 
       
 24330     if (files.length) {
       
 24331       _onFilesDrop(files);
       
 24332     } else if (html) {
       
 24333       _onHTMLDrop(html);
       
 24334     } else {
       
 24335       _onDrop(event);
       
 24336     }
       
 24337   };
       
 24338 }
       
 24339 
       
 24340 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/math.js
       
 24341 /**
       
 24342  * A string representing the name of an edge.
       
 24343  *
       
 24344  * @typedef {'top'|'right'|'bottom'|'left'} WPEdgeName
       
 24345  */
       
 24346 
       
 24347 /**
       
 24348  * @typedef  {Object} WPPoint
       
 24349  * @property {number} x The horizontal position.
       
 24350  * @property {number} y The vertical position.
       
 24351  */
       
 24352 
       
 24353 /**
       
 24354  * Given a point, a DOMRect and the name of an edge, returns the distance to
       
 24355  * that edge of the rect.
       
 24356  *
       
 24357  * This function works for edges that are horizontal or vertical (e.g. not
       
 24358  * rotated), the following terms are used so that the function works in both
       
 24359  * orientations:
       
 24360  *
       
 24361  * - Forward, meaning the axis running horizontally when an edge is vertical
       
 24362  *   and vertically when an edge is horizontal.
       
 24363  * - Lateral, meaning the axis running vertically when an edge is vertical
       
 24364  *   and horizontally when an edge is horizontal.
       
 24365  *
       
 24366  * @param {WPPoint}    point The point to measure distance from.
       
 24367  * @param {DOMRect}    rect  A DOM Rect containing edge positions.
       
 24368  * @param {WPEdgeName} edge  The edge to measure to.
       
 24369  */
       
 24370 function getDistanceFromPointToEdge(point, rect, edge) {
       
 24371   const isHorizontal = edge === 'top' || edge === 'bottom';
       
 24372   const {
       
 24373     x,
       
 24374     y
       
 24375   } = point;
       
 24376   const pointLateralPosition = isHorizontal ? x : y;
       
 24377   const pointForwardPosition = isHorizontal ? y : x;
       
 24378   const edgeStart = isHorizontal ? rect.left : rect.top;
       
 24379   const edgeEnd = isHorizontal ? rect.right : rect.bottom;
       
 24380   const edgeForwardPosition = rect[edge]; // Measure the straight line distance to the edge of the rect, when the
       
 24381   // point is adjacent to the edge.
       
 24382   // Else, if the point is positioned diagonally to the edge of the rect,
       
 24383   // measure diagonally to the nearest corner that the edge meets.
       
 24384 
       
 24385   let edgeLateralPosition;
       
 24386 
       
 24387   if (pointLateralPosition >= edgeStart && pointLateralPosition <= edgeEnd) {
       
 24388     edgeLateralPosition = pointLateralPosition;
       
 24389   } else if (pointLateralPosition < edgeEnd) {
       
 24390     edgeLateralPosition = edgeStart;
       
 24391   } else {
       
 24392     edgeLateralPosition = edgeEnd;
       
 24393   }
       
 24394 
       
 24395   return Math.sqrt((pointLateralPosition - edgeLateralPosition) ** 2 + (pointForwardPosition - edgeForwardPosition) ** 2);
       
 24396 }
       
 24397 /**
       
 24398  * Given a point, a DOMRect and a list of allowed edges returns the name of and
       
 24399  * distance to the nearest edge.
       
 24400  *
       
 24401  * @param {WPPoint}      point        The point to measure distance from.
       
 24402  * @param {DOMRect}      rect         A DOM Rect containing edge positions.
       
 24403  * @param {WPEdgeName[]} allowedEdges A list of the edges included in the
       
 24404  *                                    calculation. Defaults to all edges.
       
 24405  *
       
 24406  * @return {[number, string]} An array where the first value is the distance
       
 24407  *                              and a second is the edge name.
       
 24408  */
       
 24409 
       
 24410 function getDistanceToNearestEdge(point, rect, allowedEdges = ['top', 'bottom', 'left', 'right']) {
       
 24411   let candidateDistance;
       
 24412   let candidateEdge;
       
 24413   allowedEdges.forEach(edge => {
       
 24414     const distance = getDistanceFromPointToEdge(point, rect, edge);
       
 24415 
       
 24416     if (candidateDistance === undefined || distance < candidateDistance) {
       
 24417       candidateDistance = distance;
       
 24418       candidateEdge = edge;
       
 24419     }
       
 24420   });
       
 24421   return [candidateDistance, candidateEdge];
       
 24422 }
       
 24423 
 24091 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-block-drop-zone/index.js
 24424 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-block-drop-zone/index.js
 24092 
       
 24093 
       
 24094 /**
 24425 /**
 24095  * WordPress dependencies
 24426  * WordPress dependencies
 24096  */
 24427  */
 24097 
 24428 
 24098 
 24429 
 24099 
 24430 
 24100 
 24431 
 24101 /** @typedef {import('@wordpress/element').WPSyntheticEvent} WPSyntheticEvent */
 24432 /**
 24102 
 24433  * Internal dependencies
 24103 /**
 24434  */
 24104  * @typedef  {Object} WPBlockDragPosition
 24435 
 24105  * @property {number} x The horizontal position of a the block being dragged.
 24436 
 24106  * @property {number} y The vertical position of the block being dragged.
 24437 
 24107  */
 24438 
       
 24439 /** @typedef {import('../../utils/math').WPPoint} WPPoint */
 24108 
 24440 
 24109 /**
 24441 /**
 24110  * The orientation of a block list.
 24442  * The orientation of a block list.
 24111  *
 24443  *
 24112  * @typedef {'horizontal'|'vertical'|undefined} WPBlockListOrientation
 24444  * @typedef {'horizontal'|'vertical'|undefined} WPBlockListOrientation
 24114 
 24446 
 24115 /**
 24447 /**
 24116  * Given a list of block DOM elements finds the index that a block should be dropped
 24448  * Given a list of block DOM elements finds the index that a block should be dropped
 24117  * at.
 24449  * at.
 24118  *
 24450  *
 24119  * This function works for both horizontal and vertical block lists and uses the following
       
 24120  * terms for its variables:
       
 24121  *
       
 24122  * - Lateral, meaning the axis running horizontally when a block list is vertical and vertically when a block list is horizontal.
       
 24123  * - Forward, meaning the axis running vertically when a block list is vertical and horizontally
       
 24124  * when a block list is horizontal.
       
 24125  *
       
 24126  *
       
 24127  * @param {Element[]}              elements    Array of DOM elements that represent each block in a block list.
 24451  * @param {Element[]}              elements    Array of DOM elements that represent each block in a block list.
 24128  * @param {WPBlockDragPosition}    position    The position of the item being dragged.
 24452  * @param {WPPoint}                position    The position of the item being dragged.
 24129  * @param {WPBlockListOrientation} orientation The orientation of a block list.
 24453  * @param {WPBlockListOrientation} orientation The orientation of a block list.
 24130  *
 24454  *
 24131  * @return {number|undefined} The block index that's closest to the drag position.
 24455  * @return {number|undefined} The block index that's closest to the drag position.
 24132  */
 24456  */
 24133 
 24457 
 24134 function getNearestBlockIndex(elements, position, orientation) {
 24458 function getNearestBlockIndex(elements, position, orientation) {
 24135   var x = position.x,
 24459   const allowedEdges = orientation === 'horizontal' ? ['left', 'right'] : ['top', 'bottom'];
 24136       y = position.y;
 24460   const isRightToLeft = Object(external_wp_i18n_["isRTL"])();
 24137   var isHorizontal = orientation === 'horizontal';
 24461   let candidateIndex;
 24138   var candidateIndex;
 24462   let candidateDistance;
 24139   var candidateDistance;
 24463   elements.forEach((element, index) => {
 24140   elements.forEach(function (element, index) {
 24464     const rect = element.getBoundingClientRect();
 24141     // Ensure the element is a block. It should have the `wp-block` class.
 24465     const [distance, edge] = getDistanceToNearestEdge(position, rect, allowedEdges);
 24142     if (!element.classList.contains('wp-block')) {
 24466 
 24143       return;
 24467     if (candidateDistance === undefined || distance < candidateDistance) {
 24144     }
 24468       // If the user is dropping to the trailing edge of the block
 24145 
 24469       // add 1 to the index to represent dragging after.
 24146     var rect = element.getBoundingClientRect();
 24470       // Take RTL languages into account where the left edge is
 24147     var cursorLateralPosition = isHorizontal ? y : x;
 24471       // the trailing edge.
 24148     var cursorForwardPosition = isHorizontal ? x : y;
 24472       const isTrailingEdge = edge === 'bottom' || !isRightToLeft && edge === 'right' || isRightToLeft && edge === 'left';
 24149     var edgeLateralStart = isHorizontal ? rect.top : rect.left;
 24473       const offset = isTrailingEdge ? 1 : 0; // Update the currently known best candidate.
 24150     var edgeLateralEnd = isHorizontal ? rect.bottom : rect.right; // When the cursor position is within the lateral bounds of the block,
 24474 
 24151     // measure the straight line distance to the nearest point on the
 24475       candidateDistance = distance;
 24152     // block's edge, else measure diagonal distance to the nearest corner.
 24476       candidateIndex = index + offset;
 24153 
       
 24154     var edgeLateralPosition;
       
 24155 
       
 24156     if (cursorLateralPosition >= edgeLateralStart && cursorLateralPosition <= edgeLateralEnd) {
       
 24157       edgeLateralPosition = cursorLateralPosition;
       
 24158     } else if (cursorLateralPosition < edgeLateralStart) {
       
 24159       edgeLateralPosition = edgeLateralStart;
       
 24160     } else {
       
 24161       edgeLateralPosition = edgeLateralEnd;
       
 24162     }
       
 24163 
       
 24164     var leadingEdgeForwardPosition = isHorizontal ? rect.left : rect.top;
       
 24165     var trailingEdgeForwardPosition = isHorizontal ? rect.right : rect.bottom; // First measure the distance to the leading edge of the block.
       
 24166 
       
 24167     var leadingEdgeDistance = Math.sqrt(Math.pow(cursorLateralPosition - edgeLateralPosition, 2) + Math.pow(cursorForwardPosition - leadingEdgeForwardPosition, 2)); // If no candidate has been assigned yet or this is the nearest
       
 24168     // block edge to the cursor, then assign it as the candidate.
       
 24169 
       
 24170     if (candidateDistance === undefined || Math.abs(leadingEdgeDistance) < candidateDistance) {
       
 24171       candidateDistance = leadingEdgeDistance;
       
 24172       candidateIndex = index;
       
 24173     } // Next measure the distance to the trailing edge of the block.
       
 24174 
       
 24175 
       
 24176     var trailingEdgeDistance = Math.sqrt(Math.pow(cursorLateralPosition - edgeLateralPosition, 2) + Math.pow(cursorForwardPosition - trailingEdgeForwardPosition, 2)); // If no candidate has been assigned yet or this is the nearest
       
 24177     // block edge to the cursor, then assign the next block as the candidate.
       
 24178 
       
 24179     if (Math.abs(trailingEdgeDistance) < candidateDistance) {
       
 24180       candidateDistance = trailingEdgeDistance;
       
 24181       var nextBlockOffset = 1; // If the next block is the one being dragged, skip it and consider
       
 24182       // the block afterwards the drop target. This is needed as the
       
 24183       // block being dragged is set to display: none and won't display
       
 24184       // any drop target styling.
       
 24185 
       
 24186       if (elements[index + 1] && elements[index + 1].classList.contains('is-dragging')) {
       
 24187         nextBlockOffset = 2;
       
 24188       }
       
 24189 
       
 24190       candidateIndex = index + nextBlockOffset;
       
 24191     }
 24477     }
 24192   });
 24478   });
 24193   return candidateIndex;
 24479   return candidateIndex;
 24194 }
 24480 }
 24195 /**
 24481 /**
 24196  * Retrieve the data for a block drop event.
 24482  * @typedef  {Object} WPBlockDropZoneConfig
 24197  *
 24483  * @property {string} rootClientId The root client id for the block list.
 24198  * @param {WPSyntheticEvent} event The drop event.
 24484  */
 24199  *
 24485 
 24200  * @return {Object} An object with block drag and drop data.
 24486 /**
 24201  */
 24487  * A React hook that can be used to make a block list handle drag and drop.
 24202 
 24488  *
 24203 function parseDropEvent(event) {
 24489  * @param {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone.
 24204   var result = {
 24490  */
 24205     srcRootClientId: null,
 24491 
 24206     srcClientIds: null,
 24492 function useBlockDropZone({
 24207     type: null
 24493   // An undefined value represents a top-level block. Default to an empty
       
 24494   // string for this so that `targetRootClientId` can be easily compared to
       
 24495   // values returned by the `getRootBlockClientId` selector, which also uses
       
 24496   // an empty string to represent top-level blocks.
       
 24497   rootClientId: targetRootClientId = ''
       
 24498 } = {}) {
       
 24499   const [targetBlockIndex, setTargetBlockIndex] = Object(external_wp_element_["useState"])(null);
       
 24500   const isLockedAll = Object(external_wp_data_["useSelect"])(select => {
       
 24501     const {
       
 24502       getTemplateLock
       
 24503     } = select(store);
       
 24504     return getTemplateLock(targetRootClientId) === 'all';
       
 24505   }, [targetRootClientId]);
       
 24506   const {
       
 24507     getBlockListSettings
       
 24508   } = Object(external_wp_data_["useSelect"])(store);
       
 24509   const {
       
 24510     showInsertionPoint,
       
 24511     hideInsertionPoint
       
 24512   } = Object(external_wp_data_["useDispatch"])(store);
       
 24513   const onBlockDrop = useOnBlockDrop(targetRootClientId, targetBlockIndex);
       
 24514   const throttled = Object(external_wp_compose_["useThrottle"])(Object(external_wp_element_["useCallback"])((event, currentTarget) => {
       
 24515     var _getBlockListSettings;
       
 24516 
       
 24517     const blockElements = Array.from(currentTarget.children).filter( // Ensure the element is a block. It should have the `wp-block` class.
       
 24518     element => element.classList.contains('wp-block'));
       
 24519     const targetIndex = getNearestBlockIndex(blockElements, {
       
 24520       x: event.clientX,
       
 24521       y: event.clientY
       
 24522     }, (_getBlockListSettings = getBlockListSettings(targetRootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation);
       
 24523     setTargetBlockIndex(targetIndex === undefined ? 0 : targetIndex);
       
 24524 
       
 24525     if (targetIndex !== null) {
       
 24526       showInsertionPoint(targetRootClientId, targetIndex);
       
 24527     }
       
 24528   }, []), 200);
       
 24529   return Object(external_wp_compose_["__experimentalUseDropZone"])({
       
 24530     isDisabled: isLockedAll,
       
 24531     onDrop: onBlockDrop,
       
 24532 
       
 24533     onDragOver(event) {
       
 24534       // `currentTarget` is only available while the event is being
       
 24535       // handled, so get it now and pass it to the thottled function.
       
 24536       // https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget
       
 24537       throttled(event, event.currentTarget);
       
 24538     },
       
 24539 
       
 24540     onDragLeave() {
       
 24541       throttled.cancel();
       
 24542       hideInsertionPoint();
       
 24543       setTargetBlockIndex(null);
       
 24544     },
       
 24545 
       
 24546     onDragEnd() {
       
 24547       throttled.cancel();
       
 24548       hideInsertionPoint();
       
 24549       setTargetBlockIndex(null);
       
 24550     }
       
 24551 
       
 24552   });
       
 24553 }
       
 24554 
       
 24555 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/use-popover-scroll.js
       
 24556 /**
       
 24557  * WordPress dependencies
       
 24558  */
       
 24559 
       
 24560 /**
       
 24561  * Allow scrolling "through" popovers over the canvas. This is only called for
       
 24562  * as long as the pointer is over a popover. Do not use React events because it
       
 24563  * will bubble through portals.
       
 24564  *
       
 24565  * @param {Object} scrollableRef
       
 24566  */
       
 24567 
       
 24568 function usePopoverScroll(scrollableRef) {
       
 24569   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 24570     if (!scrollableRef) {
       
 24571       return;
       
 24572     }
       
 24573 
       
 24574     function onWheel(event) {
       
 24575       const {
       
 24576         deltaX,
       
 24577         deltaY
       
 24578       } = event;
       
 24579       scrollableRef.current.scrollBy(deltaX, deltaY);
       
 24580     }
       
 24581 
       
 24582     node.addEventListener('wheel', onWheel);
       
 24583     return () => {
       
 24584       node.removeEventListener('wheel', onWheel);
       
 24585     };
       
 24586   }, [scrollableRef]);
       
 24587 }
       
 24588 
       
 24589 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/insertion-point.js
       
 24590 
       
 24591 
       
 24592 /**
       
 24593  * External dependencies
       
 24594  */
       
 24595 
       
 24596 /**
       
 24597  * WordPress dependencies
       
 24598  */
       
 24599 
       
 24600 
       
 24601 
       
 24602 
       
 24603 
       
 24604 /**
       
 24605  * Internal dependencies
       
 24606  */
       
 24607 
       
 24608 
       
 24609 
       
 24610 
       
 24611 
       
 24612 const InsertionPointOpenRef = Object(external_wp_element_["createContext"])();
       
 24613 
       
 24614 function InsertionPointPopover({
       
 24615   __unstablePopoverSlot,
       
 24616   __unstableContentRef
       
 24617 }) {
       
 24618   const {
       
 24619     selectBlock
       
 24620   } = Object(external_wp_data_["useDispatch"])(store);
       
 24621   const openRef = Object(external_wp_element_["useContext"])(InsertionPointOpenRef);
       
 24622   const ref = Object(external_wp_element_["useRef"])();
       
 24623   const {
       
 24624     orientation,
       
 24625     previousClientId,
       
 24626     nextClientId,
       
 24627     rootClientId,
       
 24628     isInserterShown
       
 24629   } = Object(external_wp_data_["useSelect"])(select => {
       
 24630     var _getBlockListSettings;
       
 24631 
       
 24632     const {
       
 24633       getBlockOrder,
       
 24634       getBlockListSettings,
       
 24635       getBlockInsertionPoint,
       
 24636       isBlockBeingDragged,
       
 24637       getPreviousBlockClientId,
       
 24638       getNextBlockClientId
       
 24639     } = select(store);
       
 24640     const insertionPoint = getBlockInsertionPoint();
       
 24641     const order = getBlockOrder(insertionPoint.rootClientId);
       
 24642 
       
 24643     if (!order.length) {
       
 24644       return {};
       
 24645     }
       
 24646 
       
 24647     let _previousClientId = order[insertionPoint.index - 1];
       
 24648     let _nextClientId = order[insertionPoint.index];
       
 24649 
       
 24650     while (isBlockBeingDragged(_previousClientId)) {
       
 24651       _previousClientId = getPreviousBlockClientId(_previousClientId);
       
 24652     }
       
 24653 
       
 24654     while (isBlockBeingDragged(_nextClientId)) {
       
 24655       _nextClientId = getNextBlockClientId(_nextClientId);
       
 24656     }
       
 24657 
       
 24658     return {
       
 24659       previousClientId: _previousClientId,
       
 24660       nextClientId: _nextClientId,
       
 24661       orientation: ((_getBlockListSettings = getBlockListSettings(insertionPoint.rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation) || 'vertical',
       
 24662       rootClientId: insertionPoint.rootClientId,
       
 24663       isInserterShown: insertionPoint === null || insertionPoint === void 0 ? void 0 : insertionPoint.__unstableWithInserter
       
 24664     };
       
 24665   }, []);
       
 24666   const previousElement = useBlockElement(previousClientId);
       
 24667   const nextElement = useBlockElement(nextClientId);
       
 24668   const style = Object(external_wp_element_["useMemo"])(() => {
       
 24669     if (!previousElement && !nextElement) {
       
 24670       return {};
       
 24671     }
       
 24672 
       
 24673     const previousRect = previousElement ? previousElement.getBoundingClientRect() : null;
       
 24674     const nextRect = nextElement ? nextElement.getBoundingClientRect() : null;
       
 24675 
       
 24676     if (orientation === 'vertical') {
       
 24677       return {
       
 24678         width: previousElement ? previousElement.offsetWidth : nextElement.offsetWidth,
       
 24679         height: nextRect && previousRect ? nextRect.top - previousRect.bottom : 0
       
 24680       };
       
 24681     }
       
 24682 
       
 24683     let width = 0;
       
 24684 
       
 24685     if (previousRect && nextRect) {
       
 24686       width = Object(external_wp_i18n_["isRTL"])() ? previousRect.left - nextRect.right : nextRect.left - previousRect.right;
       
 24687     }
       
 24688 
       
 24689     return {
       
 24690       width,
       
 24691       height: previousElement ? previousElement.offsetHeight : nextElement.offsetHeight
       
 24692     };
       
 24693   }, [previousElement, nextElement]);
       
 24694   const getAnchorRect = Object(external_wp_element_["useCallback"])(() => {
       
 24695     if (!previousElement && !nextElement) {
       
 24696       return {};
       
 24697     }
       
 24698 
       
 24699     const {
       
 24700       ownerDocument
       
 24701     } = previousElement || nextElement;
       
 24702     const previousRect = previousElement ? previousElement.getBoundingClientRect() : null;
       
 24703     const nextRect = nextElement ? nextElement.getBoundingClientRect() : null;
       
 24704 
       
 24705     if (orientation === 'vertical') {
       
 24706       if (Object(external_wp_i18n_["isRTL"])()) {
       
 24707         return {
       
 24708           top: previousRect ? previousRect.bottom : nextRect.top,
       
 24709           left: previousRect ? previousRect.right : nextRect.right,
       
 24710           right: previousRect ? previousRect.left : nextRect.left,
       
 24711           bottom: nextRect ? nextRect.top : previousRect.bottom,
       
 24712           ownerDocument
       
 24713         };
       
 24714       }
       
 24715 
       
 24716       return {
       
 24717         top: previousRect ? previousRect.bottom : nextRect.top,
       
 24718         left: previousRect ? previousRect.left : nextRect.left,
       
 24719         right: previousRect ? previousRect.right : nextRect.right,
       
 24720         bottom: nextRect ? nextRect.top : previousRect.bottom,
       
 24721         ownerDocument
       
 24722       };
       
 24723     }
       
 24724 
       
 24725     if (Object(external_wp_i18n_["isRTL"])()) {
       
 24726       return {
       
 24727         top: previousRect ? previousRect.top : nextRect.top,
       
 24728         left: previousRect ? previousRect.left : nextRect.right,
       
 24729         right: nextRect ? nextRect.right : previousRect.left,
       
 24730         bottom: previousRect ? previousRect.bottom : nextRect.bottom,
       
 24731         ownerDocument
       
 24732       };
       
 24733     }
       
 24734 
       
 24735     return {
       
 24736       top: previousRect ? previousRect.top : nextRect.top,
       
 24737       left: previousRect ? previousRect.right : nextRect.left,
       
 24738       right: nextRect ? nextRect.left : previousRect.right,
       
 24739       bottom: previousRect ? previousRect.bottom : nextRect.bottom,
       
 24740       ownerDocument
       
 24741     };
       
 24742   }, [previousElement, nextElement]);
       
 24743   const popoverScrollRef = usePopoverScroll(__unstableContentRef);
       
 24744   const className = classnames_default()('block-editor-block-list__insertion-point', 'is-' + orientation);
       
 24745 
       
 24746   function onClick(event) {
       
 24747     if (event.target === ref.current && nextClientId) {
       
 24748       selectBlock(nextClientId, -1);
       
 24749     }
       
 24750   }
       
 24751 
       
 24752   function onFocus(event) {
       
 24753     // Only handle click on the wrapper specifically, and not an event
       
 24754     // bubbled from the inserter itself.
       
 24755     if (event.target !== ref.current) {
       
 24756       openRef.current = true;
       
 24757     }
       
 24758   } // Only show the in-between inserter between blocks, so when there's a
       
 24759   // previous and a next element.
       
 24760 
       
 24761 
       
 24762   const showInsertionPointInserter = previousElement && nextElement && isInserterShown;
       
 24763   /* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
       
 24764   // While ideally it would be enough to capture the
       
 24765   // bubbling focus event from the Inserter, due to the
       
 24766   // characteristics of click focusing of `button`s in
       
 24767   // Firefox and Safari, it is not reliable.
       
 24768   //
       
 24769   // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
       
 24770 
       
 24771   return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
       
 24772     ref: popoverScrollRef,
       
 24773     noArrow: true,
       
 24774     animate: false,
       
 24775     getAnchorRect: getAnchorRect,
       
 24776     focusOnMount: false,
       
 24777     className: "block-editor-block-list__insertion-point-popover" // Render in the old slot if needed for backward compatibility,
       
 24778     // otherwise render in place (not in the the default popover slot).
       
 24779     ,
       
 24780     __unstableSlotName: __unstablePopoverSlot || null
       
 24781   }, Object(external_wp_element_["createElement"])("div", {
       
 24782     ref: ref,
       
 24783     tabIndex: -1,
       
 24784     onClick: onClick,
       
 24785     onFocus: onFocus,
       
 24786     className: classnames_default()(className, {
       
 24787       'is-with-inserter': showInsertionPointInserter
       
 24788     }),
       
 24789     style: style
       
 24790   }, Object(external_wp_element_["createElement"])("div", {
       
 24791     className: "block-editor-block-list__insertion-point-indicator"
       
 24792   }), showInsertionPointInserter && Object(external_wp_element_["createElement"])("div", {
       
 24793     className: classnames_default()('block-editor-block-list__insertion-point-inserter')
       
 24794   }, Object(external_wp_element_["createElement"])(inserter, {
       
 24795     position: "bottom center",
       
 24796     clientId: nextClientId,
       
 24797     rootClientId: rootClientId,
       
 24798     __experimentalIsQuick: true,
       
 24799     onToggle: isOpen => {
       
 24800       openRef.current = isOpen;
       
 24801     },
       
 24802     onSelectOrClose: () => {
       
 24803       openRef.current = false;
       
 24804     }
       
 24805   }))));
       
 24806   /* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
       
 24807 }
       
 24808 
       
 24809 function InsertionPoint({
       
 24810   children,
       
 24811   __unstablePopoverSlot,
       
 24812   __unstableContentRef
       
 24813 }) {
       
 24814   const isVisible = Object(external_wp_data_["useSelect"])(select => {
       
 24815     return select(store).isBlockInsertionPointVisible();
       
 24816   }, []);
       
 24817   return Object(external_wp_element_["createElement"])(InsertionPointOpenRef.Provider, {
       
 24818     value: Object(external_wp_element_["useRef"])(false)
       
 24819   }, isVisible && Object(external_wp_element_["createElement"])(InsertionPointPopover, {
       
 24820     __unstablePopoverSlot: __unstablePopoverSlot,
       
 24821     __unstableContentRef: __unstableContentRef
       
 24822   }), children);
       
 24823 }
       
 24824 
       
 24825 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-in-between-inserter.js
       
 24826 /**
       
 24827  * WordPress dependencies
       
 24828  */
       
 24829 
       
 24830 
       
 24831 
       
 24832 /**
       
 24833  * Internal dependencies
       
 24834  */
       
 24835 
       
 24836 
       
 24837 
       
 24838 function useInBetweenInserter() {
       
 24839   const openRef = Object(external_wp_element_["useContext"])(InsertionPointOpenRef);
       
 24840   const hasReducedUI = Object(external_wp_data_["useSelect"])(select => select(store).getSettings().hasReducedUI, []);
       
 24841   const {
       
 24842     getBlockListSettings,
       
 24843     getBlockRootClientId,
       
 24844     getBlockIndex,
       
 24845     isBlockInsertionPointVisible,
       
 24846     isMultiSelecting,
       
 24847     getSelectedBlockClientIds,
       
 24848     getTemplateLock
       
 24849   } = Object(external_wp_data_["useSelect"])(store);
       
 24850   const {
       
 24851     showInsertionPoint,
       
 24852     hideInsertionPoint
       
 24853   } = Object(external_wp_data_["useDispatch"])(store);
       
 24854   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 24855     if (hasReducedUI) {
       
 24856       return;
       
 24857     }
       
 24858 
       
 24859     function onMouseMove(event) {
       
 24860       var _getBlockListSettings;
       
 24861 
       
 24862       if (openRef.current) {
       
 24863         return;
       
 24864       }
       
 24865 
       
 24866       if (isMultiSelecting()) {
       
 24867         return;
       
 24868       }
       
 24869 
       
 24870       if (!event.target.classList.contains('block-editor-block-list__layout')) {
       
 24871         if (isBlockInsertionPointVisible()) {
       
 24872           hideInsertionPoint();
       
 24873         }
       
 24874 
       
 24875         return;
       
 24876       }
       
 24877 
       
 24878       let rootClientId;
       
 24879 
       
 24880       if (!event.target.classList.contains('is-root-container')) {
       
 24881         const blockElement = !!event.target.getAttribute('data-block') ? event.target : event.target.closest('[data-block]');
       
 24882         rootClientId = blockElement.getAttribute('data-block');
       
 24883       } // Don't set the insertion point if the template is locked.
       
 24884 
       
 24885 
       
 24886       if (getTemplateLock(rootClientId)) {
       
 24887         return;
       
 24888       }
       
 24889 
       
 24890       const orientation = ((_getBlockListSettings = getBlockListSettings(rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation) || 'vertical';
       
 24891       const rect = event.target.getBoundingClientRect();
       
 24892       const offsetTop = event.clientY - rect.top;
       
 24893       const offsetLeft = event.clientX - rect.left;
       
 24894       const children = Array.from(event.target.children);
       
 24895       let element = children.find(blockEl => {
       
 24896         return blockEl.classList.contains('wp-block') && orientation === 'vertical' && blockEl.offsetTop > offsetTop || blockEl.classList.contains('wp-block') && orientation === 'horizontal' && blockEl.offsetLeft > offsetLeft;
       
 24897       });
       
 24898 
       
 24899       if (!element) {
       
 24900         return;
       
 24901       } // The block may be in an alignment wrapper, so check the first direct
       
 24902       // child if the element has no ID.
       
 24903 
       
 24904 
       
 24905       if (!element.id) {
       
 24906         element = element.firstElementChild;
       
 24907 
       
 24908         if (!element) {
       
 24909           return;
       
 24910         }
       
 24911       }
       
 24912 
       
 24913       const clientId = element.id.slice('block-'.length);
       
 24914 
       
 24915       if (!clientId) {
       
 24916         return;
       
 24917       } // Don't show the inserter when hovering above (conflicts with
       
 24918       // block toolbar) or inside selected block(s).
       
 24919 
       
 24920 
       
 24921       if (getSelectedBlockClientIds().includes(clientId)) {
       
 24922         return;
       
 24923       }
       
 24924 
       
 24925       const elementRect = element.getBoundingClientRect();
       
 24926 
       
 24927       if (orientation === 'horizontal' && (event.clientY > elementRect.bottom || event.clientY < elementRect.top) || orientation === 'vertical' && (event.clientX > elementRect.right || event.clientX < elementRect.left)) {
       
 24928         if (isBlockInsertionPointVisible()) {
       
 24929           hideInsertionPoint();
       
 24930         }
       
 24931 
       
 24932         return;
       
 24933       }
       
 24934 
       
 24935       const index = getBlockIndex(clientId, rootClientId); // Don't show the in-between inserter before the first block in
       
 24936       // the list (preserves the original behaviour).
       
 24937 
       
 24938       if (index === 0) {
       
 24939         if (isBlockInsertionPointVisible()) {
       
 24940           hideInsertionPoint();
       
 24941         }
       
 24942 
       
 24943         return;
       
 24944       }
       
 24945 
       
 24946       showInsertionPoint(rootClientId, index, {
       
 24947         __unstableWithInserter: true
       
 24948       });
       
 24949     }
       
 24950 
       
 24951     node.addEventListener('mousemove', onMouseMove);
       
 24952     return () => {
       
 24953       node.removeEventListener('mousemove', onMouseMove);
       
 24954     };
       
 24955   }, [openRef, getBlockListSettings, getBlockRootClientId, getBlockIndex, isBlockInsertionPointVisible, isMultiSelecting, showInsertionPoint, hideInsertionPoint, getSelectedBlockClientIds]);
       
 24956 }
       
 24957 
       
 24958 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/pre-parse-patterns.js
       
 24959 /**
       
 24960  * WordPress dependencies
       
 24961  */
       
 24962 
       
 24963 
       
 24964 /**
       
 24965  * Internal dependencies
       
 24966  */
       
 24967 
       
 24968 
       
 24969 
       
 24970 const pre_parse_patterns_requestIdleCallback = (() => {
       
 24971   if (typeof window === 'undefined') {
       
 24972     return callback => {
       
 24973       setTimeout(() => callback(Date.now()), 0);
       
 24974     };
       
 24975   }
       
 24976 
       
 24977   return window.requestIdleCallback || window.requestAnimationFrame;
       
 24978 })();
       
 24979 
       
 24980 const cancelIdleCallback = (() => {
       
 24981   if (typeof window === 'undefined') {
       
 24982     return clearTimeout;
       
 24983   }
       
 24984 
       
 24985   return window.cancelIdleCallback || window.cancelAnimationFrame;
       
 24986 })();
       
 24987 
       
 24988 function usePreParsePatterns() {
       
 24989   const patterns = Object(external_wp_data_["useSelect"])(_select => _select(store).getSettings().__experimentalBlockPatterns, []);
       
 24990   Object(external_wp_element_["useEffect"])(() => {
       
 24991     if (!(patterns !== null && patterns !== void 0 && patterns.length)) {
       
 24992       return;
       
 24993     }
       
 24994 
       
 24995     let handle;
       
 24996     let index = -1;
       
 24997 
       
 24998     const callback = () => {
       
 24999       index++;
       
 25000 
       
 25001       if (index >= patterns.length) {
       
 25002         return;
       
 25003       }
       
 25004 
       
 25005       Object(external_wp_data_["select"])(store).__experimentalGetParsedPattern(patterns[index].name);
       
 25006 
       
 25007       handle = pre_parse_patterns_requestIdleCallback(callback);
       
 25008     };
       
 25009 
       
 25010     handle = pre_parse_patterns_requestIdleCallback(callback);
       
 25011     return () => cancelIdleCallback(handle);
       
 25012   }, [patterns]);
       
 25013   return null;
       
 25014 }
       
 25015 
       
 25016 // EXTERNAL MODULE: external ["wp","keyboardShortcuts"]
       
 25017 var external_wp_keyboardShortcuts_ = __webpack_require__("hF7m");
       
 25018 
       
 25019 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-draggable/use-scroll-when-dragging.js
       
 25020 /**
       
 25021  * WordPress dependencies
       
 25022  */
       
 25023 
       
 25024 
       
 25025 const SCROLL_INACTIVE_DISTANCE_PX = 50;
       
 25026 const SCROLL_INTERVAL_MS = 25;
       
 25027 const PIXELS_PER_SECOND_PER_PERCENTAGE = 1000;
       
 25028 const VELOCITY_MULTIPLIER = PIXELS_PER_SECOND_PER_PERCENTAGE * (SCROLL_INTERVAL_MS / 1000);
       
 25029 /**
       
 25030  * React hook that scrolls the scroll container when a block is being dragged.
       
 25031  *
       
 25032  * @return {Function[]} `startScrolling`, `scrollOnDragOver`, `stopScrolling`
       
 25033  *                      functions to be called in `onDragStart`, `onDragOver`
       
 25034  *                      and `onDragEnd` events respectively.
       
 25035  */
       
 25036 
       
 25037 function useScrollWhenDragging() {
       
 25038   const dragStartY = Object(external_wp_element_["useRef"])(null);
       
 25039   const velocityY = Object(external_wp_element_["useRef"])(null);
       
 25040   const scrollParentY = Object(external_wp_element_["useRef"])(null);
       
 25041   const scrollEditorInterval = Object(external_wp_element_["useRef"])(null); // Clear interval when unmounting.
       
 25042 
       
 25043   Object(external_wp_element_["useEffect"])(() => () => {
       
 25044     if (scrollEditorInterval.current) {
       
 25045       clearInterval(scrollEditorInterval.current);
       
 25046       scrollEditorInterval.current = null;
       
 25047     }
       
 25048   }, []);
       
 25049   const startScrolling = Object(external_wp_element_["useCallback"])(event => {
       
 25050     dragStartY.current = event.clientY; // Find nearest parent(s) to scroll.
       
 25051 
       
 25052     scrollParentY.current = Object(external_wp_dom_["getScrollContainer"])(event.target);
       
 25053     scrollEditorInterval.current = setInterval(() => {
       
 25054       if (scrollParentY.current && velocityY.current) {
       
 25055         const newTop = scrollParentY.current.scrollTop + velocityY.current; // Setting `behavior: 'smooth'` as a scroll property seems to hurt performance.
       
 25056         // Better to use a small scroll interval.
       
 25057 
       
 25058         scrollParentY.current.scroll({
       
 25059           top: newTop
       
 25060         });
       
 25061       }
       
 25062     }, SCROLL_INTERVAL_MS);
       
 25063   }, []);
       
 25064   const scrollOnDragOver = Object(external_wp_element_["useCallback"])(event => {
       
 25065     if (!scrollParentY.current) {
       
 25066       return;
       
 25067     }
       
 25068 
       
 25069     const scrollParentHeight = scrollParentY.current.offsetHeight;
       
 25070     const offsetDragStartPosition = dragStartY.current - scrollParentY.current.offsetTop;
       
 25071     const offsetDragPosition = event.clientY - scrollParentY.current.offsetTop;
       
 25072 
       
 25073     if (event.clientY > offsetDragStartPosition) {
       
 25074       // User is dragging downwards.
       
 25075       const moveableDistance = Math.max(scrollParentHeight - offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
       
 25076       const dragDistance = Math.max(offsetDragPosition - offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
       
 25077       const distancePercentage = dragDistance / moveableDistance;
       
 25078       velocityY.current = VELOCITY_MULTIPLIER * distancePercentage;
       
 25079     } else if (event.clientY < offsetDragStartPosition) {
       
 25080       // User is dragging upwards.
       
 25081       const moveableDistance = Math.max(offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
       
 25082       const dragDistance = Math.max(offsetDragStartPosition - offsetDragPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
       
 25083       const distancePercentage = dragDistance / moveableDistance;
       
 25084       velocityY.current = -VELOCITY_MULTIPLIER * distancePercentage;
       
 25085     } else {
       
 25086       velocityY.current = 0;
       
 25087     }
       
 25088   }, []);
       
 25089 
       
 25090   const stopScrolling = () => {
       
 25091     dragStartY.current = null;
       
 25092     scrollParentY.current = null;
       
 25093 
       
 25094     if (scrollEditorInterval.current) {
       
 25095       clearInterval(scrollEditorInterval.current);
       
 25096       scrollEditorInterval.current = null;
       
 25097     }
 24208   };
 25098   };
 24209 
 25099 
 24210   if (!event.dataTransfer) {
 25100   return [startScrolling, scrollOnDragOver, stopScrolling];
 24211     return result;
 25101 }
 24212   }
 25102 
 24213 
 25103 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-draggable/index.js
 24214   try {
 25104 
 24215     result = Object.assign(result, JSON.parse(event.dataTransfer.getData('text')));
 25105 
 24216   } catch (err) {
 25106 /**
 24217     return result;
 25107  * WordPress dependencies
 24218   }
 25108  */
 24219 
 25109 
 24220   return result;
 25110 
 24221 }
 25111 
 24222 /**
 25112 
 24223  * @typedef  {Object} WPBlockDropZoneConfig
 25113 /**
 24224  * @property {Object} element      A React ref object pointing to the block list's DOM element.
 25114  * Internal dependencies
 24225  * @property {string} rootClientId The root client id for the block list.
 25115  */
 24226  */
 25116 
 24227 
 25117 
 24228 /**
 25118 
 24229  * A React hook that can be used to make a block list handle drag and drop.
 25119 
 24230  *
 25120 
 24231  * @param {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone.
 25121 const BlockDraggable = ({
 24232  *
 25122   children,
 24233  * @return {number|undefined} The block index that's closest to the drag position.
 25123   clientIds,
 24234  */
 25124   cloneClassname,
 24235 
 25125   onDragStart,
 24236 
 25126   onDragEnd,
 24237 function useBlockDropZone(_ref) {
 25127   elementId
 24238   var element = _ref.element,
 25128 }) => {
 24239       targetRootClientId = _ref.rootClientId;
 25129   const {
 24240 
 25130     srcRootClientId,
 24241   var _useState = Object(external_this_wp_element_["useState"])(null),
 25131     isDraggable,
 24242       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 25132     icon
 24243       targetBlockIndex = _useState2[0],
 25133   } = Object(external_wp_data_["useSelect"])(select => {
 24244       setTargetBlockIndex = _useState2[1];
 25134     var _getBlockType;
 24245 
 25135 
 24246   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 25136     const {
 24247     var _getBlockListSettings;
 25137       getBlockRootClientId,
 24248 
 25138       getTemplateLock,
 24249     var _select = select('core/block-editor'),
 25139       getBlockName
 24250         getBlockListSettings = _select.getBlockListSettings,
 25140     } = select(store);
 24251         _getClientIdsOfDescendants = _select.getClientIdsOfDescendants,
 25141     const rootClientId = getBlockRootClientId(clientIds[0]);
 24252         _getBlockIndex = _select.getBlockIndex,
 25142     const templateLock = rootClientId ? getTemplateLock(rootClientId) : null;
 24253         getSettings = _select.getSettings,
 25143     const blockName = getBlockName(clientIds[0]);
 24254         getTemplateLock = _select.getTemplateLock;
       
 24255 
       
 24256     return {
 25144     return {
 24257       orientation: (_getBlockListSettings = getBlockListSettings(targetRootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation,
 25145       srcRootClientId: rootClientId,
 24258       getClientIdsOfDescendants: _getClientIdsOfDescendants,
 25146       isDraggable: 'all' !== templateLock,
 24259       getBlockIndex: _getBlockIndex,
 25147       icon: (_getBlockType = Object(external_wp_blocks_["getBlockType"])(blockName)) === null || _getBlockType === void 0 ? void 0 : _getBlockType.icon
 24260       hasUploadPermissions: !!getSettings().mediaUpload,
       
 24261       isLockedAll: getTemplateLock(targetRootClientId) === 'all'
       
 24262     };
 25148     };
 24263   }, [targetRootClientId]),
 25149   }, [clientIds]);
 24264       getClientIdsOfDescendants = _useSelect.getClientIdsOfDescendants,
 25150   const isDragging = Object(external_wp_element_["useRef"])(false);
 24265       getBlockIndex = _useSelect.getBlockIndex,
 25151   const [startScrolling, scrollOnDragOver, stopScrolling] = useScrollWhenDragging();
 24266       hasUploadPermissions = _useSelect.hasUploadPermissions,
 25152   const {
 24267       isLockedAll = _useSelect.isLockedAll,
 25153     startDraggingBlocks,
 24268       orientation = _useSelect.orientation;
 25154     stopDraggingBlocks
 24269 
 25155   } = Object(external_wp_data_["useDispatch"])(store); // Stop dragging blocks if the block draggable is unmounted
 24270   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 25156 
 24271       insertBlocks = _useDispatch.insertBlocks,
 25157   Object(external_wp_element_["useEffect"])(() => {
 24272       updateBlockAttributes = _useDispatch.updateBlockAttributes,
 25158     return () => {
 24273       moveBlocksToPosition = _useDispatch.moveBlocksToPosition;
 25159       if (isDragging.current) {
 24274 
 25160         stopDraggingBlocks();
 24275   var onFilesDrop = Object(external_this_wp_element_["useCallback"])(function (files) {
 25161       }
 24276     if (!hasUploadPermissions) {
 25162     };
 24277       return;
 25163   }, []);
 24278     }
 25164 
 24279 
 25165   if (!isDraggable) {
 24280     var transformation = Object(external_this_wp_blocks_["findTransform"])(Object(external_this_wp_blocks_["getBlockTransforms"])('from'), function (transform) {
 25166     return children({
 24281       return transform.type === 'files' && transform.isMatch(files);
 25167       isDraggable: false
 24282     });
 25168     });
 24283 
 25169   }
 24284     if (transformation) {
 25170 
 24285       var blocks = transformation.transform(files, updateBlockAttributes);
 25171   const transferData = {
 24286       insertBlocks(blocks, targetBlockIndex, targetRootClientId);
 25172     type: 'block',
 24287     }
 25173     srcClientIds: clientIds,
 24288   }, [hasUploadPermissions, updateBlockAttributes, insertBlocks, targetBlockIndex, targetRootClientId]);
 25174     srcRootClientId
 24289   var onHTMLDrop = Object(external_this_wp_element_["useCallback"])(function (HTML) {
 25175   };
 24290     var blocks = Object(external_this_wp_blocks_["pasteHandler"])({
 25176   return Object(external_wp_element_["createElement"])(external_wp_components_["Draggable"], {
 24291       HTML: HTML,
 25177     cloneClassname: cloneClassname,
 24292       mode: 'BLOCKS'
 25178     elementId: elementId,
 24293     });
 25179     __experimentalTransferDataType: "wp-blocks",
 24294 
 25180     transferData: transferData,
 24295     if (blocks.length) {
 25181     onDragStart: event => {
 24296       insertBlocks(blocks, targetBlockIndex, targetRootClientId);
 25182       startDraggingBlocks(clientIds);
 24297     }
 25183       isDragging.current = true;
 24298   }, [insertBlocks, targetBlockIndex, targetRootClientId]);
 25184       startScrolling(event);
 24299   var onDrop = Object(external_this_wp_element_["useCallback"])(function (event) {
 25185 
 24300     var _parseDropEvent = parseDropEvent(event),
 25186       if (onDragStart) {
 24301         sourceRootClientId = _parseDropEvent.srcRootClientId,
 25187         onDragStart();
 24302         sourceClientIds = _parseDropEvent.srcClientIds,
       
 24303         dropType = _parseDropEvent.type; // If the user isn't dropping a block, return early.
       
 24304 
       
 24305 
       
 24306     if (dropType !== 'block') {
       
 24307       return;
       
 24308     }
       
 24309 
       
 24310     var sourceBlockIndex = getBlockIndex(sourceClientIds[0], sourceRootClientId); // If the user is dropping to the same position, return early.
       
 24311 
       
 24312     if (sourceRootClientId === targetRootClientId && sourceBlockIndex === targetBlockIndex) {
       
 24313       return;
       
 24314     } // If the user is attempting to drop a block within its own
       
 24315     // nested blocks, return early as this would create infinite
       
 24316     // recursion.
       
 24317 
       
 24318 
       
 24319     if (sourceClientIds.includes(targetRootClientId) || getClientIdsOfDescendants(sourceClientIds).some(function (id) {
       
 24320       return id === targetRootClientId;
       
 24321     })) {
       
 24322       return;
       
 24323     }
       
 24324 
       
 24325     var isAtSameLevel = sourceRootClientId === targetRootClientId || sourceRootClientId === '' && targetRootClientId === undefined;
       
 24326     var draggedBlockCount = sourceClientIds.length; // If the block is kept at the same level and moved downwards,
       
 24327     // subtract to take into account that the blocks being dragged
       
 24328     // were removed from the block list.
       
 24329 
       
 24330     var insertIndex = isAtSameLevel && sourceBlockIndex < targetBlockIndex ? targetBlockIndex - draggedBlockCount : targetBlockIndex;
       
 24331     moveBlocksToPosition(sourceClientIds, sourceRootClientId, targetRootClientId, insertIndex);
       
 24332   }, [getClientIdsOfDescendants, getBlockIndex, targetBlockIndex, moveBlocksToPosition, targetRootClientId]);
       
 24333 
       
 24334   var _useDropZone = Object(external_this_wp_components_["__unstableUseDropZone"])({
       
 24335     element: element,
       
 24336     onFilesDrop: onFilesDrop,
       
 24337     onHTMLDrop: onHTMLDrop,
       
 24338     onDrop: onDrop,
       
 24339     isDisabled: isLockedAll,
       
 24340     withPosition: true
       
 24341   }),
       
 24342       position = _useDropZone.position;
       
 24343 
       
 24344   Object(external_this_wp_element_["useEffect"])(function () {
       
 24345     if (position) {
       
 24346       var blockElements = Array.from(element.current.children);
       
 24347       var targetIndex = getNearestBlockIndex(blockElements, position, orientation);
       
 24348       setTargetBlockIndex(targetIndex === undefined ? 0 : targetIndex);
       
 24349     }
       
 24350   }, [position]);
       
 24351 
       
 24352   if (position) {
       
 24353     return targetBlockIndex;
       
 24354   }
       
 24355 }
       
 24356 
       
 24357 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/index.js
       
 24358 
       
 24359 
       
 24360 
       
 24361 /**
       
 24362  * External dependencies
       
 24363  */
       
 24364 
       
 24365 /**
       
 24366  * WordPress dependencies
       
 24367  */
       
 24368 
       
 24369 
       
 24370 
       
 24371 /**
       
 24372  * Internal dependencies
       
 24373  */
       
 24374 
       
 24375 
       
 24376 
       
 24377 
       
 24378 
       
 24379 /**
       
 24380  * If the block count exceeds the threshold, we disable the reordering animation
       
 24381  * to avoid laginess.
       
 24382  */
       
 24383 
       
 24384 var BLOCK_ANIMATION_THRESHOLD = 200;
       
 24385 
       
 24386 function BlockList(_ref, ref) {
       
 24387   var className = _ref.className,
       
 24388       rootClientId = _ref.rootClientId,
       
 24389       renderAppender = _ref.renderAppender,
       
 24390       _ref$__experimentalTa = _ref.__experimentalTagName,
       
 24391       __experimentalTagName = _ref$__experimentalTa === void 0 ? 'div' : _ref$__experimentalTa,
       
 24392       __experimentalAppenderTagName = _ref.__experimentalAppenderTagName,
       
 24393       _ref$__experimentalPa = _ref.__experimentalPassedProps,
       
 24394       __experimentalPassedProps = _ref$__experimentalPa === void 0 ? {} : _ref$__experimentalPa;
       
 24395 
       
 24396   function selector(select) {
       
 24397     var _getBlockListSettings;
       
 24398 
       
 24399     var _select = select('core/block-editor'),
       
 24400         getBlockOrder = _select.getBlockOrder,
       
 24401         getBlockListSettings = _select.getBlockListSettings,
       
 24402         getSelectedBlockClientId = _select.getSelectedBlockClientId,
       
 24403         getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds,
       
 24404         hasMultiSelection = _select.hasMultiSelection,
       
 24405         getGlobalBlockCount = _select.getGlobalBlockCount,
       
 24406         isTyping = _select.isTyping;
       
 24407 
       
 24408     return {
       
 24409       blockClientIds: getBlockOrder(rootClientId),
       
 24410       selectedBlockClientId: getSelectedBlockClientId(),
       
 24411       multiSelectedBlockClientIds: getMultiSelectedBlockClientIds(),
       
 24412       orientation: (_getBlockListSettings = getBlockListSettings(rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation,
       
 24413       hasMultiSelection: hasMultiSelection(),
       
 24414       enableAnimation: !isTyping() && getGlobalBlockCount() <= BLOCK_ANIMATION_THRESHOLD
       
 24415     };
       
 24416   }
       
 24417 
       
 24418   var _useSelect = Object(external_this_wp_data_["useSelect"])(selector, [rootClientId]),
       
 24419       blockClientIds = _useSelect.blockClientIds,
       
 24420       selectedBlockClientId = _useSelect.selectedBlockClientId,
       
 24421       multiSelectedBlockClientIds = _useSelect.multiSelectedBlockClientIds,
       
 24422       orientation = _useSelect.orientation,
       
 24423       hasMultiSelection = _useSelect.hasMultiSelection,
       
 24424       enableAnimation = _useSelect.enableAnimation;
       
 24425 
       
 24426   var Container = rootClientId ? __experimentalTagName : root_container;
       
 24427   var dropTargetIndex = useBlockDropZone({
       
 24428     element: ref,
       
 24429     rootClientId: rootClientId
       
 24430   });
       
 24431   var isAppenderDropTarget = dropTargetIndex === blockClientIds.length;
       
 24432   return Object(external_this_wp_element_["createElement"])(Container, Object(esm_extends["a" /* default */])({}, __experimentalPassedProps, {
       
 24433     ref: ref,
       
 24434     className: classnames_default()('block-editor-block-list__layout', className, __experimentalPassedProps.className)
       
 24435   }), blockClientIds.map(function (clientId, index) {
       
 24436     var isBlockInSelection = hasMultiSelection ? multiSelectedBlockClientIds.includes(clientId) : selectedBlockClientId === clientId;
       
 24437     var isDropTarget = dropTargetIndex === index;
       
 24438     return Object(external_this_wp_element_["createElement"])(external_this_wp_data_["AsyncModeProvider"], {
       
 24439       key: clientId,
       
 24440       value: !isBlockInSelection
       
 24441     }, Object(external_this_wp_element_["createElement"])(block_list_block, {
       
 24442       rootClientId: rootClientId,
       
 24443       clientId: clientId // This prop is explicitely computed and passed down
       
 24444       // to avoid being impacted by the async mode
       
 24445       // otherwise there might be a small delay to trigger the animation.
       
 24446       ,
       
 24447       index: index,
       
 24448       enableAnimation: enableAnimation,
       
 24449       className: classnames_default()({
       
 24450         'is-drop-target': isDropTarget,
       
 24451         'is-dropping-horizontally': isDropTarget && orientation === 'horizontal'
       
 24452       })
       
 24453     }));
       
 24454   }), Object(external_this_wp_element_["createElement"])(block_list_appender, {
       
 24455     tagName: __experimentalAppenderTagName,
       
 24456     rootClientId: rootClientId,
       
 24457     renderAppender: renderAppender,
       
 24458     className: classnames_default()({
       
 24459       'is-drop-target': isAppenderDropTarget,
       
 24460       'is-dropping-horizontally': isAppenderDropTarget && orientation === 'horizontal'
       
 24461     })
       
 24462   }));
       
 24463 }
       
 24464 
       
 24465 var ForwardedBlockList = Object(external_this_wp_element_["forwardRef"])(BlockList); // This component needs to always be synchronous
       
 24466 // as it's the one changing the async mode
       
 24467 // depending on the block selection.
       
 24468 
       
 24469 /* harmony default export */ var block_list = (Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
       
 24470   var fallbackRef = Object(external_this_wp_element_["useRef"])();
       
 24471   return Object(external_this_wp_element_["createElement"])(external_this_wp_data_["AsyncModeProvider"], {
       
 24472     value: false
       
 24473   }, Object(external_this_wp_element_["createElement"])(ForwardedBlockList, Object(esm_extends["a" /* default */])({
       
 24474     ref: ref || fallbackRef
       
 24475   }, props)));
       
 24476 }));
       
 24477 
       
 24478 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-preview/live.js
       
 24479 
       
 24480 
       
 24481 /**
       
 24482  * WordPress dependencies
       
 24483  */
       
 24484 
       
 24485 /**
       
 24486  * Internal dependencies
       
 24487  */
       
 24488 
       
 24489 
       
 24490 function LiveBlockPreview(_ref) {
       
 24491   var onClick = _ref.onClick;
       
 24492   return Object(external_this_wp_element_["createElement"])("div", {
       
 24493     tabIndex: 0,
       
 24494     role: "button",
       
 24495     onClick: onClick,
       
 24496     onKeyPress: onClick
       
 24497   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Disabled"], null, Object(external_this_wp_element_["createElement"])(block_list, null)));
       
 24498 }
       
 24499 
       
 24500 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-preview/auto.js
       
 24501 
       
 24502 
       
 24503 
       
 24504 /**
       
 24505  * WordPress dependencies
       
 24506  */
       
 24507 
       
 24508 
       
 24509 /**
       
 24510  * Internal dependencies
       
 24511  */
       
 24512 
       
 24513  // This is used to avoid rendering the block list if the sizes change.
       
 24514 
       
 24515 var MemoizedBlockList;
       
 24516 
       
 24517 function AutoBlockPreview(_ref) {
       
 24518   var viewportWidth = _ref.viewportWidth,
       
 24519       __experimentalPadding = _ref.__experimentalPadding;
       
 24520 
       
 24521   var _useResizeObserver = Object(external_this_wp_compose_["useResizeObserver"])(),
       
 24522       _useResizeObserver2 = Object(slicedToArray["a" /* default */])(_useResizeObserver, 2),
       
 24523       containerResizeListener = _useResizeObserver2[0],
       
 24524       containerWidth = _useResizeObserver2[1].width;
       
 24525 
       
 24526   var _useResizeObserver3 = Object(external_this_wp_compose_["useResizeObserver"])(),
       
 24527       _useResizeObserver4 = Object(slicedToArray["a" /* default */])(_useResizeObserver3, 2),
       
 24528       containtResizeListener = _useResizeObserver4[0],
       
 24529       contentHeight = _useResizeObserver4[1].height; // Initialize on render instead of module top level, to avoid circular dependency issues.
       
 24530 
       
 24531 
       
 24532   MemoizedBlockList = MemoizedBlockList || Object(external_this_wp_compose_["pure"])(block_list);
       
 24533   var scale = (containerWidth - 2 * __experimentalPadding) / viewportWidth;
       
 24534   return Object(external_this_wp_element_["createElement"])("div", {
       
 24535     className: "block-editor-block-preview__container editor-styles-wrapper",
       
 24536     "aria-hidden": true,
       
 24537     style: {
       
 24538       height: contentHeight * scale + 2 * __experimentalPadding
       
 24539     }
       
 24540   }, containerResizeListener, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Disabled"], {
       
 24541     style: {
       
 24542       transform: "scale(".concat(scale, ")"),
       
 24543       width: viewportWidth,
       
 24544       left: __experimentalPadding,
       
 24545       right: __experimentalPadding,
       
 24546       top: __experimentalPadding
       
 24547     },
       
 24548     className: "block-editor-block-preview__content"
       
 24549   }, containtResizeListener, Object(external_this_wp_element_["createElement"])(MemoizedBlockList, null)));
       
 24550 }
       
 24551 
       
 24552 /* harmony default export */ var auto = (AutoBlockPreview);
       
 24553 
       
 24554 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-preview/index.js
       
 24555 
       
 24556 
       
 24557 /**
       
 24558  * External dependencies
       
 24559  */
       
 24560 
       
 24561 /**
       
 24562  * WordPress dependencies
       
 24563  */
       
 24564 
       
 24565 
       
 24566 
       
 24567 /**
       
 24568  * Internal dependencies
       
 24569  */
       
 24570 
       
 24571 
       
 24572 
       
 24573 
       
 24574 function BlockPreview(_ref) {
       
 24575   var blocks = _ref.blocks,
       
 24576       _ref$__experimentalPa = _ref.__experimentalPadding,
       
 24577       __experimentalPadding = _ref$__experimentalPa === void 0 ? 0 : _ref$__experimentalPa,
       
 24578       _ref$viewportWidth = _ref.viewportWidth,
       
 24579       viewportWidth = _ref$viewportWidth === void 0 ? 700 : _ref$viewportWidth,
       
 24580       _ref$__experimentalLi = _ref.__experimentalLive,
       
 24581       __experimentalLive = _ref$__experimentalLi === void 0 ? false : _ref$__experimentalLi,
       
 24582       __experimentalOnClick = _ref.__experimentalOnClick;
       
 24583 
       
 24584   var settings = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 24585     return select('core/block-editor').getSettings();
       
 24586   }, []);
       
 24587   var renderedBlocks = Object(external_this_wp_element_["useMemo"])(function () {
       
 24588     return Object(external_this_lodash_["castArray"])(blocks);
       
 24589   }, [blocks]);
       
 24590 
       
 24591   if (!blocks || blocks.length === 0) {
       
 24592     return null;
       
 24593   }
       
 24594 
       
 24595   return Object(external_this_wp_element_["createElement"])(provider, {
       
 24596     value: renderedBlocks,
       
 24597     settings: settings
       
 24598   }, __experimentalLive ? Object(external_this_wp_element_["createElement"])(LiveBlockPreview, {
       
 24599     onClick: __experimentalOnClick
       
 24600   }) : Object(external_this_wp_element_["createElement"])(auto, {
       
 24601     viewportWidth: viewportWidth,
       
 24602     __experimentalPadding: __experimentalPadding
       
 24603   }));
       
 24604 }
       
 24605 /**
       
 24606  * BlockPreview renders a preview of a block or array of blocks.
       
 24607  *
       
 24608  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-preview/README.md
       
 24609  *
       
 24610  * @param {Object} preview options for how the preview should be shown
       
 24611  * @param {Array|Object} preview.blocks A block instance (object) or an array of blocks to be previewed.
       
 24612  * @param {number} preview.viewportWidth Width of the preview container in pixels. Controls at what size the blocks will be rendered inside the preview. Default: 700.
       
 24613  *
       
 24614  * @return {WPComponent} The component to be rendered.
       
 24615  */
       
 24616 
       
 24617 /* harmony default export */ var block_preview = (Object(external_this_wp_element_["memo"])(BlockPreview));
       
 24618 
       
 24619 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/preview-panel.js
       
 24620 
       
 24621 
       
 24622 
       
 24623 function preview_panel_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; }
       
 24624 
       
 24625 function preview_panel_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { preview_panel_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 { preview_panel_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 24626 
       
 24627 /**
       
 24628  * WordPress dependencies
       
 24629  */
       
 24630 
       
 24631 
       
 24632 /**
       
 24633  * Internal dependencies
       
 24634  */
       
 24635 
       
 24636 
       
 24637 
       
 24638 
       
 24639 function InserterPreviewPanel(_ref) {
       
 24640   var item = _ref.item;
       
 24641   var hoveredItemBlockType = Object(external_this_wp_blocks_["getBlockType"])(item.name);
       
 24642   return Object(external_this_wp_element_["createElement"])("div", {
       
 24643     className: "block-editor-inserter__preview-container"
       
 24644   }, Object(external_this_wp_element_["createElement"])("div", {
       
 24645     className: "block-editor-inserter__preview"
       
 24646   }, Object(external_this_wp_blocks_["isReusableBlock"])(item) || hoveredItemBlockType.example ? Object(external_this_wp_element_["createElement"])("div", {
       
 24647     className: "block-editor-inserter__preview-content"
       
 24648   }, Object(external_this_wp_element_["createElement"])(block_preview, {
       
 24649     __experimentalPadding: 16,
       
 24650     viewportWidth: 500,
       
 24651     blocks: hoveredItemBlockType.example ? Object(external_this_wp_blocks_["getBlockFromExample"])(item.name, {
       
 24652       attributes: preview_panel_objectSpread({}, hoveredItemBlockType.example.attributes, {}, item.initialAttributes),
       
 24653       innerBlocks: hoveredItemBlockType.example.innerBlocks
       
 24654     }) : Object(external_this_wp_blocks_["createBlock"])(item.name, item.initialAttributes)
       
 24655   })) : Object(external_this_wp_element_["createElement"])("div", {
       
 24656     className: "block-editor-inserter__preview-content-missing"
       
 24657   }, Object(external_this_wp_i18n_["__"])('No Preview Available.'))), !Object(external_this_wp_blocks_["isReusableBlock"])(item) && Object(external_this_wp_element_["createElement"])(block_card, {
       
 24658     blockType: item
       
 24659   }));
       
 24660 }
       
 24661 
       
 24662 /* harmony default export */ var preview_panel = (InserterPreviewPanel);
       
 24663 
       
 24664 // EXTERNAL MODULE: ./node_modules/reakit/es/CompositeState-3a25dcee.js
       
 24665 var CompositeState_3a25dcee = __webpack_require__(51);
       
 24666 
       
 24667 // EXTERNAL MODULE: ./node_modules/reakit/es/Composite/Composite.js
       
 24668 var Composite = __webpack_require__(119);
       
 24669 
       
 24670 // EXTERNAL MODULE: ./node_modules/reakit/es/Composite/CompositeItem.js
       
 24671 var CompositeItem = __webpack_require__(120);
       
 24672 
       
 24673 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-list-item/index.js
       
 24674 
       
 24675 
       
 24676 
       
 24677 
       
 24678 /**
       
 24679  * External dependencies
       
 24680  */
       
 24681 
       
 24682 
       
 24683 /**
       
 24684  * WordPress dependencies
       
 24685  */
       
 24686 
       
 24687 
       
 24688 /**
       
 24689  * Internal dependencies
       
 24690  */
       
 24691 
       
 24692 
       
 24693 
       
 24694 function InserterListItem(_ref) {
       
 24695   var icon = _ref.icon,
       
 24696       _onClick = _ref.onClick,
       
 24697       isDisabled = _ref.isDisabled,
       
 24698       title = _ref.title,
       
 24699       className = _ref.className,
       
 24700       composite = _ref.composite,
       
 24701       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["icon", "onClick", "isDisabled", "title", "className", "composite"]);
       
 24702 
       
 24703   var itemIconStyle = icon ? {
       
 24704     backgroundColor: icon.background,
       
 24705     color: icon.foreground
       
 24706   } : {};
       
 24707   return Object(external_this_wp_element_["createElement"])("div", {
       
 24708     className: "block-editor-block-types-list__list-item"
       
 24709   }, Object(external_this_wp_element_["createElement"])(CompositeItem["a" /* CompositeItem */], Object(esm_extends["a" /* default */])({
       
 24710     role: "option",
       
 24711     as: external_this_wp_components_["Button"]
       
 24712   }, composite, {
       
 24713     className: classnames_default()('block-editor-block-types-list__item', className),
       
 24714     onClick: function onClick(event) {
       
 24715       event.preventDefault();
       
 24716 
       
 24717       _onClick();
       
 24718     },
       
 24719     disabled: isDisabled
       
 24720   }, props), Object(external_this_wp_element_["createElement"])("span", {
       
 24721     className: "block-editor-block-types-list__item-icon",
       
 24722     style: itemIconStyle
       
 24723   }, Object(external_this_wp_element_["createElement"])(BlockIcon, {
       
 24724     icon: icon,
       
 24725     showColors: true
       
 24726   })), Object(external_this_wp_element_["createElement"])("span", {
       
 24727     className: "block-editor-block-types-list__item-title"
       
 24728   }, title)));
       
 24729 }
       
 24730 
       
 24731 /* harmony default export */ var inserter_list_item = (InserterListItem);
       
 24732 
       
 24733 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-types-list/index.js
       
 24734 
       
 24735 
       
 24736 
       
 24737 /**
       
 24738  * External dependencies
       
 24739  */
       
 24740 
       
 24741 /**
       
 24742  * WordPress dependencies
       
 24743  */
       
 24744 
       
 24745 
       
 24746 
       
 24747 /**
       
 24748  * Internal dependencies
       
 24749  */
       
 24750 
       
 24751 
       
 24752 
       
 24753 
       
 24754 function BlockTypesList(_ref) {
       
 24755   var _ref$items = _ref.items,
       
 24756       items = _ref$items === void 0 ? [] : _ref$items,
       
 24757       onSelect = _ref.onSelect,
       
 24758       _ref$onHover = _ref.onHover,
       
 24759       onHover = _ref$onHover === void 0 ? function () {} : _ref$onHover,
       
 24760       children = _ref.children,
       
 24761       label = _ref.label;
       
 24762   var composite = Object(CompositeState_3a25dcee["g" /* u */])();
       
 24763   var normalizedItems = includeVariationsInInserterItems(items);
       
 24764   var orderId = normalizedItems.reduce(function (acc, item) {
       
 24765     return acc + '--' + item.id;
       
 24766   }, ''); // This ensures the composite state refreshes when the list order changes.
       
 24767 
       
 24768   Object(external_this_wp_element_["useEffect"])(function () {
       
 24769     composite.unstable_sort();
       
 24770   }, [composite.unstable_sort, orderId]);
       
 24771   return (
       
 24772     /*
       
 24773      * Disable reason: The `list` ARIA role is redundant but
       
 24774      * Safari+VoiceOver won't announce the list otherwise.
       
 24775      */
       
 24776 
       
 24777     /* eslint-disable jsx-a11y/no-redundant-roles */
       
 24778     Object(external_this_wp_element_["createElement"])(Composite["a" /* Composite */], Object(esm_extends["a" /* default */])({}, composite, {
       
 24779       role: "listbox",
       
 24780       className: "block-editor-block-types-list",
       
 24781       "aria-label": label
       
 24782     }), normalizedItems.map(function (item) {
       
 24783       return Object(external_this_wp_element_["createElement"])(inserter_list_item, {
       
 24784         key: item.id,
       
 24785         className: Object(external_this_wp_blocks_["getBlockMenuDefaultClassName"])(item.id),
       
 24786         icon: item.icon,
       
 24787         onClick: function onClick() {
       
 24788           onSelect(item);
       
 24789           onHover(null);
       
 24790         },
       
 24791         onFocus: function onFocus() {
       
 24792           return onHover(item);
       
 24793         },
       
 24794         onMouseEnter: function onMouseEnter() {
       
 24795           return onHover(item);
       
 24796         },
       
 24797         onMouseLeave: function onMouseLeave() {
       
 24798           return onHover(null);
       
 24799         },
       
 24800         onBlur: function onBlur() {
       
 24801           return onHover(null);
       
 24802         },
       
 24803         isDisabled: item.isDisabled,
       
 24804         title: item.title,
       
 24805         composite: composite
       
 24806       });
       
 24807     }), children)
       
 24808     /* eslint-enable jsx-a11y/no-redundant-roles */
       
 24809 
       
 24810   );
       
 24811 }
       
 24812 
       
 24813 /* harmony default export */ var block_types_list = (BlockTypesList);
       
 24814 
       
 24815 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/child-blocks.js
       
 24816 
       
 24817 
       
 24818 /**
       
 24819  * WordPress dependencies
       
 24820  */
       
 24821 
       
 24822 /**
       
 24823  * Internal dependencies
       
 24824  */
       
 24825 
       
 24826 
       
 24827 function ChildBlocks(_ref) {
       
 24828   var rootClientId = _ref.rootClientId,
       
 24829       children = _ref.children;
       
 24830 
       
 24831   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 24832     var _select = select('core/blocks'),
       
 24833         getBlockType = _select.getBlockType;
       
 24834 
       
 24835     var _select2 = select('core/block-editor'),
       
 24836         getBlockName = _select2.getBlockName;
       
 24837 
       
 24838     var rootBlockName = getBlockName(rootClientId);
       
 24839     var rootBlockType = getBlockType(rootBlockName);
       
 24840     return {
       
 24841       rootBlockTitle: rootBlockType && rootBlockType.title,
       
 24842       rootBlockIcon: rootBlockType && rootBlockType.icon
       
 24843     };
       
 24844   }),
       
 24845       rootBlockTitle = _useSelect.rootBlockTitle,
       
 24846       rootBlockIcon = _useSelect.rootBlockIcon;
       
 24847 
       
 24848   return Object(external_this_wp_element_["createElement"])("div", {
       
 24849     className: "block-editor-inserter__child-blocks"
       
 24850   }, (rootBlockIcon || rootBlockTitle) && Object(external_this_wp_element_["createElement"])("div", {
       
 24851     className: "block-editor-inserter__parent-block-header"
       
 24852   }, Object(external_this_wp_element_["createElement"])(BlockIcon, {
       
 24853     icon: rootBlockIcon,
       
 24854     showColors: true
       
 24855   }), rootBlockTitle && Object(external_this_wp_element_["createElement"])("h2", null, rootBlockTitle)), children);
       
 24856 }
       
 24857 
       
 24858 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter-menu-extension/index.js
       
 24859 /**
       
 24860  * WordPress dependencies
       
 24861  */
       
 24862 
       
 24863 
       
 24864 var inserter_menu_extension_createSlotFill = Object(external_this_wp_components_["createSlotFill"])('__experimentalInserterMenuExtension'),
       
 24865     __experimentalInserterMenuExtension = inserter_menu_extension_createSlotFill.Fill,
       
 24866     inserter_menu_extension_Slot = inserter_menu_extension_createSlotFill.Slot;
       
 24867 
       
 24868 __experimentalInserterMenuExtension.Slot = inserter_menu_extension_Slot;
       
 24869 /* harmony default export */ var inserter_menu_extension = (__experimentalInserterMenuExtension);
       
 24870 
       
 24871 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/panel.js
       
 24872 
       
 24873 
       
 24874 /**
       
 24875  * WordPress dependencies
       
 24876  */
       
 24877 
       
 24878 
       
 24879 function InserterPanel(_ref) {
       
 24880   var title = _ref.title,
       
 24881       icon = _ref.icon,
       
 24882       children = _ref.children;
       
 24883   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
       
 24884     className: "block-editor-inserter__panel-header"
       
 24885   }, Object(external_this_wp_element_["createElement"])("h2", {
       
 24886     className: "block-editor-inserter__panel-title"
       
 24887   }, title), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Icon"], {
       
 24888     icon: icon
       
 24889   })), Object(external_this_wp_element_["createElement"])("div", {
       
 24890     className: "block-editor-inserter__panel-content"
       
 24891   }, children));
       
 24892 }
       
 24893 
       
 24894 /* harmony default export */ var panel = (InserterPanel);
       
 24895 
       
 24896 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/no-results.js
       
 24897 
       
 24898 
       
 24899 /**
       
 24900  * WordPress dependencies
       
 24901  */
       
 24902 
       
 24903 
       
 24904 
       
 24905 function InserterNoResults() {
       
 24906   return Object(external_this_wp_element_["createElement"])("div", {
       
 24907     className: "block-editor-inserter__no-results"
       
 24908   }, Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], {
       
 24909     className: "block-editor-inserter__no-results-icon",
       
 24910     icon: block_default["a" /* default */]
       
 24911   }), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('No results found.')));
       
 24912 }
       
 24913 
       
 24914 /* harmony default export */ var no_results = (InserterNoResults);
       
 24915 
       
 24916 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/block-types-tab.js
       
 24917 
       
 24918 
       
 24919 
       
 24920 
       
 24921 function block_types_tab_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; }
       
 24922 
       
 24923 function block_types_tab_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_types_tab_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 { block_types_tab_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 24924 
       
 24925 /**
       
 24926  * External dependencies
       
 24927  */
       
 24928 
       
 24929 /**
       
 24930  * WordPress dependencies
       
 24931  */
       
 24932 
       
 24933 
       
 24934 
       
 24935 
       
 24936 
       
 24937 /**
       
 24938  * Internal dependencies
       
 24939  */
       
 24940 
       
 24941 
       
 24942 
       
 24943 
       
 24944 
       
 24945 
       
 24946 
       
 24947 
       
 24948 
       
 24949 var getBlockNamespace = function getBlockNamespace(item) {
       
 24950   return item.name.split('/')[0];
       
 24951 };
       
 24952 
       
 24953 var MAX_SUGGESTED_ITEMS = 6;
       
 24954 function BlockTypesTab(_ref) {
       
 24955   var rootClientId = _ref.rootClientId,
       
 24956       onInsert = _ref.onInsert,
       
 24957       onHover = _ref.onHover,
       
 24958       filterValue = _ref.filterValue,
       
 24959       debouncedSpeak = _ref.debouncedSpeak,
       
 24960       showMostUsedBlocks = _ref.showMostUsedBlocks;
       
 24961 
       
 24962   var _useBlockTypesState = use_block_types_state(rootClientId, onInsert),
       
 24963       _useBlockTypesState2 = Object(slicedToArray["a" /* default */])(_useBlockTypesState, 4),
       
 24964       items = _useBlockTypesState2[0],
       
 24965       categories = _useBlockTypesState2[1],
       
 24966       collections = _useBlockTypesState2[2],
       
 24967       onSelectItem = _useBlockTypesState2[3];
       
 24968 
       
 24969   var hasChildItems = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 24970     var _select = select('core/block-editor'),
       
 24971         getBlockName = _select.getBlockName;
       
 24972 
       
 24973     var _select2 = select('core/blocks'),
       
 24974         getChildBlockNames = _select2.getChildBlockNames;
       
 24975 
       
 24976     var rootBlockName = getBlockName(rootClientId);
       
 24977     return !!getChildBlockNames(rootBlockName).length;
       
 24978   }, [rootClientId]);
       
 24979   var filteredItems = Object(external_this_wp_element_["useMemo"])(function () {
       
 24980     return search_items_searchBlockItems(items, categories, collections, filterValue);
       
 24981   }, [filterValue, items, categories, collections]);
       
 24982   var suggestedItems = Object(external_this_wp_element_["useMemo"])(function () {
       
 24983     return Object(external_this_lodash_["orderBy"])(items, ['frecency'], ['desc']).slice(0, MAX_SUGGESTED_ITEMS);
       
 24984   }, [items]);
       
 24985   var uncategorizedItems = Object(external_this_wp_element_["useMemo"])(function () {
       
 24986     return filteredItems.filter(function (item) {
       
 24987       return !item.category;
       
 24988     });
       
 24989   }, [filteredItems]);
       
 24990   var itemsPerCategory = Object(external_this_wp_element_["useMemo"])(function () {
       
 24991     var getCategoryIndex = function getCategoryIndex(item) {
       
 24992       return Object(external_this_lodash_["findIndex"])(categories, function (category) {
       
 24993         return category.slug === item.category;
       
 24994       });
       
 24995     };
       
 24996 
       
 24997     return Object(external_this_lodash_["flow"])(function (itemList) {
       
 24998       return itemList.filter(function (item) {
       
 24999         return item.category && item.category !== 'reusable';
       
 25000       });
       
 25001     }, function (itemList) {
       
 25002       return Object(external_this_lodash_["sortBy"])(itemList, getCategoryIndex);
       
 25003     }, function (itemList) {
       
 25004       return Object(external_this_lodash_["groupBy"])(itemList, 'category');
       
 25005     })(filteredItems);
       
 25006   }, [filteredItems, categories]);
       
 25007   var itemsPerCollection = Object(external_this_wp_element_["useMemo"])(function () {
       
 25008     // Create a new Object to avoid mutating collection
       
 25009     var result = block_types_tab_objectSpread({}, collections);
       
 25010 
       
 25011     Object.keys(collections).forEach(function (namespace) {
       
 25012       result[namespace] = filteredItems.filter(function (item) {
       
 25013         return getBlockNamespace(item) === namespace;
       
 25014       });
       
 25015 
       
 25016       if (result[namespace].length === 0) {
       
 25017         delete result[namespace];
       
 25018       }
       
 25019     });
       
 25020     return result;
       
 25021   }, [filteredItems, collections]); // Announce search results on change
       
 25022 
       
 25023   Object(external_this_wp_element_["useEffect"])(function () {
       
 25024     var resultsFoundMessage = Object(external_this_wp_i18n_["sprintf"])(
       
 25025     /* translators: %d: number of results. */
       
 25026     Object(external_this_wp_i18n_["_n"])('%d result found.', '%d results found.', filteredItems.length), filteredItems.length);
       
 25027     debouncedSpeak(resultsFoundMessage);
       
 25028   }, [filterValue, debouncedSpeak]);
       
 25029   var hasItems = !Object(external_this_lodash_["isEmpty"])(filteredItems);
       
 25030   return Object(external_this_wp_element_["createElement"])("div", null, hasChildItems && Object(external_this_wp_element_["createElement"])(ChildBlocks, {
       
 25031     rootClientId: rootClientId
       
 25032   }, Object(external_this_wp_element_["createElement"])(block_types_list // Pass along every block, as useBlockTypesState() and
       
 25033   // getInserterItems() will have already filtered out
       
 25034   // non-child blocks.
       
 25035   , {
       
 25036     items: filteredItems,
       
 25037     onSelect: onSelectItem,
       
 25038     onHover: onHover,
       
 25039     label: Object(external_this_wp_i18n_["__"])('Child Blocks')
       
 25040   })), showMostUsedBlocks && !hasChildItems && !!suggestedItems.length && !filterValue && Object(external_this_wp_element_["createElement"])(panel, {
       
 25041     title: Object(external_this_wp_i18n_["_x"])('Most used', 'blocks')
       
 25042   }, Object(external_this_wp_element_["createElement"])(block_types_list, {
       
 25043     items: suggestedItems,
       
 25044     onSelect: onSelectItem,
       
 25045     onHover: onHover,
       
 25046     label: Object(external_this_wp_i18n_["_x"])('Most used', 'blocks')
       
 25047   })), !hasChildItems && Object(external_this_lodash_["map"])(categories, function (category) {
       
 25048     var categoryItems = itemsPerCategory[category.slug];
       
 25049 
       
 25050     if (!categoryItems || !categoryItems.length) {
       
 25051       return null;
       
 25052     }
       
 25053 
       
 25054     return Object(external_this_wp_element_["createElement"])(panel, {
       
 25055       key: category.slug,
       
 25056       title: category.title,
       
 25057       icon: category.icon
       
 25058     }, Object(external_this_wp_element_["createElement"])(block_types_list, {
       
 25059       items: categoryItems,
       
 25060       onSelect: onSelectItem,
       
 25061       onHover: onHover,
       
 25062       label: category.title
       
 25063     }));
       
 25064   }), !hasChildItems && !!uncategorizedItems.length && Object(external_this_wp_element_["createElement"])(panel, {
       
 25065     className: "block-editor-inserter__uncategorized-blocks-panel",
       
 25066     title: Object(external_this_wp_i18n_["__"])('Uncategorized')
       
 25067   }, Object(external_this_wp_element_["createElement"])(block_types_list, {
       
 25068     items: uncategorizedItems,
       
 25069     onSelect: onSelectItem,
       
 25070     onHover: onHover,
       
 25071     label: Object(external_this_wp_i18n_["__"])('Uncategorized')
       
 25072   })), !hasChildItems && Object(external_this_lodash_["map"])(collections, function (collection, namespace) {
       
 25073     var collectionItems = itemsPerCollection[namespace];
       
 25074 
       
 25075     if (!collectionItems || !collectionItems.length) {
       
 25076       return null;
       
 25077     }
       
 25078 
       
 25079     return Object(external_this_wp_element_["createElement"])(panel, {
       
 25080       key: namespace,
       
 25081       title: collection.title,
       
 25082       icon: collection.icon
       
 25083     }, Object(external_this_wp_element_["createElement"])(block_types_list, {
       
 25084       items: collectionItems,
       
 25085       onSelect: onSelectItem,
       
 25086       onHover: onHover,
       
 25087       label: collection.title
       
 25088     }));
       
 25089   }), Object(external_this_wp_element_["createElement"])(inserter_menu_extension.Slot, {
       
 25090     fillProps: {
       
 25091       onSelect: onSelectItem,
       
 25092       onHover: onHover,
       
 25093       filterValue: filterValue,
       
 25094       hasItems: hasItems
       
 25095     }
       
 25096   }, function (fills) {
       
 25097     if (fills.length) {
       
 25098       return fills;
       
 25099     }
       
 25100 
       
 25101     if (!hasItems) {
       
 25102       return Object(external_this_wp_element_["createElement"])(no_results, null);
       
 25103     }
       
 25104 
       
 25105     return null;
       
 25106   }));
       
 25107 }
       
 25108 /* harmony default export */ var block_types_tab = (Object(external_this_wp_components_["withSpokenMessages"])(BlockTypesTab));
       
 25109 
       
 25110 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/hooks/use-patterns-state.js
       
 25111 /**
       
 25112  * External dependencies
       
 25113  */
       
 25114 
       
 25115 /**
       
 25116  * WordPress dependencies
       
 25117  */
       
 25118 
       
 25119 
       
 25120 
       
 25121 
       
 25122 
       
 25123 /**
       
 25124  * Retrieves the block patterns inserter state.
       
 25125  *
       
 25126  * @param {Function} onInsert function called when inserter a list of blocks.
       
 25127  *
       
 25128  * @return {Array} Returns the patterns state. (patterns, categories, onSelect handler)
       
 25129  */
       
 25130 
       
 25131 var use_patterns_state_usePatternsState = function usePatternsState(onInsert) {
       
 25132   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 25133     var _select$getSettings = select('core/block-editor').getSettings(),
       
 25134         __experimentalBlockPatterns = _select$getSettings.__experimentalBlockPatterns,
       
 25135         __experimentalBlockPatternCategories = _select$getSettings.__experimentalBlockPatternCategories;
       
 25136 
       
 25137     return {
       
 25138       patterns: __experimentalBlockPatterns,
       
 25139       patternCategories: __experimentalBlockPatternCategories
       
 25140     };
       
 25141   }, []),
       
 25142       patternCategories = _useSelect.patternCategories,
       
 25143       patterns = _useSelect.patterns;
       
 25144 
       
 25145   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
       
 25146       createSuccessNotice = _useDispatch.createSuccessNotice;
       
 25147 
       
 25148   var onClickPattern = Object(external_this_wp_element_["useCallback"])(function (pattern, blocks) {
       
 25149     onInsert(Object(external_this_lodash_["map"])(blocks, function (block) {
       
 25150       return Object(external_this_wp_blocks_["cloneBlock"])(block);
       
 25151     }));
       
 25152     createSuccessNotice(Object(external_this_wp_i18n_["sprintf"])(
       
 25153     /* translators: %s: block pattern title. */
       
 25154     Object(external_this_wp_i18n_["__"])('Pattern "%s" inserted.'), pattern.title), {
       
 25155       type: 'snackbar'
       
 25156     });
       
 25157   }, []);
       
 25158   return [patterns, patternCategories, onClickPattern];
       
 25159 };
       
 25160 
       
 25161 /* harmony default export */ var use_patterns_state = (use_patterns_state_usePatternsState);
       
 25162 
       
 25163 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-patterns-list/index.js
       
 25164 
       
 25165 
       
 25166 /**
       
 25167  * WordPress dependencies
       
 25168  */
       
 25169 
       
 25170 
       
 25171 
       
 25172 
       
 25173 
       
 25174 /**
       
 25175  * Internal dependencies
       
 25176  */
       
 25177 
       
 25178 
       
 25179 
       
 25180 function BlockPattern(_ref) {
       
 25181   var pattern = _ref.pattern,
       
 25182       _onClick = _ref.onClick;
       
 25183   var content = pattern.content,
       
 25184       viewportWidth = pattern.viewportWidth;
       
 25185   var blocks = Object(external_this_wp_element_["useMemo"])(function () {
       
 25186     return Object(external_this_wp_blocks_["parse"])(content);
       
 25187   }, [content]);
       
 25188   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(BlockPattern);
       
 25189   var descriptionId = "block-editor-block-patterns-list__item-description-".concat(instanceId);
       
 25190   return Object(external_this_wp_element_["createElement"])("div", {
       
 25191     className: "block-editor-block-patterns-list__item",
       
 25192     role: "button",
       
 25193     onClick: function onClick() {
       
 25194       return _onClick(pattern, blocks);
       
 25195     },
       
 25196     onKeyDown: function onKeyDown(event) {
       
 25197       if (external_this_wp_keycodes_["ENTER"] === event.keyCode || external_this_wp_keycodes_["SPACE"] === event.keyCode) {
       
 25198         _onClick(pattern, blocks);
       
 25199       }
 25188       }
 25200     },
 25189     },
 25201     tabIndex: 0,
 25190     onDragOver: scrollOnDragOver,
 25202     "aria-label": pattern.title,
 25191     onDragEnd: () => {
 25203     "aria-describedby": pattern.description ? descriptionId : undefined
 25192       stopDraggingBlocks();
 25204   }, Object(external_this_wp_element_["createElement"])(block_preview, {
 25193       isDragging.current = false;
 25205     blocks: blocks,
 25194       stopScrolling();
 25206     viewportWidth: viewportWidth
 25195 
 25207   }), Object(external_this_wp_element_["createElement"])("div", {
 25196       if (onDragEnd) {
 25208     className: "block-editor-block-patterns-list__item-title"
 25197         onDragEnd();
 25209   }, pattern.title), !!pattern.description && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
 25198       }
 25210     id: descriptionId
 25199     },
 25211   }, pattern.description));
 25200     __experimentalDragComponent: Object(external_wp_element_["createElement"])(BlockDraggableChip, {
 25212 }
 25201       count: clientIds.length,
 25213 
 25202       icon: icon
 25214 function BlockPatternPlaceholder() {
 25203     })
 25215   return Object(external_this_wp_element_["createElement"])("div", {
 25204   }, ({
 25216     className: "block-editor-block-patterns-list__item is-placeholder"
 25205     onDraggableStart,
 25217   });
 25206     onDraggableEnd
 25218 }
 25207   }) => {
 25219 
 25208     return children({
 25220 function BlockPatternList(_ref2) {
 25209       draggable: true,
 25221   var blockPatterns = _ref2.blockPatterns,
 25210       onDragStart: onDraggableStart,
 25222       shownPatterns = _ref2.shownPatterns,
 25211       onDragEnd: onDraggableEnd
 25223       onClickPattern = _ref2.onClickPattern;
       
 25224   return blockPatterns.map(function (pattern) {
       
 25225     var isShown = shownPatterns.includes(pattern);
       
 25226     return isShown ? Object(external_this_wp_element_["createElement"])(BlockPattern, {
       
 25227       key: pattern.name,
       
 25228       pattern: pattern,
       
 25229       onClick: onClickPattern
       
 25230     }) : Object(external_this_wp_element_["createElement"])(BlockPatternPlaceholder, {
       
 25231       key: pattern.name
       
 25232     });
 25212     });
 25233   });
 25213   });
 25234 }
 25214 };
 25235 
 25215 
 25236 /* harmony default export */ var block_patterns_list = (BlockPatternList);
 25216 /* harmony default export */ var block_draggable = (BlockDraggable);
 25237 
 25217 
 25238 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/block-patterns-tab.js
 25218 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/block-selection-button.js
 25239 
       
 25240 
 25219 
 25241 
 25220 
 25242 
 25221 
 25243 /**
 25222 /**
 25244  * External dependencies
 25223  * External dependencies
 25249  */
 25228  */
 25250 
 25229 
 25251 
 25230 
 25252 
 25231 
 25253 
 25232 
       
 25233 
       
 25234 
       
 25235 
       
 25236 
       
 25237 
       
 25238 
 25254 /**
 25239 /**
 25255  * Internal dependencies
 25240  * Internal dependencies
 25256  */
 25241  */
 25257 
 25242 
 25258 
 25243 
 25259 
 25244 
 25260 
 25245 
 25261 
       
 25262 
       
 25263 
       
 25264 function BlockPatternsSearchResults(_ref) {
       
 25265   var filterValue = _ref.filterValue,
       
 25266       onInsert = _ref.onInsert;
       
 25267 
       
 25268   var _usePatternsState = use_patterns_state(onInsert),
       
 25269       _usePatternsState2 = Object(slicedToArray["a" /* default */])(_usePatternsState, 3),
       
 25270       patterns = _usePatternsState2[0],
       
 25271       onClick = _usePatternsState2[2];
       
 25272 
       
 25273   var currentShownPatterns = Object(external_this_wp_compose_["useAsyncList"])(patterns);
       
 25274   var filteredPatterns = Object(external_this_wp_element_["useMemo"])(function () {
       
 25275     return search_items_searchItems(patterns, filterValue);
       
 25276   }, [filterValue, patterns]);
       
 25277 
       
 25278   if (filterValue) {
       
 25279     return !!filteredPatterns.length ? Object(external_this_wp_element_["createElement"])(panel, {
       
 25280       title: Object(external_this_wp_i18n_["__"])('Search Results')
       
 25281     }, Object(external_this_wp_element_["createElement"])(block_patterns_list, {
       
 25282       shownPatterns: currentShownPatterns,
       
 25283       blockPatterns: filteredPatterns,
       
 25284       onClickPattern: onClick
       
 25285     })) : Object(external_this_wp_element_["createElement"])(no_results, null);
       
 25286   }
       
 25287 }
       
 25288 
       
 25289 function BlockPatternsPerCategories(_ref2) {
       
 25290   var onInsert = _ref2.onInsert;
       
 25291 
       
 25292   var _usePatternsState3 = use_patterns_state(onInsert),
       
 25293       _usePatternsState4 = Object(slicedToArray["a" /* default */])(_usePatternsState3, 3),
       
 25294       patterns = _usePatternsState4[0],
       
 25295       categories = _usePatternsState4[1],
       
 25296       onClick = _usePatternsState4[2];
       
 25297 
       
 25298   var getPatternIndex = Object(external_this_wp_element_["useCallback"])(function (pattern) {
       
 25299     if (!pattern.categories || !pattern.categories.length) {
       
 25300       return Infinity;
       
 25301     }
       
 25302 
       
 25303     var indexedCategories = Object(external_this_lodash_["fromPairs"])(categories.map(function (_ref3, index) {
       
 25304       var name = _ref3.name;
       
 25305       return [name, index];
       
 25306     }));
       
 25307     return Math.min.apply(Math, Object(toConsumableArray["a" /* default */])(pattern.categories.map(function (category) {
       
 25308       return indexedCategories[category] !== undefined ? indexedCategories[category] : Infinity;
       
 25309     })));
       
 25310   }, [categories]); // Ordering the patterns per category is important for the async rendering.
       
 25311 
       
 25312   var orderedPatterns = Object(external_this_wp_element_["useMemo"])(function () {
       
 25313     return patterns.sort(function (a, b) {
       
 25314       return getPatternIndex(a) - getPatternIndex(b);
       
 25315     });
       
 25316   }, [patterns, getPatternIndex]);
       
 25317   var currentShownPatterns = Object(external_this_wp_compose_["useAsyncList"])(orderedPatterns); // Uncategorized Patterns
       
 25318 
       
 25319   var uncategorizedPatterns = Object(external_this_wp_element_["useMemo"])(function () {
       
 25320     return patterns.filter(function (pattern) {
       
 25321       return getPatternIndex(pattern) === Infinity;
       
 25322     });
       
 25323   }, [patterns, getPatternIndex]);
       
 25324   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, categories.map(function (patternCategory) {
       
 25325     var categoryPatterns = patterns.filter(function (pattern) {
       
 25326       return pattern.categories && pattern.categories.includes(patternCategory.name);
       
 25327     });
       
 25328     return !!categoryPatterns.length && Object(external_this_wp_element_["createElement"])(panel, {
       
 25329       key: patternCategory.name,
       
 25330       title: patternCategory.label
       
 25331     }, Object(external_this_wp_element_["createElement"])(block_patterns_list, {
       
 25332       shownPatterns: currentShownPatterns,
       
 25333       blockPatterns: categoryPatterns,
       
 25334       onClickPattern: onClick
       
 25335     }));
       
 25336   }), !!uncategorizedPatterns.length && Object(external_this_wp_element_["createElement"])(panel, {
       
 25337     title: Object(external_this_wp_i18n_["_x"])('Uncategorized')
       
 25338   }, Object(external_this_wp_element_["createElement"])(block_patterns_list, {
       
 25339     shownPatterns: currentShownPatterns,
       
 25340     blockPatterns: uncategorizedPatterns,
       
 25341     onClickPattern: onClick
       
 25342   })));
       
 25343 }
       
 25344 
       
 25345 function BlockPatternsTabs(_ref4) {
       
 25346   var onInsert = _ref4.onInsert,
       
 25347       filterValue = _ref4.filterValue;
       
 25348   return filterValue ? Object(external_this_wp_element_["createElement"])(BlockPatternsSearchResults, {
       
 25349     onInsert: onInsert,
       
 25350     filterValue: filterValue
       
 25351   }) : Object(external_this_wp_element_["createElement"])(BlockPatternsPerCategories, {
       
 25352     onInsert: onInsert
       
 25353   });
       
 25354 }
       
 25355 
       
 25356 /* harmony default export */ var block_patterns_tab = (BlockPatternsTabs);
       
 25357 
       
 25358 // EXTERNAL MODULE: external {"this":["wp","url"]}
       
 25359 var external_this_wp_url_ = __webpack_require__(31);
       
 25360 
       
 25361 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/reusable-blocks-tab.js
       
 25362 
       
 25363 
       
 25364 
       
 25365 /**
       
 25366  * WordPress dependencies
       
 25367  */
       
 25368 
       
 25369 
       
 25370 
       
 25371 
       
 25372 /**
       
 25373  * Internal dependencies
       
 25374  */
       
 25375 
       
 25376 
       
 25377 
       
 25378 
       
 25379 
       
 25380 
       
 25381 
       
 25382 function ReusableBlocksList(_ref) {
       
 25383   var debouncedSpeak = _ref.debouncedSpeak,
       
 25384       filterValue = _ref.filterValue,
       
 25385       onHover = _ref.onHover,
       
 25386       onInsert = _ref.onInsert,
       
 25387       rootClientId = _ref.rootClientId;
       
 25388 
       
 25389   var _useBlockTypesState = use_block_types_state(rootClientId, onInsert),
       
 25390       _useBlockTypesState2 = Object(slicedToArray["a" /* default */])(_useBlockTypesState, 4),
       
 25391       items = _useBlockTypesState2[0],
       
 25392       categories = _useBlockTypesState2[1],
       
 25393       collections = _useBlockTypesState2[2],
       
 25394       onSelectItem = _useBlockTypesState2[3];
       
 25395 
       
 25396   var filteredItems = Object(external_this_wp_element_["useMemo"])(function () {
       
 25397     var reusableItems = items.filter(function (_ref2) {
       
 25398       var category = _ref2.category;
       
 25399       return category === 'reusable';
       
 25400     });
       
 25401 
       
 25402     if (!filterValue) {
       
 25403       return reusableItems;
       
 25404     }
       
 25405 
       
 25406     return search_items_searchBlockItems(reusableItems, categories, collections, filterValue);
       
 25407   }, [filterValue, items, categories, collections]); // Announce search results on change.
       
 25408 
       
 25409   Object(external_this_wp_element_["useEffect"])(function () {
       
 25410     var resultsFoundMessage = Object(external_this_wp_i18n_["sprintf"])(
       
 25411     /* translators: %d: number of results. */
       
 25412     Object(external_this_wp_i18n_["_n"])('%d result found.', '%d results found.', filteredItems.length), filteredItems.length);
       
 25413     debouncedSpeak(resultsFoundMessage);
       
 25414   }, [filterValue, debouncedSpeak]);
       
 25415 
       
 25416   if (filteredItems.length === 0) {
       
 25417     return Object(external_this_wp_element_["createElement"])(no_results, null);
       
 25418   }
       
 25419 
       
 25420   return Object(external_this_wp_element_["createElement"])(panel, {
       
 25421     title: filterValue ? Object(external_this_wp_i18n_["__"])('Search Results') : Object(external_this_wp_i18n_["__"])('Reusable blocks')
       
 25422   }, Object(external_this_wp_element_["createElement"])(block_types_list, {
       
 25423     items: filteredItems,
       
 25424     onSelect: onSelectItem,
       
 25425     onHover: onHover,
       
 25426     label: filterValue ? Object(external_this_wp_i18n_["__"])('Search Results') : Object(external_this_wp_i18n_["__"])('Reusable blocks')
       
 25427   }));
       
 25428 } // The unwrapped component is only exported for use by unit tests.
       
 25429 
       
 25430 /**
       
 25431  * List of reusable blocks shown in the "Reusable" tab of the inserter.
       
 25432  *
       
 25433  * @param {Object}   props                Component props.
       
 25434  * @param {?string}  props.rootClientId   Client id of block to insert into.
       
 25435  * @param {Function} props.onInsert       Callback to run when item is inserted.
       
 25436  * @param {Function} props.onHover        Callback to run when item is hovered.
       
 25437  * @param {?string}  props.filterValue    Search term.
       
 25438  * @param {Function} props.debouncedSpeak Debounced speak function.
       
 25439  *
       
 25440  * @return {WPComponent} The component.
       
 25441  */
       
 25442 
       
 25443 
       
 25444 function ReusableBlocksTab(_ref3) {
       
 25445   var rootClientId = _ref3.rootClientId,
       
 25446       onInsert = _ref3.onInsert,
       
 25447       onHover = _ref3.onHover,
       
 25448       filterValue = _ref3.filterValue,
       
 25449       debouncedSpeak = _ref3.debouncedSpeak;
       
 25450   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(ReusableBlocksList, {
       
 25451     debouncedSpeak: debouncedSpeak,
       
 25452     filterValue: filterValue,
       
 25453     onHover: onHover,
       
 25454     onInsert: onInsert,
       
 25455     rootClientId: rootClientId
       
 25456   }), Object(external_this_wp_element_["createElement"])("div", {
       
 25457     className: "block-editor-inserter__manage-reusable-blocks-container"
       
 25458   }, Object(external_this_wp_element_["createElement"])("a", {
       
 25459     className: "block-editor-inserter__manage-reusable-blocks",
       
 25460     href: Object(external_this_wp_url_["addQueryArgs"])('edit.php', {
       
 25461       post_type: 'wp_block'
       
 25462     })
       
 25463   }, Object(external_this_wp_i18n_["__"])('Manage all reusable blocks'))));
       
 25464 }
       
 25465 /* harmony default export */ var reusable_blocks_tab = (Object(external_this_wp_components_["withSpokenMessages"])(ReusableBlocksTab));
       
 25466 
       
 25467 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/hooks/use-insertion-point.js
       
 25468 
       
 25469 
       
 25470 function use_insertion_point_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; }
       
 25471 
       
 25472 function use_insertion_point_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { use_insertion_point_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 { use_insertion_point_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 25473 
       
 25474 /**
       
 25475  * External dependencies
       
 25476  */
       
 25477 
       
 25478 /**
       
 25479  * WordPress dependencies
       
 25480  */
       
 25481 
       
 25482 
       
 25483 
       
 25484 
       
 25485 
       
 25486 /**
       
 25487  * @typedef WPInserterConfig
       
 25488  *
       
 25489  * @property {string=} rootClientId        Inserter Root Client ID.
       
 25490  * @property {string=} clientId            Inserter Client ID.
       
 25491  * @property {boolean} isAppender          Whether the inserter is an appender or not.
       
 25492  * @property {boolean} selectBlockOnInsert Whether the block should be selected on insert.
       
 25493  */
       
 25494 
       
 25495 /**
       
 25496  * Returns the insertion point state given the inserter config.
       
 25497  *
       
 25498  * @param {WPInserterConfig} config Inserter Config.
       
 25499  * @return {Array} Insertion Point State (rootClientID, onInsertBlocks and onToggle).
       
 25500  */
       
 25501 
       
 25502 function useInsertionPoint(_ref) {
       
 25503   var rootClientId = _ref.rootClientId,
       
 25504       clientId = _ref.clientId,
       
 25505       isAppender = _ref.isAppender,
       
 25506       selectBlockOnInsert = _ref.selectBlockOnInsert;
       
 25507 
       
 25508   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 25509     var _getSettings$__experi;
       
 25510 
       
 25511     var _select = select('core/block-editor'),
       
 25512         getSettings = _select.getSettings,
       
 25513         getBlockRootClientId = _select.getBlockRootClientId,
       
 25514         _getBlockSelectionEnd = _select.getBlockSelectionEnd;
       
 25515 
       
 25516     var destRootClientId = rootClientId;
       
 25517 
       
 25518     if (!destRootClientId && !clientId && !isAppender) {
       
 25519       var end = _getBlockSelectionEnd();
       
 25520 
       
 25521       if (end) {
       
 25522         destRootClientId = getBlockRootClientId(end);
       
 25523       }
       
 25524     }
       
 25525 
       
 25526     return use_insertion_point_objectSpread({
       
 25527       hasPatterns: !!((_getSettings$__experi = getSettings().__experimentalBlockPatterns) === null || _getSettings$__experi === void 0 ? void 0 : _getSettings$__experi.length),
       
 25528       destinationRootClientId: destRootClientId
       
 25529     }, Object(external_this_lodash_["pick"])(select('core/block-editor'), ['getSelectedBlock', 'getBlockIndex', 'getBlockSelectionEnd', 'getBlockOrder']));
       
 25530   }, [isAppender, clientId, rootClientId]),
       
 25531       destinationRootClientId = _useSelect.destinationRootClientId,
       
 25532       getSelectedBlock = _useSelect.getSelectedBlock,
       
 25533       getBlockIndex = _useSelect.getBlockIndex,
       
 25534       getBlockSelectionEnd = _useSelect.getBlockSelectionEnd,
       
 25535       getBlockOrder = _useSelect.getBlockOrder;
       
 25536 
       
 25537   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 25538       replaceBlocks = _useDispatch.replaceBlocks,
       
 25539       insertBlocks = _useDispatch.insertBlocks,
       
 25540       showInsertionPoint = _useDispatch.showInsertionPoint,
       
 25541       hideInsertionPoint = _useDispatch.hideInsertionPoint;
       
 25542 
       
 25543   function getInsertionIndex() {
       
 25544     // If the clientId is defined, we insert at the position of the block.
       
 25545     if (clientId) {
       
 25546       return getBlockIndex(clientId, destinationRootClientId);
       
 25547     } // If there a selected block, we insert after the selected block.
       
 25548 
       
 25549 
       
 25550     var end = getBlockSelectionEnd();
       
 25551 
       
 25552     if (!isAppender && end) {
       
 25553       return getBlockIndex(end, destinationRootClientId) + 1;
       
 25554     } // Otherwise, we insert at the end of the current rootClientId
       
 25555 
       
 25556 
       
 25557     return getBlockOrder(destinationRootClientId).length;
       
 25558   }
       
 25559 
       
 25560   var onInsertBlocks = function onInsertBlocks(blocks) {
       
 25561     var selectedBlock = getSelectedBlock();
       
 25562 
       
 25563     if (!isAppender && selectedBlock && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(selectedBlock)) {
       
 25564       replaceBlocks(selectedBlock.clientId, blocks);
       
 25565     } else {
       
 25566       insertBlocks(blocks, getInsertionIndex(), destinationRootClientId, selectBlockOnInsert);
       
 25567     }
       
 25568 
       
 25569     if (!selectBlockOnInsert) {
       
 25570       // translators: %d: the name of the block that has been added
       
 25571       var message = Object(external_this_wp_i18n_["_n"])('%d block added.', '%d blocks added.', blocks.length);
       
 25572 
       
 25573       Object(external_this_wp_a11y_["speak"])(message);
       
 25574     }
       
 25575   };
       
 25576 
       
 25577   var onToggleInsertionPoint = function onToggleInsertionPoint(show) {
       
 25578     if (show) {
       
 25579       var index = getInsertionIndex();
       
 25580       showInsertionPoint(destinationRootClientId, index);
       
 25581     } else {
       
 25582       hideInsertionPoint();
       
 25583     }
       
 25584   };
       
 25585 
       
 25586   return [destinationRootClientId, onInsertBlocks, onToggleInsertionPoint];
       
 25587 }
       
 25588 
       
 25589 /* harmony default export */ var use_insertion_point = (useInsertionPoint);
       
 25590 
       
 25591 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/tabs.js
       
 25592 
       
 25593 
       
 25594 /**
       
 25595  * WordPress dependencies
       
 25596  */
       
 25597 
       
 25598 
       
 25599 var tabs_blocksTab = {
       
 25600   name: 'blocks',
       
 25601 
       
 25602   /* translators: Blocks tab title in the block inserter. */
       
 25603   title: Object(external_this_wp_i18n_["__"])('Blocks')
       
 25604 };
       
 25605 var tabs_patternsTab = {
       
 25606   name: 'patterns',
       
 25607 
       
 25608   /* translators: Patterns tab title in the block inserter. */
       
 25609   title: Object(external_this_wp_i18n_["__"])('Patterns')
       
 25610 };
       
 25611 var tabs_reusableBlocksTab = {
       
 25612   name: 'reusable',
       
 25613 
       
 25614   /* translators: Reusable blocks tab title in the block inserter. */
       
 25615   title: Object(external_this_wp_i18n_["__"])('Reusable')
       
 25616 };
       
 25617 
       
 25618 function InserterTabs(_ref) {
       
 25619   var children = _ref.children,
       
 25620       _ref$showPatterns = _ref.showPatterns,
       
 25621       showPatterns = _ref$showPatterns === void 0 ? false : _ref$showPatterns,
       
 25622       _ref$showReusableBloc = _ref.showReusableBlocks,
       
 25623       showReusableBlocks = _ref$showReusableBloc === void 0 ? false : _ref$showReusableBloc;
       
 25624   var tabs = [tabs_blocksTab];
       
 25625 
       
 25626   if (showPatterns) {
       
 25627     tabs.push(tabs_patternsTab);
       
 25628   }
       
 25629 
       
 25630   if (showReusableBlocks) {
       
 25631     tabs.push(tabs_reusableBlocksTab);
       
 25632   }
       
 25633 
       
 25634   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TabPanel"], {
       
 25635     className: "block-editor-inserter__tabs",
       
 25636     tabs: tabs
       
 25637   }, children);
       
 25638 }
       
 25639 
       
 25640 /* harmony default export */ var inserter_tabs = (InserterTabs);
       
 25641 
       
 25642 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/menu.js
       
 25643 
       
 25644 
       
 25645 
       
 25646 /**
       
 25647  * WordPress dependencies
       
 25648  */
       
 25649 
       
 25650 
       
 25651 
       
 25652 
       
 25653 
       
 25654 /**
       
 25655  * Internal dependencies
       
 25656  */
       
 25657 
       
 25658 
       
 25659 
       
 25660 
       
 25661 
       
 25662 
       
 25663 
       
 25664 
       
 25665 
       
 25666 
       
 25667 var stopKeyPropagation = function stopKeyPropagation(event) {
       
 25668   return event.stopPropagation();
       
 25669 };
       
 25670 
       
 25671 function InserterMenu(_ref) {
       
 25672   var rootClientId = _ref.rootClientId,
       
 25673       clientId = _ref.clientId,
       
 25674       isAppender = _ref.isAppender,
       
 25675       __experimentalSelectBlockOnInsert = _ref.__experimentalSelectBlockOnInsert,
       
 25676       onSelect = _ref.onSelect,
       
 25677       showInserterHelpPanel = _ref.showInserterHelpPanel,
       
 25678       showMostUsedBlocks = _ref.showMostUsedBlocks;
       
 25679 
       
 25680   var _useState = Object(external_this_wp_element_["useState"])(''),
       
 25681       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 25682       filterValue = _useState2[0],
       
 25683       setFilterValue = _useState2[1];
       
 25684 
       
 25685   var _useState3 = Object(external_this_wp_element_["useState"])(null),
       
 25686       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
       
 25687       hoveredItem = _useState4[0],
       
 25688       setHoveredItem = _useState4[1];
       
 25689 
       
 25690   var _useInsertionPoint = use_insertion_point({
       
 25691     rootClientId: rootClientId,
       
 25692     clientId: clientId,
       
 25693     isAppender: isAppender,
       
 25694     selectBlockOnInsert: __experimentalSelectBlockOnInsert
       
 25695   }),
       
 25696       _useInsertionPoint2 = Object(slicedToArray["a" /* default */])(_useInsertionPoint, 3),
       
 25697       destinationRootClientId = _useInsertionPoint2[0],
       
 25698       onInsertBlocks = _useInsertionPoint2[1],
       
 25699       onToggleInsertionPoint = _useInsertionPoint2[2];
       
 25700 
       
 25701   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 25702     var _select$getSettings = select('core/block-editor').getSettings(),
       
 25703         __experimentalBlockPatterns = _select$getSettings.__experimentalBlockPatterns,
       
 25704         __experimentalReusableBlocks = _select$getSettings.__experimentalReusableBlocks;
       
 25705 
       
 25706     return {
       
 25707       hasPatterns: !!(__experimentalBlockPatterns === null || __experimentalBlockPatterns === void 0 ? void 0 : __experimentalBlockPatterns.length),
       
 25708       hasReusableBlocks: !!(__experimentalReusableBlocks === null || __experimentalReusableBlocks === void 0 ? void 0 : __experimentalReusableBlocks.length)
       
 25709     };
       
 25710   }, []),
       
 25711       hasPatterns = _useSelect.hasPatterns,
       
 25712       hasReusableBlocks = _useSelect.hasReusableBlocks;
       
 25713 
       
 25714   var showPatterns = !destinationRootClientId && hasPatterns;
       
 25715 
       
 25716   var onKeyDown = function onKeyDown(event) {
       
 25717     if ([external_this_wp_keycodes_["LEFT"], external_this_wp_keycodes_["DOWN"], external_this_wp_keycodes_["RIGHT"], external_this_wp_keycodes_["UP"], external_this_wp_keycodes_["BACKSPACE"], external_this_wp_keycodes_["ENTER"]].includes(event.keyCode)) {
       
 25718       // Stop the key event from propagating up to ObserveTyping.startTypingInTextField.
       
 25719       event.stopPropagation();
       
 25720     }
       
 25721   };
       
 25722 
       
 25723   var onInsert = function onInsert(blocks) {
       
 25724     onInsertBlocks(blocks);
       
 25725     onSelect();
       
 25726   };
       
 25727 
       
 25728   var onHover = function onHover(item) {
       
 25729     onToggleInsertionPoint(!!item);
       
 25730     setHoveredItem(item);
       
 25731   };
       
 25732 
       
 25733   var blocksTab = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
       
 25734     className: "block-editor-inserter__block-list"
       
 25735   }, Object(external_this_wp_element_["createElement"])(block_types_tab, {
       
 25736     rootClientId: destinationRootClientId,
       
 25737     onInsert: onInsert,
       
 25738     onHover: onHover,
       
 25739     filterValue: filterValue,
       
 25740     showMostUsedBlocks: showMostUsedBlocks
       
 25741   })), showInserterHelpPanel && Object(external_this_wp_element_["createElement"])("div", {
       
 25742     className: "block-editor-inserter__tips"
       
 25743   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
       
 25744     as: "h2"
       
 25745   }, Object(external_this_wp_i18n_["__"])('A tip for using the block editor')), Object(external_this_wp_element_["createElement"])(tips, null)));
       
 25746   var patternsTab = Object(external_this_wp_element_["createElement"])(block_patterns_tab, {
       
 25747     onInsert: onInsert,
       
 25748     filterValue: filterValue
       
 25749   });
       
 25750   var reusableBlocksTab = Object(external_this_wp_element_["createElement"])(reusable_blocks_tab, {
       
 25751     rootClientId: destinationRootClientId,
       
 25752     onInsert: onInsert,
       
 25753     onHover: onHover,
       
 25754     filterValue: filterValue
       
 25755   }); // Disable reason (no-autofocus): The inserter menu is a modal display, not one which
       
 25756   // is always visible, and one which already incurs this behavior of autoFocus via
       
 25757   // Popover's focusOnMount.
       
 25758   // Disable reason (no-static-element-interactions): Navigational key-presses within
       
 25759   // the menu are prevented from triggering WritingFlow and ObserveTyping interactions.
       
 25760 
       
 25761   /* eslint-disable jsx-a11y/no-autofocus, jsx-a11y/no-static-element-interactions */
       
 25762 
       
 25763   return Object(external_this_wp_element_["createElement"])("div", {
       
 25764     className: "block-editor-inserter__menu",
       
 25765     onKeyPress: stopKeyPropagation,
       
 25766     onKeyDown: onKeyDown
       
 25767   }, Object(external_this_wp_element_["createElement"])("div", {
       
 25768     className: "block-editor-inserter__main-area"
       
 25769   }, Object(external_this_wp_element_["createElement"])("div", {
       
 25770     className: "block-editor-inserter__content"
       
 25771   }, Object(external_this_wp_element_["createElement"])(search_form, {
       
 25772     onChange: setFilterValue,
       
 25773     value: filterValue
       
 25774   }), (showPatterns || hasReusableBlocks) && Object(external_this_wp_element_["createElement"])(inserter_tabs, {
       
 25775     showPatterns: showPatterns,
       
 25776     showReusableBlocks: hasReusableBlocks
       
 25777   }, function (tab) {
       
 25778     if (tab.name === 'blocks') {
       
 25779       return blocksTab;
       
 25780     } else if (tab.name === 'patterns') {
       
 25781       return patternsTab;
       
 25782     }
       
 25783 
       
 25784     return reusableBlocksTab;
       
 25785   }), !showPatterns && !hasReusableBlocks && blocksTab)), showInserterHelpPanel && hoveredItem && Object(external_this_wp_element_["createElement"])(preview_panel, {
       
 25786     item: hoveredItem
       
 25787   }));
       
 25788   /* eslint-enable jsx-a11y/no-autofocus, jsx-a11y/no-static-element-interactions */
       
 25789 }
       
 25790 
       
 25791 /* harmony default export */ var menu = (InserterMenu);
       
 25792 
       
 25793 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/quick-inserter.js
       
 25794 
       
 25795 
       
 25796 
       
 25797 /**
       
 25798  * External dependencies
       
 25799  */
       
 25800 
       
 25801 /**
       
 25802  * WordPress dependencies
       
 25803  */
       
 25804 
       
 25805 
       
 25806 
       
 25807 
       
 25808 
       
 25809 
       
 25810 /**
       
 25811  * Internal dependencies
       
 25812  */
       
 25813 
       
 25814 
       
 25815 
       
 25816 
       
 25817 
       
 25818 
       
 25819 
       
 25820 
       
 25821 
       
 25822 
       
 25823 var SEARCH_THRESHOLD = 6;
       
 25824 var SHOWN_BLOCK_TYPES = 6;
       
 25825 var SHOWN_BLOCK_PATTERNS = 2;
       
 25826 
       
 25827 var quick_inserter_preventArrowKeysPropagation = function preventArrowKeysPropagation(event) {
       
 25828   if ([external_this_wp_keycodes_["LEFT"], external_this_wp_keycodes_["DOWN"], external_this_wp_keycodes_["RIGHT"], external_this_wp_keycodes_["UP"], external_this_wp_keycodes_["BACKSPACE"], external_this_wp_keycodes_["ENTER"]].includes(event.keyCode)) {
       
 25829     // Stop the key event from propagating up to ObserveTyping.startTypingInTextField.
       
 25830     event.stopPropagation();
       
 25831   }
       
 25832 };
       
 25833 
       
 25834 var quick_inserter_stopKeyPropagation = function stopKeyPropagation(event) {
       
 25835   return event.stopPropagation();
       
 25836 };
       
 25837 
       
 25838 function QuickInserterList(_ref) {
       
 25839   var blockTypes = _ref.blockTypes,
       
 25840       blockPatterns = _ref.blockPatterns,
       
 25841       onSelectBlockType = _ref.onSelectBlockType,
       
 25842       onSelectBlockPattern = _ref.onSelectBlockPattern,
       
 25843       onHover = _ref.onHover;
       
 25844   var shownBlockTypes = Object(external_this_wp_element_["useMemo"])(function () {
       
 25845     return Object(external_this_lodash_["orderBy"])(blockTypes, ['frecency'], ['desc']).slice(0, SHOWN_BLOCK_TYPES);
       
 25846   }, [blockTypes]);
       
 25847   var shownBlockPatterns = Object(external_this_wp_element_["useMemo"])(function () {
       
 25848     return blockPatterns.slice(0, SHOWN_BLOCK_PATTERNS);
       
 25849   }, [blockTypes]);
       
 25850   return Object(external_this_wp_element_["createElement"])("div", {
       
 25851     className: "block-editor-inserter__quick-inserter-results"
       
 25852   }, !shownBlockTypes.length && !shownBlockPatterns.length && Object(external_this_wp_element_["createElement"])(no_results, null), !!shownBlockTypes.length && Object(external_this_wp_element_["createElement"])(panel, {
       
 25853     title: Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], null, Object(external_this_wp_i18n_["__"])('Blocks'))
       
 25854   }, Object(external_this_wp_element_["createElement"])(block_types_list, {
       
 25855     items: shownBlockTypes,
       
 25856     onSelect: onSelectBlockType,
       
 25857     onHover: onHover,
       
 25858     label: Object(external_this_wp_i18n_["__"])('Blocks')
       
 25859   })), !!shownBlockTypes.length && !!shownBlockPatterns.length && Object(external_this_wp_element_["createElement"])("div", {
       
 25860     className: "block-editor-inserter__quick-inserter-separator"
       
 25861   }), !!shownBlockPatterns.length && Object(external_this_wp_element_["createElement"])(panel, {
       
 25862     title: Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], null, Object(external_this_wp_i18n_["__"])('Blocks'))
       
 25863   }, Object(external_this_wp_element_["createElement"])("div", {
       
 25864     className: "block-editor-inserter__quick-inserter-patterns"
       
 25865   }, Object(external_this_wp_element_["createElement"])(block_patterns_list, {
       
 25866     shownPatterns: shownBlockPatterns,
       
 25867     blockPatterns: shownBlockPatterns,
       
 25868     onClickPattern: onSelectBlockPattern
       
 25869   }))));
       
 25870 }
       
 25871 
       
 25872 function QuickInserter(_ref2) {
       
 25873   var rootClientId = _ref2.rootClientId,
       
 25874       clientId = _ref2.clientId,
       
 25875       isAppender = _ref2.isAppender,
       
 25876       selectBlockOnInsert = _ref2.selectBlockOnInsert,
       
 25877       debouncedSpeak = _ref2.debouncedSpeak;
       
 25878 
       
 25879   var _useState = Object(external_this_wp_element_["useState"])(''),
       
 25880       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 25881       filterValue = _useState2[0],
       
 25882       setFilterValue = _useState2[1];
       
 25883 
       
 25884   var _useInsertionPoint = use_insertion_point({
       
 25885     rootClientId: rootClientId,
       
 25886     clientId: clientId,
       
 25887     isAppender: isAppender,
       
 25888     selectBlockOnInsert: selectBlockOnInsert
       
 25889   }),
       
 25890       _useInsertionPoint2 = Object(slicedToArray["a" /* default */])(_useInsertionPoint, 3),
       
 25891       destinationRootClientId = _useInsertionPoint2[0],
       
 25892       onInsertBlocks = _useInsertionPoint2[1],
       
 25893       onToggleInsertionPoint = _useInsertionPoint2[2];
       
 25894 
       
 25895   var _useBlockTypesState = use_block_types_state(destinationRootClientId, onInsertBlocks),
       
 25896       _useBlockTypesState2 = Object(slicedToArray["a" /* default */])(_useBlockTypesState, 4),
       
 25897       blockTypes = _useBlockTypesState2[0],
       
 25898       blockTypeCategories = _useBlockTypesState2[1],
       
 25899       blockTypeCollections = _useBlockTypesState2[2],
       
 25900       onSelectBlockType = _useBlockTypesState2[3];
       
 25901 
       
 25902   var _usePatternsState = use_patterns_state(onInsertBlocks),
       
 25903       _usePatternsState2 = Object(slicedToArray["a" /* default */])(_usePatternsState, 3),
       
 25904       patterns = _usePatternsState2[0],
       
 25905       onSelectBlockPattern = _usePatternsState2[2];
       
 25906 
       
 25907   var showPatterns = !destinationRootClientId && patterns.length && !!filterValue;
       
 25908   var showSearch = showPatterns && patterns.length > SEARCH_THRESHOLD || blockTypes.length > SEARCH_THRESHOLD;
       
 25909   var filteredBlockTypes = Object(external_this_wp_element_["useMemo"])(function () {
       
 25910     return search_items_searchBlockItems(blockTypes, blockTypeCategories, blockTypeCollections, filterValue);
       
 25911   }, [filterValue, blockTypes, blockTypeCategories, blockTypeCollections]);
       
 25912   var filteredBlockPatterns = Object(external_this_wp_element_["useMemo"])(function () {
       
 25913     return search_items_searchItems(patterns, filterValue);
       
 25914   }, [filterValue, patterns]);
       
 25915   var setInsererIsOpened = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 25916     return select('core/block-editor').getSettings().__experimentalSetIsInserterOpened;
       
 25917   }, []);
       
 25918   var previousBlockClientId = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 25919     return select('core/block-editor').getPreviousBlockClientId(clientId);
       
 25920   }, [clientId]);
       
 25921   Object(external_this_wp_element_["useEffect"])(function () {
       
 25922     if (setInsererIsOpened) {
       
 25923       setInsererIsOpened(false);
       
 25924     }
       
 25925   }, [setInsererIsOpened]);
       
 25926 
       
 25927   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 25928       selectBlock = _useDispatch.selectBlock; // Announce search results on change
       
 25929 
       
 25930 
       
 25931   Object(external_this_wp_element_["useEffect"])(function () {
       
 25932     if (!filterValue) {
       
 25933       return;
       
 25934     }
       
 25935 
       
 25936     var count = filteredBlockTypes.length + filteredBlockPatterns.length;
       
 25937     var resultsFoundMessage = Object(external_this_wp_i18n_["sprintf"])(
       
 25938     /* translators: %d: number of results. */
       
 25939     Object(external_this_wp_i18n_["_n"])('%d result found.', '%d results found.', count), count);
       
 25940     debouncedSpeak(resultsFoundMessage);
       
 25941   }, [filterValue, debouncedSpeak]); // When clicking Browse All select the appropriate block so as
       
 25942   // the insertion point can work as expected
       
 25943 
       
 25944   var onBrowseAll = function onBrowseAll() {
       
 25945     // We have to select the previous block because the menu inserter
       
 25946     // inserts the new block after the selected one.
       
 25947     // Ideally, this selection shouldn't focus the block to avoid the setTimeout.
       
 25948     selectBlock(previousBlockClientId); // eslint-disable-next-line @wordpress/react-no-unsafe-timeout
       
 25949 
       
 25950     setTimeout(function () {
       
 25951       setInsererIsOpened(true);
       
 25952     });
       
 25953   }; // Disable reason (no-autofocus): The inserter menu is a modal display, not one which
       
 25954   // is always visible, and one which already incurs this behavior of autoFocus via
       
 25955   // Popover's focusOnMount.
       
 25956   // Disable reason (no-static-element-interactions): Navigational key-presses within
       
 25957   // the menu are prevented from triggering WritingFlow and ObserveTyping interactions.
       
 25958 
       
 25959   /* eslint-disable jsx-a11y/no-autofocus, jsx-a11y/no-static-element-interactions */
       
 25960 
       
 25961 
       
 25962   return Object(external_this_wp_element_["createElement"])("div", {
       
 25963     className: "block-editor-inserter__quick-inserter",
       
 25964     onKeyPress: quick_inserter_stopKeyPropagation,
       
 25965     onKeyDown: quick_inserter_preventArrowKeysPropagation
       
 25966   }, showSearch && Object(external_this_wp_element_["createElement"])(search_form, {
       
 25967     value: filterValue,
       
 25968     onChange: function onChange(value) {
       
 25969       setFilterValue(value);
       
 25970     }
       
 25971   }), Object(external_this_wp_element_["createElement"])(QuickInserterList, {
       
 25972     blockTypes: filteredBlockTypes,
       
 25973     blockPatterns: showPatterns ? filteredBlockPatterns : [],
       
 25974     onSelectBlockPattern: onSelectBlockPattern,
       
 25975     onSelectBlockType: onSelectBlockType,
       
 25976     onHover: onToggleInsertionPoint
       
 25977   }), setInsererIsOpened && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 25978     className: "block-editor-inserter__quick-inserter-expand",
       
 25979     onClick: onBrowseAll,
       
 25980     "aria-label": Object(external_this_wp_i18n_["__"])('Browse all. This will open the main inserter panel in the editor toolbar.')
       
 25981   }, Object(external_this_wp_i18n_["__"])('Browse all')));
       
 25982   /* eslint-enable jsx-a11y/no-autofocus, jsx-a11y/no-static-element-interactions */
       
 25983 }
       
 25984 
       
 25985 /* harmony default export */ var quick_inserter = (Object(external_this_wp_components_["withSpokenMessages"])(QuickInserter));
       
 25986 
       
 25987 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/index.js
       
 25988 
       
 25989 
       
 25990 
       
 25991 
       
 25992 
       
 25993 
       
 25994 
       
 25995 
       
 25996 
       
 25997 function inserter_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (inserter_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 25998 
       
 25999 function inserter_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 26000 
       
 26001 /**
       
 26002  * External dependencies
       
 26003  */
       
 26004 
       
 26005 
       
 26006 /**
       
 26007  * WordPress dependencies
       
 26008  */
       
 26009 
       
 26010 
       
 26011 
       
 26012 
       
 26013 
       
 26014 
       
 26015 
       
 26016 
       
 26017 
       
 26018 /**
       
 26019  * Internal dependencies
       
 26020  */
       
 26021 
       
 26022 
       
 26023 
       
 26024 
       
 26025 var inserter_defaultRenderToggle = function defaultRenderToggle(_ref) {
       
 26026   var onToggle = _ref.onToggle,
       
 26027       disabled = _ref.disabled,
       
 26028       isOpen = _ref.isOpen,
       
 26029       blockTitle = _ref.blockTitle,
       
 26030       hasSingleBlockType = _ref.hasSingleBlockType,
       
 26031       toggleProps = _ref.toggleProps;
       
 26032   var label;
       
 26033 
       
 26034   if (hasSingleBlockType) {
       
 26035     label = Object(external_this_wp_i18n_["sprintf"])( // translators: %s: the name of the block when there is only one
       
 26036     Object(external_this_wp_i18n_["_x"])('Add %s', 'directly add the only allowed block'), blockTitle);
       
 26037   } else {
       
 26038     label = Object(external_this_wp_i18n_["_x"])('Add block', 'Generic label for block inserter button');
       
 26039   }
       
 26040 
       
 26041   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({
       
 26042     icon: plus["a" /* default */],
       
 26043     label: label,
       
 26044     tooltipPosition: "bottom",
       
 26045     onClick: onToggle,
       
 26046     className: "block-editor-inserter__toggle",
       
 26047     "aria-haspopup": !hasSingleBlockType ? 'true' : false,
       
 26048     "aria-expanded": !hasSingleBlockType ? isOpen : false,
       
 26049     disabled: disabled
       
 26050   }, toggleProps));
       
 26051 };
       
 26052 
       
 26053 var inserter_Inserter = /*#__PURE__*/function (_Component) {
       
 26054   Object(inherits["a" /* default */])(Inserter, _Component);
       
 26055 
       
 26056   var _super = inserter_createSuper(Inserter);
       
 26057 
       
 26058   function Inserter() {
       
 26059     var _this;
       
 26060 
       
 26061     Object(classCallCheck["a" /* default */])(this, Inserter);
       
 26062 
       
 26063     _this = _super.apply(this, arguments);
       
 26064     _this.onToggle = _this.onToggle.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 26065     _this.renderToggle = _this.renderToggle.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 26066     _this.renderContent = _this.renderContent.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 26067     return _this;
       
 26068   }
       
 26069 
       
 26070   Object(createClass["a" /* default */])(Inserter, [{
       
 26071     key: "onToggle",
       
 26072     value: function onToggle(isOpen) {
       
 26073       var onToggle = this.props.onToggle; // Surface toggle callback to parent component
       
 26074 
       
 26075       if (onToggle) {
       
 26076         onToggle(isOpen);
       
 26077       }
       
 26078     }
       
 26079     /**
       
 26080      * Render callback to display Dropdown toggle element.
       
 26081      *
       
 26082      * @param {Object}   options
       
 26083      * @param {Function} options.onToggle Callback to invoke when toggle is
       
 26084      *                                    pressed.
       
 26085      * @param {boolean}  options.isOpen   Whether dropdown is currently open.
       
 26086      *
       
 26087      * @return {WPElement} Dropdown toggle element.
       
 26088      */
       
 26089 
       
 26090   }, {
       
 26091     key: "renderToggle",
       
 26092     value: function renderToggle(_ref2) {
       
 26093       var onToggle = _ref2.onToggle,
       
 26094           isOpen = _ref2.isOpen;
       
 26095       var _this$props = this.props,
       
 26096           disabled = _this$props.disabled,
       
 26097           blockTitle = _this$props.blockTitle,
       
 26098           hasSingleBlockType = _this$props.hasSingleBlockType,
       
 26099           toggleProps = _this$props.toggleProps,
       
 26100           hasItems = _this$props.hasItems,
       
 26101           _this$props$renderTog = _this$props.renderToggle,
       
 26102           renderToggle = _this$props$renderTog === void 0 ? inserter_defaultRenderToggle : _this$props$renderTog;
       
 26103       return renderToggle({
       
 26104         onToggle: onToggle,
       
 26105         isOpen: isOpen,
       
 26106         disabled: disabled || !hasItems,
       
 26107         blockTitle: blockTitle,
       
 26108         hasSingleBlockType: hasSingleBlockType,
       
 26109         toggleProps: toggleProps
       
 26110       });
       
 26111     }
       
 26112     /**
       
 26113      * Render callback to display Dropdown content element.
       
 26114      *
       
 26115      * @param {Object}   options
       
 26116      * @param {Function} options.onClose Callback to invoke when dropdown is
       
 26117      *                                   closed.
       
 26118      *
       
 26119      * @return {WPElement} Dropdown content element.
       
 26120      */
       
 26121 
       
 26122   }, {
       
 26123     key: "renderContent",
       
 26124     value: function renderContent(_ref3) {
       
 26125       var onClose = _ref3.onClose;
       
 26126       var _this$props2 = this.props,
       
 26127           rootClientId = _this$props2.rootClientId,
       
 26128           clientId = _this$props2.clientId,
       
 26129           isAppender = _this$props2.isAppender,
       
 26130           showInserterHelpPanel = _this$props2.showInserterHelpPanel,
       
 26131           selectBlockOnInsert = _this$props2.__experimentalSelectBlockOnInsert,
       
 26132           isQuick = _this$props2.__experimentalIsQuick;
       
 26133 
       
 26134       if (isQuick) {
       
 26135         return Object(external_this_wp_element_["createElement"])(quick_inserter, {
       
 26136           rootClientId: rootClientId,
       
 26137           clientId: clientId,
       
 26138           isAppender: isAppender,
       
 26139           selectBlockOnInsert: selectBlockOnInsert
       
 26140         });
       
 26141       }
       
 26142 
       
 26143       return Object(external_this_wp_element_["createElement"])(menu, {
       
 26144         onSelect: onClose,
       
 26145         rootClientId: rootClientId,
       
 26146         clientId: clientId,
       
 26147         isAppender: isAppender,
       
 26148         showInserterHelpPanel: showInserterHelpPanel,
       
 26149         __experimentalSelectBlockOnInsert: selectBlockOnInsert
       
 26150       });
       
 26151     }
       
 26152   }, {
       
 26153     key: "render",
       
 26154     value: function render() {
       
 26155       var _this$props3 = this.props,
       
 26156           position = _this$props3.position,
       
 26157           hasSingleBlockType = _this$props3.hasSingleBlockType,
       
 26158           insertOnlyAllowedBlock = _this$props3.insertOnlyAllowedBlock,
       
 26159           isQuick = _this$props3.__experimentalIsQuick;
       
 26160 
       
 26161       if (hasSingleBlockType) {
       
 26162         return this.renderToggle({
       
 26163           onToggle: insertOnlyAllowedBlock
       
 26164         });
       
 26165       }
       
 26166 
       
 26167       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
       
 26168         className: "block-editor-inserter",
       
 26169         contentClassName: classnames_default()('block-editor-inserter__popover', {
       
 26170           'is-quick': isQuick
       
 26171         }),
       
 26172         position: position,
       
 26173         onToggle: this.onToggle,
       
 26174         expandOnMobile: true,
       
 26175         headerTitle: Object(external_this_wp_i18n_["__"])('Add a block'),
       
 26176         renderToggle: this.renderToggle,
       
 26177         renderContent: this.renderContent
       
 26178       });
       
 26179     }
       
 26180   }]);
       
 26181 
       
 26182   return Inserter;
       
 26183 }(external_this_wp_element_["Component"]);
       
 26184 
       
 26185 /* harmony default export */ var inserter = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref4) {
       
 26186   var clientId = _ref4.clientId,
       
 26187       rootClientId = _ref4.rootClientId;
       
 26188 
       
 26189   var _select = select('core/block-editor'),
       
 26190       getBlockRootClientId = _select.getBlockRootClientId,
       
 26191       hasInserterItems = _select.hasInserterItems,
       
 26192       __experimentalGetAllowedBlocks = _select.__experimentalGetAllowedBlocks;
       
 26193 
       
 26194   var _select2 = select('core/blocks'),
       
 26195       getBlockVariations = _select2.getBlockVariations;
       
 26196 
       
 26197   rootClientId = rootClientId || getBlockRootClientId(clientId) || undefined;
       
 26198 
       
 26199   var allowedBlocks = __experimentalGetAllowedBlocks(rootClientId);
       
 26200 
       
 26201   var hasSingleBlockType = Object(external_this_lodash_["size"])(allowedBlocks) === 1 && Object(external_this_lodash_["size"])(getBlockVariations(allowedBlocks[0].name, 'inserter')) === 0;
       
 26202   var allowedBlockType = false;
       
 26203 
       
 26204   if (hasSingleBlockType) {
       
 26205     allowedBlockType = allowedBlocks[0];
       
 26206   }
       
 26207 
       
 26208   return {
       
 26209     hasItems: hasInserterItems(rootClientId),
       
 26210     hasSingleBlockType: hasSingleBlockType,
       
 26211     blockTitle: allowedBlockType ? allowedBlockType.title : '',
       
 26212     allowedBlockType: allowedBlockType,
       
 26213     rootClientId: rootClientId
       
 26214   };
       
 26215 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps, _ref5) {
       
 26216   var select = _ref5.select;
       
 26217   return {
       
 26218     insertOnlyAllowedBlock: function insertOnlyAllowedBlock() {
       
 26219       var rootClientId = ownProps.rootClientId,
       
 26220           clientId = ownProps.clientId,
       
 26221           isAppender = ownProps.isAppender;
       
 26222       var hasSingleBlockType = ownProps.hasSingleBlockType,
       
 26223           allowedBlockType = ownProps.allowedBlockType,
       
 26224           selectBlockOnInsert = ownProps.__experimentalSelectBlockOnInsert;
       
 26225 
       
 26226       if (!hasSingleBlockType) {
       
 26227         return;
       
 26228       }
       
 26229 
       
 26230       function getInsertionIndex() {
       
 26231         var _select3 = select('core/block-editor'),
       
 26232             getBlockIndex = _select3.getBlockIndex,
       
 26233             getBlockSelectionEnd = _select3.getBlockSelectionEnd,
       
 26234             getBlockOrder = _select3.getBlockOrder; // If the clientId is defined, we insert at the position of the block.
       
 26235 
       
 26236 
       
 26237         if (clientId) {
       
 26238           return getBlockIndex(clientId, rootClientId);
       
 26239         } // If there a selected block, we insert after the selected block.
       
 26240 
       
 26241 
       
 26242         var end = getBlockSelectionEnd();
       
 26243 
       
 26244         if (!isAppender && end) {
       
 26245           return getBlockIndex(end, rootClientId) + 1;
       
 26246         } // Otherwise, we insert at the end of the current rootClientId
       
 26247 
       
 26248 
       
 26249         return getBlockOrder(rootClientId).length;
       
 26250       }
       
 26251 
       
 26252       var _dispatch = dispatch('core/block-editor'),
       
 26253           insertBlock = _dispatch.insertBlock;
       
 26254 
       
 26255       var blockToInsert = Object(external_this_wp_blocks_["createBlock"])(allowedBlockType.name);
       
 26256       insertBlock(blockToInsert, getInsertionIndex(), rootClientId, selectBlockOnInsert);
       
 26257 
       
 26258       if (!selectBlockOnInsert) {
       
 26259         var message = Object(external_this_wp_i18n_["sprintf"])( // translators: %s: the name of the block that has been added
       
 26260         Object(external_this_wp_i18n_["__"])('%s block added'), allowedBlockType.title);
       
 26261         Object(external_this_wp_a11y_["speak"])(message);
       
 26262       }
       
 26263     }
       
 26264   };
       
 26265 }), // The global inserter should always be visible, we are using ( ! isAppender && ! rootClientId && ! clientId ) as
       
 26266 // a way to detect the global Inserter.
       
 26267 Object(external_this_wp_compose_["ifCondition"])(function (_ref6) {
       
 26268   var hasItems = _ref6.hasItems,
       
 26269       isAppender = _ref6.isAppender,
       
 26270       rootClientId = _ref6.rootClientId,
       
 26271       clientId = _ref6.clientId;
       
 26272   return hasItems || !isAppender && !rootClientId && !clientId;
       
 26273 })])(inserter_Inserter));
       
 26274 
       
 26275 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/writing-flow/focus-capture.js
       
 26276 
       
 26277 
       
 26278 /**
       
 26279  * External dependencies
       
 26280  */
       
 26281 
       
 26282 /**
       
 26283  * WordPress dependencies
       
 26284  */
       
 26285 
       
 26286 
       
 26287 
       
 26288 
       
 26289 /**
       
 26290  * Internal dependencies
       
 26291  */
       
 26292 
       
 26293 
       
 26294 /**
       
 26295  * Renders focus capturing areas to redirect focus to the selected block if not
       
 26296  * in Navigation mode.
       
 26297  *
       
 26298  * @param {string}  selectedClientId Client ID of the selected block.
       
 26299  * @param {boolean} isReverse        Set to true if the component is rendered
       
 26300  *                                   after the block list, false if rendered
       
 26301  *                                   before.
       
 26302  * @param {Object}  containerRef     Reference containing the element reference
       
 26303  *                                   of the block list container.
       
 26304  * @param {boolean} noCapture        Reference containing the flag for enabling
       
 26305  *                                   or disabling capturing.
       
 26306  *
       
 26307  * @return {WPElement} The focus capture element.
       
 26308  */
       
 26309 
       
 26310 var FocusCapture = Object(external_this_wp_element_["forwardRef"])(function (_ref, ref) {
       
 26311   var selectedClientId = _ref.selectedClientId,
       
 26312       isReverse = _ref.isReverse,
       
 26313       containerRef = _ref.containerRef,
       
 26314       noCapture = _ref.noCapture,
       
 26315       hasMultiSelection = _ref.hasMultiSelection,
       
 26316       multiSelectionContainer = _ref.multiSelectionContainer;
       
 26317   var isNavigationMode = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 26318     return select('core/block-editor').isNavigationMode();
       
 26319   });
       
 26320 
       
 26321   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 26322       setNavigationMode = _useDispatch.setNavigationMode;
       
 26323 
       
 26324   function onFocus() {
       
 26325     // Do not capture incoming focus if set by us in WritingFlow.
       
 26326     if (noCapture.current) {
       
 26327       noCapture.current = null;
       
 26328       return;
       
 26329     } // When focus coming in from out of the block list, and no block is
       
 26330     // selected, enable Navigation mode and select the first or last block
       
 26331     // depending on the direction.
       
 26332 
       
 26333 
       
 26334     if (!selectedClientId) {
       
 26335       if (hasMultiSelection) {
       
 26336         multiSelectionContainer.current.focus();
       
 26337         return;
       
 26338       }
       
 26339 
       
 26340       setNavigationMode(true);
       
 26341       var tabbables = external_this_wp_dom_["focus"].tabbable.find(containerRef.current);
       
 26342 
       
 26343       if (tabbables.length) {
       
 26344         if (isReverse) {
       
 26345           Object(external_this_lodash_["last"])(tabbables).focus();
       
 26346         } else {
       
 26347           Object(external_this_lodash_["first"])(tabbables).focus();
       
 26348         }
       
 26349       }
       
 26350 
       
 26351       return;
       
 26352     } // If there is a selected block, move focus to the first or last
       
 26353     // tabbable element depending on the direction.
       
 26354 
       
 26355 
       
 26356     var wrapper = getBlockDOMNode(selectedClientId);
       
 26357 
       
 26358     if (isReverse) {
       
 26359       var _tabbables = external_this_wp_dom_["focus"].tabbable.find(wrapper);
       
 26360 
       
 26361       var lastTabbable = Object(external_this_lodash_["last"])(_tabbables) || wrapper;
       
 26362       lastTabbable.focus();
       
 26363     } else {
       
 26364       wrapper.focus();
       
 26365     }
       
 26366   }
       
 26367 
       
 26368   return Object(external_this_wp_element_["createElement"])("div", {
       
 26369     ref: ref // Don't allow tabbing to this element in Navigation mode.
       
 26370     ,
       
 26371     tabIndex: !isNavigationMode ? '0' : undefined,
       
 26372     onFocus: onFocus // Needs to be positioned within the viewport, so focus to this
       
 26373     // element does not scroll the page.
       
 26374     ,
       
 26375     style: {
       
 26376       position: 'fixed'
       
 26377     }
       
 26378   });
       
 26379 });
       
 26380 /* harmony default export */ var focus_capture = (FocusCapture);
       
 26381 
       
 26382 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/writing-flow/index.js
       
 26383 
       
 26384 
       
 26385 
       
 26386 /**
       
 26387  * External dependencies
       
 26388  */
       
 26389 
       
 26390 
       
 26391 /**
       
 26392  * WordPress dependencies
       
 26393  */
       
 26394 
       
 26395 
       
 26396 
       
 26397 
       
 26398 
       
 26399 
       
 26400 /**
       
 26401  * Internal dependencies
       
 26402  */
       
 26403 
       
 26404 
       
 26405 
       
 26406 /**
       
 26407  * Browser constants
       
 26408  */
       
 26409 
       
 26410 var writing_flow_window = window,
       
 26411     getSelection = writing_flow_window.getSelection,
       
 26412     writing_flow_getComputedStyle = writing_flow_window.getComputedStyle;
       
 26413 /**
       
 26414  * Given an element, returns true if the element is a tabbable text field, or
       
 26415  * false otherwise.
       
 26416  *
       
 26417  * @param {Element} element Element to test.
       
 26418  *
       
 26419  * @return {boolean} Whether element is a tabbable text field.
       
 26420  */
       
 26421 
       
 26422 var isTabbableTextField = Object(external_this_lodash_["overEvery"])([external_this_wp_dom_["isTextField"], external_this_wp_dom_["focus"].tabbable.isTabbableIndex]);
       
 26423 /**
       
 26424  * Returns true if the element should consider edge navigation upon a keyboard
       
 26425  * event of the given directional key code, or false otherwise.
       
 26426  *
       
 26427  * @param {Element} element     HTML element to test.
       
 26428  * @param {number}  keyCode     KeyboardEvent keyCode to test.
       
 26429  * @param {boolean} hasModifier Whether a modifier is pressed.
       
 26430  *
       
 26431  * @return {boolean} Whether element should consider edge navigation.
       
 26432  */
       
 26433 
       
 26434 function isNavigationCandidate(element, keyCode, hasModifier) {
       
 26435   var isVertical = keyCode === external_this_wp_keycodes_["UP"] || keyCode === external_this_wp_keycodes_["DOWN"]; // Currently, all elements support unmodified vertical navigation.
       
 26436 
       
 26437   if (isVertical && !hasModifier) {
       
 26438     return true;
       
 26439   } // Native inputs should not navigate horizontally.
       
 26440 
       
 26441 
       
 26442   var tagName = element.tagName;
       
 26443   return tagName !== 'INPUT' && tagName !== 'TEXTAREA';
       
 26444 }
       
 26445 /**
       
 26446  * Returns the optimal tab target from the given focused element in the
       
 26447  * desired direction. A preference is made toward text fields, falling back
       
 26448  * to the block focus stop if no other candidates exist for the block.
       
 26449  *
       
 26450  * @param {Element} target           Currently focused text field.
       
 26451  * @param {boolean} isReverse        True if considering as the first field.
       
 26452  * @param {Element} containerElement Element containing all blocks.
       
 26453  * @param {boolean} onlyVertical     Wether to only consider tabbable elements
       
 26454  *                                   that are visually above or under the
       
 26455  *                                   target.
       
 26456  *
       
 26457  * @return {?Element} Optimal tab target, if one exists.
       
 26458  */
       
 26459 
       
 26460 function getClosestTabbable(target, isReverse, containerElement, onlyVertical) {
       
 26461   // Since the current focus target is not guaranteed to be a text field,
       
 26462   // find all focusables. Tabbability is considered later.
       
 26463   var focusableNodes = external_this_wp_dom_["focus"].focusable.find(containerElement);
       
 26464 
       
 26465   if (isReverse) {
       
 26466     focusableNodes = Object(external_this_lodash_["reverse"])(focusableNodes);
       
 26467   } // Consider as candidates those focusables after the current target.
       
 26468   // It's assumed this can only be reached if the target is focusable
       
 26469   // (on its keydown event), so no need to verify it exists in the set.
       
 26470 
       
 26471 
       
 26472   focusableNodes = focusableNodes.slice(focusableNodes.indexOf(target) + 1);
       
 26473   var targetRect;
       
 26474 
       
 26475   if (onlyVertical) {
       
 26476     targetRect = target.getBoundingClientRect();
       
 26477   }
       
 26478 
       
 26479   function isTabCandidate(node, i, array) {
       
 26480     // Not a candidate if the node is not tabbable.
       
 26481     if (!external_this_wp_dom_["focus"].tabbable.isTabbableIndex(node)) {
       
 26482       return false;
       
 26483     }
       
 26484 
       
 26485     if (onlyVertical) {
       
 26486       var nodeRect = node.getBoundingClientRect();
       
 26487 
       
 26488       if (nodeRect.left >= targetRect.right || nodeRect.right <= targetRect.left) {
       
 26489         return false;
       
 26490       }
       
 26491     } // Prefer text fields...
       
 26492 
       
 26493 
       
 26494     if (Object(external_this_wp_dom_["isTextField"])(node)) {
       
 26495       return true;
       
 26496     } // ...but settle for block focus stop.
       
 26497 
       
 26498 
       
 26499     if (!isBlockFocusStop(node)) {
       
 26500       return false;
       
 26501     } // If element contains inner blocks, stop immediately at its focus
       
 26502     // wrapper.
       
 26503 
       
 26504 
       
 26505     if (hasInnerBlocksContext(node)) {
       
 26506       return true;
       
 26507     } // If navigating out of a block (in reverse), don't consider its
       
 26508     // block focus stop.
       
 26509 
       
 26510 
       
 26511     if (node.contains(target)) {
       
 26512       return false;
       
 26513     } // In case of block focus stop, check to see if there's a better
       
 26514     // text field candidate within.
       
 26515 
       
 26516 
       
 26517     for (var offset = 1, nextNode; nextNode = array[i + offset]; offset++) {
       
 26518       // Abort if no longer testing descendents of focus stop.
       
 26519       if (!node.contains(nextNode)) {
       
 26520         break;
       
 26521       } // Apply same tests by recursion. This is important to consider
       
 26522       // nestable blocks where we don't want to settle for the inner
       
 26523       // block focus stop.
       
 26524 
       
 26525 
       
 26526       if (isTabCandidate(nextNode, i + offset, array)) {
       
 26527         return false;
       
 26528       }
       
 26529     }
       
 26530 
       
 26531     return true;
       
 26532   }
       
 26533 
       
 26534   return Object(external_this_lodash_["find"])(focusableNodes, isTabCandidate);
       
 26535 }
       
 26536 
       
 26537 function writing_flow_selector(select) {
       
 26538   var _select = select('core/block-editor'),
       
 26539       getSelectedBlockClientId = _select.getSelectedBlockClientId,
       
 26540       getMultiSelectedBlocksStartClientId = _select.getMultiSelectedBlocksStartClientId,
       
 26541       getMultiSelectedBlocksEndClientId = _select.getMultiSelectedBlocksEndClientId,
       
 26542       getPreviousBlockClientId = _select.getPreviousBlockClientId,
       
 26543       getNextBlockClientId = _select.getNextBlockClientId,
       
 26544       getFirstMultiSelectedBlockClientId = _select.getFirstMultiSelectedBlockClientId,
       
 26545       getLastMultiSelectedBlockClientId = _select.getLastMultiSelectedBlockClientId,
       
 26546       hasMultiSelection = _select.hasMultiSelection,
       
 26547       getBlockOrder = _select.getBlockOrder,
       
 26548       isNavigationMode = _select.isNavigationMode,
       
 26549       hasBlockMovingClientId = _select.hasBlockMovingClientId,
       
 26550       getBlockIndex = _select.getBlockIndex,
       
 26551       getBlockRootClientId = _select.getBlockRootClientId,
       
 26552       getClientIdsOfDescendants = _select.getClientIdsOfDescendants,
       
 26553       canInsertBlockType = _select.canInsertBlockType,
       
 26554       getBlockName = _select.getBlockName,
       
 26555       isSelectionEnabled = _select.isSelectionEnabled,
       
 26556       getBlockSelectionStart = _select.getBlockSelectionStart,
       
 26557       isMultiSelecting = _select.isMultiSelecting,
       
 26558       getSettings = _select.getSettings;
       
 26559 
       
 26560   var selectedBlockClientId = getSelectedBlockClientId();
       
 26561   var selectionStartClientId = getMultiSelectedBlocksStartClientId();
       
 26562   var selectionEndClientId = getMultiSelectedBlocksEndClientId();
       
 26563   return {
       
 26564     selectedBlockClientId: selectedBlockClientId,
       
 26565     selectionStartClientId: selectionStartClientId,
       
 26566     selectionBeforeEndClientId: getPreviousBlockClientId(selectionEndClientId || selectedBlockClientId),
       
 26567     selectionAfterEndClientId: getNextBlockClientId(selectionEndClientId || selectedBlockClientId),
       
 26568     selectedFirstClientId: getFirstMultiSelectedBlockClientId(),
       
 26569     selectedLastClientId: getLastMultiSelectedBlockClientId(),
       
 26570     hasMultiSelection: hasMultiSelection(),
       
 26571     blocks: getBlockOrder(),
       
 26572     isNavigationMode: isNavigationMode(),
       
 26573     hasBlockMovingClientId: hasBlockMovingClientId,
       
 26574     getBlockIndex: getBlockIndex,
       
 26575     getBlockRootClientId: getBlockRootClientId,
       
 26576     getClientIdsOfDescendants: getClientIdsOfDescendants,
       
 26577     canInsertBlockType: canInsertBlockType,
       
 26578     getBlockName: getBlockName,
       
 26579     isSelectionEnabled: isSelectionEnabled(),
       
 26580     blockSelectionStart: getBlockSelectionStart(),
       
 26581     isMultiSelecting: isMultiSelecting(),
       
 26582     keepCaretInsideBlock: getSettings().keepCaretInsideBlock
       
 26583   };
       
 26584 }
       
 26585 /**
       
 26586  * Handles selection and navigation across blocks. This component should be
       
 26587  * wrapped around BlockList.
       
 26588  *
       
 26589  * @param {Object}    props          Component properties.
       
 26590  * @param {WPElement} props.children Children to be rendered.
       
 26591  */
       
 26592 
       
 26593 
       
 26594 function WritingFlow(_ref) {
       
 26595   var children = _ref.children;
       
 26596   var container = Object(external_this_wp_element_["useRef"])();
       
 26597   var focusCaptureBeforeRef = Object(external_this_wp_element_["useRef"])();
       
 26598   var focusCaptureAfterRef = Object(external_this_wp_element_["useRef"])();
       
 26599   var multiSelectionContainer = Object(external_this_wp_element_["useRef"])();
       
 26600   var entirelySelected = Object(external_this_wp_element_["useRef"])(); // Reference that holds the a flag for enabling or disabling
       
 26601   // capturing on the focus capture elements.
       
 26602 
       
 26603   var noCapture = Object(external_this_wp_element_["useRef"])(); // Here a DOMRect is stored while moving the caret vertically so vertical
       
 26604   // position of the start position can be restored. This is to recreate
       
 26605   // browser behaviour across blocks.
       
 26606 
       
 26607   var verticalRect = Object(external_this_wp_element_["useRef"])();
       
 26608 
       
 26609   var _useSelect = Object(external_this_wp_data_["useSelect"])(writing_flow_selector, []),
       
 26610       selectedBlockClientId = _useSelect.selectedBlockClientId,
       
 26611       selectionStartClientId = _useSelect.selectionStartClientId,
       
 26612       selectionBeforeEndClientId = _useSelect.selectionBeforeEndClientId,
       
 26613       selectionAfterEndClientId = _useSelect.selectionAfterEndClientId,
       
 26614       selectedFirstClientId = _useSelect.selectedFirstClientId,
       
 26615       selectedLastClientId = _useSelect.selectedLastClientId,
       
 26616       hasMultiSelection = _useSelect.hasMultiSelection,
       
 26617       blocks = _useSelect.blocks,
       
 26618       isNavigationMode = _useSelect.isNavigationMode,
       
 26619       hasBlockMovingClientId = _useSelect.hasBlockMovingClientId,
       
 26620       isSelectionEnabled = _useSelect.isSelectionEnabled,
       
 26621       blockSelectionStart = _useSelect.blockSelectionStart,
       
 26622       isMultiSelecting = _useSelect.isMultiSelecting,
       
 26623       getBlockIndex = _useSelect.getBlockIndex,
       
 26624       getBlockRootClientId = _useSelect.getBlockRootClientId,
       
 26625       getClientIdsOfDescendants = _useSelect.getClientIdsOfDescendants,
       
 26626       canInsertBlockType = _useSelect.canInsertBlockType,
       
 26627       getBlockName = _useSelect.getBlockName,
       
 26628       keepCaretInsideBlock = _useSelect.keepCaretInsideBlock;
       
 26629 
       
 26630   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 26631       multiSelect = _useDispatch.multiSelect,
       
 26632       selectBlock = _useDispatch.selectBlock,
       
 26633       clearSelectedBlock = _useDispatch.clearSelectedBlock,
       
 26634       setNavigationMode = _useDispatch.setNavigationMode,
       
 26635       setBlockMovingClientId = _useDispatch.setBlockMovingClientId,
       
 26636       moveBlockToPosition = _useDispatch.moveBlockToPosition;
       
 26637 
       
 26638   var _useState = Object(external_this_wp_element_["useState"])(false),
       
 26639       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 26640       canInsertMovingBlock = _useState2[0],
       
 26641       setCanInsertMovingBlock = _useState2[1];
       
 26642 
       
 26643   function onMouseDown(event) {
       
 26644     verticalRect.current = null; // Clicking inside a selected block should exit navigation mode and block moving mode.
       
 26645 
       
 26646     if (isNavigationMode && selectedBlockClientId && isInsideRootBlock(getBlockDOMNode(selectedBlockClientId), event.target)) {
       
 26647       setNavigationMode(false);
       
 26648       setBlockMovingClientId(null);
       
 26649     } else if (isNavigationMode && hasBlockMovingClientId() && getBlockClientId(event.target)) {
       
 26650       setCanInsertMovingBlock(canInsertBlockType(getBlockName(hasBlockMovingClientId()), getBlockRootClientId(getBlockClientId(event.target))));
       
 26651     } // Multi-select blocks when Shift+clicking.
       
 26652 
       
 26653 
       
 26654     if (isSelectionEnabled && // The main button.
       
 26655     // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
       
 26656     event.button === 0) {
       
 26657       var clientId = getBlockClientId(event.target);
       
 26658 
       
 26659       if (clientId) {
       
 26660         if (event.shiftKey) {
       
 26661           if (blockSelectionStart !== clientId) {
       
 26662             multiSelect(blockSelectionStart, clientId);
       
 26663             event.preventDefault();
       
 26664           } // Allow user to escape out of a multi-selection to a singular
       
 26665           // selection of a block via click. This is handled here since
       
 26666           // focus handling excludes blocks when there is multiselection,
       
 26667           // as focus can be incurred by starting a multiselection (focus
       
 26668           // moved to first block's multi-controls).
       
 26669 
       
 26670         } else if (hasMultiSelection) {
       
 26671           selectBlock(clientId);
       
 26672         }
       
 26673       }
       
 26674     }
       
 26675   }
       
 26676 
       
 26677   function expandSelection(isReverse) {
       
 26678     var nextSelectionEndClientId = isReverse ? selectionBeforeEndClientId : selectionAfterEndClientId;
       
 26679 
       
 26680     if (nextSelectionEndClientId) {
       
 26681       multiSelect(selectionStartClientId || selectedBlockClientId, nextSelectionEndClientId);
       
 26682     }
       
 26683   }
       
 26684 
       
 26685   function moveSelection(isReverse) {
       
 26686     var focusedBlockClientId = isReverse ? selectedFirstClientId : selectedLastClientId;
       
 26687 
       
 26688     if (focusedBlockClientId) {
       
 26689       selectBlock(focusedBlockClientId);
       
 26690     }
       
 26691   }
       
 26692   /**
       
 26693    * Returns true if the given target field is the last in its block which
       
 26694    * can be considered for tab transition. For example, in a block with two
       
 26695    * text fields, this would return true when reversing from the first of the
       
 26696    * two fields, but false when reversing from the second.
       
 26697    *
       
 26698    * @param {Element} target    Currently focused text field.
       
 26699    * @param {boolean} isReverse True if considering as the first field.
       
 26700    *
       
 26701    * @return {boolean} Whether field is at edge for tab transition.
       
 26702    */
       
 26703 
       
 26704 
       
 26705   function isTabbableEdge(target, isReverse) {
       
 26706     var closestTabbable = getClosestTabbable(target, isReverse, container.current);
       
 26707     return !closestTabbable || !isInSameBlock(target, closestTabbable);
       
 26708   }
       
 26709 
       
 26710   function onKeyDown(event) {
       
 26711     var keyCode = event.keyCode,
       
 26712         target = event.target;
       
 26713     var isUp = keyCode === external_this_wp_keycodes_["UP"];
       
 26714     var isDown = keyCode === external_this_wp_keycodes_["DOWN"];
       
 26715     var isLeft = keyCode === external_this_wp_keycodes_["LEFT"];
       
 26716     var isRight = keyCode === external_this_wp_keycodes_["RIGHT"];
       
 26717     var isTab = keyCode === external_this_wp_keycodes_["TAB"];
       
 26718     var isEscape = keyCode === external_this_wp_keycodes_["ESCAPE"];
       
 26719     var isEnter = keyCode === external_this_wp_keycodes_["ENTER"];
       
 26720     var isSpace = keyCode === external_this_wp_keycodes_["SPACE"];
       
 26721     var isReverse = isUp || isLeft;
       
 26722     var isHorizontal = isLeft || isRight;
       
 26723     var isVertical = isUp || isDown;
       
 26724     var isNav = isHorizontal || isVertical;
       
 26725     var isShift = event.shiftKey;
       
 26726     var hasModifier = isShift || event.ctrlKey || event.altKey || event.metaKey;
       
 26727     var isNavEdge = isVertical ? external_this_wp_dom_["isVerticalEdge"] : external_this_wp_dom_["isHorizontalEdge"]; // In navigation mode, tab and arrows navigate from block to block.
       
 26728 
       
 26729     if (isNavigationMode) {
       
 26730       var navigateUp = isTab && isShift || isUp;
       
 26731       var navigateDown = isTab && !isShift || isDown; // Move out of current nesting level (no effect if at root level).
       
 26732 
       
 26733       var navigateOut = isLeft; // Move into next nesting level (no effect if the current block has no innerBlocks).
       
 26734 
       
 26735       var navigateIn = isRight;
       
 26736       var focusedBlockUid;
       
 26737 
       
 26738       if (navigateUp) {
       
 26739         focusedBlockUid = selectionBeforeEndClientId;
       
 26740       } else if (navigateDown) {
       
 26741         focusedBlockUid = selectionAfterEndClientId;
       
 26742       } else if (navigateOut) {
       
 26743         var _getBlockRootClientId;
       
 26744 
       
 26745         focusedBlockUid = (_getBlockRootClientId = getBlockRootClientId(selectedBlockClientId)) !== null && _getBlockRootClientId !== void 0 ? _getBlockRootClientId : selectedBlockClientId;
       
 26746       } else if (navigateIn) {
       
 26747         var _getClientIdsOfDescen;
       
 26748 
       
 26749         focusedBlockUid = (_getClientIdsOfDescen = getClientIdsOfDescendants([selectedBlockClientId])[0]) !== null && _getClientIdsOfDescen !== void 0 ? _getClientIdsOfDescen : selectedBlockClientId;
       
 26750       }
       
 26751 
       
 26752       var startingBlockClientId = hasBlockMovingClientId();
       
 26753 
       
 26754       if (startingBlockClientId && focusedBlockUid) {
       
 26755         setCanInsertMovingBlock(canInsertBlockType(getBlockName(startingBlockClientId), getBlockRootClientId(focusedBlockUid)));
       
 26756       }
       
 26757 
       
 26758       if (isEscape && startingBlockClientId) {
       
 26759         setBlockMovingClientId(null);
       
 26760         setCanInsertMovingBlock(false);
       
 26761       }
       
 26762 
       
 26763       if ((isEnter || isSpace) && startingBlockClientId) {
       
 26764         var sourceRoot = getBlockRootClientId(startingBlockClientId);
       
 26765         var destRoot = getBlockRootClientId(selectedBlockClientId);
       
 26766         var sourceBlockIndex = getBlockIndex(startingBlockClientId, sourceRoot);
       
 26767         var destinationBlockIndex = getBlockIndex(selectedBlockClientId, destRoot);
       
 26768 
       
 26769         if (sourceBlockIndex < destinationBlockIndex && sourceRoot === destRoot) {
       
 26770           destinationBlockIndex -= 1;
       
 26771         }
       
 26772 
       
 26773         moveBlockToPosition(startingBlockClientId, sourceRoot, destRoot, destinationBlockIndex);
       
 26774         selectBlock(startingBlockClientId);
       
 26775         setBlockMovingClientId(null);
       
 26776       }
       
 26777 
       
 26778       if (navigateDown || navigateUp || navigateOut || navigateIn) {
       
 26779         if (focusedBlockUid) {
       
 26780           event.preventDefault();
       
 26781           selectBlock(focusedBlockUid);
       
 26782         } else if (isTab && selectedBlockClientId) {
       
 26783           var wrapper = getBlockDOMNode(selectedBlockClientId);
       
 26784           var nextTabbable;
       
 26785 
       
 26786           if (navigateDown) {
       
 26787             nextTabbable = external_this_wp_dom_["focus"].tabbable.findNext(wrapper);
       
 26788           } else {
       
 26789             nextTabbable = external_this_wp_dom_["focus"].tabbable.findPrevious(wrapper);
       
 26790           }
       
 26791 
       
 26792           if (nextTabbable) {
       
 26793             event.preventDefault();
       
 26794             nextTabbable.focus();
       
 26795             clearSelectedBlock();
       
 26796           }
       
 26797         }
       
 26798       }
       
 26799 
       
 26800       return;
       
 26801     } // In Edit mode, Tab should focus the first tabbable element after the
       
 26802     // content, which is normally the sidebar (with block controls) and
       
 26803     // Shift+Tab should focus the first tabbable element before the content,
       
 26804     // which is normally the block toolbar.
       
 26805     // Arrow keys can be used, and Tab and arrow keys can be used in
       
 26806     // Navigation mode (press Esc), to navigate through blocks.
       
 26807 
       
 26808 
       
 26809     if (selectedBlockClientId) {
       
 26810       if (isTab) {
       
 26811         var _wrapper = getBlockDOMNode(selectedBlockClientId);
       
 26812 
       
 26813         if (isShift) {
       
 26814           if (target === _wrapper) {
       
 26815             // Disable focus capturing on the focus capture element, so
       
 26816             // it doesn't refocus this block and so it allows default
       
 26817             // behaviour (moving focus to the next tabbable element).
       
 26818             noCapture.current = true;
       
 26819             focusCaptureBeforeRef.current.focus();
       
 26820             return;
       
 26821           }
       
 26822         } else {
       
 26823           var tabbables = external_this_wp_dom_["focus"].tabbable.find(_wrapper);
       
 26824 
       
 26825           var lastTabbable = Object(external_this_lodash_["last"])(tabbables) || _wrapper;
       
 26826 
       
 26827           if (target === lastTabbable) {
       
 26828             // See comment above.
       
 26829             noCapture.current = true;
       
 26830             focusCaptureAfterRef.current.focus();
       
 26831             return;
       
 26832           }
       
 26833         }
       
 26834       } else if (isEscape) {
       
 26835         setNavigationMode(true);
       
 26836       }
       
 26837     } else if (hasMultiSelection && isTab && target === multiSelectionContainer.current) {
       
 26838       // See comment above.
       
 26839       noCapture.current = true;
       
 26840 
       
 26841       if (isShift) {
       
 26842         focusCaptureBeforeRef.current.focus();
       
 26843       } else {
       
 26844         focusCaptureAfterRef.current.focus();
       
 26845       }
       
 26846 
       
 26847       return;
       
 26848     } // When presing any key other than up or down, the initial vertical
       
 26849     // position must ALWAYS be reset. The vertical position is saved so it
       
 26850     // can be restored as well as possible on sebsequent vertical arrow key
       
 26851     // presses. It may not always be possible to restore the exact same
       
 26852     // position (such as at an empty line), so it wouldn't be good to
       
 26853     // compute the position right before any vertical arrow key press.
       
 26854 
       
 26855 
       
 26856     if (!isVertical) {
       
 26857       verticalRect.current = null;
       
 26858     } else if (!verticalRect.current) {
       
 26859       verticalRect.current = Object(external_this_wp_dom_["computeCaretRect"])();
       
 26860     } // This logic inside this condition needs to be checked before
       
 26861     // the check for event.nativeEvent.defaultPrevented.
       
 26862     // The logic handles meta+a keypress and this event is default prevented
       
 26863     // by RichText.
       
 26864 
       
 26865 
       
 26866     if (!isNav) {
       
 26867       // Set immediately before the meta+a combination can be pressed.
       
 26868       if (external_this_wp_keycodes_["isKeyboardEvent"].primary(event)) {
       
 26869         entirelySelected.current = Object(external_this_wp_dom_["isEntirelySelected"])(target);
       
 26870       }
       
 26871 
       
 26872       if (external_this_wp_keycodes_["isKeyboardEvent"].primary(event, 'a')) {
       
 26873         // When the target is contentEditable, selection will already
       
 26874         // have been set by the browser earlier in this call stack. We
       
 26875         // need check the previous result, otherwise all blocks will be
       
 26876         // selected right away.
       
 26877         if (target.isContentEditable ? entirelySelected.current : Object(external_this_wp_dom_["isEntirelySelected"])(target)) {
       
 26878           multiSelect(Object(external_this_lodash_["first"])(blocks), Object(external_this_lodash_["last"])(blocks));
       
 26879           event.preventDefault();
       
 26880         } // After pressing primary + A we can assume isEntirelySelected is true.
       
 26881         // Calling right away isEntirelySelected after primary + A may still return false on some browsers.
       
 26882 
       
 26883 
       
 26884         entirelySelected.current = true;
       
 26885       }
       
 26886 
       
 26887       return;
       
 26888     } // Abort if navigation has already been handled (e.g. RichText inline
       
 26889     // boundaries).
       
 26890 
       
 26891 
       
 26892     if (event.nativeEvent.defaultPrevented) {
       
 26893       return;
       
 26894     } // Abort if our current target is not a candidate for navigation (e.g.
       
 26895     // preserve native input behaviors).
       
 26896 
       
 26897 
       
 26898     if (!isNavigationCandidate(target, keyCode, hasModifier)) {
       
 26899       return;
       
 26900     } // In the case of RTL scripts, right means previous and left means next,
       
 26901     // which is the exact reverse of LTR.
       
 26902 
       
 26903 
       
 26904     var _getComputedStyle = writing_flow_getComputedStyle(target),
       
 26905         direction = _getComputedStyle.direction;
       
 26906 
       
 26907     var isReverseDir = direction === 'rtl' ? !isReverse : isReverse;
       
 26908 
       
 26909     if (isShift) {
       
 26910       if ( // Ensure that there is a target block.
       
 26911       (isReverse && selectionBeforeEndClientId || !isReverse && selectionAfterEndClientId) && (hasMultiSelection || isTabbableEdge(target, isReverse) && isNavEdge(target, isReverse))) {
       
 26912         // Shift key is down, and there is multi selection or we're at
       
 26913         // the end of the current block.
       
 26914         expandSelection(isReverse);
       
 26915         event.preventDefault();
       
 26916       }
       
 26917     } else if (hasMultiSelection) {
       
 26918       // Moving from block multi-selection to single block selection
       
 26919       moveSelection(isReverse);
       
 26920       event.preventDefault();
       
 26921     } else if (isVertical && Object(external_this_wp_dom_["isVerticalEdge"])(target, isReverse) && !keepCaretInsideBlock) {
       
 26922       var closestTabbable = getClosestTabbable(target, isReverse, container.current, true);
       
 26923 
       
 26924       if (closestTabbable) {
       
 26925         Object(external_this_wp_dom_["placeCaretAtVerticalEdge"])(closestTabbable, isReverse, verticalRect.current);
       
 26926         event.preventDefault();
       
 26927       }
       
 26928     } else if (isHorizontal && getSelection().isCollapsed && Object(external_this_wp_dom_["isHorizontalEdge"])(target, isReverseDir) && !keepCaretInsideBlock) {
       
 26929       var _closestTabbable = getClosestTabbable(target, isReverseDir, container.current);
       
 26930 
       
 26931       Object(external_this_wp_dom_["placeCaretAtHorizontalEdge"])(_closestTabbable, isReverseDir);
       
 26932       event.preventDefault();
       
 26933     }
       
 26934   }
       
 26935 
       
 26936   function focusLastTextField() {
       
 26937     var focusableNodes = external_this_wp_dom_["focus"].focusable.find(container.current);
       
 26938     var target = Object(external_this_lodash_["findLast"])(focusableNodes, isTabbableTextField);
       
 26939 
       
 26940     if (target) {
       
 26941       Object(external_this_wp_dom_["placeCaretAtHorizontalEdge"])(target, true);
       
 26942     }
       
 26943   }
       
 26944 
       
 26945   Object(external_this_wp_element_["useEffect"])(function () {
       
 26946     if (hasMultiSelection && !isMultiSelecting) {
       
 26947       multiSelectionContainer.current.focus();
       
 26948     }
       
 26949   }, [hasMultiSelection, isMultiSelecting]);
       
 26950   var className = classnames_default()('block-editor-writing-flow', {
       
 26951     'is-navigate-mode': isNavigationMode,
       
 26952     'is-block-moving-mode': !!hasBlockMovingClientId(),
       
 26953     'can-insert-moving-block': canInsertMovingBlock
       
 26954   }); // Disable reason: Wrapper itself is non-interactive, but must capture
       
 26955   // bubbling events from children to determine focus transition intents.
       
 26956 
       
 26957   /* eslint-disable jsx-a11y/no-static-element-interactions */
       
 26958 
       
 26959   return Object(external_this_wp_element_["createElement"])("div", {
       
 26960     className: className
       
 26961   }, Object(external_this_wp_element_["createElement"])(focus_capture, {
       
 26962     ref: focusCaptureBeforeRef,
       
 26963     selectedClientId: selectedBlockClientId,
       
 26964     containerRef: container,
       
 26965     noCapture: noCapture,
       
 26966     hasMultiSelection: hasMultiSelection,
       
 26967     multiSelectionContainer: multiSelectionContainer
       
 26968   }), Object(external_this_wp_element_["createElement"])("div", {
       
 26969     ref: container,
       
 26970     onKeyDown: onKeyDown,
       
 26971     onMouseDown: onMouseDown
       
 26972   }, Object(external_this_wp_element_["createElement"])("div", {
       
 26973     ref: multiSelectionContainer,
       
 26974     tabIndex: hasMultiSelection ? '0' : undefined,
       
 26975     "aria-label": hasMultiSelection ? Object(external_this_wp_i18n_["__"])('Multiple selected blocks') : undefined // Needs to be positioned within the viewport, so focus to this
       
 26976     // element does not scroll the page.
       
 26977     ,
       
 26978     style: {
       
 26979       position: 'fixed'
       
 26980     }
       
 26981   }), children), Object(external_this_wp_element_["createElement"])(focus_capture, {
       
 26982     ref: focusCaptureAfterRef,
       
 26983     selectedClientId: selectedBlockClientId,
       
 26984     containerRef: container,
       
 26985     noCapture: noCapture,
       
 26986     hasMultiSelection: hasMultiSelection,
       
 26987     multiSelectionContainer: multiSelectionContainer,
       
 26988     isReverse: true
       
 26989   }), Object(external_this_wp_element_["createElement"])("div", {
       
 26990     "aria-hidden": true,
       
 26991     tabIndex: -1,
       
 26992     onClick: focusLastTextField,
       
 26993     className: "block-editor-writing-flow__click-redirect"
       
 26994   }));
       
 26995   /* eslint-enable jsx-a11y/no-static-element-interactions */
       
 26996 }
       
 26997 
       
 26998 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/insertion-point.js
       
 26999 
       
 27000 
       
 27001 
       
 27002 /**
       
 27003  * External dependencies
       
 27004  */
       
 27005 
       
 27006 /**
       
 27007  * WordPress dependencies
       
 27008  */
       
 27009 
       
 27010 
       
 27011 
       
 27012 
       
 27013 
       
 27014 /**
       
 27015  * Internal dependencies
       
 27016  */
       
 27017 
       
 27018 
       
 27019 
       
 27020 
       
 27021 
       
 27022 function InsertionPointInserter(_ref) {
       
 27023   var clientId = _ref.clientId,
       
 27024       setIsInserterForced = _ref.setIsInserterForced,
       
 27025       containerRef = _ref.containerRef;
       
 27026   var ref = Object(external_this_wp_element_["useRef"])(); // Hide the inserter above the selected block and during multi-selection.
       
 27027 
       
 27028   var isInserterHidden = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 27029     var _select = select('core/block-editor'),
       
 27030         getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds,
       
 27031         getSelectedBlockClientId = _select.getSelectedBlockClientId,
       
 27032         hasMultiSelection = _select.hasMultiSelection;
       
 27033 
       
 27034     var multiSelectedBlockClientIds = getMultiSelectedBlockClientIds();
       
 27035     var selectedBlockClientId = getSelectedBlockClientId();
       
 27036     return hasMultiSelection() ? multiSelectedBlockClientIds.includes(clientId) : clientId === selectedBlockClientId;
       
 27037   }, [clientId]);
       
 27038 
       
 27039   function focusClosestTabbable(event) {
       
 27040     var clientX = event.clientX,
       
 27041         clientY = event.clientY,
       
 27042         target = event.target; // Only handle click on the wrapper specifically, and not an event
       
 27043     // bubbled from the inserter itself.
       
 27044 
       
 27045     if (target !== ref.current) {
       
 27046       return;
       
 27047     }
       
 27048 
       
 27049     var targetRect = target.getBoundingClientRect();
       
 27050     var isReverse = clientY < targetRect.top + targetRect.height / 2;
       
 27051     var blockNode = getBlockDOMNode(clientId);
       
 27052     var container = isReverse ? containerRef.current : blockNode;
       
 27053     var closest = getClosestTabbable(blockNode, true, container) || blockNode;
       
 27054     var rect = new window.DOMRect(clientX, clientY, 0, 16);
       
 27055     Object(external_this_wp_dom_["placeCaretAtVerticalEdge"])(closest, isReverse, rect, false);
       
 27056   }
       
 27057 
       
 27058   return (
       
 27059     /* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
       
 27060     Object(external_this_wp_element_["createElement"])("div", {
       
 27061       ref: ref,
       
 27062       onFocus: function onFocus() {
       
 27063         return setIsInserterForced(true);
       
 27064       },
       
 27065       onBlur: function onBlur() {
       
 27066         return setIsInserterForced(false);
       
 27067       },
       
 27068       onClick: focusClosestTabbable // While ideally it would be enough to capture the
       
 27069       // bubbling focus event from the Inserter, due to the
       
 27070       // characteristics of click focusing of `button`s in
       
 27071       // Firefox and Safari, it is not reliable.
       
 27072       //
       
 27073       // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
       
 27074       ,
       
 27075       tabIndex: -1,
       
 27076       className: classnames_default()('block-editor-block-list__insertion-point-inserter', {
       
 27077         'is-inserter-hidden': isInserterHidden
       
 27078       })
       
 27079     }, Object(external_this_wp_element_["createElement"])(inserter, {
       
 27080       position: "bottom center",
       
 27081       clientId: clientId,
       
 27082       __experimentalIsQuick: true
       
 27083     }))
       
 27084   );
       
 27085 }
       
 27086 
       
 27087 function InsertionPointPopover(_ref2) {
       
 27088   var clientId = _ref2.clientId,
       
 27089       isInserterShown = _ref2.isInserterShown,
       
 27090       isInserterForced = _ref2.isInserterForced,
       
 27091       setIsInserterForced = _ref2.setIsInserterForced,
       
 27092       containerRef = _ref2.containerRef,
       
 27093       showInsertionPoint = _ref2.showInsertionPoint;
       
 27094   var element = getBlockDOMNode(clientId);
       
 27095   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Popover"], {
       
 27096     noArrow: true,
       
 27097     animate: false,
       
 27098     anchorRef: element,
       
 27099     position: "top right left",
       
 27100     focusOnMount: false,
       
 27101     className: "block-editor-block-list__insertion-point-popover",
       
 27102     __unstableSlotName: "block-toolbar"
       
 27103   }, Object(external_this_wp_element_["createElement"])("div", {
       
 27104     className: "block-editor-block-list__insertion-point",
       
 27105     style: {
       
 27106       width: element === null || element === void 0 ? void 0 : element.offsetWidth
       
 27107     }
       
 27108   }, showInsertionPoint && Object(external_this_wp_element_["createElement"])("div", {
       
 27109     className: "block-editor-block-list__insertion-point-indicator"
       
 27110   }), (isInserterShown || isInserterForced) && Object(external_this_wp_element_["createElement"])(InsertionPointInserter, {
       
 27111     clientId: clientId,
       
 27112     setIsInserterForced: setIsInserterForced,
       
 27113     containerRef: containerRef
       
 27114   })));
       
 27115 }
       
 27116 
       
 27117 function InsertionPoint(_ref3) {
       
 27118   var children = _ref3.children,
       
 27119       containerRef = _ref3.containerRef;
       
 27120 
       
 27121   var _useState = Object(external_this_wp_element_["useState"])(false),
       
 27122       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 27123       isInserterShown = _useState2[0],
       
 27124       setIsInserterShown = _useState2[1];
       
 27125 
       
 27126   var _useState3 = Object(external_this_wp_element_["useState"])(false),
       
 27127       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
       
 27128       isInserterForced = _useState4[0],
       
 27129       setIsInserterForced = _useState4[1];
       
 27130 
       
 27131   var _useState5 = Object(external_this_wp_element_["useState"])(null),
       
 27132       _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
       
 27133       inserterClientId = _useState6[0],
       
 27134       setInserterClientId = _useState6[1];
       
 27135 
       
 27136   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 27137     var _select2 = select('core/block-editor'),
       
 27138         _isMultiSelecting = _select2.isMultiSelecting,
       
 27139         isBlockInsertionPointVisible = _select2.isBlockInsertionPointVisible,
       
 27140         getBlockInsertionPoint = _select2.getBlockInsertionPoint,
       
 27141         getBlockOrder = _select2.getBlockOrder;
       
 27142 
       
 27143     var insertionPoint = getBlockInsertionPoint();
       
 27144     var order = getBlockOrder(insertionPoint.rootClientId);
       
 27145     return {
       
 27146       isMultiSelecting: _isMultiSelecting(),
       
 27147       isInserterVisible: isBlockInsertionPointVisible(),
       
 27148       selectedClientId: order[insertionPoint.index]
       
 27149     };
       
 27150   }, []),
       
 27151       isMultiSelecting = _useSelect.isMultiSelecting,
       
 27152       isInserterVisible = _useSelect.isInserterVisible,
       
 27153       selectedClientId = _useSelect.selectedClientId;
       
 27154 
       
 27155   function onMouseMove(event) {
       
 27156     if (!event.target.classList.contains('block-editor-block-list__layout')) {
       
 27157       if (isInserterShown) {
       
 27158         setIsInserterShown(false);
       
 27159       }
       
 27160 
       
 27161       return;
       
 27162     }
       
 27163 
       
 27164     var rect = event.target.getBoundingClientRect();
       
 27165     var offset = event.clientY - rect.top;
       
 27166     var element = Array.from(event.target.children).find(function (blockEl) {
       
 27167       return blockEl.offsetTop > offset;
       
 27168     });
       
 27169 
       
 27170     if (!element) {
       
 27171       return;
       
 27172     }
       
 27173 
       
 27174     var clientId = element.id.slice('block-'.length);
       
 27175 
       
 27176     if (!clientId) {
       
 27177       return;
       
 27178     }
       
 27179 
       
 27180     var elementRect = element.getBoundingClientRect();
       
 27181 
       
 27182     if (event.clientX > elementRect.right || event.clientX < elementRect.left) {
       
 27183       if (isInserterShown) {
       
 27184         setIsInserterShown(false);
       
 27185       }
       
 27186 
       
 27187       return;
       
 27188     }
       
 27189 
       
 27190     setIsInserterShown(true);
       
 27191     setInserterClientId(clientId);
       
 27192   }
       
 27193 
       
 27194   var isVisible = isInserterShown || isInserterForced || isInserterVisible;
       
 27195   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, !isMultiSelecting && isVisible && Object(external_this_wp_element_["createElement"])(InsertionPointPopover, {
       
 27196     clientId: isInserterVisible ? selectedClientId : inserterClientId,
       
 27197     isInserterShown: isInserterShown,
       
 27198     isInserterForced: isInserterForced,
       
 27199     setIsInserterForced: setIsInserterForced,
       
 27200     containerRef: containerRef,
       
 27201     showInsertionPoint: isInserterVisible
       
 27202   }), Object(external_this_wp_element_["createElement"])("div", {
       
 27203     onMouseMove: !isInserterForced && !isMultiSelecting ? onMouseMove : undefined
       
 27204   }, children));
       
 27205 }
       
 27206 
       
 27207 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-selection-button.js
       
 27208 
       
 27209 
       
 27210 
       
 27211 
       
 27212 /**
       
 27213  * External dependencies
       
 27214  */
       
 27215 
       
 27216 /**
       
 27217  * WordPress dependencies
       
 27218  */
       
 27219 
       
 27220 
       
 27221 
       
 27222 
       
 27223 
       
 27224 
       
 27225 
       
 27226 /**
       
 27227  * Internal dependencies
       
 27228  */
       
 27229 
 25246 
 27230 
 25247 
 27231 /**
 25248 /**
 27232  * Returns true if the user is using windows.
 25249  * Returns true if the user is using windows.
 27233  *
 25250  *
 27247  *
 25264  *
 27248  * @return {WPComponent} The component to be rendered.
 25265  * @return {WPComponent} The component to be rendered.
 27249  */
 25266  */
 27250 
 25267 
 27251 
 25268 
 27252 function BlockSelectionButton(_ref) {
 25269 function BlockSelectionButton({
 27253   var clientId = _ref.clientId,
 25270   clientId,
 27254       rootClientId = _ref.rootClientId,
 25271   rootClientId,
 27255       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["clientId", "rootClientId"]);
 25272   blockElement
 27256 
 25273 }) {
 27257   var selected = Object(external_this_wp_data_["useSelect"])(function (select) {
 25274   const blockInformation = useBlockDisplayInformation(clientId);
       
 25275   const selected = Object(external_wp_data_["useSelect"])(select => {
 27258     var _getBlockListSettings;
 25276     var _getBlockListSettings;
 27259 
 25277 
 27260     var _select = select('core/block-editor'),
 25278     const {
 27261         __unstableGetBlockWithoutInnerBlocks = _select.__unstableGetBlockWithoutInnerBlocks,
 25279       __unstableGetBlockWithoutInnerBlocks,
 27262         getBlockIndex = _select.getBlockIndex,
 25280       getBlockIndex,
 27263         hasBlockMovingClientId = _select.hasBlockMovingClientId,
 25281       hasBlockMovingClientId,
 27264         getBlockListSettings = _select.getBlockListSettings;
 25282       getBlockListSettings
 27265 
 25283     } = select(store);
 27266     var index = getBlockIndex(clientId, rootClientId);
 25284     const index = getBlockIndex(clientId, rootClientId);
 27267 
 25285 
 27268     var _unstableGetBlockWit = __unstableGetBlockWithoutInnerBlocks(clientId),
 25286     const {
 27269         name = _unstableGetBlockWit.name,
 25287       name,
 27270         attributes = _unstableGetBlockWit.attributes;
 25288       attributes
 27271 
 25289     } = __unstableGetBlockWithoutInnerBlocks(clientId);
 27272     var blockMovingMode = hasBlockMovingClientId();
 25290 
       
 25291     const blockMovingMode = hasBlockMovingClientId();
 27273     return {
 25292     return {
 27274       index: index,
 25293       index,
 27275       name: name,
 25294       name,
 27276       attributes: attributes,
 25295       attributes,
 27277       blockMovingMode: blockMovingMode,
 25296       blockMovingMode,
 27278       orientation: (_getBlockListSettings = getBlockListSettings(rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation
 25297       orientation: (_getBlockListSettings = getBlockListSettings(rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation
 27279     };
 25298     };
 27280   }, [clientId, rootClientId]);
 25299   }, [clientId, rootClientId]);
 27281   var index = selected.index,
 25300   const {
 27282       name = selected.name,
 25301     index,
 27283       attributes = selected.attributes,
 25302     name,
 27284       blockMovingMode = selected.blockMovingMode,
 25303     attributes,
 27285       orientation = selected.orientation;
 25304     blockMovingMode,
 27286 
 25305     orientation
 27287   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 25306   } = selected;
 27288       setNavigationMode = _useDispatch.setNavigationMode,
 25307   const {
 27289       removeBlock = _useDispatch.removeBlock;
 25308     setNavigationMode,
 27290 
 25309     removeBlock
 27291   var ref = Object(external_this_wp_element_["useRef"])(); // Focus the breadcrumb in navigation mode.
 25310   } = Object(external_wp_data_["useDispatch"])(store);
 27292 
 25311   const ref = Object(external_wp_element_["useRef"])(); // Focus the breadcrumb in navigation mode.
 27293   Object(external_this_wp_element_["useEffect"])(function () {
 25312 
       
 25313   Object(external_wp_element_["useEffect"])(() => {
 27294     ref.current.focus(); // NVDA on windows suffers from a bug where focus changes are not announced properly
 25314     ref.current.focus(); // NVDA on windows suffers from a bug where focus changes are not announced properly
 27295     // See WordPress/gutenberg#24121 and nvaccess/nvda#5825 for more details
 25315     // See WordPress/gutenberg#24121 and nvaccess/nvda#5825 for more details
 27296     // To solve it we announce the focus change manually.
 25316     // To solve it we announce the focus change manually.
 27297 
 25317 
 27298     if (isWindows()) {
 25318     if (isWindows()) {
 27299       Object(external_this_wp_a11y_["speak"])(label);
 25319       Object(external_wp_a11y_["speak"])(label);
 27300     }
 25320     }
 27301   }, []);
 25321   }, []);
       
 25322   const {
       
 25323     hasBlockMovingClientId,
       
 25324     getBlockIndex,
       
 25325     getBlockRootClientId,
       
 25326     getClientIdsOfDescendants,
       
 25327     getSelectedBlockClientId,
       
 25328     getMultiSelectedBlocksEndClientId,
       
 25329     getPreviousBlockClientId,
       
 25330     getNextBlockClientId
       
 25331   } = Object(external_wp_data_["useSelect"])(store);
       
 25332   const {
       
 25333     selectBlock,
       
 25334     clearSelectedBlock,
       
 25335     setBlockMovingClientId,
       
 25336     moveBlockToPosition
       
 25337   } = Object(external_wp_data_["useDispatch"])(store);
 27302 
 25338 
 27303   function onKeyDown(event) {
 25339   function onKeyDown(event) {
 27304     var keyCode = event.keyCode;
 25340     const {
 27305 
 25341       keyCode
 27306     if (keyCode === external_this_wp_keycodes_["BACKSPACE"] || keyCode === external_this_wp_keycodes_["DELETE"]) {
 25342     } = event;
       
 25343     const isUp = keyCode === external_wp_keycodes_["UP"];
       
 25344     const isDown = keyCode === external_wp_keycodes_["DOWN"];
       
 25345     const isLeft = keyCode === external_wp_keycodes_["LEFT"];
       
 25346     const isRight = keyCode === external_wp_keycodes_["RIGHT"];
       
 25347     const isTab = keyCode === external_wp_keycodes_["TAB"];
       
 25348     const isEscape = keyCode === external_wp_keycodes_["ESCAPE"];
       
 25349     const isEnter = keyCode === external_wp_keycodes_["ENTER"];
       
 25350     const isSpace = keyCode === external_wp_keycodes_["SPACE"];
       
 25351     const isShift = event.shiftKey;
       
 25352 
       
 25353     if (keyCode === external_wp_keycodes_["BACKSPACE"] || keyCode === external_wp_keycodes_["DELETE"]) {
 27307       removeBlock(clientId);
 25354       removeBlock(clientId);
 27308       event.preventDefault();
 25355       event.preventDefault();
 27309     }
 25356       return;
 27310   }
 25357     }
 27311 
 25358 
 27312   var blockType = Object(external_this_wp_blocks_["getBlockType"])(name);
 25359     const selectedBlockClientId = getSelectedBlockClientId();
 27313   var label = Object(external_this_wp_blocks_["__experimentalGetAccessibleBlockLabel"])(blockType, attributes, index + 1, orientation);
 25360     const selectionEndClientId = getMultiSelectedBlocksEndClientId();
 27314   var classNames = classnames_default()('block-editor-block-list__block-selection-button', {
 25361     const selectionBeforeEndClientId = getPreviousBlockClientId(selectionEndClientId || selectedBlockClientId);
       
 25362     const selectionAfterEndClientId = getNextBlockClientId(selectionEndClientId || selectedBlockClientId);
       
 25363     const navigateUp = isTab && isShift || isUp;
       
 25364     const navigateDown = isTab && !isShift || isDown; // Move out of current nesting level (no effect if at root level).
       
 25365 
       
 25366     const navigateOut = isLeft; // Move into next nesting level (no effect if the current block has no innerBlocks).
       
 25367 
       
 25368     const navigateIn = isRight;
       
 25369     let focusedBlockUid;
       
 25370 
       
 25371     if (navigateUp) {
       
 25372       focusedBlockUid = selectionBeforeEndClientId;
       
 25373     } else if (navigateDown) {
       
 25374       focusedBlockUid = selectionAfterEndClientId;
       
 25375     } else if (navigateOut) {
       
 25376       var _getBlockRootClientId;
       
 25377 
       
 25378       focusedBlockUid = (_getBlockRootClientId = getBlockRootClientId(selectedBlockClientId)) !== null && _getBlockRootClientId !== void 0 ? _getBlockRootClientId : selectedBlockClientId;
       
 25379     } else if (navigateIn) {
       
 25380       var _getClientIdsOfDescen;
       
 25381 
       
 25382       focusedBlockUid = (_getClientIdsOfDescen = getClientIdsOfDescendants([selectedBlockClientId])[0]) !== null && _getClientIdsOfDescen !== void 0 ? _getClientIdsOfDescen : selectedBlockClientId;
       
 25383     }
       
 25384 
       
 25385     const startingBlockClientId = hasBlockMovingClientId();
       
 25386 
       
 25387     if (isEscape && startingBlockClientId) {
       
 25388       setBlockMovingClientId(null);
       
 25389     }
       
 25390 
       
 25391     if ((isEnter || isSpace) && startingBlockClientId) {
       
 25392       const sourceRoot = getBlockRootClientId(startingBlockClientId);
       
 25393       const destRoot = getBlockRootClientId(selectedBlockClientId);
       
 25394       const sourceBlockIndex = getBlockIndex(startingBlockClientId, sourceRoot);
       
 25395       let destinationBlockIndex = getBlockIndex(selectedBlockClientId, destRoot);
       
 25396 
       
 25397       if (sourceBlockIndex < destinationBlockIndex && sourceRoot === destRoot) {
       
 25398         destinationBlockIndex -= 1;
       
 25399       }
       
 25400 
       
 25401       moveBlockToPosition(startingBlockClientId, sourceRoot, destRoot, destinationBlockIndex);
       
 25402       selectBlock(startingBlockClientId);
       
 25403       setBlockMovingClientId(null);
       
 25404     }
       
 25405 
       
 25406     if (navigateDown || navigateUp || navigateOut || navigateIn) {
       
 25407       if (focusedBlockUid) {
       
 25408         event.preventDefault();
       
 25409         selectBlock(focusedBlockUid);
       
 25410       } else if (isTab && selectedBlockClientId) {
       
 25411         let nextTabbable;
       
 25412 
       
 25413         if (navigateDown) {
       
 25414           nextTabbable = external_wp_dom_["focus"].tabbable.findNext(blockElement);
       
 25415 
       
 25416           if (!nextTabbable) {
       
 25417             nextTabbable = blockElement.ownerDocument.defaultView.frameElement;
       
 25418             nextTabbable = external_wp_dom_["focus"].tabbable.findNext(nextTabbable);
       
 25419           }
       
 25420         } else {
       
 25421           nextTabbable = external_wp_dom_["focus"].tabbable.findPrevious(blockElement);
       
 25422         }
       
 25423 
       
 25424         if (nextTabbable) {
       
 25425           event.preventDefault();
       
 25426           nextTabbable.focus();
       
 25427           clearSelectedBlock();
       
 25428         }
       
 25429       }
       
 25430     }
       
 25431   }
       
 25432 
       
 25433   const blockType = Object(external_wp_blocks_["getBlockType"])(name);
       
 25434   const label = Object(external_wp_blocks_["__experimentalGetAccessibleBlockLabel"])(blockType, attributes, index + 1, orientation);
       
 25435   const classNames = classnames_default()('block-editor-block-list__block-selection-button', {
 27315     'is-block-moving-mode': !!blockMovingMode
 25436     'is-block-moving-mode': !!blockMovingMode
 27316   });
 25437   });
 27317   return Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
 25438 
       
 25439   const dragHandleLabel = Object(external_wp_i18n_["__"])('Drag');
       
 25440 
       
 25441   return Object(external_wp_element_["createElement"])("div", {
 27318     className: classNames
 25442     className: classNames
 27319   }, props), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 25443   }, Object(external_wp_element_["createElement"])(external_wp_components_["Flex"], {
       
 25444     justify: "center",
       
 25445     className: "block-editor-block-list__block-selection-button__content"
       
 25446   }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(BlockIcon, {
       
 25447     icon: blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.icon,
       
 25448     showColors: true
       
 25449   })), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(block_draggable, {
       
 25450     clientIds: [clientId]
       
 25451   }, draggableProps => Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({
       
 25452     icon: drag_handle,
       
 25453     className: "block-selection-button_drag-handle",
       
 25454     "aria-hidden": "true",
       
 25455     label: dragHandleLabel // Should not be able to tab to drag handle as this
       
 25456     // button can only be used with a pointer device.
       
 25457     ,
       
 25458     tabIndex: "-1"
       
 25459   }, draggableProps)))), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 27320     ref: ref,
 25460     ref: ref,
 27321     onClick: function onClick() {
 25461     onClick: () => setNavigationMode(false),
 27322       return setNavigationMode(false);
       
 27323     },
       
 27324     onKeyDown: onKeyDown,
 25462     onKeyDown: onKeyDown,
 27325     label: label
 25463     label: label,
 27326   }, Object(external_this_wp_element_["createElement"])(BlockTitle, {
 25464     className: "block-selection-button_select-button"
       
 25465   }, Object(external_wp_element_["createElement"])(BlockTitle, {
 27327     clientId: clientId
 25466     clientId: clientId
 27328   })));
 25467   })))));
 27329 }
 25468 }
 27330 
 25469 
 27331 /* harmony default export */ var block_selection_button = (BlockSelectionButton);
 25470 /* harmony default export */ var block_selection_button = (BlockSelectionButton);
 27332 
 25471 
 27333 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/navigable-toolbar/index.js
 25472 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/navigable-toolbar/index.js
 27334 
 25473 
 27335 
 25474 
 27336 
 25475 
 27337 
       
 27338 
       
 27339 /**
 25476 /**
 27340  * WordPress dependencies
 25477  * WordPress dependencies
 27341  */
 25478  */
 27342 
 25479 
 27343 
 25480 
 27344 
 25481 
 27345 
 25482 
 27346 
 25483 
 27347 function useUpdateLayoutEffect(effect, deps) {
       
 27348   var mounted = Object(external_this_wp_element_["useRef"])(false);
       
 27349   Object(external_this_wp_element_["useLayoutEffect"])(function () {
       
 27350     if (mounted.current) {
       
 27351       return effect();
       
 27352     }
       
 27353 
       
 27354     mounted.current = true;
       
 27355   }, deps);
       
 27356 }
       
 27357 
 25484 
 27358 function hasOnlyToolbarItem(elements) {
 25485 function hasOnlyToolbarItem(elements) {
 27359   var dataProp = 'experimentalToolbarItem';
 25486   const dataProp = 'toolbarItem';
 27360   return !elements.some(function (element) {
 25487   return !elements.some(element => !(dataProp in element.dataset));
 27361     return !(dataProp in element.dataset);
 25488 }
 27362   });
 25489 
       
 25490 function getAllToolbarItemsIn(container) {
       
 25491   return Array.from(container.querySelectorAll('[data-toolbar-item]'));
       
 25492 }
       
 25493 
       
 25494 function hasFocusWithin(container) {
       
 25495   return container.contains(container.ownerDocument.activeElement);
 27363 }
 25496 }
 27364 
 25497 
 27365 function focusFirstTabbableIn(container) {
 25498 function focusFirstTabbableIn(container) {
 27366   var _focus$tabbable$find = external_this_wp_dom_["focus"].tabbable.find(container),
 25499   const [firstTabbable] = external_wp_dom_["focus"].tabbable.find(container);
 27367       _focus$tabbable$find2 = Object(slicedToArray["a" /* default */])(_focus$tabbable$find, 1),
       
 27368       firstTabbable = _focus$tabbable$find2[0];
       
 27369 
 25500 
 27370   if (firstTabbable) {
 25501   if (firstTabbable) {
 27371     firstTabbable.focus();
 25502     firstTabbable.focus();
 27372   }
 25503   }
 27373 }
 25504 }
 27383    * E2E tests.
 25514    * E2E tests.
 27384    *
 25515    *
 27385    * This was initial discovered in this pull-request:
 25516    * This was initial discovered in this pull-request:
 27386    * https://github.com/WordPress/gutenberg/pull/23425
 25517    * https://github.com/WordPress/gutenberg/pull/23425
 27387    */
 25518    */
 27388   var initialAccessibleToolbarState = true; // By default, it's gonna render NavigableMenu. If all the tabbable elements
 25519   const initialAccessibleToolbarState = true; // By default, it's gonna render NavigableMenu. If all the tabbable elements
 27389   // inside the toolbar are ToolbarItem components (or derived components like
 25520   // inside the toolbar are ToolbarItem components (or derived components like
 27390   // ToolbarButton), then we can wrap them with the accessible Toolbar
 25521   // ToolbarButton), then we can wrap them with the accessible Toolbar
 27391   // component.
 25522   // component.
 27392 
 25523 
 27393   var _useState = Object(external_this_wp_element_["useState"])(initialAccessibleToolbarState),
 25524   const [isAccessibleToolbar, setIsAccessibleToolbar] = Object(external_wp_element_["useState"])(initialAccessibleToolbarState);
 27394       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 25525   const determineIsAccessibleToolbar = Object(external_wp_element_["useCallback"])(() => {
 27395       isAccessibleToolbar = _useState2[0],
 25526     const tabbables = external_wp_dom_["focus"].tabbable.find(ref.current);
 27396       setIsAccessibleToolbar = _useState2[1];
 25527     const onlyToolbarItem = hasOnlyToolbarItem(tabbables);
 27397 
 25528 
 27398   var determineIsAccessibleToolbar = Object(external_this_wp_element_["useCallback"])(function () {
 25529     if (!onlyToolbarItem) {
 27399     var tabbables = external_this_wp_dom_["focus"].tabbable.find(ref.current);
 25530       external_wp_deprecated_default()('Using custom components as toolbar controls', {
 27400     setIsAccessibleToolbar(hasOnlyToolbarItem(tabbables));
 25531         since: '5.6',
       
 25532         alternative: 'ToolbarItem, ToolbarButton or ToolbarDropdownMenu components',
       
 25533         link: 'https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols'
       
 25534       });
       
 25535     }
       
 25536 
       
 25537     setIsAccessibleToolbar(onlyToolbarItem);
 27401   }, []);
 25538   }, []);
 27402   Object(external_this_wp_element_["useLayoutEffect"])(determineIsAccessibleToolbar, []);
 25539   Object(external_wp_element_["useLayoutEffect"])(() => {
 27403   useUpdateLayoutEffect(function () {
       
 27404     // Toolbar buttons may be rendered asynchronously, so we use
 25540     // Toolbar buttons may be rendered asynchronously, so we use
 27405     // MutationObserver to check if the toolbar subtree has been modified
 25541     // MutationObserver to check if the toolbar subtree has been modified
 27406     var observer = new window.MutationObserver(determineIsAccessibleToolbar);
 25542     const observer = new window.MutationObserver(determineIsAccessibleToolbar);
 27407     observer.observe(ref.current, {
 25543     observer.observe(ref.current, {
 27408       childList: true,
 25544       childList: true,
 27409       subtree: true
 25545       subtree: true
 27410     });
 25546     });
 27411     return function () {
 25547     return () => observer.disconnect();
 27412       return observer.disconnect();
       
 27413     };
       
 27414   }, [isAccessibleToolbar]);
 25548   }, [isAccessibleToolbar]);
 27415   return isAccessibleToolbar;
 25549   return isAccessibleToolbar;
 27416 }
 25550 }
 27417 
 25551 
 27418 function useToolbarFocus(ref, focusOnMount, isAccessibleToolbar) {
 25552 function useToolbarFocus(ref, focusOnMount, isAccessibleToolbar, defaultIndex, onIndexChange) {
 27419   // Make sure we don't use modified versions of this prop
 25553   // Make sure we don't use modified versions of this prop
 27420   var _useState3 = Object(external_this_wp_element_["useState"])(focusOnMount),
 25554   const [initialFocusOnMount] = Object(external_wp_element_["useState"])(focusOnMount);
 27421       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 1),
 25555   const [initialIndex] = Object(external_wp_element_["useState"])(defaultIndex);
 27422       initialFocusOnMount = _useState4[0];
 25556   const focusToolbar = Object(external_wp_element_["useCallback"])(() => {
 27423 
       
 27424   var focusToolbar = Object(external_this_wp_element_["useCallback"])(function () {
       
 27425     focusFirstTabbableIn(ref.current);
 25557     focusFirstTabbableIn(ref.current);
 27426   }, []);
 25558   }, []); // Focus on toolbar when pressing alt+F10 when the toolbar is visible
 27427   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/focus-toolbar', focusToolbar, {
 25559 
       
 25560   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/focus-toolbar', focusToolbar, {
 27428     bindGlobal: true,
 25561     bindGlobal: true,
 27429     eventName: 'keydown'
 25562     eventName: 'keydown'
 27430   });
 25563   });
 27431   Object(external_this_wp_element_["useEffect"])(function () {
 25564   Object(external_wp_element_["useEffect"])(() => {
 27432     if (initialFocusOnMount) {
 25565     if (initialFocusOnMount) {
 27433       focusToolbar();
 25566       focusToolbar();
 27434     }
 25567     }
 27435   }, [isAccessibleToolbar, initialFocusOnMount, focusToolbar]);
 25568   }, [isAccessibleToolbar, initialFocusOnMount, focusToolbar]);
 27436 }
 25569   Object(external_wp_element_["useEffect"])(() => {
 27437 
 25570     // If initialIndex is passed, we focus on that toolbar item when the
 27438 function NavigableToolbar(_ref) {
 25571     // toolbar gets mounted and initial focus is not forced.
 27439   var children = _ref.children,
 25572     // We have to wait for the next browser paint because block controls aren't
 27440       focusOnMount = _ref.focusOnMount,
 25573     // rendered right away when the toolbar gets mounted.
 27441       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["children", "focusOnMount"]);
 25574     let raf = 0;
 27442 
 25575 
 27443   var wrapper = Object(external_this_wp_element_["useRef"])();
 25576     if (initialIndex && !initialFocusOnMount) {
 27444   var isAccessibleToolbar = useIsAccessibleToolbar(wrapper);
 25577       raf = window.requestAnimationFrame(() => {
 27445   useToolbarFocus(wrapper, focusOnMount, isAccessibleToolbar);
 25578         const items = getAllToolbarItemsIn(ref.current);
       
 25579         const index = initialIndex || 0;
       
 25580 
       
 25581         if (items[index] && hasFocusWithin(ref.current)) {
       
 25582           items[index].focus();
       
 25583         }
       
 25584       });
       
 25585     }
       
 25586 
       
 25587     return () => {
       
 25588       window.cancelAnimationFrame(raf);
       
 25589       if (!onIndexChange) return; // When the toolbar element is unmounted and onIndexChange is passed, we
       
 25590       // pass the focused toolbar item index so it can be hydrated later.
       
 25591 
       
 25592       const items = getAllToolbarItemsIn(ref.current);
       
 25593       const index = items.findIndex(item => item.tabIndex === 0);
       
 25594       onIndexChange(index);
       
 25595     };
       
 25596   }, [initialIndex, initialFocusOnMount]);
       
 25597 }
       
 25598 
       
 25599 function NavigableToolbar({
       
 25600   children,
       
 25601   focusOnMount,
       
 25602   __experimentalInitialIndex: initialIndex,
       
 25603   __experimentalOnIndexChange: onIndexChange,
       
 25604   ...props
       
 25605 }) {
       
 25606   const ref = Object(external_wp_element_["useRef"])();
       
 25607   const isAccessibleToolbar = useIsAccessibleToolbar(ref);
       
 25608   useToolbarFocus(ref, focusOnMount, isAccessibleToolbar, initialIndex, onIndexChange);
 27446 
 25609 
 27447   if (isAccessibleToolbar) {
 25610   if (isAccessibleToolbar) {
 27448     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Toolbar"], Object(esm_extends["a" /* default */])({
 25611     return Object(external_wp_element_["createElement"])(external_wp_components_["Toolbar"], Object(esm_extends["a" /* default */])({
 27449       __experimentalAccessibilityLabel: props['aria-label'],
 25612       label: props['aria-label'],
 27450       ref: wrapper
 25613       ref: ref
 27451     }, props), children);
 25614     }, props), children);
 27452   }
 25615   }
 27453 
 25616 
 27454   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NavigableMenu"], Object(esm_extends["a" /* default */])({
 25617   return Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], Object(esm_extends["a" /* default */])({
 27455     orientation: "horizontal",
 25618     orientation: "horizontal",
 27456     role: "toolbar",
 25619     role: "toolbar",
 27457     ref: wrapper
 25620     ref: ref
 27458   }, props), children);
 25621   }, props), children);
 27459 }
 25622 }
 27460 
 25623 
 27461 /* harmony default export */ var navigable_toolbar = (NavigableToolbar);
 25624 /* harmony default export */ var navigable_toolbar = (NavigableToolbar);
 27462 
 25625 
 27463 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/index.js
 25626 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-mover/index.js
 27464 
 25627 
 27465 
 25628 
 27466 
 25629 
 27467 
       
 27468 
       
 27469 
       
 27470 
       
 27471 
       
 27472 
       
 27473 function block_mover_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (block_mover_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 27474 
       
 27475 function block_mover_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 27476 
       
 27477 /**
 25630 /**
 27478  * External dependencies
 25631  * External dependencies
 27479  */
 25632  */
 27480 
 25633 
 27481 
 25634 
 27485 
 25638 
 27486 
 25639 
 27487 
 25640 
 27488 
 25641 
 27489 
 25642 
       
 25643 
       
 25644 
 27490 /**
 25645 /**
 27491  * Internal dependencies
 25646  * Internal dependencies
 27492  */
 25647  */
 27493 
 25648 
 27494 
 25649 
 27495 var block_mover_BlockMover = /*#__PURE__*/function (_Component) {
 25650 
 27496   Object(inherits["a" /* default */])(BlockMover, _Component);
 25651 
 27497 
 25652 
 27498   var _super = block_mover_createSuper(BlockMover);
 25653 function BlockMover({
 27499 
 25654   isFirst,
 27500   function BlockMover() {
 25655   isLast,
 27501     var _this;
 25656   clientIds,
 27502 
 25657   isLocked,
 27503     Object(classCallCheck["a" /* default */])(this, BlockMover);
 25658   isHidden,
 27504 
 25659   rootClientId,
 27505     _this = _super.apply(this, arguments);
 25660   orientation,
 27506     _this.state = {
 25661   hideDragHandle
 27507       isFocused: false
 25662 }) {
 27508     };
 25663   const [isFocused, setIsFocused] = Object(external_wp_element_["useState"])(false);
 27509     _this.onFocus = _this.onFocus.bind(Object(assertThisInitialized["a" /* default */])(_this));
 25664 
 27510     _this.onBlur = _this.onBlur.bind(Object(assertThisInitialized["a" /* default */])(_this));
 25665   const onFocus = () => setIsFocused(true);
 27511     return _this;
 25666 
 27512   }
 25667   const onBlur = () => setIsFocused(false);
 27513 
 25668 
 27514   Object(createClass["a" /* default */])(BlockMover, [{
 25669   if (isLocked || isFirst && isLast && !rootClientId) {
 27515     key: "onFocus",
 25670     return null;
 27516     value: function onFocus() {
 25671   }
 27517       this.setState({
 25672 
 27518         isFocused: true
 25673   const dragHandleLabel = Object(external_wp_i18n_["__"])('Drag'); // We emulate a disabled state because forcefully applying the `disabled`
 27519       });
 25674   // attribute on the buttons while it has focus causes the screen to change
 27520     }
 25675   // to an unfocused state (body as active element) without firing blur on,
 27521   }, {
 25676   // the rendering parent, leaving it unable to react to focus out.
 27522     key: "onBlur",
 25677 
 27523     value: function onBlur() {
 25678 
 27524       this.setState({
 25679   return Object(external_wp_element_["createElement"])("div", {
 27525         isFocused: false
 25680     className: classnames_default()('block-editor-block-mover', {
 27526       });
 25681       'is-visible': isFocused || !isHidden,
 27527     }
 25682       'is-horizontal': orientation === 'horizontal'
 27528   }, {
 25683     })
 27529     key: "render",
 25684   }, !hideDragHandle && Object(external_wp_element_["createElement"])(block_draggable, {
 27530     value: function render() {
 25685     clientIds: clientIds,
 27531       var _this$props = this.props,
 25686     cloneClassname: "block-editor-block-mover__drag-clone"
 27532           isFirst = _this$props.isFirst,
 25687   }, draggableProps => Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({
 27533           isLast = _this$props.isLast,
 25688     icon: drag_handle,
 27534           clientIds = _this$props.clientIds,
 25689     className: "block-editor-block-mover__drag-handle",
 27535           isLocked = _this$props.isLocked,
 25690     "aria-hidden": "true",
 27536           isHidden = _this$props.isHidden,
 25691     label: dragHandleLabel // Should not be able to tab to drag handle as this
 27537           rootClientId = _this$props.rootClientId,
 25692     // button can only be used with a pointer device.
 27538           orientation = _this$props.orientation;
 25693     ,
 27539       var isFocused = this.state.isFocused;
 25694     tabIndex: "-1"
 27540 
 25695   }, draggableProps))), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
 27541       if (isLocked || isFirst && isLast && !rootClientId) {
 25696     className: "block-editor-block-mover__move-button-container"
 27542         return null;
 25697   }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], {
 27543       } // We emulate a disabled state because forcefully applying the `disabled`
 25698     onFocus: onFocus,
 27544       // attribute on the buttons while it has focus causes the screen to change
 25699     onBlur: onBlur
 27545       // to an unfocused state (body as active element) without firing blur on,
 25700   }, itemProps => Object(external_wp_element_["createElement"])(BlockMoverUpButton, Object(esm_extends["a" /* default */])({
 27546       // the rendering parent, leaving it unable to react to focus out.
 25701     clientIds: clientIds
 27547 
 25702   }, itemProps))), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], {
 27548 
 25703     onFocus: onFocus,
 27549       return Object(external_this_wp_element_["createElement"])("div", {
 25704     onBlur: onBlur
 27550         className: classnames_default()('block-editor-block-mover', {
 25705   }, itemProps => Object(external_wp_element_["createElement"])(BlockMoverDownButton, Object(esm_extends["a" /* default */])({
 27551           'is-visible': isFocused || !isHidden,
 25706     clientIds: clientIds
 27552           'is-horizontal': orientation === 'horizontal'
 25707   }, itemProps)))));
 27553         })
 25708 }
 27554       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalToolbarItem"], {
 25709 
 27555         onFocus: this.onFocus,
 25710 /* harmony default export */ var block_mover = (Object(external_wp_data_["withSelect"])((select, {
 27556         onBlur: this.onBlur
 25711   clientIds
 27557       }, function (itemProps) {
 25712 }) => {
 27558         return Object(external_this_wp_element_["createElement"])(BlockMoverUpButton, Object(esm_extends["a" /* default */])({
       
 27559           clientIds: clientIds
       
 27560         }, itemProps));
       
 27561       }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalToolbarItem"], {
       
 27562         onFocus: this.onFocus,
       
 27563         onBlur: this.onBlur
       
 27564       }, function (itemProps) {
       
 27565         return Object(external_this_wp_element_["createElement"])(BlockMoverDownButton, Object(esm_extends["a" /* default */])({
       
 27566           clientIds: clientIds
       
 27567         }, itemProps));
       
 27568       })));
       
 27569     }
       
 27570   }]);
       
 27571 
       
 27572   return BlockMover;
       
 27573 }(external_this_wp_element_["Component"]);
       
 27574 /* harmony default export */ var block_mover = (Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
       
 27575   var _getBlockListSettings;
 25713   var _getBlockListSettings;
 27576 
 25714 
 27577   var clientIds = _ref.clientIds;
 25715   const {
 27578 
 25716     getBlock,
 27579   var _select = select('core/block-editor'),
 25717     getBlockIndex,
 27580       getBlock = _select.getBlock,
 25718     getBlockListSettings,
 27581       getBlockIndex = _select.getBlockIndex,
 25719     getTemplateLock,
 27582       getBlockListSettings = _select.getBlockListSettings,
 25720     getBlockOrder,
 27583       getTemplateLock = _select.getTemplateLock,
 25721     getBlockRootClientId
 27584       getBlockOrder = _select.getBlockOrder,
 25722   } = select(store);
 27585       getBlockRootClientId = _select.getBlockRootClientId;
 25723   const normalizedClientIds = Object(external_lodash_["castArray"])(clientIds);
 27586 
 25724   const firstClientId = Object(external_lodash_["first"])(normalizedClientIds);
 27587   var normalizedClientIds = Object(external_this_lodash_["castArray"])(clientIds);
 25725   const block = getBlock(firstClientId);
 27588   var firstClientId = Object(external_this_lodash_["first"])(normalizedClientIds);
 25726   const rootClientId = getBlockRootClientId(Object(external_lodash_["first"])(normalizedClientIds));
 27589   var block = getBlock(firstClientId);
 25727   const firstIndex = getBlockIndex(firstClientId, rootClientId);
 27590   var rootClientId = getBlockRootClientId(Object(external_this_lodash_["first"])(normalizedClientIds));
 25728   const lastIndex = getBlockIndex(Object(external_lodash_["last"])(normalizedClientIds), rootClientId);
 27591   var firstIndex = getBlockIndex(firstClientId, rootClientId);
 25729   const blockOrder = getBlockOrder(rootClientId);
 27592   var lastIndex = getBlockIndex(Object(external_this_lodash_["last"])(normalizedClientIds), rootClientId);
 25730   const isFirst = firstIndex === 0;
 27593   var blockOrder = getBlockOrder(rootClientId);
 25731   const isLast = lastIndex === blockOrder.length - 1;
 27594   var isFirst = firstIndex === 0;
       
 27595   var isLast = lastIndex === blockOrder.length - 1;
       
 27596   return {
 25732   return {
 27597     blockType: block ? Object(external_this_wp_blocks_["getBlockType"])(block.name) : null,
 25733     blockType: block ? Object(external_wp_blocks_["getBlockType"])(block.name) : null,
 27598     isLocked: getTemplateLock(rootClientId) === 'all',
 25734     isLocked: getTemplateLock(rootClientId) === 'all',
 27599     rootClientId: rootClientId,
 25735     rootClientId,
 27600     firstIndex: firstIndex,
 25736     firstIndex,
 27601     isFirst: isFirst,
 25737     isFirst,
 27602     isLast: isLast,
 25738     isLast,
 27603     orientation: (_getBlockListSettings = getBlockListSettings(rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation
 25739     orientation: (_getBlockListSettings = getBlockListSettings(rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation
 27604   };
 25740   };
 27605 })(block_mover_BlockMover));
 25741 })(BlockMover));
       
 25742 
       
 25743 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-toolbar/utils.js
       
 25744 /**
       
 25745  * External dependencies
       
 25746  */
       
 25747 
       
 25748 /**
       
 25749  * WordPress dependencies
       
 25750  */
       
 25751 
       
 25752 
       
 25753 const {
       
 25754   clearTimeout: utils_clearTimeout,
       
 25755   setTimeout: utils_setTimeout
       
 25756 } = window;
       
 25757 const DEBOUNCE_TIMEOUT = 200;
       
 25758 /**
       
 25759  * Hook that creates a showMover state, as well as debounced show/hide callbacks.
       
 25760  *
       
 25761  * @param {Object}   props                       Component props.
       
 25762  * @param {Object}   props.ref                   Element reference.
       
 25763  * @param {boolean}  props.isFocused             Whether the component has current focus.
       
 25764  * @param {number}   [props.debounceTimeout=250] Debounce timeout in milliseconds.
       
 25765  * @param {Function} [props.onChange=noop]       Callback function.
       
 25766  */
       
 25767 
       
 25768 function useDebouncedShowMovers({
       
 25769   ref,
       
 25770   isFocused,
       
 25771   debounceTimeout = DEBOUNCE_TIMEOUT,
       
 25772   onChange = external_lodash_["noop"]
       
 25773 }) {
       
 25774   const [showMovers, setShowMovers] = Object(external_wp_element_["useState"])(false);
       
 25775   const timeoutRef = Object(external_wp_element_["useRef"])();
       
 25776 
       
 25777   const handleOnChange = nextIsFocused => {
       
 25778     if (ref !== null && ref !== void 0 && ref.current) {
       
 25779       setShowMovers(nextIsFocused);
       
 25780     }
       
 25781 
       
 25782     onChange(nextIsFocused);
       
 25783   };
       
 25784 
       
 25785   const getIsHovered = () => {
       
 25786     return (ref === null || ref === void 0 ? void 0 : ref.current) && ref.current.matches(':hover');
       
 25787   };
       
 25788 
       
 25789   const shouldHideMovers = () => {
       
 25790     const isHovered = getIsHovered();
       
 25791     return !isFocused && !isHovered;
       
 25792   };
       
 25793 
       
 25794   const clearTimeoutRef = () => {
       
 25795     const timeout = timeoutRef.current;
       
 25796 
       
 25797     if (timeout && utils_clearTimeout) {
       
 25798       utils_clearTimeout(timeout);
       
 25799     }
       
 25800   };
       
 25801 
       
 25802   const debouncedShowMovers = event => {
       
 25803     if (event) {
       
 25804       event.stopPropagation();
       
 25805     }
       
 25806 
       
 25807     clearTimeoutRef();
       
 25808 
       
 25809     if (!showMovers) {
       
 25810       handleOnChange(true);
       
 25811     }
       
 25812   };
       
 25813 
       
 25814   const debouncedHideMovers = event => {
       
 25815     if (event) {
       
 25816       event.stopPropagation();
       
 25817     }
       
 25818 
       
 25819     clearTimeoutRef();
       
 25820     timeoutRef.current = utils_setTimeout(() => {
       
 25821       if (shouldHideMovers()) {
       
 25822         handleOnChange(false);
       
 25823       }
       
 25824     }, debounceTimeout);
       
 25825   };
       
 25826 
       
 25827   Object(external_wp_element_["useEffect"])(() => () => clearTimeoutRef(), []);
       
 25828   return {
       
 25829     showMovers,
       
 25830     debouncedShowMovers,
       
 25831     debouncedHideMovers
       
 25832   };
       
 25833 }
       
 25834 /**
       
 25835  * Hook that provides a showMovers state and gesture events for DOM elements
       
 25836  * that interact with the showMovers state.
       
 25837  *
       
 25838  * @param {Object}   props                       Component props.
       
 25839  * @param {Object}   props.ref                   Element reference.
       
 25840  * @param {number}   [props.debounceTimeout=250] Debounce timeout in milliseconds.
       
 25841  * @param {Function} [props.onChange=noop]       Callback function.
       
 25842  */
       
 25843 
       
 25844 function useShowMoversGestures({
       
 25845   ref,
       
 25846   debounceTimeout = DEBOUNCE_TIMEOUT,
       
 25847   onChange = external_lodash_["noop"]
       
 25848 }) {
       
 25849   const [isFocused, setIsFocused] = Object(external_wp_element_["useState"])(false);
       
 25850   const {
       
 25851     showMovers,
       
 25852     debouncedShowMovers,
       
 25853     debouncedHideMovers
       
 25854   } = useDebouncedShowMovers({
       
 25855     ref,
       
 25856     debounceTimeout,
       
 25857     isFocused,
       
 25858     onChange
       
 25859   });
       
 25860   const registerRef = Object(external_wp_element_["useRef"])(false);
       
 25861 
       
 25862   const isFocusedWithin = () => {
       
 25863     return (ref === null || ref === void 0 ? void 0 : ref.current) && ref.current.contains(ref.current.ownerDocument.activeElement);
       
 25864   };
       
 25865 
       
 25866   Object(external_wp_element_["useEffect"])(() => {
       
 25867     const node = ref.current;
       
 25868 
       
 25869     const handleOnFocus = () => {
       
 25870       if (isFocusedWithin()) {
       
 25871         setIsFocused(true);
       
 25872         debouncedShowMovers();
       
 25873       }
       
 25874     };
       
 25875 
       
 25876     const handleOnBlur = () => {
       
 25877       if (!isFocusedWithin()) {
       
 25878         setIsFocused(false);
       
 25879         debouncedHideMovers();
       
 25880       }
       
 25881     };
       
 25882     /**
       
 25883      * Events are added via DOM events (vs. React synthetic events),
       
 25884      * as the child React components swallow mouse events.
       
 25885      */
       
 25886 
       
 25887 
       
 25888     if (node && !registerRef.current) {
       
 25889       node.addEventListener('focus', handleOnFocus, true);
       
 25890       node.addEventListener('blur', handleOnBlur, true);
       
 25891       registerRef.current = true;
       
 25892     }
       
 25893 
       
 25894     return () => {
       
 25895       if (node) {
       
 25896         node.removeEventListener('focus', handleOnFocus);
       
 25897         node.removeEventListener('blur', handleOnBlur);
       
 25898       }
       
 25899     };
       
 25900   }, [ref, registerRef, setIsFocused, debouncedShowMovers, debouncedHideMovers]);
       
 25901   return {
       
 25902     showMovers,
       
 25903     gestures: {
       
 25904       onMouseMove: debouncedShowMovers,
       
 25905       onMouseLeave: debouncedHideMovers
       
 25906     }
       
 25907   };
       
 25908 }
 27606 
 25909 
 27607 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-parent-selector/index.js
 25910 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-parent-selector/index.js
 27608 
 25911 
 27609 
 25912 
       
 25913 
 27610 /**
 25914 /**
 27611  * WordPress dependencies
 25915  * WordPress dependencies
 27612  */
 25916  */
 27613 
 25917 
 27614 
 25918 
 27615 
 25919 
 27616 
 25920 
       
 25921 
 27617 /**
 25922 /**
 27618  * Internal dependencies
 25923  * Internal dependencies
 27619  */
 25924  */
       
 25925 
       
 25926 
       
 25927 
 27620 
 25928 
 27621 
 25929 
 27622 /**
 25930 /**
 27623  * Block parent selector component, displaying the hierarchy of the
 25931  * Block parent selector component, displaying the hierarchy of the
 27624  * current block selection as a single icon to "go up" a level.
 25932  * current block selection as a single icon to "go up" a level.
 27625  *
 25933  *
 27626  * @return {WPComponent} Parent block selector.
 25934  * @return {WPComponent} Parent block selector.
 27627  */
 25935  */
 27628 
 25936 
 27629 function BlockParentSelector() {
 25937 function BlockParentSelector() {
 27630   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 25938   const {
 27631       selectBlock = _useDispatch.selectBlock;
 25939     selectBlock,
 27632 
 25940     toggleBlockHighlight
 27633   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 25941   } = Object(external_wp_data_["useDispatch"])(store);
 27634     var _select = select('core/block-editor'),
 25942   const {
 27635         getBlockName = _select.getBlockName,
 25943     firstParentClientId,
 27636         getBlockParents = _select.getBlockParents,
 25944     shouldHide,
 27637         getSelectedBlockClientId = _select.getSelectedBlockClientId;
 25945     hasReducedUI
 27638 
 25946   } = Object(external_wp_data_["useSelect"])(select => {
 27639     var selectedBlockClientId = getSelectedBlockClientId();
 25947     const {
 27640     var parents = getBlockParents(selectedBlockClientId);
 25948       getBlockName,
 27641     var _firstParentClientId = parents[parents.length - 1];
 25949       getBlockParents,
 27642     var parentBlockName = getBlockName(_firstParentClientId);
 25950       getSelectedBlockClientId,
       
 25951       getSettings
       
 25952     } = select(store);
       
 25953     const {
       
 25954       hasBlockSupport
       
 25955     } = select(external_wp_blocks_["store"]);
       
 25956     const selectedBlockClientId = getSelectedBlockClientId();
       
 25957     const parents = getBlockParents(selectedBlockClientId);
       
 25958     const _firstParentClientId = parents[parents.length - 1];
       
 25959     const parentBlockName = getBlockName(_firstParentClientId);
       
 25960 
       
 25961     const _parentBlockType = Object(external_wp_blocks_["getBlockType"])(parentBlockName);
       
 25962 
       
 25963     const settings = getSettings();
 27643     return {
 25964     return {
 27644       parentBlockType: Object(external_this_wp_blocks_["getBlockType"])(parentBlockName),
 25965       firstParentClientId: _firstParentClientId,
 27645       firstParentClientId: _firstParentClientId
 25966       shouldHide: !hasBlockSupport(_parentBlockType, '__experimentalParentSelector', true),
       
 25967       hasReducedUI: settings.hasReducedUI
 27646     };
 25968     };
 27647   }, []),
 25969   }, []);
 27648       parentBlockType = _useSelect.parentBlockType,
 25970   const blockInformation = useBlockDisplayInformation(firstParentClientId); // Allows highlighting the parent block outline when focusing or hovering
 27649       firstParentClientId = _useSelect.firstParentClientId;
 25971   // the parent block selector within the child.
 27650 
 25972 
 27651   if (firstParentClientId !== undefined) {
 25973   const nodeRef = Object(external_wp_element_["useRef"])();
 27652     return Object(external_this_wp_element_["createElement"])("div", {
 25974   const {
 27653       className: "block-editor-block-parent-selector",
 25975     gestures: showMoversGestures
 27654       key: firstParentClientId
 25976   } = useShowMoversGestures({
 27655     }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
 25977     ref: nodeRef,
 27656       className: "block-editor-block-parent-selector__button",
 25978 
 27657       onClick: function onClick() {
 25979     onChange(isFocused) {
 27658         return selectBlock(firstParentClientId);
 25980       if (isFocused && hasReducedUI) {
 27659       },
 25981         return;
 27660       label: Object(external_this_wp_i18n_["sprintf"])(
 25982       }
 27661       /* translators: %s: Name of the block's parent. */
 25983 
 27662       Object(external_this_wp_i18n_["__"])('Select parent (%s)'), parentBlockType.title),
 25984       toggleBlockHighlight(firstParentClientId, isFocused);
 27663       showTooltip: true,
 25985     }
 27664       icon: Object(external_this_wp_element_["createElement"])(BlockIcon, {
 25986 
 27665         icon: parentBlockType.icon
 25987   });
 27666       })
 25988 
 27667     }));
 25989   if (shouldHide || firstParentClientId === undefined) {
 27668   }
 25990     return null;
 27669 
 25991   }
 27670   return null;
 25992 
       
 25993   return Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
       
 25994     className: "block-editor-block-parent-selector",
       
 25995     key: firstParentClientId,
       
 25996     ref: nodeRef
       
 25997   }, showMoversGestures), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
       
 25998     className: "block-editor-block-parent-selector__button",
       
 25999     onClick: () => selectBlock(firstParentClientId),
       
 26000     label: Object(external_wp_i18n_["sprintf"])(
       
 26001     /* translators: %s: Name of the block's parent. */
       
 26002     Object(external_wp_i18n_["__"])('Select %s'), blockInformation.title),
       
 26003     showTooltip: true,
       
 26004     icon: Object(external_wp_element_["createElement"])(BlockIcon, {
       
 26005       icon: blockInformation.icon
       
 26006     })
       
 26007   }));
 27671 }
 26008 }
 27672 
 26009 
 27673 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stack.js
 26010 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stack.js
 27674 
 26011 
 27675 
 26012 
 27676 /**
 26013 /**
 27677  * WordPress dependencies
 26014  * WordPress dependencies
 27678  */
 26015  */
 27679 
 26016 
 27680 var stack_stack = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 26017 const stack_stack = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 27681   xmlns: "http://www.w3.org/2000/svg",
 26018   xmlns: "http://www.w3.org/2000/svg",
 27682   viewBox: "0 0 24 24"
 26019   viewBox: "0 0 24 24"
 27683 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 26020 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 27684   d: "M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"
 26021   d: "M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"
 27685 }));
 26022 }));
 27686 /* harmony default export */ var library_stack = (stack_stack);
 26023 /* harmony default export */ var library_stack = (stack_stack);
 27687 
 26024 
 27688 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-styles/index.js
 26025 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/preview-block-popover.js
 27689 
 26026 
 27690 
 26027 
 27691 
 26028 /**
 27692 
 26029  * WordPress dependencies
 27693 function block_styles_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; }
 26030  */
 27694 
 26031 
 27695 function block_styles_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_styles_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 { block_styles_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 26032 
 27696 
 26033 /**
 27697 function block_styles_createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = block_styles_unsupportedIterableToArray(o))) { 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 it, 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; } } }; }
 26034  * Internal dependencies
 27698 
 26035  */
 27699 function block_styles_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return block_styles_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(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return block_styles_arrayLikeToArray(o, minLen); }
 26036 
 27700 
 26037 
 27701 function block_styles_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; }
 26038 function PreviewBlockPopover({
 27702 
 26039   blocks
       
 26040 }) {
       
 26041   return Object(external_wp_element_["createElement"])("div", {
       
 26042     className: "block-editor-block-switcher__popover__preview__parent"
       
 26043   }, Object(external_wp_element_["createElement"])("div", {
       
 26044     className: "block-editor-block-switcher__popover__preview__container"
       
 26045   }, Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
       
 26046     className: "block-editor-block-switcher__preview__popover",
       
 26047     position: "bottom right",
       
 26048     focusOnMount: false
       
 26049   }, Object(external_wp_element_["createElement"])("div", {
       
 26050     className: "block-editor-block-switcher__preview"
       
 26051   }, Object(external_wp_element_["createElement"])("div", {
       
 26052     className: "block-editor-block-switcher__preview-title"
       
 26053   }, Object(external_wp_i18n_["__"])('Preview')), Object(external_wp_element_["createElement"])(block_preview, {
       
 26054     viewportWidth: 500,
       
 26055     blocks: blocks
       
 26056   })))));
       
 26057 }
       
 26058 
       
 26059 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/block-transformations-menu.js
       
 26060 
       
 26061 
       
 26062 /**
       
 26063  * WordPress dependencies
       
 26064  */
       
 26065 
       
 26066 
       
 26067 
       
 26068 
       
 26069 /**
       
 26070  * Internal dependencies
       
 26071  */
       
 26072 
       
 26073 
       
 26074 
       
 26075 
       
 26076 const BlockTransformationsMenu = ({
       
 26077   className,
       
 26078   possibleBlockTransformations,
       
 26079   onSelect,
       
 26080   blocks
       
 26081 }) => {
       
 26082   const [hoveredTransformItemName, setHoveredTransformItemName] = Object(external_wp_element_["useState"])();
       
 26083   return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
       
 26084     label: Object(external_wp_i18n_["__"])('Transform to'),
       
 26085     className: className
       
 26086   }, hoveredTransformItemName && Object(external_wp_element_["createElement"])(PreviewBlockPopover, {
       
 26087     blocks: Object(external_wp_blocks_["switchToBlockType"])(blocks, hoveredTransformItemName)
       
 26088   }), possibleBlockTransformations.map(item => {
       
 26089     const {
       
 26090       name,
       
 26091       icon,
       
 26092       title,
       
 26093       isDisabled
       
 26094     } = item;
       
 26095     return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
       
 26096       key: name,
       
 26097       className: Object(external_wp_blocks_["getBlockMenuDefaultClassName"])(name),
       
 26098       onClick: event => {
       
 26099         event.preventDefault();
       
 26100         onSelect(name);
       
 26101       },
       
 26102       disabled: isDisabled,
       
 26103       onMouseLeave: () => setHoveredTransformItemName(null),
       
 26104       onMouseEnter: () => setHoveredTransformItemName(name)
       
 26105     }, Object(external_wp_element_["createElement"])(BlockIcon, {
       
 26106       icon: icon,
       
 26107       showColors: true
       
 26108     }), title);
       
 26109   }));
       
 26110 };
       
 26111 
       
 26112 /* harmony default export */ var block_transformations_menu = (BlockTransformationsMenu);
       
 26113 
       
 26114 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-styles/utils.js
 27703 /**
 26115 /**
 27704  * External dependencies
 26116  * External dependencies
 27705  */
 26117  */
 27706 
 26118 
 27707 
       
 27708 /**
 26119 /**
 27709  * WordPress dependencies
 26120  * WordPress dependencies
 27710  */
       
 27711 
       
 27712 
       
 27713 
       
 27714 
       
 27715 
       
 27716 
       
 27717 
       
 27718 /**
       
 27719  * Internal dependencies
       
 27720  */
 26121  */
 27721 
 26122 
 27722 
 26123 
 27723 /**
 26124 /**
 27724  * Returns the active style from the given className.
 26125  * Returns the active style from the given className.
 27728  *
 26129  *
 27729  * @return {Object?} The active style.
 26130  * @return {Object?} The active style.
 27730  */
 26131  */
 27731 
 26132 
 27732 function getActiveStyle(styles, className) {
 26133 function getActiveStyle(styles, className) {
 27733   var _iterator = block_styles_createForOfIteratorHelper(new external_this_wp_tokenList_default.a(className).values()),
 26134   for (const style of new external_wp_tokenList_default.a(className).values()) {
 27734       _step;
 26135     if (style.indexOf('is-style-') === -1) {
 27735 
 26136       continue;
 27736   try {
 26137     }
 27737     for (_iterator.s(); !(_step = _iterator.n()).done;) {
 26138 
 27738       var style = _step.value;
 26139     const potentialStyleName = style.substring(9);
 27739 
 26140     const activeStyle = Object(external_lodash_["find"])(styles, {
 27740       if (style.indexOf('is-style-') === -1) {
 26141       name: potentialStyleName
 27741         continue;
 26142     });
 27742       }
 26143 
 27743 
 26144     if (activeStyle) {
 27744       var potentialStyleName = style.substring(9);
 26145       return activeStyle;
 27745       var activeStyle = Object(external_this_lodash_["find"])(styles, {
 26146     }
 27746         name: potentialStyleName
 26147   }
 27747       });
 26148 
 27748 
 26149   return Object(external_lodash_["find"])(styles, 'isDefault');
 27749       if (activeStyle) {
       
 27750         return activeStyle;
       
 27751       }
       
 27752     }
       
 27753   } catch (err) {
       
 27754     _iterator.e(err);
       
 27755   } finally {
       
 27756     _iterator.f();
       
 27757   }
       
 27758 
       
 27759   return Object(external_this_lodash_["find"])(styles, 'isDefault');
       
 27760 }
 26150 }
 27761 /**
 26151 /**
 27762  * Replaces the active style in the block's className.
 26152  * Replaces the active style in the block's className.
 27763  *
 26153  *
 27764  * @param {string}  className   Class name.
 26154  * @param {string}  className   Class name.
 27767  *
 26157  *
 27768  * @return {string} The updated className.
 26158  * @return {string} The updated className.
 27769  */
 26159  */
 27770 
 26160 
 27771 function replaceActiveStyle(className, activeStyle, newStyle) {
 26161 function replaceActiveStyle(className, activeStyle, newStyle) {
 27772   var list = new external_this_wp_tokenList_default.a(className);
 26162   const list = new external_wp_tokenList_default.a(className);
 27773 
 26163 
 27774   if (activeStyle) {
 26164   if (activeStyle) {
 27775     list.remove('is-style-' + activeStyle.name);
 26165     list.remove('is-style-' + activeStyle.name);
 27776   }
 26166   }
 27777 
 26167 
 27778   list.add('is-style-' + newStyle.name);
 26168   list.add('is-style-' + newStyle.name);
 27779   return list.value;
 26169   return list.value;
 27780 }
 26170 }
 27781 
 26171 
 27782 var block_styles_useGenericPreviewBlock = function useGenericPreviewBlock(block, type) {
 26172 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-styles/index.js
 27783   return Object(external_this_wp_element_["useMemo"])(function () {
 26173 
 27784     return type.example ? Object(external_this_wp_blocks_["getBlockFromExample"])(block.name, {
 26174 
 27785       attributes: type.example.attributes,
 26175 /**
 27786       innerBlocks: type.example.innerBlocks
 26176  * External dependencies
 27787     }) : Object(external_this_wp_blocks_["cloneBlock"])(block);
 26177  */
 27788   }, [type.example ? block.name : block, type]);
 26178 
 27789 };
 26179 
 27790 
 26180 /**
 27791 function BlockStyles(_ref) {
 26181  * WordPress dependencies
 27792   var clientId = _ref.clientId,
 26182  */
 27793       _ref$onSwitch = _ref.onSwitch,
 26183 
 27794       onSwitch = _ref$onSwitch === void 0 ? external_this_lodash_["noop"] : _ref$onSwitch,
 26184 
 27795       _ref$onHoverClassName = _ref.onHoverClassName,
 26185 
 27796       onHoverClassName = _ref$onHoverClassName === void 0 ? external_this_lodash_["noop"] : _ref$onHoverClassName,
 26186 
 27797       itemRole = _ref.itemRole;
 26187 
 27798 
 26188 
 27799   var selector = function selector(select) {
 26189 /**
 27800     var _select = select('core/block-editor'),
 26190  * Internal dependencies
 27801         getBlock = _select.getBlock;
 26191  */
 27802 
 26192 
 27803     var _select2 = select('core/blocks'),
 26193 
 27804         getBlockStyles = _select2.getBlockStyles;
 26194 
 27805 
 26195 
 27806     var block = getBlock(clientId);
 26196 const EMPTY_OBJECT = {};
 27807     var blockType = Object(external_this_wp_blocks_["getBlockType"])(block.name);
 26197 
       
 26198 function useGenericPreviewBlock(block, type) {
       
 26199   return Object(external_wp_element_["useMemo"])(() => {
       
 26200     const example = type === null || type === void 0 ? void 0 : type.example;
       
 26201     const blockName = type === null || type === void 0 ? void 0 : type.name;
       
 26202 
       
 26203     if (example && blockName) {
       
 26204       return Object(external_wp_blocks_["getBlockFromExample"])(blockName, {
       
 26205         attributes: example.attributes,
       
 26206         innerBlocks: example.innerBlocks
       
 26207       });
       
 26208     }
       
 26209 
       
 26210     if (block) {
       
 26211       return Object(external_wp_blocks_["cloneBlock"])(block);
       
 26212     }
       
 26213   }, [type !== null && type !== void 0 && type.example ? block === null || block === void 0 ? void 0 : block.name : block, type]);
       
 26214 }
       
 26215 
       
 26216 function BlockStyles({
       
 26217   clientId,
       
 26218   onSwitch = external_lodash_["noop"],
       
 26219   onHoverClassName = external_lodash_["noop"],
       
 26220   itemRole
       
 26221 }) {
       
 26222   const selector = select => {
       
 26223     const {
       
 26224       getBlock
       
 26225     } = select(store);
       
 26226     const block = getBlock(clientId);
       
 26227 
       
 26228     if (!block) {
       
 26229       return EMPTY_OBJECT;
       
 26230     }
       
 26231 
       
 26232     const blockType = Object(external_wp_blocks_["getBlockType"])(block.name);
       
 26233     const {
       
 26234       getBlockStyles
       
 26235     } = select(external_wp_blocks_["store"]);
 27808     return {
 26236     return {
 27809       block: block,
 26237       block,
 27810       type: blockType,
 26238       type: blockType,
 27811       styles: getBlockStyles(block.name),
 26239       styles: getBlockStyles(block.name),
 27812       className: block.attributes.className || ''
 26240       className: block.attributes.className || ''
 27813     };
 26241     };
 27814   };
 26242   };
 27815 
 26243 
 27816   var _useSelect = Object(external_this_wp_data_["useSelect"])(selector, [clientId]),
 26244   const {
 27817       styles = _useSelect.styles,
 26245     styles,
 27818       block = _useSelect.block,
 26246     block,
 27819       type = _useSelect.type,
 26247     type,
 27820       className = _useSelect.className;
 26248     className
 27821 
 26249   } = Object(external_wp_data_["useSelect"])(selector, [clientId]);
 27822   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 26250   const {
 27823       updateBlockAttributes = _useDispatch.updateBlockAttributes;
 26251     updateBlockAttributes
 27824 
 26252   } = Object(external_wp_data_["useDispatch"])(store);
 27825   var genericPreviewBlock = block_styles_useGenericPreviewBlock(block, type);
 26253   const genericPreviewBlock = useGenericPreviewBlock(block, type);
 27826 
 26254 
 27827   if (!styles || styles.length === 0) {
 26255   if (!styles || styles.length === 0) {
 27828     return null;
 26256     return null;
 27829   }
 26257   }
 27830 
 26258 
 27831   var renderedStyles = Object(external_this_lodash_["find"])(styles, 'isDefault') ? styles : [{
 26259   const renderedStyles = Object(external_lodash_["find"])(styles, 'isDefault') ? styles : [{
 27832     name: 'default',
 26260     name: 'default',
 27833     label: Object(external_this_wp_i18n_["_x"])('Default', 'block style'),
 26261     label: Object(external_wp_i18n_["_x"])('Default', 'block style'),
 27834     isDefault: true
 26262     isDefault: true
 27835   }].concat(Object(toConsumableArray["a" /* default */])(styles));
 26263   }, ...styles];
 27836   var activeStyle = getActiveStyle(renderedStyles, className);
 26264   const activeStyle = getActiveStyle(renderedStyles, className);
 27837   return Object(external_this_wp_element_["createElement"])("div", {
 26265   return Object(external_wp_element_["createElement"])("div", {
 27838     className: "block-editor-block-styles"
 26266     className: "block-editor-block-styles"
 27839   }, renderedStyles.map(function (style) {
 26267   }, renderedStyles.map(style => {
 27840     var styleClassName = replaceActiveStyle(className, activeStyle, style);
 26268     const styleClassName = replaceActiveStyle(className, activeStyle, style);
 27841     return Object(external_this_wp_element_["createElement"])(BlockStyleItem, {
 26269     return Object(external_wp_element_["createElement"])(BlockStyleItem, {
 27842       genericPreviewBlock: genericPreviewBlock,
 26270       genericPreviewBlock: genericPreviewBlock,
 27843       className: className,
 26271       className: className,
 27844       isActive: activeStyle === style,
 26272       isActive: activeStyle === style,
 27845       key: style.name,
 26273       key: style.name,
 27846       onSelect: function onSelect() {
 26274       onSelect: () => {
 27847         updateBlockAttributes(clientId, {
 26275         updateBlockAttributes(clientId, {
 27848           className: styleClassName
 26276           className: styleClassName
 27849         });
 26277         });
 27850         onHoverClassName(null);
 26278         onHoverClassName(null);
 27851         onSwitch();
 26279         onSwitch();
 27852       },
 26280       },
 27853       onBlur: function onBlur() {
 26281       onBlur: () => onHoverClassName(null),
 27854         return onHoverClassName(null);
 26282       onHover: () => onHoverClassName(styleClassName),
 27855       },
       
 27856       onHover: function onHover() {
       
 27857         return onHoverClassName(styleClassName);
       
 27858       },
       
 27859       style: style,
 26283       style: style,
 27860       styleClassName: styleClassName,
 26284       styleClassName: styleClassName,
 27861       itemRole: itemRole
 26285       itemRole: itemRole
 27862     });
 26286     });
 27863   }));
 26287   }));
 27864 }
 26288 }
 27865 
 26289 
 27866 function BlockStyleItem(_ref2) {
 26290 function BlockStyleItem({
 27867   var genericPreviewBlock = _ref2.genericPreviewBlock,
 26291   genericPreviewBlock,
 27868       style = _ref2.style,
 26292   style,
 27869       isActive = _ref2.isActive,
 26293   isActive,
 27870       onBlur = _ref2.onBlur,
 26294   onBlur,
 27871       onHover = _ref2.onHover,
 26295   onHover,
 27872       onSelect = _ref2.onSelect,
 26296   onSelect,
 27873       styleClassName = _ref2.styleClassName,
 26297   styleClassName,
 27874       itemRole = _ref2.itemRole;
 26298   itemRole
 27875   var previewBlocks = Object(external_this_wp_element_["useMemo"])(function () {
 26299 }) {
 27876     return block_styles_objectSpread({}, genericPreviewBlock, {
 26300   const previewBlocks = Object(external_wp_element_["useMemo"])(() => {
 27877       attributes: block_styles_objectSpread({}, genericPreviewBlock.attributes, {
 26301     return { ...genericPreviewBlock,
       
 26302       attributes: { ...genericPreviewBlock.attributes,
 27878         className: styleClassName
 26303         className: styleClassName
 27879       })
 26304       }
 27880     });
 26305     };
 27881   }, [genericPreviewBlock, styleClassName]);
 26306   }, [genericPreviewBlock, styleClassName]);
 27882   return Object(external_this_wp_element_["createElement"])("div", {
 26307   return Object(external_wp_element_["createElement"])("div", {
 27883     key: style.name,
 26308     key: style.name,
 27884     className: classnames_default()('block-editor-block-styles__item', {
 26309     className: classnames_default()('block-editor-block-styles__item', {
 27885       'is-active': isActive
 26310       'is-active': isActive
 27886     }),
 26311     }),
 27887     onClick: function onClick() {
 26312     onClick: () => onSelect(),
 27888       return onSelect();
 26313     onKeyDown: event => {
 27889     },
 26314       if (external_wp_keycodes_["ENTER"] === event.keyCode || external_wp_keycodes_["SPACE"] === event.keyCode) {
 27890     onKeyDown: function onKeyDown(event) {
       
 27891       if (external_this_wp_keycodes_["ENTER"] === event.keyCode || external_this_wp_keycodes_["SPACE"] === event.keyCode) {
       
 27892         event.preventDefault();
 26315         event.preventDefault();
 27893         onSelect();
 26316         onSelect();
 27894       }
 26317       }
 27895     },
 26318     },
 27896     onMouseEnter: onHover,
 26319     onMouseEnter: onHover,
 27897     onMouseLeave: onBlur,
 26320     onMouseLeave: onBlur,
 27898     role: itemRole || 'button',
 26321     role: itemRole || 'button',
 27899     tabIndex: "0",
 26322     tabIndex: "0",
 27900     "aria-label": style.label || style.name
 26323     "aria-label": style.label || style.name
 27901   }, Object(external_this_wp_element_["createElement"])("div", {
 26324   }, Object(external_wp_element_["createElement"])("div", {
 27902     className: "block-editor-block-styles__item-preview"
 26325     className: "block-editor-block-styles__item-preview"
 27903   }, Object(external_this_wp_element_["createElement"])(block_preview, {
 26326   }, Object(external_wp_element_["createElement"])(block_preview, {
 27904     viewportWidth: 500,
 26327     viewportWidth: 500,
 27905     blocks: previewBlocks
 26328     blocks: previewBlocks
 27906   })), Object(external_this_wp_element_["createElement"])("div", {
 26329   })), Object(external_wp_element_["createElement"])("div", {
 27907     className: "block-editor-block-styles__item-label"
 26330     className: "block-editor-block-styles__item-label"
 27908   }, style.label || style.name));
 26331   }, style.label || style.name));
 27909 }
 26332 }
 27910 
 26333 
 27911 /* harmony default export */ var block_styles = (BlockStyles);
 26334 /* harmony default export */ var block_styles = (BlockStyles);
 27912 
 26335 
 27913 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/block-transformations-menu.js
 26336 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/block-styles-menu.js
 27914 
 26337 
 27915 
 26338 
 27916 /**
 26339 /**
 27917  * WordPress dependencies
 26340  * WordPress dependencies
 27918  */
 26341  */
 27919 
 26342 
 27920 
 26343 
 27921 
 26344 
       
 26345 
       
 26346 
 27922 /**
 26347 /**
 27923  * Internal dependencies
 26348  * Internal dependencies
 27924  */
 26349  */
 27925 
 26350 
 27926 
 26351 
 27927 
 26352 
 27928 var block_transformations_menu_BlockTransformationsMenu = function BlockTransformationsMenu(_ref) {
 26353 function BlockStylesMenu({
 27929   var className = _ref.className,
 26354   hoveredBlock,
 27930       possibleBlockTransformations = _ref.possibleBlockTransformations,
 26355   onSwitch
 27931       onSelect = _ref.onSelect;
 26356 }) {
 27932   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], {
 26357   const {
 27933     label: Object(external_this_wp_i18n_["__"])('Transform to'),
 26358     name,
 27934     className: className
 26359     clientId
 27935   }, possibleBlockTransformations.map(function (item) {
 26360   } = hoveredBlock;
 27936     var name = item.name,
 26361   const [hoveredClassName, setHoveredClassName] = Object(external_wp_element_["useState"])();
 27937         icon = item.icon,
 26362   const blockType = Object(external_wp_data_["useSelect"])(select => select(external_wp_blocks_["store"]).getBlockType(name), [name]);
 27938         title = item.title;
 26363   return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
 27939     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 26364     label: Object(external_wp_i18n_["__"])('Styles'),
 27940       key: name,
 26365     className: "block-editor-block-switcher__styles__menugroup"
 27941       className: Object(external_this_wp_blocks_["getBlockMenuDefaultClassName"])(name),
 26366   }, hoveredClassName && Object(external_wp_element_["createElement"])(PreviewBlockPopover, {
 27942       icon: Object(external_this_wp_element_["createElement"])(BlockIcon, {
 26367     blocks: blockType.example ? Object(external_wp_blocks_["getBlockFromExample"])(blockType.name, {
       
 26368       attributes: { ...blockType.example.attributes,
       
 26369         className: hoveredClassName
       
 26370       },
       
 26371       innerBlocks: blockType.example.innerBlocks
       
 26372     }) : Object(external_wp_blocks_["cloneBlock"])(hoveredBlock, {
       
 26373       className: hoveredClassName
       
 26374     })
       
 26375   }), Object(external_wp_element_["createElement"])(block_styles, {
       
 26376     clientId: clientId,
       
 26377     onSwitch: onSwitch,
       
 26378     onHoverClassName: setHoveredClassName,
       
 26379     itemRole: "menuitem"
       
 26380   }));
       
 26381 }
       
 26382 
       
 26383 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/utils.js
       
 26384 /**
       
 26385  * WordPress dependencies
       
 26386  */
       
 26387 
       
 26388 /**
       
 26389  * Try to find a matching block by a block's name in a provided
       
 26390  * block. We recurse through InnerBlocks and return the reference
       
 26391  * of the matched block (it could be an InnerBlock).
       
 26392  * If no match is found return nothing.
       
 26393  *
       
 26394  * @param {WPBlock} block The block to try to find a match.
       
 26395  * @param {string} selectedBlockName The block's name to use for matching condition.
       
 26396  * @param {Set} consumedBlocks A set holding the previously matched/consumed blocks.
       
 26397  *
       
 26398  * @return {WPBlock?} The matched block if found or nothing(`undefined`).
       
 26399  */
       
 26400 
       
 26401 const getMatchingBlockByName = (block, selectedBlockName, consumedBlocks = new Set()) => {
       
 26402   const {
       
 26403     clientId,
       
 26404     name,
       
 26405     innerBlocks = []
       
 26406   } = block; // Check if block has been consumed already.
       
 26407 
       
 26408   if (consumedBlocks.has(clientId)) return;
       
 26409   if (name === selectedBlockName) return block; // Try to find a matching block from InnerBlocks recursively.
       
 26410 
       
 26411   for (const innerBlock of innerBlocks) {
       
 26412     const match = getMatchingBlockByName(innerBlock, selectedBlockName, consumedBlocks);
       
 26413     if (match) return match;
       
 26414   }
       
 26415 };
       
 26416 /**
       
 26417  * Find and return the block attributes to retain through
       
 26418  * the transformation, based on Block Type's `role:content`
       
 26419  * attributes. If no `role:content` attributes exist,
       
 26420  * return selected block's attributes.
       
 26421  *
       
 26422  * @param {string} name Block type's namespaced name.
       
 26423  * @param {Object} attributes Selected block's attributes.
       
 26424  * @return {Object} The block's attributes to retain.
       
 26425  */
       
 26426 
       
 26427 const getRetainedBlockAttributes = (name, attributes) => {
       
 26428   const contentAttributes = Object(external_wp_blocks_["__experimentalGetBlockAttributesNamesByRole"])(name, 'content');
       
 26429   if (!(contentAttributes !== null && contentAttributes !== void 0 && contentAttributes.length)) return attributes;
       
 26430   return contentAttributes.reduce((_accumulator, attribute) => {
       
 26431     if (attributes[attribute]) _accumulator[attribute] = attributes[attribute];
       
 26432     return _accumulator;
       
 26433   }, {});
       
 26434 };
       
 26435 
       
 26436 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/use-transformed-patterns.js
       
 26437 /**
       
 26438  * WordPress dependencies
       
 26439  */
       
 26440 
       
 26441 
       
 26442 /**
       
 26443  * Internal dependencies
       
 26444  */
       
 26445 
       
 26446 
       
 26447 /**
       
 26448  * Mutate the matched block's attributes by getting
       
 26449  * which block type's attributes to retain and prioritize
       
 26450  * them in the merging of the attributes.
       
 26451  *
       
 26452  * @param {WPBlock} match The matched block.
       
 26453  * @param {WPBlock} selectedBlock The selected block.
       
 26454  * @return {void}
       
 26455  */
       
 26456 
       
 26457 const transformMatchingBlock = (match, selectedBlock) => {
       
 26458   // Get the block attributes to retain through the transformation.
       
 26459   const retainedBlockAttributes = getRetainedBlockAttributes(selectedBlock.name, selectedBlock.attributes);
       
 26460   match.attributes = { ...match.attributes,
       
 26461     ...retainedBlockAttributes
       
 26462   };
       
 26463 };
       
 26464 /**
       
 26465  * By providing the selected blocks and pattern's blocks
       
 26466  * find the matching blocks, transform them and return them.
       
 26467  * If not all selected blocks are matched, return nothing.
       
 26468  *
       
 26469  * @param {WPBlock[]} selectedBlocks The selected blocks.
       
 26470  * @param {WPBlock[]} patternBlocks The pattern's blocks.
       
 26471  * @return {WPBlock[]|void} The transformed pattern's blocks or undefined if not all selected blocks have been matched.
       
 26472  */
       
 26473 
       
 26474 const getPatternTransformedBlocks = (selectedBlocks, patternBlocks) => {
       
 26475   // Clone Pattern's blocks to produce new clientIds and be able to mutate the matches.
       
 26476   const _patternBlocks = patternBlocks.map(block => Object(external_wp_blocks_["cloneBlock"])(block));
       
 26477   /**
       
 26478    * Keep track of the consumed pattern blocks.
       
 26479    * This is needed because we loop the selected blocks
       
 26480    * and for example we may have selected two paragraphs and
       
 26481    * the pattern's blocks could have more `paragraphs`.
       
 26482    */
       
 26483 
       
 26484 
       
 26485   const consumedBlocks = new Set();
       
 26486 
       
 26487   for (const selectedBlock of selectedBlocks) {
       
 26488     let isMatch = false;
       
 26489 
       
 26490     for (const patternBlock of _patternBlocks) {
       
 26491       const match = getMatchingBlockByName(patternBlock, selectedBlock.name, consumedBlocks);
       
 26492       if (!match) continue;
       
 26493       isMatch = true;
       
 26494       consumedBlocks.add(match.clientId); // We update (mutate) the matching pattern block.
       
 26495 
       
 26496       transformMatchingBlock(match, selectedBlock); // No need to loop through other pattern's blocks.
       
 26497 
       
 26498       break;
       
 26499     } // Bail eary if a selected block has not been matched.
       
 26500 
       
 26501 
       
 26502     if (!isMatch) return;
       
 26503   }
       
 26504 
       
 26505   return _patternBlocks;
       
 26506 };
       
 26507 /**
       
 26508  * @typedef {WPBlockPattern & {transformedBlocks: WPBlock[]}} TransformedBlockPattern
       
 26509  */
       
 26510 
       
 26511 /**
       
 26512  * Custom hook that accepts patterns from state and the selected
       
 26513  * blocks and tries to match these with the pattern's blocks.
       
 26514  * If all selected blocks are matched with a Pattern's block,
       
 26515  * we transform them by retaining block's attributes with `role:content`.
       
 26516  * The transformed pattern's blocks are set to a new pattern
       
 26517  * property `transformedBlocks`.
       
 26518  *
       
 26519  * @param {WPBlockPattern[]} patterns Patterns from state.
       
 26520  * @param {WPBlock[]} selectedBlocks The currently selected blocks.
       
 26521  * @return {TransformedBlockPattern[]} Returns the eligible matched patterns with all the selected blocks.
       
 26522  */
       
 26523 // TODO tests
       
 26524 
       
 26525 const useTransformedPatterns = (patterns, selectedBlocks) => {
       
 26526   return Object(external_wp_element_["useMemo"])(() => patterns.reduce((accumulator, _pattern) => {
       
 26527     const transformedBlocks = getPatternTransformedBlocks(selectedBlocks, _pattern.blocks);
       
 26528 
       
 26529     if (transformedBlocks) {
       
 26530       accumulator.push({ ..._pattern,
       
 26531         transformedBlocks
       
 26532       });
       
 26533     }
       
 26534 
       
 26535     return accumulator;
       
 26536   }, []), [patterns, selectedBlocks]);
       
 26537 };
       
 26538 
       
 26539 /* harmony default export */ var use_transformed_patterns = (useTransformedPatterns);
       
 26540 
       
 26541 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/pattern-transformations-menu.js
       
 26542 
       
 26543 
       
 26544 
       
 26545 /**
       
 26546  * WordPress dependencies
       
 26547  */
       
 26548 
       
 26549 
       
 26550 
       
 26551 
       
 26552 
       
 26553 /**
       
 26554  * Internal dependencies
       
 26555  */
       
 26556 
       
 26557 
       
 26558 
       
 26559 
       
 26560 function PatternTransformationsMenu({
       
 26561   blocks,
       
 26562   patterns: statePatterns,
       
 26563   onSelect
       
 26564 }) {
       
 26565   const [showTransforms, setShowTransforms] = Object(external_wp_element_["useState"])(false);
       
 26566   const patterns = use_transformed_patterns(statePatterns, blocks);
       
 26567   if (!patterns.length) return null;
       
 26568   return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
       
 26569     className: "block-editor-block-switcher__pattern__transforms__menugroup"
       
 26570   }, showTransforms && Object(external_wp_element_["createElement"])(PreviewPatternsPopover, {
       
 26571     patterns: patterns,
       
 26572     onSelect: onSelect
       
 26573   }), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
       
 26574     onClick: event => {
       
 26575       event.preventDefault();
       
 26576       setShowTransforms(!showTransforms);
       
 26577     },
       
 26578     icon: chevron_right["a" /* default */]
       
 26579   }, Object(external_wp_i18n_["__"])('Patterns')));
       
 26580 }
       
 26581 
       
 26582 function PreviewPatternsPopover({
       
 26583   patterns,
       
 26584   onSelect
       
 26585 }) {
       
 26586   return Object(external_wp_element_["createElement"])("div", {
       
 26587     className: "block-editor-block-switcher__popover__preview__parent"
       
 26588   }, Object(external_wp_element_["createElement"])("div", {
       
 26589     className: "block-editor-block-switcher__popover__preview__container"
       
 26590   }, Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
       
 26591     className: "block-editor-block-switcher__preview__popover",
       
 26592     position: "bottom right"
       
 26593   }, Object(external_wp_element_["createElement"])("div", {
       
 26594     className: "block-editor-block-switcher__preview"
       
 26595   }, Object(external_wp_element_["createElement"])("div", {
       
 26596     className: "block-editor-block-switcher__preview-title"
       
 26597   }, Object(external_wp_i18n_["__"])('Preview')), Object(external_wp_element_["createElement"])(BlockPatternsList, {
       
 26598     patterns: patterns,
       
 26599     onSelect: onSelect
       
 26600   })))));
       
 26601 }
       
 26602 
       
 26603 function BlockPatternsList({
       
 26604   patterns,
       
 26605   onSelect
       
 26606 }) {
       
 26607   const composite = Object(external_wp_components_["__unstableUseCompositeState"])();
       
 26608   return Object(external_wp_element_["createElement"])(external_wp_components_["__unstableComposite"], Object(esm_extends["a" /* default */])({}, composite, {
       
 26609     role: "listbox",
       
 26610     className: "block-editor-block-switcher__preview-patterns-container",
       
 26611     "aria-label": Object(external_wp_i18n_["__"])('Patterns list')
       
 26612   }), patterns.map(pattern => Object(external_wp_element_["createElement"])(pattern_transformations_menu_BlockPattern, {
       
 26613     key: pattern.name,
       
 26614     pattern: pattern,
       
 26615     onSelect: onSelect,
       
 26616     composite: composite
       
 26617   })));
       
 26618 }
       
 26619 
       
 26620 function pattern_transformations_menu_BlockPattern({
       
 26621   pattern,
       
 26622   onSelect,
       
 26623   composite
       
 26624 }) {
       
 26625   // TODO check pattern/preview width...
       
 26626   const baseClassName = 'block-editor-block-switcher__preview-patterns-container';
       
 26627   const descriptionId = Object(external_wp_compose_["useInstanceId"])(pattern_transformations_menu_BlockPattern, `${baseClassName}-list__item-description`);
       
 26628   return Object(external_wp_element_["createElement"])("div", {
       
 26629     className: `${baseClassName}-list__list-item`,
       
 26630     "aria-label": pattern.title,
       
 26631     "aria-describedby": pattern.description ? descriptionId : undefined
       
 26632   }, Object(external_wp_element_["createElement"])(external_wp_components_["__unstableCompositeItem"], Object(esm_extends["a" /* default */])({
       
 26633     role: "option",
       
 26634     as: "div"
       
 26635   }, composite, {
       
 26636     className: `${baseClassName}-list__item`,
       
 26637     onClick: () => onSelect(pattern.transformedBlocks)
       
 26638   }), Object(external_wp_element_["createElement"])(block_preview, {
       
 26639     blocks: pattern.transformedBlocks,
       
 26640     viewportWidth: pattern.viewportWidth || 500
       
 26641   }), Object(external_wp_element_["createElement"])("div", {
       
 26642     className: `${baseClassName}-list__item-title`
       
 26643   }, pattern.title)), !!pattern.description && Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
       
 26644     id: descriptionId
       
 26645   }, pattern.description));
       
 26646 }
       
 26647 
       
 26648 /* harmony default export */ var pattern_transformations_menu = (PatternTransformationsMenu);
       
 26649 
       
 26650 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/index.js
       
 26651 
       
 26652 
       
 26653 /**
       
 26654  * External dependencies
       
 26655  */
       
 26656 
       
 26657 /**
       
 26658  * WordPress dependencies
       
 26659  */
       
 26660 
       
 26661 
       
 26662 
       
 26663 
       
 26664 
       
 26665 
       
 26666 /**
       
 26667  * Internal dependencies
       
 26668  */
       
 26669 
       
 26670 
       
 26671 
       
 26672 
       
 26673 
       
 26674 
       
 26675 
       
 26676 
       
 26677 const BlockSwitcherDropdownMenu = ({
       
 26678   clientIds,
       
 26679   blocks
       
 26680 }) => {
       
 26681   const {
       
 26682     replaceBlocks
       
 26683   } = Object(external_wp_data_["useDispatch"])(store);
       
 26684   const blockInformation = useBlockDisplayInformation(blocks[0].clientId);
       
 26685   const {
       
 26686     possibleBlockTransformations,
       
 26687     hasBlockStyles,
       
 26688     icon,
       
 26689     blockTitle,
       
 26690     patterns
       
 26691   } = Object(external_wp_data_["useSelect"])(select => {
       
 26692     const {
       
 26693       getBlockRootClientId,
       
 26694       getBlockTransformItems,
       
 26695       __experimentalGetPatternTransformItems
       
 26696     } = select(store);
       
 26697     const {
       
 26698       getBlockStyles,
       
 26699       getBlockType
       
 26700     } = select(external_wp_blocks_["store"]);
       
 26701     const rootClientId = getBlockRootClientId(Object(external_lodash_["castArray"])(clientIds)[0]);
       
 26702     const [{
       
 26703       name: firstBlockName
       
 26704     }] = blocks;
       
 26705 
       
 26706     const _isSingleBlockSelected = blocks.length === 1;
       
 26707 
       
 26708     const styles = _isSingleBlockSelected && getBlockStyles(firstBlockName);
       
 26709 
       
 26710     let _icon;
       
 26711 
       
 26712     if (_isSingleBlockSelected) {
       
 26713       _icon = blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.icon; // Take into account active block variations.
       
 26714     } else {
       
 26715       var _getBlockType;
       
 26716 
       
 26717       const isSelectionOfSameType = Object(external_lodash_["uniq"])(blocks.map(({
       
 26718         name
       
 26719       }) => name)).length === 1; // When selection consists of blocks of multiple types, display an
       
 26720       // appropriate icon to communicate the non-uniformity.
       
 26721 
       
 26722       _icon = isSelectionOfSameType ? (_getBlockType = getBlockType(firstBlockName)) === null || _getBlockType === void 0 ? void 0 : _getBlockType.icon : library_stack;
       
 26723     }
       
 26724 
       
 26725     return {
       
 26726       possibleBlockTransformations: getBlockTransformItems(blocks, rootClientId),
       
 26727       hasBlockStyles: !!(styles !== null && styles !== void 0 && styles.length),
       
 26728       icon: _icon,
       
 26729       blockTitle: getBlockType(firstBlockName).title,
       
 26730       patterns: __experimentalGetPatternTransformItems(blocks, rootClientId)
       
 26731     };
       
 26732   }, [clientIds, blocks, blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.icon]);
       
 26733   const isReusable = blocks.length === 1 && Object(external_wp_blocks_["isReusableBlock"])(blocks[0]);
       
 26734   const isTemplate = blocks.length === 1 && Object(external_wp_blocks_["isTemplatePart"])(blocks[0]); // Simple block tranformation based on the `Block Transforms` API.
       
 26735 
       
 26736   const onBlockTransform = name => replaceBlocks(clientIds, Object(external_wp_blocks_["switchToBlockType"])(blocks, name)); // Pattern transformation through the `Patterns` API.
       
 26737 
       
 26738 
       
 26739   const onPatternTransform = transformedBlocks => replaceBlocks(clientIds, transformedBlocks);
       
 26740 
       
 26741   const hasPossibleBlockTransformations = !!possibleBlockTransformations.length;
       
 26742   const hasPatternTransformation = !!(patterns !== null && patterns !== void 0 && patterns.length);
       
 26743 
       
 26744   if (!hasBlockStyles && !hasPossibleBlockTransformations) {
       
 26745     return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
       
 26746       disabled: true,
       
 26747       className: "block-editor-block-switcher__no-switcher-icon",
       
 26748       title: blockTitle,
       
 26749       icon: Object(external_wp_element_["createElement"])(BlockIcon, {
 27943         icon: icon,
 26750         icon: icon,
 27944         showColors: true
 26751         showColors: true
 27945       }),
 26752       })
 27946       onClick: function onClick(event) {
 26753     }));
 27947         event.preventDefault();
 26754   }
 27948         onSelect(name);
 26755 
 27949       }
 26756   const blockSwitcherLabel = blockTitle;
 27950     }, title);
 26757   const blockSwitcherDescription = 1 === blocks.length ? Object(external_wp_i18n_["sprintf"])(
 27951   }));
 26758   /* translators: %s: block title. */
       
 26759   Object(external_wp_i18n_["__"])('%s: Change block type or style'), blockTitle) : Object(external_wp_i18n_["sprintf"])(
       
 26760   /* translators: %d: number of blocks. */
       
 26761   Object(external_wp_i18n_["_n"])('Change type of %d block', 'Change type of %d blocks', blocks.length), blocks.length);
       
 26762   const showDropDown = hasBlockStyles || hasPossibleBlockTransformations || hasPatternTransformation;
       
 26763   return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], null, toggleProps => Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
       
 26764     className: "block-editor-block-switcher",
       
 26765     label: blockSwitcherLabel,
       
 26766     popoverProps: {
       
 26767       position: 'bottom right',
       
 26768       isAlternate: true,
       
 26769       className: 'block-editor-block-switcher__popover'
       
 26770     },
       
 26771     icon: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(BlockIcon, {
       
 26772       icon: icon,
       
 26773       className: "block-editor-block-switcher__toggle",
       
 26774       showColors: true
       
 26775     }), (isReusable || isTemplate) && Object(external_wp_element_["createElement"])("span", {
       
 26776       className: "block-editor-block-switcher__toggle-text"
       
 26777     }, Object(external_wp_element_["createElement"])(BlockTitle, {
       
 26778       clientId: clientIds
       
 26779     }))),
       
 26780     toggleProps: {
       
 26781       describedBy: blockSwitcherDescription,
       
 26782       ...toggleProps
       
 26783     },
       
 26784     menuProps: {
       
 26785       orientation: 'both'
       
 26786     }
       
 26787   }, ({
       
 26788     onClose
       
 26789   }) => showDropDown && Object(external_wp_element_["createElement"])("div", {
       
 26790     className: "block-editor-block-switcher__container"
       
 26791   }, hasPatternTransformation && Object(external_wp_element_["createElement"])(pattern_transformations_menu, {
       
 26792     blocks: blocks,
       
 26793     patterns: patterns,
       
 26794     onSelect: transformedBlocks => {
       
 26795       onPatternTransform(transformedBlocks);
       
 26796       onClose();
       
 26797     }
       
 26798   }), hasPossibleBlockTransformations && Object(external_wp_element_["createElement"])(block_transformations_menu, {
       
 26799     className: "block-editor-block-switcher__transforms__menugroup",
       
 26800     possibleBlockTransformations: possibleBlockTransformations,
       
 26801     blocks: blocks,
       
 26802     onSelect: name => {
       
 26803       onBlockTransform(name);
       
 26804       onClose();
       
 26805     }
       
 26806   }), hasBlockStyles && Object(external_wp_element_["createElement"])(BlockStylesMenu, {
       
 26807     hoveredBlock: blocks[0],
       
 26808     onSwitch: onClose
       
 26809   })))));
 27952 };
 26810 };
 27953 
 26811 const BlockSwitcher = ({
 27954 /* harmony default export */ var block_transformations_menu = (block_transformations_menu_BlockTransformationsMenu);
 26812   clientIds
 27955 
 26813 }) => {
 27956 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/index.js
 26814   const blocks = Object(external_wp_data_["useSelect"])(select => select(store).getBlocksByClientId(clientIds), [clientIds]);
 27957 
 26815 
 27958 
 26816   if (!blocks.length || blocks.some(block => !block)) {
 27959 
 26817     return null;
 27960 
 26818   }
 27961 
 26819 
 27962 
 26820   return Object(external_wp_element_["createElement"])(BlockSwitcherDropdownMenu, {
 27963 
 26821     clientIds: clientIds,
 27964 
 26822     blocks: blocks
 27965 
 26823   });
 27966 
 26824 };
 27967 function block_switcher_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (block_switcher_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
 26825 /* harmony default export */ var block_switcher = (BlockSwitcher);
 27968 
 26826 
 27969 function block_switcher_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 26827 // EXTERNAL MODULE: external ["wp","blob"]
 27970 
 26828 var external_wp_blob_ = __webpack_require__("xTGt");
 27971 function block_switcher_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; }
 26829 
 27972 
 26830 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/get-paste-event-data.js
 27973 function block_switcher_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_switcher_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 { block_switcher_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 27974 
       
 27975 /**
       
 27976  * External dependencies
       
 27977  */
       
 27978 
       
 27979 /**
 26831 /**
 27980  * WordPress dependencies
 26832  * WordPress dependencies
 27981  */
 26833  */
 27982 
 26834 
 27983 
 26835 
 27984 
 26836 function getPasteEventData({
 27985 
 26837   clipboardData
 27986 
 26838 }) {
 27987 
 26839   let plainText = '';
 27988 
 26840   let html = ''; // IE11 only supports `Text` as an argument for `getData` and will
 27989 
       
 27990 /**
       
 27991  * Internal dependencies
       
 27992  */
       
 27993 
       
 27994 
       
 27995 
       
 27996 
       
 27997 
       
 27998 
       
 27999 function PreviewBlockPopover(_ref) {
       
 28000   var hoveredBlock = _ref.hoveredBlock,
       
 28001       hoveredClassName = _ref.hoveredClassName;
       
 28002   var hoveredBlockType = Object(external_this_wp_blocks_["getBlockType"])(hoveredBlock.name);
       
 28003   return Object(external_this_wp_element_["createElement"])("div", {
       
 28004     className: "block-editor-block-switcher__popover__preview__parent"
       
 28005   }, Object(external_this_wp_element_["createElement"])("div", {
       
 28006     className: "block-editor-block-switcher__popover__preview__container"
       
 28007   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Popover"], {
       
 28008     className: "block-editor-block-switcher__preview__popover",
       
 28009     position: "bottom right",
       
 28010     focusOnMount: false
       
 28011   }, Object(external_this_wp_element_["createElement"])("div", {
       
 28012     className: "block-editor-block-switcher__preview"
       
 28013   }, Object(external_this_wp_element_["createElement"])("div", {
       
 28014     className: "block-editor-block-switcher__preview-title"
       
 28015   }, Object(external_this_wp_i18n_["__"])('Preview')), Object(external_this_wp_element_["createElement"])(block_preview, {
       
 28016     viewportWidth: 500,
       
 28017     blocks: hoveredBlockType.example ? Object(external_this_wp_blocks_["getBlockFromExample"])(hoveredBlock.name, {
       
 28018       attributes: block_switcher_objectSpread({}, hoveredBlockType.example.attributes, {
       
 28019         className: hoveredClassName
       
 28020       }),
       
 28021       innerBlocks: hoveredBlockType.example.innerBlocks
       
 28022     }) : Object(external_this_wp_blocks_["cloneBlock"])(hoveredBlock, {
       
 28023       className: hoveredClassName
       
 28024     })
       
 28025   })))));
       
 28026 }
       
 28027 
       
 28028 var block_switcher_BlockSwitcher = /*#__PURE__*/function (_Component) {
       
 28029   Object(inherits["a" /* default */])(BlockSwitcher, _Component);
       
 28030 
       
 28031   var _super = block_switcher_createSuper(BlockSwitcher);
       
 28032 
       
 28033   function BlockSwitcher() {
       
 28034     var _this;
       
 28035 
       
 28036     Object(classCallCheck["a" /* default */])(this, BlockSwitcher);
       
 28037 
       
 28038     _this = _super.apply(this, arguments);
       
 28039     _this.state = {
       
 28040       hoveredClassName: null
       
 28041     };
       
 28042     _this.onHoverClassName = _this.onHoverClassName.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 28043     return _this;
       
 28044   }
       
 28045 
       
 28046   Object(createClass["a" /* default */])(BlockSwitcher, [{
       
 28047     key: "onHoverClassName",
       
 28048     value: function onHoverClassName(className) {
       
 28049       this.setState({
       
 28050         hoveredClassName: className
       
 28051       });
       
 28052     }
       
 28053   }, {
       
 28054     key: "render",
       
 28055     value: function render() {
       
 28056       var _this2 = this;
       
 28057 
       
 28058       var _this$props = this.props,
       
 28059           blocks = _this$props.blocks,
       
 28060           onTransform = _this$props.onTransform,
       
 28061           inserterItems = _this$props.inserterItems,
       
 28062           hasBlockStyles = _this$props.hasBlockStyles;
       
 28063       var hoveredClassName = this.state.hoveredClassName;
       
 28064 
       
 28065       if (!Array.isArray(blocks) || !blocks.length) {
       
 28066         return null;
       
 28067       }
       
 28068 
       
 28069       var _blocks = Object(slicedToArray["a" /* default */])(blocks, 1),
       
 28070           hoveredBlock = _blocks[0];
       
 28071 
       
 28072       var itemsByName = Object(external_this_lodash_["mapKeys"])(inserterItems, function (_ref2) {
       
 28073         var name = _ref2.name;
       
 28074         return name;
       
 28075       });
       
 28076       var possibleBlockTransformations = Object(external_this_lodash_["orderBy"])(Object(external_this_lodash_["filter"])(Object(external_this_wp_blocks_["getPossibleBlockTransformations"])(blocks), function (block) {
       
 28077         return block && !!itemsByName[block.name];
       
 28078       }), function (block) {
       
 28079         return itemsByName[block.name].frecency;
       
 28080       }, 'desc'); // When selection consists of blocks of multiple types, display an
       
 28081       // appropriate icon to communicate the non-uniformity.
       
 28082 
       
 28083       var isSelectionOfSameType = Object(external_this_lodash_["uniq"])(Object(external_this_lodash_["map"])(blocks, 'name')).length === 1;
       
 28084       var icon;
       
 28085 
       
 28086       if (isSelectionOfSameType) {
       
 28087         var sourceBlockName = hoveredBlock.name;
       
 28088         var blockType = Object(external_this_wp_blocks_["getBlockType"])(sourceBlockName);
       
 28089         icon = blockType.icon;
       
 28090       } else {
       
 28091         icon = library_stack;
       
 28092       }
       
 28093 
       
 28094       var hasPossibleBlockTransformations = !!possibleBlockTransformations.length;
       
 28095 
       
 28096       if (!hasBlockStyles && !hasPossibleBlockTransformations) {
       
 28097         return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
       
 28098           disabled: true,
       
 28099           className: "block-editor-block-switcher__no-switcher-icon",
       
 28100           title: Object(external_this_wp_i18n_["__"])('Block icon'),
       
 28101           icon: Object(external_this_wp_element_["createElement"])(BlockIcon, {
       
 28102             icon: icon,
       
 28103             showColors: true
       
 28104           })
       
 28105         }));
       
 28106       }
       
 28107 
       
 28108       var blockSwitcherLabel = 1 === blocks.length ? Object(external_this_wp_i18n_["__"])('Change block type or style') : Object(external_this_wp_i18n_["sprintf"])(
       
 28109       /* translators: %s: number of blocks. */
       
 28110       Object(external_this_wp_i18n_["_n"])('Change type of %d block', 'Change type of %d blocks', blocks.length), blocks.length);
       
 28111       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalToolbarItem"], null, function (toggleProps) {
       
 28112         return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["DropdownMenu"], {
       
 28113           className: "block-editor-block-switcher",
       
 28114           label: blockSwitcherLabel,
       
 28115           popoverProps: {
       
 28116             position: 'bottom right',
       
 28117             isAlternate: true,
       
 28118             className: 'block-editor-block-switcher__popover'
       
 28119           },
       
 28120           icon: Object(external_this_wp_element_["createElement"])(BlockIcon, {
       
 28121             icon: icon,
       
 28122             className: "block-editor-block-switcher__toggle",
       
 28123             showColors: true
       
 28124           }),
       
 28125           toggleProps: toggleProps,
       
 28126           menuProps: {
       
 28127             orientation: 'both'
       
 28128           }
       
 28129         }, function (_ref3) {
       
 28130           var onClose = _ref3.onClose;
       
 28131           return (hasBlockStyles || hasPossibleBlockTransformations) && Object(external_this_wp_element_["createElement"])("div", {
       
 28132             className: "block-editor-block-switcher__container"
       
 28133           }, hasPossibleBlockTransformations && Object(external_this_wp_element_["createElement"])(block_transformations_menu, {
       
 28134             className: "block-editor-block-switcher__transforms__menugroup",
       
 28135             possibleBlockTransformations: possibleBlockTransformations,
       
 28136             onSelect: function onSelect(name) {
       
 28137               onTransform(blocks, name);
       
 28138               onClose();
       
 28139             }
       
 28140           }), hasBlockStyles && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], {
       
 28141             label: Object(external_this_wp_i18n_["__"])('Styles'),
       
 28142             className: "block-editor-block-switcher__styles__menugroup"
       
 28143           }, hoveredClassName !== null && Object(external_this_wp_element_["createElement"])(PreviewBlockPopover, {
       
 28144             hoveredBlock: hoveredBlock,
       
 28145             hoveredClassName: hoveredClassName
       
 28146           }), Object(external_this_wp_element_["createElement"])(block_styles, {
       
 28147             clientId: hoveredBlock.clientId,
       
 28148             onSwitch: onClose,
       
 28149             onHoverClassName: _this2.onHoverClassName,
       
 28150             itemRole: "menuitem"
       
 28151           })));
       
 28152         });
       
 28153       }));
       
 28154     }
       
 28155   }]);
       
 28156 
       
 28157   return BlockSwitcher;
       
 28158 }(external_this_wp_element_["Component"]);
       
 28159 /* harmony default export */ var block_switcher = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select, _ref4) {
       
 28160   var clientIds = _ref4.clientIds;
       
 28161 
       
 28162   var _select = select('core/block-editor'),
       
 28163       getBlocksByClientId = _select.getBlocksByClientId,
       
 28164       getBlockRootClientId = _select.getBlockRootClientId,
       
 28165       getInserterItems = _select.getInserterItems;
       
 28166 
       
 28167   var _select2 = select('core/blocks'),
       
 28168       getBlockStyles = _select2.getBlockStyles;
       
 28169 
       
 28170   var rootClientId = getBlockRootClientId(Object(external_this_lodash_["castArray"])(clientIds)[0]);
       
 28171   var blocks = getBlocksByClientId(clientIds);
       
 28172   var firstBlock = blocks && blocks.length === 1 ? blocks[0] : null;
       
 28173   var styles = firstBlock && getBlockStyles(firstBlock.name);
       
 28174   return {
       
 28175     blocks: blocks,
       
 28176     inserterItems: getInserterItems(rootClientId),
       
 28177     hasBlockStyles: styles && styles.length > 0
       
 28178   };
       
 28179 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps) {
       
 28180   return {
       
 28181     onTransform: function onTransform(blocks, name) {
       
 28182       dispatch('core/block-editor').replaceBlocks(ownProps.clientIds, Object(external_this_wp_blocks_["switchToBlockType"])(blocks, name));
       
 28183     }
       
 28184   };
       
 28185 }))(block_switcher_BlockSwitcher));
       
 28186 
       
 28187 // EXTERNAL MODULE: external {"this":["wp","blob"]}
       
 28188 var external_this_wp_blob_ = __webpack_require__(44);
       
 28189 
       
 28190 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/get-paste-event-data.js
       
 28191 /**
       
 28192  * External dependencies
       
 28193  */
       
 28194 
       
 28195 /**
       
 28196  * WordPress dependencies
       
 28197  */
       
 28198 
       
 28199 
       
 28200 function getPasteEventData(_ref) {
       
 28201   var clipboardData = _ref.clipboardData;
       
 28202   var items = clipboardData.items,
       
 28203       files = clipboardData.files; // In Edge these properties can be null instead of undefined, so a more
       
 28204   // rigorous test is required over using default values.
       
 28205 
       
 28206   items = Object(external_this_lodash_["isNil"])(items) ? [] : items;
       
 28207   files = Object(external_this_lodash_["isNil"])(files) ? [] : files;
       
 28208   var plainText = '';
       
 28209   var html = ''; // IE11 only supports `Text` as an argument for `getData` and will
       
 28210   // otherwise throw an invalid argument error, so we try the standard
 26841   // otherwise throw an invalid argument error, so we try the standard
 28211   // arguments first, then fallback to `Text` if they fail.
 26842   // arguments first, then fallback to `Text` if they fail.
 28212 
 26843 
 28213   try {
 26844   try {
 28214     plainText = clipboardData.getData('text/plain');
 26845     plainText = clipboardData.getData('text/plain');
 28222       // behaviour.
 26853       // behaviour.
 28223       return;
 26854       return;
 28224     }
 26855     }
 28225   }
 26856   }
 28226 
 26857 
 28227   files = Array.from(files);
 26858   const files = Object(external_wp_dom_["getFilesFromDataTransfer"])(clipboardData).filter(({
 28228   Array.from(items).forEach(function (item) {
 26859     type
 28229     if (!item.getAsFile) {
 26860   }) => /^image\/(?:jpe?g|png|gif)$/.test(type)); // Only process files if no HTML is present.
 28230       return;
       
 28231     }
       
 28232 
       
 28233     var file = item.getAsFile();
       
 28234 
       
 28235     if (!file) {
       
 28236       return;
       
 28237     }
       
 28238 
       
 28239     var name = file.name,
       
 28240         type = file.type,
       
 28241         size = file.size;
       
 28242 
       
 28243     if (!Object(external_this_lodash_["find"])(files, {
       
 28244       name: name,
       
 28245       type: type,
       
 28246       size: size
       
 28247     })) {
       
 28248       files.push(file);
       
 28249     }
       
 28250   });
       
 28251   files = files.filter(function (_ref2) {
       
 28252     var type = _ref2.type;
       
 28253     return /^image\/(?:jpe?g|png|gif)$/.test(type);
       
 28254   }); // Only process files if no HTML is present.
       
 28255   // A pasted file may have the URL as plain text.
 26861   // A pasted file may have the URL as plain text.
 28256 
 26862 
 28257   if (files.length && !html) {
 26863   if (files.length && !html) {
 28258     html = files.map(function (file) {
 26864     html = files.map(file => `<img src="${Object(external_wp_blob_["createBlobURL"])(file)}">`).join('');
 28259       return "<img src=\"".concat(Object(external_this_wp_blob_["createBlobURL"])(file), "\">");
       
 28260     }).join('');
       
 28261     plainText = '';
 26865     plainText = '';
 28262   }
 26866   }
 28263 
 26867 
 28264   return {
 26868   return {
 28265     html: html,
 26869     html,
 28266     plainText: plainText
 26870     plainText
 28267   };
 26871   };
 28268 }
 26872 }
 28269 
 26873 
 28270 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/copy-handler/index.js
 26874 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/copy-handler/index.js
 28271 
 26875 
 28276 
 26880 
 28277 
 26881 
 28278 
 26882 
 28279 
 26883 
 28280 
 26884 
       
 26885 
       
 26886 
 28281 /**
 26887 /**
 28282  * Internal dependencies
 26888  * Internal dependencies
 28283  */
 26889  */
 28284 
 26890 
 28285 
 26891 
       
 26892 
 28286 function useNotifyCopy() {
 26893 function useNotifyCopy() {
 28287   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 26894   const {
 28288     return select('core/block-editor');
 26895     getBlockName
 28289   }, []),
 26896   } = Object(external_wp_data_["useSelect"])(store);
 28290       getBlockName = _useSelect.getBlockName;
 26897   const {
 28291 
 26898     getBlockType
 28292   var _useSelect2 = Object(external_this_wp_data_["useSelect"])(function (select) {
 26899   } = Object(external_wp_data_["useSelect"])(external_wp_blocks_["store"]);
 28293     return select('core/blocks');
 26900   const {
 28294   }, []),
 26901     createSuccessNotice
 28295       getBlockType = _useSelect2.getBlockType;
 26902   } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
 28296 
 26903   return Object(external_wp_element_["useCallback"])((eventType, selectedBlockClientIds) => {
 28297   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
 26904     let notice = '';
 28298       createSuccessNotice = _useDispatch.createSuccessNotice;
       
 28299 
       
 28300   return Object(external_this_wp_element_["useCallback"])(function (eventType, selectedBlockClientIds) {
       
 28301     var notice = '';
       
 28302 
 26905 
 28303     if (selectedBlockClientIds.length === 1) {
 26906     if (selectedBlockClientIds.length === 1) {
 28304       var clientId = selectedBlockClientIds[0];
 26907       const clientId = selectedBlockClientIds[0];
 28305 
 26908       const {
 28306       var _getBlockType = getBlockType(getBlockName(clientId)),
 26909         title
 28307           title = _getBlockType.title;
 26910       } = getBlockType(getBlockName(clientId));
 28308 
 26911       notice = eventType === 'copy' ? Object(external_wp_i18n_["sprintf"])( // Translators: Name of the block being copied, e.g. "Paragraph".
 28309       notice = eventType === 'copy' ? Object(external_this_wp_i18n_["sprintf"])( // Translators: Name of the block being copied, e.g. "Paragraph".
 26912       Object(external_wp_i18n_["__"])('Copied "%s" to clipboard.'), title) : Object(external_wp_i18n_["sprintf"])( // Translators: Name of the block being cut, e.g. "Paragraph".
 28310       Object(external_this_wp_i18n_["__"])('Copied "%s" to clipboard.'), title) : Object(external_this_wp_i18n_["sprintf"])( // Translators: Name of the block being cut, e.g. "Paragraph".
 26913       Object(external_wp_i18n_["__"])('Moved "%s" to clipboard.'), title);
 28311       Object(external_this_wp_i18n_["__"])('Moved "%s" to clipboard.'), title);
       
 28312     } else {
 26914     } else {
 28313       notice = eventType === 'copy' ? Object(external_this_wp_i18n_["sprintf"])( // Translators: %d: Number of blocks being copied.
 26915       notice = eventType === 'copy' ? Object(external_wp_i18n_["sprintf"])( // Translators: %d: Number of blocks being copied.
 28314       Object(external_this_wp_i18n_["_n"])('Copied %d block to clipboard.', 'Copied %d blocks to clipboard.', selectedBlockClientIds.length), selectedBlockClientIds.length) : Object(external_this_wp_i18n_["sprintf"])( // Translators: %d: Number of blocks being cut.
 26916       Object(external_wp_i18n_["_n"])('Copied %d block to clipboard.', 'Copied %d blocks to clipboard.', selectedBlockClientIds.length), selectedBlockClientIds.length) : Object(external_wp_i18n_["sprintf"])( // Translators: %d: Number of blocks being cut.
 28315       Object(external_this_wp_i18n_["_n"])('Moved %d block to clipboard.', 'Moved %d blocks to clipboard.', selectedBlockClientIds.length), selectedBlockClientIds.length);
 26917       Object(external_wp_i18n_["_n"])('Moved %d block to clipboard.', 'Moved %d blocks to clipboard.', selectedBlockClientIds.length), selectedBlockClientIds.length);
 28316     }
 26918     }
 28317 
 26919 
 28318     createSuccessNotice(notice, {
 26920     createSuccessNotice(notice, {
 28319       type: 'snackbar'
 26921       type: 'snackbar'
 28320     });
 26922     });
 28321   }, []);
 26923   }, []);
 28322 }
 26924 }
 28323 
 26925 function useClipboardHandler() {
 28324 function CopyHandler(_ref) {
 26926   const {
 28325   var children = _ref.children;
 26927     getBlocksByClientId,
 28326   var containerRef = Object(external_this_wp_element_["useRef"])();
 26928     getSelectedBlockClientIds,
 28327 
 26929     hasMultiSelection,
 28328   var _useSelect3 = Object(external_this_wp_data_["useSelect"])(function (select) {
 26930     getSettings
 28329     return select('core/block-editor');
 26931   } = Object(external_wp_data_["useSelect"])(store);
 28330   }, []),
 26932   const {
 28331       getBlocksByClientId = _useSelect3.getBlocksByClientId,
 26933     flashBlock,
 28332       getSelectedBlockClientIds = _useSelect3.getSelectedBlockClientIds,
 26934     removeBlocks,
 28333       hasMultiSelection = _useSelect3.hasMultiSelection,
 26935     replaceBlocks
 28334       getSettings = _useSelect3.getSettings;
 26936   } = Object(external_wp_data_["useDispatch"])(store);
 28335 
 26937   const notifyCopy = useNotifyCopy();
 28336   var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 26938   return Object(external_wp_compose_["useRefEffect"])(node => {
 28337       flashBlock = _useDispatch2.flashBlock,
 26939     function handler(event) {
 28338       removeBlocks = _useDispatch2.removeBlocks,
 26940       const selectedBlockClientIds = getSelectedBlockClientIds();
 28339       replaceBlocks = _useDispatch2.replaceBlocks;
 26941 
 28340 
 26942       if (selectedBlockClientIds.length === 0) {
 28341   var notifyCopy = useNotifyCopy();
 26943         return;
 28342 
 26944       } // Always handle multiple selected blocks.
 28343   var _getSettings = getSettings(),
 26945 
 28344       canUserUseUnfilteredHTML = _getSettings.__experimentalCanUserUseUnfilteredHTML;
 26946 
 28345 
 26947       if (!hasMultiSelection()) {
 28346   var handler = function handler(event) {
 26948         const {
 28347     var selectedBlockClientIds = getSelectedBlockClientIds();
 26949           target
 28348 
 26950         } = event;
 28349     if (selectedBlockClientIds.length === 0) {
 26951         const {
 28350       return;
 26952           ownerDocument
 28351     } // Always handle multiple selected blocks.
 26953         } = target; // If copying, only consider actual text selection as selection.
 28352 
 26954         // Otherwise, any focus on an input field is considered.
 28353 
 26955 
 28354     if (!hasMultiSelection()) {
 26956         const hasSelection = event.type === 'copy' || event.type === 'cut' ? Object(external_wp_dom_["documentHasUncollapsedSelection"])(ownerDocument) : Object(external_wp_dom_["documentHasSelection"])(ownerDocument); // Let native copy behaviour take over in input fields.
 28355       // If copying, only consider actual text selection as selection.
 26957 
 28356       // Otherwise, any focus on an input field is considered.
 26958         if (hasSelection) {
 28357       var hasSelection = event.type === 'copy' || event.type === 'cut' ? Object(external_this_wp_dom_["documentHasUncollapsedSelection"])() : Object(external_this_wp_dom_["documentHasSelection"])(); // Let native copy behaviour take over in input fields.
 26959           return;
 28358 
 26960         }
 28359       if (hasSelection) {
 26961       }
       
 26962 
       
 26963       if (!node.contains(event.target.ownerDocument.activeElement)) {
 28360         return;
 26964         return;
 28361       }
 26965       }
 28362     }
 26966 
 28363 
 26967       event.preventDefault();
 28364     if (!containerRef.current.contains(event.target)) {
 26968 
 28365       return;
 26969       if (event.type === 'copy' || event.type === 'cut') {
 28366     }
 26970         if (selectedBlockClientIds.length === 1) {
 28367 
 26971           flashBlock(selectedBlockClientIds[0]);
 28368     event.preventDefault();
 26972         }
 28369 
 26973 
 28370     if (event.type === 'copy' || event.type === 'cut') {
 26974         notifyCopy(event.type, selectedBlockClientIds);
 28371       if (selectedBlockClientIds.length === 1) {
 26975         const blocks = getBlocksByClientId(selectedBlockClientIds);
 28372         flashBlock(selectedBlockClientIds[0]);
 26976         const serialized = Object(external_wp_blocks_["serialize"])(blocks);
       
 26977         event.clipboardData.setData('text/plain', serialized);
       
 26978         event.clipboardData.setData('text/html', serialized);
 28373       }
 26979       }
 28374 
 26980 
 28375       notifyCopy(event.type, selectedBlockClientIds);
 26981       if (event.type === 'cut') {
 28376       var blocks = getBlocksByClientId(selectedBlockClientIds);
 26982         removeBlocks(selectedBlockClientIds);
 28377       var serialized = Object(external_this_wp_blocks_["serialize"])(blocks);
 26983       } else if (event.type === 'paste') {
 28378       event.clipboardData.setData('text/plain', serialized);
 26984         const {
 28379       event.clipboardData.setData('text/html', serialized);
 26985           __experimentalCanUserUseUnfilteredHTML: canUserUseUnfilteredHTML
 28380     }
 26986         } = getSettings();
 28381 
 26987         const {
 28382     if (event.type === 'cut') {
 26988           plainText,
 28383       removeBlocks(selectedBlockClientIds);
 26989           html
 28384     } else if (event.type === 'paste') {
 26990         } = getPasteEventData(event);
 28385       var _getPasteEventData = getPasteEventData(event),
 26991         const blocks = Object(external_wp_blocks_["pasteHandler"])({
 28386           plainText = _getPasteEventData.plainText,
 26992           HTML: html,
 28387           html = _getPasteEventData.html;
 26993           plainText,
 28388 
 26994           mode: 'BLOCKS',
 28389       var _blocks = Object(external_this_wp_blocks_["pasteHandler"])({
 26995           canUserUseUnfilteredHTML
 28390         HTML: html,
 26996         });
 28391         plainText: plainText,
 26997         replaceBlocks(selectedBlockClientIds, blocks, blocks.length - 1, -1);
 28392         mode: 'BLOCKS',
 26998       }
 28393         canUserUseUnfilteredHTML: canUserUseUnfilteredHTML
 26999     }
 28394       });
 27000 
 28395 
 27001     node.ownerDocument.addEventListener('copy', handler);
 28396       replaceBlocks(selectedBlockClientIds, _blocks, _blocks.length - 1, -1);
 27002     node.ownerDocument.addEventListener('cut', handler);
 28397     }
 27003     node.ownerDocument.addEventListener('paste', handler);
 28398   };
 27004     return () => {
 28399 
 27005       node.ownerDocument.removeEventListener('copy', handler);
 28400   return Object(external_this_wp_element_["createElement"])("div", {
 27006       node.ownerDocument.removeEventListener('cut', handler);
 28401     ref: containerRef,
 27007       node.ownerDocument.removeEventListener('paste', handler);
 28402     onCopy: handler,
 27008     };
 28403     onCut: handler,
 27009   }, []);
 28404     onPaste: handler
 27010 }
       
 27011 
       
 27012 function CopyHandler({
       
 27013   children
       
 27014 }) {
       
 27015   return Object(external_wp_element_["createElement"])("div", {
       
 27016     ref: useClipboardHandler()
 28405   }, children);
 27017   }, children);
 28406 }
 27018 }
 28407 
 27019 
 28408 /* harmony default export */ var copy_handler = (CopyHandler);
 27020 /* harmony default export */ var copy_handler = (CopyHandler);
 28409 
 27021 
 28421 /**
 27033 /**
 28422  * Internal dependencies
 27034  * Internal dependencies
 28423  */
 27035  */
 28424 
 27036 
 28425 
 27037 
 28426 function BlockActions(_ref) {
 27038 
 28427   var clientIds = _ref.clientIds,
 27039 function BlockActions({
 28428       children = _ref.children,
 27040   clientIds,
 28429       updateSelection = _ref.__experimentalUpdateSelection;
 27041   children,
 28430 
 27042   __experimentalUpdateSelection: updateSelection
 28431   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 27043 }) {
 28432     return select('core/block-editor');
 27044   const {
 28433   }, []),
 27045     canInsertBlockType,
 28434       canInsertBlockType = _useSelect.canInsertBlockType,
 27046     getBlockRootClientId,
 28435       getBlockRootClientId = _useSelect.getBlockRootClientId,
 27047     getBlocksByClientId,
 28436       getBlocksByClientId = _useSelect.getBlocksByClientId,
 27048     getTemplateLock
 28437       getTemplateLock = _useSelect.getTemplateLock;
 27049   } = Object(external_wp_data_["useSelect"])(select => select(store), []);
 28438 
 27050   const {
 28439   var _useSelect2 = Object(external_this_wp_data_["useSelect"])(function (select) {
 27051     getDefaultBlockName,
 28440     return select('core/blocks');
 27052     getGroupingBlockName
 28441   }, []),
 27053   } = Object(external_wp_data_["useSelect"])(select => select(external_wp_blocks_["store"]), []);
 28442       getDefaultBlockName = _useSelect2.getDefaultBlockName,
 27054   const blocks = getBlocksByClientId(clientIds);
 28443       getGroupingBlockName = _useSelect2.getGroupingBlockName;
 27055   const rootClientId = getBlockRootClientId(clientIds[0]);
 28444 
 27056   const canDuplicate = Object(external_lodash_["every"])(blocks, block => {
 28445   var blocks = getBlocksByClientId(clientIds);
 27057     return !!block && Object(external_wp_blocks_["hasBlockSupport"])(block.name, 'multiple', true) && canInsertBlockType(block.name, rootClientId);
 28446   var rootClientId = getBlockRootClientId(clientIds[0]);
       
 28447   var canDuplicate = Object(external_this_lodash_["every"])(blocks, function (block) {
       
 28448     return !!block && Object(external_this_wp_blocks_["hasBlockSupport"])(block.name, 'multiple', true) && canInsertBlockType(block.name, rootClientId);
       
 28449   });
 27058   });
 28450   var canInsertDefaultBlock = canInsertBlockType(getDefaultBlockName(), rootClientId);
 27059   const canInsertDefaultBlock = canInsertBlockType(getDefaultBlockName(), rootClientId);
 28451 
 27060   const {
 28452   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 27061     removeBlocks,
 28453       removeBlocks = _useDispatch.removeBlocks,
 27062     replaceBlocks,
 28454       replaceBlocks = _useDispatch.replaceBlocks,
 27063     duplicateBlocks,
 28455       duplicateBlocks = _useDispatch.duplicateBlocks,
 27064     insertAfterBlock,
 28456       insertAfterBlock = _useDispatch.insertAfterBlock,
 27065     insertBeforeBlock,
 28457       insertBeforeBlock = _useDispatch.insertBeforeBlock,
 27066     flashBlock,
 28458       flashBlock = _useDispatch.flashBlock,
 27067     setBlockMovingClientId,
 28459       setBlockMovingClientId = _useDispatch.setBlockMovingClientId,
 27068     setNavigationMode,
 28460       setNavigationMode = _useDispatch.setNavigationMode;
 27069     selectBlock
 28461 
 27070   } = Object(external_wp_data_["useDispatch"])(store);
 28462   var notifyCopy = useNotifyCopy();
 27071   const notifyCopy = useNotifyCopy();
 28463   return children({
 27072   return children({
 28464     canDuplicate: canDuplicate,
 27073     canDuplicate,
 28465     canInsertDefaultBlock: canInsertDefaultBlock,
 27074     canInsertDefaultBlock,
 28466     isLocked: !!getTemplateLock(rootClientId),
 27075     isLocked: !!getTemplateLock(rootClientId),
 28467     rootClientId: rootClientId,
 27076     rootClientId,
 28468     blocks: blocks,
 27077     blocks,
 28469     onDuplicate: function onDuplicate() {
 27078 
       
 27079     onDuplicate() {
 28470       return duplicateBlocks(clientIds, updateSelection);
 27080       return duplicateBlocks(clientIds, updateSelection);
 28471     },
 27081     },
 28472     onRemove: function onRemove() {
 27082 
       
 27083     onRemove() {
 28473       return removeBlocks(clientIds, updateSelection);
 27084       return removeBlocks(clientIds, updateSelection);
 28474     },
 27085     },
 28475     onInsertBefore: function onInsertBefore() {
 27086 
 28476       insertBeforeBlock(Object(external_this_lodash_["first"])(Object(external_this_lodash_["castArray"])(clientIds)));
 27087     onInsertBefore() {
       
 27088       insertBeforeBlock(Object(external_lodash_["first"])(Object(external_lodash_["castArray"])(clientIds)));
 28477     },
 27089     },
 28478     onInsertAfter: function onInsertAfter() {
 27090 
 28479       insertAfterBlock(Object(external_this_lodash_["last"])(Object(external_this_lodash_["castArray"])(clientIds)));
 27091     onInsertAfter() {
       
 27092       insertAfterBlock(Object(external_lodash_["last"])(Object(external_lodash_["castArray"])(clientIds)));
 28480     },
 27093     },
 28481     onMoveTo: function onMoveTo() {
 27094 
       
 27095     onMoveTo() {
 28482       setNavigationMode(true);
 27096       setNavigationMode(true);
       
 27097       selectBlock(clientIds[0]);
 28483       setBlockMovingClientId(clientIds[0]);
 27098       setBlockMovingClientId(clientIds[0]);
 28484     },
 27099     },
 28485     onGroup: function onGroup() {
 27100 
       
 27101     onGroup() {
 28486       if (!blocks.length) {
 27102       if (!blocks.length) {
 28487         return;
 27103         return;
 28488       }
 27104       }
 28489 
 27105 
 28490       var groupingBlockName = getGroupingBlockName(); // Activate the `transform` on `core/group` which does the conversion
 27106       const groupingBlockName = getGroupingBlockName(); // Activate the `transform` on `core/group` which does the conversion
 28491 
 27107 
 28492       var newBlocks = Object(external_this_wp_blocks_["switchToBlockType"])(blocks, groupingBlockName);
 27108       const newBlocks = Object(external_wp_blocks_["switchToBlockType"])(blocks, groupingBlockName);
 28493 
 27109 
 28494       if (!newBlocks) {
 27110       if (!newBlocks) {
 28495         return;
 27111         return;
 28496       }
 27112       }
 28497 
 27113 
 28498       replaceBlocks(clientIds, newBlocks);
 27114       replaceBlocks(clientIds, newBlocks);
 28499     },
 27115     },
 28500     onUngroup: function onUngroup() {
 27116 
       
 27117     onUngroup() {
 28501       if (!blocks.length) {
 27118       if (!blocks.length) {
 28502         return;
 27119         return;
 28503       }
 27120       }
 28504 
 27121 
 28505       var innerBlocks = blocks[0].innerBlocks;
 27122       const innerBlocks = blocks[0].innerBlocks;
 28506 
 27123 
 28507       if (!innerBlocks.length) {
 27124       if (!innerBlocks.length) {
 28508         return;
 27125         return;
 28509       }
 27126       }
 28510 
 27127 
 28511       replaceBlocks(clientIds, innerBlocks);
 27128       replaceBlocks(clientIds, innerBlocks);
 28512     },
 27129     },
 28513     onCopy: function onCopy() {
 27130 
 28514       var selectedBlockClientIds = blocks.map(function (_ref2) {
 27131     onCopy() {
 28515         var clientId = _ref2.clientId;
 27132       const selectedBlockClientIds = blocks.map(({
 28516         return clientId;
 27133         clientId
 28517       });
 27134       }) => clientId);
 28518 
 27135 
 28519       if (blocks.length === 1) {
 27136       if (blocks.length === 1) {
 28520         flashBlock(selectedBlockClientIds[0]);
 27137         flashBlock(selectedBlockClientIds[0]);
 28521       }
 27138       }
 28522 
 27139 
 28523       notifyCopy('copy', selectedBlockClientIds);
 27140       notifyCopy('copy', selectedBlockClientIds);
 28524     }
 27141     }
       
 27142 
 28525   });
 27143   });
 28526 }
 27144 }
 28527 
 27145 
 28528 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-mode-toggle.js
 27146 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-mode-toggle.js
 28529 
 27147 
 28539 
 27157 
 28540 
 27158 
 28541 
 27159 
 28542 
 27160 
 28543 
 27161 
 28544 function BlockModeToggle(_ref) {
 27162 /**
 28545   var blockType = _ref.blockType,
 27163  * Internal dependencies
 28546       mode = _ref.mode,
 27164  */
 28547       onToggleMode = _ref.onToggleMode,
 27165 
 28548       _ref$small = _ref.small,
 27166 
 28549       small = _ref$small === void 0 ? false : _ref$small,
 27167 function BlockModeToggle({
 28550       _ref$isCodeEditingEna = _ref.isCodeEditingEnabled,
 27168   blockType,
 28551       isCodeEditingEnabled = _ref$isCodeEditingEna === void 0 ? true : _ref$isCodeEditingEna;
 27169   mode,
 28552 
 27170   onToggleMode,
 28553   if (!Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'html', true) || !isCodeEditingEnabled) {
 27171   small = false,
       
 27172   isCodeEditingEnabled = true
       
 27173 }) {
       
 27174   if (!Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'html', true) || !isCodeEditingEnabled) {
 28554     return null;
 27175     return null;
 28555   }
 27176   }
 28556 
 27177 
 28557   var label = mode === 'visual' ? Object(external_this_wp_i18n_["__"])('Edit as HTML') : Object(external_this_wp_i18n_["__"])('Edit visually');
 27178   const label = mode === 'visual' ? Object(external_wp_i18n_["__"])('Edit as HTML') : Object(external_wp_i18n_["__"])('Edit visually');
 28558   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 27179   return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 28559     onClick: onToggleMode
 27180     onClick: onToggleMode
 28560   }, !small && label);
 27181   }, !small && label);
 28561 }
 27182 }
 28562 /* harmony default export */ var block_mode_toggle = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref2) {
 27183 /* harmony default export */ var block_mode_toggle = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, {
 28563   var clientId = _ref2.clientId;
 27184   clientId
 28564 
 27185 }) => {
 28565   var _select = select('core/block-editor'),
 27186   const {
 28566       getBlock = _select.getBlock,
 27187     getBlock,
 28567       getBlockMode = _select.getBlockMode,
 27188     getBlockMode,
 28568       getSettings = _select.getSettings;
 27189     getSettings
 28569 
 27190   } = select(store);
 28570   var block = getBlock(clientId);
 27191   const block = getBlock(clientId);
 28571   var isCodeEditingEnabled = getSettings().codeEditingEnabled;
 27192   const isCodeEditingEnabled = getSettings().codeEditingEnabled;
 28572   return {
 27193   return {
 28573     mode: getBlockMode(clientId),
 27194     mode: getBlockMode(clientId),
 28574     blockType: block ? Object(external_this_wp_blocks_["getBlockType"])(block.name) : null,
 27195     blockType: block ? Object(external_wp_blocks_["getBlockType"])(block.name) : null,
 28575     isCodeEditingEnabled: isCodeEditingEnabled
 27196     isCodeEditingEnabled
 28576   };
 27197   };
 28577 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref3) {
 27198 }), Object(external_wp_data_["withDispatch"])((dispatch, {
 28578   var _ref3$onToggle = _ref3.onToggle,
 27199   onToggle = external_lodash_["noop"],
 28579       onToggle = _ref3$onToggle === void 0 ? external_this_lodash_["noop"] : _ref3$onToggle,
 27200   clientId
 28580       clientId = _ref3.clientId;
 27201 }) => ({
 28581   return {
 27202   onToggleMode() {
 28582     onToggleMode: function onToggleMode() {
 27203     dispatch(store).toggleBlockMode(clientId);
 28583       dispatch('core/block-editor').toggleBlockMode(clientId);
 27204     onToggle();
 28584       onToggle();
 27205   }
 28585     }
 27206 
 28586   };
 27207 }))])(BlockModeToggle));
 28587 })])(BlockModeToggle));
       
 28588 
 27208 
 28589 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-convert-button.js
 27209 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-convert-button.js
 28590 
 27210 
 28591 
 27211 
 28592 /**
 27212 /**
 28593  * WordPress dependencies
 27213  * WordPress dependencies
 28594  */
 27214  */
 28595 
 27215 
 28596 
 27216 
 28597 function BlockConvertButton(_ref) {
 27217 function BlockConvertButton({
 28598   var shouldRender = _ref.shouldRender,
 27218   shouldRender,
 28599       onClick = _ref.onClick,
 27219   onClick,
 28600       small = _ref.small;
 27220   small
 28601 
 27221 }) {
 28602   if (!shouldRender) {
 27222   if (!shouldRender) {
 28603     return null;
 27223     return null;
 28604   }
 27224   }
 28605 
 27225 
 28606   var label = Object(external_this_wp_i18n_["__"])('Convert to Blocks');
 27226   const label = Object(external_wp_i18n_["__"])('Convert to Blocks');
 28607 
 27227 
 28608   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 27228   return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 28609     onClick: onClick
 27229     onClick: onClick
 28610   }, !small && label);
 27230   }, !small && label);
 28611 }
 27231 }
 28612 
 27232 
 28613 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-html-convert-button.js
 27233 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-html-convert-button.js
 28620 /**
 27240 /**
 28621  * Internal dependencies
 27241  * Internal dependencies
 28622  */
 27242  */
 28623 
 27243 
 28624 
 27244 
 28625 /* harmony default export */ var block_html_convert_button = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
 27245 
 28626   var clientId = _ref.clientId;
 27246 /* harmony default export */ var block_html_convert_button = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])((select, {
 28627   var block = select('core/block-editor').getBlock(clientId);
 27247   clientId
       
 27248 }) => {
       
 27249   const block = select(store).getBlock(clientId);
 28628   return {
 27250   return {
 28629     block: block,
 27251     block,
 28630     shouldRender: block && block.name === 'core/html'
 27252     shouldRender: block && block.name === 'core/html'
 28631   };
 27253   };
 28632 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref2) {
 27254 }), Object(external_wp_data_["withDispatch"])((dispatch, {
 28633   var block = _ref2.block;
 27255   block
       
 27256 }) => ({
       
 27257   onClick: () => dispatch(store).replaceBlocks(block.clientId, Object(external_wp_blocks_["rawHandler"])({
       
 27258     HTML: Object(external_wp_blocks_["getBlockContent"])(block)
       
 27259   }))
       
 27260 })))(BlockConvertButton));
       
 27261 
       
 27262 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-settings-menu-first-item.js
       
 27263 /**
       
 27264  * WordPress dependencies
       
 27265  */
       
 27266 
       
 27267 const {
       
 27268   Fill: __unstableBlockSettingsMenuFirstItem,
       
 27269   Slot: block_settings_menu_first_item_Slot
       
 27270 } = Object(external_wp_components_["createSlotFill"])('__unstableBlockSettingsMenuFirstItem');
       
 27271 __unstableBlockSettingsMenuFirstItem.Slot = block_settings_menu_first_item_Slot;
       
 27272 /* harmony default export */ var block_settings_menu_first_item = (__unstableBlockSettingsMenuFirstItem);
       
 27273 
       
 27274 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js
       
 27275 /**
       
 27276  * WordPress dependencies
       
 27277  */
       
 27278 
       
 27279 
       
 27280 /**
       
 27281  * Internal dependencies
       
 27282  */
       
 27283 
       
 27284 
       
 27285 /**
       
 27286  * Contains the properties `ConvertToGroupButton` component needs.
       
 27287  *
       
 27288  * @typedef {Object} ConvertToGroupButtonProps
       
 27289  * @property {string[]} clientIds  An array of the selected client ids.
       
 27290  * @property {boolean} isGroupable Indicates if the selected blocks can be grouped.
       
 27291  * @property {boolean} isUngroupable Indicates if the selected blocks can be ungrouped.
       
 27292  * @property {WPBlock[]} blocksSelection An array of the selected blocks.
       
 27293  * @property {string} groupingBlockName The name of block used for handling grouping interactions.
       
 27294  */
       
 27295 
       
 27296 /**
       
 27297  * Returns the properties `ConvertToGroupButton` component needs to work properly.
       
 27298  * It is used in `BlockSettingsMenuControls` to know if `ConvertToGroupButton`
       
 27299  * should be rendered, to avoid ending up with an empty MenuGroup.
       
 27300  *
       
 27301  * @return {ConvertToGroupButtonProps} Returns the properties needed by `ConvertToGroupButton`.
       
 27302  */
       
 27303 
       
 27304 function useConvertToGroupButtonProps() {
       
 27305   const {
       
 27306     clientIds,
       
 27307     isGroupable,
       
 27308     isUngroupable,
       
 27309     blocksSelection,
       
 27310     groupingBlockName
       
 27311   } = Object(external_wp_data_["useSelect"])(select => {
       
 27312     var _blocksSelection$;
       
 27313 
       
 27314     const {
       
 27315       getBlockRootClientId,
       
 27316       getBlocksByClientId,
       
 27317       canInsertBlockType,
       
 27318       getSelectedBlockClientIds
       
 27319     } = select(store);
       
 27320     const {
       
 27321       getGroupingBlockName
       
 27322     } = select(external_wp_blocks_["store"]);
       
 27323 
       
 27324     const _clientIds = getSelectedBlockClientIds();
       
 27325 
       
 27326     const _groupingBlockName = getGroupingBlockName();
       
 27327 
       
 27328     const rootClientId = !!(_clientIds !== null && _clientIds !== void 0 && _clientIds.length) ? getBlockRootClientId(_clientIds[0]) : undefined;
       
 27329     const groupingBlockAvailable = canInsertBlockType(_groupingBlockName, rootClientId);
       
 27330 
       
 27331     const _blocksSelection = getBlocksByClientId(_clientIds);
       
 27332 
       
 27333     const isSingleGroupingBlock = _blocksSelection.length === 1 && ((_blocksSelection$ = _blocksSelection[0]) === null || _blocksSelection$ === void 0 ? void 0 : _blocksSelection$.name) === _groupingBlockName; // Do we have
       
 27334     // 1. Grouping block available to be inserted?
       
 27335     // 2. One or more blocks selected
       
 27336     // (we allow single Blocks to become groups unless
       
 27337     // they are a soltiary group block themselves)
       
 27338 
       
 27339     const _isGroupable = groupingBlockAvailable && _blocksSelection.length && !isSingleGroupingBlock; // Do we have a single Group Block selected and does that group have inner blocks?
       
 27340 
       
 27341 
       
 27342     const _isUngroupable = isSingleGroupingBlock && !!_blocksSelection[0].innerBlocks.length;
       
 27343 
       
 27344     return {
       
 27345       clientIds: _clientIds,
       
 27346       isGroupable: _isGroupable,
       
 27347       isUngroupable: _isUngroupable,
       
 27348       blocksSelection: _blocksSelection,
       
 27349       groupingBlockName: _groupingBlockName
       
 27350     };
       
 27351   }, []);
 28634   return {
 27352   return {
 28635     onClick: function onClick() {
 27353     clientIds,
 28636       return dispatch('core/block-editor').replaceBlocks(block.clientId, Object(external_this_wp_blocks_["rawHandler"])({
 27354     isGroupable,
 28637         HTML: Object(external_this_wp_blocks_["getBlockContent"])(block)
 27355     isUngroupable,
 28638       }));
 27356     blocksSelection,
 28639     }
 27357     groupingBlockName
 28640   };
 27358   };
 28641 }))(BlockConvertButton));
 27359 }
 28642 
 27360 
 28643 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-unknown-convert-button.js
 27361 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/convert-to-group-buttons/index.js
       
 27362 
       
 27363 
 28644 /**
 27364 /**
 28645  * WordPress dependencies
 27365  * WordPress dependencies
 28646  */
 27366  */
 28647 
 27367 
 28648 
 27368 
 28649 
 27369 
       
 27370 
 28650 /**
 27371 /**
 28651  * Internal dependencies
 27372  * Internal dependencies
 28652  */
 27373  */
 28653 
 27374 
 28654 
 27375 
 28655 /* harmony default export */ var block_unknown_convert_button = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
 27376 
 28656   var clientId = _ref.clientId;
 27377 
 28657   var block = select('core/block-editor').getBlock(clientId);
 27378 function ConvertToGroupButton({
 28658   return {
 27379   clientIds,
 28659     block: block,
 27380   isGroupable,
 28660     shouldRender: block && block.name === Object(external_this_wp_blocks_["getFreeformContentHandlerName"])()
 27381   isUngroupable,
       
 27382   blocksSelection,
       
 27383   groupingBlockName,
       
 27384   onClose = () => {}
       
 27385 }) {
       
 27386   const {
       
 27387     replaceBlocks
       
 27388   } = Object(external_wp_data_["useDispatch"])(store);
       
 27389 
       
 27390   const onConvertToGroup = () => {
       
 27391     // Activate the `transform` on the Grouping Block which does the conversion
       
 27392     const newBlocks = Object(external_wp_blocks_["switchToBlockType"])(blocksSelection, groupingBlockName);
       
 27393 
       
 27394     if (newBlocks) {
       
 27395       replaceBlocks(clientIds, newBlocks);
       
 27396     }
 28661   };
 27397   };
 28662 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref2) {
 27398 
 28663   var block = _ref2.block;
 27399   const onConvertFromGroup = () => {
 28664   return {
 27400     const innerBlocks = blocksSelection[0].innerBlocks;
 28665     onClick: function onClick() {
 27401 
 28666       return dispatch('core/block-editor').replaceBlocks(block.clientId, Object(external_this_wp_blocks_["rawHandler"])({
 27402     if (!innerBlocks.length) {
 28667         HTML: Object(external_this_wp_blocks_["serialize"])(block)
 27403       return;
 28668       }));
 27404     }
 28669     }
 27405 
       
 27406     replaceBlocks(clientIds, innerBlocks);
 28670   };
 27407   };
 28671 }))(BlockConvertButton));
 27408 
 28672 
 27409   if (!isGroupable && !isUngroupable) {
 28673 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-settings-menu-first-item.js
 27410     return null;
       
 27411   }
       
 27412 
       
 27413   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, isGroupable && Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
       
 27414     onClick: () => {
       
 27415       onConvertToGroup();
       
 27416       onClose();
       
 27417     }
       
 27418   }, Object(external_wp_i18n_["_x"])('Group', 'verb')), isUngroupable && Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
       
 27419     onClick: () => {
       
 27420       onConvertFromGroup();
       
 27421       onClose();
       
 27422     }
       
 27423   }, Object(external_wp_i18n_["_x"])('Ungroup', 'Ungrouping blocks from within a Group block back into individual blocks within the Editor ')));
       
 27424 }
       
 27425 
       
 27426 
       
 27427 
       
 27428 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu-controls/index.js
       
 27429 
       
 27430 
       
 27431 
       
 27432 /**
       
 27433  * External dependencies
       
 27434  */
       
 27435 
 28674 /**
 27436 /**
 28675  * WordPress dependencies
 27437  * WordPress dependencies
 28676  */
 27438  */
 28677 
 27439 
 28678 
 27440 
 28679 var block_settings_menu_first_item_createSlotFill = Object(external_this_wp_components_["createSlotFill"])('__experimentalBlockSettingsMenuFirstItem'),
 27441 
 28680     __experimentalBlockSettingsMenuFirstItem = block_settings_menu_first_item_createSlotFill.Fill,
 27442 /**
 28681     block_settings_menu_first_item_Slot = block_settings_menu_first_item_createSlotFill.Slot;
 27443  * Internal dependencies
 28682 
 27444  */
 28683 __experimentalBlockSettingsMenuFirstItem.Slot = block_settings_menu_first_item_Slot;
 27445 
 28684 /* harmony default export */ var block_settings_menu_first_item = (__experimentalBlockSettingsMenuFirstItem);
 27446 
 28685 
 27447 
 28686 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu-controls/index.js
 27448 const {
 28687 
 27449   Fill: block_settings_menu_controls_Fill,
 28688 
 27450   Slot: block_settings_menu_controls_Slot
 28689 
 27451 } = Object(external_wp_components_["createSlotFill"])('BlockSettingsMenuControls');
 28690 function block_settings_menu_controls_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; }
 27452 
 28691 
 27453 const BlockSettingsMenuControlsSlot = ({
 28692 function block_settings_menu_controls_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_settings_menu_controls_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 { block_settings_menu_controls_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 27454   fillProps,
 28693 
 27455   clientIds = null
 28694 /**
 27456 }) => {
 28695  * External dependencies
 27457   const selectedBlocks = Object(external_wp_data_["useSelect"])(select => {
 28696  */
 27458     const {
 28697 
 27459       getBlocksByClientId,
 28698 /**
 27460       getSelectedBlockClientIds
 28699  * WordPress dependencies
 27461     } = select(store);
 28700  */
 27462     const ids = clientIds !== null ? clientIds : getSelectedBlockClientIds();
 28701 
 27463     return Object(external_lodash_["map"])(Object(external_lodash_["compact"])(getBlocksByClientId(ids)), block => block.name);
 28702 
 27464   }, [clientIds]); // Check if current selection of blocks is Groupable or Ungroupable
 28703 
 27465   // and pass this props down to ConvertToGroupButton.
 28704 
 27466 
 28705 var block_settings_menu_controls_createSlotFill = Object(external_this_wp_components_["createSlotFill"])('BlockSettingsMenuControls'),
 27467   const convertToGroupButtonProps = useConvertToGroupButtonProps();
 28706     BlockSettingsMenuControls = block_settings_menu_controls_createSlotFill.Fill,
 27468   const {
 28707     block_settings_menu_controls_Slot = block_settings_menu_controls_createSlotFill.Slot;
 27469     isGroupable,
 28708 
 27470     isUngroupable
 28709 var block_settings_menu_controls_BlockSettingsMenuControlsSlot = function BlockSettingsMenuControlsSlot(_ref) {
 27471   } = convertToGroupButtonProps;
 28710   var fillProps = _ref.fillProps,
 27472   const showConvertToGroupButton = isGroupable || isUngroupable;
 28711       _ref$clientIds = _ref.clientIds,
 27473   return Object(external_wp_element_["createElement"])(block_settings_menu_controls_Slot, {
 28712       clientIds = _ref$clientIds === void 0 ? null : _ref$clientIds;
 27474     fillProps: { ...fillProps,
 28713   var selectedBlocks = Object(external_this_wp_data_["useSelect"])(function (select) {
 27475       selectedBlocks
 28714     var _select = select('core/block-editor'),
 27476     }
 28715         getBlocksByClientId = _select.getBlocksByClientId,
 27477   }, fills => {
 28716         getSelectedBlockClientIds = _select.getSelectedBlockClientIds;
 27478     if ((fills === null || fills === void 0 ? void 0 : fills.length) > 0 || showConvertToGroupButton) {
 28717 
 27479       return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, fills, Object(external_wp_element_["createElement"])(ConvertToGroupButton, Object(esm_extends["a" /* default */])({}, convertToGroupButtonProps, {
 28718     var ids = clientIds !== null ? clientIds : getSelectedBlockClientIds();
 27480         onClose: fillProps === null || fillProps === void 0 ? void 0 : fillProps.onClose
 28719     return Object(external_this_lodash_["map"])(getBlocksByClientId(ids), function (block) {
 27481       })));
 28720       return block.name;
 27482     }
 28721     });
       
 28722   }, [clientIds]);
       
 28723   return Object(external_this_wp_element_["createElement"])(block_settings_menu_controls_Slot, {
       
 28724     fillProps: block_settings_menu_controls_objectSpread({}, fillProps, {
       
 28725       selectedBlocks: selectedBlocks
       
 28726     })
       
 28727   }, function (fills) {
       
 28728     return !Object(external_this_lodash_["isEmpty"])(fills) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], null, fills);
       
 28729   });
 27483   });
 28730 };
 27484 };
 28731 
 27485 /**
 28732 BlockSettingsMenuControls.Slot = block_settings_menu_controls_BlockSettingsMenuControlsSlot;
 27486  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-settings-menu-controls/README.md
 28733 /**
 27487  *
 28734  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-settings-menu-controls/README.md
 27488  * @param {Object} props  Fill props.
 28735  */
 27489  * @return {WPElement} Element.
 28736 
 27490  */
       
 27491 
       
 27492 
       
 27493 function BlockSettingsMenuControls({ ...props
       
 27494 }) {
       
 27495   return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalStyleProvider"], {
       
 27496     document: document
       
 27497   }, Object(external_wp_element_["createElement"])(block_settings_menu_controls_Fill, props));
       
 27498 }
       
 27499 
       
 27500 BlockSettingsMenuControls.Slot = BlockSettingsMenuControlsSlot;
 28737 /* harmony default export */ var block_settings_menu_controls = (BlockSettingsMenuControls);
 27501 /* harmony default export */ var block_settings_menu_controls = (BlockSettingsMenuControls);
 28738 
 27502 
 28739 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-settings-dropdown.js
 27503 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/block-settings-dropdown.js
 28740 
 27504 
 28741 
 27505 
 28742 
 27506 
 28743 
       
 28744 
       
 28745 
       
 28746 /**
 27507 /**
 28747  * External dependencies
 27508  * External dependencies
 28748  */
 27509  */
 28749 
 27510 
 28750 /**
 27511 /**
 28755 
 27516 
 28756 
 27517 
 28757 
 27518 
 28758 
 27519 
 28759 
 27520 
       
 27521 
       
 27522 
 28760 /**
 27523 /**
 28761  * Internal dependencies
 27524  * Internal dependencies
 28762  */
 27525  */
 28763 
 27526 
 28764 
 27527 
 28765 
 27528 
 28766 
 27529 
 28767 
 27530 
 28768 
 27531 
 28769 
 27532 const block_settings_dropdown_POPOVER_PROPS = {
 28770 var block_settings_dropdown_POPOVER_PROPS = {
       
 28771   className: 'block-editor-block-settings-menu__popover',
 27533   className: 'block-editor-block-settings-menu__popover',
 28772   position: 'bottom right',
 27534   position: 'bottom right',
 28773   isAlternate: true
 27535   isAlternate: true
 28774 };
 27536 };
 28775 function BlockSettingsDropdown(_ref) {
 27537 
 28776   var clientIds = _ref.clientIds,
 27538 function CopyMenuItem({
 28777       __experimentalSelectBlock = _ref.__experimentalSelectBlock,
 27539   blocks,
 28778       children = _ref.children,
 27540   onCopy
 28779       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["clientIds", "__experimentalSelectBlock", "children"]);
 27541 }) {
 28780 
 27542   const ref = Object(external_wp_compose_["useCopyToClipboard"])(() => Object(external_wp_blocks_["serialize"])(blocks), onCopy);
 28781   var blockClientIds = Object(external_this_lodash_["castArray"])(clientIds);
 27543   return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 28782   var count = blockClientIds.length;
 27544     ref: ref
 28783   var firstBlockClientId = blockClientIds[0];
 27545   }, Object(external_wp_i18n_["__"])('Copy'));
 28784   var shortcuts = Object(external_this_wp_data_["useSelect"])(function (select) {
 27546 }
 28785     var _select = select('core/keyboard-shortcuts'),
 27547 
 28786         getShortcutRepresentation = _select.getShortcutRepresentation;
 27548 function BlockSettingsDropdown({
 28787 
 27549   clientIds,
       
 27550   __experimentalSelectBlock,
       
 27551   children,
       
 27552   ...props
       
 27553 }) {
       
 27554   const blockClientIds = Object(external_lodash_["castArray"])(clientIds);
       
 27555   const count = blockClientIds.length;
       
 27556   const firstBlockClientId = blockClientIds[0];
       
 27557   const shortcuts = Object(external_wp_data_["useSelect"])(select => {
       
 27558     const {
       
 27559       getShortcutRepresentation
       
 27560     } = select(external_wp_keyboardShortcuts_["store"]);
 28788     return {
 27561     return {
 28789       duplicate: getShortcutRepresentation('core/block-editor/duplicate'),
 27562       duplicate: getShortcutRepresentation('core/block-editor/duplicate'),
 28790       remove: getShortcutRepresentation('core/block-editor/remove'),
 27563       remove: getShortcutRepresentation('core/block-editor/remove'),
 28791       insertAfter: getShortcutRepresentation('core/block-editor/insert-after'),
 27564       insertAfter: getShortcutRepresentation('core/block-editor/insert-after'),
 28792       insertBefore: getShortcutRepresentation('core/block-editor/insert-before')
 27565       insertBefore: getShortcutRepresentation('core/block-editor/insert-before')
 28793     };
 27566     };
 28794   }, []);
 27567   }, []);
 28795   var updateSelection = Object(external_this_wp_element_["useCallback"])(__experimentalSelectBlock ? /*#__PURE__*/function () {
 27568   const updateSelection = Object(external_wp_element_["useCallback"])(__experimentalSelectBlock ? async clientIdsPromise => {
 28796     var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee(clientIdsPromise) {
 27569     const ids = await clientIdsPromise;
 28797       var ids;
 27570 
 28798       return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
 27571     if (ids && ids[0]) {
 28799         while (1) {
 27572       __experimentalSelectBlock(ids[0]);
 28800           switch (_context.prev = _context.next) {
 27573     }
 28801             case 0:
 27574   } : external_lodash_["noop"], [__experimentalSelectBlock]);
 28802               _context.next = 2;
 27575   const removeBlockLabel = count === 1 ? Object(external_wp_i18n_["__"])('Remove block') : Object(external_wp_i18n_["__"])('Remove blocks');
 28803               return clientIdsPromise;
 27576   return Object(external_wp_element_["createElement"])(BlockActions, {
 28804 
       
 28805             case 2:
       
 28806               ids = _context.sent;
       
 28807 
       
 28808               if (ids && ids[0]) {
       
 28809                 __experimentalSelectBlock(ids[0]);
       
 28810               }
       
 28811 
       
 28812             case 4:
       
 28813             case "end":
       
 28814               return _context.stop();
       
 28815           }
       
 28816         }
       
 28817       }, _callee);
       
 28818     }));
       
 28819 
       
 28820     return function (_x) {
       
 28821       return _ref2.apply(this, arguments);
       
 28822     };
       
 28823   }() : external_this_lodash_["noop"], [__experimentalSelectBlock]);
       
 28824   return Object(external_this_wp_element_["createElement"])(BlockActions, {
       
 28825     clientIds: clientIds,
 27577     clientIds: clientIds,
 28826     __experimentalUpdateSelection: !__experimentalSelectBlock
 27578     __experimentalUpdateSelection: !__experimentalSelectBlock
 28827   }, function (_ref3) {
 27579   }, ({
 28828     var canDuplicate = _ref3.canDuplicate,
 27580     canDuplicate,
 28829         canInsertDefaultBlock = _ref3.canInsertDefaultBlock,
 27581     canInsertDefaultBlock,
 28830         isLocked = _ref3.isLocked,
 27582     isLocked,
 28831         onDuplicate = _ref3.onDuplicate,
 27583     onDuplicate,
 28832         onInsertAfter = _ref3.onInsertAfter,
 27584     onInsertAfter,
 28833         onInsertBefore = _ref3.onInsertBefore,
 27585     onInsertBefore,
 28834         onRemove = _ref3.onRemove,
 27586     onRemove,
 28835         onCopy = _ref3.onCopy,
 27587     onCopy,
 28836         onMoveTo = _ref3.onMoveTo,
 27588     onMoveTo,
 28837         blocks = _ref3.blocks;
 27589     blocks
 28838     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["DropdownMenu"], Object(esm_extends["a" /* default */])({
 27590   }) => Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], Object(esm_extends["a" /* default */])({
 28839       icon: more_vertical["a" /* default */],
 27591     icon: more_vertical["a" /* default */],
 28840       label: Object(external_this_wp_i18n_["__"])('More options'),
 27592     label: Object(external_wp_i18n_["__"])('Options'),
 28841       className: "block-editor-block-settings-menu",
 27593     className: "block-editor-block-settings-menu",
 28842       popoverProps: block_settings_dropdown_POPOVER_PROPS,
 27594     popoverProps: block_settings_dropdown_POPOVER_PROPS,
 28843       noIcons: true
 27595     noIcons: true
 28844     }, props), function (_ref4) {
 27596   }, props), ({
 28845       var onClose = _ref4.onClose;
 27597     onClose
 28846       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], null, Object(external_this_wp_element_["createElement"])(block_settings_menu_first_item.Slot, {
 27598   }) => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, Object(external_wp_element_["createElement"])(block_settings_menu_first_item.Slot, {
 28847         fillProps: {
 27599     fillProps: {
 28848           onClose: onClose
 27600       onClose
 28849         }
 27601     }
 28850       }), count === 1 && Object(external_this_wp_element_["createElement"])(block_unknown_convert_button, {
 27602   }), count === 1 && Object(external_wp_element_["createElement"])(block_html_convert_button, {
 28851         clientId: firstBlockClientId
 27603     clientId: firstBlockClientId
 28852       }), count === 1 && Object(external_this_wp_element_["createElement"])(block_html_convert_button, {
 27604   }), Object(external_wp_element_["createElement"])(CopyMenuItem, {
 28853         clientId: firstBlockClientId
 27605     blocks: blocks,
 28854       }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ClipboardButton"], {
 27606     onCopy: onCopy
 28855         text: function text() {
 27607   }), canDuplicate && Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 28856           return Object(external_this_wp_blocks_["serialize"])(blocks);
 27608     onClick: Object(external_lodash_["flow"])(onClose, onDuplicate, updateSelection),
 28857         },
 27609     shortcut: shortcuts.duplicate
 28858         role: "menuitem",
 27610   }, Object(external_wp_i18n_["__"])('Duplicate')), canInsertDefaultBlock && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 28859         className: "components-menu-item__button",
 27611     onClick: Object(external_lodash_["flow"])(onClose, onInsertBefore),
 28860         onCopy: onCopy
 27612     shortcut: shortcuts.insertBefore
 28861       }, Object(external_this_wp_i18n_["__"])('Copy')), canDuplicate && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 27613   }, Object(external_wp_i18n_["__"])('Insert before')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 28862         onClick: Object(external_this_lodash_["flow"])(onClose, onDuplicate, updateSelection),
 27614     onClick: Object(external_lodash_["flow"])(onClose, onInsertAfter),
 28863         shortcut: shortcuts.duplicate
 27615     shortcut: shortcuts.insertAfter
 28864       }, Object(external_this_wp_i18n_["__"])('Duplicate')), canInsertDefaultBlock && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 27616   }, Object(external_wp_i18n_["__"])('Insert after'))), !isLocked && Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 28865         onClick: Object(external_this_lodash_["flow"])(onClose, onInsertBefore),
 27617     onClick: Object(external_lodash_["flow"])(onClose, onMoveTo)
 28866         shortcut: shortcuts.insertBefore
 27618   }, Object(external_wp_i18n_["__"])('Move to')), count === 1 && Object(external_wp_element_["createElement"])(block_mode_toggle, {
 28867       }, Object(external_this_wp_i18n_["__"])('Insert Before')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 27619     clientId: firstBlockClientId,
 28868         onClick: Object(external_this_lodash_["flow"])(onClose, onInsertAfter),
 27620     onToggle: onClose
 28869         shortcut: shortcuts.insertAfter
 27621   })), Object(external_wp_element_["createElement"])(block_settings_menu_controls.Slot, {
 28870       }, Object(external_this_wp_i18n_["__"])('Insert After'))), !isLocked && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 27622     fillProps: {
 28871         onClick: Object(external_this_lodash_["flow"])(onClose, onMoveTo)
 27623       onClose
 28872       }, Object(external_this_wp_i18n_["__"])('Move To')), count === 1 && Object(external_this_wp_element_["createElement"])(block_mode_toggle, {
 27624     },
 28873         clientId: firstBlockClientId,
 27625     clientIds: clientIds
 28874         onToggle: onClose
 27626   }), typeof children === 'function' ? children({
 28875       })), Object(external_this_wp_element_["createElement"])(block_settings_menu_controls.Slot, {
 27627     onClose
 28876         fillProps: {
 27628   }) : external_wp_element_["Children"].map(child => Object(external_wp_element_["cloneElement"])(child, {
 28877           onClose: onClose
 27629     onClose
 28878         },
 27630   })), Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, !isLocked && Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 28879         clientIds: clientIds
 27631     onClick: Object(external_lodash_["flow"])(onClose, onRemove, updateSelection),
 28880       }), typeof children === 'function' ? children({
 27632     shortcut: shortcuts.remove
 28881         onClose: onClose
 27633   }, removeBlockLabel)))));
 28882       }) : external_this_wp_element_["Children"].map(function (child) {
       
 28883         return Object(external_this_wp_element_["cloneElement"])(child, {
       
 28884           onClose: onClose
       
 28885         });
       
 28886       }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], null, !isLocked && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
       
 28887         onClick: Object(external_this_lodash_["flow"])(onClose, onRemove, updateSelection),
       
 28888         shortcut: shortcuts.remove
       
 28889       }, Object(external_this_wp_i18n_["_n"])('Remove Block', 'Remove Blocks', count))));
       
 28890     });
       
 28891   });
       
 28892 }
 27634 }
 28893 /* harmony default export */ var block_settings_dropdown = (BlockSettingsDropdown);
 27635 /* harmony default export */ var block_settings_dropdown = (BlockSettingsDropdown);
 28894 
 27636 
 28895 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/index.js
 27637 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu/index.js
 28896 
 27638 
 28897 
 27639 
 28898 
 27640 
 28899 
       
 28900 /**
 27641 /**
 28901  * WordPress dependencies
 27642  * WordPress dependencies
 28902  */
 27643  */
 28903 
 27644 
 28904 /**
 27645 /**
 28905  * Internal dependencies
 27646  * Internal dependencies
 28906  */
 27647  */
 28907 
 27648 
 28908 
 27649 
 28909 function BlockSettingsMenu(_ref) {
 27650 function BlockSettingsMenu({
 28910   var clientIds = _ref.clientIds,
 27651   clientIds,
 28911       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["clientIds"]);
 27652   ...props
 28912 
 27653 }) {
 28913   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalToolbarItem"], null, function (toggleProps) {
 27654   return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], null, toggleProps => Object(external_wp_element_["createElement"])(block_settings_dropdown, Object(esm_extends["a" /* default */])({
 28914     return Object(external_this_wp_element_["createElement"])(block_settings_dropdown, Object(esm_extends["a" /* default */])({
 27655     clientIds: clientIds,
 28915       clientIds: clientIds,
 27656     toggleProps: toggleProps
 28916       toggleProps: toggleProps
 27657   }, props))));
 28917     }, props));
       
 28918   }));
       
 28919 }
 27658 }
 28920 /* harmony default export */ var block_settings_menu = (BlockSettingsMenu);
 27659 /* harmony default export */ var block_settings_menu = (BlockSettingsMenu);
 28921 
 27660 
 28922 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/handle.js
 27661 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-toolbar/index.js
 28923 
 27662 
       
 27663 
       
 27664 
       
 27665 /**
       
 27666  * External dependencies
       
 27667  */
 28924 
 27668 
 28925 /**
 27669 /**
 28926  * WordPress dependencies
 27670  * WordPress dependencies
 28927  */
 27671  */
 28928 
 27672 
 28929 var handle = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
       
 28930   viewBox: "0 0 24 24",
       
 28931   xmlns: "http://www.w3.org/2000/svg"
       
 28932 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
       
 28933   d: "M7 16.5h10V15H7v1.5zm0-9V9h10V7.5H7z"
       
 28934 }));
       
 28935 /* harmony default export */ var library_handle = (handle);
       
 28936 
       
 28937 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-draggable/draggable-chip.js
       
 28938 
       
 28939 
       
 28940 
       
 28941 /**
       
 28942  * WordPress dependencies
       
 28943  */
       
 28944 
 27673 
 28945 
 27674 
 28946 
 27675 
 28947 
 27676 
 28948 
 27677 
 28949 /**
 27678 /**
 28950  * Internal dependencies
 27679  * Internal dependencies
 28951  */
 27680  */
 28952 
 27681 
 28953 
 27682 
 28954 function BlockDraggableChip(_ref) {
 27683 
 28955   var clientIds = _ref.clientIds;
 27684 
 28956   var icon = Object(external_this_wp_data_["useSelect"])(function (select) {
 27685 
 28957     if (clientIds.length !== 1) {
 27686 
 28958       return;
 27687 
 28959     }
 27688 
 28960 
 27689 function BlockToolbar({
 28961     var _select = select('core/block-editor'),
 27690   hideDragHandle
 28962         getBlockName = _select.getBlockName;
 27691 }) {
 28963 
 27692   const {
 28964     var _clientIds = Object(slicedToArray["a" /* default */])(clientIds, 1),
 27693     blockClientIds,
 28965         firstId = _clientIds[0];
 27694     blockClientId,
 28966 
 27695     blockType,
 28967     var blockName = getBlockName(firstId);
 27696     hasFixedToolbar,
 28968     return Object(external_this_wp_blocks_["getBlockType"])(blockName).icon;
 27697     hasReducedUI,
 28969   }, [clientIds]);
 27698     isValid,
 28970   return Object(external_this_wp_element_["createElement"])("div", {
 27699     isVisual
 28971     className: "block-editor-block-draggable-chip-wrapper"
 27700   } = Object(external_wp_data_["useSelect"])(select => {
 28972   }, Object(external_this_wp_element_["createElement"])("div", {
 27701     const {
 28973     className: "block-editor-block-draggable-chip"
 27702       getBlockName,
 28974   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Flex"], {
 27703       getBlockMode,
 28975     justify: "center",
 27704       getSelectedBlockClientIds,
 28976     className: "block-editor-block-draggable-chip__content"
 27705       isBlockValid,
 28977   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["FlexItem"], null, Object(external_this_wp_element_["createElement"])(BlockIcon, {
 27706       getBlockRootClientId,
 28978     icon: library_handle
 27707       getSettings
 28979   })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["FlexItem"], null, icon ? Object(external_this_wp_element_["createElement"])(BlockIcon, {
 27708     } = select(store);
 28980     icon: icon
 27709     const selectedBlockClientIds = getSelectedBlockClientIds();
 28981   }) : Object(external_this_wp_i18n_["sprintf"])(
 27710     const selectedBlockClientId = selectedBlockClientIds[0];
 28982   /* translators: %d: Number of blocks. */
 27711     const blockRootClientId = getBlockRootClientId(selectedBlockClientId);
 28983   Object(external_this_wp_i18n_["_n"])('%d block', '%d blocks', clientIds.length), clientIds.length)))));
 27712     const settings = getSettings();
 28984 }
       
 28985 
       
 28986 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-draggable/use-scroll-when-dragging.js
       
 28987 /**
       
 28988  * WordPress dependencies
       
 28989  */
       
 28990 
       
 28991 
       
 28992 var SCROLL_INACTIVE_DISTANCE_PX = 50;
       
 28993 var SCROLL_INTERVAL_MS = 25;
       
 28994 var PIXELS_PER_SECOND_PER_PERCENTAGE = 1000;
       
 28995 var VELOCITY_MULTIPLIER = PIXELS_PER_SECOND_PER_PERCENTAGE * (SCROLL_INTERVAL_MS / 1000);
       
 28996 /**
       
 28997  * React hook that scrolls the scroll container when a block is being dragged.
       
 28998  *
       
 28999  * @return {Function[]} `startScrolling`, `scrollOnDragOver`, `stopScrolling`
       
 29000  *                      functions to be called in `onDragStart`, `onDragOver`
       
 29001  *                      and `onDragEnd` events respectively.
       
 29002  */
       
 29003 
       
 29004 function useScrollWhenDragging() {
       
 29005   var dragStartY = Object(external_this_wp_element_["useRef"])(null);
       
 29006   var velocityY = Object(external_this_wp_element_["useRef"])(null);
       
 29007   var scrollParentY = Object(external_this_wp_element_["useRef"])(null);
       
 29008   var scrollEditorInterval = Object(external_this_wp_element_["useRef"])(null); // Clear interval when unmounting.
       
 29009 
       
 29010   Object(external_this_wp_element_["useEffect"])(function () {
       
 29011     return function () {
       
 29012       if (scrollEditorInterval.current) {
       
 29013         clearInterval(scrollEditorInterval.current);
       
 29014         scrollEditorInterval.current = null;
       
 29015       }
       
 29016     };
       
 29017   }, []);
       
 29018   var startScrolling = Object(external_this_wp_element_["useCallback"])(function (event) {
       
 29019     dragStartY.current = event.clientY; // Find nearest parent(s) to scroll.
       
 29020 
       
 29021     scrollParentY.current = Object(external_this_wp_dom_["getScrollContainer"])(event.target);
       
 29022     scrollEditorInterval.current = setInterval(function () {
       
 29023       if (scrollParentY.current && velocityY.current) {
       
 29024         var newTop = scrollParentY.current.scrollTop + velocityY.current; // Setting `behavior: 'smooth'` as a scroll property seems to hurt performance.
       
 29025         // Better to use a small scroll interval.
       
 29026 
       
 29027         scrollParentY.current.scroll({
       
 29028           top: newTop
       
 29029         });
       
 29030       }
       
 29031     }, SCROLL_INTERVAL_MS);
       
 29032   }, []);
       
 29033   var scrollOnDragOver = Object(external_this_wp_element_["useCallback"])(function (event) {
       
 29034     if (!scrollParentY.current) {
       
 29035       return;
       
 29036     }
       
 29037 
       
 29038     var scrollParentHeight = scrollParentY.current.offsetHeight;
       
 29039     var offsetDragStartPosition = dragStartY.current - scrollParentY.current.offsetTop;
       
 29040     var offsetDragPosition = event.clientY - scrollParentY.current.offsetTop;
       
 29041 
       
 29042     if (event.clientY > offsetDragStartPosition) {
       
 29043       // User is dragging downwards.
       
 29044       var moveableDistance = Math.max(scrollParentHeight - offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
       
 29045       var dragDistance = Math.max(offsetDragPosition - offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
       
 29046       var distancePercentage = dragDistance / moveableDistance;
       
 29047       velocityY.current = VELOCITY_MULTIPLIER * distancePercentage;
       
 29048     } else if (event.clientY < offsetDragStartPosition) {
       
 29049       // User is dragging upwards.
       
 29050       var _moveableDistance = Math.max(offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
       
 29051 
       
 29052       var _dragDistance = Math.max(offsetDragStartPosition - offsetDragPosition - SCROLL_INACTIVE_DISTANCE_PX, 0);
       
 29053 
       
 29054       var _distancePercentage = _dragDistance / _moveableDistance;
       
 29055 
       
 29056       velocityY.current = -VELOCITY_MULTIPLIER * _distancePercentage;
       
 29057     } else {
       
 29058       velocityY.current = 0;
       
 29059     }
       
 29060   }, []);
       
 29061 
       
 29062   var stopScrolling = function stopScrolling() {
       
 29063     dragStartY.current = null;
       
 29064     scrollParentY.current = null;
       
 29065 
       
 29066     if (scrollEditorInterval.current) {
       
 29067       clearInterval(scrollEditorInterval.current);
       
 29068       scrollEditorInterval.current = null;
       
 29069     }
       
 29070   };
       
 29071 
       
 29072   return [startScrolling, scrollOnDragOver, stopScrolling];
       
 29073 }
       
 29074 
       
 29075 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-draggable/index.js
       
 29076 
       
 29077 
       
 29078 
       
 29079 /**
       
 29080  * WordPress dependencies
       
 29081  */
       
 29082 
       
 29083 
       
 29084 
       
 29085 /**
       
 29086  * Internal dependencies
       
 29087  */
       
 29088 
       
 29089 
       
 29090 
       
 29091 
       
 29092 var block_draggable_BlockDraggable = function BlockDraggable(_ref) {
       
 29093   var children = _ref.children,
       
 29094       clientIds = _ref.clientIds,
       
 29095       cloneClassname = _ref.cloneClassname,
       
 29096       _onDragStart = _ref.onDragStart,
       
 29097       _onDragEnd = _ref.onDragEnd;
       
 29098 
       
 29099   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 29100     var _select = select('core/block-editor'),
       
 29101         getBlockRootClientId = _select.getBlockRootClientId,
       
 29102         getTemplateLock = _select.getTemplateLock;
       
 29103 
       
 29104     var rootClientId = getBlockRootClientId(clientIds[0]);
       
 29105     var templateLock = rootClientId ? getTemplateLock(rootClientId) : null;
       
 29106     return {
       
 29107       srcRootClientId: rootClientId,
       
 29108       isDraggable: 'all' !== templateLock
       
 29109     };
       
 29110   }, [clientIds]),
       
 29111       srcRootClientId = _useSelect.srcRootClientId,
       
 29112       isDraggable = _useSelect.isDraggable;
       
 29113 
       
 29114   var isDragging = Object(external_this_wp_element_["useRef"])(false);
       
 29115 
       
 29116   var _useScrollWhenDraggin = useScrollWhenDragging(),
       
 29117       _useScrollWhenDraggin2 = Object(slicedToArray["a" /* default */])(_useScrollWhenDraggin, 3),
       
 29118       startScrolling = _useScrollWhenDraggin2[0],
       
 29119       scrollOnDragOver = _useScrollWhenDraggin2[1],
       
 29120       stopScrolling = _useScrollWhenDraggin2[2];
       
 29121 
       
 29122   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 29123       startDraggingBlocks = _useDispatch.startDraggingBlocks,
       
 29124       stopDraggingBlocks = _useDispatch.stopDraggingBlocks; // Stop dragging blocks if the block draggable is unmounted
       
 29125 
       
 29126 
       
 29127   Object(external_this_wp_element_["useEffect"])(function () {
       
 29128     return function () {
       
 29129       if (isDragging.current) {
       
 29130         stopDraggingBlocks();
       
 29131       }
       
 29132     };
       
 29133   }, []);
       
 29134 
       
 29135   if (!isDraggable) {
       
 29136     return children({
       
 29137       isDraggable: false
       
 29138     });
       
 29139   }
       
 29140 
       
 29141   var transferData = {
       
 29142     type: 'block',
       
 29143     srcClientIds: clientIds,
       
 29144     srcRootClientId: srcRootClientId
       
 29145   };
       
 29146   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Draggable"], {
       
 29147     cloneClassname: cloneClassname,
       
 29148     elementId: "block-".concat(clientIds[0]),
       
 29149     transferData: transferData,
       
 29150     onDragStart: function onDragStart(event) {
       
 29151       startDraggingBlocks();
       
 29152       isDragging.current = true;
       
 29153       startScrolling(event);
       
 29154 
       
 29155       if (_onDragStart) {
       
 29156         _onDragStart();
       
 29157       }
       
 29158     },
       
 29159     onDragOver: scrollOnDragOver,
       
 29160     onDragEnd: function onDragEnd() {
       
 29161       stopDraggingBlocks();
       
 29162       isDragging.current = false;
       
 29163       stopScrolling();
       
 29164 
       
 29165       if (_onDragEnd) {
       
 29166         _onDragEnd();
       
 29167       }
       
 29168     },
       
 29169     __experimentalDragComponent: Object(external_this_wp_element_["createElement"])(BlockDraggableChip, {
       
 29170       clientIds: clientIds
       
 29171     })
       
 29172   }, function (_ref2) {
       
 29173     var onDraggableStart = _ref2.onDraggableStart,
       
 29174         onDraggableEnd = _ref2.onDraggableEnd;
       
 29175     return children({
       
 29176       isDraggable: true,
       
 29177       onDraggableStart: onDraggableStart,
       
 29178       onDraggableEnd: onDraggableEnd
       
 29179     });
       
 29180   });
       
 29181 };
       
 29182 
       
 29183 /* harmony default export */ var block_draggable = (block_draggable_BlockDraggable);
       
 29184 
       
 29185 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-toolbar/utils.js
       
 29186 
       
 29187 
       
 29188 /**
       
 29189  * External dependencies
       
 29190  */
       
 29191 
       
 29192 /**
       
 29193  * WordPress dependencies
       
 29194  */
       
 29195 
       
 29196 
       
 29197 var utils_window = window,
       
 29198     utils_clearTimeout = utils_window.clearTimeout,
       
 29199     utils_setTimeout = utils_window.setTimeout;
       
 29200 var DEBOUNCE_TIMEOUT = 200;
       
 29201 /**
       
 29202  * Hook that creates a showMover state, as well as debounced show/hide callbacks.
       
 29203  *
       
 29204  * @param {Object}   props                       Component props.
       
 29205  * @param {Object}   props.ref                   Element reference.
       
 29206  * @param {boolean}  props.isFocused             Whether the component has current focus.
       
 29207  * @param {number}   [props.debounceTimeout=250] Debounce timeout in milliseconds.
       
 29208  * @param {Function} [props.onChange=noop]       Callback function.
       
 29209  */
       
 29210 
       
 29211 function useDebouncedShowMovers(_ref) {
       
 29212   var ref = _ref.ref,
       
 29213       isFocused = _ref.isFocused,
       
 29214       _ref$debounceTimeout = _ref.debounceTimeout,
       
 29215       debounceTimeout = _ref$debounceTimeout === void 0 ? DEBOUNCE_TIMEOUT : _ref$debounceTimeout,
       
 29216       _ref$onChange = _ref.onChange,
       
 29217       onChange = _ref$onChange === void 0 ? external_this_lodash_["noop"] : _ref$onChange;
       
 29218 
       
 29219   var _useState = Object(external_this_wp_element_["useState"])(false),
       
 29220       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 29221       showMovers = _useState2[0],
       
 29222       setShowMovers = _useState2[1];
       
 29223 
       
 29224   var timeoutRef = Object(external_this_wp_element_["useRef"])();
       
 29225 
       
 29226   var handleOnChange = function handleOnChange(nextIsFocused) {
       
 29227     setShowMovers(nextIsFocused);
       
 29228     onChange(nextIsFocused);
       
 29229   };
       
 29230 
       
 29231   var getIsHovered = function getIsHovered() {
       
 29232     return (ref === null || ref === void 0 ? void 0 : ref.current) && ref.current.matches(':hover');
       
 29233   };
       
 29234 
       
 29235   var shouldHideMovers = function shouldHideMovers() {
       
 29236     var isHovered = getIsHovered();
       
 29237     return !isFocused && !isHovered;
       
 29238   };
       
 29239 
       
 29240   var clearTimeoutRef = function clearTimeoutRef() {
       
 29241     var timeout = timeoutRef.current;
       
 29242 
       
 29243     if (timeout && utils_clearTimeout) {
       
 29244       utils_clearTimeout(timeout);
       
 29245     }
       
 29246   };
       
 29247 
       
 29248   var debouncedShowMovers = function debouncedShowMovers(event) {
       
 29249     if (event) {
       
 29250       event.stopPropagation();
       
 29251     }
       
 29252 
       
 29253     clearTimeoutRef();
       
 29254 
       
 29255     if (!showMovers) {
       
 29256       handleOnChange(true);
       
 29257     }
       
 29258   };
       
 29259 
       
 29260   var debouncedHideMovers = function debouncedHideMovers(event) {
       
 29261     if (event) {
       
 29262       event.stopPropagation();
       
 29263     }
       
 29264 
       
 29265     clearTimeoutRef();
       
 29266     timeoutRef.current = utils_setTimeout(function () {
       
 29267       if (shouldHideMovers()) {
       
 29268         handleOnChange(false);
       
 29269       }
       
 29270     }, debounceTimeout);
       
 29271   };
       
 29272 
       
 29273   Object(external_this_wp_element_["useEffect"])(function () {
       
 29274     return function () {
       
 29275       return clearTimeoutRef();
       
 29276     };
       
 29277   }, []);
       
 29278   return {
       
 29279     showMovers: showMovers,
       
 29280     debouncedShowMovers: debouncedShowMovers,
       
 29281     debouncedHideMovers: debouncedHideMovers
       
 29282   };
       
 29283 }
       
 29284 /**
       
 29285  * Hook that provides a showMovers state and gesture events for DOM elements
       
 29286  * that interact with the showMovers state.
       
 29287  *
       
 29288  * @param {Object}   props                       Component props.
       
 29289  * @param {Object}   props.ref                   Element reference.
       
 29290  * @param {number}   [props.debounceTimeout=250] Debounce timeout in milliseconds.
       
 29291  * @param {Function} [props.onChange=noop]       Callback function.
       
 29292  */
       
 29293 
       
 29294 function useShowMoversGestures(_ref2) {
       
 29295   var ref = _ref2.ref,
       
 29296       _ref2$debounceTimeout = _ref2.debounceTimeout,
       
 29297       debounceTimeout = _ref2$debounceTimeout === void 0 ? DEBOUNCE_TIMEOUT : _ref2$debounceTimeout,
       
 29298       _ref2$onChange = _ref2.onChange,
       
 29299       onChange = _ref2$onChange === void 0 ? external_this_lodash_["noop"] : _ref2$onChange;
       
 29300 
       
 29301   var _useState3 = Object(external_this_wp_element_["useState"])(false),
       
 29302       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
       
 29303       isFocused = _useState4[0],
       
 29304       setIsFocused = _useState4[1];
       
 29305 
       
 29306   var _useDebouncedShowMove = useDebouncedShowMovers({
       
 29307     ref: ref,
       
 29308     debounceTimeout: debounceTimeout,
       
 29309     isFocused: isFocused,
       
 29310     onChange: onChange
       
 29311   }),
       
 29312       showMovers = _useDebouncedShowMove.showMovers,
       
 29313       debouncedShowMovers = _useDebouncedShowMove.debouncedShowMovers,
       
 29314       debouncedHideMovers = _useDebouncedShowMove.debouncedHideMovers;
       
 29315 
       
 29316   var registerRef = Object(external_this_wp_element_["useRef"])(false);
       
 29317 
       
 29318   var isFocusedWithin = function isFocusedWithin() {
       
 29319     return (ref === null || ref === void 0 ? void 0 : ref.current) && ref.current.contains(document.activeElement);
       
 29320   };
       
 29321 
       
 29322   Object(external_this_wp_element_["useEffect"])(function () {
       
 29323     var node = ref.current;
       
 29324 
       
 29325     var handleOnFocus = function handleOnFocus() {
       
 29326       if (isFocusedWithin()) {
       
 29327         setIsFocused(true);
       
 29328         debouncedShowMovers();
       
 29329       }
       
 29330     };
       
 29331 
       
 29332     var handleOnBlur = function handleOnBlur() {
       
 29333       if (!isFocusedWithin()) {
       
 29334         setIsFocused(false);
       
 29335         debouncedHideMovers();
       
 29336       }
       
 29337     };
       
 29338     /**
       
 29339      * Events are added via DOM events (vs. React synthetic events),
       
 29340      * as the child React components swallow mouse events.
       
 29341      */
       
 29342 
       
 29343 
       
 29344     if (node && !registerRef.current) {
       
 29345       node.addEventListener('focus', handleOnFocus, true);
       
 29346       node.addEventListener('blur', handleOnBlur, true);
       
 29347       registerRef.current = true;
       
 29348     }
       
 29349 
       
 29350     return function () {
       
 29351       if (node) {
       
 29352         node.removeEventListener('focus', handleOnFocus);
       
 29353         node.removeEventListener('blur', handleOnBlur);
       
 29354       }
       
 29355     };
       
 29356   }, [ref, registerRef, setIsFocused, debouncedShowMovers, debouncedHideMovers]);
       
 29357   return {
       
 29358     showMovers: showMovers,
       
 29359     gestures: {
       
 29360       onMouseMove: debouncedShowMovers,
       
 29361       onMouseLeave: debouncedHideMovers
       
 29362     }
       
 29363   };
       
 29364 }
       
 29365 
       
 29366 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-toolbar/index.js
       
 29367 
       
 29368 
       
 29369 
       
 29370 /**
       
 29371  * External dependencies
       
 29372  */
       
 29373 
       
 29374 /**
       
 29375  * WordPress dependencies
       
 29376  */
       
 29377 
       
 29378 
       
 29379 
       
 29380 
       
 29381 
       
 29382 /**
       
 29383  * Internal dependencies
       
 29384  */
       
 29385 
       
 29386 
       
 29387 
       
 29388 
       
 29389 
       
 29390 
       
 29391 
       
 29392 
       
 29393 
       
 29394 function BlockToolbar(_ref) {
       
 29395   var hideDragHandle = _ref.hideDragHandle;
       
 29396 
       
 29397   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 29398     var _select = select('core/block-editor'),
       
 29399         getBlockName = _select.getBlockName,
       
 29400         getBlockMode = _select.getBlockMode,
       
 29401         getSelectedBlockClientIds = _select.getSelectedBlockClientIds,
       
 29402         isBlockValid = _select.isBlockValid,
       
 29403         getBlockRootClientId = _select.getBlockRootClientId,
       
 29404         getSettings = _select.getSettings;
       
 29405 
       
 29406     var selectedBlockClientIds = getSelectedBlockClientIds();
       
 29407     var selectedBlockClientId = selectedBlockClientIds[0];
       
 29408     var blockRootClientId = getBlockRootClientId(selectedBlockClientId);
       
 29409     return {
 27713     return {
 29410       blockClientIds: selectedBlockClientIds,
 27714       blockClientIds: selectedBlockClientIds,
 29411       blockClientId: selectedBlockClientId,
 27715       blockClientId: selectedBlockClientId,
 29412       blockType: selectedBlockClientId && Object(external_this_wp_blocks_["getBlockType"])(getBlockName(selectedBlockClientId)),
 27716       blockType: selectedBlockClientId && Object(external_wp_blocks_["getBlockType"])(getBlockName(selectedBlockClientId)),
 29413       hasFixedToolbar: getSettings().hasFixedToolbar,
 27717       hasFixedToolbar: settings.hasFixedToolbar,
       
 27718       hasReducedUI: settings.hasReducedUI,
 29414       rootClientId: blockRootClientId,
 27719       rootClientId: blockRootClientId,
 29415       isValid: selectedBlockClientIds.every(function (id) {
 27720       isValid: selectedBlockClientIds.every(id => isBlockValid(id)),
 29416         return isBlockValid(id);
 27721       isVisual: selectedBlockClientIds.every(id => getBlockMode(id) === 'visual')
 29417       }),
       
 29418       isVisual: selectedBlockClientIds.every(function (id) {
       
 29419         return getBlockMode(id) === 'visual';
       
 29420       })
       
 29421     };
 27722     };
 29422   }, []),
 27723   }, []); // Handles highlighting the current block outline on hover or focus of the
 29423       blockClientIds = _useSelect.blockClientIds,
 27724   // block type toolbar area.
 29424       blockClientId = _useSelect.blockClientId,
 27725 
 29425       blockType = _useSelect.blockType,
 27726   const {
 29426       hasFixedToolbar = _useSelect.hasFixedToolbar,
 27727     toggleBlockHighlight
 29427       isValid = _useSelect.isValid,
 27728   } = Object(external_wp_data_["useDispatch"])(store);
 29428       isVisual = _useSelect.isVisual;
 27729   const nodeRef = Object(external_wp_element_["useRef"])();
 29429 
 27730   const {
 29430   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 27731     showMovers,
 29431       toggleBlockHighlight = _useDispatch.toggleBlockHighlight;
 27732     gestures: showMoversGestures
 29432 
 27733   } = useShowMoversGestures({
 29433   var nodeRef = Object(external_this_wp_element_["useRef"])();
       
 29434 
       
 29435   var _useShowMoversGesture = useShowMoversGestures({
       
 29436     ref: nodeRef,
 27734     ref: nodeRef,
 29437     onChange: function onChange(isFocused) {
 27735 
       
 27736     onChange(isFocused) {
       
 27737       if (isFocused && hasReducedUI) {
       
 27738         return;
       
 27739       }
       
 27740 
 29438       toggleBlockHighlight(blockClientId, isFocused);
 27741       toggleBlockHighlight(blockClientId, isFocused);
 29439     }
 27742     }
 29440   }),
 27743 
 29441       showMovers = _useShowMoversGesture.showMovers,
 27744   }); // Account for the cases where the block toolbar is rendered within the
 29442       showMoversGestures = _useShowMoversGesture.gestures;
 27745   // header area and not contextually to the block.
 29443 
 27746 
 29444   var displayHeaderToolbar = Object(external_this_wp_compose_["useViewportMatch"])('medium', '<') || hasFixedToolbar;
 27747   const displayHeaderToolbar = Object(external_wp_compose_["useViewportMatch"])('medium', '<') || hasFixedToolbar;
 29445 
 27748 
 29446   if (blockType) {
 27749   if (blockType) {
 29447     if (!Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, '__experimentalToolbar', true)) {
 27750     if (!Object(external_wp_blocks_["hasBlockSupport"])(blockType, '__experimentalToolbar', true)) {
 29448       return null;
 27751       return null;
 29449     }
 27752     }
 29450   }
 27753   }
 29451 
 27754 
 29452   var shouldShowMovers = displayHeaderToolbar || showMovers;
 27755   const shouldShowMovers = displayHeaderToolbar || showMovers;
 29453 
 27756 
 29454   if (blockClientIds.length === 0) {
 27757   if (blockClientIds.length === 0) {
 29455     return null;
 27758     return null;
 29456   }
 27759   }
 29457 
 27760 
 29458   var shouldShowVisualToolbar = isValid && isVisual;
 27761   const shouldShowVisualToolbar = isValid && isVisual;
 29459   var isMultiToolbar = blockClientIds.length > 1;
 27762   const isMultiToolbar = blockClientIds.length > 1;
 29460   var classes = classnames_default()('block-editor-block-toolbar', shouldShowMovers && 'is-showing-movers');
 27763   const classes = classnames_default()('block-editor-block-toolbar', shouldShowMovers && 'is-showing-movers');
 29461   return Object(external_this_wp_element_["createElement"])("div", {
 27764   return Object(external_wp_element_["createElement"])("div", {
 29462     className: classes
 27765     className: classes
 29463   }, Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
 27766   }, !isMultiToolbar && !displayHeaderToolbar && Object(external_wp_element_["createElement"])(BlockParentSelector, {
       
 27767     clientIds: blockClientIds
       
 27768   }), Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
 29464     ref: nodeRef
 27769     ref: nodeRef
 29465   }, showMoversGestures), !isMultiToolbar && Object(external_this_wp_element_["createElement"])("div", {
 27770   }, showMoversGestures), (shouldShowVisualToolbar || isMultiToolbar) && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
 29466     className: "block-editor-block-toolbar__block-parent-selector-wrapper"
 27771     className: "block-editor-block-toolbar__block-controls"
 29467   }, Object(external_this_wp_element_["createElement"])(BlockParentSelector, {
 27772   }, Object(external_wp_element_["createElement"])(block_switcher, {
 29468     clientIds: blockClientIds
 27773     clientIds: blockClientIds
 29469   })), (shouldShowVisualToolbar || isMultiToolbar) && Object(external_this_wp_element_["createElement"])(block_switcher, {
 27774   }), Object(external_wp_element_["createElement"])(block_mover, {
 29470     clientIds: blockClientIds
       
 29471   })), (shouldShowVisualToolbar || isMultiToolbar) && Object(external_this_wp_element_["createElement"])(block_draggable, {
       
 29472     clientIds: blockClientIds,
 27775     clientIds: blockClientIds,
 29473     cloneClassname: "block-editor-block-toolbar__drag-clone"
 27776     hideDragHandle: hideDragHandle || hasReducedUI
 29474   }, function (_ref2) {
 27777   }))), shouldShowVisualToolbar && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(block_controls.Slot, {
 29475     var isDraggable = _ref2.isDraggable,
 27778     group: "block",
 29476         onDraggableStart = _ref2.onDraggableStart,
       
 29477         onDraggableEnd = _ref2.onDraggableEnd;
       
 29478     return Object(external_this_wp_element_["createElement"])("div", {
       
 29479       className: "block-editor-block-toolbar__drag-handle-area",
       
 29480       draggable: isDraggable && !hideDragHandle,
       
 29481       onDragStart: onDraggableStart,
       
 29482       onDragEnd: onDraggableEnd
       
 29483     }, Object(external_this_wp_element_["createElement"])(block_mover, {
       
 29484       clientIds: blockClientIds
       
 29485     }));
       
 29486   }), shouldShowVisualToolbar && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(block_controls.Slot, {
       
 29487     bubblesVirtually: true,
       
 29488     className: "block-editor-block-toolbar__slot"
 27779     className: "block-editor-block-toolbar__slot"
 29489   }), Object(external_this_wp_element_["createElement"])(block_format_controls.Slot, {
 27780   }), Object(external_wp_element_["createElement"])(block_controls.Slot, {
 29490     bubblesVirtually: true,
       
 29491     className: "block-editor-block-toolbar__slot"
 27781     className: "block-editor-block-toolbar__slot"
 29492   })), Object(external_this_wp_element_["createElement"])(block_settings_menu, {
 27782   }), Object(external_wp_element_["createElement"])(block_controls.Slot, {
       
 27783     group: "inline",
       
 27784     className: "block-editor-block-toolbar__slot"
       
 27785   }), Object(external_wp_element_["createElement"])(block_controls.Slot, {
       
 27786     group: "other",
       
 27787     className: "block-editor-block-toolbar__slot"
       
 27788   })), Object(external_wp_element_["createElement"])(block_settings_menu, {
 29493     clientIds: blockClientIds
 27789     clientIds: blockClientIds
 29494   }));
 27790   }));
 29495 }
 27791 }
 29496 
 27792 
 29497 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-contextual-toolbar.js
 27793 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/block-contextual-toolbar.js
 29498 
 27794 
 29499 
 27795 
 29500 
 27796 
       
 27797 /**
       
 27798  * External dependencies
       
 27799  */
 29501 
 27800 
 29502 /**
 27801 /**
 29503  * WordPress dependencies
 27802  * WordPress dependencies
 29504  */
 27803  */
 29505 
 27804 
 29506 
 27805 
 29507 
 27806 
       
 27807 
 29508 /**
 27808 /**
 29509  * Internal dependencies
 27809  * Internal dependencies
 29510  */
 27810  */
 29511 
 27811 
 29512 
 27812 
 29513 
 27813 
 29514 
 27814 
 29515 function BlockContextualToolbar(_ref) {
 27815 
 29516   var focusOnMount = _ref.focusOnMount,
 27816 function BlockContextualToolbar({
 29517       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["focusOnMount"]);
 27817   focusOnMount,
 29518 
 27818   isFixed,
 29519   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 27819   ...props
 29520     var _select = select('core/block-editor'),
 27820 }) {
 29521         getBlockName = _select.getBlockName,
 27821   const {
 29522         getSelectedBlockClientIds = _select.getSelectedBlockClientIds;
 27822     blockType,
 29523 
 27823     hasParents,
 29524     var _select2 = select('core/blocks'),
 27824     showParentSelector
 29525         getBlockType = _select2.getBlockType;
 27825   } = Object(external_wp_data_["useSelect"])(select => {
 29526 
 27826     const {
 29527     var selectedBlockClientIds = getSelectedBlockClientIds();
 27827       getBlockName,
 29528     var selectedBlockClientId = selectedBlockClientIds[0];
 27828       getBlockParents,
       
 27829       getSelectedBlockClientIds
       
 27830     } = select(store);
       
 27831     const {
       
 27832       getBlockType
       
 27833     } = select(external_wp_blocks_["store"]);
       
 27834     const selectedBlockClientIds = getSelectedBlockClientIds();
       
 27835     const selectedBlockClientId = selectedBlockClientIds[0];
       
 27836     const parents = getBlockParents(selectedBlockClientId);
       
 27837     const firstParentClientId = parents[parents.length - 1];
       
 27838     const parentBlockName = getBlockName(firstParentClientId);
       
 27839     const parentBlockType = getBlockType(parentBlockName);
 29529     return {
 27840     return {
 29530       blockType: selectedBlockClientId && getBlockType(getBlockName(selectedBlockClientId))
 27841       blockType: selectedBlockClientId && getBlockType(getBlockName(selectedBlockClientId)),
       
 27842       hasParents: parents.length,
       
 27843       showParentSelector: Object(external_wp_blocks_["hasBlockSupport"])(parentBlockType, '__experimentalParentSelector', true)
 29531     };
 27844     };
 29532   }, []),
 27845   }, []);
 29533       blockType = _useSelect.blockType;
       
 29534 
 27846 
 29535   if (blockType) {
 27847   if (blockType) {
 29536     if (!Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, '__experimentalToolbar', true)) {
 27848     if (!Object(external_wp_blocks_["hasBlockSupport"])(blockType, '__experimentalToolbar', true)) {
 29537       return null;
 27849       return null;
 29538     }
 27850     }
 29539   }
 27851   } // Shifts the toolbar to make room for the parent block selector.
 29540 
 27852 
 29541   return Object(external_this_wp_element_["createElement"])("div", {
 27853 
 29542     className: "block-editor-block-contextual-toolbar-wrapper"
 27854   const classes = classnames_default()('block-editor-block-contextual-toolbar', {
 29543   }, Object(external_this_wp_element_["createElement"])(navigable_toolbar, Object(esm_extends["a" /* default */])({
 27855     'has-parent': hasParents && showParentSelector,
       
 27856     'is-fixed': isFixed
       
 27857   });
       
 27858   return Object(external_wp_element_["createElement"])(navigable_toolbar, Object(esm_extends["a" /* default */])({
 29544     focusOnMount: focusOnMount,
 27859     focusOnMount: focusOnMount,
 29545     className: "block-editor-block-contextual-toolbar"
 27860     className: classes
 29546     /* translators: accessibility text for the block toolbar */
 27861     /* translators: accessibility text for the block toolbar */
 29547     ,
 27862     ,
 29548     "aria-label": Object(external_this_wp_i18n_["__"])('Block tools')
 27863     "aria-label": Object(external_wp_i18n_["__"])('Block tools')
 29549   }, props), Object(external_this_wp_element_["createElement"])(BlockToolbar, null)));
 27864   }, props), Object(external_wp_element_["createElement"])(BlockToolbar, {
       
 27865     hideDragHandle: isFixed
       
 27866   }));
 29550 }
 27867 }
 29551 
 27868 
 29552 /* harmony default export */ var block_contextual_toolbar = (BlockContextualToolbar);
 27869 /* harmony default export */ var block_contextual_toolbar = (BlockContextualToolbar);
 29553 
 27870 
 29554 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-popover.js
 27871 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/block-popover.js
 29555 
       
 29556 
 27872 
 29557 
 27873 
 29558 /**
 27874 /**
 29559  * External dependencies
 27875  * External dependencies
 29560  */
 27876  */
 29568 
 27884 
 29569 
 27885 
 29570 
 27886 
 29571 
 27887 
 29572 
 27888 
       
 27889 
 29573 /**
 27890 /**
 29574  * Internal dependencies
 27891  * Internal dependencies
 29575  */
 27892  */
 29576 
 27893 
 29577 
 27894 
 29578 
 27895 
 29579 
 27896 
 29580 
 27897 
 29581 
 27898 
       
 27899 
       
 27900 
 29582 function block_popover_selector(select) {
 27901 function block_popover_selector(select) {
 29583   var _select = select('core/block-editor'),
 27902   const {
 29584       isNavigationMode = _select.isNavigationMode,
 27903     isNavigationMode,
 29585       isMultiSelecting = _select.isMultiSelecting,
 27904     isMultiSelecting,
 29586       hasMultiSelection = _select.hasMultiSelection,
 27905     hasMultiSelection,
 29587       isTyping = _select.isTyping,
 27906     isTyping,
 29588       isCaretWithinFormattedText = _select.isCaretWithinFormattedText,
 27907     isCaretWithinFormattedText,
 29589       getSettings = _select.getSettings,
 27908     getSettings,
 29590       getLastMultiSelectedBlockClientId = _select.getLastMultiSelectedBlockClientId;
 27909     getLastMultiSelectedBlockClientId
 29591 
 27910   } = select(store);
 29592   return {
 27911   return {
 29593     isNavigationMode: isNavigationMode(),
 27912     isNavigationMode: isNavigationMode(),
 29594     isMultiSelecting: isMultiSelecting(),
 27913     isMultiSelecting: isMultiSelecting(),
 29595     isTyping: isTyping(),
 27914     isTyping: isTyping(),
 29596     isCaretWithinFormattedText: isCaretWithinFormattedText(),
 27915     isCaretWithinFormattedText: isCaretWithinFormattedText(),
 29598     hasFixedToolbar: getSettings().hasFixedToolbar,
 27917     hasFixedToolbar: getSettings().hasFixedToolbar,
 29599     lastClientId: getLastMultiSelectedBlockClientId()
 27918     lastClientId: getLastMultiSelectedBlockClientId()
 29600   };
 27919   };
 29601 }
 27920 }
 29602 
 27921 
 29603 function BlockPopover(_ref) {
 27922 function BlockPopover({
 29604   var clientId = _ref.clientId,
 27923   clientId,
 29605       rootClientId = _ref.rootClientId,
 27924   rootClientId,
 29606       isValid = _ref.isValid,
 27925   isValid,
 29607       isEmptyDefaultBlock = _ref.isEmptyDefaultBlock,
 27926   isEmptyDefaultBlock,
 29608       capturingClientId = _ref.capturingClientId;
 27927   capturingClientId,
 29609 
 27928   __unstablePopoverSlot,
 29610   var _useSelect = Object(external_this_wp_data_["useSelect"])(block_popover_selector, []),
 27929   __unstableContentRef
 29611       isNavigationMode = _useSelect.isNavigationMode,
 27930 }) {
 29612       isMultiSelecting = _useSelect.isMultiSelecting,
 27931   const {
 29613       isTyping = _useSelect.isTyping,
 27932     isNavigationMode,
 29614       isCaretWithinFormattedText = _useSelect.isCaretWithinFormattedText,
 27933     isMultiSelecting,
 29615       hasMultiSelection = _useSelect.hasMultiSelection,
 27934     isTyping,
 29616       hasFixedToolbar = _useSelect.hasFixedToolbar,
 27935     isCaretWithinFormattedText,
 29617       lastClientId = _useSelect.lastClientId;
 27936     hasMultiSelection,
 29618 
 27937     hasFixedToolbar,
 29619   var isLargeViewport = Object(external_this_wp_compose_["useViewportMatch"])('medium');
 27938     lastClientId
 29620 
 27939   } = Object(external_wp_data_["useSelect"])(block_popover_selector, []);
 29621   var _useState = Object(external_this_wp_element_["useState"])(false),
 27940   const isInsertionPointVisible = Object(external_wp_data_["useSelect"])(select => {
 29622       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 27941     const {
 29623       isToolbarForced = _useState2[0],
 27942       isBlockInsertionPointVisible,
 29624       setIsToolbarForced = _useState2[1];
 27943       getBlockInsertionPoint,
 29625 
 27944       getBlockOrder
 29626   var _useState3 = Object(external_this_wp_element_["useState"])(false),
 27945     } = select(store);
 29627       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
 27946 
 29628       isInserterShown = _useState4[0],
 27947     if (!isBlockInsertionPointVisible()) {
 29629       setIsInserterShown = _useState4[1];
 27948       return false;
 29630 
 27949     }
 29631   var blockNodes = Object(external_this_wp_element_["useContext"])(BlockNodes);
 27950 
 29632   var showEmptyBlockSideInserter = !isNavigationMode && isEmptyDefaultBlock && isValid;
 27951     const insertionPoint = getBlockInsertionPoint();
 29633   var shouldShowBreadcrumb = isNavigationMode;
 27952     const order = getBlockOrder(insertionPoint.rootClientId);
 29634   var shouldShowContextualToolbar = !isNavigationMode && !hasFixedToolbar && isLargeViewport && !showEmptyBlockSideInserter && !isMultiSelecting && (!isTyping || isCaretWithinFormattedText);
 27953     return order[insertionPoint.index] === clientId;
 29635   var canFocusHiddenToolbar = !isNavigationMode && !shouldShowContextualToolbar && !hasFixedToolbar && !isEmptyDefaultBlock;
 27954   }, [clientId]);
 29636   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/focus-toolbar', Object(external_this_wp_element_["useCallback"])(function () {
 27955   const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
 29637     return setIsToolbarForced(true);
 27956   const [isToolbarForced, setIsToolbarForced] = Object(external_wp_element_["useState"])(false);
       
 27957   const [isInserterShown, setIsInserterShown] = Object(external_wp_element_["useState"])(false);
       
 27958   const {
       
 27959     stopTyping
       
 27960   } = Object(external_wp_data_["useDispatch"])(store); // Controls when the side inserter on empty lines should
       
 27961   // be shown, including writing and selection modes.
       
 27962 
       
 27963   const showEmptyBlockSideInserter = !isTyping && !isNavigationMode && isEmptyDefaultBlock && isValid;
       
 27964   const shouldShowBreadcrumb = isNavigationMode;
       
 27965   const shouldShowContextualToolbar = !isNavigationMode && !hasFixedToolbar && isLargeViewport && !showEmptyBlockSideInserter && !isMultiSelecting && (!isTyping || isCaretWithinFormattedText);
       
 27966   const canFocusHiddenToolbar = !isNavigationMode && !shouldShowContextualToolbar && !hasFixedToolbar && !isEmptyDefaultBlock;
       
 27967   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/focus-toolbar', Object(external_wp_element_["useCallback"])(() => {
       
 27968     setIsToolbarForced(true);
       
 27969     stopTyping(true);
 29638   }, []), {
 27970   }, []), {
 29639     bindGlobal: true,
 27971     bindGlobal: true,
 29640     eventName: 'keydown',
 27972     eventName: 'keydown',
 29641     isDisabled: !canFocusHiddenToolbar
 27973     isDisabled: !canFocusHiddenToolbar
 29642   });
 27974   });
       
 27975   Object(external_wp_element_["useEffect"])(() => {
       
 27976     if (!shouldShowContextualToolbar) {
       
 27977       setIsToolbarForced(false);
       
 27978     }
       
 27979   }, [shouldShowContextualToolbar]); // Stores the active toolbar item index so the block toolbar can return focus
       
 27980   // to it when re-mounting.
       
 27981 
       
 27982   const initialToolbarItemIndexRef = Object(external_wp_element_["useRef"])();
       
 27983   const selectedElement = useBlockElement(clientId);
       
 27984   const lastSelectedElement = useBlockElement(lastClientId);
       
 27985   const capturingElement = useBlockElement(capturingClientId);
       
 27986   const popoverScrollRef = usePopoverScroll(__unstableContentRef);
 29643 
 27987 
 29644   if (!shouldShowBreadcrumb && !shouldShowContextualToolbar && !isToolbarForced && !showEmptyBlockSideInserter) {
 27988   if (!shouldShowBreadcrumb && !shouldShowContextualToolbar && !isToolbarForced && !showEmptyBlockSideInserter) {
 29645     return null;
 27989     return null;
 29646   }
 27990   }
 29647 
 27991 
 29648   var node = blockNodes[clientId];
 27992   let node = selectedElement;
 29649 
       
 29650   if (capturingClientId) {
       
 29651     node = document.getElementById('block-' + capturingClientId);
       
 29652   }
       
 29653 
 27993 
 29654   if (!node) {
 27994   if (!node) {
 29655     return null;
 27995     return null;
 29656   }
 27996   }
 29657 
 27997 
 29658   var anchorRef = node;
 27998   if (capturingClientId) {
       
 27999     node = capturingElement;
       
 28000   }
       
 28001 
       
 28002   let anchorRef = node;
 29659 
 28003 
 29660   if (hasMultiSelection) {
 28004   if (hasMultiSelection) {
 29661     var bottomNode = blockNodes[lastClientId]; // Wait to render the popover until the bottom reference is available
 28005     // Wait to render the popover until the bottom reference is available
 29662     // as well.
 28006     // as well.
 29663 
 28007     if (!lastSelectedElement) {
 29664     if (!bottomNode) {
       
 29665       return null;
 28008       return null;
 29666     }
 28009     }
 29667 
 28010 
 29668     anchorRef = {
 28011     anchorRef = {
 29669       top: node,
 28012       top: node,
 29670       bottom: bottomNode
 28013       bottom: lastSelectedElement
 29671     };
 28014     };
 29672   }
 28015   }
 29673 
 28016 
 29674   function onFocus() {
 28017   function onFocus() {
 29675     setIsInserterShown(true);
 28018     setIsInserterShown(true);
 29681   // left corner. For the side inserter, pop out towards the left, and
 28024   // left corner. For the side inserter, pop out towards the left, and
 29682   // position in the right corner.
 28025   // position in the right corner.
 29683   // To do: refactor `Popover` to make this prop clearer.
 28026   // To do: refactor `Popover` to make this prop clearer.
 29684 
 28027 
 29685 
 28028 
 29686   var popoverPosition = showEmptyBlockSideInserter ? 'top left right' : 'top right left';
 28029   const popoverPosition = showEmptyBlockSideInserter ? 'top left right' : 'top right left';
 29687   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Popover"], {
 28030   const {
       
 28031     ownerDocument
       
 28032   } = node;
       
 28033   const stickyBoundaryElement = showEmptyBlockSideInserter ? undefined : // The sticky boundary element should be the boundary at which the
       
 28034   // the block toolbar becomes sticky when the block scolls out of view.
       
 28035   // In case of an iframe, this should be the iframe boundary, otherwise
       
 28036   // the scroll container.
       
 28037   ownerDocument.defaultView.frameElement || Object(external_wp_dom_["getScrollContainer"])(node) || ownerDocument.body;
       
 28038   return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
       
 28039     ref: popoverScrollRef,
 29688     noArrow: true,
 28040     noArrow: true,
 29689     animate: false,
 28041     animate: false,
 29690     position: popoverPosition,
 28042     position: popoverPosition,
 29691     focusOnMount: false,
 28043     focusOnMount: false,
 29692     anchorRef: anchorRef,
 28044     anchorRef: anchorRef,
 29693     className: "block-editor-block-list__block-popover",
 28045     className: classnames_default()('block-editor-block-list__block-popover', {
 29694     __unstableSticky: !showEmptyBlockSideInserter,
 28046       'is-insertion-point-visible': isInsertionPointVisible
 29695     __unstableSlotName: "block-toolbar",
 28047     }),
       
 28048     __unstableStickyBoundaryElement: stickyBoundaryElement // Render in the old slot if needed for backward compatibility,
       
 28049     // otherwise render in place (not in the the default popover slot).
       
 28050     ,
       
 28051     __unstableSlotName: __unstablePopoverSlot || null,
 29696     __unstableBoundaryParent: true // Observe movement for block animations (especially horizontal).
 28052     __unstableBoundaryParent: true // Observe movement for block animations (especially horizontal).
 29697     ,
 28053     ,
 29698     __unstableObserveElement: node,
 28054     __unstableObserveElement: node,
 29699     onBlur: function onBlur() {
       
 29700       return setIsToolbarForced(false);
       
 29701     },
       
 29702     shouldAnchorIncludePadding: true
 28055     shouldAnchorIncludePadding: true
 29703   }, (shouldShowContextualToolbar || isToolbarForced) && Object(external_this_wp_element_["createElement"])("div", {
 28056   }, (shouldShowContextualToolbar || isToolbarForced) && Object(external_wp_element_["createElement"])("div", {
 29704     onFocus: onFocus,
 28057     onFocus: onFocus,
 29705     onBlur: onBlur // While ideally it would be enough to capture the
 28058     onBlur: onBlur // While ideally it would be enough to capture the
 29706     // bubbling focus event from the Inserter, due to the
 28059     // bubbling focus event from the Inserter, due to the
 29707     // characteristics of click focusing of `button`s in
 28060     // characteristics of click focusing of `button`s in
 29708     // Firefox and Safari, it is not reliable.
 28061     // Firefox and Safari, it is not reliable.
 29711     ,
 28064     ,
 29712     tabIndex: -1,
 28065     tabIndex: -1,
 29713     className: classnames_default()('block-editor-block-list__block-popover-inserter', {
 28066     className: classnames_default()('block-editor-block-list__block-popover-inserter', {
 29714       'is-visible': isInserterShown
 28067       'is-visible': isInserterShown
 29715     })
 28068     })
 29716   }, Object(external_this_wp_element_["createElement"])(inserter, {
 28069   }, Object(external_wp_element_["createElement"])(inserter, {
 29717     clientId: clientId,
 28070     clientId: clientId,
 29718     rootClientId: rootClientId,
 28071     rootClientId: rootClientId,
 29719     __experimentalIsQuick: true
 28072     __experimentalIsQuick: true
 29720   })), (shouldShowContextualToolbar || isToolbarForced) && Object(external_this_wp_element_["createElement"])(block_contextual_toolbar // If the toolbar is being shown because of being forced
 28073   })), (shouldShowContextualToolbar || isToolbarForced) && Object(external_wp_element_["createElement"])(block_contextual_toolbar // If the toolbar is being shown because of being forced
 29721   // it should focus the toolbar right after the mount.
 28074   // it should focus the toolbar right after the mount.
 29722   , {
 28075   , {
 29723     focusOnMount: isToolbarForced
 28076     focusOnMount: isToolbarForced,
 29724   }), shouldShowBreadcrumb && Object(external_this_wp_element_["createElement"])(block_selection_button, {
 28077     __experimentalInitialIndex: initialToolbarItemIndexRef.current,
       
 28078     __experimentalOnIndexChange: index => {
       
 28079       initialToolbarItemIndexRef.current = index;
       
 28080     } // Resets the index whenever the active block changes so
       
 28081     // this is not persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169
       
 28082     ,
       
 28083     key: clientId
       
 28084   }), shouldShowBreadcrumb && Object(external_wp_element_["createElement"])(block_selection_button, {
 29725     clientId: clientId,
 28085     clientId: clientId,
 29726     rootClientId: rootClientId
 28086     rootClientId: rootClientId,
 29727   }), showEmptyBlockSideInserter && Object(external_this_wp_element_["createElement"])("div", {
 28087     blockElement: node
       
 28088   }), showEmptyBlockSideInserter && Object(external_wp_element_["createElement"])("div", {
 29728     className: "block-editor-block-list__empty-block-inserter"
 28089     className: "block-editor-block-list__empty-block-inserter"
 29729   }, Object(external_this_wp_element_["createElement"])(inserter, {
 28090   }, Object(external_wp_element_["createElement"])(inserter, {
 29730     position: "bottom right",
 28091     position: "bottom right",
 29731     rootClientId: rootClientId,
 28092     rootClientId: rootClientId,
 29732     clientId: clientId,
 28093     clientId: clientId,
 29733     __experimentalIsQuick: true
 28094     __experimentalIsQuick: true
 29734   })));
 28095   })));
 29735 }
 28096 }
 29736 
 28097 
 29737 function wrapperSelector(select) {
 28098 function wrapperSelector(select) {
 29738   var _select2 = select('core/block-editor'),
 28099   const {
 29739       getSelectedBlockClientId = _select2.getSelectedBlockClientId,
 28100     getSelectedBlockClientId,
 29740       getFirstMultiSelectedBlockClientId = _select2.getFirstMultiSelectedBlockClientId,
 28101     getFirstMultiSelectedBlockClientId,
 29741       getBlockRootClientId = _select2.getBlockRootClientId,
 28102     getBlockRootClientId,
 29742       __unstableGetBlockWithoutInnerBlocks = _select2.__unstableGetBlockWithoutInnerBlocks,
 28103     __unstableGetBlockWithoutInnerBlocks,
 29743       getBlockParents = _select2.getBlockParents,
 28104     getBlockParents,
 29744       __experimentalGetBlockListSettingsForBlocks = _select2.__experimentalGetBlockListSettingsForBlocks;
 28105     __experimentalGetBlockListSettingsForBlocks
 29745 
 28106   } = select(store);
 29746   var clientId = getSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();
 28107   const clientId = getSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();
 29747 
 28108 
 29748   if (!clientId) {
 28109   if (!clientId) {
 29749     return;
 28110     return;
 29750   }
 28111   }
 29751 
 28112 
 29752   var _ref2 = __unstableGetBlockWithoutInnerBlocks(clientId) || {},
 28113   const {
 29753       name = _ref2.name,
 28114     name,
 29754       _ref2$attributes = _ref2.attributes,
 28115     attributes = {},
 29755       attributes = _ref2$attributes === void 0 ? {} : _ref2$attributes,
 28116     isValid
 29756       isValid = _ref2.isValid;
 28117   } = __unstableGetBlockWithoutInnerBlocks(clientId) || {};
 29757 
 28118   const blockParentsClientIds = getBlockParents(clientId); // Get Block List Settings for all ancestors of the current Block clientId
 29758   var blockParentsClientIds = getBlockParents(clientId); // Get Block List Settings for all ancestors of the current Block clientId
 28119 
 29759 
 28120   const parentBlockListSettings = __experimentalGetBlockListSettingsForBlocks(blockParentsClientIds); // Get the clientId of the topmost parent with the capture toolbars setting.
 29760   var ancestorBlockListSettings = __experimentalGetBlockListSettingsForBlocks(blockParentsClientIds); // Find the index of the first Block with the `captureDescendantsToolbars` prop defined
 28121 
 29761   // This will be the top most ancestor because getBlockParents() returns tree from top -> bottom
 28122 
 29762 
 28123   const capturingClientId = Object(external_lodash_["find"])(blockParentsClientIds, parentClientId => {
 29763 
 28124     var _parentBlockListSetti;
 29764   var topmostAncestorWithCaptureDescendantsToolbarsIndex = Object(external_this_lodash_["findIndex"])(ancestorBlockListSettings, ['__experimentalCaptureToolbars', true]);
 28125 
 29765   var capturingClientId;
 28126     return (_parentBlockListSetti = parentBlockListSettings[parentClientId]) === null || _parentBlockListSetti === void 0 ? void 0 : _parentBlockListSetti.__experimentalCaptureToolbars;
 29766 
 28127   });
 29767   if (topmostAncestorWithCaptureDescendantsToolbarsIndex !== -1) {
       
 29768     capturingClientId = blockParentsClientIds[topmostAncestorWithCaptureDescendantsToolbarsIndex];
       
 29769   }
       
 29770 
       
 29771   return {
 28128   return {
 29772     clientId: clientId,
 28129     clientId,
 29773     rootClientId: getBlockRootClientId(clientId),
 28130     rootClientId: getBlockRootClientId(clientId),
 29774     name: name,
 28131     name,
 29775     isValid: isValid,
 28132     isValid,
 29776     isEmptyDefaultBlock: name && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])({
 28133     isEmptyDefaultBlock: name && Object(external_wp_blocks_["isUnmodifiedDefaultBlock"])({
 29777       name: name,
 28134       name,
 29778       attributes: attributes
 28135       attributes
 29779     }),
 28136     }),
 29780     capturingClientId: capturingClientId
 28137     capturingClientId
 29781   };
 28138   };
 29782 }
 28139 }
 29783 
 28140 
 29784 function WrappedBlockPopover() {
 28141 function WrappedBlockPopover({
 29785   var selected = Object(external_this_wp_data_["useSelect"])(wrapperSelector, []);
 28142   __unstablePopoverSlot,
       
 28143   __unstableContentRef
       
 28144 }) {
       
 28145   const selected = Object(external_wp_data_["useSelect"])(wrapperSelector, []);
 29786 
 28146 
 29787   if (!selected) {
 28147   if (!selected) {
 29788     return null;
 28148     return null;
 29789   }
 28149   }
 29790 
 28150 
 29791   var clientId = selected.clientId,
 28151   const {
 29792       rootClientId = selected.rootClientId,
 28152     clientId,
 29793       name = selected.name,
 28153     rootClientId,
 29794       isValid = selected.isValid,
 28154     name,
 29795       isEmptyDefaultBlock = selected.isEmptyDefaultBlock,
 28155     isValid,
 29796       capturingClientId = selected.capturingClientId;
 28156     isEmptyDefaultBlock,
       
 28157     capturingClientId
       
 28158   } = selected;
 29797 
 28159 
 29798   if (!name) {
 28160   if (!name) {
 29799     return null;
 28161     return null;
 29800   }
 28162   }
 29801 
 28163 
 29802   return Object(external_this_wp_element_["createElement"])(BlockPopover, {
 28164   return Object(external_wp_element_["createElement"])(BlockPopover, {
 29803     clientId: clientId,
 28165     clientId: clientId,
 29804     rootClientId: rootClientId,
 28166     rootClientId: rootClientId,
 29805     isValid: isValid,
 28167     isValid: isValid,
 29806     isEmptyDefaultBlock: isEmptyDefaultBlock,
 28168     isEmptyDefaultBlock: isEmptyDefaultBlock,
 29807     capturingClientId: capturingClientId
 28169     capturingClientId: capturingClientId,
       
 28170     __unstablePopoverSlot: __unstablePopoverSlot,
       
 28171     __unstableContentRef: __unstableContentRef
 29808   });
 28172   });
 29809 }
 28173 }
 29810 
 28174 
 29811 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/root-container.js
 28175 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/back-compat.js
 29812 
 28176 
       
 28177 
       
 28178 /**
       
 28179  * WordPress dependencies
       
 28180  */
       
 28181 
       
 28182 
       
 28183 
       
 28184 /**
       
 28185  * Internal dependencies
       
 28186  */
       
 28187 
       
 28188 
       
 28189 
       
 28190 function BlockToolsBackCompat({
       
 28191   children
       
 28192 }) {
       
 28193   const openRef = Object(external_wp_element_["useContext"])(InsertionPointOpenRef);
       
 28194   const isDisabled = Object(external_wp_element_["useContext"])(external_wp_components_["Disabled"].Context); // If context is set, `BlockTools` is a parent component.
       
 28195 
       
 28196   if (openRef || isDisabled) {
       
 28197     return children;
       
 28198   }
       
 28199 
       
 28200   external_wp_deprecated_default()('wp.components.Popover.Slot name="block-toolbar"', {
       
 28201     alternative: 'wp.blockEditor.BlockTools'
       
 28202   });
       
 28203   return Object(external_wp_element_["createElement"])(InsertionPoint, {
       
 28204     __unstablePopoverSlot: "block-toolbar"
       
 28205   }, Object(external_wp_element_["createElement"])(WrappedBlockPopover, {
       
 28206     __unstablePopoverSlot: "block-toolbar"
       
 28207   }), children);
       
 28208 }
       
 28209 
       
 28210 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-selection-clearer/index.js
       
 28211 
       
 28212 
       
 28213 
       
 28214 /**
       
 28215  * WordPress dependencies
       
 28216  */
       
 28217 
       
 28218 
       
 28219 /**
       
 28220  * Internal dependencies
       
 28221  */
       
 28222 
       
 28223 
       
 28224 /**
       
 28225  * Pass the returned ref callback to an element that should clear block
       
 28226  * selection. Selection will only be cleared if the element is clicked directly,
       
 28227  * not if a child element is clicked.
       
 28228  *
       
 28229  * @return {import('react').RefCallback} Ref callback.
       
 28230  */
       
 28231 
       
 28232 function useBlockSelectionClearer() {
       
 28233   const {
       
 28234     hasSelectedBlock,
       
 28235     hasMultiSelection
       
 28236   } = Object(external_wp_data_["useSelect"])(store);
       
 28237   const {
       
 28238     clearSelectedBlock
       
 28239   } = Object(external_wp_data_["useDispatch"])(store);
       
 28240   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 28241     function onMouseDown(event) {
       
 28242       if (!hasSelectedBlock() && !hasMultiSelection()) {
       
 28243         return;
       
 28244       } // Only handle clicks on the element, not the children.
       
 28245 
       
 28246 
       
 28247       if (event.target !== node) {
       
 28248         return;
       
 28249       }
       
 28250 
       
 28251       clearSelectedBlock();
       
 28252     }
       
 28253 
       
 28254     node.addEventListener('mousedown', onMouseDown);
       
 28255     return () => {
       
 28256       node.removeEventListener('mousedown', onMouseDown);
       
 28257     };
       
 28258   }, [hasSelectedBlock, hasMultiSelection, clearSelectedBlock]);
       
 28259 }
       
 28260 function BlockSelectionClearer(props) {
       
 28261   return Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
       
 28262     ref: useBlockSelectionClearer()
       
 28263   }, props));
       
 28264 }
       
 28265 
       
 28266 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/index.js
 29813 
 28267 
 29814 
 28268 
 29815 /**
 28269 /**
 29816  * External dependencies
 28270  * External dependencies
 29817  */
 28271  */
 29820  * WordPress dependencies
 28274  * WordPress dependencies
 29821  */
 28275  */
 29822 
 28276 
 29823 
 28277 
 29824 
 28278 
       
 28279 
 29825 /**
 28280 /**
 29826  * Internal dependencies
 28281  * Internal dependencies
 29827  */
 28282  */
 29828 
 28283 
 29829 
 28284 
 29830 
 28285 
 29831 
 28286 
 29832 
 28287 
 29833 /** @typedef {import('@wordpress/element').WPSyntheticEvent} WPSyntheticEvent */
 28288 
 29834 
 28289 
 29835 var root_container_Context = Object(external_this_wp_element_["createContext"])();
 28290 
 29836 var BlockNodes = Object(external_this_wp_element_["createContext"])();
 28291 
 29837 var SetBlockNodes = Object(external_this_wp_element_["createContext"])();
 28292 
 29838 
 28293 
 29839 function root_container_selector(select) {
 28294 const IntersectionObserver = Object(external_wp_element_["createContext"])();
 29840   var _select = select('core/block-editor'),
 28295 
 29841       getSelectedBlockClientId = _select.getSelectedBlockClientId,
 28296 function Root({
 29842       hasMultiSelection = _select.hasMultiSelection;
 28297   className,
 29843 
 28298   children
 29844   return {
 28299 }) {
 29845     selectedBlockClientId: getSelectedBlockClientId(),
 28300   const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
 29846     hasMultiSelection: hasMultiSelection()
 28301   const {
       
 28302     isOutlineMode,
       
 28303     isFocusMode,
       
 28304     isNavigationMode
       
 28305   } = Object(external_wp_data_["useSelect"])(select => {
       
 28306     const {
       
 28307       getSettings,
       
 28308       isNavigationMode: _isNavigationMode
       
 28309     } = select(store);
       
 28310     const {
       
 28311       outlineMode,
       
 28312       focusMode
       
 28313     } = getSettings();
       
 28314     return {
       
 28315       isOutlineMode: outlineMode,
       
 28316       isFocusMode: focusMode,
       
 28317       isNavigationMode: _isNavigationMode()
       
 28318     };
       
 28319   }, []);
       
 28320   return Object(external_wp_element_["createElement"])(Head, null, Object(external_wp_element_["createElement"])("div", {
       
 28321     ref: Object(external_wp_compose_["useMergeRefs"])([useBlockSelectionClearer(), useBlockDropZone(), useInBetweenInserter()]),
       
 28322     className: classnames_default()('block-editor-block-list__layout is-root-container', className, {
       
 28323       'is-outline-mode': isOutlineMode,
       
 28324       'is-focus-mode': isFocusMode && isLargeViewport,
       
 28325       'is-navigate-mode': isNavigationMode
       
 28326     })
       
 28327   }, children));
       
 28328 }
       
 28329 
       
 28330 function BlockList({
       
 28331   className,
       
 28332   ...props
       
 28333 }) {
       
 28334   usePreParsePatterns();
       
 28335   return Object(external_wp_element_["createElement"])(BlockToolsBackCompat, null, Object(external_wp_element_["createElement"])(Root, {
       
 28336     className: className
       
 28337   }, Object(external_wp_element_["createElement"])(BlockListItems, props)));
       
 28338 }
       
 28339 
       
 28340 function Items({
       
 28341   placeholder,
       
 28342   rootClientId,
       
 28343   renderAppender,
       
 28344   __experimentalAppenderTagName,
       
 28345   __experimentalLayout: layout = layout_defaultLayout
       
 28346 }) {
       
 28347   const [intersectingBlocks, setIntersectingBlocks] = Object(external_wp_element_["useState"])(new Set());
       
 28348   const intersectionObserver = Object(external_wp_element_["useMemo"])(() => {
       
 28349     const {
       
 28350       IntersectionObserver: Observer
       
 28351     } = window;
       
 28352 
       
 28353     if (!Observer) {
       
 28354       return;
       
 28355     }
       
 28356 
       
 28357     return new Observer(entries => {
       
 28358       setIntersectingBlocks(oldIntersectingBlocks => {
       
 28359         const newIntersectingBlocks = new Set(oldIntersectingBlocks);
       
 28360 
       
 28361         for (const entry of entries) {
       
 28362           const clientId = entry.target.getAttribute('data-block');
       
 28363           const action = entry.isIntersecting ? 'add' : 'delete';
       
 28364           newIntersectingBlocks[action](clientId);
       
 28365         }
       
 28366 
       
 28367         return newIntersectingBlocks;
       
 28368       });
       
 28369     });
       
 28370   }, [setIntersectingBlocks]);
       
 28371   const {
       
 28372     order,
       
 28373     selectedBlocks
       
 28374   } = Object(external_wp_data_["useSelect"])(select => {
       
 28375     const {
       
 28376       getBlockOrder,
       
 28377       getSelectedBlockClientIds
       
 28378     } = select(store);
       
 28379     return {
       
 28380       order: getBlockOrder(rootClientId),
       
 28381       selectedBlocks: getSelectedBlockClientIds()
       
 28382     };
       
 28383   }, [rootClientId]);
       
 28384   return Object(external_wp_element_["createElement"])(LayoutProvider, {
       
 28385     value: layout
       
 28386   }, Object(external_wp_element_["createElement"])(IntersectionObserver.Provider, {
       
 28387     value: intersectionObserver
       
 28388   }, order.map(clientId => Object(external_wp_element_["createElement"])(external_wp_data_["AsyncModeProvider"], {
       
 28389     key: clientId,
       
 28390     value: // Only provide data asynchronously if the block is
       
 28391     // not visible and not selected.
       
 28392     !intersectingBlocks.has(clientId) && !selectedBlocks.includes(clientId)
       
 28393   }, Object(external_wp_element_["createElement"])(block_list_block, {
       
 28394     rootClientId: rootClientId,
       
 28395     clientId: clientId
       
 28396   })))), order.length < 1 && placeholder, Object(external_wp_element_["createElement"])(block_list_appender, {
       
 28397     tagName: __experimentalAppenderTagName,
       
 28398     rootClientId: rootClientId,
       
 28399     renderAppender: renderAppender
       
 28400   }));
       
 28401 }
       
 28402 
       
 28403 function BlockListItems(props) {
       
 28404   // This component needs to always be synchronous as it's the one changing
       
 28405   // the async mode depending on the block selection.
       
 28406   return Object(external_wp_element_["createElement"])(external_wp_data_["AsyncModeProvider"], {
       
 28407     value: false
       
 28408   }, Object(external_wp_element_["createElement"])(Items, props));
       
 28409 }
       
 28410 
       
 28411 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-intersection-observer.js
       
 28412 /**
       
 28413  * WordPress dependencies
       
 28414  */
       
 28415 
       
 28416 
       
 28417 /**
       
 28418  * Internal dependencies
       
 28419  */
       
 28420 
       
 28421 
       
 28422 function useIntersectionObserver() {
       
 28423   const observer = Object(external_wp_element_["useContext"])(IntersectionObserver);
       
 28424   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 28425     if (observer) {
       
 28426       observer.observe(node);
       
 28427       return () => {
       
 28428         observer.unobserve(node);
       
 28429       };
       
 28430     }
       
 28431   }, [observer]);
       
 28432 }
       
 28433 
       
 28434 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/index.js
       
 28435 /**
       
 28436  * External dependencies
       
 28437  */
       
 28438 
       
 28439 /**
       
 28440  * WordPress dependencies
       
 28441  */
       
 28442 
       
 28443 
       
 28444 
       
 28445 
       
 28446 
       
 28447 
       
 28448 /**
       
 28449  * Internal dependencies
       
 28450  */
       
 28451 
       
 28452 
       
 28453 
       
 28454 
       
 28455 
       
 28456 
       
 28457 
       
 28458 
       
 28459 
       
 28460 
       
 28461 
       
 28462 
       
 28463 
       
 28464 
       
 28465 
       
 28466 
       
 28467 
       
 28468 /**
       
 28469  * If the block count exceeds the threshold, we disable the reordering animation
       
 28470  * to avoid laginess.
       
 28471  */
       
 28472 
       
 28473 const BLOCK_ANIMATION_THRESHOLD = 200;
       
 28474 /**
       
 28475  * This hook is used to lightly mark an element as a block element. The element
       
 28476  * should be the outermost element of a block. Call this hook and pass the
       
 28477  * returned props to the element to mark as a block. If you define a ref for the
       
 28478  * element, it is important to pass the ref to this hook, which the hook in turn
       
 28479  * will pass to the component through the props it returns. Optionally, you can
       
 28480  * also pass any other props through this hook, and they will be merged and
       
 28481  * returned.
       
 28482  *
       
 28483  * @param {Object}  props   Optional. Props to pass to the element. Must contain
       
 28484  *                          the ref if one is defined.
       
 28485  * @param {Object}  options Options for internal use only.
       
 28486  * @param {boolean} options.__unstableIsHtml
       
 28487  *
       
 28488  * @return {Object} Props to pass to the element to mark as a block.
       
 28489  */
       
 28490 
       
 28491 function useBlockProps(props = {}, {
       
 28492   __unstableIsHtml
       
 28493 } = {}) {
       
 28494   const {
       
 28495     clientId,
       
 28496     className,
       
 28497     wrapperProps = {},
       
 28498     isAligned
       
 28499   } = Object(external_wp_element_["useContext"])(BlockListBlockContext);
       
 28500   const {
       
 28501     index,
       
 28502     mode,
       
 28503     name,
       
 28504     blockTitle,
       
 28505     isPartOfSelection,
       
 28506     adjustScrolling,
       
 28507     enableAnimation
       
 28508   } = Object(external_wp_data_["useSelect"])(select => {
       
 28509     const {
       
 28510       getBlockRootClientId,
       
 28511       getBlockIndex,
       
 28512       getBlockMode,
       
 28513       getBlockName,
       
 28514       isTyping,
       
 28515       getGlobalBlockCount,
       
 28516       isBlockSelected,
       
 28517       isBlockMultiSelected,
       
 28518       isAncestorMultiSelected,
       
 28519       isFirstMultiSelectedBlock
       
 28520     } = select(store);
       
 28521     const isSelected = isBlockSelected(clientId);
       
 28522     const isPartOfMultiSelection = isBlockMultiSelected(clientId) || isAncestorMultiSelected(clientId);
       
 28523     const blockName = getBlockName(clientId);
       
 28524     const rootClientId = getBlockRootClientId(clientId);
       
 28525     return {
       
 28526       index: getBlockIndex(clientId, rootClientId),
       
 28527       mode: getBlockMode(clientId),
       
 28528       name: blockName,
       
 28529       blockTitle: Object(external_wp_blocks_["getBlockType"])(blockName).title,
       
 28530       isPartOfSelection: isSelected || isPartOfMultiSelection,
       
 28531       adjustScrolling: isSelected || isFirstMultiSelectedBlock(clientId),
       
 28532       enableAnimation: !isTyping() && getGlobalBlockCount() <= BLOCK_ANIMATION_THRESHOLD
       
 28533     };
       
 28534   }, [clientId]); // translators: %s: Type of block (i.e. Text, Image etc)
       
 28535 
       
 28536   const blockLabel = Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Block: %s'), blockTitle);
       
 28537   const htmlSuffix = mode === 'html' && !__unstableIsHtml ? '-visual' : '';
       
 28538   const mergedRefs = Object(external_wp_compose_["useMergeRefs"])([props.ref, useFocusFirstElement(clientId), // Must happen after focus because we check for focus in the block.
       
 28539   useScrollIntoView(clientId), useBlockRefProvider(clientId), useFocusHandler(clientId), useMultiSelection(clientId), useEventHandlers(clientId), useNavModeExit(clientId), useIsHovered(), useIntersectionObserver(), use_moving_animation({
       
 28540     isSelected: isPartOfSelection,
       
 28541     adjustScrolling,
       
 28542     enableAnimation,
       
 28543     triggerAnimationOnChange: index
       
 28544   })]);
       
 28545   return { ...wrapperProps,
       
 28546     ...props,
       
 28547     ref: mergedRefs,
       
 28548     id: `block-${clientId}${htmlSuffix}`,
       
 28549     tabIndex: 0,
       
 28550     role: 'group',
       
 28551     'aria-label': blockLabel,
       
 28552     'data-block': clientId,
       
 28553     'data-type': name,
       
 28554     'data-title': blockTitle,
       
 28555     className: classnames_default()( // The wp-block className is important for editor styles.
       
 28556     classnames_default()('block-editor-block-list__block', {
       
 28557       'wp-block': !isAligned
       
 28558     }), className, props.className, wrapperProps.className, useBlockClassNames(clientId), useBlockDefaultClassName(clientId), useBlockCustomClassName(clientId), useBlockMovingModeClassNames(clientId)),
       
 28559     style: { ...wrapperProps.style,
       
 28560       ...props.style
       
 28561     }
 29847   };
 28562   };
 29848 }
 28563 }
 29849 /**
 28564 /**
 29850  * Prevents default dragging behavior within a block.
 28565  * Call within a save function to get the props for the block wrapper.
 29851  * To do: we must handle this in the future and clean up the drag target.
 28566  *
 29852  * Previously dragging was prevented for multi-selected, but this is no longer
 28567  * @param {Object} props Optional. Props to pass to the element.
 29853  * needed.
 28568  */
 29854  *
 28569 
 29855  * @param {WPSyntheticEvent} event Synthetic drag event.
 28570 useBlockProps.save = external_wp_blocks_["__unstableGetBlockProps"];
 29856  */
 28571 
 29857 
 28572 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block.js
 29858 
 28573 
 29859 function onDragStart(event) {
       
 29860   // Ensure we target block content, not block controls.
       
 29861   if (getBlockClientId(event.target)) {
       
 29862     event.preventDefault();
       
 29863   }
       
 29864 }
       
 29865 
       
 29866 function RootContainer(_ref, ref) {
       
 29867   var children = _ref.children,
       
 29868       className = _ref.className;
       
 29869 
       
 29870   var _useSelect = Object(external_this_wp_data_["useSelect"])(root_container_selector, []),
       
 29871       selectedBlockClientId = _useSelect.selectedBlockClientId,
       
 29872       hasMultiSelection = _useSelect.hasMultiSelection;
       
 29873 
       
 29874   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 29875       selectBlock = _useDispatch.selectBlock;
       
 29876 
       
 29877   var onSelectionStart = useMultiSelection(ref);
       
 29878   /**
       
 29879    * Marks the block as selected when focused and not already selected. This
       
 29880    * specifically handles the case where block does not set focus on its own
       
 29881    * (via `setFocus`), typically if there is no focusable input in the block.
       
 29882    *
       
 29883    * @param {WPSyntheticEvent} event
       
 29884    */
       
 29885 
       
 29886   function onFocus(event) {
       
 29887     if (hasMultiSelection) {
       
 29888       return;
       
 29889     }
       
 29890 
       
 29891     var clientId = getBlockClientId(event.target);
       
 29892 
       
 29893     if (clientId && clientId !== selectedBlockClientId) {
       
 29894       selectBlock(clientId);
       
 29895     }
       
 29896   }
       
 29897 
       
 29898   var _useState = Object(external_this_wp_element_["useState"])({}),
       
 29899       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 29900       blockNodes = _useState2[0],
       
 29901       setBlockNodes = _useState2[1];
       
 29902 
       
 29903   return Object(external_this_wp_element_["createElement"])(InsertionPoint, {
       
 29904     containerRef: ref
       
 29905   }, Object(external_this_wp_element_["createElement"])(BlockNodes.Provider, {
       
 29906     value: blockNodes
       
 29907   }, Object(external_this_wp_element_["createElement"])(WrappedBlockPopover, null), Object(external_this_wp_element_["createElement"])("div", {
       
 29908     ref: ref,
       
 29909     className: classnames_default()(className, 'is-root-container'),
       
 29910     onFocus: onFocus,
       
 29911     onDragStart: onDragStart
       
 29912   }, Object(external_this_wp_element_["createElement"])(SetBlockNodes.Provider, {
       
 29913     value: setBlockNodes
       
 29914   }, Object(external_this_wp_element_["createElement"])(root_container_Context.Provider, {
       
 29915     value: onSelectionStart
       
 29916   }, children)))));
       
 29917 }
       
 29918 
       
 29919 /* harmony default export */ var root_container = (Object(external_this_wp_element_["forwardRef"])(RootContainer));
       
 29920 
       
 29921 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-wrapper-elements.js
       
 29922 /**
       
 29923  * HTML elements that can be used as a block wrapper.
       
 29924  */
       
 29925 var ELEMENTS = ['p', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', 'li', 'figure', 'nav', 'pre', 'header', 'section', 'aside', 'footer', 'main'];
       
 29926 /* harmony default export */ var block_wrapper_elements = (ELEMENTS);
       
 29927 
       
 29928 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block-wrapper.js
       
 29929 
       
 29930 
       
 29931 
       
 29932 
       
 29933 
       
 29934 
       
 29935 function block_wrapper_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; }
       
 29936 
       
 29937 function block_wrapper_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_wrapper_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 { block_wrapper_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 29938 
 28574 
 29939 /**
 28575 /**
 29940  * External dependencies
 28576  * External dependencies
 29941  */
 28577  */
 29942 
 28578 
 29948 
 28584 
 29949 
 28585 
 29950 
 28586 
 29951 
 28587 
 29952 
 28588 
       
 28589 
 29953 /**
 28590 /**
 29954  * Internal dependencies
 28591  * Internal dependencies
 29955  */
 28592  */
 29956 
 28593 
 29957 
 28594 
 29958 
 28595 
 29959 
 28596 
 29960 
 28597 
 29961 
 28598 
 29962 var BlockComponent = Object(external_this_wp_element_["forwardRef"])(function (_ref, wrapper) {
 28599 
 29963   var children = _ref.children,
 28600 
 29964       _ref$tagName = _ref.tagName,
 28601 const BlockListBlockContext = Object(external_wp_element_["createContext"])();
 29965       TagName = _ref$tagName === void 0 ? 'div' : _ref$tagName,
       
 29966       __unstableIsHtml = _ref.__unstableIsHtml,
       
 29967       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["children", "tagName", "__unstableIsHtml"]);
       
 29968 
       
 29969   var onSelectionStart = Object(external_this_wp_element_["useContext"])(root_container_Context);
       
 29970   var setBlockNodes = Object(external_this_wp_element_["useContext"])(SetBlockNodes);
       
 29971 
       
 29972   var _useContext = Object(external_this_wp_element_["useContext"])(BlockListBlockContext),
       
 29973       clientId = _useContext.clientId,
       
 29974       rootClientId = _useContext.rootClientId,
       
 29975       isSelected = _useContext.isSelected,
       
 29976       isFirstMultiSelected = _useContext.isFirstMultiSelected,
       
 29977       isLastMultiSelected = _useContext.isLastMultiSelected,
       
 29978       isPartOfMultiSelection = _useContext.isPartOfMultiSelection,
       
 29979       enableAnimation = _useContext.enableAnimation,
       
 29980       index = _useContext.index,
       
 29981       className = _useContext.className,
       
 29982       name = _useContext.name,
       
 29983       mode = _useContext.mode,
       
 29984       blockTitle = _useContext.blockTitle,
       
 29985       wrapperProps = _useContext.wrapperProps;
       
 29986 
       
 29987   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 29988     var _select = select('core/block-editor'),
       
 29989         getSelectedBlocksInitialCaretPosition = _select.getSelectedBlocksInitialCaretPosition,
       
 29990         _isMultiSelecting = _select.isMultiSelecting,
       
 29991         _isNavigationMode = _select.isNavigationMode;
       
 29992 
       
 29993     return {
       
 29994       shouldFocusFirstElement: isSelected && !_isMultiSelecting() && !_isNavigationMode(),
       
 29995       initialPosition: isSelected ? getSelectedBlocksInitialCaretPosition() : undefined,
       
 29996       isNavigationMode: _isNavigationMode
       
 29997     };
       
 29998   }, [isSelected]),
       
 29999       initialPosition = _useSelect.initialPosition,
       
 30000       shouldFocusFirstElement = _useSelect.shouldFocusFirstElement,
       
 30001       isNavigationMode = _useSelect.isNavigationMode;
       
 30002 
       
 30003   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 30004       insertDefaultBlock = _useDispatch.insertDefaultBlock,
       
 30005       removeBlock = _useDispatch.removeBlock;
       
 30006 
       
 30007   var fallbackRef = Object(external_this_wp_element_["useRef"])();
       
 30008   var isAligned = wrapperProps && !!wrapperProps['data-align'];
       
 30009   wrapper = wrapper || fallbackRef;
       
 30010 
       
 30011   var _useState = Object(external_this_wp_element_["useState"])(false),
       
 30012       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 30013       isHovered = _useState2[0],
       
 30014       setHovered = _useState2[1]; // Provide the selected node, or the first and last nodes of a multi-
       
 30015   // selection, so it can be used to position the contextual block toolbar.
       
 30016   // We only provide what is necessary, and remove the nodes again when they
       
 30017   // are no longer selected.
       
 30018 
       
 30019 
       
 30020   Object(external_this_wp_element_["useEffect"])(function () {
       
 30021     if (isSelected || isFirstMultiSelected || isLastMultiSelected) {
       
 30022       var node = wrapper.current;
       
 30023       setBlockNodes(function (nodes) {
       
 30024         return block_wrapper_objectSpread({}, nodes, Object(defineProperty["a" /* default */])({}, clientId, node));
       
 30025       });
       
 30026       return function () {
       
 30027         setBlockNodes(function (nodes) {
       
 30028           return Object(external_this_lodash_["omit"])(nodes, clientId);
       
 30029         });
       
 30030       };
       
 30031     }
       
 30032   }, [isSelected, isFirstMultiSelected, isLastMultiSelected]); // translators: %s: Type of block (i.e. Text, Image etc)
       
 30033 
       
 30034   var blockLabel = Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Block: %s'), blockTitle); // Handing the focus of the block on creation and update
       
 30035 
       
 30036   /**
       
 30037    * When a block becomes selected, transition focus to an inner tabbable.
       
 30038    */
       
 30039 
       
 30040   var focusTabbable = function focusTabbable() {
       
 30041     // Focus is captured by the wrapper node, so while focus transition
       
 30042     // should only consider tabbables within editable display, since it
       
 30043     // may be the wrapper itself or a side control which triggered the
       
 30044     // focus event, don't unnecessary transition to an inner tabbable.
       
 30045     if (document.activeElement && isInsideRootBlock(wrapper.current, document.activeElement)) {
       
 30046       return;
       
 30047     } // Find all tabbables within node.
       
 30048 
       
 30049 
       
 30050     var textInputs = external_this_wp_dom_["focus"].tabbable.find(wrapper.current).filter(external_this_wp_dom_["isTextField"]) // Exclude inner blocks and block appenders
       
 30051     .filter(function (node) {
       
 30052       return isInsideRootBlock(wrapper.current, node) && !node.closest('.block-list-appender');
       
 30053     }); // If reversed (e.g. merge via backspace), use the last in the set of
       
 30054     // tabbables.
       
 30055 
       
 30056     var isReverse = -1 === initialPosition;
       
 30057     var target = (isReverse ? external_this_lodash_["last"] : external_this_lodash_["first"])(textInputs) || wrapper.current;
       
 30058     Object(external_this_wp_dom_["placeCaretAtHorizontalEdge"])(target, isReverse);
       
 30059   };
       
 30060 
       
 30061   Object(external_this_wp_element_["useEffect"])(function () {
       
 30062     if (shouldFocusFirstElement) {
       
 30063       focusTabbable();
       
 30064     }
       
 30065   }, [shouldFocusFirstElement]); // Block Reordering animation
       
 30066 
       
 30067   use_moving_animation(wrapper, isSelected || isPartOfMultiSelection, isSelected || isFirstMultiSelected, enableAnimation, index);
       
 30068   /**
       
 30069    * Interprets keydown event intent to remove or insert after block if key
       
 30070    * event occurs on wrapper node. This can occur when the block has no text
       
 30071    * fields of its own, particularly after initial insertion, to allow for
       
 30072    * easy deletion and continuous writing flow to add additional content.
       
 30073    *
       
 30074    * @param {KeyboardEvent} event Keydown event.
       
 30075    */
       
 30076 
       
 30077   var onKeyDown = function onKeyDown(event) {
       
 30078     var keyCode = event.keyCode,
       
 30079         target = event.target;
       
 30080 
       
 30081     if (props.onKeyDown) {
       
 30082       props.onKeyDown(event);
       
 30083     }
       
 30084 
       
 30085     if (keyCode !== external_this_wp_keycodes_["ENTER"] && keyCode !== external_this_wp_keycodes_["BACKSPACE"] && keyCode !== external_this_wp_keycodes_["DELETE"]) {
       
 30086       return;
       
 30087     }
       
 30088 
       
 30089     if (target !== wrapper.current || Object(external_this_wp_dom_["isTextField"])(target)) {
       
 30090       return;
       
 30091     }
       
 30092 
       
 30093     event.preventDefault();
       
 30094 
       
 30095     if (keyCode === external_this_wp_keycodes_["ENTER"]) {
       
 30096       insertDefaultBlock({}, rootClientId, index + 1);
       
 30097     } else {
       
 30098       removeBlock(clientId);
       
 30099     }
       
 30100   };
       
 30101 
       
 30102   var onMouseLeave = function onMouseLeave(_ref2) {
       
 30103     var which = _ref2.which,
       
 30104         buttons = _ref2.buttons;
       
 30105 
       
 30106     // The primary button must be pressed to initiate selection. Fall back
       
 30107     // to `which` if the standard `buttons` property is falsy. There are
       
 30108     // cases where Firefox might always set `buttons` to `0`.
       
 30109     // See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
       
 30110     // See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/which
       
 30111     if ((buttons || which) === 1) {
       
 30112       onSelectionStart(clientId);
       
 30113     }
       
 30114   };
       
 30115 
       
 30116   var htmlSuffix = mode === 'html' && !__unstableIsHtml ? '-visual' : '';
       
 30117   var blockElementId = "block-".concat(clientId).concat(htmlSuffix);
       
 30118 
       
 30119   function onMouseOver(event) {
       
 30120     if (event.defaultPrevented) {
       
 30121       return;
       
 30122     }
       
 30123 
       
 30124     event.preventDefault();
       
 30125 
       
 30126     if (isHovered) {
       
 30127       return;
       
 30128     }
       
 30129 
       
 30130     setHovered(true);
       
 30131   }
       
 30132 
       
 30133   function onMouseOut(event) {
       
 30134     if (event.defaultPrevented) {
       
 30135       return;
       
 30136     }
       
 30137 
       
 30138     event.preventDefault();
       
 30139 
       
 30140     if (!isHovered) {
       
 30141       return;
       
 30142     }
       
 30143 
       
 30144     setHovered(false);
       
 30145   }
       
 30146 
       
 30147   return (// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
       
 30148     Object(external_this_wp_element_["createElement"])(TagName // Overrideable props.
       
 30149     , Object(esm_extends["a" /* default */])({
       
 30150       "aria-label": blockLabel,
       
 30151       role: "group"
       
 30152     }, Object(external_this_lodash_["omit"])(wrapperProps, ['data-align']), props, {
       
 30153       id: blockElementId,
       
 30154       ref: wrapper,
       
 30155       className: classnames_default()(className, props.className, wrapperProps && wrapperProps.className, {
       
 30156         'is-hovered': isHovered,
       
 30157         'wp-block': !isAligned
       
 30158       }),
       
 30159       "data-block": clientId,
       
 30160       "data-type": name,
       
 30161       "data-title": blockTitle // Only allow shortcuts when a blocks is selected.
       
 30162       ,
       
 30163       onKeyDown: isSelected ? onKeyDown : undefined // Only allow selection to be started from a selected block.
       
 30164       ,
       
 30165       onMouseLeave: isSelected ? onMouseLeave : undefined // No need to have these listeners for hover class in edit mode.
       
 30166       ,
       
 30167       onMouseOver: isNavigationMode ? onMouseOver : undefined,
       
 30168       onMouseOut: isNavigationMode ? onMouseOut : undefined,
       
 30169       tabIndex: "0",
       
 30170       style: block_wrapper_objectSpread({}, wrapperProps ? wrapperProps.style : {}, {}, props.style || {})
       
 30171     }), children)
       
 30172   );
       
 30173 });
       
 30174 var ExtendedBlockComponent = block_wrapper_elements.reduce(function (acc, element) {
       
 30175   acc[element] = Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
       
 30176     return Object(external_this_wp_element_["createElement"])(BlockComponent, Object(esm_extends["a" /* default */])({}, props, {
       
 30177       ref: ref,
       
 30178       tagName: element
       
 30179     }));
       
 30180   });
       
 30181   return acc;
       
 30182 }, BlockComponent);
       
 30183 var Block = ExtendedBlockComponent;
       
 30184 
       
 30185 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/block.js
       
 30186 
       
 30187 
       
 30188 
       
 30189 
       
 30190 
       
 30191 function block_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; }
       
 30192 
       
 30193 function block_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_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 { block_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 30194 
       
 30195 /**
       
 30196  * External dependencies
       
 30197  */
       
 30198 
       
 30199 /**
       
 30200  * WordPress dependencies
       
 30201  */
       
 30202 
       
 30203 
       
 30204 
       
 30205 
       
 30206 
       
 30207 
       
 30208 
       
 30209 /**
       
 30210  * Internal dependencies
       
 30211  */
       
 30212 
       
 30213 
       
 30214 
       
 30215 
       
 30216 
       
 30217 
       
 30218 
       
 30219 var BlockListBlockContext = Object(external_this_wp_element_["createContext"])();
       
 30220 /**
 28602 /**
 30221  * Merges wrapper props with special handling for classNames and styles.
 28603  * Merges wrapper props with special handling for classNames and styles.
 30222  *
 28604  *
 30223  * @param {Object} propsA
 28605  * @param {Object} propsA
 30224  * @param {Object} propsB
 28606  * @param {Object} propsB
 30225  *
 28607  *
 30226  * @return {Object} Merged props.
 28608  * @return {Object} Merged props.
 30227  */
 28609  */
 30228 
 28610 
 30229 function mergeWrapperProps(propsA, propsB) {
 28611 function mergeWrapperProps(propsA, propsB) {
 30230   var newProps = block_objectSpread({}, propsA, {}, propsB);
 28612   const newProps = { ...propsA,
       
 28613     ...propsB
       
 28614   };
 30231 
 28615 
 30232   if (propsA && propsB && propsA.className && propsB.className) {
 28616   if (propsA && propsB && propsA.className && propsB.className) {
 30233     newProps.className = classnames_default()(propsA.className, propsB.className);
 28617     newProps.className = classnames_default()(propsA.className, propsB.className);
 30234   }
 28618   }
 30235 
 28619 
 30236   if (propsA && propsB && propsA.style && propsB.style) {
 28620   if (propsA && propsB && propsA.style && propsB.style) {
 30237     newProps.style = block_objectSpread({}, propsA.style, {}, propsB.style);
 28621     newProps.style = { ...propsA.style,
       
 28622       ...propsB.style
       
 28623     };
 30238   }
 28624   }
 30239 
 28625 
 30240   return newProps;
 28626   return newProps;
 30241 }
 28627 }
 30242 
 28628 
 30243 function block_BlockListBlock(_ref) {
 28629 function Block({
 30244   var mode = _ref.mode,
 28630   children,
 30245       isFocusMode = _ref.isFocusMode,
 28631   isHtml,
 30246       isLocked = _ref.isLocked,
 28632   ...props
 30247       clientId = _ref.clientId,
 28633 }) {
 30248       rootClientId = _ref.rootClientId,
 28634   return Object(external_wp_element_["createElement"])("div", useBlockProps(props, {
 30249       isSelected = _ref.isSelected,
 28635     __unstableIsHtml: isHtml
 30250       isMultiSelected = _ref.isMultiSelected,
 28636   }), children);
 30251       isPartOfMultiSelection = _ref.isPartOfMultiSelection,
 28637 }
 30252       isFirstMultiSelected = _ref.isFirstMultiSelected,
 28638 
 30253       isLastMultiSelected = _ref.isLastMultiSelected,
 28639 function block_BlockListBlock({
 30254       isTypingWithinBlock = _ref.isTypingWithinBlock,
 28640   mode,
 30255       isAncestorOfSelectedBlock = _ref.isAncestorOfSelectedBlock,
 28641   isLocked,
 30256       isSelectionEnabled = _ref.isSelectionEnabled,
 28642   clientId,
 30257       className = _ref.className,
 28643   isSelected,
 30258       name = _ref.name,
 28644   isSelectionEnabled,
 30259       isValid = _ref.isValid,
 28645   className,
 30260       attributes = _ref.attributes,
 28646   name,
 30261       wrapperProps = _ref.wrapperProps,
 28647   isValid,
 30262       setAttributes = _ref.setAttributes,
 28648   attributes,
 30263       onReplace = _ref.onReplace,
 28649   wrapperProps,
 30264       onInsertBlocksAfter = _ref.onInsertBlocksAfter,
 28650   setAttributes,
 30265       onMerge = _ref.onMerge,
 28651   onReplace,
 30266       toggleSelection = _ref.toggleSelection,
 28652   onInsertBlocksAfter,
 30267       index = _ref.index,
 28653   onMerge,
 30268       enableAnimation = _ref.enableAnimation;
 28654   toggleSelection
 30269 
 28655 }) {
 30270   // In addition to withSelect, we should favor using useSelect in this
 28656   const {
 30271   // component going forward to avoid leaking new props to the public API
 28657     removeBlock
 30272   // (editor.BlockListBlock filter)
 28658   } = Object(external_wp_data_["useDispatch"])(store);
 30273   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 28659   const onRemove = Object(external_wp_element_["useCallback"])(() => removeBlock(clientId), [clientId]); // We wrap the BlockEdit component in a div that hides it when editing in
 30274     var _select = select('core/block-editor'),
       
 30275         isDraggingBlocks = _select.isDraggingBlocks,
       
 30276         isBlockHighlighted = _select.isBlockHighlighted;
       
 30277 
       
 30278     return {
       
 30279       isDragging: isDraggingBlocks(),
       
 30280       isHighlighted: isBlockHighlighted(clientId)
       
 30281     };
       
 30282   }, [clientId]),
       
 30283       isDragging = _useSelect.isDragging,
       
 30284       isHighlighted = _useSelect.isHighlighted;
       
 30285 
       
 30286   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
       
 30287       removeBlock = _useDispatch.removeBlock;
       
 30288 
       
 30289   var onRemove = Object(external_this_wp_element_["useCallback"])(function () {
       
 30290     return removeBlock(clientId);
       
 30291   }, [clientId]); // Handling the error state
       
 30292 
       
 30293   var _useState = Object(external_this_wp_element_["useState"])(false),
       
 30294       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 30295       hasError = _useState2[0],
       
 30296       setErrorState = _useState2[1];
       
 30297 
       
 30298   var onBlockError = function onBlockError() {
       
 30299     return setErrorState(true);
       
 30300   };
       
 30301 
       
 30302   var blockType = Object(external_this_wp_blocks_["getBlockType"])(name);
       
 30303   var lightBlockWrapper = Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'lightBlockWrapper', false);
       
 30304   var isUnregisteredBlock = name === Object(external_this_wp_blocks_["getUnregisteredTypeHandlerName"])(); // Determine whether the block has props to apply to the wrapper.
       
 30305 
       
 30306   if (blockType.getEditWrapperProps) {
       
 30307     wrapperProps = mergeWrapperProps(wrapperProps, blockType.getEditWrapperProps(attributes));
       
 30308   }
       
 30309 
       
 30310   var generatedClassName = lightBlockWrapper && Object(external_this_wp_blocks_["hasBlockSupport"])(blockType, 'className', true) ? Object(external_this_wp_blocks_["getBlockDefaultClassName"])(name) : null;
       
 30311   var customClassName = lightBlockWrapper ? attributes.className : null;
       
 30312   var isAligned = wrapperProps && !!wrapperProps['data-align']; // The wp-block className is important for editor styles.
       
 30313   // Generate the wrapper class names handling the different states of the
       
 30314   // block.
       
 30315 
       
 30316   var wrapperClassName = classnames_default()(generatedClassName, customClassName, 'block-editor-block-list__block', {
       
 30317     'wp-block': !isAligned,
       
 30318     'has-warning': !isValid || !!hasError || isUnregisteredBlock,
       
 30319     'is-selected': isSelected,
       
 30320     'is-highlighted': isHighlighted,
       
 30321     'is-multi-selected': isMultiSelected,
       
 30322     'is-reusable': Object(external_this_wp_blocks_["isReusableBlock"])(blockType),
       
 30323     'is-dragging': isDragging && (isSelected || isPartOfMultiSelection),
       
 30324     'is-typing': isTypingWithinBlock,
       
 30325     'is-focused': isFocusMode && (isSelected || isAncestorOfSelectedBlock),
       
 30326     'is-focus-mode': isFocusMode,
       
 30327     'has-child-selected': isAncestorOfSelectedBlock
       
 30328   }, className); // We wrap the BlockEdit component in a div that hides it when editing in
       
 30329   // HTML mode. This allows us to render all of the ancillary pieces
 28660   // HTML mode. This allows us to render all of the ancillary pieces
 30330   // (InspectorControls, etc.) which are inside `BlockEdit` but not
 28661   // (InspectorControls, etc.) which are inside `BlockEdit` but not
 30331   // `BlockHTML`, even in HTML mode.
 28662   // `BlockHTML`, even in HTML mode.
 30332 
 28663 
 30333   var blockEdit = Object(external_this_wp_element_["createElement"])(block_edit_BlockEdit, {
 28664   let blockEdit = Object(external_wp_element_["createElement"])(block_edit_BlockEdit, {
 30334     name: name,
 28665     name: name,
 30335     isSelected: isSelected,
 28666     isSelected: isSelected,
 30336     attributes: attributes,
 28667     attributes: attributes,
 30337     setAttributes: setAttributes,
 28668     setAttributes: setAttributes,
 30338     insertBlocksAfter: isLocked ? undefined : onInsertBlocksAfter,
 28669     insertBlocksAfter: isLocked ? undefined : onInsertBlocksAfter,
 30340     onRemove: isLocked ? undefined : onRemove,
 28671     onRemove: isLocked ? undefined : onRemove,
 30341     mergeBlocks: isLocked ? undefined : onMerge,
 28672     mergeBlocks: isLocked ? undefined : onMerge,
 30342     clientId: clientId,
 28673     clientId: clientId,
 30343     isSelectionEnabled: isSelectionEnabled,
 28674     isSelectionEnabled: isSelectionEnabled,
 30344     toggleSelection: toggleSelection
 28675     toggleSelection: toggleSelection
 30345   }); // For aligned blocks, provide a wrapper element so the block can be
 28676   });
       
 28677   const blockType = Object(external_wp_blocks_["getBlockType"])(name);
       
 28678   const lightBlockWrapper = blockType.apiVersion > 1 || Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'lightBlockWrapper', false); // Determine whether the block has props to apply to the wrapper.
       
 28679 
       
 28680   if (blockType.getEditWrapperProps) {
       
 28681     wrapperProps = mergeWrapperProps(wrapperProps, blockType.getEditWrapperProps(attributes));
       
 28682   }
       
 28683 
       
 28684   const isAligned = wrapperProps && !!wrapperProps['data-align']; // For aligned blocks, provide a wrapper element so the block can be
 30346   // positioned relative to the block column.
 28685   // positioned relative to the block column.
 30347 
 28686 
 30348   if (isAligned) {
 28687   if (isAligned) {
 30349     var alignmentWrapperProps = {
 28688     blockEdit = Object(external_wp_element_["createElement"])("div", {
 30350       'data-align': wrapperProps['data-align']
 28689       className: "wp-block",
 30351     };
 28690       "data-align": wrapperProps['data-align']
 30352     blockEdit = Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
 28691     }, blockEdit);
 30353       className: "wp-block"
 28692   }
 30354     }, alignmentWrapperProps), blockEdit);
 28693 
 30355   }
 28694   let block;
 30356 
       
 30357   var value = {
       
 30358     clientId: clientId,
       
 30359     rootClientId: rootClientId,
       
 30360     isSelected: isSelected,
       
 30361     isFirstMultiSelected: isFirstMultiSelected,
       
 30362     isLastMultiSelected: isLastMultiSelected,
       
 30363     isPartOfMultiSelection: isPartOfMultiSelection,
       
 30364     enableAnimation: enableAnimation,
       
 30365     index: index,
       
 30366     className: wrapperClassName,
       
 30367     isLocked: isLocked,
       
 30368     name: name,
       
 30369     mode: mode,
       
 30370     blockTitle: blockType.title,
       
 30371     wrapperProps: wrapperProps
       
 30372   };
       
 30373   var memoizedValue = Object(external_this_wp_element_["useMemo"])(function () {
       
 30374     return value;
       
 30375   }, Object.values(value));
       
 30376   var block;
       
 30377 
 28695 
 30378   if (!isValid) {
 28696   if (!isValid) {
 30379     block = Object(external_this_wp_element_["createElement"])(Block.div, null, Object(external_this_wp_element_["createElement"])(block_invalid_warning, {
 28697     const saveContent = Object(external_wp_blocks_["getSaveContent"])(blockType, attributes);
       
 28698     block = Object(external_wp_element_["createElement"])(Block, {
       
 28699       className: "has-warning"
       
 28700     }, Object(external_wp_element_["createElement"])(block_invalid_warning, {
 30380       clientId: clientId
 28701       clientId: clientId
 30381     }), Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_blocks_["getSaveElement"])(blockType, attributes)));
 28702     }), Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, Object(external_wp_dom_["safeHTML"])(saveContent)));
 30382   } else if (mode === 'html') {
 28703   } else if (mode === 'html') {
 30383     // Render blockEdit so the inspector controls don't disappear.
 28704     // Render blockEdit so the inspector controls don't disappear.
 30384     // See #8969.
 28705     // See #8969.
 30385     block = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
 28706     block = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
 30386       style: {
 28707       style: {
 30387         display: 'none'
 28708         display: 'none'
 30388       }
 28709       }
 30389     }, blockEdit), Object(external_this_wp_element_["createElement"])(Block.div, {
 28710     }, blockEdit), Object(external_wp_element_["createElement"])(Block, {
 30390       __unstableIsHtml: true
 28711       isHtml: true
 30391     }, Object(external_this_wp_element_["createElement"])(block_html, {
 28712     }, Object(external_wp_element_["createElement"])(block_html, {
 30392       clientId: clientId
 28713       clientId: clientId
 30393     })));
 28714     })));
 30394   } else if (lightBlockWrapper) {
 28715   } else if (lightBlockWrapper) {
 30395     block = blockEdit;
 28716     block = blockEdit;
 30396   } else {
 28717   } else {
 30397     block = Object(external_this_wp_element_["createElement"])(Block.div, wrapperProps, blockEdit);
 28718     block = Object(external_wp_element_["createElement"])(Block, wrapperProps, blockEdit);
 30398   }
 28719   }
 30399 
 28720 
 30400   return Object(external_this_wp_element_["createElement"])(BlockListBlockContext.Provider, {
 28721   const value = {
       
 28722     clientId,
       
 28723     className,
       
 28724     wrapperProps: Object(external_lodash_["omit"])(wrapperProps, ['data-align']),
       
 28725     isAligned
       
 28726   };
       
 28727   const memoizedValue = Object(external_wp_element_["useMemo"])(() => value, Object.values(value));
       
 28728   return Object(external_wp_element_["createElement"])(BlockListBlockContext.Provider, {
 30401     value: memoizedValue
 28729     value: memoizedValue
 30402   }, Object(external_this_wp_element_["createElement"])(block_crash_boundary, {
 28730   }, Object(external_wp_element_["createElement"])(block_crash_boundary, {
 30403     onError: onBlockError
 28731     fallback: Object(external_wp_element_["createElement"])(Block, {
 30404   }, block), !!hasError && Object(external_this_wp_element_["createElement"])(Block.div, null, Object(external_this_wp_element_["createElement"])(block_crash_warning, null)));
 28732       className: "has-warning"
 30405 }
 28733     }, Object(external_wp_element_["createElement"])(block_crash_warning, null))
 30406 
 28734   }, block));
 30407 var applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (select, _ref2) {
 28735 }
 30408   var clientId = _ref2.clientId,
 28736 
 30409       rootClientId = _ref2.rootClientId,
 28737 const applyWithSelect = Object(external_wp_data_["withSelect"])((select, {
 30410       isLargeViewport = _ref2.isLargeViewport;
 28738   clientId,
 30411 
 28739   rootClientId
 30412   var _select2 = select('core/block-editor'),
 28740 }) => {
 30413       isBlockSelected = _select2.isBlockSelected,
 28741   const {
 30414       isAncestorMultiSelected = _select2.isAncestorMultiSelected,
 28742     isBlockSelected,
 30415       isBlockMultiSelected = _select2.isBlockMultiSelected,
 28743     getBlockMode,
 30416       isFirstMultiSelectedBlock = _select2.isFirstMultiSelectedBlock,
 28744     isSelectionEnabled,
 30417       getLastMultiSelectedBlockClientId = _select2.getLastMultiSelectedBlockClientId,
 28745     getTemplateLock,
 30418       isTyping = _select2.isTyping,
 28746     __unstableGetBlockWithoutInnerBlocks
 30419       getBlockMode = _select2.getBlockMode,
 28747   } = select(store);
 30420       isSelectionEnabled = _select2.isSelectionEnabled,
 28748 
 30421       getSettings = _select2.getSettings,
 28749   const block = __unstableGetBlockWithoutInnerBlocks(clientId);
 30422       hasSelectedInnerBlock = _select2.hasSelectedInnerBlock,
 28750 
 30423       getTemplateLock = _select2.getTemplateLock,
 28751   const isSelected = isBlockSelected(clientId);
 30424       __unstableGetBlockWithoutInnerBlocks = _select2.__unstableGetBlockWithoutInnerBlocks,
 28752   const templateLock = getTemplateLock(rootClientId); // The fallback to `{}` is a temporary fix.
 30425       getMultiSelectedBlockClientIds = _select2.getMultiSelectedBlockClientIds;
       
 30426 
       
 30427   var block = __unstableGetBlockWithoutInnerBlocks(clientId);
       
 30428 
       
 30429   var isSelected = isBlockSelected(clientId);
       
 30430 
       
 30431   var _getSettings = getSettings(),
       
 30432       focusMode = _getSettings.focusMode,
       
 30433       isRTL = _getSettings.isRTL;
       
 30434 
       
 30435   var templateLock = getTemplateLock(rootClientId);
       
 30436   var checkDeep = true; // "ancestor" is the more appropriate label due to "deep" check
       
 30437 
       
 30438   var isAncestorOfSelectedBlock = hasSelectedInnerBlock(clientId, checkDeep); // The fallback to `{}` is a temporary fix.
       
 30439   // This function should never be called when a block is not present in
 28753   // This function should never be called when a block is not present in
 30440   // the state. It happens now because the order in withSelect rendering
 28754   // the state. It happens now because the order in withSelect rendering
 30441   // is not correct.
 28755   // is not correct.
 30442 
 28756 
 30443   var _ref3 = block || {},
 28757   const {
 30444       name = _ref3.name,
 28758     name,
 30445       attributes = _ref3.attributes,
 28759     attributes,
 30446       isValid = _ref3.isValid;
 28760     isValid
 30447 
 28761   } = block || {}; // Do not add new properties here, use `useSelect` instead to avoid
 30448   var isFirstMultiSelected = isFirstMultiSelectedBlock(clientId); // Do not add new properties here, use `useSelect` instead to avoid
       
 30449   // leaking new props to the public API (editor.BlockListBlock filter).
 28762   // leaking new props to the public API (editor.BlockListBlock filter).
 30450 
 28763 
 30451   return {
 28764   return {
 30452     isMultiSelected: isBlockMultiSelected(clientId),
       
 30453     isPartOfMultiSelection: isBlockMultiSelected(clientId) || isAncestorMultiSelected(clientId),
       
 30454     isFirstMultiSelected: isFirstMultiSelected,
       
 30455     isLastMultiSelected: getLastMultiSelectedBlockClientId() === clientId,
       
 30456     multiSelectedClientIds: isFirstMultiSelected ? getMultiSelectedBlockClientIds() : undefined,
       
 30457     // We only care about this prop when the block is selected
       
 30458     // Thus to avoid unnecessary rerenders we avoid updating the prop if
       
 30459     // the block is not selected.
       
 30460     isTypingWithinBlock: (isSelected || isAncestorOfSelectedBlock) && isTyping(),
       
 30461     mode: getBlockMode(clientId),
 28765     mode: getBlockMode(clientId),
 30462     isSelectionEnabled: isSelectionEnabled(),
 28766     isSelectionEnabled: isSelectionEnabled(),
 30463     isLocked: !!templateLock,
 28767     isLocked: !!templateLock,
 30464     isFocusMode: focusMode && isLargeViewport,
       
 30465     isRTL: isRTL,
       
 30466     // Users of the editor.BlockListBlock filter used to be able to
 28768     // Users of the editor.BlockListBlock filter used to be able to
 30467     // access the block prop.
 28769     // access the block prop.
 30468     // Ideally these blocks would rely on the clientId prop only.
 28770     // Ideally these blocks would rely on the clientId prop only.
 30469     // This is kept for backward compatibility reasons.
 28771     // This is kept for backward compatibility reasons.
 30470     block: block,
 28772     block,
 30471     name: name,
 28773     name,
 30472     attributes: attributes,
 28774     attributes,
 30473     isValid: isValid,
 28775     isValid,
 30474     isSelected: isSelected,
 28776     isSelected
 30475     isAncestorOfSelectedBlock: isAncestorOfSelectedBlock
       
 30476   };
 28777   };
 30477 });
 28778 });
 30478 var applyWithDispatch = Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps, _ref4) {
 28779 const applyWithDispatch = Object(external_wp_data_["withDispatch"])((dispatch, ownProps, {
 30479   var select = _ref4.select;
 28780   select
 30480 
 28781 }) => {
 30481   var _dispatch = dispatch('core/block-editor'),
 28782   const {
 30482       updateBlockAttributes = _dispatch.updateBlockAttributes,
 28783     updateBlockAttributes,
 30483       insertBlocks = _dispatch.insertBlocks,
 28784     insertBlocks,
 30484       mergeBlocks = _dispatch.mergeBlocks,
 28785     mergeBlocks,
 30485       replaceBlocks = _dispatch.replaceBlocks,
 28786     replaceBlocks,
 30486       _toggleSelection = _dispatch.toggleSelection,
 28787     toggleSelection,
 30487       __unstableMarkLastChangeAsPersistent = _dispatch.__unstableMarkLastChangeAsPersistent; // Do not add new properties here, use `useDispatch` instead to avoid
 28788     __unstableMarkLastChangeAsPersistent
       
 28789   } = dispatch(store); // Do not add new properties here, use `useDispatch` instead to avoid
 30488   // leaking new props to the public API (editor.BlockListBlock filter).
 28790   // leaking new props to the public API (editor.BlockListBlock filter).
 30489 
 28791 
 30490 
       
 30491   return {
 28792   return {
 30492     setAttributes: function setAttributes(newAttributes) {
 28793     setAttributes(newAttributes) {
 30493       var clientId = ownProps.clientId,
 28794       const {
 30494           isFirstMultiSelected = ownProps.isFirstMultiSelected,
 28795         getMultiSelectedBlockClientIds
 30495           multiSelectedClientIds = ownProps.multiSelectedClientIds;
 28796       } = select(store);
 30496       var clientIds = isFirstMultiSelected ? multiSelectedClientIds : [clientId];
 28797       const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds();
       
 28798       const {
       
 28799         clientId
       
 28800       } = ownProps;
       
 28801       const clientIds = multiSelectedBlockClientIds.length ? multiSelectedBlockClientIds : [clientId];
 30497       updateBlockAttributes(clientIds, newAttributes);
 28802       updateBlockAttributes(clientIds, newAttributes);
 30498     },
 28803     },
 30499     onInsertBlocks: function onInsertBlocks(blocks, index) {
 28804 
 30500       var rootClientId = ownProps.rootClientId;
 28805     onInsertBlocks(blocks, index) {
       
 28806       const {
       
 28807         rootClientId
       
 28808       } = ownProps;
 30501       insertBlocks(blocks, index, rootClientId);
 28809       insertBlocks(blocks, index, rootClientId);
 30502     },
 28810     },
 30503     onInsertBlocksAfter: function onInsertBlocksAfter(blocks) {
 28811 
 30504       var clientId = ownProps.clientId,
 28812     onInsertBlocksAfter(blocks) {
 30505           rootClientId = ownProps.rootClientId;
 28813       const {
 30506 
 28814         clientId,
 30507       var _select3 = select('core/block-editor'),
 28815         rootClientId
 30508           getBlockIndex = _select3.getBlockIndex;
 28816       } = ownProps;
 30509 
 28817       const {
 30510       var index = getBlockIndex(clientId, rootClientId);
 28818         getBlockIndex
       
 28819       } = select(store);
       
 28820       const index = getBlockIndex(clientId, rootClientId);
 30511       insertBlocks(blocks, index + 1, rootClientId);
 28821       insertBlocks(blocks, index + 1, rootClientId);
 30512     },
 28822     },
 30513     onMerge: function onMerge(forward) {
 28823 
 30514       var clientId = ownProps.clientId;
 28824     onMerge(forward) {
 30515 
 28825       const {
 30516       var _select4 = select('core/block-editor'),
 28826         clientId
 30517           getPreviousBlockClientId = _select4.getPreviousBlockClientId,
 28827       } = ownProps;
 30518           getNextBlockClientId = _select4.getNextBlockClientId;
 28828       const {
       
 28829         getPreviousBlockClientId,
       
 28830         getNextBlockClientId
       
 28831       } = select(store);
 30519 
 28832 
 30520       if (forward) {
 28833       if (forward) {
 30521         var nextBlockClientId = getNextBlockClientId(clientId);
 28834         const nextBlockClientId = getNextBlockClientId(clientId);
 30522 
 28835 
 30523         if (nextBlockClientId) {
 28836         if (nextBlockClientId) {
 30524           mergeBlocks(clientId, nextBlockClientId);
 28837           mergeBlocks(clientId, nextBlockClientId);
 30525         }
 28838         }
 30526       } else {
 28839       } else {
 30527         var previousBlockClientId = getPreviousBlockClientId(clientId);
 28840         const previousBlockClientId = getPreviousBlockClientId(clientId);
 30528 
 28841 
 30529         if (previousBlockClientId) {
 28842         if (previousBlockClientId) {
 30530           mergeBlocks(previousBlockClientId, clientId);
 28843           mergeBlocks(previousBlockClientId, clientId);
 30531         }
 28844         }
 30532       }
 28845       }
 30533     },
 28846     },
 30534     onReplace: function onReplace(blocks, indexToSelect, initialPosition) {
 28847 
 30535       if (blocks.length && !Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(blocks[blocks.length - 1])) {
 28848     onReplace(blocks, indexToSelect, initialPosition) {
       
 28849       if (blocks.length && !Object(external_wp_blocks_["isUnmodifiedDefaultBlock"])(blocks[blocks.length - 1])) {
 30536         __unstableMarkLastChangeAsPersistent();
 28850         __unstableMarkLastChangeAsPersistent();
 30537       }
 28851       }
 30538 
 28852 
 30539       replaceBlocks([ownProps.clientId], blocks, indexToSelect, initialPosition);
 28853       replaceBlocks([ownProps.clientId], blocks, indexToSelect, initialPosition);
 30540     },
 28854     },
 30541     toggleSelection: function toggleSelection(selectionEnabled) {
 28855 
 30542       _toggleSelection(selectionEnabled);
 28856     toggleSelection(selectionEnabled) {
 30543     }
 28857       toggleSelection(selectionEnabled);
       
 28858     }
       
 28859 
 30544   };
 28860   };
 30545 });
 28861 });
 30546 /* harmony default export */ var block_list_block = (Object(external_this_wp_compose_["compose"])(external_this_wp_compose_["pure"], Object(external_this_wp_viewport_["withViewportMatch"])({
 28862 /* harmony default export */ var block_list_block = (Object(external_wp_compose_["compose"])(external_wp_compose_["pure"], applyWithSelect, applyWithDispatch, // block is sometimes not mounted at the right time, causing it be undefined
 30547   isLargeViewport: 'medium'
       
 30548 }), applyWithSelect, applyWithDispatch, // block is sometimes not mounted at the right time, causing it be undefined
       
 30549 // see issue for more info
 28863 // see issue for more info
 30550 // https://github.com/WordPress/gutenberg/issues/17013
 28864 // https://github.com/WordPress/gutenberg/issues/17013
 30551 Object(external_this_wp_compose_["ifCondition"])(function (_ref5) {
 28865 Object(external_wp_compose_["ifCondition"])(({
 30552   var block = _ref5.block;
 28866   block
 30553   return !!block;
 28867 }) => !!block), Object(external_wp_components_["withFilters"])('editor.BlockListBlock'))(block_BlockListBlock));
 30554 }), Object(external_this_wp_components_["withFilters"])('editor.BlockListBlock'))(block_BlockListBlock));
       
 30555 
 28868 
 30556 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/utils.js
 28869 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/utils.js
 30557 /**
 28870 /**
       
 28871  * External dependencies
       
 28872  */
       
 28873 
       
 28874 /**
 30558  * WordPress dependencies
 28875  * WordPress dependencies
 30559  */
 28876  */
 30560 
 28877 
 30561 var utils_getBlockPositionDescription = function getBlockPositionDescription(position, siblingCount, level) {
 28878 
 30562   return Object(external_this_wp_i18n_["sprintf"])(
 28879 const getBlockPositionDescription = (position, siblingCount, level) => Object(external_wp_i18n_["sprintf"])(
 30563   /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
 28880 /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
 30564   Object(external_this_wp_i18n_["__"])('Block %1$d of %2$d, Level %3$d'), position, siblingCount, level);
 28881 Object(external_wp_i18n_["__"])('Block %1$d of %2$d, Level %3$d'), position, siblingCount, level);
 30565 };
 28882 /**
       
 28883  * Returns true if the client ID occurs within the block selection or multi-selection,
       
 28884  * or false otherwise.
       
 28885  *
       
 28886  * @param {string}          clientId               Block client ID.
       
 28887  * @param {string|string[]} selectedBlockClientIds Selected block client ID, or an array of multi-selected blocks client IDs.
       
 28888  *
       
 28889  * @return {boolean} Whether the block is in multi-selection set.
       
 28890  */
       
 28891 
       
 28892 const isClientIdSelected = (clientId, selectedBlockClientIds) => Object(external_lodash_["isArray"])(selectedBlockClientIds) && selectedBlockClientIds.length ? selectedBlockClientIds.indexOf(clientId) !== -1 : selectedBlockClientIds === clientId;
 30566 
 28893 
 30567 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/block-select-button.js
 28894 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/block-select-button.js
 30568 
 28895 
 30569 
 28896 
 30570 /**
 28897 /**
 30577 
 28904 
 30578 
 28905 
 30579 
 28906 
 30580 
 28907 
 30581 
 28908 
 30582 
       
 30583 /**
 28909 /**
 30584  * Internal dependencies
 28910  * Internal dependencies
 30585  */
 28911  */
 30586 
 28912 
 30587 
 28913 
 30588 
 28914 
 30589 
 28915 
 30590 function BlockNavigationBlockSelectButton(_ref, ref) {
 28916 
 30591   var className = _ref.className,
 28917 
 30592       block = _ref.block,
 28918 function BlockNavigationBlockSelectButton({
 30593       isSelected = _ref.isSelected,
 28919   className,
 30594       onClick = _ref.onClick,
 28920   block: {
 30595       position = _ref.position,
 28921     clientId
 30596       siblingBlockCount = _ref.siblingBlockCount,
 28922   },
 30597       level = _ref.level,
 28923   isSelected,
 30598       tabIndex = _ref.tabIndex,
 28924   onClick,
 30599       onFocus = _ref.onFocus;
 28925   position,
 30600   var name = block.name,
 28926   siblingBlockCount,
 30601       attributes = block.attributes;
 28927   level,
 30602   var blockType = Object(external_this_wp_blocks_["getBlockType"])(name);
 28928   tabIndex,
 30603   var blockDisplayName = Object(external_this_wp_blocks_["__experimentalGetBlockLabel"])(blockType, attributes);
 28929   onFocus,
 30604   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(BlockNavigationBlockSelectButton);
 28930   onDragStart,
 30605   var descriptionId = "block-navigation-block-select-button__".concat(instanceId);
 28931   onDragEnd,
 30606   var blockPositionDescription = utils_getBlockPositionDescription(position, siblingBlockCount, level);
 28932   draggable
 30607   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 28933 }, ref) {
       
 28934   const blockInformation = useBlockDisplayInformation(clientId);
       
 28935   const instanceId = Object(external_wp_compose_["useInstanceId"])(BlockNavigationBlockSelectButton);
       
 28936   const descriptionId = `block-navigation-block-select-button__${instanceId}`;
       
 28937   const blockPositionDescription = getBlockPositionDescription(position, siblingBlockCount, level);
       
 28938   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 30608     className: classnames_default()('block-editor-block-navigation-block-select-button', className),
 28939     className: classnames_default()('block-editor-block-navigation-block-select-button', className),
 30609     onClick: onClick,
 28940     onClick: onClick,
 30610     "aria-describedby": descriptionId,
 28941     "aria-describedby": descriptionId,
 30611     ref: ref,
 28942     ref: ref,
 30612     tabIndex: tabIndex,
 28943     tabIndex: tabIndex,
 30613     onFocus: onFocus
 28944     onFocus: onFocus,
 30614   }, Object(external_this_wp_element_["createElement"])(BlockIcon, {
 28945     onDragStart: onDragStart,
 30615     icon: blockType.icon,
 28946     onDragEnd: onDragEnd,
       
 28947     draggable: draggable
       
 28948   }, Object(external_wp_element_["createElement"])(BlockIcon, {
       
 28949     icon: blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.icon,
 30616     showColors: true
 28950     showColors: true
 30617   }), blockDisplayName, isSelected && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], null, Object(external_this_wp_i18n_["__"])('(selected block)'))), Object(external_this_wp_element_["createElement"])("div", {
 28951   }), Object(external_wp_element_["createElement"])(BlockTitle, {
       
 28952     clientId: clientId
       
 28953   }), (blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.anchor) && Object(external_wp_element_["createElement"])("span", {
       
 28954     className: "block-editor-block-navigation-block-select-button__anchor"
       
 28955   }, blockInformation.anchor), isSelected && Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], null, Object(external_wp_i18n_["__"])('(selected block)'))), Object(external_wp_element_["createElement"])("div", {
 30618     className: "block-editor-block-navigation-block-select-button__description",
 28956     className: "block-editor-block-navigation-block-select-button__description",
 30619     id: descriptionId
 28957     id: descriptionId
 30620   }, blockPositionDescription));
 28958   }, blockPositionDescription));
 30621 }
 28959 }
 30622 
 28960 
 30623 /* harmony default export */ var block_select_button = (Object(external_this_wp_element_["forwardRef"])(BlockNavigationBlockSelectButton));
 28961 /* harmony default export */ var block_select_button = (Object(external_wp_element_["forwardRef"])(BlockNavigationBlockSelectButton));
 30624 
 28962 
 30625 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/block-slot.js
 28963 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/block-slot.js
 30626 
 28964 
 30627 
 28965 
 30628 
 28966 
 30629 
       
 30630 function block_slot_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; }
       
 30631 
       
 30632 function block_slot_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_slot_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 { block_slot_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 30633 
       
 30634 /**
 28967 /**
 30635  * External dependencies
 28968  * External dependencies
 30636  */
 28969  */
 30637 
 28970 
 30638 /**
 28971 /**
 30642 
 28975 
 30643 
 28976 
 30644 
 28977 
 30645 
 28978 
 30646 
 28979 
       
 28980 
 30647 /**
 28981 /**
 30648  * Internal dependencies
 28982  * Internal dependencies
 30649  */
 28983  */
 30650 
 28984 
 30651 
 28985 
 30652 
 28986 
 30653 
 28987 
 30654 
 28988 
 30655 
 28989 
 30656 var getSlotName = function getSlotName(clientId) {
 28990 
 30657   return "BlockNavigationBlock-".concat(clientId);
 28991 const getSlotName = clientId => `BlockNavigationBlock-${clientId}`;
 30658 };
       
 30659 
 28992 
 30660 function BlockNavigationBlockSlot(props, ref) {
 28993 function BlockNavigationBlockSlot(props, ref) {
 30661   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(BlockNavigationBlockSlot);
 28994   const {
 30662   var clientId = props.block.clientId;
 28995     clientId
 30663   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Slot"], {
 28996   } = props.block;
       
 28997   const {
       
 28998     name
       
 28999   } = Object(external_wp_data_["useSelect"])(select => select(store).getBlockName(clientId), [clientId]);
       
 29000   const instanceId = Object(external_wp_compose_["useInstanceId"])(BlockNavigationBlockSlot);
       
 29001   return Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], {
 30664     name: getSlotName(clientId)
 29002     name: getSlotName(clientId)
 30665   }, function (fills) {
 29003   }, fills => {
 30666     if (!fills.length) {
 29004     if (!fills.length) {
 30667       return Object(external_this_wp_element_["createElement"])(block_select_button, Object(esm_extends["a" /* default */])({
 29005       return Object(external_wp_element_["createElement"])(block_select_button, Object(esm_extends["a" /* default */])({
 30668         ref: ref
 29006         ref: ref
 30669       }, props));
 29007       }, props));
 30670     }
 29008     }
 30671 
 29009 
 30672     var className = props.className,
 29010     const {
 30673         block = props.block,
 29011       className,
 30674         isSelected = props.isSelected,
 29012       isSelected,
 30675         position = props.position,
 29013       position,
 30676         siblingBlockCount = props.siblingBlockCount,
 29014       siblingBlockCount,
 30677         level = props.level,
 29015       level,
 30678         tabIndex = props.tabIndex,
 29016       tabIndex,
 30679         onFocus = props.onFocus;
 29017       onFocus
 30680     var name = block.name;
 29018     } = props;
 30681     var blockType = Object(external_this_wp_blocks_["getBlockType"])(name);
 29019     const blockType = Object(external_wp_blocks_["getBlockType"])(name);
 30682     var descriptionId = "block-navigation-block-slot__".concat(instanceId);
 29020     const descriptionId = `block-navigation-block-slot__${instanceId}`;
 30683     var blockPositionDescription = utils_getBlockPositionDescription(position, siblingBlockCount, level);
 29021     const blockPositionDescription = getBlockPositionDescription(position, siblingBlockCount, level);
 30684     var forwardedFillProps = {
 29022     const forwardedFillProps = {
 30685       // Ensure that the component in the slot can receive
 29023       // Ensure that the component in the slot can receive
 30686       // keyboard navigation.
 29024       // keyboard navigation.
 30687       tabIndex: tabIndex,
 29025       tabIndex,
 30688       onFocus: onFocus,
 29026       onFocus,
 30689       ref: ref,
 29027       ref,
 30690       // Give the element rendered in the slot a description
 29028       // Give the element rendered in the slot a description
 30691       // that describes its position.
 29029       // that describes its position.
 30692       'aria-describedby': descriptionId
 29030       'aria-describedby': descriptionId
 30693     };
 29031     };
 30694     return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
 29032     return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
 30695       className: classnames_default()('block-editor-block-navigation-block-slot', className)
 29033       className: classnames_default()('block-editor-block-navigation-block-slot', className)
 30696     }, Object(external_this_wp_element_["createElement"])(BlockIcon, {
 29034     }, Object(external_wp_element_["createElement"])(BlockIcon, {
 30697       icon: blockType.icon,
 29035       icon: blockType.icon,
 30698       showColors: true
 29036       showColors: true
 30699     }), external_this_wp_element_["Children"].map(fills, function (fill) {
 29037     }), external_wp_element_["Children"].map(fills, fill => Object(external_wp_element_["cloneElement"])(fill, { ...fill.props,
 30700       return Object(external_this_wp_element_["cloneElement"])(fill, block_slot_objectSpread({}, fill.props, {}, forwardedFillProps));
 29038       ...forwardedFillProps
 30701     }), isSelected && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], null, Object(external_this_wp_i18n_["__"])('(selected block)')), Object(external_this_wp_element_["createElement"])("div", {
 29039     })), isSelected && Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], null, Object(external_wp_i18n_["__"])('(selected block)')), Object(external_wp_element_["createElement"])("div", {
 30702       className: "block-editor-block-navigation-block-slot__description",
 29040       className: "block-editor-block-navigation-block-slot__description",
 30703       id: descriptionId
 29041       id: descriptionId
 30704     }, blockPositionDescription)));
 29042     }, blockPositionDescription)));
 30705   });
 29043   });
 30706 }
 29044 }
 30707 
 29045 
 30708 /* harmony default export */ var block_slot = (Object(external_this_wp_element_["forwardRef"])(BlockNavigationBlockSlot));
 29046 /* harmony default export */ var block_slot = (Object(external_wp_element_["forwardRef"])(BlockNavigationBlockSlot));
 30709 var block_slot_BlockNavigationBlockFill = function BlockNavigationBlockFill(props) {
 29047 const BlockNavigationBlockFill = props => {
 30710   var _useContext = Object(external_this_wp_element_["useContext"])(BlockListBlockContext),
 29048   const {
 30711       clientId = _useContext.clientId;
 29049     clientId
 30712 
 29050   } = Object(external_wp_element_["useContext"])(BlockListBlockContext);
 30713   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Fill"], Object(esm_extends["a" /* default */])({}, props, {
 29051   return Object(external_wp_element_["createElement"])(external_wp_components_["Fill"], Object(esm_extends["a" /* default */])({}, props, {
 30714     name: getSlotName(clientId)
 29052     name: getSlotName(clientId)
 30715   }));
 29053   }));
 30716 };
 29054 };
 30717 
 29055 
 30718 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/block-contents.js
 29056 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/block-contents.js
 30719 
 29057 
 30720 
 29058 
 30721 
 29059 
       
 29060 /**
       
 29061  * External dependencies
       
 29062  */
 30722 
 29063 
 30723 /**
 29064 /**
 30724  * WordPress dependencies
 29065  * WordPress dependencies
 30725  */
 29066  */
 30726 
 29067 
       
 29068 
       
 29069 
 30727 /**
 29070 /**
 30728  * Internal dependencies
 29071  * Internal dependencies
 30729  */
 29072  */
 30730 
 29073 
 30731 
 29074 
 30732 
 29075 
 30733 
 29076 
 30734 var BlockNavigationBlockContents = Object(external_this_wp_element_["forwardRef"])(function (_ref, ref) {
 29077 
 30735   var onClick = _ref.onClick,
 29078 
 30736       block = _ref.block,
 29079 const BlockNavigationBlockContents = Object(external_wp_element_["forwardRef"])(({
 30737       isSelected = _ref.isSelected,
 29080   onClick,
 30738       position = _ref.position,
 29081   block,
 30739       siblingBlockCount = _ref.siblingBlockCount,
 29082   isSelected,
 30740       level = _ref.level,
 29083   position,
 30741       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["onClick", "block", "isSelected", "position", "siblingBlockCount", "level"]);
 29084   siblingBlockCount,
 30742 
 29085   level,
 30743   var _useBlockNavigationCo = context_useBlockNavigationContext(),
 29086   ...props
 30744       withBlockNavigationSlots = _useBlockNavigationCo.__experimentalFeatures;
 29087 }, ref) => {
 30745 
 29088   const {
 30746   return withBlockNavigationSlots ? Object(external_this_wp_element_["createElement"])(block_slot, Object(esm_extends["a" /* default */])({
 29089     __experimentalFeatures,
       
 29090     blockDropTarget = {}
       
 29091   } = useBlockNavigationContext();
       
 29092   const {
       
 29093     clientId
       
 29094   } = block;
       
 29095   const {
       
 29096     rootClientId,
       
 29097     blockMovingClientId,
       
 29098     selectedBlockInBlockEditor
       
 29099   } = Object(external_wp_data_["useSelect"])(select => {
       
 29100     const {
       
 29101       getBlockRootClientId,
       
 29102       hasBlockMovingClientId,
       
 29103       getSelectedBlockClientId
       
 29104     } = select(store);
       
 29105     return {
       
 29106       rootClientId: getBlockRootClientId(clientId) || '',
       
 29107       blockMovingClientId: hasBlockMovingClientId(),
       
 29108       selectedBlockInBlockEditor: getSelectedBlockClientId()
       
 29109     };
       
 29110   }, [clientId]);
       
 29111   const isBlockMoveTarget = blockMovingClientId && selectedBlockInBlockEditor === clientId;
       
 29112   const {
       
 29113     rootClientId: dropTargetRootClientId,
       
 29114     clientId: dropTargetClientId,
       
 29115     dropPosition
       
 29116   } = blockDropTarget;
       
 29117   const isDroppingBefore = dropTargetRootClientId === rootClientId && dropTargetClientId === clientId && dropPosition === 'top';
       
 29118   const isDroppingAfter = dropTargetRootClientId === rootClientId && dropTargetClientId === clientId && dropPosition === 'bottom';
       
 29119   const isDroppingToInnerBlocks = dropTargetRootClientId === clientId && dropPosition === 'inside';
       
 29120   const className = classnames_default()('block-editor-block-navigation-block-contents', {
       
 29121     'is-dropping-before': isDroppingBefore || isBlockMoveTarget,
       
 29122     'is-dropping-after': isDroppingAfter,
       
 29123     'is-dropping-to-inner-blocks': isDroppingToInnerBlocks
       
 29124   });
       
 29125   return Object(external_wp_element_["createElement"])(block_draggable, {
       
 29126     clientIds: [block.clientId],
       
 29127     elementId: `block-navigation-block-${block.clientId}`
       
 29128   }, ({
       
 29129     draggable,
       
 29130     onDragStart,
       
 29131     onDragEnd
       
 29132   }) => __experimentalFeatures ? Object(external_wp_element_["createElement"])(block_slot, Object(esm_extends["a" /* default */])({
 30747     ref: ref,
 29133     ref: ref,
 30748     className: "block-editor-block-navigation-block-contents",
 29134     className: className,
 30749     block: block,
 29135     block: block,
 30750     onClick: onClick,
 29136     onClick: onClick,
 30751     isSelected: isSelected,
 29137     isSelected: isSelected,
 30752     position: position,
 29138     position: position,
 30753     siblingBlockCount: siblingBlockCount,
 29139     siblingBlockCount: siblingBlockCount,
 30754     level: level
 29140     level: level,
 30755   }, props)) : Object(external_this_wp_element_["createElement"])(block_select_button, Object(esm_extends["a" /* default */])({
 29141     draggable: draggable && __experimentalFeatures,
       
 29142     onDragStart: onDragStart,
       
 29143     onDragEnd: onDragEnd
       
 29144   }, props)) : Object(external_wp_element_["createElement"])(block_select_button, Object(esm_extends["a" /* default */])({
 30756     ref: ref,
 29145     ref: ref,
 30757     className: "block-editor-block-navigation-block-contents",
 29146     className: className,
 30758     block: block,
 29147     block: block,
 30759     onClick: onClick,
 29148     onClick: onClick,
 30760     isSelected: isSelected,
 29149     isSelected: isSelected,
 30761     position: position,
 29150     position: position,
 30762     siblingBlockCount: siblingBlockCount,
 29151     siblingBlockCount: siblingBlockCount,
 30763     level: level
 29152     level: level,
 30764   }, props));
 29153     draggable: draggable && __experimentalFeatures,
       
 29154     onDragStart: onDragStart,
       
 29155     onDragEnd: onDragEnd
       
 29156   }, props)));
 30765 });
 29157 });
 30766 /* harmony default export */ var block_contents = (BlockNavigationBlockContents);
 29158 /* harmony default export */ var block_contents = (BlockNavigationBlockContents);
 30767 
 29159 
 30768 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/block.js
 29160 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/block.js
 30769 
 29161 
 30770 
 29162 
 30771 
       
 30772 
       
 30773 
       
 30774 /**
 29163 /**
 30775  * External dependencies
 29164  * External dependencies
 30776  */
 29165  */
 30777 
 29166 
 30778 /**
 29167 /**
 30792 
 29181 
 30793 
 29182 
 30794 
 29183 
 30795 
 29184 
 30796 
 29185 
 30797 function BlockNavigationBlock(_ref) {
 29186 function BlockNavigationBlock({
 30798   var block = _ref.block,
 29187   block,
 30799       isSelected = _ref.isSelected,
 29188   isSelected,
 30800       _onClick = _ref.onClick,
 29189   isBranchSelected,
 30801       position = _ref.position,
 29190   isLastOfSelectedBranch,
 30802       level = _ref.level,
 29191   onClick,
 30803       rowCount = _ref.rowCount,
 29192   position,
 30804       siblingBlockCount = _ref.siblingBlockCount,
 29193   level,
 30805       showBlockMovers = _ref.showBlockMovers,
 29194   rowCount,
 30806       terminatedLevels = _ref.terminatedLevels,
 29195   siblingBlockCount,
 30807       path = _ref.path;
 29196   showBlockMovers,
 30808   var cellRef = Object(external_this_wp_element_["useRef"])(null);
 29197   path
 30809 
 29198 }) {
 30810   var _useState = Object(external_this_wp_element_["useState"])(false),
 29199   const cellRef = Object(external_wp_element_["useRef"])(null);
 30811       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 29200   const [isHovered, setIsHovered] = Object(external_wp_element_["useState"])(false);
 30812       isHovered = _useState2[0],
 29201   const {
 30813       setIsHovered = _useState2[1];
 29202     clientId
 30814 
 29203   } = block;
 30815   var _useState3 = Object(external_this_wp_element_["useState"])(false),
 29204   const {
 30816       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
 29205     isDragging,
 30817       isFocused = _useState4[0],
 29206     blockParents
 30818       setIsFocused = _useState4[1];
 29207   } = Object(external_wp_data_["useSelect"])(select => {
 30819 
 29208     const {
 30820   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 29209       isBlockBeingDragged,
 30821       selectEditorBlock = _useDispatch.selectBlock;
 29210       isAncestorBeingDragged,
 30822 
 29211       getBlockParents
 30823   var clientId = block.clientId;
 29212     } = select(store);
 30824   var hasSiblings = siblingBlockCount > 0;
 29213     return {
 30825   var hasRenderedMovers = showBlockMovers && hasSiblings;
 29214       isDragging: isBlockBeingDragged(clientId) || isAncestorBeingDragged(clientId),
 30826   var hasVisibleMovers = isHovered || isFocused;
 29215       blockParents: getBlockParents(clientId)
 30827   var moverCellClassName = classnames_default()('block-editor-block-navigation-block__mover-cell', {
 29216     };
 30828     'is-visible': hasVisibleMovers
 29217   }, [clientId]);
       
 29218   const {
       
 29219     selectBlock: selectEditorBlock,
       
 29220     toggleBlockHighlight
       
 29221   } = Object(external_wp_data_["useDispatch"])(store);
       
 29222   const hasSiblings = siblingBlockCount > 0;
       
 29223   const hasRenderedMovers = showBlockMovers && hasSiblings;
       
 29224   const moverCellClassName = classnames_default()('block-editor-block-navigation-block__mover-cell', {
       
 29225     'is-visible': isHovered
 30829   });
 29226   });
 30830 
 29227   const {
 30831   var _useBlockNavigationCo = context_useBlockNavigationContext(),
 29228     __experimentalFeatures: withExperimentalFeatures,
 30832       withExperimentalFeatures = _useBlockNavigationCo.__experimentalFeatures;
 29229     __experimentalPersistentListViewFeatures: withExperimentalPersistentListViewFeatures,
 30833 
 29230     isTreeGridMounted
 30834   var blockNavigationBlockSettingsClassName = classnames_default()('block-editor-block-navigation-block__menu-cell', {
 29231   } = useBlockNavigationContext();
 30835     'is-visible': hasVisibleMovers
 29232   const blockNavigationBlockSettingsClassName = classnames_default()('block-editor-block-navigation-block__menu-cell', {
 30836   });
 29233     'is-visible': isHovered
 30837   Object(external_this_wp_element_["useEffect"])(function () {
 29234   }); // If BlockNavigation has experimental features related to the Persistent List View,
       
 29235   // only focus the selected list item on mount; otherwise the list would always
       
 29236   // try to steal the focus from the editor canvas.
       
 29237 
       
 29238   Object(external_wp_element_["useEffect"])(() => {
       
 29239     if (withExperimentalPersistentListViewFeatures && !isTreeGridMounted && isSelected) {
       
 29240       cellRef.current.focus();
       
 29241     }
       
 29242   }, []); // If BlockNavigation has experimental features (such as drag and drop) enabled,
       
 29243   // leave the focus handling as it was before, to avoid accidental regressions.
       
 29244 
       
 29245   Object(external_wp_element_["useEffect"])(() => {
 30838     if (withExperimentalFeatures && isSelected) {
 29246     if (withExperimentalFeatures && isSelected) {
 30839       cellRef.current.focus();
 29247       cellRef.current.focus();
 30840     }
 29248     }
 30841   }, [withExperimentalFeatures, isSelected]);
 29249   }, [withExperimentalFeatures, isSelected]);
 30842   return Object(external_this_wp_element_["createElement"])(BlockNavigationLeaf, {
 29250   const highlightBlock = withExperimentalPersistentListViewFeatures ? toggleBlockHighlight : () => {};
       
 29251 
       
 29252   const onMouseEnter = () => {
       
 29253     setIsHovered(true);
       
 29254     highlightBlock(clientId, true);
       
 29255   };
       
 29256 
       
 29257   const onMouseLeave = () => {
       
 29258     setIsHovered(false);
       
 29259     highlightBlock(clientId, false);
       
 29260   };
       
 29261 
       
 29262   const classes = classnames_default()({
       
 29263     'is-selected': isSelected,
       
 29264     'is-branch-selected': withExperimentalPersistentListViewFeatures && isBranchSelected,
       
 29265     'is-last-of-selected-branch': withExperimentalPersistentListViewFeatures && isLastOfSelectedBranch,
       
 29266     'is-dragging': isDragging
       
 29267   });
       
 29268   return Object(external_wp_element_["createElement"])(BlockNavigationLeaf, {
       
 29269     className: classes,
       
 29270     onMouseEnter: onMouseEnter,
       
 29271     onMouseLeave: onMouseLeave,
       
 29272     onFocus: onMouseEnter,
       
 29273     onBlur: onMouseLeave,
       
 29274     level: level,
       
 29275     position: position,
       
 29276     rowCount: rowCount,
       
 29277     path: path,
       
 29278     id: `block-navigation-block-${clientId}`,
       
 29279     "data-block": clientId
       
 29280   }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalTreeGridCell"], {
       
 29281     className: "block-editor-block-navigation-block__contents-cell",
       
 29282     colSpan: hasRenderedMovers ? undefined : 2,
       
 29283     ref: cellRef
       
 29284   }, ({
       
 29285     ref,
       
 29286     tabIndex,
       
 29287     onFocus
       
 29288   }) => Object(external_wp_element_["createElement"])("div", {
       
 29289     className: "block-editor-block-navigation-block__contents-container"
       
 29290   }, Object(external_wp_element_["createElement"])(block_contents, {
       
 29291     block: block,
       
 29292     onClick: () => onClick(block.clientId),
       
 29293     isSelected: isSelected,
       
 29294     position: position,
       
 29295     siblingBlockCount: siblingBlockCount,
       
 29296     level: level,
       
 29297     ref: ref,
       
 29298     tabIndex: tabIndex,
       
 29299     onFocus: onFocus
       
 29300   }))), hasRenderedMovers && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalTreeGridCell"], {
       
 29301     className: moverCellClassName,
       
 29302     withoutGridItem: true
       
 29303   }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalTreeGridItem"], null, ({
       
 29304     ref,
       
 29305     tabIndex,
       
 29306     onFocus
       
 29307   }) => Object(external_wp_element_["createElement"])(BlockMoverUpButton, {
       
 29308     orientation: "vertical",
       
 29309     clientIds: [clientId],
       
 29310     ref: ref,
       
 29311     tabIndex: tabIndex,
       
 29312     onFocus: onFocus
       
 29313   })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalTreeGridItem"], null, ({
       
 29314     ref,
       
 29315     tabIndex,
       
 29316     onFocus
       
 29317   }) => Object(external_wp_element_["createElement"])(BlockMoverDownButton, {
       
 29318     orientation: "vertical",
       
 29319     clientIds: [clientId],
       
 29320     ref: ref,
       
 29321     tabIndex: tabIndex,
       
 29322     onFocus: onFocus
       
 29323   })))), withExperimentalFeatures && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalTreeGridCell"], {
       
 29324     className: blockNavigationBlockSettingsClassName
       
 29325   }, ({
       
 29326     ref,
       
 29327     tabIndex,
       
 29328     onFocus
       
 29329   }) => Object(external_wp_element_["createElement"])(block_settings_dropdown, {
       
 29330     clientIds: [clientId],
       
 29331     icon: more_vertical["a" /* default */],
       
 29332     toggleProps: {
       
 29333       ref,
       
 29334       tabIndex,
       
 29335       onFocus
       
 29336     },
       
 29337     disableOpenOnArrowDown: true,
       
 29338     __experimentalSelectBlock: onClick
       
 29339   }, ({
       
 29340     onClose
       
 29341   }) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
       
 29342     onClick: async () => {
       
 29343       if (blockParents.length) {
       
 29344         // If the block to select is inside a dropdown, we need to open the dropdown.
       
 29345         // Otherwise focus won't transfer to the block.
       
 29346         for (const parent of blockParents) {
       
 29347           await selectEditorBlock(parent);
       
 29348         }
       
 29349       } else {
       
 29350         // If clientId is already selected, it won't be focused (see block-wrapper.js)
       
 29351         // This removes the selection first to ensure the focus will always switch.
       
 29352         await selectEditorBlock(null);
       
 29353       }
       
 29354 
       
 29355       await selectEditorBlock(clientId);
       
 29356       onClose();
       
 29357     }
       
 29358   }, Object(external_wp_i18n_["__"])('Go to block'))))));
       
 29359 }
       
 29360 
       
 29361 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/appender.js
       
 29362 
       
 29363 
       
 29364 /**
       
 29365  * External dependencies
       
 29366  */
       
 29367 
       
 29368 /**
       
 29369  * WordPress dependencies
       
 29370  */
       
 29371 
       
 29372 
       
 29373 
       
 29374 
       
 29375 
       
 29376 /**
       
 29377  * Internal dependencies
       
 29378  */
       
 29379 
       
 29380 
       
 29381 
       
 29382 
       
 29383 function BlockNavigationAppender({
       
 29384   parentBlockClientId,
       
 29385   position,
       
 29386   level,
       
 29387   rowCount,
       
 29388   path
       
 29389 }) {
       
 29390   const isDragging = Object(external_wp_data_["useSelect"])(select => {
       
 29391     const {
       
 29392       isBlockBeingDragged,
       
 29393       isAncestorBeingDragged
       
 29394     } = select(store);
       
 29395     return isBlockBeingDragged(parentBlockClientId) || isAncestorBeingDragged(parentBlockClientId);
       
 29396   }, [parentBlockClientId]);
       
 29397   const instanceId = Object(external_wp_compose_["useInstanceId"])(BlockNavigationAppender);
       
 29398   const descriptionId = `block-navigation-appender-row__description_${instanceId}`;
       
 29399   const appenderPositionDescription = Object(external_wp_i18n_["sprintf"])(
       
 29400   /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
       
 29401   Object(external_wp_i18n_["__"])('Add block at position %1$d, Level %2$d'), position, level);
       
 29402   return Object(external_wp_element_["createElement"])(BlockNavigationLeaf, {
 30843     className: classnames_default()({
 29403     className: classnames_default()({
 30844       'is-selected': isSelected
 29404       'is-dragging': isDragging
 30845     }),
 29405     }),
 30846     onMouseEnter: function onMouseEnter() {
       
 30847       return setIsHovered(true);
       
 30848     },
       
 30849     onMouseLeave: function onMouseLeave() {
       
 30850       return setIsHovered(false);
       
 30851     },
       
 30852     onFocus: function onFocus() {
       
 30853       return setIsFocused(true);
       
 30854     },
       
 30855     onBlur: function onBlur() {
       
 30856       return setIsFocused(false);
       
 30857     },
       
 30858     level: level,
 29406     level: level,
 30859     position: position,
 29407     position: position,
 30860     rowCount: rowCount,
 29408     rowCount: rowCount,
 30861     path: path
 29409     path: path
 30862   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalTreeGridCell"], {
 29410   }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalTreeGridCell"], {
 30863     className: "block-editor-block-navigation-block__contents-cell",
       
 30864     colSpan: hasRenderedMovers ? undefined : 2,
       
 30865     ref: cellRef
       
 30866   }, function (_ref2) {
       
 30867     var ref = _ref2.ref,
       
 30868         tabIndex = _ref2.tabIndex,
       
 30869         onFocus = _ref2.onFocus;
       
 30870     return Object(external_this_wp_element_["createElement"])("div", {
       
 30871       className: "block-editor-block-navigation-block__contents-container"
       
 30872     }, Object(external_this_wp_element_["createElement"])(DescenderLines, {
       
 30873       level: level,
       
 30874       isLastRow: position === rowCount,
       
 30875       terminatedLevels: terminatedLevels
       
 30876     }), Object(external_this_wp_element_["createElement"])(block_contents, {
       
 30877       block: block,
       
 30878       onClick: function onClick() {
       
 30879         return _onClick(block.clientId);
       
 30880       },
       
 30881       isSelected: isSelected,
       
 30882       position: position,
       
 30883       siblingBlockCount: siblingBlockCount,
       
 30884       level: level,
       
 30885       ref: ref,
       
 30886       tabIndex: tabIndex,
       
 30887       onFocus: onFocus
       
 30888     }));
       
 30889   }), hasRenderedMovers && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalTreeGridCell"], {
       
 30890     className: moverCellClassName,
       
 30891     withoutGridItem: true
       
 30892   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalTreeGridItem"], null, function (_ref3) {
       
 30893     var ref = _ref3.ref,
       
 30894         tabIndex = _ref3.tabIndex,
       
 30895         onFocus = _ref3.onFocus;
       
 30896     return Object(external_this_wp_element_["createElement"])(BlockMoverUpButton, {
       
 30897       __experimentalOrientation: "vertical",
       
 30898       clientIds: [clientId],
       
 30899       ref: ref,
       
 30900       tabIndex: tabIndex,
       
 30901       onFocus: onFocus
       
 30902     });
       
 30903   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalTreeGridItem"], null, function (_ref4) {
       
 30904     var ref = _ref4.ref,
       
 30905         tabIndex = _ref4.tabIndex,
       
 30906         onFocus = _ref4.onFocus;
       
 30907     return Object(external_this_wp_element_["createElement"])(BlockMoverDownButton, {
       
 30908       __experimentalOrientation: "vertical",
       
 30909       clientIds: [clientId],
       
 30910       ref: ref,
       
 30911       tabIndex: tabIndex,
       
 30912       onFocus: onFocus
       
 30913     });
       
 30914   }))), withExperimentalFeatures && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalTreeGridCell"], {
       
 30915     className: blockNavigationBlockSettingsClassName
       
 30916   }, function (_ref5) {
       
 30917     var ref = _ref5.ref,
       
 30918         tabIndex = _ref5.tabIndex,
       
 30919         onFocus = _ref5.onFocus;
       
 30920     return Object(external_this_wp_element_["createElement"])(block_settings_dropdown, {
       
 30921       clientIds: [clientId],
       
 30922       icon: more_vertical["a" /* default */],
       
 30923       toggleProps: {
       
 30924         ref: ref,
       
 30925         tabIndex: tabIndex,
       
 30926         onFocus: onFocus
       
 30927       },
       
 30928       disableOpenOnArrowDown: true,
       
 30929       __experimentalSelectBlock: _onClick
       
 30930     }, function (_ref6) {
       
 30931       var onClose = _ref6.onClose;
       
 30932       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
       
 30933         onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee() {
       
 30934           return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
       
 30935             while (1) {
       
 30936               switch (_context.prev = _context.next) {
       
 30937                 case 0:
       
 30938                   _context.next = 2;
       
 30939                   return selectEditorBlock(null);
       
 30940 
       
 30941                 case 2:
       
 30942                   _context.next = 4;
       
 30943                   return selectEditorBlock(clientId);
       
 30944 
       
 30945                 case 4:
       
 30946                   onClose();
       
 30947 
       
 30948                 case 5:
       
 30949                 case "end":
       
 30950                   return _context.stop();
       
 30951               }
       
 30952             }
       
 30953           }, _callee);
       
 30954         }))
       
 30955       }, Object(external_this_wp_i18n_["__"])('Go to block')));
       
 30956     });
       
 30957   }));
       
 30958 }
       
 30959 
       
 30960 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/appender.js
       
 30961 
       
 30962 
       
 30963 /**
       
 30964  * WordPress dependencies
       
 30965  */
       
 30966 
       
 30967 
       
 30968 
       
 30969 /**
       
 30970  * Internal dependencies
       
 30971  */
       
 30972 
       
 30973 
       
 30974 
       
 30975 
       
 30976 function BlockNavigationAppender(_ref) {
       
 30977   var parentBlockClientId = _ref.parentBlockClientId,
       
 30978       position = _ref.position,
       
 30979       level = _ref.level,
       
 30980       rowCount = _ref.rowCount,
       
 30981       terminatedLevels = _ref.terminatedLevels,
       
 30982       path = _ref.path;
       
 30983   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(BlockNavigationAppender);
       
 30984   var descriptionId = "block-navigation-appender-row__description_".concat(instanceId);
       
 30985   var appenderPositionDescription = Object(external_this_wp_i18n_["sprintf"])(
       
 30986   /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
       
 30987   Object(external_this_wp_i18n_["__"])('Add block at position %1$d, Level %2$d'), position, level);
       
 30988   return Object(external_this_wp_element_["createElement"])(BlockNavigationLeaf, {
       
 30989     level: level,
       
 30990     position: position,
       
 30991     rowCount: rowCount,
       
 30992     path: path
       
 30993   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalTreeGridCell"], {
       
 30994     className: "block-editor-block-navigation-appender__cell",
 29411     className: "block-editor-block-navigation-appender__cell",
 30995     colSpan: "3"
 29412     colSpan: "3"
 30996   }, function (_ref2) {
 29413   }, ({
 30997     var ref = _ref2.ref,
 29414     ref,
 30998         tabIndex = _ref2.tabIndex,
 29415     tabIndex,
 30999         onFocus = _ref2.onFocus;
 29416     onFocus
 31000     return Object(external_this_wp_element_["createElement"])("div", {
 29417   }) => Object(external_wp_element_["createElement"])("div", {
 31001       className: "block-editor-block-navigation-appender__container"
 29418     className: "block-editor-block-navigation-appender__container"
 31002     }, Object(external_this_wp_element_["createElement"])(DescenderLines, {
 29419   }, Object(external_wp_element_["createElement"])(inserter, {
 31003       level: level,
 29420     rootClientId: parentBlockClientId,
 31004       isLastRow: position === rowCount,
 29421     __experimentalIsQuick: true,
 31005       terminatedLevels: terminatedLevels
 29422     "aria-describedby": descriptionId,
 31006     }), Object(external_this_wp_element_["createElement"])(inserter, {
 29423     toggleProps: {
 31007       rootClientId: parentBlockClientId,
 29424       ref,
 31008       __experimentalSelectBlockOnInsert: false,
 29425       tabIndex,
 31009       "aria-describedby": descriptionId,
 29426       onFocus
 31010       toggleProps: {
 29427     }
 31011         ref: ref,
 29428   }), Object(external_wp_element_["createElement"])("div", {
 31012         tabIndex: tabIndex,
 29429     className: "block-editor-block-navigation-appender__description",
 31013         onFocus: onFocus
 29430     id: descriptionId
 31014       }
 29431   }, appenderPositionDescription))));
 31015     }), Object(external_this_wp_element_["createElement"])("div", {
       
 31016       className: "block-editor-block-navigation-appender__description",
       
 31017       id: descriptionId
       
 31018     }, appenderPositionDescription));
       
 31019   }));
       
 31020 }
 29432 }
 31021 
 29433 
 31022 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/branch.js
 29434 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/branch.js
 31023 
 29435 
 31024 
 29436 
 31025 
       
 31026 /**
 29437 /**
 31027  * External dependencies
 29438  * External dependencies
 31028  */
 29439  */
 31029 
 29440 
 31030 /**
 29441 /**
 31036  * Internal dependencies
 29447  * Internal dependencies
 31037  */
 29448  */
 31038 
 29449 
 31039 
 29450 
 31040 
 29451 
       
 29452 
 31041 function BlockNavigationBranch(props) {
 29453 function BlockNavigationBranch(props) {
 31042   var blocks = props.blocks,
 29454   const {
 31043       selectBlock = props.selectBlock,
 29455     blocks,
 31044       selectedBlockClientId = props.selectedBlockClientId,
 29456     selectBlock,
 31045       showAppender = props.showAppender,
 29457     selectedBlockClientIds,
 31046       showBlockMovers = props.showBlockMovers,
 29458     showAppender,
 31047       showNestedBlocks = props.showNestedBlocks,
 29459     showBlockMovers,
 31048       parentBlockClientId = props.parentBlockClientId,
 29460     showNestedBlocks,
 31049       _props$level = props.level,
 29461     parentBlockClientId,
 31050       level = _props$level === void 0 ? 1 : _props$level,
 29462     level = 1,
 31051       _props$terminatedLeve = props.terminatedLevels,
 29463     terminatedLevels = [],
 31052       terminatedLevels = _props$terminatedLeve === void 0 ? [] : _props$terminatedLeve,
 29464     path = [],
 31053       _props$path = props.path,
 29465     isBranchSelected = false,
 31054       path = _props$path === void 0 ? [] : _props$path;
 29466     isLastOfBranch = false
 31055   var isTreeRoot = !parentBlockClientId;
 29467   } = props;
 31056   var filteredBlocks = Object(external_this_lodash_["compact"])(blocks);
 29468   const isTreeRoot = !parentBlockClientId;
 31057 
 29469   const filteredBlocks = Object(external_lodash_["compact"])(blocks);
 31058   var itemHasAppender = function itemHasAppender(parentClientId) {
 29470 
 31059     return showAppender && !isTreeRoot && selectedBlockClientId === parentClientId;
 29471   const itemHasAppender = parentClientId => showAppender && !isTreeRoot && isClientIdSelected(parentClientId, selectedBlockClientIds);
 31060   };
 29472 
 31061 
 29473   const hasAppender = itemHasAppender(parentBlockClientId); // Add +1 to the rowCount to take the block appender into account.
 31062   var hasAppender = itemHasAppender(parentBlockClientId); // Add +1 to the rowCount to take the block appender into account.
 29474 
 31063 
 29475   const blockCount = filteredBlocks.length;
 31064   var blockCount = filteredBlocks.length;
 29476   const rowCount = hasAppender ? blockCount + 1 : blockCount;
 31065   var rowCount = hasAppender ? blockCount + 1 : blockCount;
 29477   const appenderPosition = rowCount;
 31066   var appenderPosition = rowCount;
 29478   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_lodash_["map"])(filteredBlocks, (block, index) => {
 31067   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_lodash_["map"])(filteredBlocks, function (block, index) {
 29479     const {
 31068     var clientId = block.clientId,
 29480       clientId,
 31069         innerBlocks = block.innerBlocks;
 29481       innerBlocks
 31070     var position = index + 1;
 29482     } = block;
 31071     var isLastRowAtLevel = rowCount === position;
 29483     const position = index + 1;
 31072     var updatedTerminatedLevels = isLastRowAtLevel ? [].concat(Object(toConsumableArray["a" /* default */])(terminatedLevels), [level]) : terminatedLevels;
 29484     const isLastRowAtLevel = rowCount === position;
 31073     var updatedPath = [].concat(Object(toConsumableArray["a" /* default */])(path), [position]);
 29485     const updatedTerminatedLevels = isLastRowAtLevel ? [...terminatedLevels, level] : terminatedLevels;
 31074     var hasNestedBlocks = showNestedBlocks && !!innerBlocks && !!innerBlocks.length;
 29486     const updatedPath = [...path, position];
 31075     var hasNestedAppender = itemHasAppender(clientId);
 29487     const hasNestedBlocks = showNestedBlocks && !!innerBlocks && !!innerBlocks.length;
 31076     return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], {
 29488     const hasNestedAppender = itemHasAppender(clientId);
       
 29489     const hasNestedBranch = hasNestedBlocks || hasNestedAppender;
       
 29490     const isSelected = isClientIdSelected(clientId, selectedBlockClientIds);
       
 29491     const isSelectedBranch = isBranchSelected || isSelected && hasNestedBranch; // Logic needed to target the last item of a selected branch which might be deeply nested.
       
 29492     // This is currently only needed for styling purposes. See: `.is-last-of-selected-branch`.
       
 29493 
       
 29494     const isLastBlock = index === blockCount - 1;
       
 29495     const isLast = isSelected || isLastOfBranch && isLastBlock;
       
 29496     const isLastOfSelectedBranch = isLastOfBranch && !hasNestedBranch && isLastBlock;
       
 29497     return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], {
 31077       key: clientId
 29498       key: clientId
 31078     }, Object(external_this_wp_element_["createElement"])(BlockNavigationBlock, {
 29499     }, Object(external_wp_element_["createElement"])(BlockNavigationBlock, {
 31079       block: block,
 29500       block: block,
 31080       onClick: selectBlock,
 29501       onClick: selectBlock,
 31081       isSelected: selectedBlockClientId === clientId,
 29502       isSelected: isSelected,
       
 29503       isBranchSelected: isSelectedBranch,
       
 29504       isLastOfSelectedBranch: isLastOfSelectedBranch,
 31082       level: level,
 29505       level: level,
 31083       position: position,
 29506       position: position,
 31084       rowCount: rowCount,
 29507       rowCount: rowCount,
 31085       siblingBlockCount: blockCount,
 29508       siblingBlockCount: blockCount,
 31086       showBlockMovers: showBlockMovers,
 29509       showBlockMovers: showBlockMovers,
 31087       terminatedLevels: terminatedLevels,
 29510       terminatedLevels: terminatedLevels,
 31088       path: updatedPath
 29511       path: updatedPath
 31089     }), (hasNestedBlocks || hasNestedAppender) && Object(external_this_wp_element_["createElement"])(BlockNavigationBranch, {
 29512     }), hasNestedBranch && Object(external_wp_element_["createElement"])(BlockNavigationBranch, {
 31090       blocks: innerBlocks,
 29513       blocks: innerBlocks,
 31091       selectedBlockClientId: selectedBlockClientId,
 29514       selectedBlockClientIds: selectedBlockClientIds,
 31092       selectBlock: selectBlock,
 29515       selectBlock: selectBlock,
       
 29516       isBranchSelected: isSelectedBranch,
       
 29517       isLastOfBranch: isLast,
 31093       showAppender: showAppender,
 29518       showAppender: showAppender,
 31094       showBlockMovers: showBlockMovers,
 29519       showBlockMovers: showBlockMovers,
 31095       showNestedBlocks: showNestedBlocks,
 29520       showNestedBlocks: showNestedBlocks,
 31096       parentBlockClientId: clientId,
 29521       parentBlockClientId: clientId,
 31097       level: level + 1,
 29522       level: level + 1,
 31098       terminatedLevels: updatedTerminatedLevels,
 29523       terminatedLevels: updatedTerminatedLevels,
 31099       path: updatedPath
 29524       path: updatedPath
 31100     }));
 29525     }));
 31101   }), hasAppender && Object(external_this_wp_element_["createElement"])(BlockNavigationAppender, {
 29526   }), hasAppender && Object(external_wp_element_["createElement"])(BlockNavigationAppender, {
 31102     parentBlockClientId: parentBlockClientId,
 29527     parentBlockClientId: parentBlockClientId,
 31103     position: rowCount,
 29528     position: rowCount,
 31104     rowCount: appenderPosition,
 29529     rowCount: appenderPosition,
 31105     level: level,
 29530     level: level,
 31106     terminatedLevels: terminatedLevels,
 29531     terminatedLevels: terminatedLevels,
 31107     path: [].concat(Object(toConsumableArray["a" /* default */])(path), [appenderPosition])
 29532     path: [...path, appenderPosition]
 31108   }));
 29533   }));
 31109 }
 29534 }
 31110 BlockNavigationBranch.defaultProps = {
 29535 BlockNavigationBranch.defaultProps = {
 31111   selectBlock: function selectBlock() {}
 29536   selectBlock: () => {}
 31112 };
 29537 };
 31113 
 29538 
       
 29539 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/use-block-navigation-client-ids.js
       
 29540 /**
       
 29541  * WordPress dependencies
       
 29542  */
       
 29543 
       
 29544 /**
       
 29545  * Internal dependencies
       
 29546  */
       
 29547 
       
 29548 
       
 29549 
       
 29550 
       
 29551 const useBlockNavigationSelectedClientIds = __experimentalPersistentListViewFeatures => Object(external_wp_data_["useSelect"])(select => {
       
 29552   const {
       
 29553     getSelectedBlockClientId,
       
 29554     getSelectedBlockClientIds
       
 29555   } = select(store);
       
 29556 
       
 29557   if (__experimentalPersistentListViewFeatures) {
       
 29558     return getSelectedBlockClientIds();
       
 29559   }
       
 29560 
       
 29561   return getSelectedBlockClientId();
       
 29562 }, [__experimentalPersistentListViewFeatures]);
       
 29563 
       
 29564 const useBlockNavigationClientIdsTree = (blocks, selectedClientIds, showOnlyCurrentHierarchy) => Object(external_wp_data_["useSelect"])(select => {
       
 29565   const {
       
 29566     getBlockHierarchyRootClientId,
       
 29567     __unstableGetClientIdsTree,
       
 29568     __unstableGetClientIdWithClientIdsTree
       
 29569   } = select(store);
       
 29570 
       
 29571   if (blocks) {
       
 29572     return blocks;
       
 29573   }
       
 29574 
       
 29575   const isSingleBlockSelected = selectedClientIds && !Array.isArray(selectedClientIds);
       
 29576 
       
 29577   if (!showOnlyCurrentHierarchy || !isSingleBlockSelected) {
       
 29578     return __unstableGetClientIdsTree();
       
 29579   }
       
 29580 
       
 29581   const rootBlock = __unstableGetClientIdWithClientIdsTree(getBlockHierarchyRootClientId(selectedClientIds));
       
 29582 
       
 29583   if (!rootBlock) {
       
 29584     return __unstableGetClientIdsTree();
       
 29585   }
       
 29586 
       
 29587   const hasHierarchy = !isClientIdSelected(rootBlock.clientId, selectedClientIds) || rootBlock.innerBlocks && rootBlock.innerBlocks.length !== 0;
       
 29588 
       
 29589   if (hasHierarchy) {
       
 29590     return [rootBlock];
       
 29591   }
       
 29592 
       
 29593   return __unstableGetClientIdsTree();
       
 29594 }, [blocks, selectedClientIds, showOnlyCurrentHierarchy]);
       
 29595 
       
 29596 function useBlockNavigationClientIds(blocks, showOnlyCurrentHierarchy, __experimentalPersistentListViewFeatures) {
       
 29597   const selectedClientIds = useBlockNavigationSelectedClientIds(__experimentalPersistentListViewFeatures);
       
 29598   const clientIdsTree = useBlockNavigationClientIdsTree(blocks, selectedClientIds, showOnlyCurrentHierarchy);
       
 29599   return {
       
 29600     clientIdsTree,
       
 29601     selectedClientIds
       
 29602   };
       
 29603 }
       
 29604 
       
 29605 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/use-block-navigation-drop-zone.js
       
 29606 /**
       
 29607  * WordPress dependencies
       
 29608  */
       
 29609 
       
 29610 
       
 29611 
       
 29612 /**
       
 29613  * Internal dependencies
       
 29614  */
       
 29615 
       
 29616 
       
 29617 
       
 29618 
       
 29619 /** @typedef {import('../../utils/math').WPPoint} WPPoint */
       
 29620 
       
 29621 /**
       
 29622  * The type of a drag event.
       
 29623  *
       
 29624  * @typedef {'default'|'file'|'html'} WPDragEventType
       
 29625  */
       
 29626 
       
 29627 /**
       
 29628  * An array representing data for blocks in the DOM used by drag and drop.
       
 29629  *
       
 29630  * @typedef {Object} WPBlockNavigationDropZoneBlocks
       
 29631  * @property {string}  clientId                        The client id for the block.
       
 29632  * @property {string}  rootClientId                    The root client id for the block.
       
 29633  * @property {number}  blockIndex                      The block's index.
       
 29634  * @property {Element} element                         The DOM element representing the block.
       
 29635  * @property {number}  innerBlockCount                 The number of inner blocks the block has.
       
 29636  * @property {boolean} isDraggedBlock                  Whether the block is currently being dragged.
       
 29637  * @property {boolean} canInsertDraggedBlocksAsSibling Whether the dragged block can be a sibling of this block.
       
 29638  * @property {boolean} canInsertDraggedBlocksAsChild   Whether the dragged block can be a child of this block.
       
 29639  */
       
 29640 
       
 29641 /**
       
 29642  * An object containing details of a drop target.
       
 29643  *
       
 29644  * @typedef {Object} WPBlockNavigationDropZoneTarget
       
 29645  * @property {string}                   blockIndex   The insertion index.
       
 29646  * @property {string}                   rootClientId The root client id for the block.
       
 29647  * @property {string|undefined}         clientId     The client id for the block.
       
 29648  * @property {'top'|'bottom'|'inside'}  dropPosition The position relative to the block that the user is dropping to.
       
 29649  *                                                   'inside' refers to nesting as an inner block.
       
 29650  */
       
 29651 
       
 29652 /**
       
 29653  * Is the point contained by the rectangle.
       
 29654  *
       
 29655  * @param {WPPoint} point The point.
       
 29656  * @param {DOMRect} rect  The rectangle.
       
 29657  *
       
 29658  * @return {boolean} True if the point is contained by the rectangle, false otherwise.
       
 29659  */
       
 29660 
       
 29661 function isPointContainedByRect(point, rect) {
       
 29662   return rect.left <= point.x && rect.right >= point.x && rect.top <= point.y && rect.bottom >= point.y;
       
 29663 }
       
 29664 /**
       
 29665  * Determines whether the user positioning the dragged block to nest as an
       
 29666  * inner block.
       
 29667  *
       
 29668  * Presently this is determined by whether the cursor is on the right hand side
       
 29669  * of the block.
       
 29670  *
       
 29671  * @param {WPPoint} point The point representing the cursor position when dragging.
       
 29672  * @param {DOMRect} rect  The rectangle.
       
 29673  */
       
 29674 
       
 29675 
       
 29676 function isNestingGesture(point, rect) {
       
 29677   const blockCenterX = rect.left + rect.width / 2;
       
 29678   return point.x > blockCenterX;
       
 29679 } // Block navigation is always a vertical list, so only allow dropping
       
 29680 // to the above or below a block.
       
 29681 
       
 29682 
       
 29683 const ALLOWED_DROP_EDGES = ['top', 'bottom'];
       
 29684 /**
       
 29685  * Given blocks data and the cursor position, compute the drop target.
       
 29686  *
       
 29687  * @param {WPBlockNavigationDropZoneBlocks} blocksData Data about the blocks in block navigation.
       
 29688  * @param {WPPoint} position The point representing the cursor position when dragging.
       
 29689  *
       
 29690  * @return {WPBlockNavigationDropZoneTarget} An object containing data about the drop target.
       
 29691  */
       
 29692 
       
 29693 function getBlockNavigationDropTarget(blocksData, position) {
       
 29694   let candidateEdge;
       
 29695   let candidateBlockData;
       
 29696   let candidateDistance;
       
 29697   let candidateRect;
       
 29698 
       
 29699   for (const blockData of blocksData) {
       
 29700     if (blockData.isDraggedBlock) {
       
 29701       continue;
       
 29702     }
       
 29703 
       
 29704     const rect = blockData.element.getBoundingClientRect();
       
 29705     const [distance, edge] = getDistanceToNearestEdge(position, rect, ALLOWED_DROP_EDGES);
       
 29706     const isCursorWithinBlock = isPointContainedByRect(position, rect);
       
 29707 
       
 29708     if (candidateDistance === undefined || distance < candidateDistance || isCursorWithinBlock) {
       
 29709       candidateDistance = distance;
       
 29710       const index = blocksData.indexOf(blockData);
       
 29711       const previousBlockData = blocksData[index - 1]; // If dragging near the top of a block and the preceding block
       
 29712       // is at the same level, use the preceding block as the candidate
       
 29713       // instead, as later it makes determining a nesting drop easier.
       
 29714 
       
 29715       if (edge === 'top' && previousBlockData && previousBlockData.rootClientId === blockData.rootClientId && !previousBlockData.isDraggedBlock) {
       
 29716         candidateBlockData = previousBlockData;
       
 29717         candidateEdge = 'bottom';
       
 29718         candidateRect = previousBlockData.element.getBoundingClientRect();
       
 29719       } else {
       
 29720         candidateBlockData = blockData;
       
 29721         candidateEdge = edge;
       
 29722         candidateRect = rect;
       
 29723       } // If the mouse position is within the block, break early
       
 29724       // as the user would intend to drop either before or after
       
 29725       // this block.
       
 29726       //
       
 29727       // This solves an issue where some rows in the block navigation
       
 29728       // tree overlap slightly due to sub-pixel rendering.
       
 29729 
       
 29730 
       
 29731       if (isCursorWithinBlock) {
       
 29732         break;
       
 29733       }
       
 29734     }
       
 29735   }
       
 29736 
       
 29737   if (!candidateBlockData) {
       
 29738     return;
       
 29739   }
       
 29740 
       
 29741   const isDraggingBelow = candidateEdge === 'bottom'; // If the user is dragging towards the bottom of the block check whether
       
 29742   // they might be trying to nest the block as a child.
       
 29743   // If the block already has inner blocks, this should always be treated
       
 29744   // as nesting since the next block in the tree will be the first child.
       
 29745 
       
 29746   if (isDraggingBelow && candidateBlockData.canInsertDraggedBlocksAsChild && (candidateBlockData.innerBlockCount > 0 || isNestingGesture(position, candidateRect))) {
       
 29747     return {
       
 29748       rootClientId: candidateBlockData.clientId,
       
 29749       blockIndex: 0,
       
 29750       dropPosition: 'inside'
       
 29751     };
       
 29752   } // If dropping as a sibling, but block cannot be inserted in
       
 29753   // this context, return early.
       
 29754 
       
 29755 
       
 29756   if (!candidateBlockData.canInsertDraggedBlocksAsSibling) {
       
 29757     return;
       
 29758   }
       
 29759 
       
 29760   const offset = isDraggingBelow ? 1 : 0;
       
 29761   return {
       
 29762     rootClientId: candidateBlockData.rootClientId,
       
 29763     clientId: candidateBlockData.clientId,
       
 29764     blockIndex: candidateBlockData.blockIndex + offset,
       
 29765     dropPosition: candidateEdge
       
 29766   };
       
 29767 }
       
 29768 /**
       
 29769  * A react hook for implementing a drop zone in block navigation.
       
 29770  *
       
 29771  * @return {WPBlockNavigationDropZoneTarget} The drop target.
       
 29772  */
       
 29773 
       
 29774 
       
 29775 function useBlockNavigationDropZone() {
       
 29776   const {
       
 29777     getBlockRootClientId,
       
 29778     getBlockIndex,
       
 29779     getBlockCount,
       
 29780     getDraggedBlockClientIds,
       
 29781     canInsertBlocks
       
 29782   } = Object(external_wp_data_["useSelect"])(store);
       
 29783   const [target, setTarget] = Object(external_wp_element_["useState"])();
       
 29784   const {
       
 29785     rootClientId: targetRootClientId,
       
 29786     blockIndex: targetBlockIndex
       
 29787   } = target || {};
       
 29788   const onBlockDrop = useOnBlockDrop(targetRootClientId, targetBlockIndex);
       
 29789   const throttled = Object(external_wp_compose_["useThrottle"])(Object(external_wp_element_["useCallback"])((event, currentTarget) => {
       
 29790     const position = {
       
 29791       x: event.clientX,
       
 29792       y: event.clientY
       
 29793     };
       
 29794     const isBlockDrag = !!event.dataTransfer.getData('wp-blocks');
       
 29795     const draggedBlockClientIds = isBlockDrag ? getDraggedBlockClientIds() : undefined;
       
 29796     const blockElements = Array.from(currentTarget.querySelectorAll('[data-block]'));
       
 29797     const blocksData = blockElements.map(blockElement => {
       
 29798       const clientId = blockElement.dataset.block;
       
 29799       const rootClientId = getBlockRootClientId(clientId);
       
 29800       return {
       
 29801         clientId,
       
 29802         rootClientId,
       
 29803         blockIndex: getBlockIndex(clientId, rootClientId),
       
 29804         element: blockElement,
       
 29805         isDraggedBlock: isBlockDrag ? draggedBlockClientIds.includes(clientId) : false,
       
 29806         innerBlockCount: getBlockCount(clientId),
       
 29807         canInsertDraggedBlocksAsSibling: isBlockDrag ? canInsertBlocks(draggedBlockClientIds, rootClientId) : true,
       
 29808         canInsertDraggedBlocksAsChild: isBlockDrag ? canInsertBlocks(draggedBlockClientIds, clientId) : true
       
 29809       };
       
 29810     });
       
 29811     const newTarget = getBlockNavigationDropTarget(blocksData, position);
       
 29812 
       
 29813     if (newTarget) {
       
 29814       setTarget(newTarget);
       
 29815     }
       
 29816   }, []), 200);
       
 29817   const ref = Object(external_wp_compose_["__experimentalUseDropZone"])({
       
 29818     onDrop: onBlockDrop,
       
 29819 
       
 29820     onDragOver(event) {
       
 29821       // `currentTarget` is only available while the event is being
       
 29822       // handled, so get it now and pass it to the thottled function.
       
 29823       // https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget
       
 29824       throttled(event, event.currentTarget);
       
 29825     },
       
 29826 
       
 29827     onDragEnd() {
       
 29828       throttled.cancel();
       
 29829       setTarget(null);
       
 29830     }
       
 29831 
       
 29832   });
       
 29833   return {
       
 29834     ref,
       
 29835     target
       
 29836   };
       
 29837 }
       
 29838 
 31114 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/tree.js
 29839 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/tree.js
 31115 
 29840 
 31116 
 29841 
 31117 
 29842 
 31118 /**
 29843 /**
 31119  * WordPress dependencies
 29844  * WordPress dependencies
 31120  */
 29845  */
 31121 
 29846 
 31122 
 29847 
 31123 
 29848 
       
 29849 
 31124 /**
 29850 /**
 31125  * Internal dependencies
 29851  * Internal dependencies
 31126  */
 29852  */
 31127 
 29853 
 31128 
 29854 
 31129 
 29855 
       
 29856 
       
 29857 
       
 29858 
       
 29859 
       
 29860 const noop = () => {};
 31130 /**
 29861 /**
 31131  * Wrap `BlockNavigationRows` with `TreeGrid`. BlockNavigationRows is a
 29862  * Wrap `BlockNavigationRows` with `TreeGrid`. BlockNavigationRows is a
 31132  * recursive component (it renders itself), so this ensures TreeGrid is only
 29863  * recursive component (it renders itself), so this ensures TreeGrid is only
 31133  * present at the very top of the navigation grid.
 29864  * present at the very top of the navigation grid.
 31134  *
 29865  *
 31135  * @param {Object} props                        Components props.
 29866  * @param {Object}   props                                          Components props.
 31136  * @param {Object} props.__experimentalFeatures Object used in context provider.
 29867  * @param {Array}    props.blocks                                   Custom subset of block client IDs to be used instead of the default hierarchy.
 31137  */
 29868  * @param {Function} props.onSelect                                 Block selection callback.
 31138 
 29869  * @param {boolean}  props.showNestedBlocks                         Flag to enable displaying nested blocks.
 31139 function BlockNavigationTree(_ref) {
 29870  * @param {boolean}  props.showOnlyCurrentHierarchy                 Flag to limit the list to the current hierarchy of blocks.
 31140   var __experimentalFeatures = _ref.__experimentalFeatures,
 29871  * @param {boolean}  props.__experimentalFeatures                   Flag to enable experimental features.
 31141       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["__experimentalFeatures"]);
 29872  * @param {boolean}  props.__experimentalPersistentListViewFeatures Flag to enable features for the Persistent List View experiment.
 31142 
 29873  */
 31143   var contextValue = Object(external_this_wp_element_["useMemo"])(function () {
 29874 
 31144     return {
 29875 
 31145       __experimentalFeatures: __experimentalFeatures
 29876 function BlockNavigationTree({
 31146     };
 29877   blocks,
 31147   }, [__experimentalFeatures]);
 29878   showOnlyCurrentHierarchy,
 31148   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalTreeGrid"], {
 29879   onSelect = noop,
       
 29880   __experimentalFeatures,
       
 29881   __experimentalPersistentListViewFeatures,
       
 29882   ...props
       
 29883 }) {
       
 29884   const {
       
 29885     clientIdsTree,
       
 29886     selectedClientIds
       
 29887   } = useBlockNavigationClientIds(blocks, showOnlyCurrentHierarchy, __experimentalPersistentListViewFeatures);
       
 29888   const {
       
 29889     selectBlock
       
 29890   } = Object(external_wp_data_["useDispatch"])(store);
       
 29891   const selectEditorBlock = Object(external_wp_element_["useCallback"])(clientId => {
       
 29892     selectBlock(clientId);
       
 29893     onSelect(clientId);
       
 29894   }, [selectBlock, onSelect]);
       
 29895   let {
       
 29896     ref: treeGridRef,
       
 29897     target: blockDropTarget
       
 29898   } = useBlockNavigationDropZone();
       
 29899   const isMounted = Object(external_wp_element_["useRef"])(false);
       
 29900   Object(external_wp_element_["useEffect"])(() => {
       
 29901     isMounted.current = true;
       
 29902   }, []);
       
 29903 
       
 29904   if (!__experimentalFeatures) {
       
 29905     blockDropTarget = undefined;
       
 29906   }
       
 29907 
       
 29908   const contextValue = Object(external_wp_element_["useMemo"])(() => ({
       
 29909     __experimentalFeatures,
       
 29910     __experimentalPersistentListViewFeatures,
       
 29911     blockDropTarget,
       
 29912     isTreeGridMounted: isMounted.current
       
 29913   }), [__experimentalFeatures, __experimentalPersistentListViewFeatures, blockDropTarget, isMounted.current]);
       
 29914   return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalTreeGrid"], {
 31149     className: "block-editor-block-navigation-tree",
 29915     className: "block-editor-block-navigation-tree",
 31150     "aria-label": Object(external_this_wp_i18n_["__"])('Block navigation structure')
 29916     "aria-label": Object(external_wp_i18n_["__"])('Block navigation structure'),
 31151   }, Object(external_this_wp_element_["createElement"])(BlockNavigationContext.Provider, {
 29917     ref: treeGridRef
       
 29918   }, Object(external_wp_element_["createElement"])(BlockNavigationContext.Provider, {
 31152     value: contextValue
 29919     value: contextValue
 31153   }, Object(external_this_wp_element_["createElement"])(BlockNavigationBranch, props)));
 29920   }, Object(external_wp_element_["createElement"])(BlockNavigationBranch, Object(esm_extends["a" /* default */])({
 31154 }
 29921     blocks: clientIdsTree,
 31155 
 29922     selectBlock: selectEditorBlock,
 31156 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/index.js
 29923     selectedBlockClientIds: selectedClientIds
 31157 
 29924   }, props))));
 31158 
 29925 }
 31159 /**
 29926 
 31160  * External dependencies
 29927 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/dropdown.js
 31161  */
 29928 
       
 29929 
 31162 
 29930 
 31163 /**
 29931 /**
 31164  * WordPress dependencies
 29932  * WordPress dependencies
 31165  */
 29933  */
 31166 
 29934 
 31167 
 29935 
 31168 
 29936 
 31169 
 29937 
       
 29938 
 31170 /**
 29939 /**
 31171  * Internal dependencies
 29940  * Internal dependencies
 31172  */
 29941  */
 31173 
 29942 
 31174 
 29943 
 31175 
 29944 
 31176 function BlockNavigation(_ref) {
 29945 
 31177   var rootBlock = _ref.rootBlock,
 29946 function BlockNavigationDropdownToggle({
 31178       rootBlocks = _ref.rootBlocks,
 29947   isEnabled,
 31179       selectedBlockClientId = _ref.selectedBlockClientId,
 29948   onToggle,
 31180       selectBlock = _ref.selectBlock,
 29949   isOpen,
 31181       __experimentalFeatures = _ref.__experimentalFeatures;
 29950   innerRef,
 31182 
 29951   ...props
 31183   if (!rootBlocks || rootBlocks.length === 0) {
 29952 }) {
 31184     return null;
 29953   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
 31185   }
       
 31186 
       
 31187   var hasHierarchy = rootBlock && (rootBlock.clientId !== selectedBlockClientId || rootBlock.innerBlocks && rootBlock.innerBlocks.length !== 0);
       
 31188   return Object(external_this_wp_element_["createElement"])("div", {
       
 31189     className: "block-editor-block-navigation__container"
       
 31190   }, Object(external_this_wp_element_["createElement"])("p", {
       
 31191     className: "block-editor-block-navigation__label"
       
 31192   }, Object(external_this_wp_i18n_["__"])('Block navigation')), hasHierarchy && Object(external_this_wp_element_["createElement"])(BlockNavigationTree, {
       
 31193     blocks: [rootBlock],
       
 31194     selectedBlockClientId: selectedBlockClientId,
       
 31195     selectBlock: selectBlock,
       
 31196     __experimentalFeatures: __experimentalFeatures,
       
 31197     showNestedBlocks: true
       
 31198   }), !hasHierarchy && Object(external_this_wp_element_["createElement"])(BlockNavigationTree, {
       
 31199     blocks: rootBlocks,
       
 31200     selectedBlockClientId: selectedBlockClientId,
       
 31201     selectBlock: selectBlock,
       
 31202     __experimentalFeatures: __experimentalFeatures
       
 31203   }));
       
 31204 }
       
 31205 
       
 31206 /* harmony default export */ var block_navigation = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
       
 31207   var _select = select('core/block-editor'),
       
 31208       getSelectedBlockClientId = _select.getSelectedBlockClientId,
       
 31209       getBlockHierarchyRootClientId = _select.getBlockHierarchyRootClientId,
       
 31210       getBlock = _select.getBlock,
       
 31211       getBlocks = _select.getBlocks;
       
 31212 
       
 31213   var selectedBlockClientId = getSelectedBlockClientId();
       
 31214   return {
       
 31215     rootBlocks: getBlocks(),
       
 31216     rootBlock: selectedBlockClientId ? getBlock(getBlockHierarchyRootClientId(selectedBlockClientId)) : null,
       
 31217     selectedBlockClientId: selectedBlockClientId
       
 31218   };
       
 31219 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref2) {
       
 31220   var _ref2$onSelect = _ref2.onSelect,
       
 31221       onSelect = _ref2$onSelect === void 0 ? external_this_lodash_["noop"] : _ref2$onSelect;
       
 31222   return {
       
 31223     selectBlock: function selectBlock(clientId) {
       
 31224       dispatch('core/block-editor').selectBlock(clientId);
       
 31225       onSelect(clientId);
       
 31226     }
       
 31227   };
       
 31228 }))(BlockNavigation));
       
 31229 
       
 31230 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-navigation/dropdown.js
       
 31231 
       
 31232 
       
 31233 
       
 31234 
       
 31235 /**
       
 31236  * WordPress dependencies
       
 31237  */
       
 31238 
       
 31239 
       
 31240 
       
 31241 
       
 31242 
       
 31243 /**
       
 31244  * Internal dependencies
       
 31245  */
       
 31246 
       
 31247 
       
 31248 var MenuIcon = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
       
 31249   xmlns: "http://www.w3.org/2000/svg",
       
 31250   viewBox: "0 0 24 24",
       
 31251   width: "24",
       
 31252   height: "24"
       
 31253 }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
       
 31254   d: "M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"
       
 31255 }));
       
 31256 
       
 31257 function BlockNavigationDropdownToggle(_ref) {
       
 31258   var isEnabled = _ref.isEnabled,
       
 31259       onToggle = _ref.onToggle,
       
 31260       isOpen = _ref.isOpen,
       
 31261       innerRef = _ref.innerRef,
       
 31262       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isEnabled", "onToggle", "isOpen", "innerRef"]);
       
 31263 
       
 31264   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/edit-post/toggle-block-navigation', Object(external_this_wp_element_["useCallback"])(onToggle, [onToggle]), {
       
 31265     bindGlobal: true,
       
 31266     isDisabled: !isEnabled
       
 31267   });
       
 31268   var shortcut = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 31269     return select('core/keyboard-shortcuts').getShortcutRepresentation('core/edit-post/toggle-block-navigation');
       
 31270   }, []);
       
 31271   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
       
 31272     ref: innerRef,
 29954     ref: innerRef,
 31273     icon: MenuIcon,
 29955     icon: list_view["a" /* default */],
 31274     "aria-expanded": isOpen,
 29956     "aria-expanded": isOpen,
 31275     onClick: isEnabled ? onToggle : undefined,
 29957     "aria-haspopup": "true",
 31276     label: Object(external_this_wp_i18n_["__"])('Block navigation'),
 29958     onClick: isEnabled ? onToggle : undefined
       
 29959     /* translators: button label text should, if possible, be under 16 characters. */
       
 29960     ,
       
 29961     label: Object(external_wp_i18n_["__"])('List view'),
 31277     className: "block-editor-block-navigation",
 29962     className: "block-editor-block-navigation",
 31278     shortcut: shortcut,
       
 31279     "aria-disabled": !isEnabled
 29963     "aria-disabled": !isEnabled
 31280   }));
 29964   }));
 31281 }
 29965 }
 31282 
 29966 
 31283 function BlockNavigationDropdown(_ref2, ref) {
 29967 function BlockNavigationDropdown({
 31284   var isDisabled = _ref2.isDisabled,
 29968   isDisabled,
 31285       __experimentalFeatures = _ref2.__experimentalFeatures,
 29969   __experimentalFeatures,
 31286       props = Object(objectWithoutProperties["a" /* default */])(_ref2, ["isDisabled", "__experimentalFeatures"]);
 29970   ...props
 31287 
 29971 }, ref) {
 31288   var hasBlocks = Object(external_this_wp_data_["useSelect"])(function (select) {
 29972   const hasBlocks = Object(external_wp_data_["useSelect"])(select => !!select(store).getBlockCount(), []);
 31289     return !!select('core/block-editor').getBlockCount();
 29973   const isEnabled = hasBlocks && !isDisabled;
 31290   }, []);
 29974   return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
 31291   var isEnabled = hasBlocks && !isDisabled;
       
 31292   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
       
 31293     contentClassName: "block-editor-block-navigation__popover",
 29975     contentClassName: "block-editor-block-navigation__popover",
 31294     position: "bottom right",
 29976     position: "bottom right",
 31295     renderToggle: function renderToggle(_ref3) {
 29977     renderToggle: ({
 31296       var isOpen = _ref3.isOpen,
 29978       isOpen,
 31297           onToggle = _ref3.onToggle;
 29979       onToggle
 31298       return Object(external_this_wp_element_["createElement"])(BlockNavigationDropdownToggle, Object(esm_extends["a" /* default */])({}, props, {
 29980     }) => Object(external_wp_element_["createElement"])(BlockNavigationDropdownToggle, Object(esm_extends["a" /* default */])({}, props, {
 31299         innerRef: ref,
 29981       innerRef: ref,
 31300         isOpen: isOpen,
 29982       isOpen: isOpen,
 31301         onToggle: onToggle,
 29983       onToggle: onToggle,
 31302         isEnabled: isEnabled
 29984       isEnabled: isEnabled
 31303       }));
 29985     })),
 31304     },
 29986     renderContent: () => Object(external_wp_element_["createElement"])("div", {
 31305     renderContent: function renderContent(_ref4) {
 29987       className: "block-editor-block-navigation__container"
 31306       var onClose = _ref4.onClose;
 29988     }, Object(external_wp_element_["createElement"])("p", {
 31307       return Object(external_this_wp_element_["createElement"])(block_navigation, {
 29989       className: "block-editor-block-navigation__label"
 31308         onSelect: onClose,
 29990     }, Object(external_wp_i18n_["__"])('List view')), Object(external_wp_element_["createElement"])(BlockNavigationTree, {
 31309         __experimentalFeatures: __experimentalFeatures
 29991       showNestedBlocks: true,
 31310       });
 29992       showOnlyCurrentHierarchy: true,
 31311     }
 29993       __experimentalFeatures: __experimentalFeatures
       
 29994     }))
 31312   });
 29995   });
 31313 }
 29996 }
 31314 
 29997 
 31315 /* harmony default export */ var dropdown = (Object(external_this_wp_element_["forwardRef"])(BlockNavigationDropdown));
 29998 /* harmony default export */ var dropdown = (Object(external_wp_element_["forwardRef"])(BlockNavigationDropdown));
 31316 
       
 31317 // EXTERNAL MODULE: external {"this":["wp","shortcode"]}
       
 31318 var external_this_wp_shortcode_ = __webpack_require__(125);
       
 31319 
 29999 
 31320 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/remove-browser-shortcuts.js
 30000 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/remove-browser-shortcuts.js
 31321 
 30001 
 31322 
 30002 
 31323 /**
 30003 /**
 31334  * Set of keyboard shortcuts handled internally by RichText.
 30014  * Set of keyboard shortcuts handled internally by RichText.
 31335  *
 30015  *
 31336  * @type {Array}
 30016  * @type {Array}
 31337  */
 30017  */
 31338 
 30018 
 31339 var HANDLED_SHORTCUTS = [external_this_wp_keycodes_["rawShortcut"].primary('z'), external_this_wp_keycodes_["rawShortcut"].primaryShift('z'), external_this_wp_keycodes_["rawShortcut"].primary('y')];
 30019 const HANDLED_SHORTCUTS = [external_wp_keycodes_["rawShortcut"].primary('z'), external_wp_keycodes_["rawShortcut"].primaryShift('z'), external_wp_keycodes_["rawShortcut"].primary('y')];
 31340 /**
 30020 /**
 31341  * An instance of a KeyboardShortcuts element pre-bound for the handled
 30021  * An instance of a KeyboardShortcuts element pre-bound for the handled
 31342  * shortcuts. Since shortcuts never change, the element can be considered
 30022  * shortcuts. Since shortcuts never change, the element can be considered
 31343  * static, and can be skipped in reconciliation.
 30023  * static, and can be skipped in reconciliation.
 31344  *
 30024  *
 31345  * @type {WPElement}
 30025  * @type {WPElement}
 31346  */
 30026  */
 31347 
 30027 
 31348 var SHORTCUTS_ELEMENT = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["KeyboardShortcuts"], {
 30028 const SHORTCUTS_ELEMENT = Object(external_wp_element_["createElement"])(external_wp_components_["KeyboardShortcuts"], {
 31349   bindGlobal: true,
 30029   bindGlobal: true,
 31350   shortcuts: Object(external_this_lodash_["fromPairs"])(HANDLED_SHORTCUTS.map(function (shortcut) {
 30030   shortcuts: Object(external_lodash_["fromPairs"])(HANDLED_SHORTCUTS.map(shortcut => {
 31351     return [shortcut, function (event) {
 30031     return [shortcut, event => event.preventDefault()];
 31352       return event.preventDefault();
       
 31353     }];
       
 31354   }))
 30032   }))
 31355 });
 30033 });
 31356 /**
 30034 /**
 31357  * Component which registered keyboard event handlers to prevent default
 30035  * Component which registered keyboard event handlers to prevent default
 31358  * behaviors for key combinations otherwise handled internally by RichText.
 30036  * behaviors for key combinations otherwise handled internally by RichText.
 31359  *
 30037  *
 31360  * @return {WPComponent} The component to be rendered.
 30038  * @return {WPComponent} The component to be rendered.
 31361  */
 30039  */
 31362 
 30040 
 31363 var RemoveBrowserShortcuts = function RemoveBrowserShortcuts() {
 30041 const RemoveBrowserShortcuts = () => SHORTCUTS_ELEMENT;
 31364   return SHORTCUTS_ELEMENT;
 30042 
 31365 };
 30043 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/format-toolbar/index.js
 31366 
 30044 
 31367 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/file-paste-handler.js
 30045 
       
 30046 /**
       
 30047  * External dependencies
       
 30048  */
       
 30049 
 31368 /**
 30050 /**
 31369  * WordPress dependencies
 30051  * WordPress dependencies
 31370  */
 30052  */
 31371 
 30053 
 31372 function filePasteHandler(files) {
 30054 
 31373   return files.filter(function (_ref) {
 30055 
 31374     var type = _ref.type;
 30056 
 31375     return /^image\/(?:jpe?g|png|gif)$/.test(type);
 30057 const format_toolbar_POPOVER_PROPS = {
 31376   }).map(function (file) {
       
 31377     return "<img src=\"".concat(Object(external_this_wp_blob_["createBlobURL"])(file), "\">");
       
 31378   }).join('');
       
 31379 }
       
 31380 
       
 31381 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/format-toolbar/index.js
       
 31382 
       
 31383 
       
 31384 
       
 31385 /**
       
 31386  * External dependencies
       
 31387  */
       
 31388 
       
 31389 /**
       
 31390  * WordPress dependencies
       
 31391  */
       
 31392 
       
 31393 
       
 31394 
       
 31395 
       
 31396 var format_toolbar_POPOVER_PROPS = {
       
 31397   position: 'bottom right',
 30058   position: 'bottom right',
 31398   isAlternate: true
 30059   isAlternate: true
 31399 };
 30060 };
 31400 
 30061 
 31401 var format_toolbar_FormatToolbar = function FormatToolbar() {
 30062 const FormatToolbar = () => {
 31402   return Object(external_this_wp_element_["createElement"])("div", {
 30063   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, ['bold', 'italic', 'link', 'text-color'].map(format => Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], {
 31403     className: "block-editor-format-toolbar"
 30064     name: `RichText.ToolbarControls.${format}`,
 31404   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, ['bold', 'italic', 'link', 'text-color'].map(function (format) {
 30065     key: format
 31405     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Slot"], {
 30066   })), Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], {
 31406       name: "RichText.ToolbarControls.".concat(format),
       
 31407       key: format
       
 31408     });
       
 31409   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Slot"], {
       
 31410     name: "RichText.ToolbarControls"
 30067     name: "RichText.ToolbarControls"
 31411   }, function (fills) {
 30068   }, fills => fills.length !== 0 && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], null, toggleProps => Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
 31412     return fills.length !== 0 && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalToolbarItem"], null, function (toggleProps) {
 30069     icon: chevron_down["a" /* default */]
 31413       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["DropdownMenu"], {
 30070     /* translators: button label text should, if possible, be under 16 characters. */
 31414         icon: chevron_down["a" /* default */],
 30071     ,
 31415         label: Object(external_this_wp_i18n_["__"])('More rich text controls'),
 30072     label: Object(external_wp_i18n_["__"])('More'),
 31416         toggleProps: toggleProps,
 30073     toggleProps: toggleProps,
 31417         controls: Object(external_this_lodash_["orderBy"])(fills.map(function (_ref) {
 30074     controls: Object(external_lodash_["orderBy"])(fills.map(([{
 31418           var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 1),
 30075       props
 31419               props = _ref2[0].props;
 30076     }]) => props), 'title'),
 31420 
 30077     popoverProps: format_toolbar_POPOVER_PROPS
 31421           return props;
 30078   }))));
 31422         }), 'title'),
       
 31423         popoverProps: format_toolbar_POPOVER_PROPS
       
 31424       });
       
 31425     });
       
 31426   })));
       
 31427 };
 30079 };
 31428 
 30080 
 31429 /* harmony default export */ var format_toolbar = (format_toolbar_FormatToolbar);
 30081 /* harmony default export */ var format_toolbar = (FormatToolbar);
 31430 
 30082 
 31431 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/format-toolbar-container.js
 30083 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/format-toolbar-container.js
 31432 
 30084 
 31433 
 30085 
 31434 /**
 30086 /**
 31440  */
 30092  */
 31441 
 30093 
 31442 
 30094 
 31443 
 30095 
 31444 
 30096 
 31445 var format_toolbar_container_FormatToolbarContainer = function FormatToolbarContainer(_ref) {
 30097 const FormatToolbarContainer = ({
 31446   var inline = _ref.inline,
 30098   inline,
 31447       anchorRef = _ref.anchorRef;
 30099   anchorRef
 31448 
 30100 }) => {
 31449   if (inline) {
 30101   if (inline) {
 31450     // Render in popover
 30102     // Render in popover
 31451     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Popover"], {
 30103     return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
 31452       noArrow: true,
 30104       noArrow: true,
 31453       position: "top center",
 30105       position: "top center",
 31454       focusOnMount: false,
 30106       focusOnMount: false,
 31455       anchorRef: anchorRef,
 30107       anchorRef: anchorRef,
 31456       className: "block-editor-rich-text__inline-format-toolbar"
 30108       className: "block-editor-rich-text__inline-format-toolbar",
 31457     }, Object(external_this_wp_element_["createElement"])(format_toolbar, null));
 30109       __unstableSlotName: "block-toolbar"
       
 30110     }, Object(external_wp_element_["createElement"])("div", {
       
 30111       className: "block-editor-rich-text__inline-format-toolbar-group"
       
 30112     }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(format_toolbar, null))));
 31458   } // Render regular toolbar
 30113   } // Render regular toolbar
 31459 
 30114 
 31460 
 30115 
 31461   return Object(external_this_wp_element_["createElement"])(block_format_controls, null, Object(external_this_wp_element_["createElement"])(format_toolbar, null));
 30116   return Object(external_wp_element_["createElement"])(block_controls, {
       
 30117     group: "inline"
       
 30118   }, Object(external_wp_element_["createElement"])(format_toolbar, null));
 31462 };
 30119 };
 31463 
 30120 
 31464 /* harmony default export */ var format_toolbar_container = (format_toolbar_container_FormatToolbarContainer);
 30121 /* harmony default export */ var format_toolbar_container = (FormatToolbarContainer);
 31465 
 30122 
 31466 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/index.js
 30123 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-undo-automatic-change.js
 31467 
       
 31468 
       
 31469 
       
 31470 
       
 31471 
       
 31472 
       
 31473 
       
 31474 function rich_text_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; }
       
 31475 
       
 31476 function rich_text_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { rich_text_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 { rich_text_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 31477 
       
 31478 /**
       
 31479  * External dependencies
       
 31480  */
       
 31481 
       
 31482 
       
 31483 /**
 30124 /**
 31484  * WordPress dependencies
 30125  * WordPress dependencies
 31485  */
 30126  */
 31486 
 30127 
 31487 
 30128 
 31488 
 30129 
 31489 
       
 31490 
       
 31491 
       
 31492 
       
 31493 
       
 31494 
       
 31495 /**
 30130 /**
 31496  * Internal dependencies
 30131  * Internal dependencies
 31497  */
 30132  */
 31498 
 30133 
 31499 
 30134 
 31500 
 30135 function useUndoAutomaticChange() {
 31501 
 30136   const {
 31502 
 30137     didAutomaticChange,
 31503 
 30138     getSettings
 31504 var wrapperClasses = 'block-editor-rich-text';
 30139   } = Object(external_wp_data_["useSelect"])(store);
 31505 var rich_text_classes = 'block-editor-rich-text__editable';
 30140   return Object(external_wp_compose_["useRefEffect"])(element => {
       
 30141     function onKeyDown(event) {
       
 30142       const {
       
 30143         keyCode
       
 30144       } = event;
       
 30145 
       
 30146       if (keyCode !== external_wp_keycodes_["DELETE"] && keyCode !== external_wp_keycodes_["BACKSPACE"] && keyCode !== external_wp_keycodes_["ESCAPE"]) {
       
 30147         return;
       
 30148       }
       
 30149 
       
 30150       if (!didAutomaticChange()) {
       
 30151         return;
       
 30152       }
       
 30153 
       
 30154       event.preventDefault();
       
 30155 
       
 30156       getSettings().__experimentalUndo();
       
 30157     }
       
 30158 
       
 30159     element.addEventListener('keydown', onKeyDown);
       
 30160     return () => {
       
 30161       element.removeEventListener('keydown', onKeyDown);
       
 30162     };
       
 30163   }, []);
       
 30164 }
       
 30165 
       
 30166 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-caret-in-format.js
       
 30167 /**
       
 30168  * WordPress dependencies
       
 30169  */
       
 30170 
       
 30171 
       
 30172 /**
       
 30173  * Internal dependencies
       
 30174  */
       
 30175 
       
 30176 
       
 30177 function useCaretInFormat({
       
 30178   value
       
 30179 }) {
       
 30180   const hasActiveFormats = value.activeFormats && !!value.activeFormats.length;
       
 30181   const {
       
 30182     isCaretWithinFormattedText
       
 30183   } = Object(external_wp_data_["useSelect"])(store);
       
 30184   const {
       
 30185     enterFormattedText,
       
 30186     exitFormattedText
       
 30187   } = Object(external_wp_data_["useDispatch"])(store);
       
 30188   Object(external_wp_element_["useEffect"])(() => {
       
 30189     if (hasActiveFormats) {
       
 30190       if (!isCaretWithinFormattedText()) {
       
 30191         enterFormattedText();
       
 30192       }
       
 30193     } else if (isCaretWithinFormattedText()) {
       
 30194       exitFormattedText();
       
 30195     }
       
 30196   }, [hasActiveFormats]);
       
 30197 }
       
 30198 
       
 30199 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-mark-persistent.js
       
 30200 /**
       
 30201  * WordPress dependencies
       
 30202  */
       
 30203 
       
 30204 
       
 30205 /**
       
 30206  * Internal dependencies
       
 30207  */
       
 30208 
       
 30209 
       
 30210 function useMarkPersistent({
       
 30211   html,
       
 30212   value
       
 30213 }) {
       
 30214   const previousText = Object(external_wp_element_["useRef"])();
       
 30215   const hasActiveFormats = value.activeFormats && !!value.activeFormats.length;
       
 30216   const {
       
 30217     __unstableMarkLastChangeAsPersistent
       
 30218   } = Object(external_wp_data_["useDispatch"])(store); // Must be set synchronously to make sure it applies to the last change.
       
 30219 
       
 30220   Object(external_wp_element_["useLayoutEffect"])(() => {
       
 30221     // Ignore mount.
       
 30222     if (!previousText.current) {
       
 30223       previousText.current = value.text;
       
 30224       return;
       
 30225     } // Text input, so don't create an undo level for every character.
       
 30226     // Create an undo level after 1 second of no input.
       
 30227 
       
 30228 
       
 30229     if (previousText.current !== value.text) {
       
 30230       const timeout = window.setTimeout(() => {
       
 30231         __unstableMarkLastChangeAsPersistent();
       
 30232       }, 1000);
       
 30233       previousText.current = value.text;
       
 30234       return () => {
       
 30235         window.clearTimeout(timeout);
       
 30236       };
       
 30237     }
       
 30238 
       
 30239     __unstableMarkLastChangeAsPersistent();
       
 30240   }, [html, hasActiveFormats]);
       
 30241 }
       
 30242 
       
 30243 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/file-paste-handler.js
       
 30244 /**
       
 30245  * WordPress dependencies
       
 30246  */
       
 30247 
       
 30248 function filePasteHandler(files) {
       
 30249   return files.filter(({
       
 30250     type
       
 30251   }) => /^image\/(?:jpe?g|png|gif)$/.test(type)).map(file => `<img src="${Object(external_wp_blob_["createBlobURL"])(file)}">`).join('');
       
 30252 }
       
 30253 
       
 30254 // EXTERNAL MODULE: external ["wp","shortcode"]
       
 30255 var external_wp_shortcode_ = __webpack_require__("SVSp");
       
 30256 
       
 30257 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/utils.js
       
 30258 /**
       
 30259  * WordPress dependencies
       
 30260  */
       
 30261 
       
 30262 
       
 30263 function addActiveFormats(value, activeFormats) {
       
 30264   if (activeFormats !== null && activeFormats !== void 0 && activeFormats.length) {
       
 30265     let index = value.formats.length;
       
 30266 
       
 30267     while (index--) {
       
 30268       value.formats[index] = [...activeFormats, ...(value.formats[index] || [])];
       
 30269     }
       
 30270   }
       
 30271 }
 31506 /**
 30272 /**
 31507  * Get the multiline tag based on the multiline prop.
 30273  * Get the multiline tag based on the multiline prop.
 31508  *
 30274  *
 31509  * @param {?(string|boolean)} multiline The multiline prop.
 30275  * @param {?(string|boolean)} multiline The multiline prop.
 31510  *
 30276  *
 31516     return;
 30282     return;
 31517   }
 30283   }
 31518 
 30284 
 31519   return multiline === true ? 'p' : multiline;
 30285   return multiline === true ? 'p' : multiline;
 31520 }
 30286 }
 31521 
 30287 function getAllowedFormats({
 31522 function getAllowedFormats(_ref) {
 30288   allowedFormats,
 31523   var allowedFormats = _ref.allowedFormats,
 30289   formattingControls,
 31524       formattingControls = _ref.formattingControls,
 30290   disableFormats
 31525       disableFormats = _ref.disableFormats;
 30291 }) {
 31526 
       
 31527   if (disableFormats) {
 30292   if (disableFormats) {
 31528     return getAllowedFormats.EMPTY_ARRAY;
 30293     return getAllowedFormats.EMPTY_ARRAY;
 31529   }
 30294   }
 31530 
 30295 
 31531   if (!allowedFormats && !formattingControls) {
 30296   if (!allowedFormats && !formattingControls) {
 31534 
 30299 
 31535   if (allowedFormats) {
 30300   if (allowedFormats) {
 31536     return allowedFormats;
 30301     return allowedFormats;
 31537   }
 30302   }
 31538 
 30303 
 31539   external_this_wp_deprecated_default()('wp.blockEditor.RichText formattingControls prop', {
 30304   external_wp_deprecated_default()('wp.blockEditor.RichText formattingControls prop', {
       
 30305     since: '5.4',
 31540     alternative: 'allowedFormats'
 30306     alternative: 'allowedFormats'
 31541   });
 30307   });
 31542   return formattingControls.map(function (name) {
 30308   return formattingControls.map(name => `core/${name}`);
 31543     return "core/".concat(name);
 30309 }
       
 30310 getAllowedFormats.EMPTY_ARRAY = [];
       
 30311 const isShortcode = text => Object(external_wp_shortcode_["regexp"])('.*').test(text);
       
 30312 
       
 30313 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/split-value.js
       
 30314 /**
       
 30315  * WordPress dependencies
       
 30316  */
       
 30317 
       
 30318 /*
       
 30319  * Signals to the RichText owner that the block can be replaced with two blocks
       
 30320  * as a result of splitting the block by pressing enter, or with blocks as a
       
 30321  * result of splitting the block by pasting block content in the instance.
       
 30322  */
       
 30323 
       
 30324 function splitValue({
       
 30325   value,
       
 30326   pastedBlocks = [],
       
 30327   onReplace,
       
 30328   onSplit,
       
 30329   onSplitMiddle,
       
 30330   multilineTag
       
 30331 }) {
       
 30332   if (!onReplace || !onSplit) {
       
 30333     return;
       
 30334   }
       
 30335 
       
 30336   const blocks = [];
       
 30337   const [before, after] = Object(external_wp_richText_["split"])(value);
       
 30338   const hasPastedBlocks = pastedBlocks.length > 0;
       
 30339   let lastPastedBlockIndex = -1; // Consider the after value to be the original it is not empty and the
       
 30340   // before value *is* empty.
       
 30341 
       
 30342   const isAfterOriginal = Object(external_wp_richText_["isEmpty"])(before) && !Object(external_wp_richText_["isEmpty"])(after); // Create a block with the content before the caret if there's no pasted
       
 30343   // blocks, or if there are pasted blocks and the value is not empty. We do
       
 30344   // not want a leading empty block on paste, but we do if split with e.g. the
       
 30345   // enter key.
       
 30346 
       
 30347   if (!hasPastedBlocks || !Object(external_wp_richText_["isEmpty"])(before)) {
       
 30348     blocks.push(onSplit(Object(external_wp_richText_["toHTMLString"])({
       
 30349       value: before,
       
 30350       multilineTag
       
 30351     }), !isAfterOriginal));
       
 30352     lastPastedBlockIndex += 1;
       
 30353   }
       
 30354 
       
 30355   if (hasPastedBlocks) {
       
 30356     blocks.push(...pastedBlocks);
       
 30357     lastPastedBlockIndex += pastedBlocks.length;
       
 30358   } else if (onSplitMiddle) {
       
 30359     blocks.push(onSplitMiddle());
       
 30360   } // If there's pasted blocks, append a block with non empty content / after
       
 30361   // the caret. Otherwise, do append an empty block if there is no
       
 30362   // `onSplitMiddle` prop, but if there is and the content is empty, the
       
 30363   // middle block is enough to set focus in.
       
 30364 
       
 30365 
       
 30366   if (hasPastedBlocks ? !Object(external_wp_richText_["isEmpty"])(after) : !onSplitMiddle || !Object(external_wp_richText_["isEmpty"])(after)) {
       
 30367     blocks.push(onSplit(Object(external_wp_richText_["toHTMLString"])({
       
 30368       value: after,
       
 30369       multilineTag
       
 30370     }), isAfterOriginal));
       
 30371   } // If there are pasted blocks, set the selection to the last one. Otherwise,
       
 30372   // set the selection to the second block.
       
 30373 
       
 30374 
       
 30375   const indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1; // If there are pasted blocks, move the caret to the end of the selected
       
 30376   // block Otherwise, retain the default value.
       
 30377 
       
 30378   const initialPosition = hasPastedBlocks ? -1 : 0;
       
 30379   onReplace(blocks, indexToSelect, initialPosition);
       
 30380 }
       
 30381 
       
 30382 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-paste-handler.js
       
 30383 /**
       
 30384  * WordPress dependencies
       
 30385  */
       
 30386 
       
 30387 
       
 30388 
       
 30389 
       
 30390 
       
 30391 
       
 30392 /**
       
 30393  * Internal dependencies
       
 30394  */
       
 30395 
       
 30396 
       
 30397 
       
 30398 
       
 30399 function usePasteHandler(props) {
       
 30400   const propsRef = Object(external_wp_element_["useRef"])(props);
       
 30401   propsRef.current = props;
       
 30402   return Object(external_wp_compose_["useRefEffect"])(element => {
       
 30403     function _onPaste(event) {
       
 30404       const {
       
 30405         isSelected,
       
 30406         disableFormats,
       
 30407         onChange,
       
 30408         value,
       
 30409         formatTypes,
       
 30410         tagName,
       
 30411         onReplace,
       
 30412         onSplit,
       
 30413         onSplitMiddle,
       
 30414         __unstableEmbedURLOnPaste,
       
 30415         multilineTag,
       
 30416         preserveWhiteSpace,
       
 30417         pastePlainText
       
 30418       } = propsRef.current;
       
 30419 
       
 30420       if (!isSelected) {
       
 30421         event.preventDefault();
       
 30422         return;
       
 30423       }
       
 30424 
       
 30425       const {
       
 30426         clipboardData
       
 30427       } = event;
       
 30428       let plainText = '';
       
 30429       let html = ''; // IE11 only supports `Text` as an argument for `getData` and will
       
 30430       // otherwise throw an invalid argument error, so we try the standard
       
 30431       // arguments first, then fallback to `Text` if they fail.
       
 30432 
       
 30433       try {
       
 30434         plainText = clipboardData.getData('text/plain');
       
 30435         html = clipboardData.getData('text/html');
       
 30436       } catch (error1) {
       
 30437         try {
       
 30438           html = clipboardData.getData('Text');
       
 30439         } catch (error2) {
       
 30440           // Some browsers like UC Browser paste plain text by default and
       
 30441           // don't support clipboardData at all, so allow default
       
 30442           // behaviour.
       
 30443           return;
       
 30444         }
       
 30445       }
       
 30446 
       
 30447       event.preventDefault(); // Allows us to ask for this information when we get a report.
       
 30448 
       
 30449       window.console.log('Received HTML:\n\n', html);
       
 30450       window.console.log('Received plain text:\n\n', plainText);
       
 30451 
       
 30452       if (disableFormats) {
       
 30453         onChange(Object(external_wp_richText_["insert"])(value, plainText));
       
 30454         return;
       
 30455       }
       
 30456 
       
 30457       const transformed = formatTypes.reduce((accumlator, {
       
 30458         __unstablePasteRule
       
 30459       }) => {
       
 30460         // Only allow one transform.
       
 30461         if (__unstablePasteRule && accumlator === value) {
       
 30462           accumlator = __unstablePasteRule(value, {
       
 30463             html,
       
 30464             plainText
       
 30465           });
       
 30466         }
       
 30467 
       
 30468         return accumlator;
       
 30469       }, value);
       
 30470 
       
 30471       if (transformed !== value) {
       
 30472         onChange(transformed);
       
 30473         return;
       
 30474       }
       
 30475 
       
 30476       const files = [...Object(external_wp_dom_["getFilesFromDataTransfer"])(clipboardData)];
       
 30477       const isInternal = clipboardData.getData('rich-text') === 'true'; // If the data comes from a rich text instance, we can directly use it
       
 30478       // without filtering the data. The filters are only meant for externally
       
 30479       // pasted content and remove inline styles.
       
 30480 
       
 30481       if (isInternal) {
       
 30482         const pastedValue = Object(external_wp_richText_["create"])({
       
 30483           html,
       
 30484           multilineTag,
       
 30485           multilineWrapperTags: multilineTag === 'li' ? ['ul', 'ol'] : undefined,
       
 30486           preserveWhiteSpace
       
 30487         });
       
 30488         addActiveFormats(pastedValue, value.activeFormats);
       
 30489         onChange(Object(external_wp_richText_["insert"])(value, pastedValue));
       
 30490         return;
       
 30491       }
       
 30492 
       
 30493       if (pastePlainText) {
       
 30494         onChange(Object(external_wp_richText_["insert"])(value, Object(external_wp_richText_["create"])({
       
 30495           text: plainText
       
 30496         })));
       
 30497         return;
       
 30498       } // Only process file if no HTML is present.
       
 30499       // Note: a pasted file may have the URL as plain text.
       
 30500 
       
 30501 
       
 30502       if (files && files.length && !html) {
       
 30503         const content = Object(external_wp_blocks_["pasteHandler"])({
       
 30504           HTML: filePasteHandler(files),
       
 30505           mode: 'BLOCKS',
       
 30506           tagName,
       
 30507           preserveWhiteSpace
       
 30508         }); // Allows us to ask for this information when we get a report.
       
 30509         // eslint-disable-next-line no-console
       
 30510 
       
 30511         window.console.log('Received items:\n\n', files);
       
 30512 
       
 30513         if (onReplace && Object(external_wp_richText_["isEmpty"])(value)) {
       
 30514           onReplace(content);
       
 30515         } else {
       
 30516           splitValue({
       
 30517             value,
       
 30518             pastedBlocks: content,
       
 30519             onReplace,
       
 30520             onSplit,
       
 30521             onSplitMiddle,
       
 30522             multilineTag
       
 30523           });
       
 30524         }
       
 30525 
       
 30526         return;
       
 30527       }
       
 30528 
       
 30529       let mode = onReplace && onSplit ? 'AUTO' : 'INLINE'; // Force the blocks mode when the user is pasting
       
 30530       // on a new line & the content resembles a shortcode.
       
 30531       // Otherwise it's going to be detected as inline
       
 30532       // and the shortcode won't be replaced.
       
 30533 
       
 30534       if (mode === 'AUTO' && Object(external_wp_richText_["isEmpty"])(value) && isShortcode(plainText)) {
       
 30535         mode = 'BLOCKS';
       
 30536       }
       
 30537 
       
 30538       if (__unstableEmbedURLOnPaste && Object(external_wp_richText_["isEmpty"])(value) && Object(external_wp_url_["isURL"])(plainText.trim())) {
       
 30539         mode = 'BLOCKS';
       
 30540       }
       
 30541 
       
 30542       const content = Object(external_wp_blocks_["pasteHandler"])({
       
 30543         HTML: html,
       
 30544         plainText,
       
 30545         mode,
       
 30546         tagName,
       
 30547         preserveWhiteSpace
       
 30548       });
       
 30549 
       
 30550       if (typeof content === 'string') {
       
 30551         let valueToInsert = Object(external_wp_richText_["create"])({
       
 30552           html: content
       
 30553         });
       
 30554         addActiveFormats(valueToInsert, value.activeFormats); // If the content should be multiline, we should process text
       
 30555         // separated by a line break as separate lines.
       
 30556 
       
 30557         if (multilineTag) {
       
 30558           valueToInsert = Object(external_wp_richText_["replace"])(valueToInsert, /\n+/g, external_wp_richText_["__UNSTABLE_LINE_SEPARATOR"]);
       
 30559         }
       
 30560 
       
 30561         onChange(Object(external_wp_richText_["insert"])(value, valueToInsert));
       
 30562       } else if (content.length > 0) {
       
 30563         if (onReplace && Object(external_wp_richText_["isEmpty"])(value)) {
       
 30564           onReplace(content, content.length - 1, -1);
       
 30565         } else {
       
 30566           splitValue({
       
 30567             value,
       
 30568             pastedBlocks: content,
       
 30569             onReplace,
       
 30570             onSplit,
       
 30571             onSplitMiddle,
       
 30572             multilineTag
       
 30573           });
       
 30574         }
       
 30575       }
       
 30576     }
       
 30577 
       
 30578     element.addEventListener('paste', _onPaste);
       
 30579     return () => {
       
 30580       element.removeEventListener('paste', _onPaste);
       
 30581     };
       
 30582   }, []);
       
 30583 }
       
 30584 
       
 30585 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-input-rules.js
       
 30586 /**
       
 30587  * WordPress dependencies
       
 30588  */
       
 30589 
       
 30590 
       
 30591 
       
 30592 
       
 30593 
       
 30594 /**
       
 30595  * Internal dependencies
       
 30596  */
       
 30597 
       
 30598 
       
 30599 function useInputRules(props) {
       
 30600   const {
       
 30601     __unstableMarkLastChangeAsPersistent,
       
 30602     __unstableMarkAutomaticChange
       
 30603   } = Object(external_wp_data_["useDispatch"])(store);
       
 30604   const propsRef = Object(external_wp_element_["useRef"])(props);
       
 30605   propsRef.current = props;
       
 30606   return Object(external_wp_compose_["useRefEffect"])(element => {
       
 30607     function inputRule() {
       
 30608       const {
       
 30609         value,
       
 30610         onReplace
       
 30611       } = propsRef.current;
       
 30612 
       
 30613       if (!onReplace) {
       
 30614         return;
       
 30615       }
       
 30616 
       
 30617       const {
       
 30618         start,
       
 30619         text
       
 30620       } = value;
       
 30621       const characterBefore = text.slice(start - 1, start); // The character right before the caret must be a plain space.
       
 30622 
       
 30623       if (characterBefore !== ' ') {
       
 30624         return;
       
 30625       }
       
 30626 
       
 30627       const trimmedTextBefore = text.slice(0, start).trim();
       
 30628       const prefixTransforms = Object(external_wp_blocks_["getBlockTransforms"])('from').filter(({
       
 30629         type
       
 30630       }) => type === 'prefix');
       
 30631       const transformation = Object(external_wp_blocks_["findTransform"])(prefixTransforms, ({
       
 30632         prefix
       
 30633       }) => {
       
 30634         return trimmedTextBefore === prefix;
       
 30635       });
       
 30636 
       
 30637       if (!transformation) {
       
 30638         return;
       
 30639       }
       
 30640 
       
 30641       const content = Object(external_wp_richText_["toHTMLString"])({
       
 30642         value: Object(external_wp_richText_["slice"])(value, start, text.length)
       
 30643       });
       
 30644       const block = transformation.transform(content);
       
 30645       onReplace([block]);
       
 30646 
       
 30647       __unstableMarkAutomaticChange();
       
 30648     }
       
 30649 
       
 30650     function onInput(event) {
       
 30651       const {
       
 30652         inputType,
       
 30653         type
       
 30654       } = event;
       
 30655       const {
       
 30656         value,
       
 30657         onChange,
       
 30658         __unstableAllowPrefixTransformations,
       
 30659         formatTypes
       
 30660       } = propsRef.current; // Only run input rules when inserting text.
       
 30661 
       
 30662       if (inputType !== 'insertText' && type !== 'compositionend') {
       
 30663         return;
       
 30664       }
       
 30665 
       
 30666       if (__unstableAllowPrefixTransformations && inputRule) {
       
 30667         inputRule();
       
 30668       }
       
 30669 
       
 30670       const transformed = formatTypes.reduce((accumlator, {
       
 30671         __unstableInputRule
       
 30672       }) => {
       
 30673         if (__unstableInputRule) {
       
 30674           accumlator = __unstableInputRule(accumlator);
       
 30675         }
       
 30676 
       
 30677         return accumlator;
       
 30678       }, value);
       
 30679 
       
 30680       if (transformed !== value) {
       
 30681         __unstableMarkLastChangeAsPersistent();
       
 30682 
       
 30683         onChange({ ...transformed,
       
 30684           activeFormats: value.activeFormats
       
 30685         });
       
 30686 
       
 30687         __unstableMarkAutomaticChange();
       
 30688       }
       
 30689     }
       
 30690 
       
 30691     element.addEventListener('input', onInput);
       
 30692     element.addEventListener('compositionend', onInput);
       
 30693     return () => {
       
 30694       element.removeEventListener('input', onInput);
       
 30695       element.removeEventListener('compositionend', onInput);
       
 30696     };
       
 30697   }, []);
       
 30698 }
       
 30699 
       
 30700 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-enter.js
       
 30701 /**
       
 30702  * WordPress dependencies
       
 30703  */
       
 30704 
       
 30705 /**
       
 30706  * WordPress dependencies
       
 30707  */
       
 30708 
       
 30709 
       
 30710 
       
 30711 
       
 30712 
       
 30713 
       
 30714 /**
       
 30715  * Internal dependencies
       
 30716  */
       
 30717 
       
 30718 
       
 30719 
       
 30720 function useEnter(props) {
       
 30721   const {
       
 30722     __unstableMarkAutomaticChange
       
 30723   } = Object(external_wp_data_["useDispatch"])(store);
       
 30724   const propsRef = Object(external_wp_element_["useRef"])(props);
       
 30725   propsRef.current = props;
       
 30726   return Object(external_wp_compose_["useRefEffect"])(element => {
       
 30727     function onKeyDown(event) {
       
 30728       if (event.defaultPrevented) {
       
 30729         return;
       
 30730       }
       
 30731 
       
 30732       const {
       
 30733         removeEditorOnlyFormats,
       
 30734         value,
       
 30735         onReplace,
       
 30736         onSplit,
       
 30737         onSplitMiddle,
       
 30738         multilineTag,
       
 30739         onChange,
       
 30740         disableLineBreaks,
       
 30741         onSplitAtEnd
       
 30742       } = propsRef.current;
       
 30743 
       
 30744       if (event.keyCode !== external_wp_keycodes_["ENTER"]) {
       
 30745         return;
       
 30746       }
       
 30747 
       
 30748       event.preventDefault();
       
 30749       const _value = { ...value
       
 30750       };
       
 30751       _value.formats = removeEditorOnlyFormats(value);
       
 30752       const canSplit = onReplace && onSplit;
       
 30753 
       
 30754       if (onReplace) {
       
 30755         const transforms = Object(external_wp_blocks_["getBlockTransforms"])('from').filter(({
       
 30756           type
       
 30757         }) => type === 'enter');
       
 30758         const transformation = Object(external_wp_blocks_["findTransform"])(transforms, item => {
       
 30759           return item.regExp.test(_value.text);
       
 30760         });
       
 30761 
       
 30762         if (transformation) {
       
 30763           onReplace([transformation.transform({
       
 30764             content: _value.text
       
 30765           })]);
       
 30766 
       
 30767           __unstableMarkAutomaticChange();
       
 30768         }
       
 30769       }
       
 30770 
       
 30771       if (multilineTag) {
       
 30772         if (event.shiftKey) {
       
 30773           if (!disableLineBreaks) {
       
 30774             onChange(Object(external_wp_richText_["insert"])(_value, '\n'));
       
 30775           }
       
 30776         } else if (canSplit && Object(external_wp_richText_["__unstableIsEmptyLine"])(_value)) {
       
 30777           splitValue({
       
 30778             value: _value,
       
 30779             onReplace,
       
 30780             onSplit,
       
 30781             onSplitMiddle,
       
 30782             multilineTag
       
 30783           });
       
 30784         } else {
       
 30785           onChange(Object(external_wp_richText_["__unstableInsertLineSeparator"])(_value));
       
 30786         }
       
 30787       } else {
       
 30788         const {
       
 30789           text,
       
 30790           start,
       
 30791           end
       
 30792         } = _value;
       
 30793         const canSplitAtEnd = onSplitAtEnd && start === end && end === text.length;
       
 30794 
       
 30795         if (event.shiftKey || !canSplit && !canSplitAtEnd) {
       
 30796           if (!disableLineBreaks) {
       
 30797             onChange(Object(external_wp_richText_["insert"])(_value, '\n'));
       
 30798           }
       
 30799         } else if (!canSplit && canSplitAtEnd) {
       
 30800           onSplitAtEnd();
       
 30801         } else if (canSplit) {
       
 30802           splitValue({
       
 30803             value: _value,
       
 30804             onReplace,
       
 30805             onSplit,
       
 30806             onSplitMiddle,
       
 30807             multilineTag
       
 30808           });
       
 30809         }
       
 30810       }
       
 30811     }
       
 30812 
       
 30813     element.addEventListener('keydown', onKeyDown);
       
 30814     return () => {
       
 30815       element.removeEventListener('keydown', onKeyDown);
       
 30816     };
       
 30817   }, []);
       
 30818 }
       
 30819 
       
 30820 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-format-types.js
       
 30821 /**
       
 30822  * WordPress dependencies
       
 30823  */
       
 30824 
       
 30825 
       
 30826 /**
       
 30827  * Internal dependencies
       
 30828  */
       
 30829 
       
 30830 
       
 30831 
       
 30832 function formatTypesSelector(select) {
       
 30833   return select(external_wp_richText_["store"]).getFormatTypes();
       
 30834 }
       
 30835 /**
       
 30836  * Set of all interactive content tags.
       
 30837  *
       
 30838  * @see https://html.spec.whatwg.org/multipage/dom.html#interactive-content
       
 30839  */
       
 30840 
       
 30841 
       
 30842 const interactiveContentTags = new Set(['a', 'audio', 'button', 'details', 'embed', 'iframe', 'input', 'label', 'select', 'textarea', 'video']);
       
 30843 /**
       
 30844  * This hook provides RichText with the `formatTypes` and its derived props from
       
 30845  * experimental format type settings.
       
 30846  *
       
 30847  * @param {Object} $0                               Options
       
 30848  * @param {string} $0.clientId                      Block client ID.
       
 30849  * @param {string} $0.identifier                    Block attribute.
       
 30850  * @param {boolean} $0.withoutInteractiveFormatting Whether to clean the interactive formattings or not.
       
 30851  * @param {Array} $0.allowedFormats                 Allowed formats
       
 30852  */
       
 30853 
       
 30854 function useFormatTypes({
       
 30855   clientId,
       
 30856   identifier,
       
 30857   withoutInteractiveFormatting,
       
 30858   allowedFormats
       
 30859 }) {
       
 30860   const allFormatTypes = Object(external_wp_data_["useSelect"])(formatTypesSelector, []);
       
 30861   const formatTypes = Object(external_wp_element_["useMemo"])(() => {
       
 30862     return allFormatTypes.filter(({
       
 30863       name,
       
 30864       tagName
       
 30865     }) => {
       
 30866       if (allowedFormats && !allowedFormats.includes(name)) {
       
 30867         return false;
       
 30868       }
       
 30869 
       
 30870       if (withoutInteractiveFormatting && interactiveContentTags.has(tagName)) {
       
 30871         return false;
       
 30872       }
       
 30873 
       
 30874       return true;
       
 30875     });
       
 30876   }, [allFormatTypes, allowedFormats, interactiveContentTags]);
       
 30877   const keyedSelected = Object(external_wp_data_["useSelect"])(select => formatTypes.reduce((accumulator, type) => {
       
 30878     if (type.__experimentalGetPropsForEditableTreePreparation) {
       
 30879       accumulator[type.name] = type.__experimentalGetPropsForEditableTreePreparation(select, {
       
 30880         richTextIdentifier: identifier,
       
 30881         blockClientId: clientId
       
 30882       });
       
 30883     }
       
 30884 
       
 30885     return accumulator;
       
 30886   }, {}), [formatTypes, clientId, identifier]);
       
 30887   const dispatch = Object(external_wp_data_["useDispatch"])();
       
 30888   const prepareHandlers = [];
       
 30889   const valueHandlers = [];
       
 30890   const changeHandlers = [];
       
 30891   const dependencies = [];
       
 30892   formatTypes.forEach(type => {
       
 30893     if (type.__experimentalCreatePrepareEditableTree) {
       
 30894       const selected = keyedSelected[type.name];
       
 30895 
       
 30896       const handler = type.__experimentalCreatePrepareEditableTree(selected, {
       
 30897         richTextIdentifier: identifier,
       
 30898         blockClientId: clientId
       
 30899       });
       
 30900 
       
 30901       if (type.__experimentalCreateOnChangeEditableValue) {
       
 30902         valueHandlers.push(handler);
       
 30903       } else {
       
 30904         prepareHandlers.push(handler);
       
 30905       }
       
 30906 
       
 30907       for (const key in selected) {
       
 30908         dependencies.push(selected[key]);
       
 30909       }
       
 30910     }
       
 30911 
       
 30912     if (type.__experimentalCreateOnChangeEditableValue) {
       
 30913       let dispatchers = {};
       
 30914 
       
 30915       if (type.__experimentalGetPropsForEditableTreeChangeHandler) {
       
 30916         dispatchers = type.__experimentalGetPropsForEditableTreeChangeHandler(dispatch, {
       
 30917           richTextIdentifier: identifier,
       
 30918           blockClientId: clientId
       
 30919         });
       
 30920       }
       
 30921 
       
 30922       changeHandlers.push(type.__experimentalCreateOnChangeEditableValue({ ...(keyedSelected[type.name] || {}),
       
 30923         ...dispatchers
       
 30924       }, {
       
 30925         richTextIdentifier: identifier,
       
 30926         blockClientId: clientId
       
 30927       }));
       
 30928     }
 31544   });
 30929   });
 31545 }
 30930   return {
 31546 
 30931     formatTypes,
 31547 getAllowedFormats.EMPTY_ARRAY = [];
 30932     prepareHandlers,
 31548 
 30933     valueHandlers,
 31549 var rich_text_isShortcode = function isShortcode(text) {
 30934     changeHandlers,
 31550   return Object(external_this_wp_shortcode_["regexp"])('.*').test(text);
 30935     dependencies
 31551 };
 30936   };
 31552 
 30937 }
 31553 function RichTextWrapper(_ref2, forwardedRef) {
 30938 
 31554   var children = _ref2.children,
 30939 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/format-edit.js
 31555       tagName = _ref2.tagName,
 30940 
 31556       originalValue = _ref2.value,
 30941 
 31557       originalOnChange = _ref2.onChange,
 30942 /**
 31558       originalIsSelected = _ref2.isSelected,
 30943  * WordPress dependencies
 31559       multiline = _ref2.multiline,
 30944  */
 31560       inlineToolbar = _ref2.inlineToolbar,
 30945 
 31561       wrapperClassName = _ref2.wrapperClassName,
 30946 function FormatEdit({
 31562       className = _ref2.className,
 30947   formatTypes,
 31563       autocompleters = _ref2.autocompleters,
 30948   onChange,
 31564       onReplace = _ref2.onReplace,
 30949   onFocus,
 31565       placeholder = _ref2.placeholder,
 30950   value,
 31566       keepPlaceholderOnFocus = _ref2.keepPlaceholderOnFocus,
 30951   forwardedRef
 31567       allowedFormats = _ref2.allowedFormats,
 30952 }) {
 31568       formattingControls = _ref2.formattingControls,
 30953   return formatTypes.map(settings => {
 31569       withoutInteractiveFormatting = _ref2.withoutInteractiveFormatting,
 30954     const {
 31570       onRemove = _ref2.onRemove,
 30955       name,
 31571       onMerge = _ref2.onMerge,
 30956       edit: Edit
 31572       onSplit = _ref2.onSplit,
 30957     } = settings;
 31573       onSplitAtEnd = _ref2.__unstableOnSplitAtEnd,
 30958 
 31574       onSplitMiddle = _ref2.__unstableOnSplitMiddle,
 30959     if (!Edit) {
 31575       identifier = _ref2.identifier,
 30960       return null;
 31576       startAttr = _ref2.start,
 30961     }
 31577       reversed = _ref2.reversed,
 30962 
 31578       style = _ref2.style,
 30963     const activeFormat = Object(external_wp_richText_["getActiveFormat"])(value, name);
 31579       preserveWhiteSpace = _ref2.preserveWhiteSpace,
 30964     const isActive = activeFormat !== undefined;
 31580       __unstableEmbedURLOnPaste = _ref2.__unstableEmbedURLOnPaste,
 30965     const activeObject = Object(external_wp_richText_["getActiveObject"])(value);
 31581       disableFormats = _ref2.__unstableDisableFormats,
 30966     const isObjectActive = activeObject !== undefined && activeObject.type === name;
 31582       disableLineBreaks = _ref2.disableLineBreaks,
 30967     return Object(external_wp_element_["createElement"])(Edit, {
 31583       props = Object(objectWithoutProperties["a" /* default */])(_ref2, ["children", "tagName", "value", "onChange", "isSelected", "multiline", "inlineToolbar", "wrapperClassName", "className", "autocompleters", "onReplace", "placeholder", "keepPlaceholderOnFocus", "allowedFormats", "formattingControls", "withoutInteractiveFormatting", "onRemove", "onMerge", "onSplit", "__unstableOnSplitAtEnd", "__unstableOnSplitMiddle", "identifier", "start", "reversed", "style", "preserveWhiteSpace", "__unstableEmbedURLOnPaste", "__unstableDisableFormats", "disableLineBreaks"]);
 30968       key: name,
 31584 
 30969       isActive: isActive,
 31585   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(RichTextWrapper);
 30970       activeAttributes: isActive ? activeFormat.attributes || {} : {},
       
 30971       isObjectActive: isObjectActive,
       
 30972       activeObjectAttributes: isObjectActive ? activeObject.attributes || {} : {},
       
 30973       value: value,
       
 30974       onChange: onChange,
       
 30975       onFocus: onFocus,
       
 30976       contentRef: forwardedRef
       
 30977     });
       
 30978   });
       
 30979 }
       
 30980 
       
 30981 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/index.js
       
 30982 
       
 30983 
       
 30984 
       
 30985 /**
       
 30986  * External dependencies
       
 30987  */
       
 30988 
       
 30989 
       
 30990 /**
       
 30991  * WordPress dependencies
       
 30992  */
       
 30993 
       
 30994 
       
 30995 
       
 30996 
       
 30997 
       
 30998 
       
 30999 
       
 31000 
       
 31001 /**
       
 31002  * Internal dependencies
       
 31003  */
       
 31004 
       
 31005 
       
 31006 
       
 31007 
       
 31008 
       
 31009 
       
 31010 
       
 31011 
       
 31012 
       
 31013 
       
 31014 
       
 31015 
       
 31016 
       
 31017 
       
 31018 
       
 31019 /**
       
 31020  * Removes props used for the native version of RichText so that they are not
       
 31021  * passed to the DOM element and log warnings.
       
 31022  *
       
 31023  * @param {Object} props Props to filter.
       
 31024  *
       
 31025  * @return {Object} Filtered props.
       
 31026  */
       
 31027 
       
 31028 function removeNativeProps(props) {
       
 31029   return Object(external_lodash_["omit"])(props, ['__unstableMobileNoFocusOnMount', 'deleteEnter', 'placeholderTextColor', 'textAlign', 'selectionColor', 'tagsToEliminate', 'rootTagsToEliminate', 'disableEditingMenu', 'fontSize', 'fontFamily', 'fontWeight', 'fontStyle', 'minWidth', 'maxWidth', 'setRef']);
       
 31030 }
       
 31031 
       
 31032 function RichTextWrapper({
       
 31033   children,
       
 31034   tagName = 'div',
       
 31035   value: originalValue = '',
       
 31036   onChange: originalOnChange,
       
 31037   isSelected: originalIsSelected,
       
 31038   multiline,
       
 31039   inlineToolbar,
       
 31040   wrapperClassName,
       
 31041   autocompleters,
       
 31042   onReplace,
       
 31043   placeholder,
       
 31044   allowedFormats,
       
 31045   formattingControls,
       
 31046   withoutInteractiveFormatting,
       
 31047   onRemove,
       
 31048   onMerge,
       
 31049   onSplit,
       
 31050   __unstableOnSplitAtEnd: onSplitAtEnd,
       
 31051   __unstableOnSplitMiddle: onSplitMiddle,
       
 31052   identifier,
       
 31053   preserveWhiteSpace,
       
 31054   __unstablePastePlainText: pastePlainText,
       
 31055   __unstableEmbedURLOnPaste,
       
 31056   __unstableDisableFormats: disableFormats,
       
 31057   disableLineBreaks,
       
 31058   unstableOnFocus,
       
 31059   __unstableAllowPrefixTransformations,
       
 31060   ...props
       
 31061 }, forwardedRef) {
       
 31062   const instanceId = Object(external_wp_compose_["useInstanceId"])(RichTextWrapper);
 31586   identifier = identifier || instanceId;
 31063   identifier = identifier || instanceId;
 31587   var fallbackRef = Object(external_this_wp_element_["useRef"])();
 31064   props = removeNativeProps(props);
 31588   var ref = forwardedRef || fallbackRef;
 31065   const anchorRef = Object(external_wp_element_["useRef"])();
 31589 
 31066   const {
 31590   var _useBlockEditContext = useBlockEditContext(),
 31067     clientId
 31591       clientId = _useBlockEditContext.clientId,
 31068   } = useBlockEditContext();
 31592       onCaretVerticalPositionChange = _useBlockEditContext.onCaretVerticalPositionChange,
 31069 
 31593       blockIsSelected = _useBlockEditContext.isSelected;
 31070   const selector = select => {
 31594 
 31071     const {
 31595   var selector = function selector(select) {
 31072       getSelectionStart,
 31596     var _select = select('core/block-editor'),
 31073       getSelectionEnd,
 31597         isCaretWithinFormattedText = _select.isCaretWithinFormattedText,
 31074       isMultiSelecting,
 31598         getSelectionStart = _select.getSelectionStart,
 31075       hasMultiSelection
 31599         getSelectionEnd = _select.getSelectionEnd,
 31076     } = select(store);
 31600         getSettings = _select.getSettings,
 31077     const selectionStart = getSelectionStart();
 31601         didAutomaticChange = _select.didAutomaticChange,
 31078     const selectionEnd = getSelectionEnd();
 31602         __unstableGetBlockWithoutInnerBlocks = _select.__unstableGetBlockWithoutInnerBlocks,
 31079     let isSelected;
 31603         isMultiSelecting = _select.isMultiSelecting,
       
 31604         hasMultiSelection = _select.hasMultiSelection;
       
 31605 
       
 31606     var selectionStart = getSelectionStart();
       
 31607     var selectionEnd = getSelectionEnd();
       
 31608 
       
 31609     var _getSettings = getSettings(),
       
 31610         undo = _getSettings.__experimentalUndo;
       
 31611 
       
 31612     var isSelected;
       
 31613 
 31080 
 31614     if (originalIsSelected === undefined) {
 31081     if (originalIsSelected === undefined) {
 31615       isSelected = selectionStart.clientId === clientId && selectionStart.attributeKey === identifier;
 31082       isSelected = selectionStart.clientId === clientId && selectionStart.attributeKey === identifier;
 31616     } else if (originalIsSelected) {
 31083     } else if (originalIsSelected) {
 31617       isSelected = selectionStart.clientId === clientId;
 31084       isSelected = selectionStart.clientId === clientId;
 31618     }
 31085     }
 31619 
 31086 
 31620     var extraProps = {};
 31087     return {
 31621 
       
 31622     if (external_this_wp_element_["Platform"].OS === 'native') {
       
 31623       // If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.
       
 31624       // In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.
       
 31625       // This apparently assumes functionality the BlockHlder actually
       
 31626       var block = clientId && __unstableGetBlockWithoutInnerBlocks(clientId);
       
 31627 
       
 31628       var _shouldBlurOnUnmount = block && isSelected && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(block);
       
 31629 
       
 31630       extraProps = {
       
 31631         shouldBlurOnUnmount: _shouldBlurOnUnmount
       
 31632       };
       
 31633     }
       
 31634 
       
 31635     return rich_text_objectSpread({
       
 31636       isCaretWithinFormattedText: isCaretWithinFormattedText(),
       
 31637       selectionStart: isSelected ? selectionStart.offset : undefined,
 31088       selectionStart: isSelected ? selectionStart.offset : undefined,
 31638       selectionEnd: isSelected ? selectionEnd.offset : undefined,
 31089       selectionEnd: isSelected ? selectionEnd.offset : undefined,
 31639       isSelected: isSelected,
 31090       isSelected,
 31640       didAutomaticChange: didAutomaticChange(),
 31091       disabled: isMultiSelecting() || hasMultiSelection()
 31641       disabled: isMultiSelecting() || hasMultiSelection(),
 31092     };
 31642       undo: undo
       
 31643     }, extraProps);
       
 31644   }; // This selector must run on every render so the right selection state is
 31093   }; // This selector must run on every render so the right selection state is
 31645   // retreived from the store on merge.
 31094   // retreived from the store on merge.
 31646   // To do: fix this somehow.
 31095   // To do: fix this somehow.
 31647 
 31096 
 31648 
 31097 
 31649   var _useSelect = Object(external_this_wp_data_["useSelect"])(selector),
 31098   const {
 31650       isCaretWithinFormattedText = _useSelect.isCaretWithinFormattedText,
 31099     selectionStart,
 31651       selectionStart = _useSelect.selectionStart,
 31100     selectionEnd,
 31652       selectionEnd = _useSelect.selectionEnd,
 31101     isSelected,
 31653       isSelected = _useSelect.isSelected,
 31102     disabled
 31654       didAutomaticChange = _useSelect.didAutomaticChange,
 31103   } = Object(external_wp_data_["useSelect"])(selector);
 31655       disabled = _useSelect.disabled,
 31104   const {
 31656       undo = _useSelect.undo,
 31105     selectionChange
 31657       shouldBlurOnUnmount = _useSelect.shouldBlurOnUnmount;
 31106   } = Object(external_wp_data_["useDispatch"])(store);
 31658 
 31107   const multilineTag = getMultilineTag(multiline);
 31659   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 31108   const adjustedAllowedFormats = getAllowedFormats({
 31660       __unstableMarkLastChangeAsPersistent = _useDispatch.__unstableMarkLastChangeAsPersistent,
 31109     allowedFormats,
 31661       enterFormattedText = _useDispatch.enterFormattedText,
 31110     formattingControls,
 31662       exitFormattedText = _useDispatch.exitFormattedText,
 31111     disableFormats
 31663       selectionChange = _useDispatch.selectionChange,
       
 31664       __unstableMarkAutomaticChange = _useDispatch.__unstableMarkAutomaticChange;
       
 31665 
       
 31666   var multilineTag = getMultilineTag(multiline);
       
 31667   var adjustedAllowedFormats = getAllowedFormats({
       
 31668     allowedFormats: allowedFormats,
       
 31669     formattingControls: formattingControls,
       
 31670     disableFormats: disableFormats
       
 31671   });
 31112   });
 31672   var hasFormats = !adjustedAllowedFormats || adjustedAllowedFormats.length > 0;
 31113   const hasFormats = !adjustedAllowedFormats || adjustedAllowedFormats.length > 0;
 31673   var adjustedValue = originalValue;
 31114   let adjustedValue = originalValue;
 31674   var adjustedOnChange = originalOnChange; // Handle deprecated format.
 31115   let adjustedOnChange = originalOnChange; // Handle deprecated format.
 31675 
 31116 
 31676   if (Array.isArray(originalValue)) {
 31117   if (Array.isArray(originalValue)) {
 31677     adjustedValue = external_this_wp_blocks_["children"].toHTML(originalValue);
 31118     adjustedValue = external_wp_blocks_["children"].toHTML(originalValue);
 31678 
 31119 
 31679     adjustedOnChange = function adjustedOnChange(newValue) {
 31120     adjustedOnChange = newValue => originalOnChange(external_wp_blocks_["children"].fromDOM(Object(external_wp_richText_["__unstableCreateElement"])(document, newValue).childNodes));
 31680       return originalOnChange(external_this_wp_blocks_["children"].fromDOM(Object(external_this_wp_richText_["__unstableCreateElement"])(document, newValue).childNodes));
 31121   }
 31681     };
 31122 
 31682   }
 31123   const onSelectionChange = Object(external_wp_element_["useCallback"])((start, end) => {
 31683 
       
 31684   var onSelectionChange = Object(external_this_wp_element_["useCallback"])(function (start, end) {
       
 31685     selectionChange(clientId, identifier, start, end);
 31124     selectionChange(clientId, identifier, start, end);
 31686   }, [clientId, identifier]);
 31125   }, [clientId, identifier]);
 31687   var onDelete = Object(external_this_wp_element_["useCallback"])(function (_ref3) {
 31126   const {
 31688     var value = _ref3.value,
 31127     formatTypes,
 31689         isReverse = _ref3.isReverse;
 31128     prepareHandlers,
 31690 
 31129     valueHandlers,
 31691     if (onMerge) {
 31130     changeHandlers,
 31692       onMerge(!isReverse);
 31131     dependencies
 31693     } // Only handle remove on Backspace. This serves dual-purpose of being
 31132   } = useFormatTypes({
 31694     // an intentional user interaction distinguishing between Backspace and
 31133     clientId,
 31695     // Delete to remove the empty field, but also to avoid merge & remove
 31134     identifier,
 31696     // causing destruction of two fields (merge, then removed merged).
 31135     withoutInteractiveFormatting,
 31697 
 31136     allowedFormats: adjustedAllowedFormats
 31698 
 31137   });
 31699     if (onRemove && Object(external_this_wp_richText_["isEmpty"])(value) && isReverse) {
 31138 
 31700       onRemove(!isReverse);
 31139   function addEditorOnlyFormats(value) {
 31701     }
 31140     return valueHandlers.reduce((accumulator, fn) => fn(accumulator, value.text), value.formats);
 31702   }, [onMerge, onRemove]);
 31141   }
 31703   /**
 31142 
 31704    * Signals to the RichText owner that the block can be replaced with two
 31143   function removeEditorOnlyFormats(value) {
 31705    * blocks as a result of splitting the block by pressing enter, or with
 31144     formatTypes.forEach(formatType => {
 31706    * blocks as a result of splitting the block by pasting block content in the
 31145       // Remove formats created by prepareEditableTree, because they are editor only.
 31707    * instance.
 31146       if (formatType.__experimentalCreatePrepareEditableTree) {
 31708    *
 31147         value = Object(external_wp_richText_["removeFormat"])(value, formatType.name, 0, value.text.length);
 31709    * @param  {Object} record       The rich text value to split.
 31148       }
 31710    * @param  {Array}  pastedBlocks The pasted blocks to insert, if any.
 31149     });
 31711    */
 31150     return value.formats;
 31712 
 31151   }
 31713   var splitValue = Object(external_this_wp_element_["useCallback"])(function (record) {
 31152 
 31714     var pastedBlocks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
 31153   function addInvisibleFormats(value) {
 31715 
 31154     return prepareHandlers.reduce((accumulator, fn) => fn(accumulator, value.text), value.formats);
 31716     if (!onReplace || !onSplit) {
 31155   }
       
 31156 
       
 31157   const {
       
 31158     value,
       
 31159     onChange,
       
 31160     onFocus,
       
 31161     ref: richTextRef
       
 31162   } = Object(external_wp_richText_["__unstableUseRichText"])({
       
 31163     value: adjustedValue,
       
 31164 
       
 31165     onChange(html, {
       
 31166       __unstableFormats,
       
 31167       __unstableText
       
 31168     }) {
       
 31169       adjustedOnChange(html);
       
 31170       Object.values(changeHandlers).forEach(changeHandler => {
       
 31171         changeHandler(__unstableFormats, __unstableText);
       
 31172       });
       
 31173     },
       
 31174 
       
 31175     selectionStart,
       
 31176     selectionEnd,
       
 31177     onSelectionChange,
       
 31178     placeholder,
       
 31179     __unstableIsSelected: isSelected,
       
 31180     __unstableMultilineTag: multilineTag,
       
 31181     __unstableDisableFormats: disableFormats,
       
 31182     preserveWhiteSpace,
       
 31183     __unstableDependencies: [...dependencies, tagName],
       
 31184     __unstableAfterParse: addEditorOnlyFormats,
       
 31185     __unstableBeforeSerialize: removeEditorOnlyFormats,
       
 31186     __unstableAddInvisibleFormats: addInvisibleFormats
       
 31187   });
       
 31188   const autocompleteProps = useBlockEditorAutocompleteProps({
       
 31189     onReplace,
       
 31190     completers: autocompleters,
       
 31191     record: value,
       
 31192     onChange
       
 31193   });
       
 31194   useCaretInFormat({
       
 31195     value
       
 31196   });
       
 31197   useMarkPersistent({
       
 31198     html: adjustedValue,
       
 31199     value
       
 31200   });
       
 31201 
       
 31202   function onKeyDown(event) {
       
 31203     const {
       
 31204       keyCode
       
 31205     } = event;
       
 31206 
       
 31207     if (event.defaultPrevented) {
 31717       return;
 31208       return;
 31718     }
 31209     }
 31719 
 31210 
 31720     var blocks = [];
 31211     if (keyCode === external_wp_keycodes_["DELETE"] || keyCode === external_wp_keycodes_["BACKSPACE"]) {
 31721 
 31212       const {
 31722     var _split = Object(external_this_wp_richText_["split"])(record),
 31213         start,
 31723         _split2 = Object(slicedToArray["a" /* default */])(_split, 2),
 31214         end,
 31724         before = _split2[0],
 31215         text
 31725         after = _split2[1];
 31216       } = value;
 31726 
 31217       const isReverse = keyCode === external_wp_keycodes_["BACKSPACE"];
 31727     var hasPastedBlocks = pastedBlocks.length > 0;
 31218       const hasActiveFormats = value.activeFormats && !!value.activeFormats.length; // Only process delete if the key press occurs at an uncollapsed edge.
 31728     var lastPastedBlockIndex = -1; // Create a block with the content before the caret if there's no pasted
 31219 
 31729     // blocks, or if there are pasted blocks and the value is not empty.
 31220       if (!Object(external_wp_richText_["isCollapsed"])(value) || hasActiveFormats || isReverse && start !== 0 || !isReverse && end !== text.length) {
 31730     // We do not want a leading empty block on paste, but we do if split
 31221         return;
 31731     // with e.g. the enter key.
       
 31732 
       
 31733     if (!hasPastedBlocks || !Object(external_this_wp_richText_["isEmpty"])(before)) {
       
 31734       blocks.push(onSplit(Object(external_this_wp_richText_["toHTMLString"])({
       
 31735         value: before,
       
 31736         multilineTag: multilineTag
       
 31737       })));
       
 31738       lastPastedBlockIndex += 1;
       
 31739     }
       
 31740 
       
 31741     if (hasPastedBlocks) {
       
 31742       blocks.push.apply(blocks, Object(toConsumableArray["a" /* default */])(pastedBlocks));
       
 31743       lastPastedBlockIndex += pastedBlocks.length;
       
 31744     } else if (onSplitMiddle) {
       
 31745       blocks.push(onSplitMiddle());
       
 31746     } // If there's pasted blocks, append a block with non empty content
       
 31747     /// after the caret. Otherwise, do append an empty block if there
       
 31748     // is no `onSplitMiddle` prop, but if there is and the content is
       
 31749     // empty, the middle block is enough to set focus in.
       
 31750 
       
 31751 
       
 31752     if (hasPastedBlocks ? !Object(external_this_wp_richText_["isEmpty"])(after) : !onSplitMiddle || !Object(external_this_wp_richText_["isEmpty"])(after)) {
       
 31753       blocks.push(onSplit(Object(external_this_wp_richText_["toHTMLString"])({
       
 31754         value: after,
       
 31755         multilineTag: multilineTag
       
 31756       })));
       
 31757     } // If there are pasted blocks, set the selection to the last one.
       
 31758     // Otherwise, set the selection to the second block.
       
 31759 
       
 31760 
       
 31761     var indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1; // If there are pasted blocks, move the caret to the end of the selected block
       
 31762     // Otherwise, retain the default value.
       
 31763 
       
 31764     var initialPosition = hasPastedBlocks ? -1 : null;
       
 31765     onReplace(blocks, indexToSelect, initialPosition);
       
 31766   }, [onReplace, onSplit, multilineTag, onSplitMiddle]);
       
 31767   var onEnter = Object(external_this_wp_element_["useCallback"])(function (_ref4) {
       
 31768     var value = _ref4.value,
       
 31769         onChange = _ref4.onChange,
       
 31770         shiftKey = _ref4.shiftKey;
       
 31771     var canSplit = onReplace && onSplit;
       
 31772 
       
 31773     if (onReplace) {
       
 31774       var transforms = Object(external_this_wp_blocks_["getBlockTransforms"])('from').filter(function (_ref5) {
       
 31775         var type = _ref5.type;
       
 31776         return type === 'enter';
       
 31777       });
       
 31778       var transformation = Object(external_this_wp_blocks_["findTransform"])(transforms, function (item) {
       
 31779         return item.regExp.test(value.text);
       
 31780       });
       
 31781 
       
 31782       if (transformation) {
       
 31783         onReplace([transformation.transform({
       
 31784           content: value.text
       
 31785         })]);
       
 31786 
       
 31787         __unstableMarkAutomaticChange();
       
 31788       }
 31222       }
 31789     }
 31223 
 31790 
 31224       if (onMerge) {
 31791     if (multiline) {
 31225         onMerge(!isReverse);
 31792       if (shiftKey) {
 31226       } // Only handle remove on Backspace. This serves dual-purpose of being
 31793         if (!disableLineBreaks) {
 31227       // an intentional user interaction distinguishing between Backspace and
 31794           onChange(Object(external_this_wp_richText_["insert"])(value, '\n'));
 31228       // Delete to remove the empty field, but also to avoid merge & remove
 31795         }
 31229       // causing destruction of two fields (merge, then removed merged).
 31796       } else if (canSplit && Object(external_this_wp_richText_["__unstableIsEmptyLine"])(value)) {
 31230 
 31797         splitValue(value);
 31231 
 31798       } else {
 31232       if (onRemove && Object(external_wp_richText_["isEmpty"])(value) && isReverse) {
 31799         onChange(Object(external_this_wp_richText_["__unstableInsertLineSeparator"])(value));
 31233         onRemove(!isReverse);
 31800       }
 31234       }
 31801     } else {
 31235 
 31802       var text = value.text,
 31236       event.preventDefault();
 31803           start = value.start,
 31237     }
 31804           end = value.end;
 31238   }
 31805       var canSplitAtEnd = onSplitAtEnd && start === end && end === text.length;
 31239 
 31806 
 31240   const TagName = tagName;
 31807       if (shiftKey || !canSplit && !canSplitAtEnd) {
 31241   const content = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, isSelected && children && children({
 31808         if (!disableLineBreaks) {
 31242     value,
 31809           onChange(Object(external_this_wp_richText_["insert"])(value, '\n'));
 31243     onChange,
 31810         }
 31244     onFocus
 31811       } else if (!canSplit && canSplitAtEnd) {
 31245   }), isSelected && Object(external_wp_element_["createElement"])(RemoveBrowserShortcuts, null), isSelected && Object(external_wp_element_["createElement"])(FormatEdit, {
 31812         onSplitAtEnd();
 31246     value: value,
 31813       } else if (canSplit) {
 31247     onChange: onChange,
 31814         splitValue(value);
 31248     onFocus: onFocus,
 31815       }
 31249     formatTypes: formatTypes,
 31816     }
 31250     forwardedRef: anchorRef
 31817   }, [onReplace, onSplit, __unstableMarkAutomaticChange, multiline, splitValue, onSplitAtEnd]);
 31251   }), isSelected && hasFormats && Object(external_wp_element_["createElement"])(format_toolbar_container, {
 31818   var onPaste = Object(external_this_wp_element_["useCallback"])(function (_ref6) {
 31252     inline: inlineToolbar,
 31819     var value = _ref6.value,
 31253     anchorRef: anchorRef.current
 31820         onChange = _ref6.onChange,
 31254   }), Object(external_wp_element_["createElement"])(TagName // Overridable props.
 31821         html = _ref6.html,
 31255   , Object(esm_extends["a" /* default */])({
 31822         plainText = _ref6.plainText,
 31256     role: "textbox",
 31823         files = _ref6.files,
 31257     "aria-multiline": true,
 31824         activeFormats = _ref6.activeFormats;
 31258     "aria-label": placeholder
 31825 
 31259   }, props, autocompleteProps, {
 31826     // Only process file if no HTML is present.
 31260     ref: Object(external_wp_compose_["useMergeRefs"])([autocompleteProps.ref, props.ref, richTextRef, useInputRules({
 31827     // Note: a pasted file may have the URL as plain text.
 31261       value,
 31828     if (files && files.length && !html) {
 31262       onChange,
 31829       var _content = Object(external_this_wp_blocks_["pasteHandler"])({
 31263       __unstableAllowPrefixTransformations,
 31830         HTML: filePasteHandler(files),
 31264       formatTypes,
 31831         mode: 'BLOCKS',
 31265       onReplace
 31832         tagName: tagName
 31266     }), useUndoAutomaticChange(), usePasteHandler({
 31833       }); // Allows us to ask for this information when we get a report.
 31267       isSelected,
 31834       // eslint-disable-next-line no-console
 31268       disableFormats,
 31835 
 31269       onChange,
 31836 
 31270       value,
 31837       window.console.log('Received items:\n\n', files);
 31271       formatTypes,
 31838 
 31272       tagName,
 31839       if (onReplace && Object(external_this_wp_richText_["isEmpty"])(value)) {
 31273       onReplace,
 31840         onReplace(_content);
 31274       onSplit,
 31841       } else {
 31275       onSplitMiddle,
 31842         splitValue(value, _content);
 31276       __unstableEmbedURLOnPaste,
 31843       }
 31277       multilineTag,
 31844 
 31278       preserveWhiteSpace,
 31845       return;
 31279       pastePlainText
 31846     }
 31280     }), useEnter({
 31847 
 31281       removeEditorOnlyFormats,
 31848     var mode = onReplace && onSplit ? 'AUTO' : 'INLINE'; // Force the blocks mode when the user is pasting
 31282       value,
 31849     // on a new line & the content resembles a shortcode.
 31283       onReplace,
 31850     // Otherwise it's going to be detected as inline
 31284       onSplit,
 31851     // and the shortcode won't be replaced.
 31285       onSplitMiddle,
 31852 
 31286       multilineTag,
 31853     if (mode === 'AUTO' && Object(external_this_wp_richText_["isEmpty"])(value) && rich_text_isShortcode(plainText)) {
 31287       onChange,
 31854       mode = 'BLOCKS';
 31288       disableLineBreaks,
 31855     }
 31289       onSplitAtEnd
 31856 
 31290     }), anchorRef, forwardedRef]) // Do not set the attribute if disabled.
 31857     if (__unstableEmbedURLOnPaste && Object(external_this_wp_richText_["isEmpty"])(value) && Object(external_this_wp_url_["isURL"])(plainText.trim())) {
       
 31858       mode = 'BLOCKS';
       
 31859     }
       
 31860 
       
 31861     var content = Object(external_this_wp_blocks_["pasteHandler"])({
       
 31862       HTML: html,
       
 31863       plainText: plainText,
       
 31864       mode: mode,
       
 31865       tagName: tagName
       
 31866     });
       
 31867 
       
 31868     if (typeof content === 'string') {
       
 31869       var valueToInsert = Object(external_this_wp_richText_["create"])({
       
 31870         html: content
       
 31871       }); // If there are active formats, merge them with the pasted formats.
       
 31872 
       
 31873       if (activeFormats.length) {
       
 31874         var index = valueToInsert.formats.length;
       
 31875 
       
 31876         while (index--) {
       
 31877           valueToInsert.formats[index] = [].concat(Object(toConsumableArray["a" /* default */])(activeFormats), Object(toConsumableArray["a" /* default */])(valueToInsert.formats[index] || []));
       
 31878         }
       
 31879       } // If the content should be multiline, we should process text
       
 31880       // separated by a line break as separate lines.
       
 31881 
       
 31882 
       
 31883       if (multiline) {
       
 31884         valueToInsert = Object(external_this_wp_richText_["replace"])(valueToInsert, /\n+/g, external_this_wp_richText_["__UNSTABLE_LINE_SEPARATOR"]);
       
 31885       }
       
 31886 
       
 31887       onChange(Object(external_this_wp_richText_["insert"])(value, valueToInsert));
       
 31888     } else if (content.length > 0) {
       
 31889       if (onReplace && Object(external_this_wp_richText_["isEmpty"])(value)) {
       
 31890         onReplace(content, content.length - 1, -1);
       
 31891       } else {
       
 31892         splitValue(value, content);
       
 31893       }
       
 31894     }
       
 31895   }, [tagName, onReplace, onSplit, splitValue, __unstableEmbedURLOnPaste, multiline]);
       
 31896   var inputRule = Object(external_this_wp_element_["useCallback"])(function (value, valueToFormat) {
       
 31897     if (!onReplace) {
       
 31898       return;
       
 31899     }
       
 31900 
       
 31901     var start = value.start,
       
 31902         text = value.text;
       
 31903     var characterBefore = text.slice(start - 1, start); // The character right before the caret must be a plain space.
       
 31904 
       
 31905     if (characterBefore !== ' ') {
       
 31906       return;
       
 31907     }
       
 31908 
       
 31909     var trimmedTextBefore = text.slice(0, start).trim();
       
 31910     var prefixTransforms = Object(external_this_wp_blocks_["getBlockTransforms"])('from').filter(function (_ref7) {
       
 31911       var type = _ref7.type;
       
 31912       return type === 'prefix';
       
 31913     });
       
 31914     var transformation = Object(external_this_wp_blocks_["findTransform"])(prefixTransforms, function (_ref8) {
       
 31915       var prefix = _ref8.prefix;
       
 31916       return trimmedTextBefore === prefix;
       
 31917     });
       
 31918 
       
 31919     if (!transformation) {
       
 31920       return;
       
 31921     }
       
 31922 
       
 31923     var content = valueToFormat(Object(external_this_wp_richText_["slice"])(value, start, text.length));
       
 31924     var block = transformation.transform(content);
       
 31925     onReplace([block]);
       
 31926 
       
 31927     __unstableMarkAutomaticChange();
       
 31928   }, [onReplace, __unstableMarkAutomaticChange]);
       
 31929   var content = Object(external_this_wp_element_["createElement"])(external_this_wp_richText_["__experimentalRichText"], Object(esm_extends["a" /* default */])({}, props, {
       
 31930     clientId: clientId,
       
 31931     identifier: identifier,
       
 31932     ref: ref,
       
 31933     value: adjustedValue,
       
 31934     onChange: adjustedOnChange,
       
 31935     selectionStart: selectionStart,
       
 31936     selectionEnd: selectionEnd,
       
 31937     onSelectionChange: onSelectionChange,
       
 31938     tagName: tagName,
       
 31939     className: classnames_default()(rich_text_classes, className, {
       
 31940       'keep-placeholder-on-focus': keepPlaceholderOnFocus
       
 31941     }),
       
 31942     placeholder: placeholder,
       
 31943     allowedFormats: adjustedAllowedFormats,
       
 31944     withoutInteractiveFormatting: withoutInteractiveFormatting,
       
 31945     onEnter: onEnter,
       
 31946     onDelete: onDelete,
       
 31947     onPaste: onPaste,
       
 31948     __unstableIsSelected: isSelected,
       
 31949     __unstableInputRule: inputRule,
       
 31950     __unstableMultilineTag: multilineTag,
       
 31951     __unstableIsCaretWithinFormattedText: isCaretWithinFormattedText,
       
 31952     __unstableOnEnterFormattedText: enterFormattedText,
       
 31953     __unstableOnExitFormattedText: exitFormattedText,
       
 31954     __unstableOnCreateUndoLevel: __unstableMarkLastChangeAsPersistent,
       
 31955     __unstableMarkAutomaticChange: __unstableMarkAutomaticChange,
       
 31956     __unstableDidAutomaticChange: didAutomaticChange,
       
 31957     __unstableUndo: undo,
       
 31958     __unstableDisableFormats: disableFormats,
       
 31959     style: style,
       
 31960     preserveWhiteSpace: preserveWhiteSpace,
       
 31961     disabled: disabled,
       
 31962     start: startAttr,
       
 31963     reversed: reversed // Native props.
       
 31964     ,
 31291     ,
 31965     onCaretVerticalPositionChange: onCaretVerticalPositionChange,
 31292     contentEditable: disabled ? undefined : true,
 31966     blockIsSelected: originalIsSelected !== undefined ? originalIsSelected : blockIsSelected,
 31293     suppressContentEditableWarning: !disabled,
 31967     shouldBlurOnUnmount: shouldBlurOnUnmount
 31294     className: classnames_default()('block-editor-rich-text__editable', props.className, 'rich-text'),
 31968   }), function (_ref9) {
 31295     onFocus: unstableOnFocus,
 31969     var nestedIsSelected = _ref9.isSelected,
 31296     onKeyDown: onKeyDown
 31970         value = _ref9.value,
 31297   })));
 31971         onChange = _ref9.onChange,
       
 31972         onFocus = _ref9.onFocus,
       
 31973         editableProps = _ref9.editableProps,
       
 31974         TagName = _ref9.editableTagName;
       
 31975     return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, children && children({
       
 31976       value: value,
       
 31977       onChange: onChange,
       
 31978       onFocus: onFocus
       
 31979     }), nestedIsSelected && hasFormats && Object(external_this_wp_element_["createElement"])(format_toolbar_container, {
       
 31980       inline: inlineToolbar,
       
 31981       anchorRef: ref.current
       
 31982     }), nestedIsSelected && Object(external_this_wp_element_["createElement"])(RemoveBrowserShortcuts, null), Object(external_this_wp_element_["createElement"])(autocomplete, {
       
 31983       onReplace: onReplace,
       
 31984       completers: autocompleters,
       
 31985       record: value,
       
 31986       onChange: onChange,
       
 31987       isSelected: nestedIsSelected
       
 31988     }, function (_ref10) {
       
 31989       var listBoxId = _ref10.listBoxId,
       
 31990           activeId = _ref10.activeId,
       
 31991           _onKeyDown = _ref10.onKeyDown;
       
 31992       return Object(external_this_wp_element_["createElement"])(TagName, Object(esm_extends["a" /* default */])({}, editableProps, {
       
 31993         "aria-autocomplete": listBoxId ? 'list' : undefined,
       
 31994         "aria-owns": listBoxId,
       
 31995         "aria-activedescendant": activeId,
       
 31996         start: startAttr,
       
 31997         reversed: reversed,
       
 31998         onKeyDown: function onKeyDown(event) {
       
 31999           _onKeyDown(event);
       
 32000 
       
 32001           editableProps.onKeyDown(event);
       
 32002         }
       
 32003       }));
       
 32004     }));
       
 32005   });
       
 32006 
 31298 
 32007   if (!wrapperClassName) {
 31299   if (!wrapperClassName) {
 32008     return content;
 31300     return content;
 32009   }
 31301   }
 32010 
 31302 
 32011   external_this_wp_deprecated_default()('wp.blockEditor.RichText wrapperClassName prop', {
 31303   external_wp_deprecated_default()('wp.blockEditor.RichText wrapperClassName prop', {
       
 31304     since: '5.4',
 32012     alternative: 'className prop or create your own wrapper div'
 31305     alternative: 'className prop or create your own wrapper div'
 32013   });
 31306   });
 32014   return Object(external_this_wp_element_["createElement"])("div", {
 31307   const className = classnames_default()('block-editor-rich-text', wrapperClassName);
 32015     className: classnames_default()(wrapperClasses, wrapperClassName)
 31308   return Object(external_wp_element_["createElement"])("div", {
       
 31309     className: className
 32016   }, content);
 31310   }, content);
 32017 }
 31311 }
 32018 
 31312 
 32019 var ForwardedRichTextContainer = Object(external_this_wp_element_["forwardRef"])(RichTextWrapper);
 31313 const ForwardedRichTextContainer = Object(external_wp_element_["forwardRef"])(RichTextWrapper);
 32020 
 31314 
 32021 ForwardedRichTextContainer.Content = function (_ref11) {
 31315 ForwardedRichTextContainer.Content = ({
 32022   var value = _ref11.value,
 31316   value,
 32023       Tag = _ref11.tagName,
 31317   tagName: Tag,
 32024       multiline = _ref11.multiline,
 31318   multiline,
 32025       props = Object(objectWithoutProperties["a" /* default */])(_ref11, ["value", "tagName", "multiline"]);
 31319   ...props
 32026 
 31320 }) => {
 32027   // Handle deprecated `children` and `node` sources.
 31321   // Handle deprecated `children` and `node` sources.
 32028   if (Array.isArray(value)) {
 31322   if (Array.isArray(value)) {
 32029     value = external_this_wp_blocks_["children"].toHTML(value);
 31323     value = external_wp_blocks_["children"].toHTML(value);
 32030   }
 31324   }
 32031 
 31325 
 32032   var MultilineTag = getMultilineTag(multiline);
 31326   const MultilineTag = getMultilineTag(multiline);
 32033 
 31327 
 32034   if (!value && MultilineTag) {
 31328   if (!value && MultilineTag) {
 32035     value = "<".concat(MultilineTag, "></").concat(MultilineTag, ">");
 31329     value = `<${MultilineTag}></${MultilineTag}>`;
 32036   }
 31330   }
 32037 
 31331 
 32038   var content = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["RawHTML"], null, value);
 31332   const content = Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, value);
 32039 
 31333 
 32040   if (Tag) {
 31334   if (Tag) {
 32041     return Object(external_this_wp_element_["createElement"])(Tag, Object(external_this_lodash_["omit"])(props, ['format']), content);
 31335     return Object(external_wp_element_["createElement"])(Tag, Object(external_lodash_["omit"])(props, ['format']), content);
 32042   }
 31336   }
 32043 
 31337 
 32044   return content;
 31338   return content;
 32045 };
 31339 };
 32046 
 31340 
 32047 ForwardedRichTextContainer.isEmpty = function (value) {
 31341 ForwardedRichTextContainer.isEmpty = value => {
 32048   return !value || value.length === 0;
 31342   return !value || value.length === 0;
 32049 };
 31343 };
 32050 
 31344 /**
 32051 ForwardedRichTextContainer.Content.defaultProps = {
 31345  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md
 32052   format: 'string',
 31346  */
 32053   value: ''
 31347 
 32054 };
       
 32055 /**
       
 32056  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/rich-text/README.md
       
 32057  */
       
 32058 
 31348 
 32059 /* harmony default export */ var rich_text = (ForwardedRichTextContainer);
 31349 /* harmony default export */ var rich_text = (ForwardedRichTextContainer);
 32060 
 31350 
 32061 
 31351 
 32062 
 31352 
 32072  * Internal dependencies
 31362  * Internal dependencies
 32073  */
 31363  */
 32074 
 31364 
 32075 
 31365 
 32076 
 31366 
 32077 function BlockNavigationEditor(_ref) {
 31367 function BlockNavigationEditor({
 32078   var value = _ref.value,
 31368   value,
 32079       onChange = _ref.onChange;
 31369   onChange
 32080   return Object(external_this_wp_element_["createElement"])(block_slot_BlockNavigationBlockFill, null, Object(external_this_wp_element_["createElement"])(rich_text, {
 31370 }) {
       
 31371   return Object(external_wp_element_["createElement"])(BlockNavigationBlockFill, null, Object(external_wp_element_["createElement"])(rich_text, {
 32081     value: value,
 31372     value: value,
 32082     onChange: onChange,
 31373     onChange: onChange,
 32083     placeholder: Object(external_this_wp_i18n_["__"])('Navigation item'),
 31374     placeholder: Object(external_wp_i18n_["__"])('Navigation item'),
 32084     keepPlaceholderOnFocus: true,
       
 32085     withoutInteractiveFormatting: true,
 31375     withoutInteractiveFormatting: true,
 32086     allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough']
 31376     allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough']
 32087   }));
 31377   }));
 32088 }
 31378 }
 32089 
 31379 
 32090 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
 31380 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
 32091 var layout = __webpack_require__(298);
 31381 var library_layout = __webpack_require__("Civd");
 32092 
 31382 
 32093 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-variation-picker/index.js
 31383 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-variation-picker/index.js
 32094 
 31384 
 32095 
 31385 
 32096 /**
 31386 /**
 32103 
 31393 
 32104 
 31394 
 32105 
 31395 
 32106 
 31396 
 32107 
 31397 
 32108 function BlockVariationPicker(_ref) {
 31398 function BlockVariationPicker({
 32109   var _ref$icon = _ref.icon,
 31399   icon = library_layout["a" /* default */],
 32110       icon = _ref$icon === void 0 ? layout["a" /* default */] : _ref$icon,
 31400   label = Object(external_wp_i18n_["__"])('Choose variation'),
 32111       _ref$label = _ref.label,
 31401   instructions = Object(external_wp_i18n_["__"])('Select a variation to start with.'),
 32112       label = _ref$label === void 0 ? Object(external_this_wp_i18n_["__"])('Choose variation') : _ref$label,
 31402   variations,
 32113       _ref$instructions = _ref.instructions,
 31403   onSelect,
 32114       instructions = _ref$instructions === void 0 ? Object(external_this_wp_i18n_["__"])('Select a variation to start with.') : _ref$instructions,
 31404   allowSkip
 32115       variations = _ref.variations,
 31405 }) {
 32116       onSelect = _ref.onSelect,
 31406   const classes = classnames_default()('block-editor-block-variation-picker', {
 32117       allowSkip = _ref.allowSkip;
       
 32118   var classes = classnames_default()('block-editor-block-variation-picker', {
       
 32119     'has-many-variations': variations.length > 4
 31407     'has-many-variations': variations.length > 4
 32120   });
 31408   });
 32121   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Placeholder"], {
 31409   return Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
 32122     icon: icon,
 31410     icon: icon,
 32123     label: label,
 31411     label: label,
 32124     instructions: instructions,
 31412     instructions: instructions,
 32125     className: classes
 31413     className: classes
 32126   }, Object(external_this_wp_element_["createElement"])("ul", {
 31414   }, Object(external_wp_element_["createElement"])("ul", {
 32127     className: "block-editor-block-variation-picker__variations",
 31415     className: "block-editor-block-variation-picker__variations",
 32128     role: "list",
 31416     role: "list",
 32129     "aria-label": Object(external_this_wp_i18n_["__"])('Block variations')
 31417     "aria-label": Object(external_wp_i18n_["__"])('Block variations')
 32130   }, variations.map(function (variation) {
 31418   }, variations.map(variation => Object(external_wp_element_["createElement"])("li", {
 32131     return Object(external_this_wp_element_["createElement"])("li", {
 31419     key: variation.name
 32132       key: variation.name
 31420   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 32133     }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 31421     isSecondary: true,
 32134       isSecondary: true,
 31422     icon: variation.icon,
 32135       icon: variation.icon,
 31423     iconSize: 48,
 32136       iconSize: 48,
 31424     onClick: () => onSelect(variation),
 32137       onClick: function onClick() {
 31425     className: "block-editor-block-variation-picker__variation",
 32138         return onSelect(variation);
 31426     label: variation.description || variation.title
 32139       },
 31427   }), Object(external_wp_element_["createElement"])("span", {
 32140       className: "block-editor-block-variation-picker__variation",
 31428     className: "block-editor-block-variation-picker__variation-label",
 32141       label: variation.description || variation.title
 31429     role: "presentation"
 32142     }), Object(external_this_wp_element_["createElement"])("span", {
 31430   }, variation.title)))), allowSkip && Object(external_wp_element_["createElement"])("div", {
 32143       className: "block-editor-block-variation-picker__variation-label",
       
 32144       role: "presentation"
       
 32145     }, variation.title));
       
 32146   })), allowSkip && Object(external_this_wp_element_["createElement"])("div", {
       
 32147     className: "block-editor-block-variation-picker__skip"
 31431     className: "block-editor-block-variation-picker__skip"
 32148   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 31432   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 32149     isLink: true,
 31433     isLink: true,
 32150     onClick: function onClick() {
 31434     onClick: () => onSelect()
 32151       return onSelect();
 31435   }, Object(external_wp_i18n_["__"])('Skip'))));
 32152     }
       
 32153   }, Object(external_this_wp_i18n_["__"])('Skip'))));
       
 32154 }
 31436 }
 32155 
 31437 
 32156 /* harmony default export */ var block_variation_picker = (BlockVariationPicker);
 31438 /* harmony default export */ var block_variation_picker = (BlockVariationPicker);
 32157 
 31439 
 32158 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-vertical-alignment-toolbar/icons.js
 31440 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/grid.js
       
 31441 var grid = __webpack_require__("b2RC");
       
 31442 
       
 31443 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-pattern-setup/constants.js
       
 31444 const VIEWMODES = {
       
 31445   carousel: 'carousel',
       
 31446   grid: 'grid'
       
 31447 };
       
 31448 
       
 31449 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-pattern-setup/setup-toolbar.js
 32159 
 31450 
 32160 
 31451 
 32161 /**
 31452 /**
 32162  * WordPress dependencies
 31453  * WordPress dependencies
 32163  */
 31454  */
 32164 
 31455 
 32165 var alignBottom = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
 31456 
       
 31457 
       
 31458 /**
       
 31459  * Internal dependencies
       
 31460  */
       
 31461 
       
 31462 
       
 31463 
       
 31464 const Actions = ({
       
 31465   onStartBlank,
       
 31466   onBlockPatternSelect
       
 31467 }) => Object(external_wp_element_["createElement"])("div", {
       
 31468   className: "block-editor-block-pattern-setup__actions"
       
 31469 }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 31470   onClick: onStartBlank
       
 31471 }, Object(external_wp_i18n_["__"])('Start blank')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 31472   isPrimary: true,
       
 31473   onClick: onBlockPatternSelect
       
 31474 }, Object(external_wp_i18n_["__"])('Choose')));
       
 31475 
       
 31476 const CarouselNavigation = ({
       
 31477   handlePrevious,
       
 31478   handleNext,
       
 31479   activeSlide,
       
 31480   totalSlides
       
 31481 }) => Object(external_wp_element_["createElement"])("div", {
       
 31482   className: "block-editor-block-pattern-setup__navigation"
       
 31483 }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 31484   icon: chevron_left["a" /* default */],
       
 31485   label: Object(external_wp_i18n_["__"])('Previous pattern'),
       
 31486   onClick: handlePrevious,
       
 31487   disabled: activeSlide === 0
       
 31488 }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 31489   icon: chevron_right["a" /* default */],
       
 31490   label: Object(external_wp_i18n_["__"])('Next pattern'),
       
 31491   onClick: handleNext,
       
 31492   disabled: activeSlide === totalSlides - 1
       
 31493 }));
       
 31494 
       
 31495 const SetupToolbar = ({
       
 31496   viewMode,
       
 31497   setViewMode,
       
 31498   handlePrevious,
       
 31499   handleNext,
       
 31500   activeSlide,
       
 31501   totalSlides,
       
 31502   onBlockPatternSelect,
       
 31503   onStartBlank
       
 31504 }) => {
       
 31505   const isCarouselView = viewMode === VIEWMODES.carousel;
       
 31506   const displayControls = Object(external_wp_element_["createElement"])("div", {
       
 31507     className: "block-editor-block-pattern-setup__display-controls"
       
 31508   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 31509     icon: stretch_full_width,
       
 31510     label: Object(external_wp_i18n_["__"])('Carousel view'),
       
 31511     onClick: () => setViewMode(VIEWMODES.carousel),
       
 31512     isPressed: isCarouselView
       
 31513   }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 31514     icon: grid["a" /* default */],
       
 31515     label: Object(external_wp_i18n_["__"])('Grid view'),
       
 31516     onClick: () => setViewMode(VIEWMODES.grid),
       
 31517     isPressed: viewMode === VIEWMODES.grid
       
 31518   }));
       
 31519   return Object(external_wp_element_["createElement"])("div", {
       
 31520     className: "block-editor-block-pattern-setup__toolbar"
       
 31521   }, isCarouselView && Object(external_wp_element_["createElement"])(CarouselNavigation, {
       
 31522     handlePrevious: handlePrevious,
       
 31523     handleNext: handleNext,
       
 31524     activeSlide: activeSlide,
       
 31525     totalSlides: totalSlides
       
 31526   }), displayControls, isCarouselView && Object(external_wp_element_["createElement"])(Actions, {
       
 31527     onBlockPatternSelect: onBlockPatternSelect,
       
 31528     onStartBlank: onStartBlank
       
 31529   }));
       
 31530 };
       
 31531 
       
 31532 /* harmony default export */ var setup_toolbar = (SetupToolbar);
       
 31533 
       
 31534 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-pattern-setup/use-patterns-setup.js
       
 31535 /**
       
 31536  * WordPress dependencies
       
 31537  */
       
 31538 
       
 31539 /**
       
 31540  * Internal dependencies
       
 31541  */
       
 31542 
       
 31543 
       
 31544 
       
 31545 function usePatternsSetup(clientId, blockName, filterPatternsFn) {
       
 31546   return Object(external_wp_data_["useSelect"])(select => {
       
 31547     const {
       
 31548       getBlockRootClientId,
       
 31549       __experimentalGetPatternsByBlockTypes,
       
 31550       __experimentalGetAllowedPatterns
       
 31551     } = select(store);
       
 31552     const rootClientId = getBlockRootClientId(clientId);
       
 31553 
       
 31554     if (filterPatternsFn) {
       
 31555       return __experimentalGetAllowedPatterns(rootClientId).filter(filterPatternsFn);
       
 31556     }
       
 31557 
       
 31558     return __experimentalGetPatternsByBlockTypes(blockName, rootClientId);
       
 31559   }, [clientId, blockName, filterPatternsFn]);
       
 31560 }
       
 31561 
       
 31562 /* harmony default export */ var use_patterns_setup = (usePatternsSetup);
       
 31563 
       
 31564 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-pattern-setup/index.js
       
 31565 
       
 31566 
       
 31567 
       
 31568 /**
       
 31569  * WordPress dependencies
       
 31570  */
       
 31571 
       
 31572 
       
 31573 
       
 31574 
       
 31575 
       
 31576 
       
 31577 /**
       
 31578  * Internal dependencies
       
 31579  */
       
 31580 
       
 31581 
       
 31582 
       
 31583 
       
 31584 
       
 31585 
       
 31586 
       
 31587 const SetupContent = ({
       
 31588   viewMode,
       
 31589   activeSlide,
       
 31590   patterns,
       
 31591   onBlockPatternSelect
       
 31592 }) => {
       
 31593   const composite = Object(external_wp_components_["__unstableUseCompositeState"])();
       
 31594   const containerClass = 'block-editor-block-pattern-setup__container';
       
 31595 
       
 31596   if (viewMode === VIEWMODES.carousel) {
       
 31597     const slideClass = new Map([[activeSlide, 'active-slide'], [activeSlide - 1, 'previous-slide'], [activeSlide + 1, 'next-slide']]);
       
 31598     return Object(external_wp_element_["createElement"])("div", {
       
 31599       className: containerClass
       
 31600     }, Object(external_wp_element_["createElement"])("ul", {
       
 31601       className: "carousel-container"
       
 31602     }, patterns.map((pattern, index) => Object(external_wp_element_["createElement"])(BlockPatternSlide, {
       
 31603       className: slideClass.get(index) || '',
       
 31604       key: pattern.name,
       
 31605       pattern: pattern
       
 31606     }))));
       
 31607   }
       
 31608 
       
 31609   return Object(external_wp_element_["createElement"])(external_wp_components_["__unstableComposite"], Object(esm_extends["a" /* default */])({}, composite, {
       
 31610     role: "listbox",
       
 31611     className: containerClass,
       
 31612     "aria-label": Object(external_wp_i18n_["__"])('Patterns list')
       
 31613   }), patterns.map(pattern => Object(external_wp_element_["createElement"])(block_pattern_setup_BlockPattern, {
       
 31614     key: pattern.name,
       
 31615     pattern: pattern,
       
 31616     onSelect: onBlockPatternSelect,
       
 31617     composite: composite
       
 31618   })));
       
 31619 };
       
 31620 
       
 31621 function block_pattern_setup_BlockPattern({
       
 31622   pattern,
       
 31623   onSelect,
       
 31624   composite
       
 31625 }) {
       
 31626   const baseClassName = 'block-editor-block-pattern-setup-list';
       
 31627   const {
       
 31628     blocks,
       
 31629     title,
       
 31630     description,
       
 31631     viewportWidth = 700
       
 31632   } = pattern;
       
 31633   const descriptionId = Object(external_wp_compose_["useInstanceId"])(block_pattern_setup_BlockPattern, `${baseClassName}__item-description`);
       
 31634   return Object(external_wp_element_["createElement"])("div", {
       
 31635     className: `${baseClassName}__list-item`,
       
 31636     "aria-label": pattern.title,
       
 31637     "aria-describedby": pattern.description ? descriptionId : undefined
       
 31638   }, Object(external_wp_element_["createElement"])(external_wp_components_["__unstableCompositeItem"], Object(esm_extends["a" /* default */])({
       
 31639     role: "option",
       
 31640     as: "div"
       
 31641   }, composite, {
       
 31642     className: `${baseClassName}__item`,
       
 31643     onClick: () => onSelect(blocks)
       
 31644   }), Object(external_wp_element_["createElement"])(block_preview, {
       
 31645     blocks: blocks,
       
 31646     viewportWidth: viewportWidth
       
 31647   }), Object(external_wp_element_["createElement"])("div", {
       
 31648     className: `${baseClassName}__item-title`
       
 31649   }, title)), !!description && Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
       
 31650     id: descriptionId
       
 31651   }, description));
       
 31652 }
       
 31653 
       
 31654 function BlockPatternSlide({
       
 31655   className,
       
 31656   pattern
       
 31657 }) {
       
 31658   const {
       
 31659     blocks,
       
 31660     title,
       
 31661     description
       
 31662   } = pattern;
       
 31663   const descriptionId = Object(external_wp_compose_["useInstanceId"])(BlockPatternSlide, 'block-editor-block-pattern-setup-list__item-description');
       
 31664   return Object(external_wp_element_["createElement"])("li", {
       
 31665     className: `pattern-slide ${className}`,
       
 31666     "aria-label": title,
       
 31667     "aria-describedby": description ? descriptionId : undefined
       
 31668   }, Object(external_wp_element_["createElement"])(block_preview, {
       
 31669     blocks: blocks,
       
 31670     __experimentalLive: true
       
 31671   }), !!description && Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
       
 31672     id: descriptionId
       
 31673   }, description));
       
 31674 }
       
 31675 
       
 31676 const BlockPatternSetup = ({
       
 31677   clientId,
       
 31678   blockName,
       
 31679   filterPatternsFn,
       
 31680   startBlankComponent,
       
 31681   onBlockPatternSelect
       
 31682 }) => {
       
 31683   const [viewMode, setViewMode] = Object(external_wp_element_["useState"])(VIEWMODES.carousel);
       
 31684   const [activeSlide, setActiveSlide] = Object(external_wp_element_["useState"])(0);
       
 31685   const [showBlank, setShowBlank] = Object(external_wp_element_["useState"])(false);
       
 31686   const {
       
 31687     replaceBlock
       
 31688   } = Object(external_wp_data_["useDispatch"])(store);
       
 31689   const patterns = use_patterns_setup(clientId, blockName, filterPatternsFn);
       
 31690 
       
 31691   if (!(patterns !== null && patterns !== void 0 && patterns.length) || showBlank) {
       
 31692     return startBlankComponent;
       
 31693   }
       
 31694 
       
 31695   const onBlockPatternSelectDefault = blocks => {
       
 31696     const clonedBlocks = blocks.map(block => Object(external_wp_blocks_["cloneBlock"])(block));
       
 31697     replaceBlock(clientId, clonedBlocks);
       
 31698   };
       
 31699 
       
 31700   const onPatternSelectCallback = onBlockPatternSelect || onBlockPatternSelectDefault;
       
 31701   return Object(external_wp_element_["createElement"])("div", {
       
 31702     className: `block-editor-block-pattern-setup view-mode-${viewMode}`
       
 31703   }, Object(external_wp_element_["createElement"])(setup_toolbar, {
       
 31704     viewMode: viewMode,
       
 31705     setViewMode: setViewMode,
       
 31706     activeSlide: activeSlide,
       
 31707     totalSlides: patterns.length,
       
 31708     handleNext: () => {
       
 31709       setActiveSlide(active => active + 1);
       
 31710     },
       
 31711     handlePrevious: () => {
       
 31712       setActiveSlide(active => active - 1);
       
 31713     },
       
 31714     onBlockPatternSelect: () => {
       
 31715       onPatternSelectCallback(patterns[activeSlide].blocks);
       
 31716     },
       
 31717     onStartBlank: () => {
       
 31718       setShowBlank(true);
       
 31719     }
       
 31720   }), Object(external_wp_element_["createElement"])(SetupContent, {
       
 31721     viewMode: viewMode,
       
 31722     activeSlide: activeSlide,
       
 31723     patterns: patterns,
       
 31724     onBlockPatternSelect: onPatternSelectCallback
       
 31725   }));
       
 31726 };
       
 31727 
       
 31728 /* harmony default export */ var block_pattern_setup = (BlockPatternSetup);
       
 31729 
       
 31730 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/block-variation-transforms.js
       
 31731 /**
       
 31732  * External dependencies
       
 31733  */
       
 31734 
       
 31735 /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
       
 31736 
       
 31737 /**
       
 31738  * Matches the provided block variations with a block's attributes. If no match
       
 31739  * or more than one matches are found it returns `undefined`. If a single match is
       
 31740  * found it returns it.
       
 31741  *
       
 31742  * This is a simple implementation for now as it takes into account only the attributes
       
 31743  * of a block variation and not `InnerBlocks`.
       
 31744  *
       
 31745  * @param {Object} blockAttributes - The block attributes to try to find a match.
       
 31746  * @param {WPBlockVariation[]} variations - A list of block variations to test for a match.
       
 31747  * @return {?WPBlockVariation} - If a match is found returns it. If not or more than one matches are found returns `undefined`.
       
 31748  */
       
 31749 
       
 31750 const __experimentalGetMatchingVariation = (blockAttributes, variations) => {
       
 31751   if (!variations || !blockAttributes) return;
       
 31752   const matches = variations.filter(({
       
 31753     attributes
       
 31754   }) => {
       
 31755     if (!attributes || !Object.keys(attributes).length) return false;
       
 31756     return Object(external_lodash_["isMatch"])(blockAttributes, attributes);
       
 31757   });
       
 31758   if (matches.length !== 1) return;
       
 31759   return matches[0];
       
 31760 };
       
 31761 
       
 31762 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-variation-transforms/index.js
       
 31763 
       
 31764 
       
 31765 /**
       
 31766  * WordPress dependencies
       
 31767  */
       
 31768 
       
 31769 
       
 31770 
       
 31771 
       
 31772 
       
 31773 
       
 31774 /**
       
 31775  * Internal dependencies
       
 31776  */
       
 31777 
       
 31778 
       
 31779 
       
 31780 
       
 31781 function __experimentalBlockVariationTransforms({
       
 31782   blockClientId
       
 31783 }) {
       
 31784   const [selectedValue, setSelectedValue] = Object(external_wp_element_["useState"])();
       
 31785   const {
       
 31786     updateBlockAttributes
       
 31787   } = Object(external_wp_data_["useDispatch"])(store);
       
 31788   const {
       
 31789     variations,
       
 31790     blockAttributes
       
 31791   } = Object(external_wp_data_["useSelect"])(select => {
       
 31792     const {
       
 31793       getBlockVariations
       
 31794     } = select(external_wp_blocks_["store"]);
       
 31795     const {
       
 31796       getBlockName,
       
 31797       getBlockAttributes
       
 31798     } = select(store);
       
 31799     const blockName = blockClientId && getBlockName(blockClientId);
       
 31800     return {
       
 31801       variations: blockName && getBlockVariations(blockName, 'transform'),
       
 31802       blockAttributes: getBlockAttributes(blockClientId)
       
 31803     };
       
 31804   }, [blockClientId]);
       
 31805   Object(external_wp_element_["useEffect"])(() => {
       
 31806     var _getMatchingVariation;
       
 31807 
       
 31808     setSelectedValue((_getMatchingVariation = __experimentalGetMatchingVariation(blockAttributes, variations)) === null || _getMatchingVariation === void 0 ? void 0 : _getMatchingVariation.name);
       
 31809   }, [blockAttributes, variations]);
       
 31810   if (!(variations !== null && variations !== void 0 && variations.length)) return null;
       
 31811   const selectOptions = variations.map(({
       
 31812     name,
       
 31813     title,
       
 31814     description
       
 31815   }) => ({
       
 31816     value: name,
       
 31817     label: title,
       
 31818     info: description
       
 31819   }));
       
 31820 
       
 31821   const onSelectVariation = variationName => {
       
 31822     updateBlockAttributes(blockClientId, { ...variations.find(({
       
 31823         name
       
 31824       }) => name === variationName).attributes
       
 31825     });
       
 31826   };
       
 31827 
       
 31828   const baseClass = 'block-editor-block-variation-transforms';
       
 31829   return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
       
 31830     className: baseClass,
       
 31831     label: Object(external_wp_i18n_["__"])('Transform to variation'),
       
 31832     text: Object(external_wp_i18n_["__"])('Transform to variation'),
       
 31833     popoverProps: {
       
 31834       position: 'bottom center',
       
 31835       className: `${baseClass}__popover`
       
 31836     },
       
 31837     icon: chevron_down["a" /* default */],
       
 31838     toggleProps: {
       
 31839       iconPosition: 'right'
       
 31840     }
       
 31841   }, () => Object(external_wp_element_["createElement"])("div", {
       
 31842     className: `${baseClass}__container`
       
 31843   }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItemsChoice"], {
       
 31844     choices: selectOptions,
       
 31845     value: selectedValue,
       
 31846     onSelect: onSelectVariation
       
 31847   }))));
       
 31848 }
       
 31849 
       
 31850 /* harmony default export */ var block_variation_transforms = (__experimentalBlockVariationTransforms);
       
 31851 
       
 31852 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-vertical-alignment-control/icons.js
       
 31853 
       
 31854 
       
 31855 /**
       
 31856  * WordPress dependencies
       
 31857  */
       
 31858 
       
 31859 const alignBottom = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
 32166   xmlns: "http://www.w3.org/2000/svg",
 31860   xmlns: "http://www.w3.org/2000/svg",
 32167   viewBox: "0 0 24 24"
 31861   viewBox: "0 0 24 24"
 32168 }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 31862 }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 32169   d: "M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"
 31863   d: "M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"
 32170 }));
 31864 }));
 32171 var alignCenter = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
 31865 const alignCenter = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
 32172   xmlns: "http://www.w3.org/2000/svg",
 31866   xmlns: "http://www.w3.org/2000/svg",
 32173   viewBox: "0 0 24 24"
 31867   viewBox: "0 0 24 24"
 32174 }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 31868 }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 32175   d: "M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"
 31869   d: "M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"
 32176 }));
 31870 }));
 32177 var alignTop = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
 31871 const alignTop = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
 32178   xmlns: "http://www.w3.org/2000/svg",
 31872   xmlns: "http://www.w3.org/2000/svg",
 32179   viewBox: "0 0 24 24"
 31873   viewBox: "0 0 24 24"
 32180 }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 31874 }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 32181   d: "M9 20h6V9H9v11zM4 4v1.5h16V4H4z"
 31875   d: "M9 20h6V9H9v11zM4 4v1.5h16V4H4z"
 32182 }));
 31876 }));
 32183 
 31877 
 32184 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-vertical-alignment-toolbar/index.js
 31878 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-vertical-alignment-control/ui.js
 32185 
 31879 
 32186 
 31880 
 32187 
       
 32188 function block_vertical_alignment_toolbar_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; }
       
 32189 
       
 32190 function block_vertical_alignment_toolbar_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { block_vertical_alignment_toolbar_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 { block_vertical_alignment_toolbar_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 32191 
 31881 
 32192 /**
 31882 /**
 32193  * WordPress dependencies
 31883  * WordPress dependencies
 32194  */
 31884  */
 32195 
 31885 
 32197 /**
 31887 /**
 32198  * Internal dependencies
 31888  * Internal dependencies
 32199  */
 31889  */
 32200 
 31890 
 32201 
 31891 
 32202 var block_vertical_alignment_toolbar_BLOCK_ALIGNMENTS_CONTROLS = {
 31892 const ui_BLOCK_ALIGNMENTS_CONTROLS = {
 32203   top: {
 31893   top: {
 32204     icon: alignTop,
 31894     icon: alignTop,
 32205     title: Object(external_this_wp_i18n_["_x"])('Vertically Align Top', 'Block vertical alignment setting')
 31895     title: Object(external_wp_i18n_["_x"])('Align top', 'Block vertical alignment setting')
 32206   },
 31896   },
 32207   center: {
 31897   center: {
 32208     icon: alignCenter,
 31898     icon: alignCenter,
 32209     title: Object(external_this_wp_i18n_["_x"])('Vertically Align Middle', 'Block vertical alignment setting')
 31899     title: Object(external_wp_i18n_["_x"])('Align middle', 'Block vertical alignment setting')
 32210   },
 31900   },
 32211   bottom: {
 31901   bottom: {
 32212     icon: alignBottom,
 31902     icon: alignBottom,
 32213     title: Object(external_this_wp_i18n_["_x"])('Vertically Align Bottom', 'Block vertical alignment setting')
 31903     title: Object(external_wp_i18n_["_x"])('Align bottom', 'Block vertical alignment setting')
 32214   }
 31904   }
 32215 };
 31905 };
 32216 var block_vertical_alignment_toolbar_DEFAULT_CONTROLS = ['top', 'center', 'bottom'];
 31906 const ui_DEFAULT_CONTROLS = ['top', 'center', 'bottom'];
 32217 var block_vertical_alignment_toolbar_DEFAULT_CONTROL = 'top';
 31907 const ui_DEFAULT_CONTROL = 'top';
 32218 var block_vertical_alignment_toolbar_POPOVER_PROPS = {
 31908 const block_vertical_alignment_control_ui_POPOVER_PROPS = {
 32219   isAlternate: true
 31909   isAlternate: true
 32220 };
 31910 };
 32221 function BlockVerticalAlignmentToolbar(_ref) {
 31911 
 32222   var value = _ref.value,
 31912 function BlockVerticalAlignmentUI({
 32223       onChange = _ref.onChange,
 31913   value,
 32224       _ref$controls = _ref.controls,
 31914   onChange,
 32225       controls = _ref$controls === void 0 ? block_vertical_alignment_toolbar_DEFAULT_CONTROLS : _ref$controls,
 31915   controls = ui_DEFAULT_CONTROLS,
 32226       _ref$isCollapsed = _ref.isCollapsed,
 31916   isCollapsed = true,
 32227       isCollapsed = _ref$isCollapsed === void 0 ? true : _ref$isCollapsed;
 31917   isToolbar
 32228 
 31918 }) {
 32229   function applyOrUnset(align) {
 31919   function applyOrUnset(align) {
 32230     return function () {
 31920     return () => onChange(value === align ? undefined : align);
 32231       return onChange(value === align ? undefined : align);
 31921   }
 32232     };
 31922 
 32233   }
 31923   const activeAlignment = ui_BLOCK_ALIGNMENTS_CONTROLS[value];
 32234 
 31924   const defaultAlignmentControl = ui_BLOCK_ALIGNMENTS_CONTROLS[ui_DEFAULT_CONTROL];
 32235   var activeAlignment = block_vertical_alignment_toolbar_BLOCK_ALIGNMENTS_CONTROLS[value];
 31925   const UIComponent = isToolbar ? external_wp_components_["ToolbarGroup"] : external_wp_components_["ToolbarDropdownMenu"];
 32236   var defaultAlignmentControl = block_vertical_alignment_toolbar_BLOCK_ALIGNMENTS_CONTROLS[block_vertical_alignment_toolbar_DEFAULT_CONTROL];
 31926   const extraProps = isToolbar ? {
 32237   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
 31927     isCollapsed
 32238     popoverProps: block_vertical_alignment_toolbar_POPOVER_PROPS,
 31928   } : {};
 32239     isCollapsed: isCollapsed,
 31929   return Object(external_wp_element_["createElement"])(UIComponent, Object(esm_extends["a" /* default */])({
       
 31930     popoverProps: block_vertical_alignment_control_ui_POPOVER_PROPS,
 32240     icon: activeAlignment ? activeAlignment.icon : defaultAlignmentControl.icon,
 31931     icon: activeAlignment ? activeAlignment.icon : defaultAlignmentControl.icon,
 32241     label: Object(external_this_wp_i18n_["_x"])('Change vertical alignment', 'Block vertical alignment setting label'),
 31932     label: Object(external_wp_i18n_["_x"])('Change vertical alignment', 'Block vertical alignment setting label'),
 32242     controls: controls.map(function (control) {
 31933     controls: controls.map(control => {
 32243       return block_vertical_alignment_toolbar_objectSpread({}, block_vertical_alignment_toolbar_BLOCK_ALIGNMENTS_CONTROLS[control], {
 31934       return { ...ui_BLOCK_ALIGNMENTS_CONTROLS[control],
 32244         isActive: value === control,
 31935         isActive: value === control,
 32245         role: isCollapsed ? 'menuitemradio' : undefined,
 31936         role: isCollapsed ? 'menuitemradio' : undefined,
 32246         onClick: applyOrUnset(control)
 31937         onClick: applyOrUnset(control)
 32247       });
 31938       };
 32248     })
 31939     })
 32249   });
 31940   }, extraProps));
 32250 }
 31941 }
 32251 /**
 31942 /**
 32252  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md
 31943  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md
 32253  */
 31944  */
 32254 
 31945 
 32255 /* harmony default export */ var block_vertical_alignment_toolbar = (BlockVerticalAlignmentToolbar);
 31946 
       
 31947 /* harmony default export */ var block_vertical_alignment_control_ui = (BlockVerticalAlignmentUI);
       
 31948 
       
 31949 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-vertical-alignment-control/index.js
       
 31950 
       
 31951 
       
 31952 
       
 31953 /**
       
 31954  * Internal dependencies
       
 31955  */
       
 31956 
       
 31957 function BlockVerticalAlignmentControl(props) {
       
 31958   return Object(external_wp_element_["createElement"])(block_vertical_alignment_control_ui, Object(esm_extends["a" /* default */])({}, props, {
       
 31959     isToolbar: false
       
 31960   }));
       
 31961 }
       
 31962 function BlockVerticalAlignmentToolbar(props) {
       
 31963   return Object(external_wp_element_["createElement"])(block_vertical_alignment_control_ui, Object(esm_extends["a" /* default */])({}, props, {
       
 31964     isToolbar: true
       
 31965   }));
       
 31966 }
 32256 
 31967 
 32257 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-palette/with-color-context.js
 31968 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-palette/with-color-context.js
       
 31969 
       
 31970 
       
 31971 
 32258 /**
 31972 /**
 32259  * External dependencies
 31973  * External dependencies
 32260  */
 31974  */
 32261 
 31975 
 32262 /**
 31976 /**
 32263  * WordPress dependencies
 31977  * WordPress dependencies
 32264  */
 31978  */
 32265 
 31979 
 32266 
 31980 
 32267 
 31981 /**
 32268 /* harmony default export */ var with_color_context = (Object(external_this_wp_compose_["createHigherOrderComponent"])(Object(external_this_wp_data_["withSelect"])(function (select, ownProps) {
 31982  * Internal dependencies
 32269   var settings = select('core/block-editor').getSettings();
 31983  */
 32270   var colors = ownProps.colors === undefined ? settings.colors : ownProps.colors;
 31984 
 32271   var disableCustomColors = ownProps.disableCustomColors === undefined ? settings.disableCustomColors : ownProps.disableCustomColors;
 31985 
 32272   return {
 31986 /* harmony default export */ var with_color_context = (Object(external_wp_compose_["createHigherOrderComponent"])(WrappedComponent => {
 32273     colors: colors,
 31987   return props => {
 32274     disableCustomColors: disableCustomColors,
 31988     const colorsFeature = useSetting('color.palette');
 32275     hasColorsToChoose: !Object(external_this_lodash_["isEmpty"])(colors) || !disableCustomColors
 31989     const disableCustomColorsFeature = !useSetting('color.custom');
       
 31990     const colors = props.colors === undefined ? colorsFeature : props.colors;
       
 31991     const disableCustomColors = props.disableCustomColors === undefined ? disableCustomColorsFeature : props.disableCustomColors;
       
 31992     const hasColorsToChoose = !Object(external_lodash_["isEmpty"])(colors) || !disableCustomColors;
       
 31993     return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, {
       
 31994       colors,
       
 31995       disableCustomColors,
       
 31996       hasColorsToChoose
       
 31997     }));
 32276   };
 31998   };
 32277 }), 'withColorContext'));
 31999 }, 'withColorContext'));
 32278 
 32000 
 32279 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-palette/index.js
 32001 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-palette/index.js
 32280 /**
 32002 /**
 32281  * WordPress dependencies
 32003  * WordPress dependencies
 32282  */
 32004  */
 32284 /**
 32006 /**
 32285  * Internal dependencies
 32007  * Internal dependencies
 32286  */
 32008  */
 32287 
 32009 
 32288 
 32010 
 32289 /* harmony default export */ var color_palette = (with_color_context(external_this_wp_components_["ColorPalette"]));
 32011 /* harmony default export */ var color_palette = (with_color_context(external_wp_components_["ColorPalette"]));
 32290 
 32012 
 32291 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-palette/control.js
 32013 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-palette/control.js
 32292 
 32014 
 32293 
 32015 
 32294 
 32016 
 32295 
       
 32296 /**
 32017 /**
 32297  * Internal dependencies
 32018  * Internal dependencies
 32298  */
 32019  */
 32299 
 32020 
 32300 function ColorPaletteControl(_ref) {
 32021 function ColorPaletteControl({
 32301   var onChange = _ref.onChange,
 32022   onChange,
 32302       value = _ref.value,
 32023   value,
 32303       otherProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["onChange", "value"]);
 32024   ...otherProps
 32304 
 32025 }) {
 32305   return Object(external_this_wp_element_["createElement"])(control, Object(esm_extends["a" /* default */])({}, otherProps, {
 32026   return Object(external_wp_element_["createElement"])(control, Object(esm_extends["a" /* default */])({}, otherProps, {
 32306     onColorChange: onChange,
 32027     onColorChange: onChange,
 32307     colorValue: value,
 32028     colorValue: value,
 32308     gradients: [],
 32029     gradients: [],
 32309     disableCustomGradients: true
 32030     disableCustomGradients: true
 32310   }));
 32031   }));
 32313 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradient-picker/index.js
 32034 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradient-picker/index.js
 32314 
 32035 
 32315 
 32036 
 32316 
 32037 
 32317 /**
 32038 /**
 32318  * External dependencies
       
 32319  */
       
 32320 
       
 32321 /**
       
 32322  * WordPress dependencies
 32039  * WordPress dependencies
 32323  */
 32040  */
 32324 
 32041 
 32325 
 32042 /**
 32326 
 32043  * Internal dependencies
       
 32044  */
       
 32045 
       
 32046 
       
 32047 const gradient_picker_EMPTY_ARRAY = [];
 32327 
 32048 
 32328 function GradientPickerWithGradients(props) {
 32049 function GradientPickerWithGradients(props) {
 32329   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 32050   const gradients = useSetting('color.gradients') || gradient_picker_EMPTY_ARRAY;
 32330     return Object(external_this_lodash_["pick"])(select('core/block-editor').getSettings(), ['gradients', 'disableCustomGradients']);
 32051   const disableCustomGradients = !useSetting('color.customGradient');
 32331   }, []),
 32052   return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalGradientPicker"], Object(esm_extends["a" /* default */])({
 32332       gradients = _useSelect.gradients,
       
 32333       disableCustomGradients = _useSelect.disableCustomGradients;
       
 32334 
       
 32335   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["__experimentalGradientPicker"], Object(esm_extends["a" /* default */])({
       
 32336     gradients: props.gradients !== undefined ? props.gradient : gradients,
 32053     gradients: props.gradients !== undefined ? props.gradient : gradients,
 32337     disableCustomGradients: props.disableCustomGradients !== undefined ? props.disableCustomGradients : disableCustomGradients
 32054     disableCustomGradients: props.disableCustomGradients !== undefined ? props.disableCustomGradients : disableCustomGradients
 32338   }, props));
 32055   }, props));
 32339 }
 32056 }
 32340 
 32057 
 32341 /* harmony default export */ var gradient_picker = (function (props) {
 32058 /* harmony default export */ var gradient_picker = (function (props) {
 32342   var ComponentToUse = props.gradients !== undefined && props.disableCustomGradients !== undefined ? external_this_wp_components_["__experimentalGradientPicker"] : GradientPickerWithGradients;
 32059   const ComponentToUse = props.gradients !== undefined && props.disableCustomGradients !== undefined ? external_wp_components_["__experimentalGradientPicker"] : GradientPickerWithGradients;
 32343   return Object(external_this_wp_element_["createElement"])(ComponentToUse, props);
 32060   return Object(external_wp_element_["createElement"])(ComponentToUse, props);
 32344 });
 32061 });
 32345 
 32062 
 32346 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradient-picker/control.js
 32063 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradient-picker/control.js
 32347 
 32064 
 32348 
 32065 
 32349 
 32066 
 32350 
       
 32351 /**
 32067 /**
 32352  * External dependencies
 32068  * External dependencies
 32353  */
 32069  */
 32354 
 32070 
 32355 
 32071 
 32357  * WordPress dependencies
 32073  * WordPress dependencies
 32358  */
 32074  */
 32359 
 32075 
 32360 
 32076 
 32361 
 32077 
 32362 
       
 32363 /**
 32078 /**
 32364  * Internal dependencies
 32079  * Internal dependencies
 32365  */
 32080  */
 32366 
 32081 
 32367 
 32082 
 32368 function GradientPickerControl(_ref) {
 32083 
 32369   var className = _ref.className,
 32084 function GradientPickerControl({
 32370       value = _ref.value,
 32085   className,
 32371       onChange = _ref.onChange,
 32086   value,
 32372       _ref$label = _ref.label,
 32087   onChange,
 32373       label = _ref$label === void 0 ? Object(external_this_wp_i18n_["__"])('Gradient Presets') : _ref$label,
 32088   label = Object(external_wp_i18n_["__"])('Gradient Presets'),
 32374       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "value", "onChange", "label"]);
 32089   ...props
 32375 
 32090 }) {
 32376   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 32091   const gradients = useSetting('color.gradients');
 32377     return Object(external_this_lodash_["pick"])(select('core/block-editor').getSettings(), ['gradients', 'disableCustomGradients']);
 32092   const disableCustomGradients = !useSetting('color.customGradient');
 32378   }, []),
 32093 
 32379       _useSelect$gradients = _useSelect.gradients,
 32094   if (Object(external_lodash_["isEmpty"])(gradients) && disableCustomGradients) {
 32380       gradients = _useSelect$gradients === void 0 ? [] : _useSelect$gradients,
       
 32381       disableCustomGradients = _useSelect.disableCustomGradients;
       
 32382 
       
 32383   if (Object(external_this_lodash_["isEmpty"])(gradients) && disableCustomGradients) {
       
 32384     return null;
 32095     return null;
 32385   }
 32096   }
 32386 
 32097 
 32387   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["BaseControl"], {
 32098   return Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
 32388     className: classnames_default()('block-editor-gradient-picker-control', className)
 32099     className: classnames_default()('block-editor-gradient-picker-control', className)
 32389   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["BaseControl"].VisualLabel, null, label), Object(external_this_wp_element_["createElement"])(gradient_picker, Object(esm_extends["a" /* default */])({
 32100   }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"].VisualLabel, null, label), Object(external_wp_element_["createElement"])(gradient_picker, Object(esm_extends["a" /* default */])({
 32390     value: value,
 32101     value: value,
 32391     onChange: onChange,
 32102     onChange: onChange,
 32392     className: "block-editor-gradient-picker-control__gradient-picker-presets",
 32103     className: "block-editor-gradient-picker-control__gradient-picker-presets",
 32393     gradients: gradients,
 32104     gradients: gradients,
 32394     disableCustomGradients: disableCustomGradients
 32105     disableCustomGradients: disableCustomGradients
 32406  * WordPress dependencies
 32117  * WordPress dependencies
 32407  */
 32118  */
 32408 
 32119 
 32409 
 32120 
 32410 
 32121 
 32411 
       
 32412 /**
 32122 /**
 32413  * Internal dependencies
 32123  * Internal dependencies
 32414  */
 32124  */
 32415 
 32125 
 32416 
 32126 
       
 32127 
 32417 function GradientPanel(props) {
 32128 function GradientPanel(props) {
 32418   var gradients = Object(external_this_wp_data_["useSelect"])(function (select) {
 32129   const gradients = useSetting('color.gradients');
 32419     return select('core/block-editor').getSettings().gradients;
 32130 
 32420   }, []);
 32131   if (Object(external_lodash_["isEmpty"])(gradients)) {
 32421 
       
 32422   if (Object(external_this_lodash_["isEmpty"])(gradients)) {
       
 32423     return null;
 32132     return null;
 32424   }
 32133   }
 32425 
 32134 
 32426   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
 32135   return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 32427     title: Object(external_this_wp_i18n_["__"])('Gradient')
 32136     title: Object(external_wp_i18n_["__"])('Gradient')
 32428   }, Object(external_this_wp_element_["createElement"])(GradientPickerControl, props));
 32137   }, Object(external_wp_element_["createElement"])(GradientPickerControl, props));
 32429 }
 32138 }
 32430 
 32139 
 32431 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/image-size-control/index.js
 32140 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/image-size-control/index.js
 32432 
 32141 
 32433 
 32142 
 32439  * WordPress dependencies
 32148  * WordPress dependencies
 32440  */
 32149  */
 32441 
 32150 
 32442 
 32151 
 32443 
 32152 
 32444 var IMAGE_SIZE_PRESETS = [25, 50, 75, 100];
 32153 const IMAGE_SIZE_PRESETS = [25, 50, 75, 100];
 32445 function ImageSizeControl(_ref) {
 32154 function ImageSizeControl({
 32446   var _ref2, _ref3;
 32155   imageWidth,
 32447 
 32156   imageHeight,
 32448   var imageWidth = _ref.imageWidth,
 32157   imageSizeOptions = [],
 32449       imageHeight = _ref.imageHeight,
 32158   isResizable = true,
 32450       _ref$imageSizeOptions = _ref.imageSizeOptions,
 32159   slug,
 32451       imageSizeOptions = _ref$imageSizeOptions === void 0 ? [] : _ref$imageSizeOptions,
 32160   width,
 32452       _ref$isResizable = _ref.isResizable,
 32161   height,
 32453       isResizable = _ref$isResizable === void 0 ? true : _ref$isResizable,
 32162   onChange,
 32454       slug = _ref.slug,
 32163   onChangeImage = external_lodash_["noop"]
 32455       width = _ref.width,
 32164 }) {
 32456       height = _ref.height,
 32165   var _ref, _ref2;
 32457       _onChange = _ref.onChange,
       
 32458       _ref$onChangeImage = _ref.onChangeImage,
       
 32459       onChangeImage = _ref$onChangeImage === void 0 ? external_this_lodash_["noop"] : _ref$onChangeImage;
       
 32460 
 32166 
 32461   function updateDimensions(nextWidth, nextHeight) {
 32167   function updateDimensions(nextWidth, nextHeight) {
 32462     return function () {
 32168     return () => {
 32463       _onChange({
 32169       onChange({
 32464         width: nextWidth,
 32170         width: nextWidth,
 32465         height: nextHeight
 32171         height: nextHeight
 32466       });
 32172       });
 32467     };
 32173     };
 32468   }
 32174   }
 32469 
 32175 
 32470   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, !Object(external_this_lodash_["isEmpty"])(imageSizeOptions) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SelectControl"], {
 32176   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, !Object(external_lodash_["isEmpty"])(imageSizeOptions) && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
 32471     label: Object(external_this_wp_i18n_["__"])('Image size'),
 32177     label: Object(external_wp_i18n_["__"])('Image size'),
 32472     value: slug,
 32178     value: slug,
 32473     options: imageSizeOptions,
 32179     options: imageSizeOptions,
 32474     onChange: onChangeImage
 32180     onChange: onChangeImage
 32475   }), isResizable && Object(external_this_wp_element_["createElement"])("div", {
 32181   }), isResizable && Object(external_wp_element_["createElement"])("div", {
 32476     className: "block-editor-image-size-control"
 32182     className: "block-editor-image-size-control"
 32477   }, Object(external_this_wp_element_["createElement"])("p", {
 32183   }, Object(external_wp_element_["createElement"])("p", {
 32478     className: "block-editor-image-size-control__row"
 32184     className: "block-editor-image-size-control__row"
 32479   }, Object(external_this_wp_i18n_["__"])('Image dimensions')), Object(external_this_wp_element_["createElement"])("div", {
 32185   }, Object(external_wp_i18n_["__"])('Image dimensions')), Object(external_wp_element_["createElement"])("div", {
 32480     className: "block-editor-image-size-control__row"
 32186     className: "block-editor-image-size-control__row"
 32481   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
 32187   }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 32482     type: "number",
 32188     type: "number",
 32483     className: "block-editor-image-size-control__width",
 32189     className: "block-editor-image-size-control__width",
 32484     label: Object(external_this_wp_i18n_["__"])('Width'),
 32190     label: Object(external_wp_i18n_["__"])('Width'),
 32485     value: (_ref2 = width !== null && width !== void 0 ? width : imageWidth) !== null && _ref2 !== void 0 ? _ref2 : '',
 32191     value: (_ref = width !== null && width !== void 0 ? width : imageWidth) !== null && _ref !== void 0 ? _ref : '',
 32486     min: 1,
 32192     min: 1,
 32487     onChange: function onChange(value) {
 32193     onChange: value => onChange({
 32488       return _onChange({
 32194       width: parseInt(value, 10)
 32489         width: parseInt(value, 10)
 32195     })
 32490       });
 32196   }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 32491     }
       
 32492   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
       
 32493     type: "number",
 32197     type: "number",
 32494     className: "block-editor-image-size-control__height",
 32198     className: "block-editor-image-size-control__height",
 32495     label: Object(external_this_wp_i18n_["__"])('Height'),
 32199     label: Object(external_wp_i18n_["__"])('Height'),
 32496     value: (_ref3 = height !== null && height !== void 0 ? height : imageHeight) !== null && _ref3 !== void 0 ? _ref3 : '',
 32200     value: (_ref2 = height !== null && height !== void 0 ? height : imageHeight) !== null && _ref2 !== void 0 ? _ref2 : '',
 32497     min: 1,
 32201     min: 1,
 32498     onChange: function onChange(value) {
 32202     onChange: value => onChange({
 32499       return _onChange({
 32203       height: parseInt(value, 10)
 32500         height: parseInt(value, 10)
 32204     })
 32501       });
 32205   })), Object(external_wp_element_["createElement"])("div", {
 32502     }
       
 32503   })), Object(external_this_wp_element_["createElement"])("div", {
       
 32504     className: "block-editor-image-size-control__row"
 32206     className: "block-editor-image-size-control__row"
 32505   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ButtonGroup"], {
 32207   }, Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
 32506     "aria-label": Object(external_this_wp_i18n_["__"])('Image size presets')
 32208     "aria-label": Object(external_wp_i18n_["__"])('Image size presets')
 32507   }, IMAGE_SIZE_PRESETS.map(function (scale) {
 32209   }, IMAGE_SIZE_PRESETS.map(scale => {
 32508     var scaledWidth = Math.round(imageWidth * (scale / 100));
 32210     const scaledWidth = Math.round(imageWidth * (scale / 100));
 32509     var scaledHeight = Math.round(imageHeight * (scale / 100));
 32211     const scaledHeight = Math.round(imageHeight * (scale / 100));
 32510     var isCurrent = width === scaledWidth && height === scaledHeight;
 32212     const isCurrent = width === scaledWidth && height === scaledHeight;
 32511     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 32213     return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 32512       key: scale,
 32214       key: scale,
 32513       isSmall: true,
 32215       isSmall: true,
 32514       isPrimary: isCurrent,
 32216       isPrimary: isCurrent,
 32515       isPressed: isCurrent,
 32217       isPressed: isCurrent,
 32516       onClick: updateDimensions(scaledWidth, scaledHeight)
 32218       onClick: updateDimensions(scaledWidth, scaledHeight)
 32517     }, scale, "%");
 32219     }, scale, "%");
 32518   })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 32220   })), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 32519     isSmall: true,
 32221     isSmall: true,
 32520     onClick: updateDimensions()
 32222     onClick: updateDimensions()
 32521   }, Object(external_this_wp_i18n_["__"])('Reset')))));
 32223   }, Object(external_wp_i18n_["__"])('Reset')))));
 32522 }
 32224 }
 32523 
 32225 
 32524 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/with-client-id.js
 32226 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/with-client-id.js
 32525 
 32227 
 32526 
 32228 
 32532 /**
 32234 /**
 32533  * Internal dependencies
 32235  * Internal dependencies
 32534  */
 32236  */
 32535 
 32237 
 32536 
 32238 
 32537 var withClientId = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (WrappedComponent) {
 32239 const withClientId = Object(external_wp_compose_["createHigherOrderComponent"])(WrappedComponent => props => {
 32538   return function (props) {
 32240   const {
 32539     var _useBlockEditContext = useBlockEditContext(),
 32241     clientId
 32540         clientId = _useBlockEditContext.clientId;
 32242   } = useBlockEditContext();
 32541 
 32243   return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, {
 32542     return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, {
 32244     clientId: clientId
 32543       clientId: clientId
 32245   }));
 32544     }));
       
 32545   };
       
 32546 }, 'withClientId');
 32246 }, 'withClientId');
 32547 /* harmony default export */ var with_client_id = (withClientId);
 32247 /* harmony default export */ var with_client_id = (withClientId);
 32548 
 32248 
 32549 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/button-block-appender.js
 32249 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/button-block-appender.js
 32550 
 32250 
 32552 /**
 32252 /**
 32553  * Internal dependencies
 32253  * Internal dependencies
 32554  */
 32254  */
 32555 
 32255 
 32556 
 32256 
 32557 var inner_blocks_button_block_appender_ButtonBlockAppender = function ButtonBlockAppender(_ref) {
 32257 const button_block_appender_ButtonBlockAppender = ({
 32558   var clientId = _ref.clientId,
 32258   clientId,
 32559       showSeparator = _ref.showSeparator,
 32259   showSeparator,
 32560       isFloating = _ref.isFloating,
 32260   isFloating,
 32561       onAddBlock = _ref.onAddBlock;
 32261   onAddBlock
 32562   return Object(external_this_wp_element_["createElement"])(button_block_appender, {
 32262 }) => {
       
 32263   return Object(external_wp_element_["createElement"])(button_block_appender, {
 32563     rootClientId: clientId,
 32264     rootClientId: clientId,
 32564     showSeparator: showSeparator,
 32265     showSeparator: showSeparator,
 32565     isFloating: isFloating,
 32266     isFloating: isFloating,
 32566     onAddBlock: onAddBlock
 32267     onAddBlock: onAddBlock
 32567   });
 32268   });
 32568 };
 32269 };
 32569 /* harmony default export */ var inner_blocks_button_block_appender = (with_client_id(inner_blocks_button_block_appender_ButtonBlockAppender));
 32270 /* harmony default export */ var inner_blocks_button_block_appender = (with_client_id(button_block_appender_ButtonBlockAppender));
 32570 
 32271 
 32571 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/default-block-appender.js
 32272 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/default-block-appender.js
 32572 
 32273 
 32573 
 32274 
 32574 /**
 32275 /**
 32585  * Internal dependencies
 32286  * Internal dependencies
 32586  */
 32287  */
 32587 
 32288 
 32588 
 32289 
 32589 
 32290 
 32590 var inner_blocks_default_block_appender_DefaultBlockAppender = function DefaultBlockAppender(_ref) {
 32291 
 32591   var clientId = _ref.clientId,
 32292 const default_block_appender_DefaultBlockAppender = ({
 32592       lastBlockClientId = _ref.lastBlockClientId;
 32293   clientId,
 32593   return Object(external_this_wp_element_["createElement"])(default_block_appender, {
 32294   lastBlockClientId
       
 32295 }) => {
       
 32296   return Object(external_wp_element_["createElement"])(default_block_appender, {
 32594     rootClientId: clientId,
 32297     rootClientId: clientId,
 32595     lastBlockClientId: lastBlockClientId
 32298     lastBlockClientId: lastBlockClientId
 32596   });
 32299   });
 32597 };
 32300 };
 32598 /* harmony default export */ var inner_blocks_default_block_appender = (Object(external_this_wp_compose_["compose"])([with_client_id, Object(external_this_wp_data_["withSelect"])(function (select, _ref2) {
 32301 /* harmony default export */ var inner_blocks_default_block_appender = (Object(external_wp_compose_["compose"])([with_client_id, Object(external_wp_data_["withSelect"])((select, {
 32599   var clientId = _ref2.clientId;
 32302   clientId
 32600 
 32303 }) => {
 32601   var _select = select('core/block-editor'),
 32304   const {
 32602       getBlockOrder = _select.getBlockOrder;
 32305     getBlockOrder
 32603 
 32306   } = select(store);
 32604   var blockClientIds = getBlockOrder(clientId);
 32307   const blockClientIds = getBlockOrder(clientId);
 32605   return {
 32308   return {
 32606     lastBlockClientId: Object(external_this_lodash_["last"])(blockClientIds)
 32309     lastBlockClientId: Object(external_lodash_["last"])(blockClientIds)
 32607   };
 32310   };
 32608 })])(inner_blocks_default_block_appender_DefaultBlockAppender));
 32311 })])(default_block_appender_DefaultBlockAppender));
 32609 
 32312 
 32610 // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
 32313 // EXTERNAL MODULE: external ["wp","isShallowEqual"]
 32611 var external_this_wp_isShallowEqual_ = __webpack_require__(64);
 32314 var external_wp_isShallowEqual_ = __webpack_require__("rl8x");
 32612 var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
 32315 var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_);
 32613 
 32316 
 32614 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/use-nested-settings-update.js
 32317 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/use-nested-settings-update.js
 32615 /**
 32318 /**
 32616  * WordPress dependencies
 32319  * WordPress dependencies
 32617  */
 32320  */
 32618 
 32321 
       
 32322 
       
 32323 
       
 32324 /**
       
 32325  * Internal dependencies
       
 32326  */
 32619 
 32327 
 32620 
 32328 
 32621 /**
 32329 /**
 32622  * This hook is a side effect which updates the block-editor store when changes
 32330  * This hook is a side effect which updates the block-editor store when changes
 32623  * happen to inner block settings. The given props are transformed into a
 32331  * happen to inner block settings. The given props are transformed into a
 32636  * @param {string}   orientation     The direction in which the block
 32344  * @param {string}   orientation     The direction in which the block
 32637  *                                   should face.
 32345  *                                   should face.
 32638  */
 32346  */
 32639 
 32347 
 32640 function useNestedSettingsUpdate(clientId, allowedBlocks, templateLock, captureToolbars, orientation) {
 32348 function useNestedSettingsUpdate(clientId, allowedBlocks, templateLock, captureToolbars, orientation) {
 32641   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 32349   const {
 32642       updateBlockListSettings = _useDispatch.updateBlockListSettings;
 32350     updateBlockListSettings
 32643 
 32351   } = Object(external_wp_data_["useDispatch"])(store);
 32644   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 32352   const {
 32645     var rootClientId = select('core/block-editor').getBlockRootClientId(clientId);
 32353     blockListSettings,
       
 32354     parentLock
       
 32355   } = Object(external_wp_data_["useSelect"])(select => {
       
 32356     const rootClientId = select(store).getBlockRootClientId(clientId);
 32646     return {
 32357     return {
 32647       blockListSettings: select('core/block-editor').getBlockListSettings(clientId),
 32358       blockListSettings: select(store).getBlockListSettings(clientId),
 32648       parentLock: select('core/block-editor').getTemplateLock(rootClientId)
 32359       parentLock: select(store).getTemplateLock(rootClientId)
 32649     };
 32360     };
 32650   }, [clientId]),
 32361   }, [clientId]); // Memoize as inner blocks implementors often pass a new array on every
 32651       blockListSettings = _useSelect.blockListSettings,
 32362   // render.
 32652       parentLock = _useSelect.parentLock;
 32363 
 32653 
 32364   const _allowedBlocks = Object(external_wp_element_["useMemo"])(() => allowedBlocks, allowedBlocks);
 32654   Object(external_this_wp_element_["useLayoutEffect"])(function () {
 32365 
 32655     var newSettings = {
 32366   Object(external_wp_element_["useLayoutEffect"])(() => {
 32656       allowedBlocks: allowedBlocks,
 32367     const newSettings = {
       
 32368       allowedBlocks: _allowedBlocks,
 32657       templateLock: templateLock === undefined ? parentLock : templateLock
 32369       templateLock: templateLock === undefined ? parentLock : templateLock
 32658     }; // These values are not defined for RN, so only include them if they
 32370     }; // These values are not defined for RN, so only include them if they
 32659     // are defined.
 32371     // are defined.
 32660 
 32372 
 32661     if (captureToolbars !== undefined) {
 32373     if (captureToolbars !== undefined) {
 32664 
 32376 
 32665     if (orientation !== undefined) {
 32377     if (orientation !== undefined) {
 32666       newSettings.orientation = orientation;
 32378       newSettings.orientation = orientation;
 32667     }
 32379     }
 32668 
 32380 
 32669     if (!external_this_wp_isShallowEqual_default()(blockListSettings, newSettings)) {
 32381     if (!external_wp_isShallowEqual_default()(blockListSettings, newSettings)) {
 32670       updateBlockListSettings(clientId, newSettings);
 32382       updateBlockListSettings(clientId, newSettings);
 32671     }
 32383     }
 32672   }, [clientId, blockListSettings, allowedBlocks, templateLock, parentLock, captureToolbars, orientation, updateBlockListSettings]);
 32384   }, [clientId, blockListSettings, _allowedBlocks, templateLock, parentLock, captureToolbars, orientation, updateBlockListSettings]);
 32673 }
 32385 }
 32674 
 32386 
 32675 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/use-inner-block-template-sync.js
 32387 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/use-inner-block-template-sync.js
 32676 /**
 32388 /**
 32677  * External dependencies
 32389  * External dependencies
 32680 /**
 32392 /**
 32681  * WordPress dependencies
 32393  * WordPress dependencies
 32682  */
 32394  */
 32683 
 32395 
 32684 
 32396 
       
 32397 
       
 32398 
       
 32399 /**
       
 32400  * Internal dependencies
       
 32401  */
 32685 
 32402 
 32686 
 32403 
 32687 /**
 32404 /**
 32688  * This hook makes sure that a block's inner blocks stay in sync with the given
 32405  * This hook makes sure that a block's inner blocks stay in sync with the given
 32689  * block "template". The template is a block hierarchy to which inner blocks must
 32406  * block "template". The template is a block hierarchy to which inner blocks must
 32703  *                              block-editor selection state when inner blocks
 32420  *                              block-editor selection state when inner blocks
 32704  *                              are replaced after template synchronization.
 32421  *                              are replaced after template synchronization.
 32705  */
 32422  */
 32706 
 32423 
 32707 function useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection) {
 32424 function useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection) {
 32708   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 32425   const {
 32709       replaceInnerBlocks = _useDispatch.replaceInnerBlocks;
 32426     getSelectedBlocksInitialCaretPosition
 32710 
 32427   } = Object(external_wp_data_["useSelect"])(store);
 32711   var innerBlocks = Object(external_this_wp_data_["useSelect"])(function (select) {
 32428   const {
 32712     return select('core/block-editor').getBlocks(clientId);
 32429     replaceInnerBlocks
 32713   }, [clientId]); // Maintain a reference to the previous value so we can do a deep equality check.
 32430   } = Object(external_wp_data_["useDispatch"])(store);
 32714 
 32431   const innerBlocks = Object(external_wp_data_["useSelect"])(select => select(store).getBlocks(clientId), [clientId]); // Maintain a reference to the previous value so we can do a deep equality check.
 32715   var existingTemplate = Object(external_this_wp_element_["useRef"])(null);
 32432 
 32716   Object(external_this_wp_element_["useLayoutEffect"])(function () {
 32433   const existingTemplate = Object(external_wp_element_["useRef"])(null);
       
 32434   Object(external_wp_element_["useLayoutEffect"])(() => {
 32717     // Only synchronize innerBlocks with template if innerBlocks are empty or
 32435     // Only synchronize innerBlocks with template if innerBlocks are empty or
 32718     // a locking all exists directly on the block.
 32436     // a locking all exists directly on the block.
 32719     if (innerBlocks.length === 0 || templateLock === 'all') {
 32437     if (innerBlocks.length === 0 || templateLock === 'all') {
 32720       var hasTemplateChanged = !Object(external_this_lodash_["isEqual"])(template, existingTemplate.current);
 32438       const hasTemplateChanged = !Object(external_lodash_["isEqual"])(template, existingTemplate.current);
 32721 
 32439 
 32722       if (hasTemplateChanged) {
 32440       if (hasTemplateChanged) {
 32723         existingTemplate.current = template;
 32441         existingTemplate.current = template;
 32724         var nextBlocks = Object(external_this_wp_blocks_["synchronizeBlocksWithTemplate"])(innerBlocks, template);
 32442         const nextBlocks = Object(external_wp_blocks_["synchronizeBlocksWithTemplate"])(innerBlocks, template);
 32725 
 32443 
 32726         if (!Object(external_this_lodash_["isEqual"])(nextBlocks, innerBlocks)) {
 32444         if (!Object(external_lodash_["isEqual"])(nextBlocks, innerBlocks)) {
 32727           replaceInnerBlocks(clientId, nextBlocks, innerBlocks.length === 0 && templateInsertUpdatesSelection && nextBlocks.length !== 0);
 32445           replaceInnerBlocks(clientId, nextBlocks, innerBlocks.length === 0 && templateInsertUpdatesSelection && nextBlocks.length !== 0, // This ensures the "initialPosition" doesn't change when applying the template
       
 32446           // If we're supposed to focus the block, we'll focus the first inner block
       
 32447           // otherwise, we won't apply any auto-focus.
       
 32448           // This ensures for instance that the focus stays in the inserter when inserting the "buttons" block.
       
 32449           getSelectedBlocksInitialCaretPosition());
 32728         }
 32450         }
 32729       }
 32451       }
 32730     }
 32452     }
 32731   }, [innerBlocks, templateLock, clientId]);
 32453   }, [innerBlocks, template, templateLock, clientId]);
 32732 }
 32454 }
 32733 
 32455 
 32734 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/get-block-context.js
 32456 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/get-block-context.js
 32735 /**
 32457 /**
 32736  * External dependencies
 32458  * External dependencies
 32741  * WeakMap mapping attributes object to context value.
 32463  * WeakMap mapping attributes object to context value.
 32742  *
 32464  *
 32743  * @type {WeakMap<string,WeakMap<string,*>>}
 32465  * @type {WeakMap<string,WeakMap<string,*>>}
 32744  */
 32466  */
 32745 
 32467 
 32746 var BLOCK_CONTEXT_CACHE = new WeakMap();
 32468 const BLOCK_CONTEXT_CACHE = new WeakMap();
 32747 /**
 32469 /**
 32748  * Returns a cached context object value for a given set of attributes for the
 32470  * Returns a cached context object value for a given set of attributes for the
 32749  * block type.
 32471  * block type.
 32750  *
 32472  *
 32751  * @param {Record<string,*>} attributes Block attributes object.
 32473  * @param {Record<string,*>} attributes Block attributes object.
 32757 function getBlockContext(attributes, blockType) {
 32479 function getBlockContext(attributes, blockType) {
 32758   if (!BLOCK_CONTEXT_CACHE.has(blockType)) {
 32480   if (!BLOCK_CONTEXT_CACHE.has(blockType)) {
 32759     BLOCK_CONTEXT_CACHE.set(blockType, new WeakMap());
 32481     BLOCK_CONTEXT_CACHE.set(blockType, new WeakMap());
 32760   }
 32482   }
 32761 
 32483 
 32762   var blockTypeCache = BLOCK_CONTEXT_CACHE.get(blockType);
 32484   const blockTypeCache = BLOCK_CONTEXT_CACHE.get(blockType);
 32763 
 32485 
 32764   if (!blockTypeCache.has(attributes)) {
 32486   if (!blockTypeCache.has(attributes)) {
 32765     var context = Object(external_this_lodash_["mapValues"])(blockType.providesContext, function (attributeName) {
 32487     const context = Object(external_lodash_["mapValues"])(blockType.providesContext, attributeName => attributes[attributeName]);
 32766       return attributes[attributeName];
       
 32767     });
       
 32768     blockTypeCache.set(attributes, context);
 32488     blockTypeCache.set(attributes, context);
 32769   }
 32489   }
 32770 
 32490 
 32771   return blockTypeCache.get(attributes);
 32491   return blockTypeCache.get(attributes);
 32772 }
 32492 }
 32773 
 32493 
 32774 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/index.js
 32494 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/index.js
 32775 
 32495 
 32776 
 32496 
 32777 
 32497 
 32778 
       
 32779 function inner_blocks_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; }
       
 32780 
       
 32781 function inner_blocks_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { inner_blocks_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 { inner_blocks_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 32782 
       
 32783 /**
 32498 /**
 32784  * External dependencies
 32499  * External dependencies
 32785  */
 32500  */
 32786 
 32501 
 32787 /**
 32502 /**
 32799 
 32514 
 32800 
 32515 
 32801 
 32516 
 32802 
 32517 
 32803 
 32518 
 32804 /**
 32519 
 32805  * Internal dependencies
       
 32806  */
       
 32807 
 32520 
 32808 
 32521 
 32809 
 32522 
 32810 
 32523 
 32811 
 32524 
 32817  *
 32530  *
 32818  * @param {Object} props The component props.
 32531  * @param {Object} props The component props.
 32819  */
 32532  */
 32820 
 32533 
 32821 function UncontrolledInnerBlocks(props) {
 32534 function UncontrolledInnerBlocks(props) {
 32822   var clientId = props.clientId,
 32535   const {
 32823       allowedBlocks = props.allowedBlocks,
 32536     clientId,
 32824       template = props.template,
 32537     allowedBlocks,
 32825       templateLock = props.templateLock,
 32538     template,
 32826       forwardedRef = props.forwardedRef,
 32539     templateLock,
 32827       templateInsertUpdatesSelection = props.templateInsertUpdatesSelection,
 32540     wrapperRef,
 32828       captureToolbars = props.__experimentalCaptureToolbars,
 32541     templateInsertUpdatesSelection,
 32829       orientation = props.orientation;
 32542     __experimentalCaptureToolbars: captureToolbars,
 32830   var isSmallScreen = Object(external_this_wp_compose_["useViewportMatch"])('medium', '<');
 32543     __experimentalAppenderTagName,
 32831 
 32544     renderAppender,
 32832   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 32545     orientation,
 32833     var _select = select('core/block-editor'),
 32546     placeholder,
 32834         getBlock = _select.getBlock,
 32547     __experimentalLayout
 32835         isBlockSelected = _select.isBlockSelected,
 32548   } = props;
 32836         hasSelectedInnerBlock = _select.hasSelectedInnerBlock,
       
 32837         isNavigationMode = _select.isNavigationMode;
       
 32838 
       
 32839     var theBlock = getBlock(clientId);
       
 32840     return {
       
 32841       block: theBlock,
       
 32842       hasOverlay: theBlock.name !== 'core/template' && !isBlockSelected(clientId) && !hasSelectedInnerBlock(clientId, true),
       
 32843       enableClickThrough: isNavigationMode() || isSmallScreen
       
 32844     };
       
 32845   }),
       
 32846       hasOverlay = _useSelect.hasOverlay,
       
 32847       block = _useSelect.block,
       
 32848       enableClickThrough = _useSelect.enableClickThrough;
       
 32849 
       
 32850   useNestedSettingsUpdate(clientId, allowedBlocks, templateLock, captureToolbars, orientation);
 32549   useNestedSettingsUpdate(clientId, allowedBlocks, templateLock, captureToolbars, orientation);
 32851   useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection);
 32550   useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection);
 32852   var classes = classnames_default()({
 32551   const context = Object(external_wp_data_["useSelect"])(select => {
 32853     'has-overlay': enableClickThrough && hasOverlay,
 32552     const block = select(store).getBlock(clientId);
 32854     'is-capturing-toolbar': captureToolbars
 32553     const blockType = Object(external_wp_blocks_["getBlockType"])(block.name);
 32855   });
 32554 
 32856   var blockList = Object(external_this_wp_element_["createElement"])(block_list, Object(esm_extends["a" /* default */])({}, props, {
 32555     if (!blockType || !blockType.providesContext) {
 32857     ref: forwardedRef,
 32556       return;
       
 32557     }
       
 32558 
       
 32559     return getBlockContext(block.attributes, blockType);
       
 32560   }, [clientId]); // This component needs to always be synchronous as it's the one changing
       
 32561   // the async mode depending on the block selection.
       
 32562 
       
 32563   return Object(external_wp_element_["createElement"])(BlockContextProvider, {
       
 32564     value: context
       
 32565   }, Object(external_wp_element_["createElement"])(BlockListItems, {
 32858     rootClientId: clientId,
 32566     rootClientId: clientId,
 32859     className: classes
 32567     renderAppender: renderAppender,
 32860   })); // Wrap context provider if (and only if) block has context to provide.
 32568     __experimentalAppenderTagName: __experimentalAppenderTagName,
 32861 
 32569     __experimentalLayout: __experimentalLayout,
 32862   var blockType = Object(external_this_wp_blocks_["getBlockType"])(block.name);
 32570     wrapperRef: wrapperRef,
 32863 
 32571     placeholder: placeholder
 32864   if (blockType && blockType.providesContext) {
 32572   }));
 32865     var context = getBlockContext(block.attributes, blockType);
       
 32866     blockList = Object(external_this_wp_element_["createElement"])(BlockContextProvider, {
       
 32867       value: context
       
 32868     }, blockList);
       
 32869   }
       
 32870 
       
 32871   if (props.__experimentalTagName) {
       
 32872     return blockList;
       
 32873   }
       
 32874 
       
 32875   return Object(external_this_wp_element_["createElement"])("div", {
       
 32876     className: "block-editor-inner-blocks"
       
 32877   }, blockList);
       
 32878 }
 32573 }
 32879 /**
 32574 /**
 32880  * The controlled inner blocks component wraps the uncontrolled inner blocks
 32575  * The controlled inner blocks component wraps the uncontrolled inner blocks
 32881  * component with the blockSync hook. This keeps the innerBlocks of the block in
 32576  * component with the blockSync hook. This keeps the innerBlocks of the block in
 32882  * the block-editor store in sync with the blocks of the controlling entity. An
 32577  * the block-editor store in sync with the blocks of the controlling entity. An
 32887  */
 32582  */
 32888 
 32583 
 32889 
 32584 
 32890 function ControlledInnerBlocks(props) {
 32585 function ControlledInnerBlocks(props) {
 32891   useBlockSync(props);
 32586   useBlockSync(props);
 32892   return Object(external_this_wp_element_["createElement"])(UncontrolledInnerBlocks, props);
 32587   return Object(external_wp_element_["createElement"])(UncontrolledInnerBlocks, props);
 32893 }
 32588 }
 32894 /**
 32589 
 32895  * Wrapped InnerBlocks component which detects whether to use the controlled or
 32590 const ForwardedInnerBlocks = Object(external_wp_element_["forwardRef"])((props, ref) => {
 32896  * uncontrolled variations of the InnerBlocks component. This is the component
 32591   const innerBlocksProps = useInnerBlocksProps({
 32897  * which should be used throughout the application.
 32592     ref
 32898  */
 32593   }, props);
 32899 
 32594   return Object(external_wp_element_["createElement"])("div", {
 32900 
 32595     className: "block-editor-inner-blocks"
 32901 var ForwardedInnerBlocks = Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
 32596   }, Object(external_wp_element_["createElement"])("div", innerBlocksProps));
 32902   var _useBlockEditContext = useBlockEditContext(),
 32597 });
 32903       clientId = _useBlockEditContext.clientId;
 32598 /**
 32904 
 32599  * This hook is used to lightly mark an element as an inner blocks wrapper
 32905   var fallbackRef = Object(external_this_wp_element_["useRef"])();
 32600  * element. Call this hook and pass the returned props to the element to mark as
 32906 
 32601  * an inner blocks wrapper, automatically rendering inner blocks as children. If
 32907   var allProps = inner_blocks_objectSpread({
 32602  * you define a ref for the element, it is important to pass the ref to this
 32908     clientId: clientId,
 32603  * hook, which the hook in turn will pass to the component through the props it
 32909     forwardedRef: ref || fallbackRef
 32604  * returns. Optionally, you can also pass any other props through this hook, and
 32910   }, props); // Detects if the InnerBlocks should be controlled by an incoming value.
 32605  * they will be merged and returned.
 32911 
 32606  *
 32912 
 32607  * @param {Object} props   Optional. Props to pass to the element. Must contain
 32913   if (props.value && props.onChange) {
 32608  *                         the ref if one is defined.
 32914     return Object(external_this_wp_element_["createElement"])(ControlledInnerBlocks, allProps);
 32609  * @param {Object} options Optional. Inner blocks options.
 32915   }
 32610  *
 32916 
 32611  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md
 32917   return Object(external_this_wp_element_["createElement"])(UncontrolledInnerBlocks, allProps);
 32612  */
 32918 }); // Expose default appender placeholders as components.
 32613 
       
 32614 function useInnerBlocksProps(props = {}, options = {}) {
       
 32615   const {
       
 32616     clientId
       
 32617   } = useBlockEditContext();
       
 32618   const isSmallScreen = Object(external_wp_compose_["useViewportMatch"])('medium', '<');
       
 32619   const hasOverlay = Object(external_wp_data_["useSelect"])(select => {
       
 32620     const {
       
 32621       getBlockName,
       
 32622       isBlockSelected,
       
 32623       hasSelectedInnerBlock,
       
 32624       isNavigationMode
       
 32625     } = select(store);
       
 32626     const enableClickThrough = isNavigationMode() || isSmallScreen;
       
 32627     return getBlockName(clientId) !== 'core/template' && !isBlockSelected(clientId) && !hasSelectedInnerBlock(clientId, true) && enableClickThrough;
       
 32628   }, [clientId, isSmallScreen]);
       
 32629   const ref = Object(external_wp_compose_["useMergeRefs"])([props.ref, useBlockDropZone({
       
 32630     rootClientId: clientId
       
 32631   })]);
       
 32632   const InnerBlocks = options.value && options.onChange ? ControlledInnerBlocks : UncontrolledInnerBlocks;
       
 32633   return { ...props,
       
 32634     ref,
       
 32635     className: classnames_default()(props.className, 'block-editor-block-list__layout', {
       
 32636       'has-overlay': hasOverlay
       
 32637     }),
       
 32638     children: Object(external_wp_element_["createElement"])(InnerBlocks, Object(esm_extends["a" /* default */])({}, options, {
       
 32639       clientId: clientId
       
 32640     }))
       
 32641   };
       
 32642 } // Expose default appender placeholders as components.
 32919 
 32643 
 32920 ForwardedInnerBlocks.DefaultBlockAppender = inner_blocks_default_block_appender;
 32644 ForwardedInnerBlocks.DefaultBlockAppender = inner_blocks_default_block_appender;
 32921 ForwardedInnerBlocks.ButtonBlockAppender = inner_blocks_button_block_appender;
 32645 ForwardedInnerBlocks.ButtonBlockAppender = inner_blocks_button_block_appender;
 32922 ForwardedInnerBlocks.Content = Object(external_this_wp_blocks_["withBlockContentContext"])(function (_ref) {
 32646 ForwardedInnerBlocks.Content = Object(external_wp_blocks_["withBlockContentContext"])(({
 32923   var BlockContent = _ref.BlockContent;
 32647   BlockContent
 32924   return Object(external_this_wp_element_["createElement"])(BlockContent, null);
 32648 }) => Object(external_wp_element_["createElement"])(BlockContent, null));
 32925 });
 32649 /**
 32926 /**
 32650  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md
 32927  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md
       
 32928  */
 32651  */
 32929 
 32652 
 32930 /* harmony default export */ var inner_blocks = (ForwardedInnerBlocks);
 32653 /* harmony default export */ var inner_blocks = (ForwardedInnerBlocks);
 32931 
 32654 
       
 32655 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/justify-left.js
       
 32656 
       
 32657 
       
 32658 /**
       
 32659  * WordPress dependencies
       
 32660  */
       
 32661 
       
 32662 const justifyLeft = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 32663   xmlns: "http://www.w3.org/2000/svg",
       
 32664   viewBox: "0 0 24 24"
       
 32665 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 32666   d: "M9 9v6h11V9H9zM4 20h1.5V4H4v16z"
       
 32667 }));
       
 32668 /* harmony default export */ var justify_left = (justifyLeft);
       
 32669 
       
 32670 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/justify-center.js
       
 32671 
       
 32672 
       
 32673 /**
       
 32674  * WordPress dependencies
       
 32675  */
       
 32676 
       
 32677 const justifyCenter = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 32678   xmlns: "http://www.w3.org/2000/svg",
       
 32679   viewBox: "0 0 24 24"
       
 32680 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 32681   d: "M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"
       
 32682 }));
       
 32683 /* harmony default export */ var justify_center = (justifyCenter);
       
 32684 
       
 32685 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/justify-right.js
       
 32686 
       
 32687 
       
 32688 /**
       
 32689  * WordPress dependencies
       
 32690  */
       
 32691 
       
 32692 const justifyRight = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 32693   xmlns: "http://www.w3.org/2000/svg",
       
 32694   viewBox: "0 0 24 24"
       
 32695 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 32696   d: "M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"
       
 32697 }));
       
 32698 /* harmony default export */ var justify_right = (justifyRight);
       
 32699 
       
 32700 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/justify-space-between.js
       
 32701 
       
 32702 
       
 32703 /**
       
 32704  * WordPress dependencies
       
 32705  */
       
 32706 
       
 32707 const justifySpaceBetween = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
 32708   xmlns: "http://www.w3.org/2000/svg",
       
 32709   viewBox: "0 0 24 24"
       
 32710 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
 32711   d: "M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"
       
 32712 }));
       
 32713 /* harmony default export */ var justify_space_between = (justifySpaceBetween);
       
 32714 
       
 32715 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/justify-content-control/ui.js
       
 32716 
       
 32717 
       
 32718 
       
 32719 /**
       
 32720  * WordPress dependencies
       
 32721  */
       
 32722 
       
 32723 
       
 32724 
       
 32725 const icons = {
       
 32726   left: justify_left,
       
 32727   center: justify_center,
       
 32728   right: justify_right,
       
 32729   'space-between': justify_space_between
       
 32730 };
       
 32731 
       
 32732 function JustifyContentUI({
       
 32733   allowedControls = ['left', 'center', 'right', 'space-between'],
       
 32734   isCollapsed = true,
       
 32735   onChange,
       
 32736   value,
       
 32737   popoverProps,
       
 32738   isToolbar
       
 32739 }) {
       
 32740   // If the control is already selected we want a click
       
 32741   // again on the control to deselect the item, so we
       
 32742   // call onChange( undefined )
       
 32743   const handleClick = next => {
       
 32744     if (next === value) {
       
 32745       onChange(undefined);
       
 32746     } else {
       
 32747       onChange(next);
       
 32748     }
       
 32749   };
       
 32750 
       
 32751   const icon = value ? icons[value] : icons.left;
       
 32752   const allControls = [{
       
 32753     name: 'left',
       
 32754     icon: justify_left,
       
 32755     title: Object(external_wp_i18n_["__"])('Justify items left'),
       
 32756     isActive: 'left' === value,
       
 32757     onClick: () => handleClick('left')
       
 32758   }, {
       
 32759     name: 'center',
       
 32760     icon: justify_center,
       
 32761     title: Object(external_wp_i18n_["__"])('Justify items center'),
       
 32762     isActive: 'center' === value,
       
 32763     onClick: () => handleClick('center')
       
 32764   }, {
       
 32765     name: 'right',
       
 32766     icon: justify_right,
       
 32767     title: Object(external_wp_i18n_["__"])('Justify items right'),
       
 32768     isActive: 'right' === value,
       
 32769     onClick: () => handleClick('right')
       
 32770   }, {
       
 32771     name: 'space-between',
       
 32772     icon: justify_space_between,
       
 32773     title: Object(external_wp_i18n_["__"])('Space between items'),
       
 32774     isActive: 'space-between' === value,
       
 32775     onClick: () => handleClick('space-between')
       
 32776   }];
       
 32777   const UIComponent = isToolbar ? external_wp_components_["ToolbarGroup"] : external_wp_components_["ToolbarDropdownMenu"];
       
 32778   const extraProps = isToolbar ? {
       
 32779     isCollapsed
       
 32780   } : {};
       
 32781   return Object(external_wp_element_["createElement"])(UIComponent, Object(esm_extends["a" /* default */])({
       
 32782     icon: icon,
       
 32783     popoverProps: popoverProps,
       
 32784     label: Object(external_wp_i18n_["__"])('Change items justification'),
       
 32785     controls: allControls.filter(elem => allowedControls.includes(elem.name))
       
 32786   }, extraProps));
       
 32787 }
       
 32788 
       
 32789 /* harmony default export */ var justify_content_control_ui = (JustifyContentUI);
       
 32790 
       
 32791 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/justify-content-control/index.js
       
 32792 
       
 32793 
       
 32794 
       
 32795 /**
       
 32796  * Internal dependencies
       
 32797  */
       
 32798 
       
 32799 function JustifyContentControl(props) {
       
 32800   return Object(external_wp_element_["createElement"])(justify_content_control_ui, Object(esm_extends["a" /* default */])({}, props, {
       
 32801     isToolbar: false
       
 32802   }));
       
 32803 }
       
 32804 function JustifyToolbar(props) {
       
 32805   return Object(external_wp_element_["createElement"])(justify_content_control_ui, Object(esm_extends["a" /* default */])({}, props, {
       
 32806     isToolbar: true
       
 32807   }));
       
 32808 }
       
 32809 
       
 32810 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
       
 32811 var keyboard_return = __webpack_require__("btIw");
       
 32812 
 32932 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/settings-drawer.js
 32813 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/settings-drawer.js
 32933 
 32814 
 32934 
 32815 
 32935 
       
 32936 function settings_drawer_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; }
       
 32937 
       
 32938 function settings_drawer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { settings_drawer_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 { settings_drawer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 32939 
       
 32940 /**
 32816 /**
 32941  * External dependencies
 32817  * External dependencies
 32942  */
 32818  */
 32943 
 32819 
 32944 /**
 32820 /**
 32945  * WordPress dependencies
 32821  * WordPress dependencies
 32946  */
 32822  */
 32947 
 32823 
 32948 
 32824 
 32949 
 32825 
 32950 var defaultSettings = [{
 32826 const defaultSettings = [{
 32951   id: 'opensInNewTab',
 32827   id: 'opensInNewTab',
 32952   title: Object(external_this_wp_i18n_["__"])('Open in new tab')
 32828   title: Object(external_wp_i18n_["__"])('Open in new tab')
 32953 }];
 32829 }];
 32954 
 32830 
 32955 var settings_drawer_LinkControlSettingsDrawer = function LinkControlSettingsDrawer(_ref) {
 32831 const LinkControlSettingsDrawer = ({
 32956   var value = _ref.value,
 32832   value,
 32957       _ref$onChange = _ref.onChange,
 32833   onChange = external_lodash_["noop"],
 32958       onChange = _ref$onChange === void 0 ? external_this_lodash_["noop"] : _ref$onChange,
 32834   settings = defaultSettings
 32959       _ref$settings = _ref.settings,
 32835 }) => {
 32960       settings = _ref$settings === void 0 ? defaultSettings : _ref$settings;
       
 32961 
       
 32962   if (!settings || !settings.length) {
 32836   if (!settings || !settings.length) {
 32963     return null;
 32837     return null;
 32964   }
 32838   }
 32965 
 32839 
 32966   var handleSettingChange = function handleSettingChange(setting) {
 32840   const handleSettingChange = setting => newValue => {
 32967     return function (newValue) {
 32841     onChange({ ...value,
 32968       onChange(settings_drawer_objectSpread({}, value, Object(defineProperty["a" /* default */])({}, setting.id, newValue)));
 32842       [setting.id]: newValue
       
 32843     });
       
 32844   };
       
 32845 
       
 32846   const theSettings = settings.map(setting => Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
       
 32847     className: "block-editor-link-control__setting",
       
 32848     key: setting.id,
       
 32849     label: setting.title,
       
 32850     onChange: handleSettingChange(setting),
       
 32851     checked: value ? !!value[setting.id] : false
       
 32852   }));
       
 32853   return Object(external_wp_element_["createElement"])("fieldset", {
       
 32854     className: "block-editor-link-control__settings"
       
 32855   }, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
       
 32856     as: "legend"
       
 32857   }, Object(external_wp_i18n_["__"])('Currently selected link settings')), theSettings);
       
 32858 };
       
 32859 
       
 32860 /* harmony default export */ var settings_drawer = (LinkControlSettingsDrawer);
       
 32861 
       
 32862 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-input/index.js
       
 32863 
       
 32864 
       
 32865 
       
 32866 /**
       
 32867  * External dependencies
       
 32868  */
       
 32869 
       
 32870 
       
 32871 
       
 32872 /**
       
 32873  * WordPress dependencies
       
 32874  */
       
 32875 
       
 32876 
       
 32877 
       
 32878 
       
 32879 
       
 32880 
       
 32881 
       
 32882 
       
 32883 /**
       
 32884  * Internal dependencies
       
 32885  */
       
 32886 
       
 32887 
       
 32888 
       
 32889 class url_input_URLInput extends external_wp_element_["Component"] {
       
 32890   constructor(props) {
       
 32891     super(props);
       
 32892     this.onChange = this.onChange.bind(this);
       
 32893     this.onFocus = this.onFocus.bind(this);
       
 32894     this.onKeyDown = this.onKeyDown.bind(this);
       
 32895     this.selectLink = this.selectLink.bind(this);
       
 32896     this.handleOnClick = this.handleOnClick.bind(this);
       
 32897     this.bindSuggestionNode = this.bindSuggestionNode.bind(this);
       
 32898     this.autocompleteRef = props.autocompleteRef || Object(external_wp_element_["createRef"])();
       
 32899     this.inputRef = Object(external_wp_element_["createRef"])();
       
 32900     this.updateSuggestions = Object(external_lodash_["debounce"])(this.updateSuggestions.bind(this), 200);
       
 32901     this.suggestionNodes = [];
       
 32902     this.isUpdatingSuggestions = false;
       
 32903     this.state = {
       
 32904       suggestions: [],
       
 32905       showSuggestions: false,
       
 32906       selectedSuggestion: null,
       
 32907       suggestionsListboxId: '',
       
 32908       suggestionOptionIdPrefix: ''
 32969     };
 32909     };
       
 32910   }
       
 32911 
       
 32912   componentDidUpdate(prevProps) {
       
 32913     const {
       
 32914       showSuggestions,
       
 32915       selectedSuggestion
       
 32916     } = this.state;
       
 32917     const {
       
 32918       value
       
 32919     } = this.props; // only have to worry about scrolling selected suggestion into view
       
 32920     // when already expanded
       
 32921 
       
 32922     if (showSuggestions && selectedSuggestion !== null && this.suggestionNodes[selectedSuggestion] && !this.scrollingIntoView) {
       
 32923       this.scrollingIntoView = true;
       
 32924       dom_scroll_into_view_lib_default()(this.suggestionNodes[selectedSuggestion], this.autocompleteRef.current, {
       
 32925         onlyScrollIfNeeded: true
       
 32926       });
       
 32927       this.props.setTimeout(() => {
       
 32928         this.scrollingIntoView = false;
       
 32929       }, 100);
       
 32930     } // Only attempt an update on suggestions if the input value has actually changed.
       
 32931 
       
 32932 
       
 32933     if (prevProps.value !== value && this.shouldShowInitialSuggestions()) {
       
 32934       this.updateSuggestions();
       
 32935     }
       
 32936   }
       
 32937 
       
 32938   componentDidMount() {
       
 32939     if (this.shouldShowInitialSuggestions()) {
       
 32940       this.updateSuggestions();
       
 32941     }
       
 32942   }
       
 32943 
       
 32944   componentWillUnmount() {
       
 32945     var _this$suggestionsRequ, _this$suggestionsRequ2;
       
 32946 
       
 32947     (_this$suggestionsRequ = this.suggestionsRequest) === null || _this$suggestionsRequ === void 0 ? void 0 : (_this$suggestionsRequ2 = _this$suggestionsRequ.cancel) === null || _this$suggestionsRequ2 === void 0 ? void 0 : _this$suggestionsRequ2.call(_this$suggestionsRequ);
       
 32948     delete this.suggestionsRequest;
       
 32949   }
       
 32950 
       
 32951   bindSuggestionNode(index) {
       
 32952     return ref => {
       
 32953       this.suggestionNodes[index] = ref;
       
 32954     };
       
 32955   }
       
 32956 
       
 32957   shouldShowInitialSuggestions() {
       
 32958     const {
       
 32959       suggestions
       
 32960     } = this.state;
       
 32961     const {
       
 32962       __experimentalShowInitialSuggestions = false,
       
 32963       value
       
 32964     } = this.props;
       
 32965     return !this.isUpdatingSuggestions && __experimentalShowInitialSuggestions && !(value && value.length) && !(suggestions && suggestions.length);
       
 32966   }
       
 32967 
       
 32968   updateSuggestions(value = '') {
       
 32969     const {
       
 32970       __experimentalFetchLinkSuggestions: fetchLinkSuggestions,
       
 32971       __experimentalHandleURLSuggestions: handleURLSuggestions
       
 32972     } = this.props;
       
 32973 
       
 32974     if (!fetchLinkSuggestions) {
       
 32975       return;
       
 32976     }
       
 32977 
       
 32978     const isInitialSuggestions = !(value && value.length); // Allow a suggestions request if:
       
 32979     // - there are at least 2 characters in the search input (except manual searches where
       
 32980     //   search input length is not required to trigger a fetch)
       
 32981     // - this is a direct entry (eg: a URL)
       
 32982 
       
 32983     if (!isInitialSuggestions && (value.length < 2 || !handleURLSuggestions && Object(external_wp_url_["isURL"])(value))) {
       
 32984       this.setState({
       
 32985         showSuggestions: false,
       
 32986         selectedSuggestion: null,
       
 32987         loading: false
       
 32988       });
       
 32989       return;
       
 32990     }
       
 32991 
       
 32992     this.isUpdatingSuggestions = true;
       
 32993     this.setState({
       
 32994       selectedSuggestion: null,
       
 32995       loading: true
       
 32996     });
       
 32997     const request = fetchLinkSuggestions(value, {
       
 32998       isInitialSuggestions
       
 32999     });
       
 33000     request.then(suggestions => {
       
 33001       // A fetch Promise doesn't have an abort option. It's mimicked by
       
 33002       // comparing the request reference in on the instance, which is
       
 33003       // reset or deleted on subsequent requests or unmounting.
       
 33004       if (this.suggestionsRequest !== request) {
       
 33005         return;
       
 33006       }
       
 33007 
       
 33008       this.setState({
       
 33009         suggestions,
       
 33010         loading: false,
       
 33011         showSuggestions: !!suggestions.length
       
 33012       });
       
 33013 
       
 33014       if (!!suggestions.length) {
       
 33015         this.props.debouncedSpeak(Object(external_wp_i18n_["sprintf"])(
       
 33016         /* translators: %s: number of results. */
       
 33017         Object(external_wp_i18n_["_n"])('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', suggestions.length), suggestions.length), 'assertive');
       
 33018       } else {
       
 33019         this.props.debouncedSpeak(Object(external_wp_i18n_["__"])('No results.'), 'assertive');
       
 33020       }
       
 33021 
       
 33022       this.isUpdatingSuggestions = false;
       
 33023     }).catch(() => {
       
 33024       if (this.suggestionsRequest === request) {
       
 33025         this.setState({
       
 33026           loading: false
       
 33027         });
       
 33028         this.isUpdatingSuggestions = false;
       
 33029       }
       
 33030     }); // Note that this assignment is handled *before* the async search request
       
 33031     // as a Promise always resolves on the next tick of the event loop.
       
 33032 
       
 33033     this.suggestionsRequest = request;
       
 33034   }
       
 33035 
       
 33036   onChange(event) {
       
 33037     const inputValue = event.target.value;
       
 33038     this.props.onChange(inputValue);
       
 33039 
       
 33040     if (!this.props.disableSuggestions) {
       
 33041       this.updateSuggestions(inputValue.trim());
       
 33042     }
       
 33043   }
       
 33044 
       
 33045   onFocus() {
       
 33046     const {
       
 33047       suggestions
       
 33048     } = this.state;
       
 33049     const {
       
 33050       disableSuggestions,
       
 33051       value
       
 33052     } = this.props; // When opening the link editor, if there's a value present, we want to load the suggestions pane with the results for this input search value
       
 33053     // Don't re-run the suggestions on focus if there are already suggestions present (prevents searching again when tabbing between the input and buttons)
       
 33054 
       
 33055     if (value && !disableSuggestions && !this.isUpdatingSuggestions && !(suggestions && suggestions.length)) {
       
 33056       // Ensure the suggestions are updated with the current input value
       
 33057       this.updateSuggestions(value.trim());
       
 33058     }
       
 33059   }
       
 33060 
       
 33061   onKeyDown(event) {
       
 33062     const {
       
 33063       showSuggestions,
       
 33064       selectedSuggestion,
       
 33065       suggestions,
       
 33066       loading
       
 33067     } = this.state; // If the suggestions are not shown or loading, we shouldn't handle the arrow keys
       
 33068     // We shouldn't preventDefault to allow block arrow keys navigation
       
 33069 
       
 33070     if (!showSuggestions || !suggestions.length || loading) {
       
 33071       // In the Windows version of Firefox the up and down arrows don't move the caret
       
 33072       // within an input field like they do for Mac Firefox/Chrome/Safari. This causes
       
 33073       // a form of focus trapping that is disruptive to the user experience. This disruption
       
 33074       // only happens if the caret is not in the first or last position in the text input.
       
 33075       // See: https://github.com/WordPress/gutenberg/issues/5693#issuecomment-436684747
       
 33076       switch (event.keyCode) {
       
 33077         // When UP is pressed, if the caret is at the start of the text, move it to the 0
       
 33078         // position.
       
 33079         case external_wp_keycodes_["UP"]:
       
 33080           {
       
 33081             if (0 !== event.target.selectionStart) {
       
 33082               event.stopPropagation();
       
 33083               event.preventDefault(); // Set the input caret to position 0
       
 33084 
       
 33085               event.target.setSelectionRange(0, 0);
       
 33086             }
       
 33087 
       
 33088             break;
       
 33089           }
       
 33090         // When DOWN is pressed, if the caret is not at the end of the text, move it to the
       
 33091         // last position.
       
 33092 
       
 33093         case external_wp_keycodes_["DOWN"]:
       
 33094           {
       
 33095             if (this.props.value.length !== event.target.selectionStart) {
       
 33096               event.stopPropagation();
       
 33097               event.preventDefault(); // Set the input caret to the last position
       
 33098 
       
 33099               event.target.setSelectionRange(this.props.value.length, this.props.value.length);
       
 33100             }
       
 33101 
       
 33102             break;
       
 33103           }
       
 33104       }
       
 33105 
       
 33106       return;
       
 33107     }
       
 33108 
       
 33109     const suggestion = this.state.suggestions[this.state.selectedSuggestion];
       
 33110 
       
 33111     switch (event.keyCode) {
       
 33112       case external_wp_keycodes_["UP"]:
       
 33113         {
       
 33114           event.stopPropagation();
       
 33115           event.preventDefault();
       
 33116           const previousIndex = !selectedSuggestion ? suggestions.length - 1 : selectedSuggestion - 1;
       
 33117           this.setState({
       
 33118             selectedSuggestion: previousIndex
       
 33119           });
       
 33120           break;
       
 33121         }
       
 33122 
       
 33123       case external_wp_keycodes_["DOWN"]:
       
 33124         {
       
 33125           event.stopPropagation();
       
 33126           event.preventDefault();
       
 33127           const nextIndex = selectedSuggestion === null || selectedSuggestion === suggestions.length - 1 ? 0 : selectedSuggestion + 1;
       
 33128           this.setState({
       
 33129             selectedSuggestion: nextIndex
       
 33130           });
       
 33131           break;
       
 33132         }
       
 33133 
       
 33134       case external_wp_keycodes_["TAB"]:
       
 33135         {
       
 33136           if (this.state.selectedSuggestion !== null) {
       
 33137             this.selectLink(suggestion); // Announce a link has been selected when tabbing away from the input field.
       
 33138 
       
 33139             this.props.speak(Object(external_wp_i18n_["__"])('Link selected.'));
       
 33140           }
       
 33141 
       
 33142           break;
       
 33143         }
       
 33144 
       
 33145       case external_wp_keycodes_["ENTER"]:
       
 33146         {
       
 33147           if (this.state.selectedSuggestion !== null) {
       
 33148             event.stopPropagation();
       
 33149             this.selectLink(suggestion);
       
 33150           }
       
 33151 
       
 33152           break;
       
 33153         }
       
 33154     }
       
 33155   }
       
 33156 
       
 33157   selectLink(suggestion) {
       
 33158     this.props.onChange(suggestion.url, suggestion);
       
 33159     this.setState({
       
 33160       selectedSuggestion: null,
       
 33161       showSuggestions: false
       
 33162     });
       
 33163   }
       
 33164 
       
 33165   handleOnClick(suggestion) {
       
 33166     this.selectLink(suggestion); // Move focus to the input field when a link suggestion is clicked.
       
 33167 
       
 33168     this.inputRef.current.focus();
       
 33169   }
       
 33170 
       
 33171   static getDerivedStateFromProps({
       
 33172     value,
       
 33173     instanceId,
       
 33174     disableSuggestions,
       
 33175     __experimentalShowInitialSuggestions = false
       
 33176   }, {
       
 33177     showSuggestions
       
 33178   }) {
       
 33179     let shouldShowSuggestions = showSuggestions;
       
 33180     const hasValue = value && value.length;
       
 33181 
       
 33182     if (!__experimentalShowInitialSuggestions && !hasValue) {
       
 33183       shouldShowSuggestions = false;
       
 33184     }
       
 33185 
       
 33186     if (disableSuggestions === true) {
       
 33187       shouldShowSuggestions = false;
       
 33188     }
       
 33189 
       
 33190     return {
       
 33191       showSuggestions: shouldShowSuggestions,
       
 33192       suggestionsListboxId: `block-editor-url-input-suggestions-${instanceId}`,
       
 33193       suggestionOptionIdPrefix: `block-editor-url-input-suggestion-${instanceId}`
       
 33194     };
       
 33195   }
       
 33196 
       
 33197   render() {
       
 33198     return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, this.renderControl(), this.renderSuggestions());
       
 33199   }
       
 33200 
       
 33201   renderControl() {
       
 33202     const {
       
 33203       label,
       
 33204       className,
       
 33205       isFullWidth,
       
 33206       instanceId,
       
 33207       placeholder = Object(external_wp_i18n_["__"])('Paste URL or type to search'),
       
 33208       __experimentalRenderControl: renderControl,
       
 33209       value = ''
       
 33210     } = this.props;
       
 33211     const {
       
 33212       loading,
       
 33213       showSuggestions,
       
 33214       selectedSuggestion,
       
 33215       suggestionsListboxId,
       
 33216       suggestionOptionIdPrefix
       
 33217     } = this.state;
       
 33218     const controlProps = {
       
 33219       id: `url-input-control-${instanceId}`,
       
 33220       label,
       
 33221       className: classnames_default()('block-editor-url-input', className, {
       
 33222         'is-full-width': isFullWidth
       
 33223       })
       
 33224     };
       
 33225     const inputProps = {
       
 33226       value,
       
 33227       required: true,
       
 33228       className: 'block-editor-url-input__input',
       
 33229       type: 'text',
       
 33230       onChange: this.onChange,
       
 33231       onFocus: this.onFocus,
       
 33232       placeholder,
       
 33233       onKeyDown: this.onKeyDown,
       
 33234       role: 'combobox',
       
 33235       'aria-label': Object(external_wp_i18n_["__"])('URL'),
       
 33236       'aria-expanded': showSuggestions,
       
 33237       'aria-autocomplete': 'list',
       
 33238       'aria-owns': suggestionsListboxId,
       
 33239       'aria-activedescendant': selectedSuggestion !== null ? `${suggestionOptionIdPrefix}-${selectedSuggestion}` : undefined,
       
 33240       ref: this.inputRef
       
 33241     };
       
 33242 
       
 33243     if (renderControl) {
       
 33244       return renderControl(controlProps, inputProps, loading);
       
 33245     }
       
 33246 
       
 33247     return Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], controlProps, Object(external_wp_element_["createElement"])("input", inputProps), loading && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null));
       
 33248   }
       
 33249 
       
 33250   renderSuggestions() {
       
 33251     const {
       
 33252       className,
       
 33253       __experimentalRenderSuggestions: renderSuggestions,
       
 33254       value = '',
       
 33255       __experimentalShowInitialSuggestions = false
       
 33256     } = this.props;
       
 33257     const {
       
 33258       showSuggestions,
       
 33259       suggestions,
       
 33260       selectedSuggestion,
       
 33261       suggestionsListboxId,
       
 33262       suggestionOptionIdPrefix,
       
 33263       loading
       
 33264     } = this.state;
       
 33265     const suggestionsListProps = {
       
 33266       id: suggestionsListboxId,
       
 33267       ref: this.autocompleteRef,
       
 33268       role: 'listbox'
       
 33269     };
       
 33270 
       
 33271     const buildSuggestionItemProps = (suggestion, index) => {
       
 33272       return {
       
 33273         role: 'option',
       
 33274         tabIndex: '-1',
       
 33275         id: `${suggestionOptionIdPrefix}-${index}`,
       
 33276         ref: this.bindSuggestionNode(index),
       
 33277         'aria-selected': index === selectedSuggestion
       
 33278       };
       
 33279     };
       
 33280 
       
 33281     if (Object(external_lodash_["isFunction"])(renderSuggestions) && showSuggestions && !!suggestions.length) {
       
 33282       return renderSuggestions({
       
 33283         suggestions,
       
 33284         selectedSuggestion,
       
 33285         suggestionsListProps,
       
 33286         buildSuggestionItemProps,
       
 33287         isLoading: loading,
       
 33288         handleSuggestionClick: this.handleOnClick,
       
 33289         isInitialSuggestions: __experimentalShowInitialSuggestions && !(value && value.length)
       
 33290       });
       
 33291     }
       
 33292 
       
 33293     if (!Object(external_lodash_["isFunction"])(renderSuggestions) && showSuggestions && !!suggestions.length) {
       
 33294       return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
       
 33295         position: "bottom",
       
 33296         noArrow: true,
       
 33297         focusOnMount: false
       
 33298       }, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, suggestionsListProps, {
       
 33299         className: classnames_default()('block-editor-url-input__suggestions', `${className}__suggestions`)
       
 33300       }), suggestions.map((suggestion, index) => Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, buildSuggestionItemProps(suggestion, index), {
       
 33301         key: suggestion.id,
       
 33302         className: classnames_default()('block-editor-url-input__suggestion', {
       
 33303           'is-selected': index === selectedSuggestion
       
 33304         }),
       
 33305         onClick: () => this.handleOnClick(suggestion)
       
 33306       }), suggestion.title))));
       
 33307     }
       
 33308 
       
 33309     return null;
       
 33310   }
       
 33311 
       
 33312 }
       
 33313 /**
       
 33314  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md
       
 33315  */
       
 33316 
       
 33317 
       
 33318 /* harmony default export */ var url_input = (Object(external_wp_compose_["compose"])(external_wp_compose_["withSafeTimeout"], external_wp_components_["withSpokenMessages"], external_wp_compose_["withInstanceId"], Object(external_wp_data_["withSelect"])((select, props) => {
       
 33319   // If a link suggestions handler is already provided then
       
 33320   // bail
       
 33321   if (Object(external_lodash_["isFunction"])(props.__experimentalFetchLinkSuggestions)) {
       
 33322     return;
       
 33323   }
       
 33324 
       
 33325   const {
       
 33326     getSettings
       
 33327   } = select(store);
       
 33328   return {
       
 33329     __experimentalFetchLinkSuggestions: getSettings().__experimentalFetchLinkSuggestions
 32970   };
 33330   };
 32971 
 33331 }))(url_input_URLInput));
 32972   var theSettings = settings.map(function (setting) {
 33332 
 32973     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToggleControl"], {
 33333 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/search-create-button.js
 32974       className: "block-editor-link-control__setting",
 33334 
 32975       key: setting.id,
 33335 
 32976       label: setting.title,
 33336 
 32977       onChange: handleSettingChange(setting),
 33337 /**
 32978       checked: value ? !!value[setting.id] : false
 33338  * External dependencies
       
 33339  */
       
 33340 
       
 33341 
       
 33342 /**
       
 33343  * WordPress dependencies
       
 33344  */
       
 33345 
       
 33346 
       
 33347 
       
 33348 
       
 33349 
       
 33350 const LinkControlSearchCreate = ({
       
 33351   searchTerm,
       
 33352   onClick,
       
 33353   itemProps,
       
 33354   isSelected,
       
 33355   buttonText
       
 33356 }) => {
       
 33357   if (!searchTerm) {
       
 33358     return null;
       
 33359   }
       
 33360 
       
 33361   let text;
       
 33362 
       
 33363   if (buttonText) {
       
 33364     text = Object(external_lodash_["isFunction"])(buttonText) ? buttonText(searchTerm) : buttonText;
       
 33365   } else {
       
 33366     text = Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["sprintf"])(
       
 33367     /* translators: %s: search term. */
       
 33368     Object(external_wp_i18n_["__"])('Create: <mark>%s</mark>'), searchTerm), {
       
 33369       mark: Object(external_wp_element_["createElement"])("mark", null)
 32979     });
 33370     });
 32980   });
 33371   }
 32981   return Object(external_this_wp_element_["createElement"])("fieldset", {
 33372 
 32982     className: "block-editor-link-control__settings"
 33373   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, itemProps, {
 32983   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
 33374     className: classnames_default()('block-editor-link-control__search-create block-editor-link-control__search-item', {
 32984     as: "legend"
 33375       'is-selected': isSelected
 32985   }, Object(external_this_wp_i18n_["__"])('Currently selected link settings')), theSettings);
 33376     }),
       
 33377     onClick: onClick
       
 33378   }), Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
       
 33379     className: "block-editor-link-control__search-item-icon",
       
 33380     icon: plus["a" /* default */]
       
 33381   }), Object(external_wp_element_["createElement"])("span", {
       
 33382     className: "block-editor-link-control__search-item-header"
       
 33383   }, Object(external_wp_element_["createElement"])("span", {
       
 33384     className: "block-editor-link-control__search-item-title"
       
 33385   }, text)));
 32986 };
 33386 };
 32987 
 33387 /* harmony default export */ var search_create_button = (LinkControlSearchCreate);
 32988 /* harmony default export */ var settings_drawer = (settings_drawer_LinkControlSettingsDrawer);
       
 32989 
 33388 
 32990 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/globe.js
 33389 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/globe.js
 32991 
 33390 
 32992 
 33391 
 32993 /**
 33392 /**
 32994  * WordPress dependencies
 33393  * WordPress dependencies
 32995  */
 33394  */
 32996 
 33395 
 32997 var globe = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 33396 const globe = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 32998   xmlns: "http://www.w3.org/2000/svg",
 33397   xmlns: "http://www.w3.org/2000/svg",
 32999   viewBox: "-2 -2 24 24"
 33398   viewBox: "-2 -2 24 24"
 33000 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 33399 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 33001   d: "M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"
 33400   d: "M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"
 33002 }));
 33401 }));
 33003 /* harmony default export */ var library_globe = (globe);
 33402 /* harmony default export */ var library_globe = (globe);
 33004 
 33403 
 33005 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/search-item.js
 33404 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/search-item.js
 33016 
 33415 
 33017 
 33416 
 33018 
 33417 
 33019 
 33418 
 33020 
 33419 
 33021 var search_item_LinkControlSearchItem = function LinkControlSearchItem(_ref) {
 33420 const LinkControlSearchItem = ({
 33022   var itemProps = _ref.itemProps,
 33421   itemProps,
 33023       suggestion = _ref.suggestion,
 33422   suggestion,
 33024       _ref$isSelected = _ref.isSelected,
 33423   isSelected = false,
 33025       isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
 33424   onClick,
 33026       onClick = _ref.onClick,
 33425   isURL = false,
 33027       _ref$isURL = _ref.isURL,
 33426   searchTerm = '',
 33028       isURL = _ref$isURL === void 0 ? false : _ref$isURL,
 33427   shouldShowType = false
 33029       _ref$searchTerm = _ref.searchTerm,
 33428 }) => {
 33030       searchTerm = _ref$searchTerm === void 0 ? '' : _ref$searchTerm;
 33429   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, itemProps, {
 33031   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, itemProps, {
       
 33032     onClick: onClick,
 33430     onClick: onClick,
 33033     className: classnames_default()('block-editor-link-control__search-item', {
 33431     className: classnames_default()('block-editor-link-control__search-item', {
 33034       'is-selected': isSelected,
 33432       'is-selected': isSelected,
 33035       'is-url': isURL,
 33433       'is-url': isURL,
 33036       'is-entity': !isURL
 33434       'is-entity': !isURL
 33037     })
 33435     })
 33038   }), isURL && Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 33436   }), isURL && Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 33039     className: "block-editor-link-control__search-item-icon",
 33437     className: "block-editor-link-control__search-item-icon",
 33040     icon: library_globe
 33438     icon: library_globe
 33041   }), Object(external_this_wp_element_["createElement"])("span", {
 33439   }), Object(external_wp_element_["createElement"])("span", {
 33042     className: "block-editor-link-control__search-item-header"
 33440     className: "block-editor-link-control__search-item-header"
 33043   }, Object(external_this_wp_element_["createElement"])("span", {
 33441   }, Object(external_wp_element_["createElement"])("span", {
 33044     className: "block-editor-link-control__search-item-title"
 33442     className: "block-editor-link-control__search-item-title"
 33045   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextHighlight"], {
 33443   }, Object(external_wp_element_["createElement"])(external_wp_components_["TextHighlight"], {
 33046     text: suggestion.title,
 33444     text: suggestion.title,
 33047     highlight: searchTerm
 33445     highlight: searchTerm
 33048   })), Object(external_this_wp_element_["createElement"])("span", {
 33446   })), Object(external_wp_element_["createElement"])("span", {
 33049     "aria-hidden": !isURL,
 33447     "aria-hidden": !isURL,
 33050     className: "block-editor-link-control__search-item-info"
 33448     className: "block-editor-link-control__search-item-info"
 33051   }, !isURL && (Object(external_this_wp_url_["filterURLForDisplay"])(Object(external_this_wp_url_["safeDecodeURI"])(suggestion.url)) || ''), isURL && Object(external_this_wp_i18n_["__"])('Press ENTER to add this link'))), suggestion.type && Object(external_this_wp_element_["createElement"])("span", {
 33449   }, !isURL && (Object(external_wp_url_["filterURLForDisplay"])(Object(external_wp_url_["safeDecodeURI"])(suggestion.url)) || ''), isURL && Object(external_wp_i18n_["__"])('Press ENTER to add this link'))), shouldShowType && suggestion.type && Object(external_wp_element_["createElement"])("span", {
 33052     className: "block-editor-link-control__search-item-type"
 33450     className: "block-editor-link-control__search-item-type"
 33053   }, suggestion.type));
 33451   }, suggestion.type === 'post_tag' ? 'tag' : suggestion.type));
 33054 };
 33452 };
 33055 /* harmony default export */ var search_item = (search_item_LinkControlSearchItem);
 33453 /* harmony default export */ var search_item = (LinkControlSearchItem);
 33056 
 33454 
 33057 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
 33455 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/constants.js
 33058 var keyboard_return = __webpack_require__(203);
 33456 // Used as a unique identifier for the "Create" option within search results.
 33059 
 33457 // Used to help distinguish the "Create" suggestion within the search results in
 33060 // EXTERNAL MODULE: ./node_modules/dom-scroll-into-view/lib/index.js
 33458 // order to handle it as a unique case.
 33061 var dom_scroll_into_view_lib = __webpack_require__(123);
 33459 const CREATE_TYPE = '__CREATE__';
 33062 var dom_scroll_into_view_lib_default = /*#__PURE__*/__webpack_require__.n(dom_scroll_into_view_lib);
 33460 
 33063 
 33461 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/search-results.js
 33064 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-input/index.js
 33462 
 33065 
 33463 
 33066 
 33464 /**
 33067 
 33465  * WordPress dependencies
 33068 
 33466  */
 33069 
 33467 
 33070 
       
 33071 
       
 33072 
       
 33073 
       
 33074 function url_input_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (url_input_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 33075 
       
 33076 function url_input_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 33077 
 33468 
 33078 /**
 33469 /**
 33079  * External dependencies
 33470  * External dependencies
 33080  */
 33471  */
 33081 
 33472 
 33082 
 33473 
 33083 
 33474 
 33084 /**
 33475 /**
       
 33476  * Internal dependencies
       
 33477  */
       
 33478 
       
 33479 
       
 33480 
       
 33481 
       
 33482 function LinkControlSearchResults({
       
 33483   instanceId,
       
 33484   withCreateSuggestion,
       
 33485   currentInputValue,
       
 33486   handleSuggestionClick,
       
 33487   suggestionsListProps,
       
 33488   buildSuggestionItemProps,
       
 33489   suggestions,
       
 33490   selectedSuggestion,
       
 33491   isLoading,
       
 33492   isInitialSuggestions,
       
 33493   createSuggestionButtonText,
       
 33494   suggestionsQuery
       
 33495 }) {
       
 33496   const resultsListClasses = classnames_default()('block-editor-link-control__search-results', {
       
 33497     'is-loading': isLoading
       
 33498   });
       
 33499   const directLinkEntryTypes = ['url', 'mailto', 'tel', 'internal'];
       
 33500   const isSingleDirectEntryResult = suggestions.length === 1 && directLinkEntryTypes.includes(suggestions[0].type.toLowerCase());
       
 33501   const shouldShowCreateSuggestion = withCreateSuggestion && !isSingleDirectEntryResult && !isInitialSuggestions; // If the query has a specified type, then we can skip showing them in the result. See #24839.
       
 33502 
       
 33503   const shouldShowSuggestionsTypes = !(suggestionsQuery !== null && suggestionsQuery !== void 0 && suggestionsQuery.type); // According to guidelines aria-label should be added if the label
       
 33504   // itself is not visible.
       
 33505   // See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role
       
 33506 
       
 33507   const searchResultsLabelId = `block-editor-link-control-search-results-label-${instanceId}`;
       
 33508   const labelText = isInitialSuggestions ? Object(external_wp_i18n_["__"])('Recently updated') : Object(external_wp_i18n_["sprintf"])(
       
 33509   /* translators: %s: search term. */
       
 33510   Object(external_wp_i18n_["__"])('Search results for "%s"'), currentInputValue); // VisuallyHidden rightly doesn't accept custom classNames
       
 33511   // so we conditionally render it as a wrapper to visually hide the label
       
 33512   // when that is required.
       
 33513 
       
 33514   const searchResultsLabel = Object(external_wp_element_["createElement"])(isInitialSuggestions ? external_wp_element_["Fragment"] : external_wp_components_["VisuallyHidden"], {}, // empty props
       
 33515   Object(external_wp_element_["createElement"])("span", {
       
 33516     className: "block-editor-link-control__search-results-label",
       
 33517     id: searchResultsLabelId
       
 33518   }, labelText));
       
 33519   return Object(external_wp_element_["createElement"])("div", {
       
 33520     className: "block-editor-link-control__search-results-wrapper"
       
 33521   }, searchResultsLabel, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, suggestionsListProps, {
       
 33522     className: resultsListClasses,
       
 33523     "aria-labelledby": searchResultsLabelId
       
 33524   }), suggestions.map((suggestion, index) => {
       
 33525     if (shouldShowCreateSuggestion && CREATE_TYPE === suggestion.type) {
       
 33526       return Object(external_wp_element_["createElement"])(search_create_button, {
       
 33527         searchTerm: currentInputValue,
       
 33528         buttonText: createSuggestionButtonText,
       
 33529         onClick: () => handleSuggestionClick(suggestion) // Intentionally only using `type` here as
       
 33530         // the constant is enough to uniquely
       
 33531         // identify the single "CREATE" suggestion.
       
 33532         ,
       
 33533         key: suggestion.type,
       
 33534         itemProps: buildSuggestionItemProps(suggestion, index),
       
 33535         isSelected: index === selectedSuggestion
       
 33536       });
       
 33537     } // If we're not handling "Create" suggestions above then
       
 33538     // we don't want them in the main results so exit early
       
 33539 
       
 33540 
       
 33541     if (CREATE_TYPE === suggestion.type) {
       
 33542       return null;
       
 33543     }
       
 33544 
       
 33545     return Object(external_wp_element_["createElement"])(search_item, {
       
 33546       key: `${suggestion.id}-${suggestion.type}`,
       
 33547       itemProps: buildSuggestionItemProps(suggestion, index),
       
 33548       suggestion: suggestion,
       
 33549       index: index,
       
 33550       onClick: () => {
       
 33551         handleSuggestionClick(suggestion);
       
 33552       },
       
 33553       isSelected: index === selectedSuggestion,
       
 33554       isURL: directLinkEntryTypes.includes(suggestion.type.toLowerCase()),
       
 33555       searchTerm: currentInputValue,
       
 33556       shouldShowType: shouldShowSuggestionsTypes
       
 33557     });
       
 33558   })));
       
 33559 }
       
 33560 
       
 33561 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/is-url-like.js
       
 33562 /**
       
 33563  * External dependencies
       
 33564  */
       
 33565 
       
 33566 /**
 33085  * WordPress dependencies
 33567  * WordPress dependencies
 33086  */
 33568  */
 33087 
 33569 
 33088 
 33570 
 33089 
 33571 /**
 33090 
 33572  * Determines whether a given value could be a URL. Note this does not
 33091 
 33573  * guarantee the value is a URL only that it looks like it might be one. For
 33092 
 33574  * example, just because a string has `www.` in it doesn't make it a URL,
 33093 
 33575  * but it does make it highly likely that it will be so in the context of
 33094  // Since URLInput is rendered in the context of other inputs, but should be
 33576  * creating a link it makes sense to treat it like one.
 33095 // considered a separate modal node, prevent keyboard events from propagating
 33577  *
 33096 // as being considered from the input.
 33578  * @param {string} val the candidate for being URL-like (or not).
 33097 
 33579  * @return {boolean}   whether or not the value is potentially a URL.
 33098 var stopEventPropagation = function stopEventPropagation(event) {
 33580  */
 33099   return event.stopPropagation();
 33581 
       
 33582 function isURLLike(val) {
       
 33583   const isInternal = Object(external_lodash_["startsWith"])(val, '#');
       
 33584   return Object(external_wp_url_["isURL"])(val) || val && val.includes('www.') || isInternal;
       
 33585 }
       
 33586 
       
 33587 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/use-search-handler.js
       
 33588 /**
       
 33589  * WordPress dependencies
       
 33590  */
       
 33591 
       
 33592 
       
 33593 
       
 33594 /**
       
 33595  * External dependencies
       
 33596  */
       
 33597 
       
 33598 
       
 33599 /**
       
 33600  * Internal dependencies
       
 33601  */
       
 33602 
       
 33603 
       
 33604 
       
 33605 
       
 33606 const handleNoop = () => Promise.resolve([]);
       
 33607 const handleDirectEntry = val => {
       
 33608   let type = 'URL';
       
 33609   const protocol = Object(external_wp_url_["getProtocol"])(val) || '';
       
 33610 
       
 33611   if (protocol.includes('mailto')) {
       
 33612     type = 'mailto';
       
 33613   }
       
 33614 
       
 33615   if (protocol.includes('tel')) {
       
 33616     type = 'tel';
       
 33617   }
       
 33618 
       
 33619   if (Object(external_lodash_["startsWith"])(val, '#')) {
       
 33620     type = 'internal';
       
 33621   }
       
 33622 
       
 33623   return Promise.resolve([{
       
 33624     id: val,
       
 33625     title: val,
       
 33626     url: type === 'URL' ? Object(external_wp_url_["prependHTTP"])(val) : val,
       
 33627     type
       
 33628   }]);
 33100 };
 33629 };
 33101 
 33630 
 33102 var url_input_URLInput = /*#__PURE__*/function (_Component) {
 33631 const handleEntitySearch = async (val, suggestionsQuery, fetchSearchSuggestions, directEntryHandler, withCreateSuggestion, withURLSuggestion) => {
 33103   Object(inherits["a" /* default */])(URLInput, _Component);
 33632   const {
 33104 
 33633     isInitialSuggestions
 33105   var _super = url_input_createSuper(URLInput);
 33634   } = suggestionsQuery;
 33106 
 33635   let results = await Promise.all([fetchSearchSuggestions(val, suggestionsQuery), directEntryHandler(val)]);
 33107   function URLInput(props) {
 33636   const couldBeURL = !val.includes(' '); // If it's potentially a URL search then concat on a URL search suggestion
 33108     var _this;
 33637   // just for good measure. That way once the actual results run out we always
 33109 
 33638   // have a URL option to fallback on.
 33110     Object(classCallCheck["a" /* default */])(this, URLInput);
 33639 
 33111 
 33640   if (couldBeURL && withURLSuggestion && !isInitialSuggestions) {
 33112     _this = _super.call(this, props);
 33641     results = results[0].concat(results[1]);
 33113     _this.onChange = _this.onChange.bind(Object(assertThisInitialized["a" /* default */])(_this));
 33642   } else {
 33114     _this.onFocus = _this.onFocus.bind(Object(assertThisInitialized["a" /* default */])(_this));
 33643     results = results[0];
 33115     _this.onKeyDown = _this.onKeyDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
 33644   } // If displaying initial suggestions just return plain results.
 33116     _this.selectLink = _this.selectLink.bind(Object(assertThisInitialized["a" /* default */])(_this));
 33645 
 33117     _this.handleOnClick = _this.handleOnClick.bind(Object(assertThisInitialized["a" /* default */])(_this));
 33646 
 33118     _this.bindSuggestionNode = _this.bindSuggestionNode.bind(Object(assertThisInitialized["a" /* default */])(_this));
 33647   if (isInitialSuggestions) {
 33119     _this.autocompleteRef = props.autocompleteRef || Object(external_this_wp_element_["createRef"])();
 33648     return results;
 33120     _this.inputRef = Object(external_this_wp_element_["createRef"])();
 33649   } // Here we append a faux suggestion to represent a "CREATE" option. This
 33121     _this.updateSuggestions = Object(external_this_lodash_["throttle"])(_this.updateSuggestions.bind(Object(assertThisInitialized["a" /* default */])(_this)), 200);
 33650   // is detected in the rendering of the search results and handled as a
 33122     _this.suggestionNodes = [];
 33651   // special case. This is currently necessary because the suggestions
 33123     _this.isUpdatingSuggestions = false;
 33652   // dropdown will only appear if there are valid suggestions and
 33124     _this.state = {
 33653   // therefore unless the create option is a suggestion it will not
 33125       suggestions: [],
 33654   // display in scenarios where there are no results returned from the
 33126       showSuggestions: false,
 33655   // API. In addition promoting CREATE to a first class suggestion affords
 33127       selectedSuggestion: null
 33656   // the a11y benefits afforded by `URLInput` to all suggestions (eg:
       
 33657   // keyboard handling, ARIA roles...etc).
       
 33658   //
       
 33659   // Note also that the value of the `title` and `url` properties must correspond
       
 33660   // to the text value of the `<input>`. This is because `title` is used
       
 33661   // when creating the suggestion. Similarly `url` is used when using keyboard to select
       
 33662   // the suggestion (the <form> `onSubmit` handler falls-back to `url`).
       
 33663 
       
 33664 
       
 33665   return isURLLike(val) || !withCreateSuggestion ? results : results.concat({
       
 33666     // the `id` prop is intentionally ommitted here because it
       
 33667     // is never exposed as part of the component's public API.
       
 33668     // see: https://github.com/WordPress/gutenberg/pull/19775#discussion_r378931316.
       
 33669     title: val,
       
 33670     // must match the existing `<input>`s text value
       
 33671     url: val,
       
 33672     // must match the existing `<input>`s text value
       
 33673     type: CREATE_TYPE
       
 33674   });
       
 33675 };
       
 33676 
       
 33677 function useSearchHandler(suggestionsQuery, allowDirectEntry, withCreateSuggestion, withURLSuggestion) {
       
 33678   const {
       
 33679     fetchSearchSuggestions
       
 33680   } = Object(external_wp_data_["useSelect"])(select => {
       
 33681     const {
       
 33682       getSettings
       
 33683     } = select(store);
       
 33684     return {
       
 33685       fetchSearchSuggestions: getSettings().__experimentalFetchLinkSuggestions
 33128     };
 33686     };
 33129     return _this;
 33687   }, []);
 33130   }
 33688   const directEntryHandler = allowDirectEntry ? handleDirectEntry : handleNoop;
 33131 
 33689   return Object(external_wp_element_["useCallback"])((val, {
 33132   Object(createClass["a" /* default */])(URLInput, [{
 33690     isInitialSuggestions
 33133     key: "componentDidUpdate",
 33691   }) => {
 33134     value: function componentDidUpdate(prevProps) {
 33692     return isURLLike(val) ? directEntryHandler(val, {
 33135       var _this2 = this;
 33693       isInitialSuggestions
 33136 
 33694     }) : handleEntitySearch(val, { ...suggestionsQuery,
 33137       var _this$state = this.state,
 33695       isInitialSuggestions
 33138           showSuggestions = _this$state.showSuggestions,
 33696     }, fetchSearchSuggestions, directEntryHandler, withCreateSuggestion, withURLSuggestion);
 33139           selectedSuggestion = _this$state.selectedSuggestion;
 33697   }, [directEntryHandler, fetchSearchSuggestions, withCreateSuggestion]);
 33140       var value = this.props.value; // only have to worry about scrolling selected suggestion into view
 33698 }
 33141       // when already expanded
       
 33142 
       
 33143       if (showSuggestions && selectedSuggestion !== null && this.suggestionNodes[selectedSuggestion] && !this.scrollingIntoView) {
       
 33144         this.scrollingIntoView = true;
       
 33145         dom_scroll_into_view_lib_default()(this.suggestionNodes[selectedSuggestion], this.autocompleteRef.current, {
       
 33146           onlyScrollIfNeeded: true
       
 33147         });
       
 33148         this.props.setTimeout(function () {
       
 33149           _this2.scrollingIntoView = false;
       
 33150         }, 100);
       
 33151       } // Only attempt an update on suggestions if the input value has actually changed.
       
 33152 
       
 33153 
       
 33154       if (prevProps.value !== value && this.shouldShowInitialSuggestions()) {
       
 33155         this.updateSuggestions();
       
 33156       }
       
 33157     }
       
 33158   }, {
       
 33159     key: "componentDidMount",
       
 33160     value: function componentDidMount() {
       
 33161       if (this.shouldShowInitialSuggestions()) {
       
 33162         this.updateSuggestions();
       
 33163       }
       
 33164     }
       
 33165   }, {
       
 33166     key: "componentWillUnmount",
       
 33167     value: function componentWillUnmount() {
       
 33168       delete this.suggestionsRequest;
       
 33169     }
       
 33170   }, {
       
 33171     key: "bindSuggestionNode",
       
 33172     value: function bindSuggestionNode(index) {
       
 33173       var _this3 = this;
       
 33174 
       
 33175       return function (ref) {
       
 33176         _this3.suggestionNodes[index] = ref;
       
 33177       };
       
 33178     }
       
 33179   }, {
       
 33180     key: "shouldShowInitialSuggestions",
       
 33181     value: function shouldShowInitialSuggestions() {
       
 33182       var suggestions = this.state.suggestions;
       
 33183 
       
 33184       var _this$props = this.props,
       
 33185           _this$props$__experim = _this$props.__experimentalShowInitialSuggestions,
       
 33186           __experimentalShowInitialSuggestions = _this$props$__experim === void 0 ? false : _this$props$__experim,
       
 33187           value = _this$props.value;
       
 33188 
       
 33189       return !this.isUpdatingSuggestions && __experimentalShowInitialSuggestions && !(value && value.length) && !(suggestions && suggestions.length);
       
 33190     }
       
 33191   }, {
       
 33192     key: "updateSuggestions",
       
 33193     value: function updateSuggestions() {
       
 33194       var _this4 = this;
       
 33195 
       
 33196       var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
       
 33197       var _this$props2 = this.props,
       
 33198           fetchLinkSuggestions = _this$props2.__experimentalFetchLinkSuggestions,
       
 33199           handleURLSuggestions = _this$props2.__experimentalHandleURLSuggestions;
       
 33200 
       
 33201       if (!fetchLinkSuggestions) {
       
 33202         return;
       
 33203       }
       
 33204 
       
 33205       var isInitialSuggestions = !(value && value.length); // Allow a suggestions request if:
       
 33206       // - there are at least 2 characters in the search input (except manual searches where
       
 33207       //   search input length is not required to trigger a fetch)
       
 33208       // - this is a direct entry (eg: a URL)
       
 33209 
       
 33210       if (!isInitialSuggestions && (value.length < 2 || !handleURLSuggestions && Object(external_this_wp_url_["isURL"])(value))) {
       
 33211         this.setState({
       
 33212           showSuggestions: false,
       
 33213           selectedSuggestion: null,
       
 33214           loading: false
       
 33215         });
       
 33216         return;
       
 33217       }
       
 33218 
       
 33219       this.isUpdatingSuggestions = true;
       
 33220       this.setState({
       
 33221         selectedSuggestion: null,
       
 33222         loading: true
       
 33223       });
       
 33224       var request = fetchLinkSuggestions(value, {
       
 33225         isInitialSuggestions: isInitialSuggestions
       
 33226       });
       
 33227       request.then(function (suggestions) {
       
 33228         // A fetch Promise doesn't have an abort option. It's mimicked by
       
 33229         // comparing the request reference in on the instance, which is
       
 33230         // reset or deleted on subsequent requests or unmounting.
       
 33231         if (_this4.suggestionsRequest !== request) {
       
 33232           return;
       
 33233         }
       
 33234 
       
 33235         _this4.setState({
       
 33236           suggestions: suggestions,
       
 33237           loading: false,
       
 33238           showSuggestions: !!suggestions.length
       
 33239         });
       
 33240 
       
 33241         if (!!suggestions.length) {
       
 33242           _this4.props.debouncedSpeak(Object(external_this_wp_i18n_["sprintf"])(
       
 33243           /* translators: %s: number of results. */
       
 33244           Object(external_this_wp_i18n_["_n"])('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', suggestions.length), suggestions.length), 'assertive');
       
 33245         } else {
       
 33246           _this4.props.debouncedSpeak(Object(external_this_wp_i18n_["__"])('No results.'), 'assertive');
       
 33247         }
       
 33248 
       
 33249         _this4.isUpdatingSuggestions = false;
       
 33250       }).catch(function () {
       
 33251         if (_this4.suggestionsRequest === request) {
       
 33252           _this4.setState({
       
 33253             loading: false
       
 33254           });
       
 33255 
       
 33256           _this4.isUpdatingSuggestions = false;
       
 33257         }
       
 33258       }); // Note that this assignment is handled *before* the async search request
       
 33259       // as a Promise always resolves on the next tick of the event loop.
       
 33260 
       
 33261       this.suggestionsRequest = request;
       
 33262     }
       
 33263   }, {
       
 33264     key: "onChange",
       
 33265     value: function onChange(event) {
       
 33266       var inputValue = event.target.value;
       
 33267       this.props.onChange(inputValue);
       
 33268 
       
 33269       if (!this.props.disableSuggestions) {
       
 33270         this.updateSuggestions(inputValue.trim());
       
 33271       }
       
 33272     }
       
 33273   }, {
       
 33274     key: "onFocus",
       
 33275     value: function onFocus() {
       
 33276       var suggestions = this.state.suggestions;
       
 33277       var _this$props3 = this.props,
       
 33278           disableSuggestions = _this$props3.disableSuggestions,
       
 33279           value = _this$props3.value; // When opening the link editor, if there's a value present, we want to load the suggestions pane with the results for this input search value
       
 33280       // Don't re-run the suggestions on focus if there are already suggestions present (prevents searching again when tabbing between the input and buttons)
       
 33281 
       
 33282       if (value && !disableSuggestions && !this.isUpdatingSuggestions && !(suggestions && suggestions.length)) {
       
 33283         // Ensure the suggestions are updated with the current input value
       
 33284         this.updateSuggestions(value.trim());
       
 33285       }
       
 33286     }
       
 33287   }, {
       
 33288     key: "onKeyDown",
       
 33289     value: function onKeyDown(event) {
       
 33290       var _this$state2 = this.state,
       
 33291           showSuggestions = _this$state2.showSuggestions,
       
 33292           selectedSuggestion = _this$state2.selectedSuggestion,
       
 33293           suggestions = _this$state2.suggestions,
       
 33294           loading = _this$state2.loading; // If the suggestions are not shown or loading, we shouldn't handle the arrow keys
       
 33295       // We shouldn't preventDefault to allow block arrow keys navigation
       
 33296 
       
 33297       if (!showSuggestions || !suggestions.length || loading) {
       
 33298         // In the Windows version of Firefox the up and down arrows don't move the caret
       
 33299         // within an input field like they do for Mac Firefox/Chrome/Safari. This causes
       
 33300         // a form of focus trapping that is disruptive to the user experience. This disruption
       
 33301         // only happens if the caret is not in the first or last position in the text input.
       
 33302         // See: https://github.com/WordPress/gutenberg/issues/5693#issuecomment-436684747
       
 33303         switch (event.keyCode) {
       
 33304           // When UP is pressed, if the caret is at the start of the text, move it to the 0
       
 33305           // position.
       
 33306           case external_this_wp_keycodes_["UP"]:
       
 33307             {
       
 33308               if (0 !== event.target.selectionStart) {
       
 33309                 event.stopPropagation();
       
 33310                 event.preventDefault(); // Set the input caret to position 0
       
 33311 
       
 33312                 event.target.setSelectionRange(0, 0);
       
 33313               }
       
 33314 
       
 33315               break;
       
 33316             }
       
 33317           // When DOWN is pressed, if the caret is not at the end of the text, move it to the
       
 33318           // last position.
       
 33319 
       
 33320           case external_this_wp_keycodes_["DOWN"]:
       
 33321             {
       
 33322               if (this.props.value.length !== event.target.selectionStart) {
       
 33323                 event.stopPropagation();
       
 33324                 event.preventDefault(); // Set the input caret to the last position
       
 33325 
       
 33326                 event.target.setSelectionRange(this.props.value.length, this.props.value.length);
       
 33327               }
       
 33328 
       
 33329               break;
       
 33330             }
       
 33331         }
       
 33332 
       
 33333         return;
       
 33334       }
       
 33335 
       
 33336       var suggestion = this.state.suggestions[this.state.selectedSuggestion];
       
 33337 
       
 33338       switch (event.keyCode) {
       
 33339         case external_this_wp_keycodes_["UP"]:
       
 33340           {
       
 33341             event.stopPropagation();
       
 33342             event.preventDefault();
       
 33343             var previousIndex = !selectedSuggestion ? suggestions.length - 1 : selectedSuggestion - 1;
       
 33344             this.setState({
       
 33345               selectedSuggestion: previousIndex
       
 33346             });
       
 33347             break;
       
 33348           }
       
 33349 
       
 33350         case external_this_wp_keycodes_["DOWN"]:
       
 33351           {
       
 33352             event.stopPropagation();
       
 33353             event.preventDefault();
       
 33354             var nextIndex = selectedSuggestion === null || selectedSuggestion === suggestions.length - 1 ? 0 : selectedSuggestion + 1;
       
 33355             this.setState({
       
 33356               selectedSuggestion: nextIndex
       
 33357             });
       
 33358             break;
       
 33359           }
       
 33360 
       
 33361         case external_this_wp_keycodes_["TAB"]:
       
 33362           {
       
 33363             if (this.state.selectedSuggestion !== null) {
       
 33364               this.selectLink(suggestion); // Announce a link has been selected when tabbing away from the input field.
       
 33365 
       
 33366               this.props.speak(Object(external_this_wp_i18n_["__"])('Link selected.'));
       
 33367             }
       
 33368 
       
 33369             break;
       
 33370           }
       
 33371 
       
 33372         case external_this_wp_keycodes_["ENTER"]:
       
 33373           {
       
 33374             if (this.state.selectedSuggestion !== null) {
       
 33375               event.stopPropagation();
       
 33376               this.selectLink(suggestion);
       
 33377             }
       
 33378 
       
 33379             break;
       
 33380           }
       
 33381       }
       
 33382     }
       
 33383   }, {
       
 33384     key: "selectLink",
       
 33385     value: function selectLink(suggestion) {
       
 33386       this.props.onChange(suggestion.url, suggestion);
       
 33387       this.setState({
       
 33388         selectedSuggestion: null,
       
 33389         showSuggestions: false
       
 33390       });
       
 33391     }
       
 33392   }, {
       
 33393     key: "handleOnClick",
       
 33394     value: function handleOnClick(suggestion) {
       
 33395       this.selectLink(suggestion); // Move focus to the input field when a link suggestion is clicked.
       
 33396 
       
 33397       this.inputRef.current.focus();
       
 33398     }
       
 33399   }, {
       
 33400     key: "render",
       
 33401     value: function render() {
       
 33402       var _this5 = this;
       
 33403 
       
 33404       var _this$props4 = this.props,
       
 33405           label = _this$props4.label,
       
 33406           instanceId = _this$props4.instanceId,
       
 33407           className = _this$props4.className,
       
 33408           isFullWidth = _this$props4.isFullWidth,
       
 33409           renderSuggestions = _this$props4.__experimentalRenderSuggestions,
       
 33410           _this$props4$placehol = _this$props4.placeholder,
       
 33411           placeholder = _this$props4$placehol === void 0 ? Object(external_this_wp_i18n_["__"])('Paste URL or type to search') : _this$props4$placehol,
       
 33412           _this$props4$value = _this$props4.value,
       
 33413           value = _this$props4$value === void 0 ? '' : _this$props4$value,
       
 33414           _this$props4$autoFocu = _this$props4.autoFocus,
       
 33415           autoFocus = _this$props4$autoFocu === void 0 ? true : _this$props4$autoFocu,
       
 33416           _this$props4$__experi = _this$props4.__experimentalShowInitialSuggestions,
       
 33417           __experimentalShowInitialSuggestions = _this$props4$__experi === void 0 ? false : _this$props4$__experi;
       
 33418 
       
 33419       var _this$state3 = this.state,
       
 33420           showSuggestions = _this$state3.showSuggestions,
       
 33421           suggestions = _this$state3.suggestions,
       
 33422           selectedSuggestion = _this$state3.selectedSuggestion,
       
 33423           loading = _this$state3.loading;
       
 33424       var id = "url-input-control-".concat(instanceId);
       
 33425       var suggestionsListboxId = "block-editor-url-input-suggestions-".concat(instanceId);
       
 33426       var suggestionOptionIdPrefix = "block-editor-url-input-suggestion-".concat(instanceId);
       
 33427       var suggestionsListProps = {
       
 33428         id: suggestionsListboxId,
       
 33429         ref: this.autocompleteRef,
       
 33430         role: 'listbox'
       
 33431       };
       
 33432 
       
 33433       var buildSuggestionItemProps = function buildSuggestionItemProps(suggestion, index) {
       
 33434         return {
       
 33435           role: 'option',
       
 33436           tabIndex: '-1',
       
 33437           id: "".concat(suggestionOptionIdPrefix, "-").concat(index),
       
 33438           ref: _this5.bindSuggestionNode(index),
       
 33439           'aria-selected': index === selectedSuggestion
       
 33440         };
       
 33441       };
       
 33442       /* eslint-disable jsx-a11y/no-autofocus */
       
 33443 
       
 33444 
       
 33445       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["BaseControl"], {
       
 33446         label: label,
       
 33447         id: id,
       
 33448         className: classnames_default()('block-editor-url-input', className, {
       
 33449           'is-full-width': isFullWidth
       
 33450         })
       
 33451       }, Object(external_this_wp_element_["createElement"])("input", {
       
 33452         className: "block-editor-url-input__input",
       
 33453         autoFocus: autoFocus,
       
 33454         type: "text",
       
 33455         "aria-label": Object(external_this_wp_i18n_["__"])('URL'),
       
 33456         required: true,
       
 33457         value: value,
       
 33458         onChange: this.onChange,
       
 33459         onFocus: this.onFocus,
       
 33460         onInput: stopEventPropagation,
       
 33461         placeholder: placeholder,
       
 33462         onKeyDown: this.onKeyDown,
       
 33463         role: "combobox",
       
 33464         "aria-expanded": showSuggestions,
       
 33465         "aria-autocomplete": "list",
       
 33466         "aria-owns": suggestionsListboxId,
       
 33467         "aria-activedescendant": selectedSuggestion !== null ? "".concat(suggestionOptionIdPrefix, "-").concat(selectedSuggestion) : undefined,
       
 33468         ref: this.inputRef
       
 33469       }), loading && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null), Object(external_this_lodash_["isFunction"])(renderSuggestions) && showSuggestions && !!suggestions.length && renderSuggestions({
       
 33470         suggestions: suggestions,
       
 33471         selectedSuggestion: selectedSuggestion,
       
 33472         suggestionsListProps: suggestionsListProps,
       
 33473         buildSuggestionItemProps: buildSuggestionItemProps,
       
 33474         isLoading: loading,
       
 33475         handleSuggestionClick: this.handleOnClick,
       
 33476         isInitialSuggestions: __experimentalShowInitialSuggestions && !(value && value.length)
       
 33477       }), !Object(external_this_lodash_["isFunction"])(renderSuggestions) && showSuggestions && !!suggestions.length && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Popover"], {
       
 33478         position: "bottom",
       
 33479         noArrow: true,
       
 33480         focusOnMount: false
       
 33481       }, Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, suggestionsListProps, {
       
 33482         className: classnames_default()('block-editor-url-input__suggestions', "".concat(className, "__suggestions"))
       
 33483       }), suggestions.map(function (suggestion, index) {
       
 33484         return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, buildSuggestionItemProps(suggestion, index), {
       
 33485           key: suggestion.id,
       
 33486           className: classnames_default()('block-editor-url-input__suggestion', {
       
 33487             'is-selected': index === selectedSuggestion
       
 33488           }),
       
 33489           onClick: function onClick() {
       
 33490             return _this5.handleOnClick(suggestion);
       
 33491           }
       
 33492         }), suggestion.title);
       
 33493       }))));
       
 33494       /* eslint-enable jsx-a11y/no-autofocus */
       
 33495     }
       
 33496   }], [{
       
 33497     key: "getDerivedStateFromProps",
       
 33498     value: function getDerivedStateFromProps(_ref, _ref2) {
       
 33499       var value = _ref.value,
       
 33500           disableSuggestions = _ref.disableSuggestions,
       
 33501           _ref$__experimentalSh = _ref.__experimentalShowInitialSuggestions,
       
 33502           __experimentalShowInitialSuggestions = _ref$__experimentalSh === void 0 ? false : _ref$__experimentalSh;
       
 33503 
       
 33504       var showSuggestions = _ref2.showSuggestions;
       
 33505       var shouldShowSuggestions = showSuggestions;
       
 33506       var hasValue = value && value.length;
       
 33507 
       
 33508       if (!__experimentalShowInitialSuggestions && !hasValue) {
       
 33509         shouldShowSuggestions = false;
       
 33510       }
       
 33511 
       
 33512       if (disableSuggestions === true) {
       
 33513         shouldShowSuggestions = false;
       
 33514       }
       
 33515 
       
 33516       return {
       
 33517         showSuggestions: shouldShowSuggestions
       
 33518       };
       
 33519     }
       
 33520   }]);
       
 33521 
       
 33522   return URLInput;
       
 33523 }(external_this_wp_element_["Component"]);
       
 33524 /**
       
 33525  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-input/README.md
       
 33526  */
       
 33527 
       
 33528 
       
 33529 /* harmony default export */ var url_input = (Object(external_this_wp_compose_["compose"])(external_this_wp_compose_["withSafeTimeout"], external_this_wp_components_["withSpokenMessages"], external_this_wp_compose_["withInstanceId"], Object(external_this_wp_data_["withSelect"])(function (select, props) {
       
 33530   // If a link suggestions handler is already provided then
       
 33531   // bail
       
 33532   if (Object(external_this_lodash_["isFunction"])(props.__experimentalFetchLinkSuggestions)) {
       
 33533     return;
       
 33534   }
       
 33535 
       
 33536   var _select = select('core/block-editor'),
       
 33537       getSettings = _select.getSettings;
       
 33538 
       
 33539   return {
       
 33540     __experimentalFetchLinkSuggestions: getSettings().__experimentalFetchLinkSuggestions
       
 33541   };
       
 33542 }))(url_input_URLInput));
       
 33543 
 33699 
 33544 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/search-input.js
 33700 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/search-input.js
 33545 
 33701 
 33546 
 33702 
       
 33703 /**
       
 33704  * External dependencies
       
 33705  */
 33547 
 33706 
 33548 /**
 33707 /**
 33549  * WordPress dependencies
 33708  * WordPress dependencies
 33550  */
 33709  */
 33551 
 33710 
 33556  * Internal dependencies
 33715  * Internal dependencies
 33557  */
 33716  */
 33558 
 33717 
 33559 
 33718 
 33560 
 33719 
 33561 var search_input_LinkControlSearchInput = function LinkControlSearchInput(_ref) {
 33720 
 33562   var placeholder = _ref.placeholder,
 33721 
 33563       value = _ref.value,
 33722 const noopSearchHandler = Promise.resolve([]);
 33564       onChange = _ref.onChange,
 33723 const LinkControlSearchInput = Object(external_wp_element_["forwardRef"])(({
 33565       onSelect = _ref.onSelect,
 33724   value,
 33566       renderSuggestions = _ref.renderSuggestions,
 33725   children,
 33567       fetchSuggestions = _ref.fetchSuggestions,
 33726   currentLink = {},
 33568       showInitialSuggestions = _ref.showInitialSuggestions,
 33727   className = null,
 33569       errorMessage = _ref.errorMessage;
 33728   placeholder = null,
 33570 
 33729   withCreateSuggestion = false,
 33571   var _useState = Object(external_this_wp_element_["useState"])(),
 33730   onCreateSuggestion = external_lodash_["noop"],
 33572       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 33731   onChange = external_lodash_["noop"],
 33573       selectedSuggestion = _useState2[0],
 33732   onSelect = external_lodash_["noop"],
 33574       setSelectedSuggestion = _useState2[1];
 33733   showSuggestions = true,
       
 33734   renderSuggestions = props => Object(external_wp_element_["createElement"])(LinkControlSearchResults, props),
       
 33735   fetchSuggestions = null,
       
 33736   allowDirectEntry = true,
       
 33737   showInitialSuggestions = false,
       
 33738   suggestionsQuery = {},
       
 33739   withURLSuggestion = true,
       
 33740   createSuggestionButtonText
       
 33741 }, ref) => {
       
 33742   const genericSearchHandler = useSearchHandler(suggestionsQuery, allowDirectEntry, withCreateSuggestion, withURLSuggestion);
       
 33743   const searchHandler = showSuggestions ? fetchSuggestions || genericSearchHandler : noopSearchHandler;
       
 33744   const instanceId = Object(external_wp_compose_["useInstanceId"])(LinkControlSearchInput);
       
 33745   const [focusedSuggestion, setFocusedSuggestion] = Object(external_wp_element_["useState"])();
 33575   /**
 33746   /**
 33576    * Handles the user moving between different suggestions. Does not handle
 33747    * Handles the user moving between different suggestions. Does not handle
 33577    * choosing an individual item.
 33748    * choosing an individual item.
 33578    *
 33749    *
 33579    * @param {string} selection the url of the selected suggestion.
 33750    * @param {string} selection the url of the selected suggestion.
 33580    * @param {Object} suggestion the suggestion object.
 33751    * @param {Object} suggestion the suggestion object.
 33581    */
 33752    */
 33582 
 33753 
 33583 
 33754   const onInputChange = (selection, suggestion) => {
 33584   var selectItemHandler = function selectItemHandler(selection, suggestion) {
       
 33585     onChange(selection);
 33755     onChange(selection);
 33586     setSelectedSuggestion(suggestion);
 33756     setFocusedSuggestion(suggestion);
 33587   };
 33757   };
 33588 
 33758 
 33589   function selectSuggestionOrCurrentInputValue(event) {
 33759   const onFormSubmit = event => {
 33590     // Avoid default forms behavior, since it's being handled custom here.
 33760     event.preventDefault();
 33591     event.preventDefault(); // Interpret the selected value as either the selected suggestion, if
 33761     onSuggestionSelected(focusedSuggestion || {
 33592     // exists, or otherwise the current input value as entered.
       
 33593 
       
 33594     onSelect(selectedSuggestion || {
       
 33595       url: value
 33762       url: value
 33596     });
 33763     });
 33597   }
 33764   };
 33598 
 33765 
 33599   return Object(external_this_wp_element_["createElement"])("form", {
 33766   const handleRenderSuggestions = props => renderSuggestions({ ...props,
 33600     onSubmit: selectSuggestionOrCurrentInputValue
 33767     instanceId,
 33601   }, Object(external_this_wp_element_["createElement"])("div", {
 33768     withCreateSuggestion,
 33602     className: "block-editor-link-control__search-input-wrapper"
 33769     currentInputValue: value,
 33603   }, Object(external_this_wp_element_["createElement"])(url_input, {
 33770     createSuggestionButtonText,
 33604     className: "block-editor-link-control__search-input",
 33771     suggestionsQuery,
       
 33772     handleSuggestionClick: suggestion => {
       
 33773       if (props.handleSuggestionClick) {
       
 33774         props.handleSuggestionClick(suggestion);
       
 33775       }
       
 33776 
       
 33777       onSuggestionSelected(suggestion);
       
 33778     }
       
 33779   });
       
 33780 
       
 33781   const onSuggestionSelected = async selectedSuggestion => {
       
 33782     let suggestion = selectedSuggestion;
       
 33783 
       
 33784     if (CREATE_TYPE === selectedSuggestion.type) {
       
 33785       // Create a new page and call onSelect with the output from the onCreateSuggestion callback
       
 33786       try {
       
 33787         var _suggestion;
       
 33788 
       
 33789         suggestion = await onCreateSuggestion(selectedSuggestion.title);
       
 33790 
       
 33791         if ((_suggestion = suggestion) !== null && _suggestion !== void 0 && _suggestion.url) {
       
 33792           onSelect(suggestion);
       
 33793         }
       
 33794       } catch (e) {}
       
 33795 
       
 33796       return;
       
 33797     }
       
 33798 
       
 33799     if (allowDirectEntry || suggestion && Object.keys(suggestion).length >= 1) {
       
 33800       onSelect( // Some direct entries don't have types or IDs, and we still need to clear the previous ones.
       
 33801       { ...Object(external_lodash_["omit"])(currentLink, 'id', 'url'),
       
 33802         ...suggestion
       
 33803       }, suggestion);
       
 33804     }
       
 33805   };
       
 33806 
       
 33807   return Object(external_wp_element_["createElement"])("form", {
       
 33808     onSubmit: onFormSubmit
       
 33809   }, Object(external_wp_element_["createElement"])(url_input, {
       
 33810     className: className,
 33605     value: value,
 33811     value: value,
 33606     onChange: selectItemHandler,
 33812     onChange: onInputChange,
 33607     placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : Object(external_this_wp_i18n_["__"])('Search or type url'),
 33813     placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : Object(external_wp_i18n_["__"])('Search or type url'),
 33608     __experimentalRenderSuggestions: renderSuggestions,
 33814     __experimentalRenderSuggestions: showSuggestions ? handleRenderSuggestions : null,
 33609     __experimentalFetchLinkSuggestions: fetchSuggestions,
 33815     __experimentalFetchLinkSuggestions: searchHandler,
 33610     __experimentalHandleURLSuggestions: true,
 33816     __experimentalHandleURLSuggestions: true,
 33611     __experimentalShowInitialSuggestions: showInitialSuggestions
 33817     __experimentalShowInitialSuggestions: showInitialSuggestions,
 33612   }), Object(external_this_wp_element_["createElement"])("div", {
 33818     ref: ref
 33613     className: "block-editor-link-control__search-actions"
 33819   }), children);
 33614   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 33820 });
 33615     type: "submit",
 33821 /* harmony default export */ var search_input = (LinkControlSearchInput);
 33616     label: Object(external_this_wp_i18n_["__"])('Submit'),
 33822 
 33617     icon: keyboard_return["a" /* default */],
 33823 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/viewer-slot.js
 33618     className: "block-editor-link-control__search-submit"
 33824 /**
 33619   }))), errorMessage && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Notice"], {
 33825  * WordPress dependencies
 33620     className: "block-editor-link-control__search-error",
 33826  */
 33621     status: "error",
 33827 
 33622     isDismissible: false
 33828 const {
 33623   }, errorMessage));
 33829   Slot: ViewerSlot,
 33624 };
 33830   Fill: ViewerFill
 33625 
 33831 } = Object(external_wp_components_["createSlotFill"])('BlockEditorLinkControlViewer');
 33626 /* harmony default export */ var search_input = (search_input_LinkControlSearchInput);
 33832 
 33627 
 33833 /* harmony default export */ var viewer_slot = (ViewerSlot);
 33628 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/search-create-button.js
 33834 
 33629 
 33835 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/link-preview.js
 33630 
 33836 
 33631 
 33837 
 33632 /**
 33838 /**
 33633  * External dependencies
 33839  * External dependencies
 33634  */
 33840  */
 33638  */
 33844  */
 33639 
 33845 
 33640 
 33846 
 33641 
 33847 
 33642 
 33848 
 33643 var search_create_button_LinkControlSearchCreate = function LinkControlSearchCreate(_ref) {
 33849 /**
 33644   var searchTerm = _ref.searchTerm,
 33850  * Internal dependencies
 33645       onClick = _ref.onClick,
 33851  */
 33646       itemProps = _ref.itemProps,
 33852 
 33647       isSelected = _ref.isSelected;
 33853 
 33648 
 33854 function LinkPreview({
 33649   if (!searchTerm) {
 33855   value,
 33650     return null;
 33856   onEditClick
 33651   }
 33857 }) {
 33652 
 33858   const displayURL = value && Object(external_wp_url_["filterURLForDisplay"])(Object(external_wp_url_["safeDecodeURI"])(value.url), 16) || '';
 33653   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, itemProps, {
 33859   return Object(external_wp_element_["createElement"])("div", {
 33654     className: classnames_default()('block-editor-link-control__search-create block-editor-link-control__search-item', {
 33860     "aria-label": Object(external_wp_i18n_["__"])('Currently selected'),
 33655       'is-selected': isSelected
 33861     "aria-selected": "true",
 33656     }),
 33862     className: classnames_default()('block-editor-link-control__search-item', {
 33657     onClick: onClick
 33863       'is-current': true
 33658   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Icon"], {
 33864     })
 33659     className: "block-editor-link-control__search-item-icon",
 33865   }, Object(external_wp_element_["createElement"])("span", {
 33660     icon: "insert"
       
 33661   }), Object(external_this_wp_element_["createElement"])("span", {
       
 33662     className: "block-editor-link-control__search-item-header"
 33866     className: "block-editor-link-control__search-item-header"
 33663   }, Object(external_this_wp_element_["createElement"])("span", {
 33867   }, Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
 33664     className: "block-editor-link-control__search-item-title"
 33868     className: "block-editor-link-control__search-item-title",
 33665   }, Object(external_this_wp_element_["createInterpolateElement"])(Object(external_this_wp_i18n_["sprintf"])(
 33869     href: value.url
 33666   /* translators: %s: search term. */
 33870   }, value && value.title || displayURL), value && value.title && Object(external_wp_element_["createElement"])("span", {
 33667   Object(external_this_wp_i18n_["__"])('New page: <mark>%s</mark>'), searchTerm), {
 33871     className: "block-editor-link-control__search-item-info"
 33668     mark: Object(external_this_wp_element_["createElement"])("mark", null)
 33872   }, displayURL)), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 33669   }))));
 33873     isSecondary: true,
 33670 };
 33874     onClick: () => onEditClick(),
 33671 /* harmony default export */ var search_create_button = (search_create_button_LinkControlSearchCreate);
 33875     className: "block-editor-link-control__search-item-action"
 33672 
 33876   }, Object(external_wp_i18n_["__"])('Edit')), Object(external_wp_element_["createElement"])(ViewerSlot, {
 33673 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/index.js
 33877     fillProps: value
 33674 
 33878   }));
 33675 
 33879 }
 33676 
 33880 
 33677 
 33881 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/use-create-page.js
 33678 
       
 33679 
       
 33680 function link_control_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; }
       
 33681 
       
 33682 function link_control_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { link_control_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 { link_control_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 33683 
       
 33684 /**
       
 33685  * External dependencies
       
 33686  */
       
 33687 
       
 33688 
       
 33689 /**
 33882 /**
 33690  * WordPress dependencies
 33883  * WordPress dependencies
 33691  */
 33884  */
 33692 
 33885 
 33693 
 33886 
 33694 
 33887 function useCreatePage(handleCreatePage) {
 33695 
 33888   const cancelableCreateSuggestion = Object(external_wp_element_["useRef"])();
 33696 
 33889   const [isCreatingPage, setIsCreatingPage] = Object(external_wp_element_["useState"])(false);
 33697 
 33890   const [errorMessage, setErrorMessage] = Object(external_wp_element_["useState"])(null);
 33698 
 33891 
 33699 
 33892   const createPage = async function (suggestionTitle) {
 33700 /**
 33893     setIsCreatingPage(true);
 33701  * Internal dependencies
 33894     setErrorMessage(null);
 33702  */
 33895 
 33703 
 33896     try {
 33704 
 33897       // Make cancellable in order that we can avoid setting State
 33705 
 33898       // if the component unmounts during the call to `createSuggestion`
 33706 
 33899       cancelableCreateSuggestion.current = makeCancelable( // Using Promise.resolve to allow createSuggestion to return a
 33707 
 33900       // non-Promise based value.
 33708 
 33901       Promise.resolve(handleCreatePage(suggestionTitle)));
 33709 var link_control_createSlotFill = Object(external_this_wp_components_["createSlotFill"])('BlockEditorLinkControlViewer'),
 33902       return await cancelableCreateSuggestion.current.promise;
 33710     ViewerSlot = link_control_createSlotFill.Slot,
 33903     } catch (error) {
 33711     ViewerFill = link_control_createSlotFill.Fill; // Used as a unique identifier for the "Create" option within search results.
 33904       if (error && error.isCanceled) {
 33712 // Used to help distinguish the "Create" suggestion within the search results in
 33905         return; // bail if canceled to avoid setting state
 33713 // order to handle it as a unique case.
 33906       }
 33714 
 33907 
 33715 
 33908       setErrorMessage(error.message || Object(external_wp_i18n_["__"])('An unknown error occurred during creation. Please try again.'));
 33716 var CREATE_TYPE = '__CREATE__';
 33909       throw error;
       
 33910     } finally {
       
 33911       setIsCreatingPage(false);
       
 33912     }
       
 33913   };
       
 33914   /**
       
 33915    * Handles cancelling any pending Promises that have been made cancelable.
       
 33916    */
       
 33917 
       
 33918 
       
 33919   Object(external_wp_element_["useEffect"])(() => {
       
 33920     return () => {
       
 33921       // componentDidUnmount
       
 33922       if (cancelableCreateSuggestion.current) {
       
 33923         cancelableCreateSuggestion.current.cancel();
       
 33924       }
       
 33925     };
       
 33926   }, []);
       
 33927   return {
       
 33928     createPage,
       
 33929     isCreatingPage,
       
 33930     errorMessage
       
 33931   };
       
 33932 }
 33717 /**
 33933 /**
 33718  * Creates a wrapper around a promise which allows it to be programmatically
 33934  * Creates a wrapper around a promise which allows it to be programmatically
 33719  * cancelled.
 33935  * cancelled.
 33720  * See: https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html
 33936  * See: https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html
 33721  *
 33937  *
 33722  * @param {Promise} promise the Promise to make cancelable
 33938  * @param {Promise} promise the Promise to make cancelable
 33723  */
 33939  */
 33724 
 33940 
 33725 var makeCancelable = function makeCancelable(promise) {
 33941 const makeCancelable = promise => {
 33726   var hasCanceled_ = false;
 33942   let hasCanceled_ = false;
 33727   var wrappedPromise = new Promise(function (resolve, reject) {
 33943   const wrappedPromise = new Promise((resolve, reject) => {
 33728     promise.then(function (val) {
 33944     promise.then(val => hasCanceled_ ? reject({
 33729       return hasCanceled_ ? reject({
 33945       isCanceled: true
 33730         isCanceled: true
 33946     }) : resolve(val), error => hasCanceled_ ? reject({
 33731       }) : resolve(val);
 33947       isCanceled: true
 33732     }, function (error) {
 33948     }) : reject(error));
 33733       return hasCanceled_ ? reject({
       
 33734         isCanceled: true
       
 33735       }) : reject(error);
       
 33736     });
       
 33737   });
 33949   });
 33738   return {
 33950   return {
 33739     promise: wrappedPromise,
 33951     promise: wrappedPromise,
 33740     cancel: function cancel() {
 33952 
       
 33953     cancel() {
 33741       hasCanceled_ = true;
 33954       hasCanceled_ = true;
 33742     }
 33955     }
       
 33956 
 33743   };
 33957   };
 33744 };
 33958 };
       
 33959 
       
 33960 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/link-control/index.js
       
 33961 
       
 33962 
       
 33963 /**
       
 33964  * External dependencies
       
 33965  */
       
 33966 
       
 33967 /**
       
 33968  * WordPress dependencies
       
 33969  */
       
 33970 
       
 33971 
       
 33972 
       
 33973 
       
 33974 
       
 33975 
       
 33976 /**
       
 33977  * Internal dependencies
       
 33978  */
       
 33979 
       
 33980 
       
 33981 
       
 33982 
       
 33983 
       
 33984 
 33745 /**
 33985 /**
 33746  * Default properties associated with a link control value.
 33986  * Default properties associated with a link control value.
 33747  *
 33987  *
 33748  * @typedef WPLinkControlDefaultValue
 33988  * @typedef WPLinkControlDefaultValue
 33749  *
 33989  *
 33771  *
 34011  *
 33772  * @property {string} id    Identifier to use as property for setting value.
 34012  * @property {string} id    Identifier to use as property for setting value.
 33773  * @property {string} title Human-readable label to show in user interface.
 34013  * @property {string} title Human-readable label to show in user interface.
 33774  */
 34014  */
 33775 
 34015 
 33776 /* eslint-disable jsdoc/valid-types */
       
 33777 
       
 33778 /**
 34016 /**
 33779  * Properties associated with a link control value, composed as a union of the
 34017  * Properties associated with a link control value, composed as a union of the
 33780  * default properties and any custom settings values.
 34018  * default properties and any custom settings values.
 33781  *
 34019  *
 33782  * @typedef {WPLinkControlDefaultValue&WPLinkControlSettingsValue} WPLinkControlValue
 34020  * @typedef {WPLinkControlDefaultValue&WPLinkControlSettingsValue} WPLinkControlValue
 33783  */
 34021  */
 33784 
       
 33785 /* eslint-enable */
       
 33786 
 34022 
 33787 /** @typedef {(nextValue:WPLinkControlValue)=>void} WPLinkControlOnChangeProp */
 34023 /** @typedef {(nextValue:WPLinkControlValue)=>void} WPLinkControlOnChangeProp */
 33788 
 34024 
 33789 /**
 34025 /**
 33790  * Properties associated with a search suggestion used within the LinkControl.
 34026  * Properties associated with a search suggestion used within the LinkControl.
 33801 /** @typedef {(title:string)=>WPLinkControlSuggestion} WPLinkControlCreateSuggestionProp */
 34037 /** @typedef {(title:string)=>WPLinkControlSuggestion} WPLinkControlCreateSuggestionProp */
 33802 
 34038 
 33803 /**
 34039 /**
 33804  * @typedef WPLinkControlProps
 34040  * @typedef WPLinkControlProps
 33805  *
 34041  *
 33806  * @property {(WPLinkControlSetting[])=}            settings               An array of settings objects. Each object will used to
 34042  * @property {(WPLinkControlSetting[])=}  settings                   An array of settings objects. Each object will used to
 33807  *                                                                         render a `ToggleControl` for that setting.
 34043  *                                                                   render a `ToggleControl` for that setting.
 33808  * @property {boolean=}                             forceIsEditingLink     If passed as either `true` or `false`, controls the
 34044  * @property {boolean=}                   forceIsEditingLink         If passed as either `true` or `false`, controls the
 33809  *                                                                         internal editing state of the component to respective
 34045  *                                                                   internal editing state of the component to respective
 33810  *                                                                         show or not show the URL input field.
 34046  *                                                                   show or not show the URL input field.
 33811  * @property {WPLinkControlValue=}                  value                  Current link value.
 34047  * @property {WPLinkControlValue=}        value                      Current link value.
 33812  * @property {WPLinkControlOnChangeProp=}           onChange               Value change handler, called with the updated value if
 34048  * @property {WPLinkControlOnChangeProp=} onChange                   Value change handler, called with the updated value if
 33813  *                                                                         the user selects a new link or updates settings.
 34049  *                                                                   the user selects a new link or updates settings.
 33814  * @property {boolean=}                             noDirectEntry          Whether to disable direct entries or not.
 34050  * @property {boolean=}                   noDirectEntry              Whether to allow turning a URL-like search query directly into a link.
 33815  * @property {boolean=}                             showSuggestions        Whether to present suggestions when typing the URL.
 34051  * @property {boolean=}                   showSuggestions            Whether to present suggestions when typing the URL.
 33816  * @property {boolean=}                             showInitialSuggestions Whether to present initial suggestions immediately.
 34052  * @property {boolean=}                   showInitialSuggestions     Whether to present initial suggestions immediately.
 33817  * @property {WPLinkControlCreateSuggestionProp=}   createSuggestion       Handler to manage creation of link value from suggestion.
 34053  * @property {boolean=}                   withCreateSuggestion       Whether to allow creation of link value from suggestion.
       
 34054  * @property {Object=}                    suggestionsQuery           Query parameters to pass along to wp.blockEditor.__experimentalFetchLinkSuggestions.
       
 34055  * @property {boolean=}                   noURLSuggestion            Whether to add a fallback suggestion which treats the search query as a URL.
       
 34056  * @property {string|Function|undefined}  createSuggestionButtonText The text to use in the button that calls createSuggestion.
 33818  */
 34057  */
 33819 
 34058 
 33820 /**
 34059 /**
 33821  * Renders a link control. A link control is a controlled input which maintains
 34060  * Renders a link control. A link control is a controlled input which maintains
 33822  * a value associated with a link (HTML anchor element) and relevant settings
 34061  * a value associated with a link (HTML anchor element) and relevant settings
 33823  * for how that link is expected to behave.
 34062  * for how that link is expected to behave.
 33824  *
 34063  *
 33825  * @param {WPLinkControlProps} props Component props.
 34064  * @param {WPLinkControlProps} props Component props.
 33826  */
 34065  */
 33827 
 34066 
 33828 
 34067 function LinkControl({
 33829 function LinkControl(_ref) {
 34068   searchInputPlaceholder,
 33830   var searchInputPlaceholder = _ref.searchInputPlaceholder,
 34069   value,
 33831       value = _ref.value,
 34070   settings,
 33832       settings = _ref.settings,
 34071   onChange = external_lodash_["noop"],
 33833       _ref$onChange = _ref.onChange,
 34072   noDirectEntry = false,
 33834       onChange = _ref$onChange === void 0 ? external_this_lodash_["noop"] : _ref$onChange,
 34073   showSuggestions = true,
 33835       _ref$noDirectEntry = _ref.noDirectEntry,
 34074   showInitialSuggestions,
 33836       noDirectEntry = _ref$noDirectEntry === void 0 ? false : _ref$noDirectEntry,
 34075   forceIsEditingLink,
 33837       _ref$showSuggestions = _ref.showSuggestions,
 34076   createSuggestion,
 33838       showSuggestions = _ref$showSuggestions === void 0 ? true : _ref$showSuggestions,
 34077   withCreateSuggestion,
 33839       showInitialSuggestions = _ref.showInitialSuggestions,
 34078   inputValue: propInputValue = '',
 33840       forceIsEditingLink = _ref.forceIsEditingLink,
 34079   suggestionsQuery = {},
 33841       createSuggestion = _ref.createSuggestion;
 34080   noURLSuggestion = false,
 33842   var cancelableOnCreate = Object(external_this_wp_element_["useRef"])();
 34081   createSuggestionButtonText
 33843   var cancelableCreateSuggestion = Object(external_this_wp_element_["useRef"])();
 34082 }) {
 33844   var wrapperNode = Object(external_this_wp_element_["useRef"])();
 34083   if (withCreateSuggestion === undefined && createSuggestion) {
 33845   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(LinkControl);
 34084     withCreateSuggestion = true;
 33846 
 34085   }
 33847   var _useState = Object(external_this_wp_element_["useState"])(value && value.url || ''),
 34086 
 33848       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 34087   const isMounting = Object(external_wp_element_["useRef"])(true);
 33849       inputValue = _useState2[0],
 34088   const wrapperNode = Object(external_wp_element_["useRef"])();
 33850       setInputValue = _useState2[1];
 34089   const [internalInputValue, setInternalInputValue] = Object(external_wp_element_["useState"])(value && value.url || '');
 33851 
 34090   const currentInputValue = propInputValue || internalInputValue;
 33852   var _useState3 = Object(external_this_wp_element_["useState"])(forceIsEditingLink !== undefined ? forceIsEditingLink : !value || !value.url),
 34091   const [isEditingLink, setIsEditingLink] = Object(external_wp_element_["useState"])(forceIsEditingLink !== undefined ? forceIsEditingLink : !value || !value.url);
 33853       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
 34092   const isEndingEditWithFocus = Object(external_wp_element_["useRef"])(false);
 33854       isEditingLink = _useState4[0],
 34093   Object(external_wp_element_["useEffect"])(() => {
 33855       setIsEditingLink = _useState4[1];
       
 33856 
       
 33857   var _useState5 = Object(external_this_wp_element_["useState"])(false),
       
 33858       _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
       
 33859       isResolvingLink = _useState6[0],
       
 33860       setIsResolvingLink = _useState6[1];
       
 33861 
       
 33862   var _useState7 = Object(external_this_wp_element_["useState"])(null),
       
 33863       _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2),
       
 33864       errorMessage = _useState8[0],
       
 33865       setErrorMessage = _useState8[1];
       
 33866 
       
 33867   var isEndingEditWithFocus = Object(external_this_wp_element_["useRef"])(false);
       
 33868 
       
 33869   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 33870     var _select = select('core/block-editor'),
       
 33871         getSettings = _select.getSettings;
       
 33872 
       
 33873     return {
       
 33874       fetchSearchSuggestions: getSettings().__experimentalFetchLinkSuggestions
       
 33875     };
       
 33876   }, []),
       
 33877       fetchSearchSuggestions = _useSelect.fetchSearchSuggestions;
       
 33878 
       
 33879   var displayURL = value && Object(external_this_wp_url_["filterURLForDisplay"])(Object(external_this_wp_url_["safeDecodeURI"])(value.url)) || '';
       
 33880   Object(external_this_wp_element_["useEffect"])(function () {
       
 33881     if (forceIsEditingLink !== undefined && forceIsEditingLink !== isEditingLink) {
 34094     if (forceIsEditingLink !== undefined && forceIsEditingLink !== isEditingLink) {
 33882       setIsEditingLink(forceIsEditingLink);
 34095       setIsEditingLink(forceIsEditingLink);
 33883     }
 34096     }
 33884   }, [forceIsEditingLink]);
 34097   }, [forceIsEditingLink]);
 33885   Object(external_this_wp_element_["useEffect"])(function () {
 34098   Object(external_wp_element_["useEffect"])(() => {
 33886     // When `isEditingLink` is set to `false`, a focus loss could occur
 34099     if (isMounting.current) {
       
 34100       isMounting.current = false;
       
 34101       return;
       
 34102     } // When `isEditingLink` changes, a focus loss could occur
 33887     // since the link input may be removed from the DOM. To avoid this,
 34103     // since the link input may be removed from the DOM. To avoid this,
 33888     // reinstate focus to a suitable target if focus has in-fact been lost.
 34104     // reinstate focus to a suitable target if focus has in-fact been lost.
 33889     // Note that the check is necessary because while typically unsetting
 34105     // Note that the check is necessary because while typically unsetting
 33890     // edit mode would render the read-only mode's link element, it isn't
 34106     // edit mode would render the read-only mode's link element, it isn't
 33891     // guaranteed. The link input may continue to be shown if the next value
 34107     // guaranteed. The link input may continue to be shown if the next value
 33892     // is still unassigned after calling `onChange`.
 34108     // is still unassigned after calling `onChange`.
 33893     var hadFocusLoss = isEndingEditWithFocus.current && wrapperNode.current && !wrapperNode.current.contains(document.activeElement);
 34109 
       
 34110 
       
 34111     const hadFocusLoss = !wrapperNode.current.contains(wrapperNode.current.ownerDocument.activeElement);
 33894 
 34112 
 33895     if (hadFocusLoss) {
 34113     if (hadFocusLoss) {
 33896       // Prefer to focus a natural focusable descendent of the wrapper,
 34114       // Prefer to focus a natural focusable descendent of the wrapper,
 33897       // but settle for the wrapper if there are no other options.
 34115       // but settle for the wrapper if there are no other options.
 33898       var nextFocusTarget = external_this_wp_dom_["focus"].focusable.find(wrapperNode.current)[0] || wrapperNode.current;
 34116       const nextFocusTarget = external_wp_dom_["focus"].focusable.find(wrapperNode.current)[0] || wrapperNode.current;
 33899       nextFocusTarget.focus();
 34117       nextFocusTarget.focus();
 33900     }
 34118     }
 33901 
 34119 
 33902     isEndingEditWithFocus.current = false;
 34120     isEndingEditWithFocus.current = false;
 33903   }, [isEditingLink]);
 34121   }, [isEditingLink]);
 33904   /**
       
 33905    * Handles cancelling any pending Promises that have been made cancelable.
       
 33906    */
       
 33907 
       
 33908   Object(external_this_wp_element_["useEffect"])(function () {
       
 33909     return function () {
       
 33910       // componentDidUnmount
       
 33911       if (cancelableOnCreate.current) {
       
 33912         cancelableOnCreate.current.cancel();
       
 33913       }
       
 33914 
       
 33915       if (cancelableCreateSuggestion.current) {
       
 33916         cancelableCreateSuggestion.current.cancel();
       
 33917       }
       
 33918     };
       
 33919   }, []);
       
 33920   /**
       
 33921    * onChange LinkControlSearchInput event handler
       
 33922    *
       
 33923    * @param {string} val Current value returned by the search.
       
 33924    */
       
 33925 
       
 33926   var onInputChange = function onInputChange() {
       
 33927     var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
       
 33928     setInputValue(val);
       
 33929   };
       
 33930 
       
 33931   var handleDirectEntry = noDirectEntry ? function () {
       
 33932     return Promise.resolve([]);
       
 33933   } : function (val) {
       
 33934     var type = 'URL';
       
 33935     var protocol = Object(external_this_wp_url_["getProtocol"])(val) || '';
       
 33936 
       
 33937     if (protocol.includes('mailto')) {
       
 33938       type = 'mailto';
       
 33939     }
       
 33940 
       
 33941     if (protocol.includes('tel')) {
       
 33942       type = 'tel';
       
 33943     }
       
 33944 
       
 33945     if (Object(external_this_lodash_["startsWith"])(val, '#')) {
       
 33946       type = 'internal';
       
 33947     }
       
 33948 
       
 33949     return Promise.resolve([{
       
 33950       id: val,
       
 33951       title: val,
       
 33952       url: type === 'URL' ? Object(external_this_wp_url_["prependHTTP"])(val) : val,
       
 33953       type: type
       
 33954     }]);
       
 33955   };
       
 33956 
       
 33957   var handleEntitySearch = /*#__PURE__*/function () {
       
 33958     var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee(val, args) {
       
 33959       var results, couldBeURL;
       
 33960       return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
       
 33961         while (1) {
       
 33962           switch (_context.prev = _context.next) {
       
 33963             case 0:
       
 33964               _context.next = 2;
       
 33965               return Promise.all([fetchSearchSuggestions(val, link_control_objectSpread({}, args.isInitialSuggestions ? {
       
 33966                 perPage: 3
       
 33967               } : {})), handleDirectEntry(val)]);
       
 33968 
       
 33969             case 2:
       
 33970               results = _context.sent;
       
 33971               couldBeURL = !val.includes(' '); // If it's potentially a URL search then concat on a URL search suggestion
       
 33972               // just for good measure. That way once the actual results run out we always
       
 33973               // have a URL option to fallback on.
       
 33974 
       
 33975               results = couldBeURL && !args.isInitialSuggestions ? results[0].concat(results[1]) : results[0]; // If displaying initial suggestions just return plain results.
       
 33976 
       
 33977               if (!args.isInitialSuggestions) {
       
 33978                 _context.next = 7;
       
 33979                 break;
       
 33980               }
       
 33981 
       
 33982               return _context.abrupt("return", results);
       
 33983 
       
 33984             case 7:
       
 33985               return _context.abrupt("return", isURLLike(val) || !createSuggestion ? results : results.concat({
       
 33986                 // the `id` prop is intentionally ommitted here because it
       
 33987                 // is never exposed as part of the component's public API.
       
 33988                 // see: https://github.com/WordPress/gutenberg/pull/19775#discussion_r378931316.
       
 33989                 title: val,
       
 33990                 // must match the existing `<input>`s text value
       
 33991                 url: val,
       
 33992                 // must match the existing `<input>`s text value
       
 33993                 type: CREATE_TYPE
       
 33994               }));
       
 33995 
       
 33996             case 8:
       
 33997             case "end":
       
 33998               return _context.stop();
       
 33999           }
       
 34000         }
       
 34001       }, _callee);
       
 34002     }));
       
 34003 
       
 34004     return function handleEntitySearch(_x, _x2) {
       
 34005       return _ref2.apply(this, arguments);
       
 34006     };
       
 34007   }();
       
 34008   /**
 34122   /**
 34009    * Cancels editing state and marks that focus may need to be restored after
 34123    * Cancels editing state and marks that focus may need to be restored after
 34010    * the next render, if focus was within the wrapper when editing finished.
 34124    * the next render, if focus was within the wrapper when editing finished.
 34011    */
 34125    */
 34012 
 34126 
 34013 
       
 34014   function stopEditing() {
 34127   function stopEditing() {
 34015     var _wrapperNode$current;
 34128     var _wrapperNode$current;
 34016 
 34129 
 34017     isEndingEditWithFocus.current = !!((_wrapperNode$current = wrapperNode.current) === null || _wrapperNode$current === void 0 ? void 0 : _wrapperNode$current.contains(document.activeElement));
 34130     isEndingEditWithFocus.current = !!((_wrapperNode$current = wrapperNode.current) !== null && _wrapperNode$current !== void 0 && _wrapperNode$current.contains(wrapperNode.current.ownerDocument.activeElement));
 34018     setIsEditingLink(false);
 34131     setIsEditingLink(false);
 34019   }
 34132   }
 34020   /**
 34133 
 34021    * Determines whether a given value could be a URL. Note this does not
 34134   const {
 34022    * guarantee the value is a URL only that it looks like it might be one. For
 34135     createPage,
 34023    * example, just because a string has `www.` in it doesn't make it a URL,
 34136     isCreatingPage,
 34024    * but it does make it highly likely that it will be so in the context of
 34137     errorMessage
 34025    * creating a link it makes sense to treat it like one.
 34138   } = useCreatePage(createSuggestion);
 34026    *
 34139 
 34027    * @param {string} val the candidate for being URL-like (or not).
 34140   const handleSelectSuggestion = updatedValue => {
 34028    * @return {boolean}   whether or not the value is potentially a URL.
 34141     onChange(updatedValue);
 34029    */
 34142     stopEditing();
 34030 
       
 34031 
       
 34032   function isURLLike(val) {
       
 34033     var isInternal = Object(external_this_lodash_["startsWith"])(val, '#');
       
 34034     return Object(external_this_wp_url_["isURL"])(val) || val && val.includes('www.') || isInternal;
       
 34035   } // Effects
       
 34036 
       
 34037 
       
 34038   var getSearchHandler = Object(external_this_wp_element_["useCallback"])(function (val, args) {
       
 34039     if (!showSuggestions) {
       
 34040       return Promise.resolve([]);
       
 34041     }
       
 34042 
       
 34043     return isURLLike(val) ? handleDirectEntry(val, args) : handleEntitySearch(val, args);
       
 34044   }, [handleDirectEntry, fetchSearchSuggestions]);
       
 34045 
       
 34046   var handleOnCreate = /*#__PURE__*/function () {
       
 34047     var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee2(suggestionTitle) {
       
 34048       var newSuggestion;
       
 34049       return external_this_regeneratorRuntime_default.a.wrap(function _callee2$(_context2) {
       
 34050         while (1) {
       
 34051           switch (_context2.prev = _context2.next) {
       
 34052             case 0:
       
 34053               setIsResolvingLink(true);
       
 34054               setErrorMessage(null);
       
 34055               _context2.prev = 2;
       
 34056               // Make cancellable in order that we can avoid setting State
       
 34057               // if the component unmounts during the call to `createSuggestion`
       
 34058               cancelableCreateSuggestion.current = makeCancelable( // Using Promise.resolve to allow createSuggestion to return a
       
 34059               // non-Promise based value.
       
 34060               Promise.resolve(createSuggestion(suggestionTitle)));
       
 34061               _context2.next = 6;
       
 34062               return cancelableCreateSuggestion.current.promise;
       
 34063 
       
 34064             case 6:
       
 34065               newSuggestion = _context2.sent;
       
 34066               // ********
       
 34067               // NOTE: if the above Promise rejects then code below here will never run
       
 34068               // ********
       
 34069               setIsResolvingLink(false); // Only set link if request is resolved, otherwise enable edit mode.
       
 34070 
       
 34071               if (newSuggestion) {
       
 34072                 onChange(newSuggestion);
       
 34073                 stopEditing();
       
 34074               } else {
       
 34075                 setIsEditingLink(true);
       
 34076               }
       
 34077 
       
 34078               _context2.next = 18;
       
 34079               break;
       
 34080 
       
 34081             case 11:
       
 34082               _context2.prev = 11;
       
 34083               _context2.t0 = _context2["catch"](2);
       
 34084 
       
 34085               if (!(_context2.t0 && _context2.t0.isCanceled)) {
       
 34086                 _context2.next = 15;
       
 34087                 break;
       
 34088               }
       
 34089 
       
 34090               return _context2.abrupt("return");
       
 34091 
       
 34092             case 15:
       
 34093               setErrorMessage(_context2.t0.message || Object(external_this_wp_i18n_["__"])('An unknown error occurred during creation. Please try again.'));
       
 34094               setIsResolvingLink(false);
       
 34095               setIsEditingLink(true);
       
 34096 
       
 34097             case 18:
       
 34098             case "end":
       
 34099               return _context2.stop();
       
 34100           }
       
 34101         }
       
 34102       }, _callee2, null, [[2, 11]]);
       
 34103     }));
       
 34104 
       
 34105     return function handleOnCreate(_x3) {
       
 34106       return _ref3.apply(this, arguments);
       
 34107     };
       
 34108   }();
       
 34109 
       
 34110   var handleSelectSuggestion = function handleSelectSuggestion(suggestion) {
       
 34111     var _value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
       
 34112 
       
 34113     setIsEditingLink(false);
       
 34114 
       
 34115     var __value = link_control_objectSpread({}, _value); // Some direct entries don't have types or IDs, and we still need to clear the previous ones.
       
 34116 
       
 34117 
       
 34118     delete __value.type;
       
 34119     delete __value.id;
       
 34120     onChange(link_control_objectSpread({}, __value, {}, suggestion));
       
 34121   }; // Render Components
       
 34122 
       
 34123 
       
 34124   var renderSearchResults = function renderSearchResults(_ref4) {
       
 34125     var suggestionsListProps = _ref4.suggestionsListProps,
       
 34126         buildSuggestionItemProps = _ref4.buildSuggestionItemProps,
       
 34127         suggestions = _ref4.suggestions,
       
 34128         selectedSuggestion = _ref4.selectedSuggestion,
       
 34129         isLoading = _ref4.isLoading,
       
 34130         isInitialSuggestions = _ref4.isInitialSuggestions;
       
 34131     var resultsListClasses = classnames_default()('block-editor-link-control__search-results', {
       
 34132       'is-loading': isLoading
       
 34133     });
       
 34134     var directLinkEntryTypes = ['url', 'mailto', 'tel', 'internal'];
       
 34135     var isSingleDirectEntryResult = suggestions.length === 1 && directLinkEntryTypes.includes(suggestions[0].type.toLowerCase());
       
 34136     var shouldShowCreateSuggestion = createSuggestion && !isSingleDirectEntryResult && !isInitialSuggestions; // According to guidelines aria-label should be added if the label
       
 34137     // itself is not visible.
       
 34138     // See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role
       
 34139 
       
 34140     var searchResultsLabelId = "block-editor-link-control-search-results-label-".concat(instanceId);
       
 34141     var labelText = isInitialSuggestions ? Object(external_this_wp_i18n_["__"])('Recently updated') : Object(external_this_wp_i18n_["sprintf"])(
       
 34142     /* translators: %s: search term. */
       
 34143     Object(external_this_wp_i18n_["__"])('Search results for "%s"'), inputValue); // VisuallyHidden rightly doesn't accept custom classNames
       
 34144     // so we conditionally render it as a wrapper to visually hide the label
       
 34145     // when that is required.
       
 34146 
       
 34147     var searchResultsLabel = Object(external_this_wp_element_["createElement"])(isInitialSuggestions ? external_this_wp_element_["Fragment"] : external_this_wp_components_["VisuallyHidden"], {}, // empty props
       
 34148     Object(external_this_wp_element_["createElement"])("span", {
       
 34149       className: "block-editor-link-control__search-results-label",
       
 34150       id: searchResultsLabelId
       
 34151     }, labelText));
       
 34152     return Object(external_this_wp_element_["createElement"])("div", {
       
 34153       className: "block-editor-link-control__search-results-wrapper"
       
 34154     }, searchResultsLabel, Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, suggestionsListProps, {
       
 34155       className: resultsListClasses,
       
 34156       "aria-labelledby": searchResultsLabelId
       
 34157     }), suggestions.map(function (suggestion, index) {
       
 34158       if (shouldShowCreateSuggestion && CREATE_TYPE === suggestion.type) {
       
 34159         return Object(external_this_wp_element_["createElement"])(search_create_button, {
       
 34160           searchTerm: inputValue,
       
 34161           onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee3() {
       
 34162             return external_this_regeneratorRuntime_default.a.wrap(function _callee3$(_context3) {
       
 34163               while (1) {
       
 34164                 switch (_context3.prev = _context3.next) {
       
 34165                   case 0:
       
 34166                     _context3.next = 2;
       
 34167                     return handleOnCreate(suggestion.title);
       
 34168 
       
 34169                   case 2:
       
 34170                   case "end":
       
 34171                     return _context3.stop();
       
 34172                 }
       
 34173               }
       
 34174             }, _callee3);
       
 34175           })) // Intentionally only using `type` here as
       
 34176           // the constant is enough to uniquely
       
 34177           // identify the single "CREATE" suggestion.
       
 34178           ,
       
 34179           key: suggestion.type,
       
 34180           itemProps: buildSuggestionItemProps(suggestion, index),
       
 34181           isSelected: index === selectedSuggestion
       
 34182         });
       
 34183       } // If we're not handling "Create" suggestions above then
       
 34184       // we don't want them in the main results so exit early
       
 34185 
       
 34186 
       
 34187       if (CREATE_TYPE === suggestion.type) {
       
 34188         return null;
       
 34189       }
       
 34190 
       
 34191       return Object(external_this_wp_element_["createElement"])(search_item, {
       
 34192         key: "".concat(suggestion.id, "-").concat(suggestion.type),
       
 34193         itemProps: buildSuggestionItemProps(suggestion, index),
       
 34194         suggestion: suggestion,
       
 34195         index: index,
       
 34196         onClick: function onClick() {
       
 34197           stopEditing();
       
 34198           onChange(link_control_objectSpread({}, value, {}, suggestion));
       
 34199         },
       
 34200         isSelected: index === selectedSuggestion,
       
 34201         isURL: directLinkEntryTypes.includes(suggestion.type.toLowerCase()),
       
 34202         searchTerm: inputValue
       
 34203       });
       
 34204     })));
       
 34205   };
 34143   };
 34206 
 34144 
 34207   return Object(external_this_wp_element_["createElement"])("div", {
 34145   return Object(external_wp_element_["createElement"])("div", {
 34208     tabIndex: -1,
 34146     tabIndex: -1,
 34209     ref: wrapperNode,
 34147     ref: wrapperNode,
 34210     className: "block-editor-link-control"
 34148     className: "block-editor-link-control"
 34211   }, isResolvingLink && Object(external_this_wp_element_["createElement"])("div", {
 34149   }, isCreatingPage && Object(external_wp_element_["createElement"])("div", {
 34212     className: "block-editor-link-control__loading"
 34150     className: "block-editor-link-control__loading"
 34213   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null), " ", Object(external_this_wp_i18n_["__"])('Creating'), "\u2026"), (isEditingLink || !value) && !isResolvingLink && Object(external_this_wp_element_["createElement"])(search_input, {
 34151   }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), " ", Object(external_wp_i18n_["__"])('Creating'), "\u2026"), (isEditingLink || !value) && !isCreatingPage && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
       
 34152     className: "block-editor-link-control__search-input-wrapper"
       
 34153   }, Object(external_wp_element_["createElement"])(search_input, {
       
 34154     currentLink: value,
       
 34155     className: "block-editor-link-control__search-input",
 34214     placeholder: searchInputPlaceholder,
 34156     placeholder: searchInputPlaceholder,
 34215     value: inputValue,
 34157     value: currentInputValue,
 34216     onChange: onInputChange,
 34158     withCreateSuggestion: withCreateSuggestion,
 34217     onSelect: /*#__PURE__*/function () {
 34159     onCreateSuggestion: createPage,
 34218       var _ref6 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee4(suggestion) {
 34160     onChange: setInternalInputValue,
 34219         return external_this_regeneratorRuntime_default.a.wrap(function _callee4$(_context4) {
 34161     onSelect: handleSelectSuggestion,
 34220           while (1) {
       
 34221             switch (_context4.prev = _context4.next) {
       
 34222               case 0:
       
 34223                 if (!(CREATE_TYPE === suggestion.type)) {
       
 34224                   _context4.next = 5;
       
 34225                   break;
       
 34226                 }
       
 34227 
       
 34228                 _context4.next = 3;
       
 34229                 return handleOnCreate(inputValue);
       
 34230 
       
 34231               case 3:
       
 34232                 _context4.next = 6;
       
 34233                 break;
       
 34234 
       
 34235               case 5:
       
 34236                 if (!noDirectEntry || Object.keys(suggestion).length > 1) {
       
 34237                   handleSelectSuggestion(suggestion, value);
       
 34238                   stopEditing();
       
 34239                 }
       
 34240 
       
 34241               case 6:
       
 34242               case "end":
       
 34243                 return _context4.stop();
       
 34244             }
       
 34245           }
       
 34246         }, _callee4);
       
 34247       }));
       
 34248 
       
 34249       return function (_x4) {
       
 34250         return _ref6.apply(this, arguments);
       
 34251       };
       
 34252     }(),
       
 34253     renderSuggestions: showSuggestions ? renderSearchResults : null,
       
 34254     fetchSuggestions: getSearchHandler,
       
 34255     showInitialSuggestions: showInitialSuggestions,
 34162     showInitialSuggestions: showInitialSuggestions,
 34256     errorMessage: errorMessage
 34163     allowDirectEntry: !noDirectEntry,
 34257   }), value && !isEditingLink && !isResolvingLink && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
 34164     showSuggestions: showSuggestions,
 34258     "aria-label": Object(external_this_wp_i18n_["__"])('Currently selected'),
 34165     suggestionsQuery: suggestionsQuery,
 34259     "aria-selected": "true",
 34166     withURLSuggestion: !noURLSuggestion,
 34260     className: classnames_default()('block-editor-link-control__search-item', {
 34167     createSuggestionButtonText: createSuggestionButtonText
 34261       'is-current': true
 34168   }, Object(external_wp_element_["createElement"])("div", {
 34262     })
 34169     className: "block-editor-link-control__search-actions"
 34263   }, Object(external_this_wp_element_["createElement"])("span", {
 34170   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 34264     className: "block-editor-link-control__search-item-header"
 34171     type: "submit",
 34265   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
 34172     label: Object(external_wp_i18n_["__"])('Submit'),
 34266     className: "block-editor-link-control__search-item-title",
 34173     icon: keyboard_return["a" /* default */],
 34267     href: value.url
 34174     className: "block-editor-link-control__search-submit"
 34268   }, value && value.title || displayURL), value && value.title && Object(external_this_wp_element_["createElement"])("span", {
 34175   })))), errorMessage && Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], {
 34269     className: "block-editor-link-control__search-item-info"
 34176     className: "block-editor-link-control__search-error",
 34270   }, displayURL)), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 34177     status: "error",
 34271     isSecondary: true,
 34178     isDismissible: false
 34272     onClick: function onClick() {
 34179   }, errorMessage)), value && !isEditingLink && !isCreatingPage && Object(external_wp_element_["createElement"])(LinkPreview, {
 34273       return setIsEditingLink(true);
 34180     value: value,
 34274     },
 34181     onEditClick: () => setIsEditingLink(true)
 34275     className: "block-editor-link-control__search-item-action"
 34182   }), Object(external_wp_element_["createElement"])(settings_drawer, {
 34276   }, Object(external_this_wp_i18n_["__"])('Edit')), Object(external_this_wp_element_["createElement"])(ViewerSlot, {
       
 34277     fillProps: value
       
 34278   }))), Object(external_this_wp_element_["createElement"])(settings_drawer, {
       
 34279     value: value,
 34183     value: value,
 34280     settings: settings,
 34184     settings: settings,
 34281     onChange: onChange
 34185     onChange: onChange
 34282   }));
 34186   }));
 34283 }
 34187 }
 34284 
 34188 
 34285 LinkControl.ViewerFill = ViewerFill;
 34189 LinkControl.ViewerFill = ViewerFill;
 34286 /* harmony default export */ var link_control = (LinkControl);
 34190 /* harmony default export */ var link_control = (LinkControl);
 34287 
 34191 
 34288 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/media.js
 34192 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/media.js
 34289 
 34193 var library_media = __webpack_require__("rH4q");
 34290 
       
 34291 /**
       
 34292  * WordPress dependencies
       
 34293  */
       
 34294 
       
 34295 var media_media = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
       
 34296   xmlns: "http://www.w3.org/2000/svg",
       
 34297   viewBox: "-2 -2 24 24"
       
 34298 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
       
 34299   d: "M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z"
       
 34300 }));
       
 34301 /* harmony default export */ var library_media = (media_media);
       
 34302 
 34194 
 34303 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js
 34195 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js
 34304 var upload = __webpack_require__(204);
 34196 var upload = __webpack_require__("NTP4");
 34305 
 34197 
 34306 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/media-upload/index.js
 34198 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/media-upload/index.js
 34307 /**
 34199 /**
 34308  * WordPress dependencies
 34200  * WordPress dependencies
 34309  */
 34201  */
 34314  * it provides a way to have it overridden with the `editor.MediaUpload` filter.
 34206  * it provides a way to have it overridden with the `editor.MediaUpload` filter.
 34315  *
 34207  *
 34316  * @return {WPComponent} The component to be rendered.
 34208  * @return {WPComponent} The component to be rendered.
 34317  */
 34209  */
 34318 
 34210 
 34319 var MediaUpload = function MediaUpload() {
 34211 const MediaUpload = () => null;
 34320   return null;
 34212 /**
 34321 };
 34213  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md
 34322 /**
 34214  */
 34323  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md
 34215 
 34324  */
 34216 
 34325 
 34217 /* harmony default export */ var media_upload = (Object(external_wp_components_["withFilters"])('editor.MediaUpload')(MediaUpload));
 34326 
       
 34327 /* harmony default export */ var media_upload = (Object(external_this_wp_components_["withFilters"])('editor.MediaUpload')(MediaUpload));
       
 34328 
 34218 
 34329 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/media-upload/check.js
 34219 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/media-upload/check.js
 34330 /**
 34220 /**
 34331  * WordPress dependencies
 34221  * WordPress dependencies
 34332  */
 34222  */
 34333 
 34223 
 34334 function MediaUploadCheck(_ref) {
 34224 /**
 34335   var hasUploadPermissions = _ref.hasUploadPermissions,
 34225  * Internal dependencies
 34336       _ref$fallback = _ref.fallback,
 34226  */
 34337       fallback = _ref$fallback === void 0 ? null : _ref$fallback,
 34227 
 34338       children = _ref.children;
 34228 
       
 34229 function MediaUploadCheck({
       
 34230   fallback = null,
       
 34231   children
       
 34232 }) {
       
 34233   const hasUploadPermissions = Object(external_wp_data_["useSelect"])(select => {
       
 34234     const {
       
 34235       getSettings
       
 34236     } = select(store);
       
 34237     return !!getSettings().mediaUpload;
       
 34238   }, []);
 34339   return hasUploadPermissions ? children : fallback;
 34239   return hasUploadPermissions ? children : fallback;
 34340 }
 34240 }
 34341 /**
 34241 /**
 34342  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md
 34242  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md
 34343  */
 34243  */
 34344 
 34244 
 34345 /* harmony default export */ var check = (Object(external_this_wp_data_["withSelect"])(function (select) {
 34245 /* harmony default export */ var check = (MediaUploadCheck);
 34346   var _select = select('core/block-editor'),
       
 34347       getSettings = _select.getSettings;
       
 34348 
       
 34349   return {
       
 34350     hasUploadPermissions: !!getSettings().mediaUpload
       
 34351   };
       
 34352 })(MediaUploadCheck));
       
 34353 
 34246 
 34354 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/media-replace-flow/index.js
 34247 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/media-replace-flow/index.js
 34355 
 34248 
 34356 
 34249 
 34357 
       
 34358 /**
 34250 /**
 34359  * External dependencies
 34251  * External dependencies
 34360  */
 34252  */
 34361 
 34253 
 34362 /**
 34254 /**
 34369 
 34261 
 34370 
 34262 
 34371 
 34263 
 34372 
 34264 
 34373 
 34265 
       
 34266 
 34374 /**
 34267 /**
 34375  * Internal dependencies
 34268  * Internal dependencies
 34376  */
 34269  */
 34377 
 34270 
 34378 
 34271 
 34379 
 34272 
 34380 
 34273 
 34381 
 34274 
 34382 var media_replace_flow_MediaReplaceFlow = function MediaReplaceFlow(_ref) {
 34275 
 34383   var mediaURL = _ref.mediaURL,
 34276 const MediaReplaceFlow = ({
 34384       mediaId = _ref.mediaId,
 34277   mediaURL,
 34385       allowedTypes = _ref.allowedTypes,
 34278   mediaId,
 34386       accept = _ref.accept,
 34279   allowedTypes,
 34387       onSelect = _ref.onSelect,
 34280   accept,
 34388       onSelectURL = _ref.onSelectURL,
 34281   onSelect,
 34389       _ref$onFilesUpload = _ref.onFilesUpload,
 34282   onSelectURL,
 34390       onFilesUpload = _ref$onFilesUpload === void 0 ? external_this_lodash_["noop"] : _ref$onFilesUpload,
 34283   onFilesUpload = external_lodash_["noop"],
 34391       _ref$name = _ref.name,
 34284   name = Object(external_wp_i18n_["__"])('Replace'),
 34392       name = _ref$name === void 0 ? Object(external_this_wp_i18n_["__"])('Replace') : _ref$name,
 34285   createNotice,
 34393       createNotice = _ref.createNotice,
 34286   removeNotice
 34394       removeNotice = _ref.removeNotice;
 34287 }) => {
 34395 
 34288   const [mediaURLValue, setMediaURLValue] = Object(external_wp_element_["useState"])(mediaURL);
 34396   var _useState = Object(external_this_wp_element_["useState"])(mediaURL),
 34289   const mediaUpload = Object(external_wp_data_["useSelect"])(select => {
 34397       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 34290     return select(store).getSettings().mediaUpload;
 34398       mediaURLValue = _useState2[0],
       
 34399       setMediaURLValue = _useState2[1];
       
 34400 
       
 34401   var mediaUpload = Object(external_this_wp_data_["useSelect"])(function (select) {
       
 34402     return select('core/block-editor').getSettings().mediaUpload;
       
 34403   }, []);
 34291   }, []);
 34404   var editMediaButtonRef = Object(external_this_wp_element_["createRef"])();
 34292   const editMediaButtonRef = Object(external_wp_element_["createRef"])();
 34405   var errorNoticeID = Object(external_this_lodash_["uniqueId"])('block-editor/media-replace-flow/error-notice/');
 34293   const errorNoticeID = Object(external_lodash_["uniqueId"])('block-editor/media-replace-flow/error-notice/');
 34406 
 34294 
 34407   var onError = function onError(message) {
 34295   const onError = message => {
 34408     var errorElement = document.createElement('div');
 34296     const errorElement = document.createElement('div');
 34409     errorElement.innerHTML = Object(external_this_wp_element_["renderToString"])(message); // The default error contains some HTML that,
 34297     errorElement.innerHTML = Object(external_wp_element_["renderToString"])(message); // The default error contains some HTML that,
 34410     // for example, makes the filename bold.
 34298     // for example, makes the filename bold.
 34411     // The notice, by default, accepts strings only and so
 34299     // The notice, by default, accepts strings only and so
 34412     // we need to remove the html from the error.
 34300     // we need to remove the html from the error.
 34413 
 34301 
 34414     var renderMsg = errorElement.textContent || errorElement.innerText || ''; // We need to set a timeout for showing the notice
 34302     const renderMsg = errorElement.textContent || errorElement.innerText || ''; // We need to set a timeout for showing the notice
 34415     // so that VoiceOver and possibly other screen readers
 34303     // so that VoiceOver and possibly other screen readers
 34416     // can announce the error afer the toolbar button
 34304     // can announce the error afer the toolbar button
 34417     // regains focus once the upload dialog closes.
 34305     // regains focus once the upload dialog closes.
 34418     // Otherwise VO simply skips over the notice and announces
 34306     // Otherwise VO simply skips over the notice and announces
 34419     // the focused element and the open menu.
 34307     // the focused element and the open menu.
 34420 
 34308 
 34421     setTimeout(function () {
 34309     setTimeout(() => {
 34422       createNotice('error', renderMsg, {
 34310       createNotice('error', renderMsg, {
 34423         speak: true,
 34311         speak: true,
 34424         id: errorNoticeID,
 34312         id: errorNoticeID,
 34425         isDismissible: true
 34313         isDismissible: true
 34426       });
 34314       });
 34427     }, 1000);
 34315     }, 1000);
 34428   };
 34316   };
 34429 
 34317 
 34430   var selectMedia = function selectMedia(media) {
 34318   const selectMedia = media => {
 34431     onSelect(media);
 34319     onSelect(media);
 34432     setMediaURLValue(media.url);
 34320     setMediaURLValue(media.url);
 34433     Object(external_this_wp_a11y_["speak"])(Object(external_this_wp_i18n_["__"])('The media file has been replaced'));
 34321     Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('The media file has been replaced'));
 34434     removeNotice(errorNoticeID);
 34322     removeNotice(errorNoticeID);
 34435   };
 34323   };
 34436 
 34324 
 34437   var selectURL = function selectURL(newURL) {
 34325   const selectURL = newURL => {
 34438     onSelectURL(newURL);
 34326     onSelectURL(newURL);
 34439   };
 34327   };
 34440 
 34328 
 34441   var uploadFiles = function uploadFiles(event) {
 34329   const uploadFiles = event => {
 34442     var files = event.target.files;
 34330     const files = event.target.files;
 34443     onFilesUpload(files);
 34331     onFilesUpload(files);
 34444 
 34332 
 34445     var setMedia = function setMedia(_ref2) {
 34333     const setMedia = ([media]) => {
 34446       var _ref3 = Object(slicedToArray["a" /* default */])(_ref2, 1),
       
 34447           media = _ref3[0];
       
 34448 
       
 34449       selectMedia(media);
 34334       selectMedia(media);
 34450     };
 34335     };
 34451 
 34336 
 34452     mediaUpload({
 34337     mediaUpload({
 34453       allowedTypes: allowedTypes,
 34338       allowedTypes,
 34454       filesList: files,
 34339       filesList: files,
 34455       onFileChange: setMedia,
 34340       onFileChange: setMedia,
 34456       onError: onError
 34341       onError
 34457     });
 34342     });
 34458   };
 34343   };
 34459 
 34344 
 34460   var openOnArrowDown = function openOnArrowDown(event) {
 34345   const openOnArrowDown = event => {
 34461     if (event.keyCode === external_this_wp_keycodes_["DOWN"]) {
 34346     if (event.keyCode === external_wp_keycodes_["DOWN"]) {
 34462       event.preventDefault();
 34347       event.preventDefault();
 34463       event.stopPropagation();
 34348       event.stopPropagation();
 34464       event.target.click();
 34349       event.target.click();
 34465     }
 34350     }
 34466   };
 34351   };
 34467 
 34352 
 34468   var POPOVER_PROPS = {
 34353   const POPOVER_PROPS = {
 34469     isAlternate: true
 34354     isAlternate: true
 34470   };
 34355   };
 34471   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
 34356   return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
 34472     popoverProps: POPOVER_PROPS,
 34357     popoverProps: POPOVER_PROPS,
 34473     contentClassName: "block-editor-media-replace-flow__options",
 34358     contentClassName: "block-editor-media-replace-flow__options",
 34474     renderToggle: function renderToggle(_ref4) {
 34359     renderToggle: ({
 34475       var isOpen = _ref4.isOpen,
 34360       isOpen,
 34476           onToggle = _ref4.onToggle;
 34361       onToggle
 34477       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
 34362     }) => Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
 34478         className: "media-replace-flow"
 34363       ref: editMediaButtonRef,
 34479       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
 34364       "aria-expanded": isOpen,
 34480         ref: editMediaButtonRef,
 34365       "aria-haspopup": "true",
 34481         "aria-expanded": isOpen,
 34366       onClick: onToggle,
 34482         onClick: onToggle,
 34367       onKeyDown: openOnArrowDown
 34483         onKeyDown: openOnArrowDown
 34368     }, name),
 34484       }, name));
 34369     renderContent: ({
 34485     },
 34370       onClose
 34486     renderContent: function renderContent(_ref5) {
 34371     }) => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], {
 34487       var onClose = _ref5.onClose;
 34372       className: "block-editor-media-replace-flow__media-upload-menu"
 34488       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NavigableMenu"], {
 34373     }, Object(external_wp_element_["createElement"])(media_upload, {
 34489         className: "block-editor-media-replace-flow__media-upload-menu"
 34374       value: mediaId,
 34490       }, Object(external_this_wp_element_["createElement"])(media_upload, {
 34375       onSelect: media => selectMedia(media),
 34491         value: mediaId,
 34376       allowedTypes: allowedTypes,
 34492         onSelect: function onSelect(media) {
 34377       render: ({
 34493           return selectMedia(media);
 34378         open
 34494         },
 34379       }) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 34495         allowedTypes: allowedTypes,
 34380         icon: library_media["a" /* default */],
 34496         render: function render(_ref6) {
 34381         onClick: open
 34497           var open = _ref6.open;
 34382       }, Object(external_wp_i18n_["__"])('Open Media Library'))
 34498           return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 34383     }), Object(external_wp_element_["createElement"])(check, null, Object(external_wp_element_["createElement"])(external_wp_components_["FormFileUpload"], {
 34499             icon: library_media,
 34384       onChange: event => {
 34500             onClick: open
 34385         uploadFiles(event, onClose);
 34501           }, Object(external_this_wp_i18n_["__"])('Open Media Library'));
 34386       },
 34502         }
 34387       accept: accept,
 34503       }), Object(external_this_wp_element_["createElement"])(check, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["FormFileUpload"], {
 34388       render: ({
 34504         onChange: function onChange(event) {
 34389         openFileDialog
 34505           uploadFiles(event, onClose);
 34390       }) => {
 34506         },
 34391         return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 34507         accept: accept,
 34392           icon: upload["a" /* default */],
 34508         render: function render(_ref7) {
 34393           onClick: () => {
 34509           var openFileDialog = _ref7.openFileDialog;
 34394             openFileDialog();
 34510           return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 34395           }
 34511             icon: upload["a" /* default */],
 34396         }, Object(external_wp_i18n_["__"])('Upload'));
 34512             onClick: function onClick() {
 34397       }
 34513               openFileDialog();
 34398     }))), onSelectURL && // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
 34514             }
 34399     Object(external_wp_element_["createElement"])("form", {
 34515           }, Object(external_this_wp_i18n_["__"])('Upload'));
 34400       className: "block-editor-media-flow__url-input",
 34516         }
 34401       onKeyDown: event => {
 34517       }))), onSelectURL && // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
 34402         if (![external_wp_keycodes_["TAB"], external_wp_keycodes_["ESCAPE"]].includes(event.keyCode)) {
 34518       Object(external_this_wp_element_["createElement"])("form", {
       
 34519         className: "block-editor-media-flow__url-input",
       
 34520         onKeyDown: function onKeyDown(event) {
       
 34521           event.stopPropagation();
       
 34522         },
       
 34523         onKeyPress: function onKeyPress(event) {
       
 34524           event.stopPropagation();
 34403           event.stopPropagation();
 34525         }
 34404         }
 34526       }, Object(external_this_wp_element_["createElement"])("span", {
 34405       },
 34527         className: "block-editor-media-replace-flow__image-url-label"
 34406       onKeyPress: event => {
 34528       }, Object(external_this_wp_i18n_["__"])('Current media URL:')), Object(external_this_wp_element_["createElement"])(link_control, {
 34407         if (![external_wp_keycodes_["TAB"], external_wp_keycodes_["ESCAPE"]].includes(event.keyCode)) {
 34529         value: {
 34408           event.stopPropagation();
 34530           url: mediaURLValue
       
 34531         },
       
 34532         settings: [],
       
 34533         showSuggestions: false,
       
 34534         onChange: function onChange(_ref8) {
       
 34535           var url = _ref8.url;
       
 34536           setMediaURLValue(url);
       
 34537           selectURL(url);
       
 34538           editMediaButtonRef.current.focus();
       
 34539         }
 34409         }
 34540       })));
 34410       }
 34541     }
 34411     }, Object(external_wp_element_["createElement"])("span", {
       
 34412       className: "block-editor-media-replace-flow__image-url-label"
       
 34413     }, Object(external_wp_i18n_["__"])('Current media URL:')), Object(external_wp_element_["createElement"])(link_control, {
       
 34414       value: {
       
 34415         url: mediaURLValue
       
 34416       },
       
 34417       settings: [],
       
 34418       showSuggestions: false,
       
 34419       onChange: ({
       
 34420         url
       
 34421       }) => {
       
 34422         setMediaURLValue(url);
       
 34423         selectURL(url);
       
 34424         editMediaButtonRef.current.focus();
       
 34425       }
       
 34426     })))
 34542   });
 34427   });
 34543 };
 34428 };
 34544 
 34429 
 34545 /* harmony default export */ var media_replace_flow = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
 34430 /* harmony default export */ var media_replace_flow = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withDispatch"])(dispatch => {
 34546   var _dispatch = dispatch('core/notices'),
 34431   const {
 34547       createNotice = _dispatch.createNotice,
 34432     createNotice,
 34548       removeNotice = _dispatch.removeNotice;
 34433     removeNotice
 34549 
 34434   } = dispatch(external_wp_notices_["store"]);
 34550   return {
 34435   return {
 34551     createNotice: createNotice,
 34436     createNotice,
 34552     removeNotice: removeNotice
 34437     removeNotice
 34553   };
 34438   };
 34554 }), Object(external_this_wp_components_["withFilters"])('editor.MediaReplaceFlow')])(media_replace_flow_MediaReplaceFlow));
 34439 }), Object(external_wp_components_["withFilters"])('editor.MediaReplaceFlow')])(MediaReplaceFlow));
 34555 
 34440 
 34556 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
 34441 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules
 34557 var pencil = __webpack_require__(299);
 34442 var library_edit = __webpack_require__("B9Az");
 34558 
 34443 
 34559 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/link-viewer-url.js
 34444 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/link-viewer-url.js
 34560 
 34445 
 34561 
 34446 
 34562 /**
 34447 /**
 34567  * WordPress dependencies
 34452  * WordPress dependencies
 34568  */
 34453  */
 34569 
 34454 
 34570 
 34455 
 34571 
 34456 
 34572 function LinkViewerURL(_ref) {
 34457 function LinkViewerURL({
 34573   var url = _ref.url,
 34458   url,
 34574       urlLabel = _ref.urlLabel,
 34459   urlLabel,
 34575       className = _ref.className;
 34460   className
 34576   var linkClassName = classnames_default()(className, 'block-editor-url-popover__link-viewer-url');
 34461 }) {
       
 34462   const linkClassName = classnames_default()(className, 'block-editor-url-popover__link-viewer-url');
 34577 
 34463 
 34578   if (!url) {
 34464   if (!url) {
 34579     return Object(external_this_wp_element_["createElement"])("span", {
 34465     return Object(external_wp_element_["createElement"])("span", {
 34580       className: linkClassName
 34466       className: linkClassName
 34581     });
 34467     });
 34582   }
 34468   }
 34583 
 34469 
 34584   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
 34470   return Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
 34585     className: linkClassName,
 34471     className: linkClassName,
 34586     href: url
 34472     href: url
 34587   }, urlLabel || Object(external_this_wp_url_["filterURLForDisplay"])(Object(external_this_wp_url_["safeDecodeURI"])(url)));
 34473   }, urlLabel || Object(external_wp_url_["filterURLForDisplay"])(Object(external_wp_url_["safeDecodeURI"])(url)));
 34588 }
 34474 }
 34589 
 34475 
 34590 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/link-viewer.js
 34476 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/link-viewer.js
 34591 
 34477 
 34592 
 34478 
 34593 
 34479 
 34594 
       
 34595 /**
 34480 /**
 34596  * External dependencies
 34481  * External dependencies
 34597  */
 34482  */
 34598 
 34483 
 34599 /**
 34484 /**
 34606 /**
 34491 /**
 34607  * Internal dependencies
 34492  * Internal dependencies
 34608  */
 34493  */
 34609 
 34494 
 34610 
 34495 
 34611 function LinkViewer(_ref) {
 34496 function LinkViewer({
 34612   var className = _ref.className,
 34497   className,
 34613       linkClassName = _ref.linkClassName,
 34498   linkClassName,
 34614       onEditLinkClick = _ref.onEditLinkClick,
 34499   onEditLinkClick,
 34615       url = _ref.url,
 34500   url,
 34616       urlLabel = _ref.urlLabel,
 34501   urlLabel,
 34617       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "linkClassName", "onEditLinkClick", "url", "urlLabel"]);
 34502   ...props
 34618 
 34503 }) {
 34619   return Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
 34504   return Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
 34620     className: classnames_default()('block-editor-url-popover__link-viewer', className)
 34505     className: classnames_default()('block-editor-url-popover__link-viewer', className)
 34621   }, props), Object(external_this_wp_element_["createElement"])(LinkViewerURL, {
 34506   }, props), Object(external_wp_element_["createElement"])(LinkViewerURL, {
 34622     url: url,
 34507     url: url,
 34623     urlLabel: urlLabel,
 34508     urlLabel: urlLabel,
 34624     className: linkClassName
 34509     className: linkClassName
 34625   }), onEditLinkClick && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 34510   }), onEditLinkClick && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 34626     icon: pencil["a" /* default */],
 34511     icon: library_edit["a" /* default */],
 34627     label: Object(external_this_wp_i18n_["__"])('Edit'),
 34512     label: Object(external_wp_i18n_["__"])('Edit'),
 34628     onClick: onEditLinkClick
 34513     onClick: onEditLinkClick
 34629   }));
 34514   }));
 34630 }
 34515 }
 34631 
 34516 
 34632 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/link-editor.js
 34517 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/link-editor.js
 34633 
 34518 
 34634 
 34519 
 34635 
 34520 
 34636 
       
 34637 /**
 34521 /**
 34638  * External dependencies
 34522  * External dependencies
 34639  */
 34523  */
 34640 
 34524 
 34641 /**
 34525 /**
 34648 /**
 34532 /**
 34649  * Internal dependencies
 34533  * Internal dependencies
 34650  */
 34534  */
 34651 
 34535 
 34652 
 34536 
 34653 function LinkEditor(_ref) {
 34537 function LinkEditor({
 34654   var autocompleteRef = _ref.autocompleteRef,
 34538   autocompleteRef,
 34655       className = _ref.className,
 34539   className,
 34656       onChangeInputValue = _ref.onChangeInputValue,
 34540   onChangeInputValue,
 34657       value = _ref.value,
 34541   value,
 34658       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["autocompleteRef", "className", "onChangeInputValue", "value"]);
 34542   ...props
 34659 
 34543 }) {
 34660   return Object(external_this_wp_element_["createElement"])("form", Object(esm_extends["a" /* default */])({
 34544   return Object(external_wp_element_["createElement"])("form", Object(esm_extends["a" /* default */])({
 34661     className: classnames_default()('block-editor-url-popover__link-editor', className)
 34545     className: classnames_default()('block-editor-url-popover__link-editor', className)
 34662   }, props), Object(external_this_wp_element_["createElement"])(url_input, {
 34546   }, props), Object(external_wp_element_["createElement"])(url_input, {
 34663     value: value,
 34547     value: value,
 34664     onChange: onChangeInputValue,
 34548     onChange: onChangeInputValue,
 34665     autocompleteRef: autocompleteRef
 34549     autocompleteRef: autocompleteRef
 34666   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 34550   }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 34667     icon: keyboard_return["a" /* default */],
 34551     icon: keyboard_return["a" /* default */],
 34668     label: Object(external_this_wp_i18n_["__"])('Apply'),
 34552     label: Object(external_wp_i18n_["__"])('Apply'),
 34669     type: "submit"
 34553     type: "submit"
 34670   }));
 34554   }));
 34671 }
 34555 }
 34672 
 34556 
 34673 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/index.js
 34557 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/index.js
 34674 
 34558 
 34675 
 34559 
 34676 
 34560 
 34677 
       
 34678 
       
 34679 
       
 34680 
       
 34681 
       
 34682 
       
 34683 
       
 34684 function url_popover_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (url_popover_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 34685 
       
 34686 function url_popover_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 34687 
       
 34688 /**
 34561 /**
 34689  * WordPress dependencies
 34562  * WordPress dependencies
 34690  */
 34563  */
 34691 
 34564 
 34692 
 34565 
 34697  */
 34570  */
 34698 
 34571 
 34699 
 34572 
 34700 
 34573 
 34701 
 34574 
 34702 var url_popover_URLPopover = /*#__PURE__*/function (_Component) {
 34575 function URLPopover({
 34703   Object(inherits["a" /* default */])(URLPopover, _Component);
 34576   additionalControls,
 34704 
 34577   children,
 34705   var _super = url_popover_createSuper(URLPopover);
 34578   renderSettings,
 34706 
 34579   position = 'bottom center',
 34707   function URLPopover() {
 34580   focusOnMount = 'firstElement',
 34708     var _this;
 34581   ...popoverProps
 34709 
 34582 }) {
 34710     Object(classCallCheck["a" /* default */])(this, URLPopover);
 34583   const [isSettingsExpanded, setIsSettingsExpanded] = Object(external_wp_element_["useState"])(false);
 34711 
 34584   const showSettings = !!renderSettings && isSettingsExpanded;
 34712     _this = _super.apply(this, arguments);
 34585 
 34713     _this.toggleSettingsVisibility = _this.toggleSettingsVisibility.bind(Object(assertThisInitialized["a" /* default */])(_this));
 34586   const toggleSettingsVisibility = () => {
 34714     _this.state = {
 34587     setIsSettingsExpanded(!isSettingsExpanded);
 34715       isSettingsExpanded: false
 34588   };
 34716     };
 34589 
 34717     return _this;
 34590   return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], Object(esm_extends["a" /* default */])({
 34718   }
 34591     className: "block-editor-url-popover",
 34719 
 34592     focusOnMount: focusOnMount,
 34720   Object(createClass["a" /* default */])(URLPopover, [{
 34593     position: position
 34721     key: "toggleSettingsVisibility",
 34594   }, popoverProps), Object(external_wp_element_["createElement"])("div", {
 34722     value: function toggleSettingsVisibility() {
 34595     className: "block-editor-url-popover__input-container"
 34723       this.setState({
 34596   }, Object(external_wp_element_["createElement"])("div", {
 34724         isSettingsExpanded: !this.state.isSettingsExpanded
 34597     className: "block-editor-url-popover__row"
 34725       });
 34598   }, children, !!renderSettings && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 34726     }
 34599     className: "block-editor-url-popover__settings-toggle",
 34727   }, {
 34600     icon: chevron_down["a" /* default */],
 34728     key: "render",
 34601     label: Object(external_wp_i18n_["__"])('Link settings'),
 34729     value: function render() {
 34602     onClick: toggleSettingsVisibility,
 34730       var _this$props = this.props,
 34603     "aria-expanded": isSettingsExpanded
 34731           additionalControls = _this$props.additionalControls,
 34604   })), showSettings && Object(external_wp_element_["createElement"])("div", {
 34732           children = _this$props.children,
 34605     className: "block-editor-url-popover__row block-editor-url-popover__settings"
 34733           renderSettings = _this$props.renderSettings,
 34606   }, renderSettings())), additionalControls && !showSettings && Object(external_wp_element_["createElement"])("div", {
 34734           _this$props$position = _this$props.position,
 34607     className: "block-editor-url-popover__additional-controls"
 34735           position = _this$props$position === void 0 ? 'bottom center' : _this$props$position,
 34608   }, additionalControls));
 34736           _this$props$focusOnMo = _this$props.focusOnMount,
 34609 }
 34737           focusOnMount = _this$props$focusOnMo === void 0 ? 'firstElement' : _this$props$focusOnMo,
 34610 
 34738           popoverProps = Object(objectWithoutProperties["a" /* default */])(_this$props, ["additionalControls", "children", "renderSettings", "position", "focusOnMount"]);
 34611 URLPopover.LinkEditor = LinkEditor;
 34739 
 34612 URLPopover.LinkViewer = LinkViewer;
 34740       var isSettingsExpanded = this.state.isSettingsExpanded;
 34613 /**
 34741       var showSettings = !!renderSettings && isSettingsExpanded;
 34614  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-popover/README.md
 34742       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Popover"], Object(esm_extends["a" /* default */])({
 34615  */
 34743         className: "block-editor-url-popover",
 34616 
 34744         focusOnMount: focusOnMount,
 34617 /* harmony default export */ var url_popover = (URLPopover);
 34745         position: position
       
 34746       }, popoverProps), Object(external_this_wp_element_["createElement"])("div", {
       
 34747         className: "block-editor-url-popover__input-container"
       
 34748       }, Object(external_this_wp_element_["createElement"])("div", {
       
 34749         className: "block-editor-url-popover__row"
       
 34750       }, children, !!renderSettings && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 34751         className: "block-editor-url-popover__settings-toggle",
       
 34752         icon: chevron_down["a" /* default */],
       
 34753         label: Object(external_this_wp_i18n_["__"])('Link settings'),
       
 34754         onClick: this.toggleSettingsVisibility,
       
 34755         "aria-expanded": isSettingsExpanded
       
 34756       })), showSettings && Object(external_this_wp_element_["createElement"])("div", {
       
 34757         className: "block-editor-url-popover__row block-editor-url-popover__settings"
       
 34758       }, renderSettings())), additionalControls && !showSettings && Object(external_this_wp_element_["createElement"])("div", {
       
 34759         className: "block-editor-url-popover__additional-controls"
       
 34760       }, additionalControls));
       
 34761     }
       
 34762   }]);
       
 34763 
       
 34764   return URLPopover;
       
 34765 }(external_this_wp_element_["Component"]);
       
 34766 
       
 34767 url_popover_URLPopover.LinkEditor = LinkEditor;
       
 34768 url_popover_URLPopover.LinkViewer = LinkViewer;
       
 34769 /**
       
 34770  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-popover/README.md
       
 34771  */
       
 34772 
       
 34773 /* harmony default export */ var url_popover = (url_popover_URLPopover);
       
 34774 
 34618 
 34775 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/media-placeholder/index.js
 34619 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/media-placeholder/index.js
 34776 
 34620 
 34777 
 34621 
 34778 
       
 34779 
       
 34780 
       
 34781 
       
 34782 
       
 34783 
       
 34784 
       
 34785 function media_placeholder_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (media_placeholder_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 34786 
       
 34787 function media_placeholder_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 34788 
       
 34789 /**
 34622 /**
 34790  * External dependencies
 34623  * External dependencies
 34791  */
 34624  */
 34792 
 34625 
 34793 
 34626 
 34799 
 34632 
 34800 
 34633 
 34801 
 34634 
 34802 
 34635 
 34803 
 34636 
 34804 
       
 34805 /**
 34637 /**
 34806  * Internal dependencies
 34638  * Internal dependencies
 34807  */
 34639  */
 34808 
 34640 
 34809 
 34641 
 34810 
 34642 
 34811 
 34643 
 34812 
 34644 
 34813 var media_placeholder_InsertFromURLPopover = function InsertFromURLPopover(_ref) {
 34645 
 34814   var src = _ref.src,
 34646 const InsertFromURLPopover = ({
 34815       onChange = _ref.onChange,
 34647   src,
 34816       onSubmit = _ref.onSubmit,
 34648   onChange,
 34817       onClose = _ref.onClose;
 34649   onSubmit,
 34818   return Object(external_this_wp_element_["createElement"])(url_popover, {
 34650   onClose
 34819     onClose: onClose
 34651 }) => Object(external_wp_element_["createElement"])(url_popover, {
 34820   }, Object(external_this_wp_element_["createElement"])("form", {
 34652   onClose: onClose
 34821     className: "block-editor-media-placeholder__url-input-form",
 34653 }, Object(external_wp_element_["createElement"])("form", {
 34822     onSubmit: onSubmit
 34654   className: "block-editor-media-placeholder__url-input-form",
 34823   }, Object(external_this_wp_element_["createElement"])("input", {
 34655   onSubmit: onSubmit
 34824     className: "block-editor-media-placeholder__url-input-field",
 34656 }, Object(external_wp_element_["createElement"])("input", {
 34825     type: "url",
 34657   className: "block-editor-media-placeholder__url-input-field",
 34826     "aria-label": Object(external_this_wp_i18n_["__"])('URL'),
 34658   type: "url",
 34827     placeholder: Object(external_this_wp_i18n_["__"])('Paste or type URL'),
 34659   "aria-label": Object(external_wp_i18n_["__"])('URL'),
 34828     onChange: onChange,
 34660   placeholder: Object(external_wp_i18n_["__"])('Paste or type URL'),
 34829     value: src
 34661   onChange: onChange,
 34830   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 34662   value: src
 34831     className: "block-editor-media-placeholder__url-input-submit-button",
 34663 }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 34832     icon: keyboard_return["a" /* default */],
 34664   className: "block-editor-media-placeholder__url-input-submit-button",
 34833     label: Object(external_this_wp_i18n_["__"])('Apply'),
 34665   icon: keyboard_return["a" /* default */],
 34834     type: "submit"
 34666   label: Object(external_wp_i18n_["__"])('Apply'),
 34835   })));
 34667   type: "submit"
 34836 };
 34668 })));
 34837 
 34669 
 34838 var media_placeholder_MediaPlaceholder = /*#__PURE__*/function (_Component) {
 34670 function MediaPlaceholder({
 34839   Object(inherits["a" /* default */])(MediaPlaceholder, _Component);
 34671   value = {},
 34840 
 34672   allowedTypes,
 34841   var _super = media_placeholder_createSuper(MediaPlaceholder);
 34673   className,
 34842 
 34674   icon,
 34843   function MediaPlaceholder() {
 34675   labels = {},
 34844     var _this;
 34676   mediaPreview,
 34845 
 34677   notices,
 34846     Object(classCallCheck["a" /* default */])(this, MediaPlaceholder);
 34678   isAppender,
 34847 
 34679   accept,
 34848     _this = _super.apply(this, arguments);
 34680   addToGallery,
 34849     _this.state = {
 34681   multiple = false,
 34850       src: '',
 34682   dropZoneUIOnly,
 34851       isURLInputVisible: false
 34683   disableDropZone,
 34852     };
 34684   disableMediaButtons,
 34853     _this.onChangeSrc = _this.onChangeSrc.bind(Object(assertThisInitialized["a" /* default */])(_this));
 34685   onError,
 34854     _this.onSubmitSrc = _this.onSubmitSrc.bind(Object(assertThisInitialized["a" /* default */])(_this));
 34686   onSelect,
 34855     _this.onUpload = _this.onUpload.bind(Object(assertThisInitialized["a" /* default */])(_this));
 34687   onCancel,
 34856     _this.onFilesUpload = _this.onFilesUpload.bind(Object(assertThisInitialized["a" /* default */])(_this));
 34688   onSelectURL,
 34857     _this.openURLInput = _this.openURLInput.bind(Object(assertThisInitialized["a" /* default */])(_this));
 34689   onDoubleClick,
 34858     _this.closeURLInput = _this.closeURLInput.bind(Object(assertThisInitialized["a" /* default */])(_this));
 34690   onFilesPreUpload = external_lodash_["noop"],
 34859     return _this;
 34691   onHTMLDrop = external_lodash_["noop"],
 34860   }
 34692   children
 34861 
 34693 }) {
 34862   Object(createClass["a" /* default */])(MediaPlaceholder, [{
 34694   const mediaUpload = Object(external_wp_data_["useSelect"])(select => {
 34863     key: "onlyAllowsImages",
 34695     const {
 34864     value: function onlyAllowsImages() {
 34696       getSettings
 34865       var allowedTypes = this.props.allowedTypes;
 34697     } = select(store);
 34866 
 34698     return getSettings().mediaUpload;
 34867       if (!allowedTypes) {
 34699   }, []);
 34868         return false;
 34700   const [src, setSrc] = Object(external_wp_element_["useState"])('');
       
 34701   const [isURLInputVisible, setIsURLInputVisible] = Object(external_wp_element_["useState"])(false);
       
 34702   Object(external_wp_element_["useEffect"])(() => {
       
 34703     var _value$src;
       
 34704 
       
 34705     setSrc((_value$src = value === null || value === void 0 ? void 0 : value.src) !== null && _value$src !== void 0 ? _value$src : '');
       
 34706   }, [value === null || value === void 0 ? void 0 : value.src]);
       
 34707 
       
 34708   const onlyAllowsImages = () => {
       
 34709     if (!allowedTypes || allowedTypes.length === 0) {
       
 34710       return false;
       
 34711     }
       
 34712 
       
 34713     return allowedTypes.every(allowedType => allowedType === 'image' || allowedType.startsWith('image/'));
       
 34714   };
       
 34715 
       
 34716   const onChangeSrc = event => {
       
 34717     setSrc(event.target.value);
       
 34718   };
       
 34719 
       
 34720   const openURLInput = () => {
       
 34721     setIsURLInputVisible(true);
       
 34722   };
       
 34723 
       
 34724   const closeURLInput = () => {
       
 34725     setIsURLInputVisible(false);
       
 34726   };
       
 34727 
       
 34728   const onSubmitSrc = event => {
       
 34729     event.preventDefault();
       
 34730 
       
 34731     if (src && onSelectURL) {
       
 34732       onSelectURL(src);
       
 34733       closeURLInput();
       
 34734     }
       
 34735   };
       
 34736 
       
 34737   const onFilesUpload = files => {
       
 34738     onFilesPreUpload(files);
       
 34739     let setMedia;
       
 34740 
       
 34741     if (multiple) {
       
 34742       if (addToGallery) {
       
 34743         // Since the setMedia function runs multiple times per upload group
       
 34744         // and is passed newMedia containing every item in its group each time, we must
       
 34745         // filter out whatever this upload group had previously returned to the
       
 34746         // gallery before adding and returning the image array with replacement newMedia
       
 34747         // values.
       
 34748         // Define an array to store urls from newMedia between subsequent function calls.
       
 34749         let lastMediaPassed = [];
       
 34750 
       
 34751         setMedia = newMedia => {
       
 34752           // Remove any images this upload group is responsible for (lastMediaPassed).
       
 34753           // Their replacements are contained in newMedia.
       
 34754           const filteredMedia = (value !== null && value !== void 0 ? value : []).filter(item => {
       
 34755             // If Item has id, only remove it if lastMediaPassed has an item with that id.
       
 34756             if (item.id) {
       
 34757               return !lastMediaPassed.some( // Be sure to convert to number for comparison.
       
 34758               ({
       
 34759                 id
       
 34760               }) => Number(id) === Number(item.id));
       
 34761             } // Compare transient images via .includes since gallery may append extra info onto the url.
       
 34762 
       
 34763 
       
 34764             return !lastMediaPassed.some(({
       
 34765               urlSlug
       
 34766             }) => item.url.includes(urlSlug));
       
 34767           }); // Return the filtered media array along with newMedia.
       
 34768 
       
 34769           onSelect(filteredMedia.concat(newMedia)); // Reset lastMediaPassed and set it with ids and urls from newMedia.
       
 34770 
       
 34771           lastMediaPassed = newMedia.map(media => {
       
 34772             // Add everything up to '.fileType' to compare via .includes.
       
 34773             const cutOffIndex = media.url.lastIndexOf('.');
       
 34774             const urlSlug = media.url.slice(0, cutOffIndex);
       
 34775             return {
       
 34776               id: media.id,
       
 34777               urlSlug
       
 34778             };
       
 34779           });
       
 34780         };
       
 34781       } else {
       
 34782         setMedia = onSelect;
 34869       }
 34783       }
 34870 
 34784     } else {
 34871       return Object(external_this_lodash_["every"])(allowedTypes, function (allowedType) {
 34785       setMedia = ([media]) => onSelect(media);
 34872         return allowedType === 'image' || Object(external_this_lodash_["startsWith"])(allowedType, 'image/');
 34786     }
 34873       });
 34787 
 34874     }
 34788     mediaUpload({
 34875   }, {
 34789       allowedTypes,
 34876     key: "componentDidMount",
 34790       filesList: files,
 34877     value: function componentDidMount() {
 34791       onFileChange: setMedia,
 34878       this.setState({
 34792       onError
 34879         src: Object(external_this_lodash_["get"])(this.props.value, ['src'], '')
 34793     });
 34880       });
 34794   };
 34881     }
 34795 
 34882   }, {
 34796   const onUpload = event => {
 34883     key: "componentDidUpdate",
 34797     onFilesUpload(event.target.files);
 34884     value: function componentDidUpdate(prevProps) {
 34798   };
 34885       if (Object(external_this_lodash_["get"])(prevProps.value, ['src'], '') !== Object(external_this_lodash_["get"])(this.props.value, ['src'], '')) {
 34799 
 34886         this.setState({
 34800   const renderPlaceholder = (content, onClick) => {
 34887           src: Object(external_this_lodash_["get"])(this.props.value, ['src'], '')
 34801     let {
 34888         });
 34802       instructions,
 34889       }
 34803       title
 34890     }
 34804     } = labels;
 34891   }, {
 34805 
 34892     key: "onChangeSrc",
 34806     if (!mediaUpload && !onSelectURL) {
 34893     value: function onChangeSrc(event) {
 34807       instructions = Object(external_wp_i18n_["__"])('To edit this block, you need permission to upload media.');
 34894       this.setState({
 34808     }
 34895         src: event.target.value
 34809 
 34896       });
 34810     if (instructions === undefined || title === undefined) {
 34897     }
 34811       const typesAllowed = allowedTypes !== null && allowedTypes !== void 0 ? allowedTypes : [];
 34898   }, {
 34812       const [firstAllowedType] = typesAllowed;
 34899     key: "onSubmitSrc",
 34813       const isOneType = 1 === typesAllowed.length;
 34900     value: function onSubmitSrc(event) {
 34814       const isAudio = isOneType && 'audio' === firstAllowedType;
 34901       event.preventDefault();
 34815       const isImage = isOneType && 'image' === firstAllowedType;
 34902 
 34816       const isVideo = isOneType && 'video' === firstAllowedType;
 34903       if (this.state.src && this.props.onSelectURL) {
 34817 
 34904         this.props.onSelectURL(this.state.src);
 34818       if (instructions === undefined && mediaUpload) {
 34905         this.closeURLInput();
 34819         instructions = Object(external_wp_i18n_["__"])('Upload a media file or pick one from your media library.');
 34906       }
 34820 
 34907     }
 34821         if (isAudio) {
 34908   }, {
 34822           instructions = Object(external_wp_i18n_["__"])('Upload an audio file, pick one from your media library, or add one with a URL.');
 34909     key: "onUpload",
 34823         } else if (isImage) {
 34910     value: function onUpload(event) {
 34824           instructions = Object(external_wp_i18n_["__"])('Upload an image file, pick one from your media library, or add one with a URL.');
 34911       this.onFilesUpload(event.target.files);
 34825         } else if (isVideo) {
 34912     }
 34826           instructions = Object(external_wp_i18n_["__"])('Upload a video file, pick one from your media library, or add one with a URL.');
 34913   }, {
       
 34914     key: "onFilesUpload",
       
 34915     value: function onFilesUpload(files) {
       
 34916       var _this2 = this;
       
 34917 
       
 34918       var _this$props = this.props,
       
 34919           addToGallery = _this$props.addToGallery,
       
 34920           allowedTypes = _this$props.allowedTypes,
       
 34921           mediaUpload = _this$props.mediaUpload,
       
 34922           multiple = _this$props.multiple,
       
 34923           onError = _this$props.onError,
       
 34924           onSelect = _this$props.onSelect,
       
 34925           _this$props$onFilesPr = _this$props.onFilesPreUpload,
       
 34926           onFilesPreUpload = _this$props$onFilesPr === void 0 ? external_this_lodash_["noop"] : _this$props$onFilesPr;
       
 34927       onFilesPreUpload(files);
       
 34928       var setMedia;
       
 34929 
       
 34930       if (multiple) {
       
 34931         if (addToGallery) {
       
 34932           // To allow changes to a gallery to be made while uploads are in progress
       
 34933           // (including trigging multiple upload groups and removing already in place images),
       
 34934           // we must be able to add newMedia based on the current value of the Gallery
       
 34935           // whenever the setMedia function runs (not destructuring 'value' from props).
       
 34936           // Additionally, since the setMedia function runs multiple times per upload group
       
 34937           // and is passed newMedia containing every item in its group each time, we must
       
 34938           // also filter out whatever this upload group had previously returned to the
       
 34939           // gallery before adding and returning the image array with replacement newMedia
       
 34940           // values.
       
 34941           // Define an array to store urls from newMedia between subsequent function calls.
       
 34942           var lastMediaPassed = [];
       
 34943 
       
 34944           setMedia = function setMedia(newMedia) {
       
 34945             // Remove any images this upload group is responsible for (lastMediaPassed).
       
 34946             // Their replacements are contained in newMedia.
       
 34947             var filteredMedia = (_this2.props.value || []).filter(function (item) {
       
 34948               // If Item has id, only remove it if lastMediaPassed has an item with that id.
       
 34949               if (item.id) {
       
 34950                 return !lastMediaPassed.some( // Be sure to convert to number for comparison.
       
 34951                 function (_ref2) {
       
 34952                   var id = _ref2.id;
       
 34953                   return Number(id) === Number(item.id);
       
 34954                 });
       
 34955               } // Compare transient images via .includes since gallery may append extra info onto the url.
       
 34956 
       
 34957 
       
 34958               return !lastMediaPassed.some(function (_ref3) {
       
 34959                 var urlSlug = _ref3.urlSlug;
       
 34960                 return item.url.includes(urlSlug);
       
 34961               });
       
 34962             }); // Return the filtered media array along with newMedia.
       
 34963 
       
 34964             onSelect(filteredMedia.concat(newMedia)); // Reset lastMediaPassed and set it with ids and urls from newMedia.
       
 34965 
       
 34966             lastMediaPassed = newMedia.map(function (media) {
       
 34967               // Add everything up to '.fileType' to compare via .includes.
       
 34968               var cutOffIndex = media.url.lastIndexOf('.');
       
 34969               var urlSlug = media.url.slice(0, cutOffIndex);
       
 34970               return {
       
 34971                 id: media.id,
       
 34972                 urlSlug: urlSlug
       
 34973               };
       
 34974             });
       
 34975           };
       
 34976         } else {
       
 34977           setMedia = onSelect;
       
 34978         }
       
 34979       } else {
       
 34980         setMedia = function setMedia(_ref4) {
       
 34981           var _ref5 = Object(slicedToArray["a" /* default */])(_ref4, 1),
       
 34982               media = _ref5[0];
       
 34983 
       
 34984           return onSelect(media);
       
 34985         };
       
 34986       }
       
 34987 
       
 34988       mediaUpload({
       
 34989         allowedTypes: allowedTypes,
       
 34990         filesList: files,
       
 34991         onFileChange: setMedia,
       
 34992         onError: onError
       
 34993       });
       
 34994     }
       
 34995   }, {
       
 34996     key: "openURLInput",
       
 34997     value: function openURLInput() {
       
 34998       this.setState({
       
 34999         isURLInputVisible: true
       
 35000       });
       
 35001     }
       
 35002   }, {
       
 35003     key: "closeURLInput",
       
 35004     value: function closeURLInput() {
       
 35005       this.setState({
       
 35006         isURLInputVisible: false
       
 35007       });
       
 35008     }
       
 35009   }, {
       
 35010     key: "renderPlaceholder",
       
 35011     value: function renderPlaceholder(content, onClick) {
       
 35012       var _this$props2 = this.props,
       
 35013           _this$props2$allowedT = _this$props2.allowedTypes,
       
 35014           allowedTypes = _this$props2$allowedT === void 0 ? [] : _this$props2$allowedT,
       
 35015           className = _this$props2.className,
       
 35016           icon = _this$props2.icon,
       
 35017           isAppender = _this$props2.isAppender,
       
 35018           _this$props2$labels = _this$props2.labels,
       
 35019           labels = _this$props2$labels === void 0 ? {} : _this$props2$labels,
       
 35020           onDoubleClick = _this$props2.onDoubleClick,
       
 35021           mediaPreview = _this$props2.mediaPreview,
       
 35022           notices = _this$props2.notices,
       
 35023           onSelectURL = _this$props2.onSelectURL,
       
 35024           mediaUpload = _this$props2.mediaUpload,
       
 35025           children = _this$props2.children;
       
 35026       var instructions = labels.instructions;
       
 35027       var title = labels.title;
       
 35028 
       
 35029       if (!mediaUpload && !onSelectURL) {
       
 35030         instructions = Object(external_this_wp_i18n_["__"])('To edit this block, you need permission to upload media.');
       
 35031       }
       
 35032 
       
 35033       if (instructions === undefined || title === undefined) {
       
 35034         var isOneType = 1 === allowedTypes.length;
       
 35035         var isAudio = isOneType && 'audio' === allowedTypes[0];
       
 35036         var isImage = isOneType && 'image' === allowedTypes[0];
       
 35037         var isVideo = isOneType && 'video' === allowedTypes[0];
       
 35038 
       
 35039         if (instructions === undefined && mediaUpload) {
       
 35040           instructions = Object(external_this_wp_i18n_["__"])('Upload a media file or pick one from your media library.');
       
 35041 
       
 35042           if (isAudio) {
       
 35043             instructions = Object(external_this_wp_i18n_["__"])('Upload an audio file, pick one from your media library, or add one with a URL.');
       
 35044           } else if (isImage) {
       
 35045             instructions = Object(external_this_wp_i18n_["__"])('Upload an image file, pick one from your media library, or add one with a URL.');
       
 35046           } else if (isVideo) {
       
 35047             instructions = Object(external_this_wp_i18n_["__"])('Upload a video file, pick one from your media library, or add one with a URL.');
       
 35048           }
       
 35049         }
       
 35050 
       
 35051         if (title === undefined) {
       
 35052           title = Object(external_this_wp_i18n_["__"])('Media');
       
 35053 
       
 35054           if (isAudio) {
       
 35055             title = Object(external_this_wp_i18n_["__"])('Audio');
       
 35056           } else if (isImage) {
       
 35057             title = Object(external_this_wp_i18n_["__"])('Image');
       
 35058           } else if (isVideo) {
       
 35059             title = Object(external_this_wp_i18n_["__"])('Video');
       
 35060           }
       
 35061         }
 34827         }
 35062       }
 34828       }
 35063 
 34829 
 35064       var placeholderClassName = classnames_default()('block-editor-media-placeholder', className, {
 34830       if (title === undefined) {
 35065         'is-appender': isAppender
 34831         title = Object(external_wp_i18n_["__"])('Media');
       
 34832 
       
 34833         if (isAudio) {
       
 34834           title = Object(external_wp_i18n_["__"])('Audio');
       
 34835         } else if (isImage) {
       
 34836           title = Object(external_wp_i18n_["__"])('Image');
       
 34837         } else if (isVideo) {
       
 34838           title = Object(external_wp_i18n_["__"])('Video');
       
 34839         }
       
 34840       }
       
 34841     }
       
 34842 
       
 34843     const placeholderClassName = classnames_default()('block-editor-media-placeholder', className, {
       
 34844       'is-appender': isAppender
       
 34845     });
       
 34846     return Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
       
 34847       icon: icon,
       
 34848       label: title,
       
 34849       instructions: instructions,
       
 34850       className: placeholderClassName,
       
 34851       notices: notices,
       
 34852       onClick: onClick,
       
 34853       onDoubleClick: onDoubleClick,
       
 34854       preview: mediaPreview
       
 34855     }, content, children);
       
 34856   };
       
 34857 
       
 34858   const renderDropZone = () => {
       
 34859     if (disableDropZone) {
       
 34860       return null;
       
 34861     }
       
 34862 
       
 34863     return Object(external_wp_element_["createElement"])(external_wp_components_["DropZone"], {
       
 34864       onFilesDrop: onFilesUpload,
       
 34865       onHTMLDrop: onHTMLDrop
       
 34866     });
       
 34867   };
       
 34868 
       
 34869   const renderCancelLink = () => {
       
 34870     return onCancel && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 34871       className: "block-editor-media-placeholder__cancel-button",
       
 34872       title: Object(external_wp_i18n_["__"])('Cancel'),
       
 34873       isLink: true,
       
 34874       onClick: onCancel
       
 34875     }, Object(external_wp_i18n_["__"])('Cancel'));
       
 34876   };
       
 34877 
       
 34878   const renderUrlSelectionUI = () => {
       
 34879     return onSelectURL && Object(external_wp_element_["createElement"])("div", {
       
 34880       className: "block-editor-media-placeholder__url-input-container"
       
 34881     }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 34882       className: "block-editor-media-placeholder__button",
       
 34883       onClick: openURLInput,
       
 34884       isPressed: isURLInputVisible,
       
 34885       isTertiary: true
       
 34886     }, Object(external_wp_i18n_["__"])('Insert from URL')), isURLInputVisible && Object(external_wp_element_["createElement"])(InsertFromURLPopover, {
       
 34887       src: src,
       
 34888       onChange: onChangeSrc,
       
 34889       onSubmit: onSubmitSrc,
       
 34890       onClose: closeURLInput
       
 34891     }));
       
 34892   };
       
 34893 
       
 34894   const renderMediaUploadChecked = () => {
       
 34895     const mediaLibraryButton = Object(external_wp_element_["createElement"])(media_upload, {
       
 34896       addToGallery: addToGallery,
       
 34897       gallery: multiple && onlyAllowsImages(),
       
 34898       multiple: multiple,
       
 34899       onSelect: onSelect,
       
 34900       allowedTypes: allowedTypes,
       
 34901       value: Array.isArray(value) ? value.map(({
       
 34902         id
       
 34903       }) => id) : value.id,
       
 34904       render: ({
       
 34905         open
       
 34906       }) => {
       
 34907         return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 34908           isTertiary: true,
       
 34909           onClick: event => {
       
 34910             event.stopPropagation();
       
 34911             open();
       
 34912           }
       
 34913         }, Object(external_wp_i18n_["__"])('Media Library'));
       
 34914       }
       
 34915     });
       
 34916 
       
 34917     if (mediaUpload && isAppender) {
       
 34918       return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, renderDropZone(), Object(external_wp_element_["createElement"])(external_wp_components_["FormFileUpload"], {
       
 34919         onChange: onUpload,
       
 34920         accept: accept,
       
 34921         multiple: multiple,
       
 34922         render: ({
       
 34923           openFileDialog
       
 34924         }) => {
       
 34925           const content = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
 34926             isPrimary: true,
       
 34927             className: classnames_default()('block-editor-media-placeholder__button', 'block-editor-media-placeholder__upload-button')
       
 34928           }, Object(external_wp_i18n_["__"])('Upload')), mediaLibraryButton, renderUrlSelectionUI(), renderCancelLink());
       
 34929           return renderPlaceholder(content, openFileDialog);
       
 34930         }
       
 34931       }));
       
 34932     }
       
 34933 
       
 34934     if (mediaUpload) {
       
 34935       const content = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, renderDropZone(), Object(external_wp_element_["createElement"])(external_wp_components_["FormFileUpload"], {
       
 34936         isPrimary: true,
       
 34937         className: classnames_default()('block-editor-media-placeholder__button', 'block-editor-media-placeholder__upload-button'),
       
 34938         onChange: onUpload,
       
 34939         accept: accept,
       
 34940         multiple: multiple
       
 34941       }, Object(external_wp_i18n_["__"])('Upload')), mediaLibraryButton, renderUrlSelectionUI(), renderCancelLink());
       
 34942       return renderPlaceholder(content);
       
 34943     }
       
 34944 
       
 34945     return renderPlaceholder(mediaLibraryButton);
       
 34946   };
       
 34947 
       
 34948   if (dropZoneUIOnly || disableMediaButtons) {
       
 34949     if (dropZoneUIOnly) {
       
 34950       external_wp_deprecated_default()('wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop', {
       
 34951         since: '5.4',
       
 34952         alternative: 'disableMediaButtons'
 35066       });
 34953       });
 35067       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Placeholder"], {
 34954     }
 35068         icon: icon,
 34955 
 35069         label: title,
 34956     return Object(external_wp_element_["createElement"])(check, null, renderDropZone());
 35070         instructions: instructions,
 34957   }
 35071         className: placeholderClassName,
 34958 
 35072         notices: notices,
 34959   return Object(external_wp_element_["createElement"])(check, {
 35073         onClick: onClick,
 34960     fallback: renderPlaceholder(renderUrlSelectionUI())
 35074         onDoubleClick: onDoubleClick,
 34961   }, renderMediaUploadChecked());
 35075         preview: mediaPreview
 34962 }
 35076       }, content, children);
 34963 /**
 35077     }
 34964  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-placeholder/README.md
 35078   }, {
 34965  */
 35079     key: "renderDropZone",
 34966 
 35080     value: function renderDropZone() {
 34967 /* harmony default export */ var media_placeholder = (Object(external_wp_components_["withFilters"])('editor.MediaPlaceholder')(MediaPlaceholder));
 35081       var _this$props3 = this.props,
       
 35082           disableDropZone = _this$props3.disableDropZone,
       
 35083           _this$props3$onHTMLDr = _this$props3.onHTMLDrop,
       
 35084           onHTMLDrop = _this$props3$onHTMLDr === void 0 ? external_this_lodash_["noop"] : _this$props3$onHTMLDr;
       
 35085 
       
 35086       if (disableDropZone) {
       
 35087         return null;
       
 35088       }
       
 35089 
       
 35090       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["DropZone"], {
       
 35091         onFilesDrop: this.onFilesUpload,
       
 35092         onHTMLDrop: onHTMLDrop
       
 35093       });
       
 35094     }
       
 35095   }, {
       
 35096     key: "renderCancelLink",
       
 35097     value: function renderCancelLink() {
       
 35098       var onCancel = this.props.onCancel;
       
 35099       return onCancel && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 35100         className: "block-editor-media-placeholder__cancel-button",
       
 35101         title: Object(external_this_wp_i18n_["__"])('Cancel'),
       
 35102         isLink: true,
       
 35103         onClick: onCancel
       
 35104       }, Object(external_this_wp_i18n_["__"])('Cancel'));
       
 35105     }
       
 35106   }, {
       
 35107     key: "renderUrlSelectionUI",
       
 35108     value: function renderUrlSelectionUI() {
       
 35109       var onSelectURL = this.props.onSelectURL;
       
 35110 
       
 35111       if (!onSelectURL) {
       
 35112         return null;
       
 35113       }
       
 35114 
       
 35115       var _this$state = this.state,
       
 35116           isURLInputVisible = _this$state.isURLInputVisible,
       
 35117           src = _this$state.src;
       
 35118       return Object(external_this_wp_element_["createElement"])("div", {
       
 35119         className: "block-editor-media-placeholder__url-input-container"
       
 35120       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 35121         className: "block-editor-media-placeholder__button",
       
 35122         onClick: this.openURLInput,
       
 35123         isPressed: isURLInputVisible,
       
 35124         isTertiary: true
       
 35125       }, Object(external_this_wp_i18n_["__"])('Insert from URL')), isURLInputVisible && Object(external_this_wp_element_["createElement"])(media_placeholder_InsertFromURLPopover, {
       
 35126         src: src,
       
 35127         onChange: this.onChangeSrc,
       
 35128         onSubmit: this.onSubmitSrc,
       
 35129         onClose: this.closeURLInput
       
 35130       }));
       
 35131     }
       
 35132   }, {
       
 35133     key: "renderMediaUploadChecked",
       
 35134     value: function renderMediaUploadChecked() {
       
 35135       var _this3 = this;
       
 35136 
       
 35137       var _this$props4 = this.props,
       
 35138           accept = _this$props4.accept,
       
 35139           addToGallery = _this$props4.addToGallery,
       
 35140           _this$props4$allowedT = _this$props4.allowedTypes,
       
 35141           allowedTypes = _this$props4$allowedT === void 0 ? [] : _this$props4$allowedT,
       
 35142           isAppender = _this$props4.isAppender,
       
 35143           mediaUpload = _this$props4.mediaUpload,
       
 35144           _this$props4$multiple = _this$props4.multiple,
       
 35145           multiple = _this$props4$multiple === void 0 ? false : _this$props4$multiple,
       
 35146           onSelect = _this$props4.onSelect,
       
 35147           _this$props4$value = _this$props4.value,
       
 35148           value = _this$props4$value === void 0 ? {} : _this$props4$value;
       
 35149       var mediaLibraryButton = Object(external_this_wp_element_["createElement"])(media_upload, {
       
 35150         addToGallery: addToGallery,
       
 35151         gallery: multiple && this.onlyAllowsImages(),
       
 35152         multiple: multiple,
       
 35153         onSelect: onSelect,
       
 35154         allowedTypes: allowedTypes,
       
 35155         value: Object(external_this_lodash_["isArray"])(value) ? value.map(function (_ref6) {
       
 35156           var id = _ref6.id;
       
 35157           return id;
       
 35158         }) : value.id,
       
 35159         render: function render(_ref7) {
       
 35160           var open = _ref7.open;
       
 35161           return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 35162             isTertiary: true,
       
 35163             onClick: function onClick(event) {
       
 35164               event.stopPropagation();
       
 35165               open();
       
 35166             }
       
 35167           }, Object(external_this_wp_i18n_["__"])('Media Library'));
       
 35168         }
       
 35169       });
       
 35170 
       
 35171       if (mediaUpload && isAppender) {
       
 35172         return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, this.renderDropZone(), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["FormFileUpload"], {
       
 35173           onChange: this.onUpload,
       
 35174           accept: accept,
       
 35175           multiple: multiple,
       
 35176           render: function render(_ref8) {
       
 35177             var openFileDialog = _ref8.openFileDialog;
       
 35178             var content = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 35179               isPrimary: true,
       
 35180               className: classnames_default()('block-editor-media-placeholder__button', 'block-editor-media-placeholder__upload-button')
       
 35181             }, Object(external_this_wp_i18n_["__"])('Upload')), mediaLibraryButton, _this3.renderUrlSelectionUI(), _this3.renderCancelLink());
       
 35182             return _this3.renderPlaceholder(content, openFileDialog);
       
 35183           }
       
 35184         }));
       
 35185       }
       
 35186 
       
 35187       if (mediaUpload) {
       
 35188         var content = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, this.renderDropZone(), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["FormFileUpload"], {
       
 35189           isPrimary: true,
       
 35190           className: classnames_default()('block-editor-media-placeholder__button', 'block-editor-media-placeholder__upload-button'),
       
 35191           onChange: this.onUpload,
       
 35192           accept: accept,
       
 35193           multiple: multiple
       
 35194         }, Object(external_this_wp_i18n_["__"])('Upload')), mediaLibraryButton, this.renderUrlSelectionUI(), this.renderCancelLink());
       
 35195         return this.renderPlaceholder(content);
       
 35196       }
       
 35197 
       
 35198       return this.renderPlaceholder(mediaLibraryButton);
       
 35199     }
       
 35200   }, {
       
 35201     key: "render",
       
 35202     value: function render() {
       
 35203       var _this$props5 = this.props,
       
 35204           disableMediaButtons = _this$props5.disableMediaButtons,
       
 35205           dropZoneUIOnly = _this$props5.dropZoneUIOnly;
       
 35206 
       
 35207       if (dropZoneUIOnly || disableMediaButtons) {
       
 35208         if (dropZoneUIOnly) {
       
 35209           external_this_wp_deprecated_default()('wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop', {
       
 35210             alternative: 'disableMediaButtons'
       
 35211           });
       
 35212         }
       
 35213 
       
 35214         return Object(external_this_wp_element_["createElement"])(check, null, this.renderDropZone());
       
 35215       }
       
 35216 
       
 35217       return Object(external_this_wp_element_["createElement"])(check, {
       
 35218         fallback: this.renderPlaceholder(this.renderUrlSelectionUI())
       
 35219       }, this.renderMediaUploadChecked());
       
 35220     }
       
 35221   }]);
       
 35222 
       
 35223   return MediaPlaceholder;
       
 35224 }(external_this_wp_element_["Component"]);
       
 35225 var media_placeholder_applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (select) {
       
 35226   var _select = select('core/block-editor'),
       
 35227       getSettings = _select.getSettings;
       
 35228 
       
 35229   return {
       
 35230     mediaUpload: getSettings().mediaUpload
       
 35231   };
       
 35232 });
       
 35233 /**
       
 35234  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-placeholder/README.md
       
 35235  */
       
 35236 
       
 35237 /* harmony default export */ var media_placeholder = (Object(external_this_wp_compose_["compose"])(media_placeholder_applyWithSelect, Object(external_this_wp_components_["withFilters"])('editor.MediaPlaceholder'))(media_placeholder_MediaPlaceholder));
       
 35238 
 34968 
 35239 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/editable-text/index.js
 34969 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/editable-text/index.js
 35240 
 34970 
 35241 
 34971 
 35242 
 34972 
 35243 
       
 35244 /**
 34973 /**
 35245  * WordPress dependencies
 34974  * WordPress dependencies
 35246  */
 34975  */
 35247 
 34976 
 35248 /**
 34977 /**
 35249  * Internal dependencies
 34978  * Internal dependencies
 35250  */
 34979  */
 35251 
 34980 
 35252 
 34981 
 35253 var EditableText = Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
 34982 const EditableText = Object(external_wp_element_["forwardRef"])((props, ref) => {
 35254   return Object(external_this_wp_element_["createElement"])(rich_text, Object(esm_extends["a" /* default */])({
 34983   return Object(external_wp_element_["createElement"])(rich_text, Object(esm_extends["a" /* default */])({
 35255     ref: ref
 34984     ref: ref
 35256   }, props, {
 34985   }, props, {
 35257     __unstableDisableFormats: true,
 34986     __unstableDisableFormats: true,
 35258     preserveWhiteSpace: true
 34987     preserveWhiteSpace: true
 35259   }));
 34988   }));
 35260 });
 34989 });
 35261 
 34990 
 35262 EditableText.Content = function (_ref) {
 34991 EditableText.Content = ({
 35263   var _ref$value = _ref.value,
 34992   value = '',
 35264       value = _ref$value === void 0 ? '' : _ref$value,
 34993   tagName: Tag = 'div',
 35265       _ref$tagName = _ref.tagName,
 34994   ...props
 35266       Tag = _ref$tagName === void 0 ? 'div' : _ref$tagName,
 34995 }) => {
 35267       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["value", "tagName"]);
 34996   return Object(external_wp_element_["createElement"])(Tag, props, value);
 35268 
       
 35269   return Object(external_this_wp_element_["createElement"])(Tag, props, value);
       
 35270 };
 34997 };
 35271 /**
 34998 /**
 35272  * Renders an editable text input in which text formatting is not allowed.
 34999  * Renders an editable text input in which text formatting is not allowed.
 35273  */
 35000  */
 35274 
 35001 
 35277 
 35004 
 35278 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/plain-text/index.js
 35005 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/plain-text/index.js
 35279 
 35006 
 35280 
 35007 
 35281 
 35008 
 35282 
       
 35283 /**
 35009 /**
 35284  * External dependencies
 35010  * External dependencies
 35285  */
 35011  */
 35286 
 35012 
 35287 
 35013 
 35294  * Internal dependencies
 35020  * Internal dependencies
 35295  */
 35021  */
 35296 
 35022 
 35297 
 35023 
 35298 /**
 35024 /**
 35299  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/plain-text/README.md
 35025  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/plain-text/README.md
 35300  */
 35026  */
 35301 
 35027 
 35302 var PlainText = Object(external_this_wp_element_["forwardRef"])(function (_ref, ref) {
 35028 const PlainText = Object(external_wp_element_["forwardRef"])(({
 35303   var __experimentalVersion = _ref.__experimentalVersion,
 35029   __experimentalVersion,
 35304       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["__experimentalVersion"]);
 35030   ...props
 35305 
 35031 }, ref) => {
 35306   if (__experimentalVersion === 2) {
 35032   if (__experimentalVersion === 2) {
 35307     return Object(external_this_wp_element_["createElement"])(editable_text, Object(esm_extends["a" /* default */])({
 35033     return Object(external_wp_element_["createElement"])(editable_text, Object(esm_extends["a" /* default */])({
 35308       ref: ref
 35034       ref: ref
 35309     }, props));
 35035     }, props));
 35310   }
 35036   }
 35311 
 35037 
 35312   var className = props.className,
 35038   const {
 35313       _onChange = props.onChange,
 35039     className,
 35314       remainingProps = Object(objectWithoutProperties["a" /* default */])(props, ["className", "onChange"]);
 35040     onChange,
 35315 
 35041     ...remainingProps
 35316   return Object(external_this_wp_element_["createElement"])(lib_default.a, Object(esm_extends["a" /* default */])({
 35042   } = props;
       
 35043   return Object(external_wp_element_["createElement"])(lib_default.a, Object(esm_extends["a" /* default */])({
 35317     ref: ref,
 35044     ref: ref,
 35318     className: classnames_default()('block-editor-plain-text', className),
 35045     className: classnames_default()('block-editor-plain-text', className),
 35319     onChange: function onChange(event) {
 35046     onChange: event => onChange(event.target.value)
 35320       return _onChange(event.target.value);
       
 35321     }
       
 35322   }, remainingProps));
 35047   }, remainingProps));
 35323 });
 35048 });
 35324 /* harmony default export */ var plain_text = (PlainText);
 35049 /* harmony default export */ var plain_text = (PlainText);
 35325 
 35050 
 35326 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/responsive-block-control/label.js
 35051 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/responsive-block-control/label.js
 35331  */
 35056  */
 35332 
 35057 
 35333 
 35058 
 35334 
 35059 
 35335 
 35060 
 35336 function ResponsiveBlockControlLabel(_ref) {
 35061 function ResponsiveBlockControlLabel({
 35337   var property = _ref.property,
 35062   property,
 35338       viewport = _ref.viewport,
 35063   viewport,
 35339       desc = _ref.desc;
 35064   desc
 35340   var instanceId = Object(external_this_wp_compose_["useInstanceId"])(ResponsiveBlockControlLabel);
 35065 }) {
 35341   var accessibleLabel = desc || Object(external_this_wp_i18n_["sprintf"])(
 35066   const instanceId = Object(external_wp_compose_["useInstanceId"])(ResponsiveBlockControlLabel);
       
 35067   const accessibleLabel = desc || Object(external_wp_i18n_["sprintf"])(
 35342   /* translators: 1: property name. 2: viewport name. */
 35068   /* translators: 1: property name. 2: viewport name. */
 35343   Object(external_this_wp_i18n_["_x"])('Controls the %1$s property for %2$s viewports.', 'Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size.'), property, viewport.label);
 35069   Object(external_wp_i18n_["_x"])('Controls the %1$s property for %2$s viewports.', 'Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size.'), property, viewport.label);
 35344   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("span", {
 35070   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("span", {
 35345     "aria-describedby": "rbc-desc-".concat(instanceId)
 35071     "aria-describedby": `rbc-desc-${instanceId}`
 35346   }, viewport.label), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
 35072   }, viewport.label), Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
 35347     as: "span",
 35073     as: "span",
 35348     id: "rbc-desc-".concat(instanceId)
 35074     id: `rbc-desc-${instanceId}`
 35349   }, accessibleLabel));
 35075   }, accessibleLabel));
 35350 }
 35076 }
 35351 
 35077 
 35352 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/responsive-block-control/index.js
 35078 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/responsive-block-control/index.js
 35353 
 35079 
 35368  */
 35094  */
 35369 
 35095 
 35370 
 35096 
 35371 
 35097 
 35372 function ResponsiveBlockControl(props) {
 35098 function ResponsiveBlockControl(props) {
 35373   var title = props.title,
 35099   const {
 35374       property = props.property,
 35100     title,
 35375       toggleLabel = props.toggleLabel,
 35101     property,
 35376       onIsResponsiveChange = props.onIsResponsiveChange,
 35102     toggleLabel,
 35377       renderDefaultControl = props.renderDefaultControl,
 35103     onIsResponsiveChange,
 35378       renderResponsiveControls = props.renderResponsiveControls,
 35104     renderDefaultControl,
 35379       _props$isResponsive = props.isResponsive,
 35105     renderResponsiveControls,
 35380       isResponsive = _props$isResponsive === void 0 ? false : _props$isResponsive,
 35106     isResponsive = false,
 35381       _props$defaultLabel = props.defaultLabel,
 35107     defaultLabel = {
 35382       defaultLabel = _props$defaultLabel === void 0 ? {
 35108       id: 'all',
 35383     id: 'all',
 35109 
 35384 
 35110       /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
 35385     /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
 35111       label: Object(external_wp_i18n_["__"])('All')
 35386     label: Object(external_this_wp_i18n_["__"])('All')
 35112     },
 35387   } : _props$defaultLabel,
 35113     viewports = [{
 35388       _props$viewports = props.viewports,
 35114       id: 'small',
 35389       viewports = _props$viewports === void 0 ? [{
 35115       label: Object(external_wp_i18n_["__"])('Small screens')
 35390     id: 'small',
 35116     }, {
 35391     label: Object(external_this_wp_i18n_["__"])('Small screens')
 35117       id: 'medium',
 35392   }, {
 35118       label: Object(external_wp_i18n_["__"])('Medium screens')
 35393     id: 'medium',
 35119     }, {
 35394     label: Object(external_this_wp_i18n_["__"])('Medium screens')
 35120       id: 'large',
 35395   }, {
 35121       label: Object(external_wp_i18n_["__"])('Large screens')
 35396     id: 'large',
 35122     }]
 35397     label: Object(external_this_wp_i18n_["__"])('Large screens')
 35123   } = props;
 35398   }] : _props$viewports;
       
 35399 
 35124 
 35400   if (!title || !property || !renderDefaultControl) {
 35125   if (!title || !property || !renderDefaultControl) {
 35401     return null;
 35126     return null;
 35402   }
 35127   }
 35403 
 35128 
 35404   var toggleControlLabel = toggleLabel || Object(external_this_wp_i18n_["sprintf"])(
 35129   const toggleControlLabel = toggleLabel || Object(external_wp_i18n_["sprintf"])(
 35405   /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
 35130   /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
 35406   Object(external_this_wp_i18n_["__"])('Use the same %s on all screensizes.'), property);
 35131   Object(external_wp_i18n_["__"])('Use the same %s on all screensizes.'), property);
 35407   /* translators: 'Help text for the responsive mode toggle control.' */
 35132   /* translators: 'Help text for the responsive mode toggle control.' */
 35408 
 35133 
 35409   var toggleHelpText = Object(external_this_wp_i18n_["__"])('Toggle between using the same value for all screen sizes or using a unique value per screen size.');
 35134   const toggleHelpText = Object(external_wp_i18n_["__"])('Toggle between using the same value for all screen sizes or using a unique value per screen size.');
 35410 
 35135 
 35411   var defaultControl = renderDefaultControl(Object(external_this_wp_element_["createElement"])(ResponsiveBlockControlLabel, {
 35136   const defaultControl = renderDefaultControl(Object(external_wp_element_["createElement"])(ResponsiveBlockControlLabel, {
 35412     property: property,
 35137     property: property,
 35413     viewport: defaultLabel
 35138     viewport: defaultLabel
 35414   }), defaultLabel);
 35139   }), defaultLabel);
 35415 
 35140 
 35416   var defaultResponsiveControls = function defaultResponsiveControls() {
 35141   const defaultResponsiveControls = () => {
 35417     return viewports.map(function (viewport) {
 35142     return viewports.map(viewport => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], {
 35418       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], {
 35143       key: viewport.id
 35419         key: viewport.id
 35144     }, renderDefaultControl(Object(external_wp_element_["createElement"])(ResponsiveBlockControlLabel, {
 35420       }, renderDefaultControl(Object(external_this_wp_element_["createElement"])(ResponsiveBlockControlLabel, {
 35145       property: property,
 35421         property: property,
 35146       viewport: viewport
 35422         viewport: viewport
 35147     }), viewport)));
 35423       }), viewport));
       
 35424     });
       
 35425   };
 35148   };
 35426 
 35149 
 35427   return Object(external_this_wp_element_["createElement"])("fieldset", {
 35150   return Object(external_wp_element_["createElement"])("fieldset", {
 35428     className: "block-editor-responsive-block-control"
 35151     className: "block-editor-responsive-block-control"
 35429   }, Object(external_this_wp_element_["createElement"])("legend", {
 35152   }, Object(external_wp_element_["createElement"])("legend", {
 35430     className: "block-editor-responsive-block-control__title"
 35153     className: "block-editor-responsive-block-control__title"
 35431   }, title), Object(external_this_wp_element_["createElement"])("div", {
 35154   }, title), Object(external_wp_element_["createElement"])("div", {
 35432     className: "block-editor-responsive-block-control__inner"
 35155     className: "block-editor-responsive-block-control__inner"
 35433   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToggleControl"], {
 35156   }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
 35434     className: "block-editor-responsive-block-control__toggle",
 35157     className: "block-editor-responsive-block-control__toggle",
 35435     label: toggleControlLabel,
 35158     label: toggleControlLabel,
 35436     checked: !isResponsive,
 35159     checked: !isResponsive,
 35437     onChange: onIsResponsiveChange,
 35160     onChange: onIsResponsiveChange,
 35438     help: toggleHelpText
 35161     help: toggleHelpText
 35439   }), Object(external_this_wp_element_["createElement"])("div", {
 35162   }), Object(external_wp_element_["createElement"])("div", {
 35440     className: classnames_default()('block-editor-responsive-block-control__group', {
 35163     className: classnames_default()('block-editor-responsive-block-control__group', {
 35441       'is-responsive': isResponsive
 35164       'is-responsive': isResponsive
 35442     })
 35165     })
 35443   }, !isResponsive && defaultControl, isResponsive && (renderResponsiveControls ? renderResponsiveControls(viewports) : defaultResponsiveControls()))));
 35166   }, !isResponsive && defaultControl, isResponsive && (renderResponsiveControls ? renderResponsiveControls(viewports) : defaultResponsiveControls()))));
 35444 }
 35167 }
 35449 /**
 35172 /**
 35450  * WordPress dependencies
 35173  * WordPress dependencies
 35451  */
 35174  */
 35452 
 35175 
 35453 
 35176 
 35454 function RichTextShortcut(_ref) {
 35177 function RichTextShortcut({
 35455   var character = _ref.character,
 35178   character,
 35456       type = _ref.type,
 35179   type,
 35457       onUse = _ref.onUse;
 35180   onUse
 35458 
 35181 }) {
 35459   var callback = function callback() {
 35182   const callback = () => {
 35460     onUse();
 35183     onUse();
 35461     return false;
 35184     return false;
 35462   };
 35185   };
 35463 
 35186 
 35464   Object(external_this_wp_compose_["useKeyboardShortcut"])(external_this_wp_keycodes_["rawShortcut"][type](character), callback, {
 35187   Object(external_wp_compose_["useKeyboardShortcut"])(external_wp_keycodes_["rawShortcut"][type](character), callback, {
 35465     bindGlobal: true
 35188     bindGlobal: true
 35466   });
 35189   });
 35467   return null;
 35190   return null;
 35468 }
 35191 }
 35469 
 35192 
 35470 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/toolbar-button.js
 35193 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/toolbar-button.js
 35471 
 35194 
 35472 
 35195 
 35473 
 35196 
 35474 
       
 35475 /**
 35197 /**
 35476  * WordPress dependencies
 35198  * WordPress dependencies
 35477  */
 35199  */
 35478 
 35200 
 35479 
 35201 
 35480 function RichTextToolbarButton(_ref) {
 35202 function RichTextToolbarButton({
 35481   var name = _ref.name,
 35203   name,
 35482       shortcutType = _ref.shortcutType,
 35204   shortcutType,
 35483       shortcutCharacter = _ref.shortcutCharacter,
 35205   shortcutCharacter,
 35484       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["name", "shortcutType", "shortcutCharacter"]);
 35206   ...props
 35485 
 35207 }) {
 35486   var shortcut;
 35208   let shortcut;
 35487   var fillName = 'RichText.ToolbarControls';
 35209   let fillName = 'RichText.ToolbarControls';
 35488 
 35210 
 35489   if (name) {
 35211   if (name) {
 35490     fillName += ".".concat(name);
 35212     fillName += `.${name}`;
 35491   }
 35213   }
 35492 
 35214 
 35493   if (shortcutType && shortcutCharacter) {
 35215   if (shortcutType && shortcutCharacter) {
 35494     shortcut = external_this_wp_keycodes_["displayShortcut"][shortcutType](shortcutCharacter);
 35216     shortcut = external_wp_keycodes_["displayShortcut"][shortcutType](shortcutCharacter);
 35495   }
 35217   }
 35496 
 35218 
 35497   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Fill"], {
 35219   return Object(external_wp_element_["createElement"])(external_wp_components_["Fill"], {
 35498     name: fillName
 35220     name: fillName
 35499   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], Object(esm_extends["a" /* default */])({}, props, {
 35221   }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], Object(esm_extends["a" /* default */])({}, props, {
 35500     shortcut: shortcut
 35222     shortcut: shortcut
 35501   })));
 35223   })));
 35502 }
 35224 }
 35503 
 35225 
 35504 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/input-event.js
 35226 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/input-event.js
 35505 
       
 35506 
       
 35507 
       
 35508 
       
 35509 
       
 35510 
       
 35511 
       
 35512 function input_event_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (input_event_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 35513 
       
 35514 function input_event_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 35515 
       
 35516 /**
 35227 /**
 35517  * WordPress dependencies
 35228  * WordPress dependencies
 35518  */
 35229  */
 35519 
 35230 
 35520 var input_event_unstableRichTextInputEvent = /*#__PURE__*/function (_Component) {
 35231 class input_event_unstableRichTextInputEvent extends external_wp_element_["Component"] {
 35521   Object(inherits["a" /* default */])(__unstableRichTextInputEvent, _Component);
 35232   constructor() {
 35522 
 35233     super(...arguments);
 35523   var _super = input_event_createSuper(__unstableRichTextInputEvent);
 35234     this.onInput = this.onInput.bind(this);
 35524 
 35235   }
 35525   function __unstableRichTextInputEvent() {
 35236 
 35526     var _this;
 35237   onInput(event) {
 35527 
 35238     if (event.inputType === this.props.inputType) {
 35528     Object(classCallCheck["a" /* default */])(this, __unstableRichTextInputEvent);
 35239       this.props.onInput();
 35529 
 35240     }
 35530     _this = _super.apply(this, arguments);
 35241   }
 35531     _this.onInput = _this.onInput.bind(Object(assertThisInitialized["a" /* default */])(_this));
 35242 
 35532     return _this;
 35243   componentDidMount() {
 35533   }
 35244     document.addEventListener('input', this.onInput, true);
 35534 
 35245   }
 35535   Object(createClass["a" /* default */])(__unstableRichTextInputEvent, [{
 35246 
 35536     key: "onInput",
 35247   componentWillUnmount() {
 35537     value: function onInput(event) {
 35248     document.removeEventListener('input', this.onInput, true);
 35538       if (event.inputType === this.props.inputType) {
 35249   }
 35539         this.props.onInput();
 35250 
 35540       }
 35251   render() {
 35541     }
 35252     return null;
 35542   }, {
 35253   }
 35543     key: "componentDidMount",
 35254 
 35544     value: function componentDidMount() {
 35255 }
 35545       document.addEventListener('input', this.onInput, true);
       
 35546     }
       
 35547   }, {
       
 35548     key: "componentWillUnmount",
       
 35549     value: function componentWillUnmount() {
       
 35550       document.removeEventListener('input', this.onInput, true);
       
 35551     }
       
 35552   }, {
       
 35553     key: "render",
       
 35554     value: function render() {
       
 35555       return null;
       
 35556     }
       
 35557   }]);
       
 35558 
       
 35559   return __unstableRichTextInputEvent;
       
 35560 }(external_this_wp_element_["Component"]);
       
 35561 
       
 35562 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
       
 35563 var library_edit = __webpack_require__(300);
       
 35564 
 35256 
 35565 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/tool-selector/index.js
 35257 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/tool-selector/index.js
 35566 
 35258 
 35567 
 35259 
 35568 
 35260 
 35572 
 35264 
 35573 
 35265 
 35574 
 35266 
 35575 
 35267 
 35576 
 35268 
 35577 var selectIcon = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
 35269 /**
       
 35270  * Internal dependencies
       
 35271  */
       
 35272 
       
 35273 
       
 35274 const selectIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
 35578   xmlns: "http://www.w3.org/2000/svg",
 35275   xmlns: "http://www.w3.org/2000/svg",
 35579   width: "24",
 35276   width: "24",
 35580   height: "24",
 35277   height: "24",
 35581   viewBox: "0 0 24 24"
 35278   viewBox: "0 0 24 24"
 35582 }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 35279 }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 35583   d: "M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"
 35280   d: "M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"
 35584 }));
 35281 }));
 35585 
 35282 
 35586 function ToolSelector(props, ref) {
 35283 function ToolSelector(props, ref) {
 35587   var isNavigationTool = Object(external_this_wp_data_["useSelect"])(function (select) {
 35284   const isNavigationTool = Object(external_wp_data_["useSelect"])(select => select(store).isNavigationMode(), []);
 35588     return select('core/block-editor').isNavigationMode();
 35285   const {
 35589   }, []);
 35286     setNavigationMode
 35590 
 35287   } = Object(external_wp_data_["useDispatch"])(store);
 35591   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 35288 
 35592       setNavigationMode = _useDispatch.setNavigationMode;
 35289   const onSwitchMode = mode => {
 35593 
       
 35594   var onSwitchMode = function onSwitchMode(mode) {
       
 35595     setNavigationMode(mode === 'edit' ? false : true);
 35290     setNavigationMode(mode === 'edit' ? false : true);
 35596   };
 35291   };
 35597 
 35292 
 35598   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
 35293   return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
 35599     renderToggle: function renderToggle(_ref) {
 35294     renderToggle: ({
 35600       var isOpen = _ref.isOpen,
 35295       isOpen,
 35601           onToggle = _ref.onToggle;
 35296       onToggle
 35602       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
 35297     }) => Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
 35603         ref: ref,
 35298       ref: ref,
 35604         icon: isNavigationTool ? selectIcon : library_edit["a" /* default */],
 35299       icon: isNavigationTool ? selectIcon : library_edit["a" /* default */],
 35605         "aria-expanded": isOpen,
 35300       "aria-expanded": isOpen,
 35606         onClick: onToggle,
 35301       "aria-haspopup": "true",
 35607         label: Object(external_this_wp_i18n_["__"])('Tools')
 35302       onClick: onToggle
 35608       }));
 35303       /* translators: button label text should, if possible, be under 16 characters. */
 35609     },
 35304       ,
       
 35305       label: Object(external_wp_i18n_["__"])('Tools')
       
 35306     })),
 35610     position: "bottom right",
 35307     position: "bottom right",
 35611     renderContent: function renderContent() {
 35308     renderContent: () => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], {
 35612       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NavigableMenu"], {
 35309       role: "menu",
 35613         role: "menu",
 35310       "aria-label": Object(external_wp_i18n_["__"])('Tools')
 35614         "aria-label": Object(external_this_wp_i18n_["__"])('Tools')
 35311     }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItemsChoice"], {
 35615       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItemsChoice"], {
 35312       value: isNavigationTool ? 'select' : 'edit',
 35616         value: isNavigationTool ? 'select' : 'edit',
 35313       onSelect: onSwitchMode,
 35617         onSelect: onSwitchMode,
 35314       choices: [{
 35618         choices: [{
 35315         value: 'edit',
 35619           value: 'edit',
 35316         label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 35620           label: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 35317           icon: library_edit["a" /* default */]
 35621             icon: library_edit["a" /* default */]
 35318         }), Object(external_wp_i18n_["__"])('Edit'))
 35622           }), Object(external_this_wp_i18n_["__"])('Edit'))
 35319       }, {
 35623         }, {
 35320         value: 'select',
 35624           value: 'select',
 35321         label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, selectIcon, Object(external_wp_i18n_["__"])('Select'))
 35625           label: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, selectIcon, Object(external_this_wp_i18n_["__"])('Select'))
 35322       }]
 35626         }]
 35323     })), Object(external_wp_element_["createElement"])("div", {
 35627       })), Object(external_this_wp_element_["createElement"])("div", {
 35324       className: "block-editor-tool-selector__help"
 35628         className: "block-editor-tool-selector__help"
 35325     }, Object(external_wp_i18n_["__"])('Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.')))
 35629       }, Object(external_this_wp_i18n_["__"])('Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.')));
       
 35630     }
       
 35631   });
 35326   });
 35632 }
 35327 }
 35633 
 35328 
 35634 /* harmony default export */ var tool_selector = (Object(external_this_wp_element_["forwardRef"])(ToolSelector));
 35329 /* harmony default export */ var tool_selector = (Object(external_wp_element_["forwardRef"])(ToolSelector));
       
 35330 
       
 35331 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/unit-control/index.js
       
 35332 
       
 35333 
       
 35334 
       
 35335 /**
       
 35336  * WordPress dependencies
       
 35337  */
       
 35338 
       
 35339 /**
       
 35340  * Internal dependencies
       
 35341  */
       
 35342 
       
 35343 
       
 35344 function UnitControl({
       
 35345   units: unitsProp,
       
 35346   ...props
       
 35347 }) {
       
 35348   const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
       
 35349     availableUnits: useSetting('spacing.units') || ['%', 'px', 'em', 'rem', 'vw'],
       
 35350     units: unitsProp
       
 35351   });
       
 35352   return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalUnitControl"], Object(esm_extends["a" /* default */])({
       
 35353     units: units
       
 35354   }, props));
       
 35355 }
 35635 
 35356 
 35636 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js
 35357 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js
 35637 var library_link = __webpack_require__(180);
 35358 var library_link = __webpack_require__("Bpkj");
 35638 
 35359 
 35639 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/arrow-left.js
 35360 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/arrow-left.js
       
 35361 var arrow_left = __webpack_require__("cjQ8");
       
 35362 
       
 35363 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-input/button.js
 35640 
 35364 
 35641 
 35365 
 35642 /**
 35366 /**
 35643  * WordPress dependencies
 35367  * WordPress dependencies
 35644  */
 35368  */
 35645 
 35369 
 35646 var arrowLeft = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
       
 35647   xmlns: "http://www.w3.org/2000/svg",
       
 35648   viewBox: "0 0 24 24"
       
 35649 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
       
 35650   d: "M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"
       
 35651 }));
       
 35652 /* harmony default export */ var arrow_left = (arrowLeft);
       
 35653 
       
 35654 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-input/button.js
       
 35655 
       
 35656 
       
 35657 
       
 35658 
       
 35659 
       
 35660 
       
 35661 
       
 35662 
       
 35663 function button_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (button_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 35664 
       
 35665 function button_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 35666 
       
 35667 /**
       
 35668  * WordPress dependencies
       
 35669  */
       
 35670 
       
 35671 
 35370 
 35672 
 35371 
 35673 
 35372 
 35674 /**
 35373 /**
 35675  * Internal dependencies
 35374  * Internal dependencies
 35676  */
 35375  */
 35677 
 35376 
 35678 
 35377 
 35679 
 35378 
 35680 var button_URLInputButton = /*#__PURE__*/function (_Component) {
 35379 class button_URLInputButton extends external_wp_element_["Component"] {
 35681   Object(inherits["a" /* default */])(URLInputButton, _Component);
 35380   constructor() {
 35682 
 35381     super(...arguments);
 35683   var _super = button_createSuper(URLInputButton);
 35382     this.toggle = this.toggle.bind(this);
 35684 
 35383     this.submitLink = this.submitLink.bind(this);
 35685   function URLInputButton() {
 35384     this.state = {
 35686     var _this;
       
 35687 
       
 35688     Object(classCallCheck["a" /* default */])(this, URLInputButton);
       
 35689 
       
 35690     _this = _super.apply(this, arguments);
       
 35691     _this.toggle = _this.toggle.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 35692     _this.submitLink = _this.submitLink.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 35693     _this.state = {
       
 35694       expanded: false
 35385       expanded: false
 35695     };
 35386     };
 35696     return _this;
 35387   }
 35697   }
 35388 
 35698 
 35389   toggle() {
 35699   Object(createClass["a" /* default */])(URLInputButton, [{
 35390     this.setState({
 35700     key: "toggle",
 35391       expanded: !this.state.expanded
 35701     value: function toggle() {
 35392     });
 35702       this.setState({
 35393   }
 35703         expanded: !this.state.expanded
 35394 
 35704       });
 35395   submitLink(event) {
 35705     }
 35396     event.preventDefault();
 35706   }, {
 35397     this.toggle();
 35707     key: "submitLink",
 35398   }
 35708     value: function submitLink(event) {
 35399 
 35709       event.preventDefault();
 35400   render() {
 35710       this.toggle();
 35401     const {
 35711     }
 35402       url,
 35712   }, {
 35403       onChange
 35713     key: "render",
 35404     } = this.props;
 35714     value: function render() {
 35405     const {
 35715       var _this$props = this.props,
 35406       expanded
 35716           url = _this$props.url,
 35407     } = this.state;
 35717           onChange = _this$props.onChange;
 35408     const buttonLabel = url ? Object(external_wp_i18n_["__"])('Edit link') : Object(external_wp_i18n_["__"])('Insert link');
 35718       var expanded = this.state.expanded;
 35409     return Object(external_wp_element_["createElement"])("div", {
 35719       var buttonLabel = url ? Object(external_this_wp_i18n_["__"])('Edit link') : Object(external_this_wp_i18n_["__"])('Insert link');
 35410       className: "block-editor-url-input__button"
 35720       return Object(external_this_wp_element_["createElement"])("div", {
 35411     }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 35721         className: "block-editor-url-input__button"
 35412       icon: library_link["a" /* default */],
 35722       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 35413       label: buttonLabel,
 35723         icon: library_link["a" /* default */],
 35414       onClick: this.toggle,
 35724         label: buttonLabel,
 35415       className: "components-toolbar__control",
 35725         onClick: this.toggle,
 35416       isPressed: !!url
 35726         className: "components-toolbar__control",
 35417     }), expanded && Object(external_wp_element_["createElement"])("form", {
 35727         isPressed: !!url
 35418       className: "block-editor-url-input__button-modal",
 35728       }), expanded && Object(external_this_wp_element_["createElement"])("form", {
 35419       onSubmit: this.submitLink
 35729         className: "block-editor-url-input__button-modal",
 35420     }, Object(external_wp_element_["createElement"])("div", {
 35730         onSubmit: this.submitLink
 35421       className: "block-editor-url-input__button-modal-line"
 35731       }, Object(external_this_wp_element_["createElement"])("div", {
 35422     }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 35732         className: "block-editor-url-input__button-modal-line"
 35423       className: "block-editor-url-input__back",
 35733       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 35424       icon: arrow_left["a" /* default */],
 35734         className: "block-editor-url-input__back",
 35425       label: Object(external_wp_i18n_["__"])('Close'),
 35735         icon: arrow_left,
 35426       onClick: this.toggle
 35736         label: Object(external_this_wp_i18n_["__"])('Close'),
 35427     }), Object(external_wp_element_["createElement"])(url_input, {
 35737         onClick: this.toggle
 35428       value: url || '',
 35738       }), Object(external_this_wp_element_["createElement"])(url_input, {
 35429       onChange: onChange
 35739         value: url || '',
 35430     }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 35740         onChange: onChange
 35431       icon: keyboard_return["a" /* default */],
 35741       }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 35432       label: Object(external_wp_i18n_["__"])('Submit'),
 35742         icon: keyboard_return["a" /* default */],
 35433       type: "submit"
 35743         label: Object(external_this_wp_i18n_["__"])('Submit'),
 35434     }))));
 35744         type: "submit"
 35435   }
 35745       }))));
 35436 
 35746     }
 35437 }
 35747   }]);
 35438 /**
 35748 
 35439  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md
 35749   return URLInputButton;
       
 35750 }(external_this_wp_element_["Component"]);
       
 35751 /**
       
 35752  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-input/README.md
       
 35753  */
 35440  */
 35754 
 35441 
 35755 
 35442 
 35756 /* harmony default export */ var url_input_button = (button_URLInputButton);
 35443 /* harmony default export */ var url_input_button = (button_URLInputButton);
 35757 
 35444 
 35758 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
 35445 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
 35759 var library_close = __webpack_require__(154);
 35446 var library_close = __webpack_require__("w95h");
 35760 
 35447 
 35761 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/image-url-input-ui.js
 35448 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/image-url-input-ui.js
 35762 
 35449 
 35763 
 35450 
 35764 
       
 35765 /**
 35451 /**
 35766  * External dependencies
 35452  * External dependencies
 35767  */
 35453  */
 35768 
 35454 
 35769 /**
 35455 /**
 35772 
 35458 
 35773 
 35459 
 35774 
 35460 
 35775 
 35461 
 35776 
 35462 
 35777 
       
 35778 /**
 35463 /**
 35779  * Internal dependencies
 35464  * Internal dependencies
 35780  */
 35465  */
 35781 
 35466 
 35782 
 35467 
 35783 var LINK_DESTINATION_NONE = 'none';
 35468 const LINK_DESTINATION_NONE = 'none';
 35784 var LINK_DESTINATION_CUSTOM = 'custom';
 35469 const LINK_DESTINATION_CUSTOM = 'custom';
 35785 var LINK_DESTINATION_MEDIA = 'media';
 35470 const LINK_DESTINATION_MEDIA = 'media';
 35786 var LINK_DESTINATION_ATTACHMENT = 'attachment';
 35471 const LINK_DESTINATION_ATTACHMENT = 'attachment';
 35787 var NEW_TAB_REL = ['noreferrer', 'noopener'];
 35472 const NEW_TAB_REL = ['noreferrer', 'noopener'];
 35788 var image_url_input_ui_icon = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
 35473 const image_url_input_ui_icon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
 35789   viewBox: "0 0 24 24",
 35474   viewBox: "0 0 24 24",
 35790   xmlns: "http://www.w3.org/2000/svg"
 35475   xmlns: "http://www.w3.org/2000/svg"
 35791 }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 35476 }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 35792   d: "M0,0h24v24H0V0z",
 35477   d: "M0,0h24v24H0V0z",
 35793   fill: "none"
 35478   fill: "none"
 35794 }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 35479 }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 35795   d: "m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"
 35480   d: "m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"
 35796 }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
 35481 }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 35797   d: "m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"
 35482   d: "m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"
 35798 }));
 35483 }));
 35799 
 35484 
 35800 var image_url_input_ui_ImageURLInputUI = function ImageURLInputUI(_ref) {
 35485 const ImageURLInputUI = ({
 35801   var linkDestination = _ref.linkDestination,
 35486   linkDestination,
 35802       onChangeUrl = _ref.onChangeUrl,
 35487   onChangeUrl,
 35803       url = _ref.url,
 35488   url,
 35804       _ref$mediaType = _ref.mediaType,
 35489   mediaType = 'image',
 35805       mediaType = _ref$mediaType === void 0 ? 'image' : _ref$mediaType,
 35490   mediaUrl,
 35806       mediaUrl = _ref.mediaUrl,
 35491   mediaLink,
 35807       mediaLink = _ref.mediaLink,
 35492   linkTarget,
 35808       linkTarget = _ref.linkTarget,
 35493   linkClass,
 35809       linkClass = _ref.linkClass,
 35494   rel
 35810       rel = _ref.rel;
 35495 }) => {
 35811 
 35496   const [isOpen, setIsOpen] = Object(external_wp_element_["useState"])(false);
 35812   var _useState = Object(external_this_wp_element_["useState"])(false),
 35497   const openLinkUI = Object(external_wp_element_["useCallback"])(() => {
 35813       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
       
 35814       isOpen = _useState2[0],
       
 35815       setIsOpen = _useState2[1];
       
 35816 
       
 35817   var openLinkUI = Object(external_this_wp_element_["useCallback"])(function () {
       
 35818     setIsOpen(true);
 35498     setIsOpen(true);
 35819   });
 35499   });
 35820 
 35500   const [isEditingLink, setIsEditingLink] = Object(external_wp_element_["useState"])(false);
 35821   var _useState3 = Object(external_this_wp_element_["useState"])(false),
 35501   const [urlInput, setUrlInput] = Object(external_wp_element_["useState"])(null);
 35822       _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
 35502   const autocompleteRef = Object(external_wp_element_["useRef"])(null);
 35823       isEditingLink = _useState4[0],
 35503   const startEditLink = Object(external_wp_element_["useCallback"])(() => {
 35824       setIsEditingLink = _useState4[1];
       
 35825 
       
 35826   var _useState5 = Object(external_this_wp_element_["useState"])(null),
       
 35827       _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
       
 35828       urlInput = _useState6[0],
       
 35829       setUrlInput = _useState6[1];
       
 35830 
       
 35831   var autocompleteRef = Object(external_this_wp_element_["useRef"])(null);
       
 35832 
       
 35833   var stopPropagation = function stopPropagation(event) {
       
 35834     event.stopPropagation();
       
 35835   };
       
 35836 
       
 35837   var stopPropagationRelevantKeys = function stopPropagationRelevantKeys(event) {
       
 35838     if ([external_this_wp_keycodes_["LEFT"], external_this_wp_keycodes_["DOWN"], external_this_wp_keycodes_["RIGHT"], external_this_wp_keycodes_["UP"], external_this_wp_keycodes_["BACKSPACE"], external_this_wp_keycodes_["ENTER"]].indexOf(event.keyCode) > -1) {
       
 35839       // Stop the key event from propagating up to ObserveTyping.startTypingInTextField.
       
 35840       event.stopPropagation();
       
 35841     }
       
 35842   };
       
 35843 
       
 35844   var startEditLink = Object(external_this_wp_element_["useCallback"])(function () {
       
 35845     if (linkDestination === LINK_DESTINATION_MEDIA || linkDestination === LINK_DESTINATION_ATTACHMENT) {
 35504     if (linkDestination === LINK_DESTINATION_MEDIA || linkDestination === LINK_DESTINATION_ATTACHMENT) {
 35846       setUrlInput('');
 35505       setUrlInput('');
 35847     }
 35506     }
 35848 
 35507 
 35849     setIsEditingLink(true);
 35508     setIsEditingLink(true);
 35850   });
 35509   });
 35851   var stopEditLink = Object(external_this_wp_element_["useCallback"])(function () {
 35510   const stopEditLink = Object(external_wp_element_["useCallback"])(() => {
 35852     setIsEditingLink(false);
 35511     setIsEditingLink(false);
 35853   });
 35512   });
 35854   var closeLinkUI = Object(external_this_wp_element_["useCallback"])(function () {
 35513   const closeLinkUI = Object(external_wp_element_["useCallback"])(() => {
 35855     setUrlInput(null);
 35514     setUrlInput(null);
 35856     stopEditLink();
 35515     stopEditLink();
 35857     setIsOpen(false);
 35516     setIsOpen(false);
 35858   });
 35517   });
 35859 
 35518 
 35860   var removeNewTabRel = function removeNewTabRel(currentRel) {
 35519   const removeNewTabRel = currentRel => {
 35861     var newRel = currentRel;
 35520     let newRel = currentRel;
 35862 
 35521 
 35863     if (currentRel !== undefined && !Object(external_this_lodash_["isEmpty"])(newRel)) {
 35522     if (currentRel !== undefined && !Object(external_lodash_["isEmpty"])(newRel)) {
 35864       if (!Object(external_this_lodash_["isEmpty"])(newRel)) {
 35523       if (!Object(external_lodash_["isEmpty"])(newRel)) {
 35865         Object(external_this_lodash_["each"])(NEW_TAB_REL, function (relVal) {
 35524         Object(external_lodash_["each"])(NEW_TAB_REL, relVal => {
 35866           var regExp = new RegExp('\\b' + relVal + '\\b', 'gi');
 35525           const regExp = new RegExp('\\b' + relVal + '\\b', 'gi');
 35867           newRel = newRel.replace(regExp, '');
 35526           newRel = newRel.replace(regExp, '');
 35868         }); // Only trim if NEW_TAB_REL values was replaced.
 35527         }); // Only trim if NEW_TAB_REL values was replaced.
 35869 
 35528 
 35870         if (newRel !== currentRel) {
 35529         if (newRel !== currentRel) {
 35871           newRel = newRel.trim();
 35530           newRel = newRel.trim();
 35872         }
 35531         }
 35873 
 35532 
 35874         if (Object(external_this_lodash_["isEmpty"])(newRel)) {
 35533         if (Object(external_lodash_["isEmpty"])(newRel)) {
 35875           newRel = undefined;
 35534           newRel = undefined;
 35876         }
 35535         }
 35877       }
 35536       }
 35878     }
 35537     }
 35879 
 35538 
 35880     return newRel;
 35539     return newRel;
 35881   };
 35540   };
 35882 
 35541 
 35883   var getUpdatedLinkTargetSettings = function getUpdatedLinkTargetSettings(value) {
 35542   const getUpdatedLinkTargetSettings = value => {
 35884     var newLinkTarget = value ? '_blank' : undefined;
 35543     const newLinkTarget = value ? '_blank' : undefined;
 35885     var updatedRel;
 35544     let updatedRel;
 35886 
 35545 
 35887     if (!newLinkTarget && !rel) {
 35546     if (!newLinkTarget && !rel) {
 35888       updatedRel = undefined;
 35547       updatedRel = undefined;
 35889     } else {
 35548     } else {
 35890       updatedRel = removeNewTabRel(rel);
 35549       updatedRel = removeNewTabRel(rel);
 35894       linkTarget: newLinkTarget,
 35553       linkTarget: newLinkTarget,
 35895       rel: updatedRel
 35554       rel: updatedRel
 35896     };
 35555     };
 35897   };
 35556   };
 35898 
 35557 
 35899   var onFocusOutside = Object(external_this_wp_element_["useCallback"])(function () {
 35558   const onFocusOutside = Object(external_wp_element_["useCallback"])(() => {
 35900     return function (event) {
 35559     return event => {
 35901       // The autocomplete suggestions list renders in a separate popover (in a portal),
 35560       // The autocomplete suggestions list renders in a separate popover (in a portal),
 35902       // so onFocusOutside fails to detect that a click on a suggestion occurred in the
 35561       // so onFocusOutside fails to detect that a click on a suggestion occurred in the
 35903       // LinkContainer. Detect clicks on autocomplete suggestions using a ref here, and
 35562       // LinkContainer. Detect clicks on autocomplete suggestions using a ref here, and
 35904       // return to avoid the popover being closed.
 35563       // return to avoid the popover being closed.
 35905       var autocompleteElement = autocompleteRef.current;
 35564       const autocompleteElement = autocompleteRef.current;
 35906 
 35565 
 35907       if (autocompleteElement && autocompleteElement.contains(event.target)) {
 35566       if (autocompleteElement && autocompleteElement.contains(event.target)) {
 35908         return;
 35567         return;
 35909       }
 35568       }
 35910 
 35569 
 35911       setIsOpen(false);
 35570       setIsOpen(false);
 35912       setUrlInput(null);
 35571       setUrlInput(null);
 35913       stopEditLink();
 35572       stopEditLink();
 35914     };
 35573     };
 35915   });
 35574   });
 35916   var onSubmitLinkChange = Object(external_this_wp_element_["useCallback"])(function () {
 35575   const onSubmitLinkChange = Object(external_wp_element_["useCallback"])(() => {
 35917     return function (event) {
 35576     return event => {
 35918       if (urlInput) {
 35577       if (urlInput) {
       
 35578         var _getLinkDestinations$;
       
 35579 
       
 35580         // It is possible the entered URL actually matches a named link destination.
       
 35581         // This check will ensure our link destination is correct.
       
 35582         const selectedDestination = ((_getLinkDestinations$ = getLinkDestinations().find(destination => destination.url === urlInput)) === null || _getLinkDestinations$ === void 0 ? void 0 : _getLinkDestinations$.linkDestination) || LINK_DESTINATION_CUSTOM;
 35919         onChangeUrl({
 35583         onChangeUrl({
 35920           href: urlInput
 35584           href: urlInput,
       
 35585           linkDestination: selectedDestination
 35921         });
 35586         });
 35922       }
 35587       }
 35923 
 35588 
 35924       stopEditLink();
 35589       stopEditLink();
 35925       setUrlInput(null);
 35590       setUrlInput(null);
 35926       event.preventDefault();
 35591       event.preventDefault();
 35927     };
 35592     };
 35928   });
 35593   });
 35929   var onLinkRemove = Object(external_this_wp_element_["useCallback"])(function () {
 35594   const onLinkRemove = Object(external_wp_element_["useCallback"])(() => {
 35930     onChangeUrl({
 35595     onChangeUrl({
 35931       linkDestination: LINK_DESTINATION_NONE,
 35596       linkDestination: LINK_DESTINATION_NONE,
 35932       href: ''
 35597       href: ''
 35933     });
 35598     });
 35934   });
 35599   });
 35935 
 35600 
 35936   var getLinkDestinations = function getLinkDestinations() {
 35601   const getLinkDestinations = () => {
 35937     return [{
 35602     const linkDestinations = [{
 35938       linkDestination: LINK_DESTINATION_MEDIA,
 35603       linkDestination: LINK_DESTINATION_MEDIA,
 35939       title: Object(external_this_wp_i18n_["__"])('Media File'),
 35604       title: Object(external_wp_i18n_["__"])('Media File'),
 35940       url: mediaType === 'image' ? mediaUrl : undefined,
 35605       url: mediaType === 'image' ? mediaUrl : undefined,
 35941       icon: image_url_input_ui_icon
 35606       icon: image_url_input_ui_icon
 35942     }, {
       
 35943       linkDestination: LINK_DESTINATION_ATTACHMENT,
       
 35944       title: Object(external_this_wp_i18n_["__"])('Attachment Page'),
       
 35945       url: mediaType === 'image' ? mediaLink : undefined,
       
 35946       icon: Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
       
 35947         viewBox: "0 0 24 24",
       
 35948         xmlns: "http://www.w3.org/2000/svg"
       
 35949       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
       
 35950         d: "M0 0h24v24H0V0z",
       
 35951         fill: "none"
       
 35952       }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
       
 35953         d: "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"
       
 35954       }))
       
 35955     }];
 35607     }];
       
 35608 
       
 35609     if (mediaType === 'image' && mediaLink) {
       
 35610       linkDestinations.push({
       
 35611         linkDestination: LINK_DESTINATION_ATTACHMENT,
       
 35612         title: Object(external_wp_i18n_["__"])('Attachment Page'),
       
 35613         url: mediaType === 'image' ? mediaLink : undefined,
       
 35614         icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
       
 35615           viewBox: "0 0 24 24",
       
 35616           xmlns: "http://www.w3.org/2000/svg"
       
 35617         }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
       
 35618           d: "M0 0h24v24H0V0z",
       
 35619           fill: "none"
       
 35620         }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
       
 35621           d: "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"
       
 35622         }))
       
 35623       });
       
 35624     }
       
 35625 
       
 35626     return linkDestinations;
 35956   };
 35627   };
 35957 
 35628 
 35958   var onSetHref = function onSetHref(value) {
 35629   const onSetHref = value => {
 35959     var linkDestinations = getLinkDestinations();
 35630     const linkDestinations = getLinkDestinations();
 35960     var linkDestinationInput;
 35631     let linkDestinationInput;
 35961 
 35632 
 35962     if (!value) {
 35633     if (!value) {
 35963       linkDestinationInput = LINK_DESTINATION_NONE;
 35634       linkDestinationInput = LINK_DESTINATION_NONE;
 35964     } else {
 35635     } else {
 35965       linkDestinationInput = (Object(external_this_lodash_["find"])(linkDestinations, function (destination) {
 35636       linkDestinationInput = (Object(external_lodash_["find"])(linkDestinations, destination => {
 35966         return destination.url === value;
 35637         return destination.url === value;
 35967       }) || {
 35638       }) || {
 35968         linkDestination: LINK_DESTINATION_CUSTOM
 35639         linkDestination: LINK_DESTINATION_CUSTOM
 35969       }).linkDestination;
 35640       }).linkDestination;
 35970     }
 35641     }
 35973       linkDestination: linkDestinationInput,
 35644       linkDestination: linkDestinationInput,
 35974       href: value
 35645       href: value
 35975     });
 35646     });
 35976   };
 35647   };
 35977 
 35648 
 35978   var onSetNewTab = function onSetNewTab(value) {
 35649   const onSetNewTab = value => {
 35979     var updatedLinkTarget = getUpdatedLinkTargetSettings(value);
 35650     const updatedLinkTarget = getUpdatedLinkTargetSettings(value);
 35980     onChangeUrl(updatedLinkTarget);
 35651     onChangeUrl(updatedLinkTarget);
 35981   };
 35652   };
 35982 
 35653 
 35983   var onSetLinkRel = function onSetLinkRel(value) {
 35654   const onSetLinkRel = value => {
 35984     onChangeUrl({
 35655     onChangeUrl({
 35985       rel: value
 35656       rel: value
 35986     });
 35657     });
 35987   };
 35658   };
 35988 
 35659 
 35989   var onSetLinkClass = function onSetLinkClass(value) {
 35660   const onSetLinkClass = value => {
 35990     onChangeUrl({
 35661     onChangeUrl({
 35991       linkClass: value
 35662       linkClass: value
 35992     });
 35663     });
 35993   };
 35664   };
 35994 
 35665 
 35995   var advancedOptions = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToggleControl"], {
 35666   const advancedOptions = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
 35996     label: Object(external_this_wp_i18n_["__"])('Open in new tab'),
 35667     label: Object(external_wp_i18n_["__"])('Open in new tab'),
 35997     onChange: onSetNewTab,
 35668     onChange: onSetNewTab,
 35998     checked: linkTarget === '_blank'
 35669     checked: linkTarget === '_blank'
 35999   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
 35670   }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 36000     label: Object(external_this_wp_i18n_["__"])('Link Rel'),
 35671     label: Object(external_wp_i18n_["__"])('Link Rel'),
 36001     value: removeNewTabRel(rel) || '',
 35672     value: removeNewTabRel(rel) || '',
 36002     onChange: onSetLinkRel,
 35673     onChange: onSetLinkRel
 36003     onKeyPress: stopPropagation,
 35674   }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 36004     onKeyDown: stopPropagationRelevantKeys
 35675     label: Object(external_wp_i18n_["__"])('Link CSS Class'),
 36005   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
       
 36006     label: Object(external_this_wp_i18n_["__"])('Link CSS Class'),
       
 36007     value: linkClass || '',
 35676     value: linkClass || '',
 36008     onKeyPress: stopPropagation,
       
 36009     onKeyDown: stopPropagationRelevantKeys,
       
 36010     onChange: onSetLinkClass
 35677     onChange: onSetLinkClass
 36011   }));
 35678   }));
 36012   var linkEditorValue = urlInput !== null ? urlInput : url;
 35679   const linkEditorValue = urlInput !== null ? urlInput : url;
 36013   var urlLabel = (Object(external_this_lodash_["find"])(getLinkDestinations(), ['linkDestination', linkDestination]) || {}).title;
 35680   const urlLabel = (Object(external_lodash_["find"])(getLinkDestinations(), ['linkDestination', linkDestination]) || {}).title;
 36014   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
 35681   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
 36015     icon: library_link["a" /* default */],
 35682     icon: library_link["a" /* default */],
 36016     className: "components-toolbar__control",
 35683     className: "components-toolbar__control",
 36017     label: url ? Object(external_this_wp_i18n_["__"])('Edit link') : Object(external_this_wp_i18n_["__"])('Insert link'),
 35684     label: url ? Object(external_wp_i18n_["__"])('Edit link') : Object(external_wp_i18n_["__"])('Insert link'),
 36018     "aria-expanded": isOpen,
 35685     "aria-expanded": isOpen,
 36019     onClick: openLinkUI
 35686     onClick: openLinkUI
 36020   }), isOpen && Object(external_this_wp_element_["createElement"])(url_popover, {
 35687   }), isOpen && Object(external_wp_element_["createElement"])(url_popover, {
 36021     onFocusOutside: onFocusOutside(),
 35688     onFocusOutside: onFocusOutside(),
 36022     onClose: closeLinkUI,
 35689     onClose: closeLinkUI,
 36023     renderSettings: function renderSettings() {
 35690     renderSettings: () => advancedOptions,
 36024       return advancedOptions;
 35691     additionalControls: !linkEditorValue && Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], null, Object(external_lodash_["map"])(getLinkDestinations(), link => Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 36025     },
 35692       key: link.linkDestination,
 36026     additionalControls: !linkEditorValue && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NavigableMenu"], null, Object(external_this_lodash_["map"])(getLinkDestinations(), function (link) {
 35693       icon: link.icon,
 36027       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 35694       onClick: () => {
 36028         key: link.linkDestination,
 35695         setUrlInput(null);
 36029         icon: link.icon,
 35696         onSetHref(link.url);
 36030         onClick: function onClick() {
 35697         stopEditLink();
 36031           setUrlInput(null);
 35698       }
 36032           onSetHref(link.url);
 35699     }, link.title)))
 36033           stopEditLink();
 35700   }, (!url || isEditingLink) && Object(external_wp_element_["createElement"])(url_popover.LinkEditor, {
 36034         }
       
 36035       }, link.title);
       
 36036     }))
       
 36037   }, (!url || isEditingLink) && Object(external_this_wp_element_["createElement"])(url_popover.LinkEditor, {
       
 36038     className: "block-editor-format-toolbar__link-container-content",
 35701     className: "block-editor-format-toolbar__link-container-content",
 36039     value: linkEditorValue,
 35702     value: linkEditorValue,
 36040     onChangeInputValue: setUrlInput,
 35703     onChangeInputValue: setUrlInput,
 36041     onKeyDown: stopPropagationRelevantKeys,
       
 36042     onKeyPress: stopPropagation,
       
 36043     onSubmit: onSubmitLinkChange(),
 35704     onSubmit: onSubmitLinkChange(),
 36044     autocompleteRef: autocompleteRef
 35705     autocompleteRef: autocompleteRef
 36045   }), url && !isEditingLink && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(url_popover.LinkViewer, {
 35706   }), url && !isEditingLink && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(url_popover.LinkViewer, {
 36046     className: "block-editor-format-toolbar__link-container-content",
 35707     className: "block-editor-format-toolbar__link-container-content",
 36047     onKeyPress: stopPropagation,
       
 36048     url: url,
 35708     url: url,
 36049     onEditLinkClick: startEditLink,
 35709     onEditLinkClick: startEditLink,
 36050     urlLabel: urlLabel
 35710     urlLabel: urlLabel
 36051   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 35711   }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 36052     icon: library_close["a" /* default */],
 35712     icon: library_close["a" /* default */],
 36053     label: Object(external_this_wp_i18n_["__"])('Remove link'),
 35713     label: Object(external_wp_i18n_["__"])('Remove link'),
 36054     onClick: onLinkRemove
 35714     onClick: onLinkRemove
 36055   }))));
 35715   }))));
 36056 };
 35716 };
 36057 
 35717 
 36058 
 35718 
 36059 
 35719 
 36060 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
 35720 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
 36061 var library_check = __webpack_require__(155);
 35721 var library_check = __webpack_require__("RMJe");
 36062 
 35722 
 36063 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/preview-options/index.js
 35723 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/preview-options/index.js
 36064 
 35724 
 36065 
 35725 
 36066 /**
 35726 /**
 36072  */
 35732  */
 36073 
 35733 
 36074 
 35734 
 36075 
 35735 
 36076 
 35736 
 36077 function PreviewOptions(_ref) {
 35737 
 36078   var children = _ref.children,
 35738 function PreviewOptions({
 36079       className = _ref.className,
 35739   children,
 36080       _ref$isEnabled = _ref.isEnabled,
 35740   className,
 36081       isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,
 35741   isEnabled = true,
 36082       deviceType = _ref.deviceType,
 35742   deviceType,
 36083       setDeviceType = _ref.setDeviceType;
 35743   setDeviceType
 36084   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
 35744 }) {
       
 35745   const isMobile = Object(external_wp_compose_["useViewportMatch"])('small', '<');
       
 35746   if (isMobile) return null;
       
 35747   const popoverProps = {
       
 35748     className: classnames_default()(className, 'block-editor-post-preview__dropdown-content'),
       
 35749     position: 'bottom left'
       
 35750   };
       
 35751   const toggleProps = {
       
 35752     isTertiary: true,
       
 35753     className: 'block-editor-post-preview__button-toggle',
       
 35754     disabled: !isEnabled,
       
 35755 
       
 35756     /* translators: button label text should, if possible, be under 16 characters. */
       
 35757     children: Object(external_wp_i18n_["__"])('Preview')
       
 35758   };
       
 35759   return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
 36085     className: "block-editor-post-preview__dropdown",
 35760     className: "block-editor-post-preview__dropdown",
 36086     contentClassName: classnames_default()(className, 'block-editor-post-preview__dropdown-content'),
 35761     popoverProps: popoverProps,
 36087     popoverProps: {
 35762     toggleProps: toggleProps,
 36088       role: 'menu'
 35763     icon: null
 36089     },
 35764   }, () => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 36090     position: "bottom left",
 35765     className: "block-editor-post-preview__button-resize",
 36091     renderToggle: function renderToggle(_ref2) {
 35766     onClick: () => setDeviceType('Desktop'),
 36092       var isOpen = _ref2.isOpen,
 35767     icon: deviceType === 'Desktop' && library_check["a" /* default */]
 36093           onToggle = _ref2.onToggle;
 35768   }, Object(external_wp_i18n_["__"])('Desktop')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 36094       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 35769     className: "block-editor-post-preview__button-resize",
 36095         isTertiary: true,
 35770     onClick: () => setDeviceType('Tablet'),
 36096         onClick: onToggle,
 35771     icon: deviceType === 'Tablet' && library_check["a" /* default */]
 36097         className: "block-editor-post-preview__button-toggle",
 35772   }, Object(external_wp_i18n_["__"])('Tablet')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 36098         "aria-expanded": isOpen,
 35773     className: "block-editor-post-preview__button-resize",
 36099         disabled: !isEnabled
 35774     onClick: () => setDeviceType('Mobile'),
 36100       }, Object(external_this_wp_i18n_["__"])('Preview'));
 35775     icon: deviceType === 'Mobile' && library_check["a" /* default */]
 36101     },
 35776   }, Object(external_wp_i18n_["__"])('Mobile'))), children));
 36102     renderContent: function renderContent() {
       
 36103       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
       
 36104         className: "block-editor-post-preview__button-resize",
       
 36105         onClick: function onClick() {
       
 36106           return setDeviceType('Desktop');
       
 36107         },
       
 36108         icon: deviceType === 'Desktop' && library_check["a" /* default */]
       
 36109       }, Object(external_this_wp_i18n_["__"])('Desktop')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
       
 36110         className: "block-editor-post-preview__button-resize",
       
 36111         onClick: function onClick() {
       
 36112           return setDeviceType('Tablet');
       
 36113         },
       
 36114         icon: deviceType === 'Tablet' && library_check["a" /* default */]
       
 36115       }, Object(external_this_wp_i18n_["__"])('Tablet')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
       
 36116         className: "block-editor-post-preview__button-resize",
       
 36117         onClick: function onClick() {
       
 36118           return setDeviceType('Mobile');
       
 36119         },
       
 36120         icon: deviceType === 'Mobile' && library_check["a" /* default */]
       
 36121       }, Object(external_this_wp_i18n_["__"])('Mobile'))), children);
       
 36122     }
       
 36123   });
       
 36124 }
 35777 }
 36125 
 35778 
 36126 // EXTERNAL MODULE: ./node_modules/css-mediaquery/index.js
 35779 // EXTERNAL MODULE: ./node_modules/css-mediaquery/index.js
 36127 var css_mediaquery = __webpack_require__(265);
 35780 var css_mediaquery = __webpack_require__("6fKw");
 36128 
 35781 
 36129 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-simulated-media-query/index.js
 35782 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-simulated-media-query/index.js
 36130 /**
 35783 /**
 36131  * External dependencies
 35784  * External dependencies
 36132  */
 35785  */
 36136  * WordPress dependencies
 35789  * WordPress dependencies
 36137  */
 35790  */
 36138 
 35791 
 36139 
 35792 
 36140 
 35793 
 36141 var ENABLED_MEDIA_QUERY = '(min-width:0px)';
 35794 const ENABLED_MEDIA_QUERY = '(min-width:0px)';
 36142 var DISABLED_MEDIA_QUERY = '(min-width:999999px)';
 35795 const DISABLED_MEDIA_QUERY = '(min-width:999999px)';
 36143 var VALID_MEDIA_QUERY_REGEX = /\((min|max)-width:[^\(]*?\)/g;
 35796 const VALID_MEDIA_QUERY_REGEX = /\((min|max)-width:[^\(]*?\)/g;
 36144 
 35797 
 36145 function getStyleSheetsThatMatchHostname() {
 35798 function getStyleSheetsThatMatchHostname() {
       
 35799   var _window$document$styl, _window, _window$document;
       
 35800 
 36146   if (typeof window === 'undefined') {
 35801   if (typeof window === 'undefined') {
 36147     return [];
 35802     return [];
 36148   }
 35803   }
 36149 
 35804 
 36150   return Object(external_this_lodash_["filter"])(Object(external_this_lodash_["get"])(window, ['document', 'styleSheets'], []), function (styleSheet) {
 35805   return Object(external_lodash_["filter"])((_window$document$styl = (_window = window) === null || _window === void 0 ? void 0 : (_window$document = _window.document) === null || _window$document === void 0 ? void 0 : _window$document.styleSheets) !== null && _window$document$styl !== void 0 ? _window$document$styl : [], styleSheet => {
 36151     if (!styleSheet.href) {
 35806     if (!styleSheet.href) {
 36152       return false;
 35807       return false;
 36153     }
 35808     }
 36154 
 35809 
 36155     return Object(external_this_wp_url_["getProtocol"])(styleSheet.href) === window.location.protocol && Object(external_this_wp_url_["getAuthority"])(styleSheet.href) === window.location.host;
 35810     return Object(external_wp_url_["getProtocol"])(styleSheet.href) === window.location.protocol && Object(external_wp_url_["getAuthority"])(styleSheet.href) === window.location.host;
 36156   });
 35811   });
 36157 }
 35812 }
 36158 
 35813 
 36159 function isReplaceableMediaRule(rule) {
 35814 function isReplaceableMediaRule(rule) {
 36160   if (!rule.media) {
 35815   if (!rule.media) {
 36169   styleSheet.deleteRule(index);
 35824   styleSheet.deleteRule(index);
 36170   styleSheet.insertRule(newRuleText, index);
 35825   styleSheet.insertRule(newRuleText, index);
 36171 }
 35826 }
 36172 
 35827 
 36173 function replaceMediaQueryWithWidthEvaluation(ruleText, widthValue) {
 35828 function replaceMediaQueryWithWidthEvaluation(ruleText, widthValue) {
 36174   return ruleText.replace(VALID_MEDIA_QUERY_REGEX, function (matchedSubstring) {
 35829   return ruleText.replace(VALID_MEDIA_QUERY_REGEX, matchedSubstring => {
 36175     if (Object(css_mediaquery["match"])(matchedSubstring, {
 35830     if (Object(css_mediaquery["match"])(matchedSubstring, {
 36176       type: 'screen',
 35831       type: 'screen',
 36177       width: widthValue
 35832       width: widthValue
 36178     })) {
 35833     })) {
 36179       return ENABLED_MEDIA_QUERY;
 35834       return ENABLED_MEDIA_QUERY;
 36192  *                         stylesheets will not be modified.
 35847  *                         stylesheets will not be modified.
 36193  */
 35848  */
 36194 
 35849 
 36195 
 35850 
 36196 function useSimulatedMediaQuery(marker, width) {
 35851 function useSimulatedMediaQuery(marker, width) {
 36197   Object(external_this_wp_element_["useEffect"])(function () {
 35852   Object(external_wp_element_["useEffect"])(() => {
 36198     if (!width) {
 35853     if (!width) {
 36199       return;
 35854       return;
 36200     }
 35855     }
 36201 
 35856 
 36202     var styleSheets = getStyleSheetsThatMatchHostname();
 35857     const styleSheets = getStyleSheetsThatMatchHostname();
 36203     var originalStyles = [];
 35858     const originalStyles = [];
 36204     styleSheets.forEach(function (styleSheet, styleSheetIndex) {
 35859     styleSheets.forEach((styleSheet, styleSheetIndex) => {
 36205       var relevantSection = false;
 35860       let relevantSection = false;
 36206 
 35861 
 36207       for (var ruleIndex = 0; ruleIndex < styleSheet.cssRules.length; ++ruleIndex) {
 35862       for (let ruleIndex = 0; ruleIndex < styleSheet.cssRules.length; ++ruleIndex) {
 36208         var rule = styleSheet.cssRules[ruleIndex];
 35863         const rule = styleSheet.cssRules[ruleIndex];
 36209 
 35864 
 36210         if (rule.type !== window.CSSRule.STYLE_RULE && rule.type !== window.CSSRule.MEDIA_RULE) {
 35865         if (rule.type !== window.CSSRule.STYLE_RULE && rule.type !== window.CSSRule.MEDIA_RULE) {
 36211           continue;
 35866           continue;
 36212         }
 35867         }
 36213 
 35868 
 36214         if (!relevantSection && !!rule.cssText.match(new RegExp("#start-".concat(marker)))) {
 35869         if (!relevantSection && !!rule.cssText.match(new RegExp(`#start-${marker}`))) {
 36215           relevantSection = true;
 35870           relevantSection = true;
 36216         }
 35871         }
 36217 
 35872 
 36218         if (relevantSection && !!rule.cssText.match(new RegExp("#end-".concat(marker)))) {
 35873         if (relevantSection && !!rule.cssText.match(new RegExp(`#end-${marker}`))) {
 36219           relevantSection = false;
 35874           relevantSection = false;
 36220         }
 35875         }
 36221 
 35876 
 36222         if (!relevantSection || !isReplaceableMediaRule(rule)) {
 35877         if (!relevantSection || !isReplaceableMediaRule(rule)) {
 36223           continue;
 35878           continue;
 36224         }
 35879         }
 36225 
 35880 
 36226         var ruleText = rule.cssText;
 35881         const ruleText = rule.cssText;
 36227 
 35882 
 36228         if (!originalStyles[styleSheetIndex]) {
 35883         if (!originalStyles[styleSheetIndex]) {
 36229           originalStyles[styleSheetIndex] = [];
 35884           originalStyles[styleSheetIndex] = [];
 36230         }
 35885         }
 36231 
 35886 
 36232         originalStyles[styleSheetIndex][ruleIndex] = ruleText;
 35887         originalStyles[styleSheetIndex][ruleIndex] = ruleText;
 36233         replaceRule(styleSheet, replaceMediaQueryWithWidthEvaluation(ruleText, width), ruleIndex);
 35888         replaceRule(styleSheet, replaceMediaQueryWithWidthEvaluation(ruleText, width), ruleIndex);
 36234       }
 35889       }
 36235     });
 35890     });
 36236     return function () {
 35891     return () => {
 36237       originalStyles.forEach(function (rulesCollection, styleSheetIndex) {
 35892       originalStyles.forEach((rulesCollection, styleSheetIndex) => {
 36238         if (!rulesCollection) {
 35893         if (!rulesCollection) {
 36239           return;
 35894           return;
 36240         }
 35895         }
 36241 
 35896 
 36242         for (var ruleIndex = 0; ruleIndex < rulesCollection.length; ++ruleIndex) {
 35897         for (let ruleIndex = 0; ruleIndex < rulesCollection.length; ++ruleIndex) {
 36243           var originalRuleText = rulesCollection[ruleIndex];
 35898           const originalRuleText = rulesCollection[ruleIndex];
 36244 
 35899 
 36245           if (originalRuleText) {
 35900           if (originalRuleText) {
 36246             replaceRule(styleSheets[styleSheetIndex], originalRuleText, ruleIndex);
 35901             replaceRule(styleSheets[styleSheetIndex], originalRuleText, ruleIndex);
 36247           }
 35902           }
 36248         }
 35903         }
 36250     };
 35905     };
 36251   }, [width]);
 35906   }, [width]);
 36252 }
 35907 }
 36253 
 35908 
 36254 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-resize-canvas/index.js
 35909 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-resize-canvas/index.js
 36255 
       
 36256 
       
 36257 /**
 35910 /**
 36258  * WordPress dependencies
 35911  * WordPress dependencies
 36259  */
 35912  */
 36260 
 35913 
 36261 /**
 35914 /**
 36264 
 35917 
 36265 
 35918 
 36266 /**
 35919 /**
 36267  * Function to resize the editor window.
 35920  * Function to resize the editor window.
 36268  *
 35921  *
 36269  * @param {string} deviceType Used for determining the size of the container (e.g. Desktop, Tablet, Mobile)
 35922  * @param {string}  deviceType                  Used for determining the size of the container (e.g. Desktop, Tablet, Mobile)
       
 35923  * @param {boolean} __unstableDisableSimulation Whether to disable media query simulation.
 36270  *
 35924  *
 36271  * @return {Object} Inline styles to be added to resizable container.
 35925  * @return {Object} Inline styles to be added to resizable container.
 36272  */
 35926  */
 36273 
 35927 
 36274 function useResizeCanvas(deviceType) {
 35928 function useResizeCanvas(deviceType, __unstableDisableSimulation) {
 36275   var _useState = Object(external_this_wp_element_["useState"])(window.innerWidth),
 35929   const [actualWidth, updateActualWidth] = Object(external_wp_element_["useState"])(window.innerWidth);
 36276       _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 35930   Object(external_wp_element_["useEffect"])(() => {
 36277       actualWidth = _useState2[0],
       
 36278       updateActualWidth = _useState2[1];
       
 36279 
       
 36280   Object(external_this_wp_element_["useEffect"])(function () {
       
 36281     if (deviceType === 'Desktop') {
 35931     if (deviceType === 'Desktop') {
 36282       return;
 35932       return;
 36283     }
 35933     }
 36284 
 35934 
 36285     var resizeListener = function resizeListener() {
 35935     const resizeListener = () => updateActualWidth(window.innerWidth);
 36286       return updateActualWidth(window.innerWidth);
       
 36287     };
       
 36288 
 35936 
 36289     window.addEventListener('resize', resizeListener);
 35937     window.addEventListener('resize', resizeListener);
 36290     return function () {
 35938     return () => {
 36291       window.removeEventListener('resize', resizeListener);
 35939       window.removeEventListener('resize', resizeListener);
 36292     };
 35940     };
 36293   }, [deviceType]);
 35941   }, [deviceType]);
 36294 
 35942 
 36295   var getCanvasWidth = function getCanvasWidth(device) {
 35943   const getCanvasWidth = device => {
 36296     var deviceWidth;
 35944     let deviceWidth;
 36297 
 35945 
 36298     switch (device) {
 35946     switch (device) {
 36299       case 'Tablet':
 35947       case 'Tablet':
 36300         deviceWidth = 780;
 35948         deviceWidth = 780;
 36301         break;
 35949         break;
 36309     }
 35957     }
 36310 
 35958 
 36311     return deviceWidth < actualWidth ? deviceWidth : actualWidth;
 35959     return deviceWidth < actualWidth ? deviceWidth : actualWidth;
 36312   };
 35960   };
 36313 
 35961 
 36314   var marginValue = function marginValue() {
 35962   const marginValue = () => window.innerHeight < 800 ? 36 : 72;
 36315     return window.innerHeight < 800 ? 36 : 72;
 35963 
 36316   };
 35964   const contentInlineStyles = device => {
 36317 
 35965     const height = device === 'Mobile' ? '768px' : '1024px';
 36318   var contentInlineStyles = function contentInlineStyles(device) {
       
 36319     var height = device === 'Mobile' ? '768px' : '1024px';
       
 36320 
 35966 
 36321     switch (device) {
 35967     switch (device) {
 36322       case 'Tablet':
 35968       case 'Tablet':
 36323       case 'Mobile':
 35969       case 'Mobile':
 36324         return {
 35970         return {
 36325           width: getCanvasWidth(device),
 35971           width: getCanvasWidth(device),
 36326           margin: marginValue() + 'px auto',
 35972           margin: marginValue() + 'px auto',
 36327           flexGrow: 0,
 35973           height,
 36328           height: height,
 35974           borderRadius: '2px 2px 2px 2px',
 36329           minHeight: height,
 35975           border: '1px solid #ddd',
 36330           maxHeight: height,
       
 36331           overflowY: 'auto'
 35976           overflowY: 'auto'
 36332         };
 35977         };
 36333 
 35978 
 36334       default:
 35979       default:
 36335         return null;
 35980         return null;
 36336     }
 35981     }
 36337   };
 35982   };
 36338 
 35983 
 36339   useSimulatedMediaQuery('resizable-editor-section', getCanvasWidth(deviceType));
 35984   const width = __unstableDisableSimulation ? null : getCanvasWidth(deviceType);
       
 35985   useSimulatedMediaQuery('resizable-editor-section', width);
 36340   return contentInlineStyles(deviceType);
 35986   return contentInlineStyles(deviceType);
 36341 }
 35987 }
 36342 
 35988 
 36343 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/skip-to-selected-block/index.js
 35989 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/skip-to-selected-block/index.js
 36344 
 35990 
 36353  * Internal dependencies
 35999  * Internal dependencies
 36354  */
 36000  */
 36355 
 36001 
 36356 
 36002 
 36357 
 36003 
 36358 var skip_to_selected_block_SkipToSelectedBlock = function SkipToSelectedBlock(_ref) {
 36004 
 36359   var selectedBlockClientId = _ref.selectedBlockClientId;
 36005 const SkipToSelectedBlock = ({
 36360 
 36006   selectedBlockClientId
 36361   var onClick = function onClick() {
 36007 }) => {
 36362     var selectedBlockElement = getBlockDOMNode(selectedBlockClientId);
 36008   const ref = useBlockRef(selectedBlockClientId);
 36363     selectedBlockElement.focus();
 36009 
       
 36010   const onClick = () => {
       
 36011     ref.current.focus();
 36364   };
 36012   };
 36365 
 36013 
 36366   return selectedBlockClientId && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 36014   return selectedBlockClientId ? Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 36367     isSecondary: true,
 36015     isSecondary: true,
 36368     className: "block-editor-skip-to-selected-block",
 36016     className: "block-editor-skip-to-selected-block",
 36369     onClick: onClick
 36017     onClick: onClick
 36370   }, Object(external_this_wp_i18n_["__"])('Skip to the selected block'));
 36018   }, Object(external_wp_i18n_["__"])('Skip to the selected block')) : null;
 36371 };
 36019 };
 36372 
 36020 
 36373 /* harmony default export */ var skip_to_selected_block = (Object(external_this_wp_data_["withSelect"])(function (select) {
 36021 /* harmony default export */ var skip_to_selected_block = (Object(external_wp_data_["withSelect"])(select => {
 36374   return {
 36022   return {
 36375     selectedBlockClientId: select('core/block-editor').getBlockSelectionStart()
 36023     selectedBlockClientId: select(store).getBlockSelectionStart()
 36376   };
 36024   };
 36377 })(skip_to_selected_block_SkipToSelectedBlock));
 36025 })(SkipToSelectedBlock));
 36378 
 36026 
 36379 // EXTERNAL MODULE: external {"this":["wp","wordcount"]}
 36027 // EXTERNAL MODULE: external ["wp","wordcount"]
 36380 var external_this_wp_wordcount_ = __webpack_require__(147);
 36028 var external_wp_wordcount_ = __webpack_require__("7fqt");
 36381 
 36029 
 36382 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/multi-selection-inspector/index.js
 36030 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/multi-selection-inspector/index.js
 36383 
 36031 
 36384 
 36032 
 36385 /**
 36033 /**
 36394  * Internal dependencies
 36042  * Internal dependencies
 36395  */
 36043  */
 36396 
 36044 
 36397 
 36045 
 36398 
 36046 
 36399 function MultiSelectionInspector(_ref) {
 36047 
 36400   var blocks = _ref.blocks;
 36048 function MultiSelectionInspector({
 36401   var words = Object(external_this_wp_wordcount_["count"])(Object(external_this_wp_blocks_["serialize"])(blocks), 'words');
 36049   blocks
 36402   return Object(external_this_wp_element_["createElement"])("div", {
 36050 }) {
       
 36051   const words = Object(external_wp_wordcount_["count"])(Object(external_wp_blocks_["serialize"])(blocks), 'words');
       
 36052   return Object(external_wp_element_["createElement"])("div", {
 36403     className: "block-editor-multi-selection-inspector__card"
 36053     className: "block-editor-multi-selection-inspector__card"
 36404   }, Object(external_this_wp_element_["createElement"])(BlockIcon, {
 36054   }, Object(external_wp_element_["createElement"])(BlockIcon, {
 36405     icon: library_stack,
 36055     icon: library_stack,
 36406     showColors: true
 36056     showColors: true
 36407   }), Object(external_this_wp_element_["createElement"])("div", {
 36057   }), Object(external_wp_element_["createElement"])("div", {
 36408     className: "block-editor-multi-selection-inspector__card-content"
 36058     className: "block-editor-multi-selection-inspector__card-content"
 36409   }, Object(external_this_wp_element_["createElement"])("div", {
 36059   }, Object(external_wp_element_["createElement"])("div", {
 36410     className: "block-editor-multi-selection-inspector__card-title"
 36060     className: "block-editor-multi-selection-inspector__card-title"
 36411   }, Object(external_this_wp_i18n_["sprintf"])(
 36061   }, Object(external_wp_i18n_["sprintf"])(
 36412   /* translators: %d: number of blocks */
 36062   /* translators: %d: number of blocks */
 36413   Object(external_this_wp_i18n_["_n"])('%d block', '%d blocks', blocks.length), blocks.length)), Object(external_this_wp_element_["createElement"])("div", {
 36063   Object(external_wp_i18n_["_n"])('%d block', '%d blocks', blocks.length), blocks.length)), Object(external_wp_element_["createElement"])("div", {
 36414     className: "block-editor-multi-selection-inspector__card-description"
 36064     className: "block-editor-multi-selection-inspector__card-description"
 36415   }, Object(external_this_wp_i18n_["sprintf"])(
 36065   }, Object(external_wp_i18n_["sprintf"])(
 36416   /* translators: %d: number of words */
 36066   /* translators: %d: number of words */
 36417   Object(external_this_wp_i18n_["_n"])('%d word', '%d words', words), words))));
 36067   Object(external_wp_i18n_["_n"])('%d word', '%d words', words), words))));
 36418 }
 36068 }
 36419 
 36069 
 36420 /* harmony default export */ var multi_selection_inspector = (Object(external_this_wp_data_["withSelect"])(function (select) {
 36070 /* harmony default export */ var multi_selection_inspector = (Object(external_wp_data_["withSelect"])(select => {
 36421   var _select = select('core/block-editor'),
 36071   const {
 36422       getMultiSelectedBlocks = _select.getMultiSelectedBlocks;
 36072     getMultiSelectedBlocks
 36423 
 36073   } = select(store);
 36424   return {
 36074   return {
 36425     blocks: getMultiSelectedBlocks()
 36075     blocks: getMultiSelectedBlocks()
 36426   };
 36076   };
 36427 })(MultiSelectionInspector));
 36077 })(MultiSelectionInspector));
 36428 
 36078 
 36429 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/default-style-picker/index.js
 36079 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/default-style-picker/index.js
 36430 
 36080 
 36431 
 36081 
 36432 
       
 36433 /**
       
 36434  * External dependencies
       
 36435  */
       
 36436 
       
 36437 /**
 36082 /**
 36438  * WordPress dependencies
 36083  * WordPress dependencies
 36439  */
 36084  */
 36440 
 36085 
 36441 
 36086 
 36442 
 36087 
 36443 
 36088 
 36444 
 36089 
 36445 function DefaultStylePicker(_ref) {
 36090 /**
 36446   var blockName = _ref.blockName;
 36091  * Internal dependencies
 36447 
 36092  */
 36448   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 36093 
 36449     var settings = select('core/block-editor').getSettings();
 36094 
 36450     var preferredStyleVariations = settings.__experimentalPreferredStyleVariations;
 36095 function DefaultStylePicker({
       
 36096   blockName
       
 36097 }) {
       
 36098   const {
       
 36099     preferredStyle,
       
 36100     onUpdatePreferredStyleVariations,
       
 36101     styles
       
 36102   } = Object(external_wp_data_["useSelect"])(select => {
       
 36103     var _preferredStyleVariat, _preferredStyleVariat2;
       
 36104 
       
 36105     const settings = select(store).getSettings();
       
 36106     const preferredStyleVariations = settings.__experimentalPreferredStyleVariations;
 36451     return {
 36107     return {
 36452       preferredStyle: Object(external_this_lodash_["get"])(preferredStyleVariations, ['value', blockName]),
 36108       preferredStyle: preferredStyleVariations === null || preferredStyleVariations === void 0 ? void 0 : (_preferredStyleVariat = preferredStyleVariations.value) === null || _preferredStyleVariat === void 0 ? void 0 : _preferredStyleVariat[blockName],
 36453       onUpdatePreferredStyleVariations: Object(external_this_lodash_["get"])(preferredStyleVariations, ['onChange'], null),
 36109       onUpdatePreferredStyleVariations: (_preferredStyleVariat2 = preferredStyleVariations === null || preferredStyleVariations === void 0 ? void 0 : preferredStyleVariations.onChange) !== null && _preferredStyleVariat2 !== void 0 ? _preferredStyleVariat2 : null,
 36454       styles: select('core/blocks').getBlockStyles(blockName)
 36110       styles: select(external_wp_blocks_["store"]).getBlockStyles(blockName)
 36455     };
 36111     };
 36456   }, [blockName]),
 36112   }, [blockName]);
 36457       preferredStyle = _useSelect.preferredStyle,
 36113   const selectOptions = Object(external_wp_element_["useMemo"])(() => [{
 36458       onUpdatePreferredStyleVariations = _useSelect.onUpdatePreferredStyleVariations,
 36114     label: Object(external_wp_i18n_["__"])('Not set'),
 36459       styles = _useSelect.styles;
 36115     value: ''
 36460 
 36116   }, ...styles.map(({
 36461   var selectOptions = Object(external_this_wp_element_["useMemo"])(function () {
 36117     label,
 36462     return [{
 36118     name
 36463       label: Object(external_this_wp_i18n_["__"])('Not set'),
 36119   }) => ({
 36464       value: ''
 36120     label,
 36465     }].concat(Object(toConsumableArray["a" /* default */])(styles.map(function (_ref2) {
 36121     value: name
 36466       var label = _ref2.label,
 36122   }))], [styles]);
 36467           name = _ref2.name;
 36123   const selectOnChange = Object(external_wp_element_["useCallback"])(blockStyle => {
 36468       return {
       
 36469         label: label,
       
 36470         value: name
       
 36471       };
       
 36472     })));
       
 36473   }, [styles]);
       
 36474   var selectOnChange = Object(external_this_wp_element_["useCallback"])(function (blockStyle) {
       
 36475     onUpdatePreferredStyleVariations(blockName, blockStyle);
 36124     onUpdatePreferredStyleVariations(blockName, blockStyle);
 36476   }, [blockName, onUpdatePreferredStyleVariations]);
 36125   }, [blockName, onUpdatePreferredStyleVariations]);
 36477   return onUpdatePreferredStyleVariations && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SelectControl"], {
 36126   return onUpdatePreferredStyleVariations && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
 36478     options: selectOptions,
 36127     options: selectOptions,
 36479     value: preferredStyle || '',
 36128     value: preferredStyle || '',
 36480     label: Object(external_this_wp_i18n_["__"])('Default Style'),
 36129     label: Object(external_wp_i18n_["__"])('Default Style'),
 36481     onChange: selectOnChange
 36130     onChange: selectOnChange
 36482   });
 36131   });
 36483 }
 36132 }
 36484 
 36133 
 36485 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-inspector/index.js
 36134 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-inspector/index.js
 36502 
 36151 
 36503 
 36152 
 36504 
 36153 
 36505 
 36154 
 36506 
 36155 
 36507 var block_inspector_BlockInspector = function BlockInspector(_ref) {
 36156 
 36508   var blockType = _ref.blockType,
 36157 
 36509       count = _ref.count,
 36158 
 36510       hasBlockStyles = _ref.hasBlockStyles,
 36159 const BlockInspector = ({
 36511       selectedBlockClientId = _ref.selectedBlockClientId,
 36160   showNoBlockSelectedMessage = true,
 36512       selectedBlockName = _ref.selectedBlockName,
 36161   bubblesVirtually = true
 36513       _ref$showNoBlockSelec = _ref.showNoBlockSelectedMessage,
 36162 }) => {
 36514       showNoBlockSelectedMessage = _ref$showNoBlockSelec === void 0 ? true : _ref$showNoBlockSelec;
 36163   const {
       
 36164     count,
       
 36165     hasBlockStyles,
       
 36166     selectedBlockName,
       
 36167     selectedBlockClientId,
       
 36168     blockType
       
 36169   } = Object(external_wp_data_["useSelect"])(select => {
       
 36170     const {
       
 36171       getSelectedBlockClientId,
       
 36172       getSelectedBlockCount,
       
 36173       getBlockName
       
 36174     } = select(store);
       
 36175     const {
       
 36176       getBlockStyles
       
 36177     } = select(external_wp_blocks_["store"]);
       
 36178 
       
 36179     const _selectedBlockClientId = getSelectedBlockClientId();
       
 36180 
       
 36181     const _selectedBlockName = _selectedBlockClientId && getBlockName(_selectedBlockClientId);
       
 36182 
       
 36183     const _blockType = _selectedBlockName && Object(external_wp_blocks_["getBlockType"])(_selectedBlockName);
       
 36184 
       
 36185     const blockStyles = _selectedBlockName && getBlockStyles(_selectedBlockName);
       
 36186 
       
 36187     return {
       
 36188       count: getSelectedBlockCount(),
       
 36189       selectedBlockClientId: _selectedBlockClientId,
       
 36190       selectedBlockName: _selectedBlockName,
       
 36191       blockType: _blockType,
       
 36192       hasBlockStyles: blockStyles && blockStyles.length > 0
       
 36193     };
       
 36194   }, []);
 36515 
 36195 
 36516   if (count > 1) {
 36196   if (count > 1) {
 36517     return Object(external_this_wp_element_["createElement"])("div", {
 36197     return Object(external_wp_element_["createElement"])("div", {
 36518       className: "block-editor-block-inspector"
 36198       className: "block-editor-block-inspector"
 36519     }, Object(external_this_wp_element_["createElement"])(multi_selection_inspector, null), Object(external_this_wp_element_["createElement"])(inspector_controls.Slot, {
 36199     }, Object(external_wp_element_["createElement"])(multi_selection_inspector, null), Object(external_wp_element_["createElement"])(inspector_controls.Slot, {
 36520       bubblesVirtually: true
 36200       bubblesVirtually: bubblesVirtually
 36521     }));
 36201     }));
 36522   }
 36202   }
 36523 
 36203 
 36524   var isSelectedBlockUnregistered = selectedBlockName === Object(external_this_wp_blocks_["getUnregisteredTypeHandlerName"])();
 36204   const isSelectedBlockUnregistered = selectedBlockName === Object(external_wp_blocks_["getUnregisteredTypeHandlerName"])();
 36525   /*
 36205   /*
 36526    * If the selected block is of an unregistered type, avoid showing it as an actual selection
 36206    * If the selected block is of an unregistered type, avoid showing it as an actual selection
 36527    * because we want the user to focus on the unregistered block warning, not block settings.
 36207    * because we want the user to focus on the unregistered block warning, not block settings.
 36528    */
 36208    */
 36529 
 36209 
 36530   if (!blockType || !selectedBlockClientId || isSelectedBlockUnregistered) {
 36210   if (!blockType || !selectedBlockClientId || isSelectedBlockUnregistered) {
 36531     if (showNoBlockSelectedMessage) {
 36211     if (showNoBlockSelectedMessage) {
 36532       return Object(external_this_wp_element_["createElement"])("span", {
 36212       return Object(external_wp_element_["createElement"])("span", {
 36533         className: "block-editor-block-inspector__no-blocks"
 36213         className: "block-editor-block-inspector__no-blocks"
 36534       }, Object(external_this_wp_i18n_["__"])('No block selected.'));
 36214       }, Object(external_wp_i18n_["__"])('No block selected.'));
 36535     }
 36215     }
 36536 
 36216 
 36537     return null;
 36217     return null;
 36538   }
 36218   }
 36539 
 36219 
 36540   return Object(external_this_wp_element_["createElement"])("div", {
 36220   return Object(external_wp_element_["createElement"])(BlockInspectorSingleBlock, {
       
 36221     clientId: selectedBlockClientId,
       
 36222     blockName: blockType.name,
       
 36223     hasBlockStyles: hasBlockStyles,
       
 36224     bubblesVirtually: bubblesVirtually
       
 36225   });
       
 36226 };
       
 36227 
       
 36228 const BlockInspectorSingleBlock = ({
       
 36229   clientId,
       
 36230   blockName,
       
 36231   hasBlockStyles,
       
 36232   bubblesVirtually
       
 36233 }) => {
       
 36234   const blockInformation = useBlockDisplayInformation(clientId);
       
 36235   return Object(external_wp_element_["createElement"])("div", {
 36541     className: "block-editor-block-inspector"
 36236     className: "block-editor-block-inspector"
 36542   }, Object(external_this_wp_element_["createElement"])(block_card, {
 36237   }, Object(external_wp_element_["createElement"])(block_card, blockInformation), Object(external_wp_element_["createElement"])(block_variation_transforms, {
 36543     blockType: blockType
 36238     blockClientId: clientId
 36544   }), hasBlockStyles && Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
 36239   }), hasBlockStyles && Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 36545     title: Object(external_this_wp_i18n_["__"])('Styles')
 36240     title: Object(external_wp_i18n_["__"])('Styles')
 36546   }, Object(external_this_wp_element_["createElement"])(block_styles, {
 36241   }, Object(external_wp_element_["createElement"])(block_styles, {
 36547     clientId: selectedBlockClientId
 36242     clientId: clientId
 36548   }), Object(external_this_wp_blocks_["hasBlockSupport"])(blockType.name, 'defaultStylePicker', true) && Object(external_this_wp_element_["createElement"])(DefaultStylePicker, {
 36243   }), Object(external_wp_blocks_["hasBlockSupport"])(blockName, 'defaultStylePicker', true) && Object(external_wp_element_["createElement"])(DefaultStylePicker, {
 36549     blockName: blockType.name
 36244     blockName: blockName
 36550   }))), Object(external_this_wp_element_["createElement"])(inspector_controls.Slot, {
 36245   }))), Object(external_wp_element_["createElement"])(inspector_controls.Slot, {
 36551     bubblesVirtually: true
 36246     bubblesVirtually: bubblesVirtually
 36552   }), Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_element_["createElement"])(block_inspector_AdvancedControls, {
 36247   }), Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(AdvancedControls, {
 36553     slotName: inspector_advanced_controls.slotName
 36248     slotName: inspector_advanced_controls.slotName,
 36554   })), Object(external_this_wp_element_["createElement"])(skip_to_selected_block, {
 36249     bubblesVirtually: bubblesVirtually
       
 36250   })), Object(external_wp_element_["createElement"])(skip_to_selected_block, {
 36555     key: "back"
 36251     key: "back"
 36556   }));
 36252   }));
 36557 };
 36253 };
 36558 
 36254 
 36559 var block_inspector_AdvancedControls = function AdvancedControls(_ref2) {
 36255 const AdvancedControls = ({
 36560   var slotName = _ref2.slotName;
 36256   slotName,
 36561   var slot = Object(external_this_wp_components_["__experimentalUseSlot"])(slotName);
 36257   bubblesVirtually
 36562   var hasFills = Boolean(slot.fills && slot.fills.length);
 36258 }) => {
       
 36259   const slot = Object(external_wp_components_["__experimentalUseSlot"])(slotName);
       
 36260   const hasFills = Boolean(slot.fills && slot.fills.length);
 36563 
 36261 
 36564   if (!hasFills) {
 36262   if (!hasFills) {
 36565     return null;
 36263     return null;
 36566   }
 36264   }
 36567 
 36265 
 36568   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
 36266   return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 36569     className: "block-editor-block-inspector__advanced",
 36267     className: "block-editor-block-inspector__advanced",
 36570     title: Object(external_this_wp_i18n_["__"])('Advanced'),
 36268     title: Object(external_wp_i18n_["__"])('Advanced'),
 36571     initialOpen: false
 36269     initialOpen: false
 36572   }, Object(external_this_wp_element_["createElement"])(inspector_advanced_controls.Slot, {
 36270   }, Object(external_wp_element_["createElement"])(inspector_advanced_controls.Slot, {
 36573     bubblesVirtually: true
 36271     bubblesVirtually: bubblesVirtually
 36574   }));
 36272   }));
 36575 };
 36273 };
 36576 
 36274 
 36577 /* harmony default export */ var block_inspector = (Object(external_this_wp_data_["withSelect"])(function (select) {
 36275 /* harmony default export */ var block_inspector = (BlockInspector);
 36578   var _select = select('core/block-editor'),
 36276 
 36579       getSelectedBlockClientId = _select.getSelectedBlockClientId,
 36277 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/index.js
 36580       getSelectedBlockCount = _select.getSelectedBlockCount,
 36278 
 36581       getBlockName = _select.getBlockName;
       
 36582 
       
 36583   var _select2 = select('core/blocks'),
       
 36584       getBlockStyles = _select2.getBlockStyles;
       
 36585 
       
 36586   var selectedBlockClientId = getSelectedBlockClientId();
       
 36587   var selectedBlockName = selectedBlockClientId && getBlockName(selectedBlockClientId);
       
 36588   var blockType = selectedBlockClientId && Object(external_this_wp_blocks_["getBlockType"])(selectedBlockName);
       
 36589   var blockStyles = selectedBlockClientId && getBlockStyles(selectedBlockName);
       
 36590   return {
       
 36591     count: getSelectedBlockCount(),
       
 36592     hasBlockStyles: blockStyles && blockStyles.length > 0,
       
 36593     selectedBlockName: selectedBlockName,
       
 36594     selectedBlockClientId: selectedBlockClientId,
       
 36595     blockType: blockType
       
 36596   };
       
 36597 })(block_inspector_BlockInspector));
       
 36598 
       
 36599 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-selection-clearer/index.js
       
 36600 
       
 36601 
       
 36602 
       
 36603 
       
 36604 
       
 36605 
       
 36606 
       
 36607 
       
 36608 
       
 36609 function block_selection_clearer_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (block_selection_clearer_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 36610 
       
 36611 function block_selection_clearer_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 36612 
       
 36613 /**
       
 36614  * External dependencies
       
 36615  */
       
 36616 
 36279 
 36617 /**
 36280 /**
 36618  * WordPress dependencies
 36281  * WordPress dependencies
 36619  */
 36282  */
 36620 
 36283 
 36621 
 36284 
 36622 
 36285 
 36623 
 36286 /**
 36624 
 36287  * Internal dependencies
 36625 var block_selection_clearer_BlockSelectionClearer = /*#__PURE__*/function (_Component) {
 36288  */
 36626   Object(inherits["a" /* default */])(BlockSelectionClearer, _Component);
 36289 
 36627 
 36290 
 36628   var _super = block_selection_clearer_createSuper(BlockSelectionClearer);
 36291 
 36629 
 36292 
 36630   function BlockSelectionClearer() {
 36293 
 36631     var _this;
 36294 
 36632 
 36295 /**
 36633     Object(classCallCheck["a" /* default */])(this, BlockSelectionClearer);
 36296  * Renders block tools (the block toolbar, select/navigation mode toolbar, the
 36634 
 36297  * insertion point and a slot for the inline rich text toolbar). Must be wrapped
 36635     _this = _super.apply(this, arguments);
 36298  * around the block content and editor styles wrapper or iframe.
 36636     _this.bindContainer = _this.bindContainer.bind(Object(assertThisInitialized["a" /* default */])(_this));
 36299  *
 36637     _this.clearSelectionIfFocusTarget = _this.clearSelectionIfFocusTarget.bind(Object(assertThisInitialized["a" /* default */])(_this));
 36300  * @param {Object} $0          Props.
 36638     return _this;
 36301  * @param {Object} $0.children The block content and style container.
 36639   }
 36302  * @param {Object} $0.__unstableContentRef Ref holding the content scroll container.
 36640 
 36303  */
 36641   Object(createClass["a" /* default */])(BlockSelectionClearer, [{
 36304 
 36642     key: "bindContainer",
 36305 function BlockTools({
 36643     value: function bindContainer(ref) {
 36306   children,
 36644       this.container = ref;
 36307   __unstableContentRef
 36645     }
 36308 }) {
 36646     /**
 36309   const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
 36647      * Clears the selected block on focus if the container is the target of the
 36310   const hasFixedToolbar = Object(external_wp_data_["useSelect"])(select => select(store).getSettings().hasFixedToolbar, []);
 36648      * focus. This assumes no other descendents have received focus until event
 36311   return Object(external_wp_element_["createElement"])(InsertionPoint, {
 36649      * has bubbled to the container.
 36312     __unstableContentRef: __unstableContentRef
 36650      *
 36313   }, (hasFixedToolbar || !isLargeViewport) && Object(external_wp_element_["createElement"])(block_contextual_toolbar, {
 36651      * @param {FocusEvent} event Focus event.
 36314     isFixed: true
 36652      */
 36315   }), Object(external_wp_element_["createElement"])(WrappedBlockPopover, {
 36653 
 36316     __unstableContentRef: __unstableContentRef
 36654   }, {
 36317   }), Object(external_wp_element_["createElement"])(external_wp_components_["Popover"].Slot, {
 36655     key: "clearSelectionIfFocusTarget",
 36318     name: "block-toolbar",
 36656     value: function clearSelectionIfFocusTarget(event) {
 36319     ref: usePopoverScroll(__unstableContentRef)
 36657       var _this$props = this.props,
 36320   }), children);
 36658           hasSelectedBlock = _this$props.hasSelectedBlock,
 36321 }
 36659           hasMultiSelection = _this$props.hasMultiSelection,
       
 36660           clearSelectedBlock = _this$props.clearSelectedBlock;
       
 36661       var hasSelection = hasSelectedBlock || hasMultiSelection;
       
 36662 
       
 36663       if (event.target === this.container && hasSelection) {
       
 36664         clearSelectedBlock();
       
 36665       }
       
 36666     }
       
 36667   }, {
       
 36668     key: "render",
       
 36669     value: function render() {
       
 36670       return Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
       
 36671         tabIndex: -1,
       
 36672         onFocus: this.clearSelectionIfFocusTarget,
       
 36673         ref: this.bindContainer
       
 36674       }, Object(external_this_lodash_["omit"])(this.props, ['clearSelectedBlock', 'hasSelectedBlock', 'hasMultiSelection'])));
       
 36675     }
       
 36676   }]);
       
 36677 
       
 36678   return BlockSelectionClearer;
       
 36679 }(external_this_wp_element_["Component"]);
       
 36680 
       
 36681 /* harmony default export */ var block_selection_clearer = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
       
 36682   var _select = select('core/block-editor'),
       
 36683       hasSelectedBlock = _select.hasSelectedBlock,
       
 36684       hasMultiSelection = _select.hasMultiSelection;
       
 36685 
       
 36686   return {
       
 36687     hasSelectedBlock: hasSelectedBlock(),
       
 36688     hasMultiSelection: hasMultiSelection()
       
 36689   };
       
 36690 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
 36691   var _dispatch = dispatch('core/block-editor'),
       
 36692       clearSelectedBlock = _dispatch.clearSelectedBlock;
       
 36693 
       
 36694   return {
       
 36695     clearSelectedBlock: clearSelectedBlock
       
 36696   };
       
 36697 })])(block_selection_clearer_BlockSelectionClearer));
       
 36698 
 36322 
 36699 // EXTERNAL MODULE: ./node_modules/traverse/index.js
 36323 // EXTERNAL MODULE: ./node_modules/traverse/index.js
 36700 var traverse = __webpack_require__(266);
 36324 var traverse = __webpack_require__("eGrx");
 36701 var traverse_default = /*#__PURE__*/__webpack_require__.n(traverse);
 36325 var traverse_default = /*#__PURE__*/__webpack_require__.n(traverse);
 36702 
 36326 
 36703 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/ast/parse.js
 36327 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/ast/parse.js
 36704 
       
 36705 
       
 36706 /* eslint-disable @wordpress/no-unused-vars-before-return */
 36328 /* eslint-disable @wordpress/no-unused-vars-before-return */
 36707 // Adapted from https://github.com/reworkcss/css
 36329 // Adapted from https://github.com/reworkcss/css
 36708 // because we needed to remove source map support.
 36330 // because we needed to remove source map support.
 36709 // http://www.w3.org/TR/CSS21/grammar.htm
 36331 // http://www.w3.org/TR/CSS21/grammar.htm
 36710 // https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
 36332 // https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
 36711 var commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
 36333 const commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
 36712 /* harmony default export */ var parse = (function (css, options) {
 36334 /* harmony default export */ var parse = (function (css, options) {
 36713   options = options || {};
 36335   options = options || {};
 36714   /**
 36336   /**
 36715    * Positional.
 36337    * Positional.
 36716    */
 36338    */
 36717 
 36339 
 36718   var lineno = 1;
 36340   let lineno = 1;
 36719   var column = 1;
 36341   let column = 1;
 36720   /**
 36342   /**
 36721    * Update lineno and column based on `str`.
 36343    * Update lineno and column based on `str`.
 36722    */
 36344    */
 36723 
 36345 
 36724   function updatePosition(str) {
 36346   function updatePosition(str) {
 36725     var lines = str.match(/\n/g);
 36347     const lines = str.match(/\n/g);
 36726 
 36348 
 36727     if (lines) {
 36349     if (lines) {
 36728       lineno += lines.length;
 36350       lineno += lines.length;
 36729     }
 36351     }
 36730 
 36352 
 36731     var i = str.lastIndexOf('\n'); // eslint-disable-next-line no-bitwise
 36353     const i = str.lastIndexOf('\n'); // eslint-disable-next-line no-bitwise
 36732 
 36354 
 36733     column = ~i ? str.length - i : column + str.length;
 36355     column = ~i ? str.length - i : column + str.length;
 36734   }
 36356   }
 36735   /**
 36357   /**
 36736    * Mark position and patch `node.position`.
 36358    * Mark position and patch `node.position`.
 36737    */
 36359    */
 36738 
 36360 
 36739 
 36361 
 36740   function position() {
 36362   function position() {
 36741     var start = {
 36363     const start = {
 36742       line: lineno,
 36364       line: lineno,
 36743       column: column
 36365       column
 36744     };
 36366     };
 36745     return function (node) {
 36367     return function (node) {
 36746       node.position = new Position(start);
 36368       node.position = new Position(start);
 36747       whitespace();
 36369       whitespace();
 36748       return node;
 36370       return node;
 36755 
 36377 
 36756   function Position(start) {
 36378   function Position(start) {
 36757     this.start = start;
 36379     this.start = start;
 36758     this.end = {
 36380     this.end = {
 36759       line: lineno,
 36381       line: lineno,
 36760       column: column
 36382       column
 36761     };
 36383     };
 36762     this.source = options.source;
 36384     this.source = options.source;
 36763   }
 36385   }
 36764   /**
 36386   /**
 36765    * Non-enumerable source string
 36387    * Non-enumerable source string
 36769   Position.prototype.content = css;
 36391   Position.prototype.content = css;
 36770   /**
 36392   /**
 36771    * Error `msg`.
 36393    * Error `msg`.
 36772    */
 36394    */
 36773 
 36395 
 36774   var errorsList = [];
 36396   const errorsList = [];
 36775 
 36397 
 36776   function error(msg) {
 36398   function error(msg) {
 36777     var err = new Error(options.source + ':' + lineno + ':' + column + ': ' + msg);
 36399     const err = new Error(options.source + ':' + lineno + ':' + column + ': ' + msg);
 36778     err.reason = msg;
 36400     err.reason = msg;
 36779     err.filename = options.source;
 36401     err.filename = options.source;
 36780     err.line = lineno;
 36402     err.line = lineno;
 36781     err.column = column;
 36403     err.column = column;
 36782     err.source = css;
 36404     err.source = css;
 36791    * Parse stylesheet.
 36413    * Parse stylesheet.
 36792    */
 36414    */
 36793 
 36415 
 36794 
 36416 
 36795   function stylesheet() {
 36417   function stylesheet() {
 36796     var rulesList = rules();
 36418     const rulesList = rules();
 36797     return {
 36419     return {
 36798       type: 'stylesheet',
 36420       type: 'stylesheet',
 36799       stylesheet: {
 36421       stylesheet: {
 36800         source: options.source,
 36422         source: options.source,
 36801         rules: rulesList,
 36423         rules: rulesList,
 36823    * Parse ruleset.
 36445    * Parse ruleset.
 36824    */
 36446    */
 36825 
 36447 
 36826 
 36448 
 36827   function rules() {
 36449   function rules() {
 36828     var node;
 36450     let node;
 36829     var accumulator = [];
 36451     const accumulator = [];
 36830     whitespace();
 36452     whitespace();
 36831     comments(accumulator);
 36453     comments(accumulator);
 36832 
 36454 
 36833     while (css.length && css.charAt(0) !== '}' && (node = atrule() || rule())) {
 36455     while (css.length && css.charAt(0) !== '}' && (node = atrule() || rule())) {
 36834       if (node !== false) {
 36456       if (node !== false) {
 36843    * Match `re` and return captures.
 36465    * Match `re` and return captures.
 36844    */
 36466    */
 36845 
 36467 
 36846 
 36468 
 36847   function match(re) {
 36469   function match(re) {
 36848     var m = re.exec(css);
 36470     const m = re.exec(css);
 36849 
 36471 
 36850     if (!m) {
 36472     if (!m) {
 36851       return;
 36473       return;
 36852     }
 36474     }
 36853 
 36475 
 36854     var str = m[0];
 36476     const str = m[0];
 36855     updatePosition(str);
 36477     updatePosition(str);
 36856     css = css.slice(str.length);
 36478     css = css.slice(str.length);
 36857     return m;
 36479     return m;
 36858   }
 36480   }
 36859   /**
 36481   /**
 36868    * Parse comments;
 36490    * Parse comments;
 36869    */
 36491    */
 36870 
 36492 
 36871 
 36493 
 36872   function comments(accumulator) {
 36494   function comments(accumulator) {
 36873     var c;
 36495     let c;
 36874     accumulator = accumulator || []; // eslint-disable-next-line no-cond-assign
 36496     accumulator = accumulator || []; // eslint-disable-next-line no-cond-assign
 36875 
 36497 
 36876     while (c = comment()) {
 36498     while (c = comment()) {
 36877       if (c !== false) {
 36499       if (c !== false) {
 36878         accumulator.push(c);
 36500         accumulator.push(c);
 36885    * Parse comment.
 36507    * Parse comment.
 36886    */
 36508    */
 36887 
 36509 
 36888 
 36510 
 36889   function comment() {
 36511   function comment() {
 36890     var pos = position();
 36512     const pos = position();
 36891 
 36513 
 36892     if ('/' !== css.charAt(0) || '*' !== css.charAt(1)) {
 36514     if ('/' !== css.charAt(0) || '*' !== css.charAt(1)) {
 36893       return;
 36515       return;
 36894     }
 36516     }
 36895 
 36517 
 36896     var i = 2;
 36518     let i = 2;
 36897 
 36519 
 36898     while ('' !== css.charAt(i) && ('*' !== css.charAt(i) || '/' !== css.charAt(i + 1))) {
 36520     while ('' !== css.charAt(i) && ('*' !== css.charAt(i) || '/' !== css.charAt(i + 1))) {
 36899       ++i;
 36521       ++i;
 36900     }
 36522     }
 36901 
 36523 
 36903 
 36525 
 36904     if ('' === css.charAt(i - 1)) {
 36526     if ('' === css.charAt(i - 1)) {
 36905       return error('End of comment missing');
 36527       return error('End of comment missing');
 36906     }
 36528     }
 36907 
 36529 
 36908     var str = css.slice(2, i - 2);
 36530     const str = css.slice(2, i - 2);
 36909     column += 2;
 36531     column += 2;
 36910     updatePosition(str);
 36532     updatePosition(str);
 36911     css = css.slice(i);
 36533     css = css.slice(i);
 36912     column += 2;
 36534     column += 2;
 36913     return pos({
 36535     return pos({
 36919    * Parse selector.
 36541    * Parse selector.
 36920    */
 36542    */
 36921 
 36543 
 36922 
 36544 
 36923   function selector() {
 36545   function selector() {
 36924     var m = match(/^([^{]+)/);
 36546     const m = match(/^([^{]+)/);
 36925 
 36547 
 36926     if (!m) {
 36548     if (!m) {
 36927       return;
 36549       return;
 36928     } // FIXME: Remove all comments from selectors http://ostermiller.org/findcomment.html
 36550     } // FIXME: Remove all comments from selectors http://ostermiller.org/findcomment.html
 36929 
 36551 
 36930 
 36552 
 36931     return trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, '').replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function (matched) {
 36553     return trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, '').replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function (matched) {
 36932       return matched.replace(/,/g, "\u200C");
 36554       return matched.replace(/,/g, '\u200C');
 36933     }).split(/\s*(?![^(]*\)),\s*/).map(function (s) {
 36555     }).split(/\s*(?![^(]*\)),\s*/).map(function (s) {
 36934       return s.replace(/\u200C/g, ',');
 36556       return s.replace(/\u200C/g, ',');
 36935     });
 36557     });
 36936   }
 36558   }
 36937   /**
 36559   /**
 36938    * Parse declaration.
 36560    * Parse declaration.
 36939    */
 36561    */
 36940 
 36562 
 36941 
 36563 
 36942   function declaration() {
 36564   function declaration() {
 36943     var pos = position(); // prop
 36565     const pos = position(); // prop
 36944 
 36566 
 36945     var prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
 36567     let prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
 36946 
 36568 
 36947     if (!prop) {
 36569     if (!prop) {
 36948       return;
 36570       return;
 36949     }
 36571     }
 36950 
 36572 
 36953     if (!match(/^:\s*/)) {
 36575     if (!match(/^:\s*/)) {
 36954       return error("property missing ':'");
 36576       return error("property missing ':'");
 36955     } // val
 36577     } // val
 36956 
 36578 
 36957 
 36579 
 36958     var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);
 36580     const val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);
 36959     var ret = pos({
 36581     const ret = pos({
 36960       type: 'declaration',
 36582       type: 'declaration',
 36961       property: prop.replace(commentre, ''),
 36583       property: prop.replace(commentre, ''),
 36962       value: val ? trim(val[0]).replace(commentre, '') : ''
 36584       value: val ? trim(val[0]).replace(commentre, '') : ''
 36963     }); // ;
 36585     }); // ;
 36964 
 36586 
 36969    * Parse declarations.
 36591    * Parse declarations.
 36970    */
 36592    */
 36971 
 36593 
 36972 
 36594 
 36973   function declarations() {
 36595   function declarations() {
 36974     var decls = [];
 36596     const decls = [];
 36975 
 36597 
 36976     if (!open()) {
 36598     if (!open()) {
 36977       return error("missing '{'");
 36599       return error("missing '{'");
 36978     }
 36600     }
 36979 
 36601 
 36980     comments(decls); // declarations
 36602     comments(decls); // declarations
 36981 
 36603 
 36982     var decl; // eslint-disable-next-line no-cond-assign
 36604     let decl; // eslint-disable-next-line no-cond-assign
 36983 
 36605 
 36984     while (decl = declaration()) {
 36606     while (decl = declaration()) {
 36985       if (decl !== false) {
 36607       if (decl !== false) {
 36986         decls.push(decl);
 36608         decls.push(decl);
 36987         comments(decls);
 36609         comments(decls);
 36998    * Parse keyframe.
 36620    * Parse keyframe.
 36999    */
 36621    */
 37000 
 36622 
 37001 
 36623 
 37002   function keyframe() {
 36624   function keyframe() {
 37003     var m;
 36625     let m;
 37004     var vals = [];
 36626     const vals = [];
 37005     var pos = position(); // eslint-disable-next-line no-cond-assign
 36627     const pos = position(); // eslint-disable-next-line no-cond-assign
 37006 
 36628 
 37007     while (m = match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)) {
 36629     while (m = match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)) {
 37008       vals.push(m[1]);
 36630       vals.push(m[1]);
 37009       match(/^,\s*/);
 36631       match(/^,\s*/);
 37010     }
 36632     }
 37023    * Parse keyframes.
 36645    * Parse keyframes.
 37024    */
 36646    */
 37025 
 36647 
 37026 
 36648 
 37027   function atkeyframes() {
 36649   function atkeyframes() {
 37028     var pos = position();
 36650     const pos = position();
 37029     var m = match(/^@([-\w]+)?keyframes\s*/);
 36651     let m = match(/^@([-\w]+)?keyframes\s*/);
 37030 
 36652 
 37031     if (!m) {
 36653     if (!m) {
 37032       return;
 36654       return;
 37033     }
 36655     }
 37034 
 36656 
 37035     var vendor = m[1]; // identifier
 36657     const vendor = m[1]; // identifier
 37036 
 36658 
 37037     m = match(/^([-\w]+)\s*/);
 36659     m = match(/^([-\w]+)\s*/);
 37038 
 36660 
 37039     if (!m) {
 36661     if (!m) {
 37040       return error('@keyframes missing name');
 36662       return error('@keyframes missing name');
 37041     }
 36663     }
 37042 
 36664 
 37043     var name = m[1];
 36665     const name = m[1];
 37044 
 36666 
 37045     if (!open()) {
 36667     if (!open()) {
 37046       return error("@keyframes missing '{'");
 36668       return error("@keyframes missing '{'");
 37047     }
 36669     }
 37048 
 36670 
 37049     var frame;
 36671     let frame;
 37050     var frames = comments(); // eslint-disable-next-line no-cond-assign
 36672     let frames = comments(); // eslint-disable-next-line no-cond-assign
 37051 
 36673 
 37052     while (frame = keyframe()) {
 36674     while (frame = keyframe()) {
 37053       frames.push(frame);
 36675       frames.push(frame);
 37054       frames = frames.concat(comments());
 36676       frames = frames.concat(comments());
 37055     }
 36677     }
 37058       return error("@keyframes missing '}'");
 36680       return error("@keyframes missing '}'");
 37059     }
 36681     }
 37060 
 36682 
 37061     return pos({
 36683     return pos({
 37062       type: 'keyframes',
 36684       type: 'keyframes',
 37063       name: name,
 36685       name,
 37064       vendor: vendor,
 36686       vendor,
 37065       keyframes: frames
 36687       keyframes: frames
 37066     });
 36688     });
 37067   }
 36689   }
 37068   /**
 36690   /**
 37069    * Parse supports.
 36691    * Parse supports.
 37070    */
 36692    */
 37071 
 36693 
 37072 
 36694 
 37073   function atsupports() {
 36695   function atsupports() {
 37074     var pos = position();
 36696     const pos = position();
 37075     var m = match(/^@supports *([^{]+)/);
 36697     const m = match(/^@supports *([^{]+)/);
 37076 
 36698 
 37077     if (!m) {
 36699     if (!m) {
 37078       return;
 36700       return;
 37079     }
 36701     }
 37080 
 36702 
 37081     var supports = trim(m[1]);
 36703     const supports = trim(m[1]);
 37082 
 36704 
 37083     if (!open()) {
 36705     if (!open()) {
 37084       return error("@supports missing '{'");
 36706       return error("@supports missing '{'");
 37085     }
 36707     }
 37086 
 36708 
 37087     var style = comments().concat(rules());
 36709     const style = comments().concat(rules());
 37088 
 36710 
 37089     if (!close()) {
 36711     if (!close()) {
 37090       return error("@supports missing '}'");
 36712       return error("@supports missing '}'");
 37091     }
 36713     }
 37092 
 36714 
 37093     return pos({
 36715     return pos({
 37094       type: 'supports',
 36716       type: 'supports',
 37095       supports: supports,
 36717       supports,
 37096       rules: style
 36718       rules: style
 37097     });
 36719     });
 37098   }
 36720   }
 37099   /**
 36721   /**
 37100    * Parse host.
 36722    * Parse host.
 37101    */
 36723    */
 37102 
 36724 
 37103 
 36725 
 37104   function athost() {
 36726   function athost() {
 37105     var pos = position();
 36727     const pos = position();
 37106     var m = match(/^@host\s*/);
 36728     const m = match(/^@host\s*/);
 37107 
 36729 
 37108     if (!m) {
 36730     if (!m) {
 37109       return;
 36731       return;
 37110     }
 36732     }
 37111 
 36733 
 37112     if (!open()) {
 36734     if (!open()) {
 37113       return error("@host missing '{'");
 36735       return error("@host missing '{'");
 37114     }
 36736     }
 37115 
 36737 
 37116     var style = comments().concat(rules());
 36738     const style = comments().concat(rules());
 37117 
 36739 
 37118     if (!close()) {
 36740     if (!close()) {
 37119       return error("@host missing '}'");
 36741       return error("@host missing '}'");
 37120     }
 36742     }
 37121 
 36743 
 37128    * Parse media.
 36750    * Parse media.
 37129    */
 36751    */
 37130 
 36752 
 37131 
 36753 
 37132   function atmedia() {
 36754   function atmedia() {
 37133     var pos = position();
 36755     const pos = position();
 37134     var m = match(/^@media *([^{]+)/);
 36756     const m = match(/^@media *([^{]+)/);
 37135 
 36757 
 37136     if (!m) {
 36758     if (!m) {
 37137       return;
 36759       return;
 37138     }
 36760     }
 37139 
 36761 
 37140     var media = trim(m[1]);
 36762     const media = trim(m[1]);
 37141 
 36763 
 37142     if (!open()) {
 36764     if (!open()) {
 37143       return error("@media missing '{'");
 36765       return error("@media missing '{'");
 37144     }
 36766     }
 37145 
 36767 
 37146     var style = comments().concat(rules());
 36768     const style = comments().concat(rules());
 37147 
 36769 
 37148     if (!close()) {
 36770     if (!close()) {
 37149       return error("@media missing '}'");
 36771       return error("@media missing '}'");
 37150     }
 36772     }
 37151 
 36773 
 37152     return pos({
 36774     return pos({
 37153       type: 'media',
 36775       type: 'media',
 37154       media: media,
 36776       media,
 37155       rules: style
 36777       rules: style
 37156     });
 36778     });
 37157   }
 36779   }
 37158   /**
 36780   /**
 37159    * Parse custom-media.
 36781    * Parse custom-media.
 37160    */
 36782    */
 37161 
 36783 
 37162 
 36784 
 37163   function atcustommedia() {
 36785   function atcustommedia() {
 37164     var pos = position();
 36786     const pos = position();
 37165     var m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
 36787     const m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
 37166 
 36788 
 37167     if (!m) {
 36789     if (!m) {
 37168       return;
 36790       return;
 37169     }
 36791     }
 37170 
 36792 
 37178    * Parse paged media.
 36800    * Parse paged media.
 37179    */
 36801    */
 37180 
 36802 
 37181 
 36803 
 37182   function atpage() {
 36804   function atpage() {
 37183     var pos = position();
 36805     const pos = position();
 37184     var m = match(/^@page */);
 36806     const m = match(/^@page */);
 37185 
 36807 
 37186     if (!m) {
 36808     if (!m) {
 37187       return;
 36809       return;
 37188     }
 36810     }
 37189 
 36811 
 37190     var sel = selector() || [];
 36812     const sel = selector() || [];
 37191 
 36813 
 37192     if (!open()) {
 36814     if (!open()) {
 37193       return error("@page missing '{'");
 36815       return error("@page missing '{'");
 37194     }
 36816     }
 37195 
 36817 
 37196     var decls = comments(); // declarations
 36818     let decls = comments(); // declarations
 37197 
 36819 
 37198     var decl; // eslint-disable-next-line no-cond-assign
 36820     let decl; // eslint-disable-next-line no-cond-assign
 37199 
 36821 
 37200     while (decl = declaration()) {
 36822     while (decl = declaration()) {
 37201       decls.push(decl);
 36823       decls.push(decl);
 37202       decls = decls.concat(comments());
 36824       decls = decls.concat(comments());
 37203     }
 36825     }
 37216    * Parse document.
 36838    * Parse document.
 37217    */
 36839    */
 37218 
 36840 
 37219 
 36841 
 37220   function atdocument() {
 36842   function atdocument() {
 37221     var pos = position();
 36843     const pos = position();
 37222     var m = match(/^@([-\w]+)?document *([^{]+)/);
 36844     const m = match(/^@([-\w]+)?document *([^{]+)/);
 37223 
 36845 
 37224     if (!m) {
 36846     if (!m) {
 37225       return;
 36847       return;
 37226     }
 36848     }
 37227 
 36849 
 37228     var vendor = trim(m[1]);
 36850     const vendor = trim(m[1]);
 37229     var doc = trim(m[2]);
 36851     const doc = trim(m[2]);
 37230 
 36852 
 37231     if (!open()) {
 36853     if (!open()) {
 37232       return error("@document missing '{'");
 36854       return error("@document missing '{'");
 37233     }
 36855     }
 37234 
 36856 
 37235     var style = comments().concat(rules());
 36857     const style = comments().concat(rules());
 37236 
 36858 
 37237     if (!close()) {
 36859     if (!close()) {
 37238       return error("@document missing '}'");
 36860       return error("@document missing '}'");
 37239     }
 36861     }
 37240 
 36862 
 37241     return pos({
 36863     return pos({
 37242       type: 'document',
 36864       type: 'document',
 37243       document: doc,
 36865       document: doc,
 37244       vendor: vendor,
 36866       vendor,
 37245       rules: style
 36867       rules: style
 37246     });
 36868     });
 37247   }
 36869   }
 37248   /**
 36870   /**
 37249    * Parse font-face.
 36871    * Parse font-face.
 37250    */
 36872    */
 37251 
 36873 
 37252 
 36874 
 37253   function atfontface() {
 36875   function atfontface() {
 37254     var pos = position();
 36876     const pos = position();
 37255     var m = match(/^@font-face\s*/);
 36877     const m = match(/^@font-face\s*/);
 37256 
 36878 
 37257     if (!m) {
 36879     if (!m) {
 37258       return;
 36880       return;
 37259     }
 36881     }
 37260 
 36882 
 37261     if (!open()) {
 36883     if (!open()) {
 37262       return error("@font-face missing '{'");
 36884       return error("@font-face missing '{'");
 37263     }
 36885     }
 37264 
 36886 
 37265     var decls = comments(); // declarations
 36887     let decls = comments(); // declarations
 37266 
 36888 
 37267     var decl; // eslint-disable-next-line no-cond-assign
 36889     let decl; // eslint-disable-next-line no-cond-assign
 37268 
 36890 
 37269     while (decl = declaration()) {
 36891     while (decl = declaration()) {
 37270       decls.push(decl);
 36892       decls.push(decl);
 37271       decls = decls.concat(comments());
 36893       decls = decls.concat(comments());
 37272     }
 36894     }
 37283   /**
 36905   /**
 37284    * Parse import
 36906    * Parse import
 37285    */
 36907    */
 37286 
 36908 
 37287 
 36909 
 37288   var atimport = _compileAtrule('import');
 36910   const atimport = _compileAtrule('import');
 37289   /**
 36911   /**
 37290    * Parse charset
 36912    * Parse charset
 37291    */
 36913    */
 37292 
 36914 
 37293 
 36915 
 37294   var atcharset = _compileAtrule('charset');
 36916   const atcharset = _compileAtrule('charset');
 37295   /**
 36917   /**
 37296    * Parse namespace
 36918    * Parse namespace
 37297    */
 36919    */
 37298 
 36920 
 37299 
 36921 
 37300   var atnamespace = _compileAtrule('namespace');
 36922   const atnamespace = _compileAtrule('namespace');
 37301   /**
 36923   /**
 37302    * Parse non-block at-rules
 36924    * Parse non-block at-rules
 37303    */
 36925    */
 37304 
 36926 
 37305 
 36927 
 37306   function _compileAtrule(name) {
 36928   function _compileAtrule(name) {
 37307     var re = new RegExp('^@' + name + '\\s*([^;]+);');
 36929     const re = new RegExp('^@' + name + '\\s*([^;]+);');
 37308     return function () {
 36930     return function () {
 37309       var pos = position();
 36931       const pos = position();
 37310       var m = match(re);
 36932       const m = match(re);
 37311 
 36933 
 37312       if (!m) {
 36934       if (!m) {
 37313         return;
 36935         return;
 37314       }
 36936       }
 37315 
 36937 
 37316       var ret = {
 36938       const ret = {
 37317         type: name
 36939         type: name
 37318       };
 36940       };
 37319       ret[name] = m[1].trim();
 36941       ret[name] = m[1].trim();
 37320       return pos(ret);
 36942       return pos(ret);
 37321     };
 36943     };
 37336    * Parse rule.
 36958    * Parse rule.
 37337    */
 36959    */
 37338 
 36960 
 37339 
 36961 
 37340   function rule() {
 36962   function rule() {
 37341     var pos = position();
 36963     const pos = position();
 37342     var sel = selector();
 36964     const sel = selector();
 37343 
 36965 
 37344     if (!sel) {
 36966     if (!sel) {
 37345       return error('selector missing');
 36967       return error('selector missing');
 37346     }
 36968     }
 37347 
 36969 
 37366  * Adds non-enumerable parent node reference to each node.
 36988  * Adds non-enumerable parent node reference to each node.
 37367  */
 36989  */
 37368 
 36990 
 37369 
 36991 
 37370 function addParent(obj, parent) {
 36992 function addParent(obj, parent) {
 37371   var isNode = obj && typeof obj.type === 'string';
 36993   const isNode = obj && typeof obj.type === 'string';
 37372   var childParent = isNode ? obj : parent;
 36994   const childParent = isNode ? obj : parent;
 37373 
 36995 
 37374   for (var k in obj) {
 36996   for (const k in obj) {
 37375     var value = obj[k];
 36997     const value = obj[k];
 37376 
 36998 
 37377     if (Array.isArray(value)) {
 36999     if (Array.isArray(value)) {
 37378       value.forEach(function (v) {
 37000       value.forEach(function (v) {
 37379         addParent(v, childParent);
 37001         addParent(v, childParent);
 37380       });
 37002       });
 37381     } else if (value && Object(esm_typeof["a" /* default */])(value) === 'object') {
 37003     } else if (value && typeof value === 'object') {
 37382       addParent(value, childParent);
 37004       addParent(value, childParent);
 37383     }
 37005     }
 37384   }
 37006   }
 37385 
 37007 
 37386   if (isNode) {
 37008   if (isNode) {
 37395   return obj;
 37017   return obj;
 37396 }
 37018 }
 37397 /* eslint-enable @wordpress/no-unused-vars-before-return */
 37019 /* eslint-enable @wordpress/no-unused-vars-before-return */
 37398 
 37020 
 37399 // EXTERNAL MODULE: ./node_modules/inherits/inherits_browser.js
 37021 // EXTERNAL MODULE: ./node_modules/inherits/inherits_browser.js
 37400 var inherits_browser = __webpack_require__(165);
 37022 var inherits_browser = __webpack_require__("P7XM");
 37401 var inherits_browser_default = /*#__PURE__*/__webpack_require__.n(inherits_browser);
 37023 var inherits_browser_default = /*#__PURE__*/__webpack_require__.n(inherits_browser);
 37402 
 37024 
 37403 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/ast/stringify/compiler.js
 37025 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/ast/stringify/compiler.js
 37404 // Adapted from https://github.com/reworkcss/css
 37026 // Adapted from https://github.com/reworkcss/css
 37405 // because we needed to remove source map support.
 37027 // because we needed to remove source map support.
 37435  * Map visit over array of `nodes`, optionally using a `delim`
 37057  * Map visit over array of `nodes`, optionally using a `delim`
 37436  */
 37058  */
 37437 
 37059 
 37438 
 37060 
 37439 Compiler.prototype.mapVisit = function (nodes, delim) {
 37061 Compiler.prototype.mapVisit = function (nodes, delim) {
 37440   var buf = '';
 37062   let buf = '';
 37441   delim = delim || '';
 37063   delim = delim || '';
 37442 
 37064 
 37443   for (var i = 0, length = nodes.length; i < length; i++) {
 37065   for (let i = 0, length = nodes.length; i < length; i++) {
 37444     buf += this.visit(nodes[i]);
 37066     buf += this.visit(nodes[i]);
 37445 
 37067 
 37446     if (delim && i < length - 1) {
 37068     if (delim && i < length - 1) {
 37447       buf += this.emit(delim);
 37069       buf += this.emit(delim);
 37448     }
 37070     }
 37517  * Visit document node.
 37139  * Visit document node.
 37518  */
 37140  */
 37519 
 37141 
 37520 
 37142 
 37521 compress_Compiler.prototype.document = function (node) {
 37143 compress_Compiler.prototype.document = function (node) {
 37522   var doc = '@' + (node.vendor || '') + 'document ' + node.document;
 37144   const doc = '@' + (node.vendor || '') + 'document ' + node.document;
 37523   return this.emit(doc, node.position) + this.emit('{') + this.mapVisit(node.rules) + this.emit('}');
 37145   return this.emit(doc, node.position) + this.emit('{') + this.mapVisit(node.rules) + this.emit('}');
 37524 };
 37146 };
 37525 /**
 37147 /**
 37526  * Visit charset node.
 37148  * Visit charset node.
 37527  */
 37149  */
 37558  * Visit keyframe node.
 37180  * Visit keyframe node.
 37559  */
 37181  */
 37560 
 37182 
 37561 
 37183 
 37562 compress_Compiler.prototype.keyframe = function (node) {
 37184 compress_Compiler.prototype.keyframe = function (node) {
 37563   var decls = node.declarations;
 37185   const decls = node.declarations;
 37564   return this.emit(node.values.join(','), node.position) + this.emit('{') + this.mapVisit(decls) + this.emit('}');
 37186   return this.emit(node.values.join(','), node.position) + this.emit('{') + this.mapVisit(decls) + this.emit('}');
 37565 };
 37187 };
 37566 /**
 37188 /**
 37567  * Visit page node.
 37189  * Visit page node.
 37568  */
 37190  */
 37569 
 37191 
 37570 
 37192 
 37571 compress_Compiler.prototype.page = function (node) {
 37193 compress_Compiler.prototype.page = function (node) {
 37572   var sel = node.selectors.length ? node.selectors.join(', ') : '';
 37194   const sel = node.selectors.length ? node.selectors.join(', ') : '';
 37573   return this.emit('@page ' + sel, node.position) + this.emit('{') + this.mapVisit(node.declarations) + this.emit('}');
 37195   return this.emit('@page ' + sel, node.position) + this.emit('{') + this.mapVisit(node.declarations) + this.emit('}');
 37574 };
 37196 };
 37575 /**
 37197 /**
 37576  * Visit font-face node.
 37198  * Visit font-face node.
 37577  */
 37199  */
 37600  * Visit rule node.
 37222  * Visit rule node.
 37601  */
 37223  */
 37602 
 37224 
 37603 
 37225 
 37604 compress_Compiler.prototype.rule = function (node) {
 37226 compress_Compiler.prototype.rule = function (node) {
 37605   var decls = node.declarations;
 37227   const decls = node.declarations;
 37606 
 37228 
 37607   if (!decls.length) {
 37229   if (!decls.length) {
 37608     return '';
 37230     return '';
 37609   }
 37231   }
 37610 
 37232 
 37696  * Visit document node.
 37318  * Visit document node.
 37697  */
 37319  */
 37698 
 37320 
 37699 
 37321 
 37700 identity_Compiler.prototype.document = function (node) {
 37322 identity_Compiler.prototype.document = function (node) {
 37701   var doc = '@' + (node.vendor || '') + 'document ' + node.document;
 37323   const doc = '@' + (node.vendor || '') + 'document ' + node.document;
 37702   return this.emit(doc, node.position) + this.emit(' ' + ' {\n' + this.indent(1)) + this.mapVisit(node.rules, '\n\n') + this.emit(this.indent(-1) + '\n}');
 37324   return this.emit(doc, node.position) + this.emit(' ' + ' {\n' + this.indent(1)) + this.mapVisit(node.rules, '\n\n') + this.emit(this.indent(-1) + '\n}');
 37703 };
 37325 };
 37704 /**
 37326 /**
 37705  * Visit charset node.
 37327  * Visit charset node.
 37706  */
 37328  */
 37737  * Visit keyframe node.
 37359  * Visit keyframe node.
 37738  */
 37360  */
 37739 
 37361 
 37740 
 37362 
 37741 identity_Compiler.prototype.keyframe = function (node) {
 37363 identity_Compiler.prototype.keyframe = function (node) {
 37742   var decls = node.declarations;
 37364   const decls = node.declarations;
 37743   return this.emit(this.indent()) + this.emit(node.values.join(', '), node.position) + this.emit(' {\n' + this.indent(1)) + this.mapVisit(decls, '\n') + this.emit(this.indent(-1) + '\n' + this.indent() + '}\n');
 37365   return this.emit(this.indent()) + this.emit(node.values.join(', '), node.position) + this.emit(' {\n' + this.indent(1)) + this.mapVisit(decls, '\n') + this.emit(this.indent(-1) + '\n' + this.indent() + '}\n');
 37744 };
 37366 };
 37745 /**
 37367 /**
 37746  * Visit page node.
 37368  * Visit page node.
 37747  */
 37369  */
 37748 
 37370 
 37749 
 37371 
 37750 identity_Compiler.prototype.page = function (node) {
 37372 identity_Compiler.prototype.page = function (node) {
 37751   var sel = node.selectors.length ? node.selectors.join(', ') + ' ' : '';
 37373   const sel = node.selectors.length ? node.selectors.join(', ') + ' ' : '';
 37752   return this.emit('@page ' + sel, node.position) + this.emit('{\n') + this.emit(this.indent(1)) + this.mapVisit(node.declarations, '\n') + this.emit(this.indent(-1)) + this.emit('\n}');
 37374   return this.emit('@page ' + sel, node.position) + this.emit('{\n') + this.emit(this.indent(1)) + this.mapVisit(node.declarations, '\n') + this.emit(this.indent(-1)) + this.emit('\n}');
 37753 };
 37375 };
 37754 /**
 37376 /**
 37755  * Visit font-face node.
 37377  * Visit font-face node.
 37756  */
 37378  */
 37779  * Visit rule node.
 37401  * Visit rule node.
 37780  */
 37402  */
 37781 
 37403 
 37782 
 37404 
 37783 identity_Compiler.prototype.rule = function (node) {
 37405 identity_Compiler.prototype.rule = function (node) {
 37784   var indent = this.indent();
 37406   const indent = this.indent();
 37785   var decls = node.declarations;
 37407   const decls = node.declarations;
 37786 
 37408 
 37787   if (!decls.length) {
 37409   if (!decls.length) {
 37788     return '';
 37410     return '';
 37789   }
 37411   }
 37790 
 37412 
 37839  * @return {string}
 37461  * @return {string}
 37840  */
 37462  */
 37841 
 37463 
 37842 /* harmony default export */ var stringify = (function (node, options) {
 37464 /* harmony default export */ var stringify = (function (node, options) {
 37843   options = options || {};
 37465   options = options || {};
 37844   var compiler = options.compress ? new compress(options) : new identity(options);
 37466   const compiler = options.compress ? new compress(options) : new identity(options);
 37845   var code = compiler.compile(node);
 37467   const code = compiler.compile(node);
 37846   return code;
 37468   return code;
 37847 });
 37469 });
 37848 
 37470 
 37849 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/traverse.js
 37471 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/traverse.js
 37850 /**
 37472 /**
 37857 
 37479 
 37858 
 37480 
 37859 
 37481 
 37860 function traverseCSS(css, callback) {
 37482 function traverseCSS(css, callback) {
 37861   try {
 37483   try {
 37862     var parsed = parse(css);
 37484     const parsed = parse(css);
 37863     var updated = traverse_default.a.map(parsed, function (node) {
 37485     const updated = traverse_default.a.map(parsed, function (node) {
 37864       if (!node) {
 37486       if (!node) {
 37865         return node;
 37487         return node;
 37866       }
 37488       }
 37867 
 37489 
 37868       var updatedNode = callback(node);
 37490       const updatedNode = callback(node);
 37869       return this.update(updatedNode);
 37491       return this.update(updatedNode);
 37870     });
 37492     });
 37871     return stringify(updated);
 37493     return stringify(updated);
 37872   } catch (err) {
 37494   } catch (err) {
 37873     // eslint-disable-next-line no-console
 37495     // eslint-disable-next-line no-console
 37877 }
 37499 }
 37878 
 37500 
 37879 /* harmony default export */ var transform_styles_traverse = (traverseCSS);
 37501 /* harmony default export */ var transform_styles_traverse = (traverseCSS);
 37880 
 37502 
 37881 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/transforms/url-rewrite.js
 37503 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/transforms/url-rewrite.js
 37882 
       
 37883 
       
 37884 function url_rewrite_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; }
       
 37885 
       
 37886 function url_rewrite_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { url_rewrite_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 { url_rewrite_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 37887 
       
 37888 /**
 37504 /**
 37889  * Return `true` if the given path is http/https.
 37505  * Return `true` if the given path is http/https.
 37890  *
 37506  *
 37891  * @param  {string}  filePath path
 37507  * @param  {string}  filePath path
 37892  *
 37508  *
 37953  * @return {Promise}         the Promise
 37569  * @return {Promise}         the Promise
 37954  */
 37570  */
 37955 
 37571 
 37956 
 37572 
 37957 function processURL(baseURL) {
 37573 function processURL(baseURL) {
 37958   return function (meta) {
 37574   return meta => ({ ...meta,
 37959     return url_rewrite_objectSpread({}, meta, {
 37575     newUrl: 'url(' + meta.before + meta.quote + getResourcePath(meta.value, baseURL) + meta.quote + meta.after + ')'
 37960       newUrl: 'url(' + meta.before + meta.quote + getResourcePath(meta.value, baseURL) + meta.quote + meta.after + ')'
 37576   });
 37961     });
       
 37962   };
       
 37963 }
 37577 }
 37964 /**
 37578 /**
 37965  * Get all `url()`s, and return the meta info
 37579  * Get all `url()`s, and return the meta info
 37966  *
 37580  *
 37967  * @param  {string} value decl.value
 37581  * @param  {string} value decl.value
 37969  * @return {Array}        the urls
 37583  * @return {Array}        the urls
 37970  */
 37584  */
 37971 
 37585 
 37972 
 37586 
 37973 function getURLs(value) {
 37587 function getURLs(value) {
 37974   var reg = /url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;
 37588   const reg = /url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;
 37975   var match;
 37589   let match;
 37976   var URLs = [];
 37590   const URLs = [];
 37977 
 37591 
 37978   while ((match = reg.exec(value)) !== null) {
 37592   while ((match = reg.exec(value)) !== null) {
 37979     var meta = {
 37593     const meta = {
 37980       source: match[0],
 37594       source: match[0],
 37981       before: match[1],
 37595       before: match[1],
 37982       quote: match[2],
 37596       quote: match[2],
 37983       value: match[3],
 37597       value: match[3],
 37984       after: match[4]
 37598       after: match[4]
 38000  * @return {string}     the new value
 37614  * @return {string}     the new value
 38001  */
 37615  */
 38002 
 37616 
 38003 
 37617 
 38004 function replaceURLs(raw, URLs) {
 37618 function replaceURLs(raw, URLs) {
 38005   URLs.forEach(function (item) {
 37619   URLs.forEach(item => {
 38006     raw = raw.replace(item.source, item.newUrl);
 37620     raw = raw.replace(item.source, item.newUrl);
 38007   });
 37621   });
 38008   return raw;
 37622   return raw;
 38009 }
 37623 }
 38010 
 37624 
 38011 var rewrite = function rewrite(rootURL) {
 37625 const rewrite = rootURL => node => {
 38012   return function (node) {
 37626   if (node.type === 'declaration') {
 38013     if (node.type === 'declaration') {
 37627     const updatedURLs = getURLs(node.value).map(processURL(rootURL));
 38014       var updatedURLs = getURLs(node.value).map(processURL(rootURL));
 37628     return { ...node,
 38015       return url_rewrite_objectSpread({}, node, {
 37629       value: replaceURLs(node.value, updatedURLs)
 38016         value: replaceURLs(node.value, updatedURLs)
 37630     };
 38017       });
 37631   }
 38018     }
 37632 
 38019 
 37633   return node;
 38020     return node;
 37634 };
       
 37635 
       
 37636 /* harmony default export */ var url_rewrite = (rewrite);
       
 37637 
       
 37638 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/transforms/wrap.js
       
 37639 /**
       
 37640  * @constant string IS_ROOT_TAG Regex to check if the selector is a root tag selector.
       
 37641  */
       
 37642 const IS_ROOT_TAG = /^(body|html|:root).*$/;
       
 37643 
       
 37644 const wrap = (namespace, ignore = []) => node => {
       
 37645   const updateSelector = selector => {
       
 37646     if (ignore.includes(selector.trim())) {
       
 37647       return selector;
       
 37648     } // Anything other than a root tag is always prefixed.
       
 37649 
       
 37650 
       
 37651     {
       
 37652       if (!selector.match(IS_ROOT_TAG)) {
       
 37653         return namespace + ' ' + selector;
       
 37654       }
       
 37655     } // HTML and Body elements cannot be contained within our container so lets extract their styles.
       
 37656 
       
 37657     return selector.replace(/^(body|html|:root)/, namespace);
 38021   };
 37658   };
 38022 };
 37659 
 38023 
 37660   if (node.type === 'rule') {
 38024 /* harmony default export */ var url_rewrite = (rewrite);
 37661     return { ...node,
 38025 
 37662       selectors: node.selectors.map(updateSelector)
 38026 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/transforms/wrap.js
       
 38027 
       
 38028 
       
 38029 function wrap_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; }
       
 38030 
       
 38031 function wrap_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { wrap_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 { wrap_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 38032 
       
 38033 /**
       
 38034  * @constant string IS_ROOT_TAG Regex to check if the selector is a root tag selector.
       
 38035  */
       
 38036 var IS_ROOT_TAG = /^(body|html|:root).*$/;
       
 38037 
       
 38038 var wrap = function wrap(namespace) {
       
 38039   var ignore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
       
 38040   return function (node) {
       
 38041     var updateSelector = function updateSelector(selector) {
       
 38042       if (ignore.includes(selector.trim())) {
       
 38043         return selector;
       
 38044       } // Anything other than a root tag is always prefixed.
       
 38045 
       
 38046 
       
 38047       {
       
 38048         if (!selector.match(IS_ROOT_TAG)) {
       
 38049           return namespace + ' ' + selector;
       
 38050         }
       
 38051       } // HTML and Body elements cannot be contained within our container so lets extract their styles.
       
 38052 
       
 38053       return selector.replace(/^(body|html|:root)/, namespace);
       
 38054     };
 37663     };
 38055 
 37664   }
 38056     if (node.type === 'rule') {
 37665 
 38057       return wrap_objectSpread({}, node, {
 37666   return node;
 38058         selectors: node.selectors.map(updateSelector)
       
 38059       });
       
 38060     }
       
 38061 
       
 38062     return node;
       
 38063   };
       
 38064 };
 37667 };
 38065 
 37668 
 38066 /* harmony default export */ var transforms_wrap = (wrap);
 37669 /* harmony default export */ var transforms_wrap = (wrap);
 38067 
 37670 
 38068 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/index.js
 37671 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/transform-styles/index.js
 38088  * @param {Array} styles CSS rules.
 37691  * @param {Array} styles CSS rules.
 38089  * @param {string} wrapperClassName Wrapper Class Name.
 37692  * @param {string} wrapperClassName Wrapper Class Name.
 38090  * @return {Array} converted rules.
 37693  * @return {Array} converted rules.
 38091  */
 37694  */
 38092 
 37695 
 38093 var transform_styles_transformStyles = function transformStyles(styles) {
 37696 const transformStyles = (styles, wrapperClassName = '') => {
 38094   var wrapperClassName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
 37697   return Object(external_lodash_["map"])(styles, ({
 38095   return Object(external_this_lodash_["map"])(styles, function (_ref) {
 37698     css,
 38096     var css = _ref.css,
 37699     baseURL,
 38097         baseURL = _ref.baseURL;
 37700     __experimentalNoWrapper = false
 38098     var transforms = [];
 37701   }) => {
 38099 
 37702     const transforms = [];
 38100     if (wrapperClassName) {
 37703 
       
 37704     if (wrapperClassName && !__experimentalNoWrapper) {
 38101       transforms.push(transforms_wrap(wrapperClassName));
 37705       transforms.push(transforms_wrap(wrapperClassName));
 38102     }
 37706     }
 38103 
 37707 
 38104     if (baseURL) {
 37708     if (baseURL) {
 38105       transforms.push(url_rewrite(baseURL));
 37709       transforms.push(url_rewrite(baseURL));
 38106     }
 37710     }
 38107 
 37711 
 38108     if (transforms.length) {
 37712     if (transforms.length) {
 38109       return transform_styles_traverse(css, Object(external_this_wp_compose_["compose"])(transforms));
 37713       return transform_styles_traverse(css, Object(external_wp_compose_["compose"])(transforms));
 38110     }
 37714     }
 38111 
 37715 
 38112     return css;
 37716     return css;
 38113   });
 37717   });
 38114 };
 37718 };
 38115 
 37719 
 38116 /* harmony default export */ var transform_styles = (transform_styles_transformStyles);
 37720 /* harmony default export */ var transform_styles = (transformStyles);
 38117 
 37721 
 38118 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/editor-styles/index.js
 37722 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/editor-styles/index.js
       
 37723 
       
 37724 
 38119 /**
 37725 /**
 38120  * External dependencies
 37726  * External dependencies
 38121  */
 37727  */
 38122 
 37728 
 38123 /**
 37729 /**
 38128 /**
 37734 /**
 38129  * Internal dependencies
 37735  * Internal dependencies
 38130  */
 37736  */
 38131 
 37737 
 38132 
 37738 
 38133 
 37739 const EDITOR_STYLES_SELECTOR = '.editor-styles-wrapper';
 38134 function EditorStyles(_ref) {
 37740 
 38135   var styles = _ref.styles;
 37741 function useDarkThemeBodyClassName(styles) {
 38136   Object(external_this_wp_element_["useEffect"])(function () {
 37742   return Object(external_wp_element_["useCallback"])(node => {
 38137     var updatedStyles = transform_styles(styles, '.editor-styles-wrapper');
 37743     if (!node) {
 38138     var nodes = Object(external_this_lodash_["map"])(Object(external_this_lodash_["compact"])(updatedStyles), function (updatedCSS) {
 37744       return;
 38139       var node = document.createElement('style');
 37745     }
 38140       node.innerHTML = updatedCSS;
 37746 
 38141       document.body.appendChild(node);
 37747     const {
 38142       return node;
 37748       ownerDocument
 38143     });
 37749     } = node;
 38144     return function () {
 37750     const {
 38145       return nodes.forEach(function (node) {
 37751       defaultView,
 38146         return document.body.removeChild(node);
 37752       body
 38147       });
 37753     } = ownerDocument;
 38148     };
 37754     const canvas = ownerDocument.querySelector(EDITOR_STYLES_SELECTOR);
       
 37755     let backgroundColor;
       
 37756 
       
 37757     if (!canvas) {
       
 37758       // The real .editor-styles-wrapper element might not exist in the
       
 37759       // DOM, so calculate the background color by creating a fake
       
 37760       // wrapper.
       
 37761       const tempCanvas = ownerDocument.createElement('div');
       
 37762       tempCanvas.classList.add('editor-styles-wrapper');
       
 37763       body.appendChild(tempCanvas);
       
 37764       backgroundColor = defaultView.getComputedStyle(tempCanvas, null).getPropertyValue('background-color');
       
 37765       body.removeChild(tempCanvas);
       
 37766     } else {
       
 37767       backgroundColor = defaultView.getComputedStyle(canvas, null).getPropertyValue('background-color');
       
 37768     } // If background is transparent, it should be treated as light color.
       
 37769 
       
 37770 
       
 37771     if (tinycolor_default()(backgroundColor).getLuminance() > 0.5 || tinycolor_default()(backgroundColor).getAlpha() === 0) {
       
 37772       body.classList.remove('is-dark-theme');
       
 37773     } else {
       
 37774       body.classList.add('is-dark-theme');
       
 37775     }
 38149   }, [styles]);
 37776   }, [styles]);
 38150   return null;
 37777 }
 38151 }
 37778 
 38152 
 37779 function EditorStyles({
 38153 /* harmony default export */ var editor_styles = (EditorStyles);
 37780   styles
       
 37781 }) {
       
 37782   const transformedStyles = Object(external_wp_element_["useMemo"])(() => transform_styles(styles, EDITOR_STYLES_SELECTOR), [styles]);
       
 37783   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("style", {
       
 37784     ref: useDarkThemeBodyClassName(styles)
       
 37785   }), transformedStyles.map((css, index) => Object(external_wp_element_["createElement"])("style", {
       
 37786     key: index
       
 37787   }, css)));
       
 37788 }
 38154 
 37789 
 38155 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/library.js
 37790 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/library.js
 38156 
 37791 
 38157 
 37792 
 38158 /**
 37793 /**
 38168  * Internal dependencies
 37803  * Internal dependencies
 38169  */
 37804  */
 38170 
 37805 
 38171 
 37806 
 38172 
 37807 
 38173 function InserterLibrary(_ref) {
 37808 
 38174   var rootClientId = _ref.rootClientId,
 37809 function InserterLibrary({
 38175       clientId = _ref.clientId,
 37810   rootClientId,
 38176       isAppender = _ref.isAppender,
 37811   clientId,
 38177       showInserterHelpPanel = _ref.showInserterHelpPanel,
 37812   isAppender,
 38178       _ref$showMostUsedBloc = _ref.showMostUsedBlocks,
 37813   showInserterHelpPanel,
 38179       showMostUsedBlocks = _ref$showMostUsedBloc === void 0 ? false : _ref$showMostUsedBloc,
 37814   showMostUsedBlocks = false,
 38180       selectBlockOnInsert = _ref.__experimentalSelectBlockOnInsert,
 37815   __experimentalInsertionIndex,
 38181       _ref$onSelect = _ref.onSelect,
 37816   onSelect = external_lodash_["noop"],
 38182       onSelect = _ref$onSelect === void 0 ? external_this_lodash_["noop"] : _ref$onSelect;
 37817   shouldFocusBlock = false
 38183   var destinationRootClientId = Object(external_this_wp_data_["useSelect"])(function (select) {
 37818 }) {
 38184     var _select = select('core/block-editor'),
 37819   const destinationRootClientId = Object(external_wp_data_["useSelect"])(select => {
 38185         getBlockRootClientId = _select.getBlockRootClientId;
 37820     const {
 38186 
 37821       getBlockRootClientId
       
 37822     } = select(store);
 38187     return rootClientId || getBlockRootClientId(clientId) || undefined;
 37823     return rootClientId || getBlockRootClientId(clientId) || undefined;
 38188   }, [clientId, rootClientId]);
 37824   }, [clientId, rootClientId]);
 38189   return Object(external_this_wp_element_["createElement"])(menu, {
 37825   return Object(external_wp_element_["createElement"])(menu, {
 38190     onSelect: onSelect,
 37826     onSelect: onSelect,
 38191     rootClientId: destinationRootClientId,
 37827     rootClientId: destinationRootClientId,
 38192     clientId: clientId,
 37828     clientId: clientId,
 38193     isAppender: isAppender,
 37829     isAppender: isAppender,
 38194     showInserterHelpPanel: showInserterHelpPanel,
 37830     showInserterHelpPanel: showInserterHelpPanel,
 38195     showMostUsedBlocks: showMostUsedBlocks,
 37831     showMostUsedBlocks: showMostUsedBlocks,
 38196     __experimentalSelectBlockOnInsert: selectBlockOnInsert
 37832     __experimentalInsertionIndex: __experimentalInsertionIndex,
       
 37833     shouldFocusBlock: shouldFocusBlock
 38197   });
 37834   });
 38198 }
 37835 }
 38199 
 37836 
 38200 /* harmony default export */ var library = (InserterLibrary);
 37837 /* harmony default export */ var library = (InserterLibrary);
 38201 
 37838 
 38202 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/keyboard-shortcuts/index.js
 37839 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/keyboard-shortcuts/index.js
 38203 
       
 38204 
       
 38205 /**
 37840 /**
 38206  * External dependencies
 37841  * External dependencies
 38207  */
 37842  */
 38208 
 37843 
 38209 /**
 37844 /**
 38210  * WordPress dependencies
 37845  * WordPress dependencies
 38211  */
 37846  */
 38212 
 37847 
 38213 
 37848 
 38214 
 37849 
       
 37850 
       
 37851 
       
 37852 /**
       
 37853  * Internal dependencies
       
 37854  */
 38215 
 37855 
 38216 
 37856 
 38217 
 37857 
 38218 function KeyboardShortcuts() {
 37858 function KeyboardShortcuts() {
 38219   // Shortcuts Logic
 37859   // Shortcuts Logic
 38220   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 37860   const {
 38221     var _select = select('core/block-editor'),
 37861     clientIds,
 38222         getSelectedBlockClientIds = _select.getSelectedBlockClientIds,
 37862     rootClientId
 38223         getBlockOrder = _select.getBlockOrder,
 37863   } = Object(external_wp_data_["useSelect"])(select => {
 38224         getBlockRootClientId = _select.getBlockRootClientId;
 37864     const {
 38225 
 37865       getSelectedBlockClientIds,
 38226     var selectedClientIds = getSelectedBlockClientIds();
 37866       getBlockRootClientId
 38227 
 37867     } = select(store);
 38228     var _selectedClientIds = Object(slicedToArray["a" /* default */])(selectedClientIds, 1),
 37868     const selectedClientIds = getSelectedBlockClientIds();
 38229         firstClientId = _selectedClientIds[0];
 37869     const [firstClientId] = selectedClientIds;
 38230 
       
 38231     return {
 37870     return {
 38232       clientIds: selectedClientIds,
 37871       clientIds: selectedClientIds,
 38233       rootBlocksClientIds: getBlockOrder(),
       
 38234       rootClientId: getBlockRootClientId(firstClientId)
 37872       rootClientId: getBlockRootClientId(firstClientId)
 38235     };
 37873     };
 38236   }, []),
 37874   }, []);
 38237       clientIds = _useSelect.clientIds,
 37875   const {
 38238       rootBlocksClientIds = _useSelect.rootBlocksClientIds,
 37876     duplicateBlocks,
 38239       rootClientId = _useSelect.rootClientId;
 37877     removeBlocks,
 38240 
 37878     insertAfterBlock,
 38241   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 37879     insertBeforeBlock,
 38242       duplicateBlocks = _useDispatch.duplicateBlocks,
 37880     clearSelectedBlock,
 38243       removeBlocks = _useDispatch.removeBlocks,
 37881     moveBlocksUp,
 38244       insertAfterBlock = _useDispatch.insertAfterBlock,
 37882     moveBlocksDown
 38245       insertBeforeBlock = _useDispatch.insertBeforeBlock,
 37883   } = Object(external_wp_data_["useDispatch"])(store); // Moves selected block/blocks up
 38246       multiSelect = _useDispatch.multiSelect,
 37884 
 38247       clearSelectedBlock = _useDispatch.clearSelectedBlock,
 37885   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/move-up', Object(external_wp_element_["useCallback"])(event => {
 38248       moveBlocksUp = _useDispatch.moveBlocksUp,
       
 38249       moveBlocksDown = _useDispatch.moveBlocksDown; // Moves selected block/blocks up
       
 38250 
       
 38251 
       
 38252   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/move-up', Object(external_this_wp_element_["useCallback"])(function (event) {
       
 38253     event.preventDefault();
 37886     event.preventDefault();
 38254     moveBlocksUp(clientIds, rootClientId);
 37887     moveBlocksUp(clientIds, rootClientId);
 38255   }, [clientIds, moveBlocksUp]), {
 37888   }, [clientIds, moveBlocksUp]), {
 38256     bindGlobal: true,
 37889     bindGlobal: true,
 38257     isDisabled: clientIds.length === 0
 37890     isDisabled: clientIds.length === 0
 38258   }); // Moves selected block/blocks up
 37891   }); // Moves selected block/blocks up
 38259 
 37892 
 38260   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/move-down', Object(external_this_wp_element_["useCallback"])(function (event) {
 37893   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/move-down', Object(external_wp_element_["useCallback"])(event => {
 38261     event.preventDefault();
 37894     event.preventDefault();
 38262     moveBlocksDown(clientIds, rootClientId);
 37895     moveBlocksDown(clientIds, rootClientId);
 38263   }, [clientIds, moveBlocksDown]), {
 37896   }, [clientIds, moveBlocksDown]), {
 38264     bindGlobal: true,
 37897     bindGlobal: true,
 38265     isDisabled: clientIds.length === 0
 37898     isDisabled: clientIds.length === 0
 38266   }); // Prevents bookmark all Tabs shortcut in Chrome when devtools are closed.
 37899   }); // Prevents bookmark all Tabs shortcut in Chrome when devtools are closed.
 38267   // Prevents reposition Chrome devtools pane shortcut when devtools are open.
 37900   // Prevents reposition Chrome devtools pane shortcut when devtools are open.
 38268 
 37901 
 38269   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/duplicate', Object(external_this_wp_element_["useCallback"])(function (event) {
 37902   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/duplicate', Object(external_wp_element_["useCallback"])(event => {
 38270     event.preventDefault();
 37903     event.preventDefault();
 38271     duplicateBlocks(clientIds);
 37904     duplicateBlocks(clientIds);
 38272   }, [clientIds, duplicateBlocks]), {
 37905   }, [clientIds, duplicateBlocks]), {
 38273     bindGlobal: true,
 37906     bindGlobal: true,
 38274     isDisabled: clientIds.length === 0
 37907     isDisabled: clientIds.length === 0
 38275   }); // Does not clash with any known browser/native shortcuts, but preventDefault
 37908   }); // Does not clash with any known browser/native shortcuts, but preventDefault
 38276   // is used to prevent any obscure unknown shortcuts from triggering.
 37909   // is used to prevent any obscure unknown shortcuts from triggering.
 38277 
 37910 
 38278   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/remove', Object(external_this_wp_element_["useCallback"])(function (event) {
 37911   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/remove', Object(external_wp_element_["useCallback"])(event => {
 38279     event.preventDefault();
 37912     event.preventDefault();
 38280     removeBlocks(clientIds);
 37913     removeBlocks(clientIds);
 38281   }, [clientIds, removeBlocks]), {
 37914   }, [clientIds, removeBlocks]), {
 38282     bindGlobal: true,
 37915     bindGlobal: true,
 38283     isDisabled: clientIds.length === 0
 37916     isDisabled: clientIds.length === 0
 38284   }); // Does not clash with any known browser/native shortcuts, but preventDefault
 37917   }); // Does not clash with any known browser/native shortcuts, but preventDefault
 38285   // is used to prevent any obscure unknown shortcuts from triggering.
 37918   // is used to prevent any obscure unknown shortcuts from triggering.
 38286 
 37919 
 38287   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/insert-after', Object(external_this_wp_element_["useCallback"])(function (event) {
 37920   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/insert-after', Object(external_wp_element_["useCallback"])(event => {
 38288     event.preventDefault();
 37921     event.preventDefault();
 38289     insertAfterBlock(Object(external_this_lodash_["last"])(clientIds));
 37922     insertAfterBlock(Object(external_lodash_["last"])(clientIds));
 38290   }, [clientIds, insertAfterBlock]), {
 37923   }, [clientIds, insertAfterBlock]), {
 38291     bindGlobal: true,
 37924     bindGlobal: true,
 38292     isDisabled: clientIds.length === 0
 37925     isDisabled: clientIds.length === 0
 38293   }); // Prevent 'view recently closed tabs' in Opera using preventDefault.
 37926   }); // Prevent 'view recently closed tabs' in Opera using preventDefault.
 38294 
 37927 
 38295   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/insert-before', Object(external_this_wp_element_["useCallback"])(function (event) {
 37928   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/insert-before', Object(external_wp_element_["useCallback"])(event => {
 38296     event.preventDefault();
 37929     event.preventDefault();
 38297     insertBeforeBlock(Object(external_this_lodash_["first"])(clientIds));
 37930     insertBeforeBlock(Object(external_lodash_["first"])(clientIds));
 38298   }, [clientIds, insertBeforeBlock]), {
 37931   }, [clientIds, insertBeforeBlock]), {
 38299     bindGlobal: true,
 37932     bindGlobal: true,
 38300     isDisabled: clientIds.length === 0
 37933     isDisabled: clientIds.length === 0
 38301   });
 37934   });
 38302   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/delete-multi-selection', Object(external_this_wp_element_["useCallback"])(function (event) {
 37935   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/delete-multi-selection', Object(external_wp_element_["useCallback"])(event => {
 38303     event.preventDefault();
 37936     event.preventDefault();
 38304     removeBlocks(clientIds);
 37937     removeBlocks(clientIds);
 38305   }, [clientIds, removeBlocks]), {
 37938   }, [clientIds, removeBlocks]), {
 38306     isDisabled: clientIds.length < 2
 37939     isDisabled: clientIds.length < 2
 38307   });
 37940   });
 38308   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/select-all', Object(external_this_wp_element_["useCallback"])(function (event) {
 37941   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/unselect', Object(external_wp_element_["useCallback"])(event => {
 38309     event.preventDefault();
       
 38310     multiSelect(Object(external_this_lodash_["first"])(rootBlocksClientIds), Object(external_this_lodash_["last"])(rootBlocksClientIds));
       
 38311   }, [rootBlocksClientIds, multiSelect]));
       
 38312   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/block-editor/unselect', Object(external_this_wp_element_["useCallback"])(function (event) {
       
 38313     event.preventDefault();
 37942     event.preventDefault();
 38314     clearSelectedBlock();
 37943     clearSelectedBlock();
 38315     window.getSelection().removeAllRanges();
 37944     event.target.ownerDocument.defaultView.getSelection().removeAllRanges();
 38316   }, [clientIds, clearSelectedBlock]), {
 37945   }, [clientIds, clearSelectedBlock]), {
 38317     isDisabled: clientIds.length < 2
 37946     isDisabled: clientIds.length < 2
 38318   });
 37947   });
 38319   return null;
 37948   return null;
 38320 }
 37949 }
 38321 
 37950 
 38322 function KeyboardShortcutsRegister() {
 37951 function KeyboardShortcutsRegister() {
 38323   // Registering the shortcuts
 37952   // Registering the shortcuts
 38324   var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core/keyboard-shortcuts'),
 37953   const {
 38325       registerShortcut = _useDispatch2.registerShortcut;
 37954     registerShortcut
 38326 
 37955   } = Object(external_wp_data_["useDispatch"])(external_wp_keyboardShortcuts_["store"]);
 38327   Object(external_this_wp_element_["useEffect"])(function () {
 37956   Object(external_wp_element_["useEffect"])(() => {
 38328     registerShortcut({
 37957     registerShortcut({
 38329       name: 'core/block-editor/duplicate',
 37958       name: 'core/block-editor/duplicate',
 38330       category: 'block',
 37959       category: 'block',
 38331       description: Object(external_this_wp_i18n_["__"])('Duplicate the selected block(s).'),
 37960       description: Object(external_wp_i18n_["__"])('Duplicate the selected block(s).'),
 38332       keyCombination: {
 37961       keyCombination: {
 38333         modifier: 'primaryShift',
 37962         modifier: 'primaryShift',
 38334         character: 'd'
 37963         character: 'd'
 38335       }
 37964       }
 38336     });
 37965     });
 38337     registerShortcut({
 37966     registerShortcut({
 38338       name: 'core/block-editor/remove',
 37967       name: 'core/block-editor/remove',
 38339       category: 'block',
 37968       category: 'block',
 38340       description: Object(external_this_wp_i18n_["__"])('Remove the selected block(s).'),
 37969       description: Object(external_wp_i18n_["__"])('Remove the selected block(s).'),
 38341       keyCombination: {
 37970       keyCombination: {
 38342         modifier: 'access',
 37971         modifier: 'access',
 38343         character: 'z'
 37972         character: 'z'
 38344       }
 37973       }
 38345     });
 37974     });
 38346     registerShortcut({
 37975     registerShortcut({
 38347       name: 'core/block-editor/insert-before',
 37976       name: 'core/block-editor/insert-before',
 38348       category: 'block',
 37977       category: 'block',
 38349       description: Object(external_this_wp_i18n_["__"])('Insert a new block before the selected block(s).'),
 37978       description: Object(external_wp_i18n_["__"])('Insert a new block before the selected block(s).'),
 38350       keyCombination: {
 37979       keyCombination: {
 38351         modifier: 'primaryAlt',
 37980         modifier: 'primaryAlt',
 38352         character: 't'
 37981         character: 't'
 38353       }
 37982       }
 38354     });
 37983     });
 38355     registerShortcut({
 37984     registerShortcut({
 38356       name: 'core/block-editor/insert-after',
 37985       name: 'core/block-editor/insert-after',
 38357       category: 'block',
 37986       category: 'block',
 38358       description: Object(external_this_wp_i18n_["__"])('Insert a new block after the selected block(s).'),
 37987       description: Object(external_wp_i18n_["__"])('Insert a new block after the selected block(s).'),
 38359       keyCombination: {
 37988       keyCombination: {
 38360         modifier: 'primaryAlt',
 37989         modifier: 'primaryAlt',
 38361         character: 'y'
 37990         character: 'y'
 38362       }
 37991       }
 38363     });
 37992     });
 38364     registerShortcut({
 37993     registerShortcut({
 38365       name: 'core/block-editor/delete-multi-selection',
 37994       name: 'core/block-editor/delete-multi-selection',
 38366       category: 'block',
 37995       category: 'block',
 38367       description: Object(external_this_wp_i18n_["__"])('Remove multiple selected blocks.'),
 37996       description: Object(external_wp_i18n_["__"])('Remove multiple selected blocks.'),
 38368       keyCombination: {
 37997       keyCombination: {
 38369         character: 'del'
 37998         character: 'del'
 38370       },
 37999       },
 38371       aliases: [{
 38000       aliases: [{
 38372         character: 'backspace'
 38001         character: 'backspace'
 38373       }]
 38002       }]
 38374     });
 38003     });
 38375     registerShortcut({
 38004     registerShortcut({
 38376       name: 'core/block-editor/select-all',
 38005       name: 'core/block-editor/select-all',
 38377       category: 'selection',
 38006       category: 'selection',
 38378       description: Object(external_this_wp_i18n_["__"])('Select all text when typing. Press again to select all blocks.'),
 38007       description: Object(external_wp_i18n_["__"])('Select all text when typing. Press again to select all blocks.'),
 38379       keyCombination: {
 38008       keyCombination: {
 38380         modifier: 'primary',
 38009         modifier: 'primary',
 38381         character: 'a'
 38010         character: 'a'
 38382       }
 38011       }
 38383     });
 38012     });
 38384     registerShortcut({
 38013     registerShortcut({
 38385       name: 'core/block-editor/unselect',
 38014       name: 'core/block-editor/unselect',
 38386       category: 'selection',
 38015       category: 'selection',
 38387       description: Object(external_this_wp_i18n_["__"])('Clear selection.'),
 38016       description: Object(external_wp_i18n_["__"])('Clear selection.'),
 38388       keyCombination: {
 38017       keyCombination: {
 38389         character: 'escape'
 38018         character: 'escape'
 38390       }
 38019       }
 38391     });
 38020     });
 38392     registerShortcut({
 38021     registerShortcut({
 38393       name: 'core/block-editor/focus-toolbar',
 38022       name: 'core/block-editor/focus-toolbar',
 38394       category: 'global',
 38023       category: 'global',
 38395       description: Object(external_this_wp_i18n_["__"])('Navigate to the nearest toolbar.'),
 38024       description: Object(external_wp_i18n_["__"])('Navigate to the nearest toolbar.'),
 38396       keyCombination: {
 38025       keyCombination: {
 38397         modifier: 'alt',
 38026         modifier: 'alt',
 38398         character: 'F10'
 38027         character: 'F10'
 38399       }
 38028       }
 38400     });
 38029     });
 38401     registerShortcut({
 38030     registerShortcut({
 38402       name: 'core/block-editor/move-up',
 38031       name: 'core/block-editor/move-up',
 38403       category: 'block',
 38032       category: 'block',
 38404       description: Object(external_this_wp_i18n_["__"])('Move the selected block(s) up.'),
 38033       description: Object(external_wp_i18n_["__"])('Move the selected block(s) up.'),
 38405       keyCombination: {
 38034       keyCombination: {
 38406         modifier: 'secondary',
 38035         modifier: 'secondary',
 38407         character: 't'
 38036         character: 't'
 38408       }
 38037       }
 38409     });
 38038     });
 38410     registerShortcut({
 38039     registerShortcut({
 38411       name: 'core/block-editor/move-down',
 38040       name: 'core/block-editor/move-down',
 38412       category: 'block',
 38041       category: 'block',
 38413       description: Object(external_this_wp_i18n_["__"])('Move the selected block(s) down.'),
 38042       description: Object(external_wp_i18n_["__"])('Move the selected block(s) down.'),
 38414       keyCombination: {
 38043       keyCombination: {
 38415         modifier: 'secondary',
 38044         modifier: 'secondary',
 38416         character: 'y'
 38045         character: 'y'
 38417       }
 38046       }
 38418     });
 38047     });
 38421 }
 38050 }
 38422 
 38051 
 38423 KeyboardShortcuts.Register = KeyboardShortcutsRegister;
 38052 KeyboardShortcuts.Register = KeyboardShortcutsRegister;
 38424 /* harmony default export */ var keyboard_shortcuts = (KeyboardShortcuts);
 38053 /* harmony default export */ var keyboard_shortcuts = (KeyboardShortcuts);
 38425 
 38054 
 38426 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/multi-select-scroll-into-view/index.js
 38055 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/selection-scroll-into-view/index.js
 38427 /**
       
 38428  * External dependencies
       
 38429  */
       
 38430 
       
 38431 /**
 38056 /**
 38432  * WordPress dependencies
 38057  * WordPress dependencies
 38433  */
 38058  */
 38434 
       
 38435 
       
 38436 
       
 38437 
       
 38438 /**
       
 38439  * Internal dependencies
       
 38440  */
       
 38441 
       
 38442 
 38059 
 38443 /**
 38060 /**
 38444  * Scrolls the multi block selection end into view if not in view already. This
 38061  * Scrolls the multi block selection end into view if not in view already. This
 38445  * is important to do after selection by keyboard.
 38062  * is important to do after selection by keyboard.
       
 38063  *
       
 38064  * @deprecated
 38446  */
 38065  */
 38447 
 38066 
 38448 function MultiSelectScrollIntoView() {
 38067 function MultiSelectScrollIntoView() {
 38449   var selector = function selector(select) {
 38068   external_wp_deprecated_default()('wp.blockEditor.MultiSelectScrollIntoView', {
 38450     var _select = select('core/block-editor'),
 38069     hint: 'This behaviour is now built-in.'
 38451         getBlockSelectionEnd = _select.getBlockSelectionEnd,
 38070   });
 38452         hasMultiSelection = _select.hasMultiSelection,
       
 38453         isMultiSelecting = _select.isMultiSelecting;
       
 38454 
       
 38455     return {
       
 38456       selectionEnd: getBlockSelectionEnd(),
       
 38457       isMultiSelection: hasMultiSelection(),
       
 38458       isMultiSelecting: isMultiSelecting()
       
 38459     };
       
 38460   };
       
 38461 
       
 38462   var _useSelect = Object(external_this_wp_data_["useSelect"])(selector, []),
       
 38463       isMultiSelection = _useSelect.isMultiSelection,
       
 38464       selectionEnd = _useSelect.selectionEnd,
       
 38465       isMultiSelecting = _useSelect.isMultiSelecting;
       
 38466 
       
 38467   Object(external_this_wp_element_["useEffect"])(function () {
       
 38468     if (!selectionEnd || isMultiSelecting || !isMultiSelection) {
       
 38469       return;
       
 38470     }
       
 38471 
       
 38472     var extentNode = getBlockDOMNode(selectionEnd);
       
 38473 
       
 38474     if (!extentNode) {
       
 38475       return;
       
 38476     }
       
 38477 
       
 38478     var scrollContainer = Object(external_this_wp_dom_["getScrollContainer"])(extentNode); // If there's no scroll container, it follows that there's no scrollbar
       
 38479     // and thus there's no need to try to scroll into view.
       
 38480 
       
 38481     if (!scrollContainer) {
       
 38482       return;
       
 38483     }
       
 38484 
       
 38485     dom_scroll_into_view_lib_default()(extentNode, scrollContainer, {
       
 38486       onlyScrollIfNeeded: true
       
 38487     });
       
 38488   }, [isMultiSelection, selectionEnd, isMultiSelecting]);
       
 38489   return null;
 38071   return null;
 38490 }
 38072 }
 38491 
 38073 
 38492 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/observe-typing/index.js
 38074 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/observe-typing/index.js
 38493 
 38075 
 38494 
 38076 
 38495 /**
 38077 /**
 38496  * External dependencies
       
 38497  */
       
 38498 
       
 38499 /**
       
 38500  * WordPress dependencies
 38078  * WordPress dependencies
 38501  */
 38079  */
 38502 
 38080 
 38503 
 38081 
 38504 
 38082 
 38505 
 38083 
       
 38084 /**
       
 38085  * Internal dependencies
       
 38086  */
 38506 
 38087 
 38507 
 38088 
 38508 /**
 38089 /**
 38509  * Set of key codes upon which typing is to be initiated on a keydown event.
 38090  * Set of key codes upon which typing is to be initiated on a keydown event.
 38510  *
 38091  *
 38511  * @type {number[]}
 38092  * @type {Set<number>}
 38512  */
 38093  */
 38513 
 38094 
 38514 var KEY_DOWN_ELIGIBLE_KEY_CODES = [external_this_wp_keycodes_["UP"], external_this_wp_keycodes_["RIGHT"], external_this_wp_keycodes_["DOWN"], external_this_wp_keycodes_["LEFT"], external_this_wp_keycodes_["ENTER"], external_this_wp_keycodes_["BACKSPACE"]];
 38095 const KEY_DOWN_ELIGIBLE_KEY_CODES = new Set([external_wp_keycodes_["UP"], external_wp_keycodes_["RIGHT"], external_wp_keycodes_["DOWN"], external_wp_keycodes_["LEFT"], external_wp_keycodes_["ENTER"], external_wp_keycodes_["BACKSPACE"]]);
 38515 /**
 38096 /**
 38516  * Returns true if a given keydown event can be inferred as intent to start
 38097  * Returns true if a given keydown event can be inferred as intent to start
 38517  * typing, or false otherwise. A keydown is considered eligible if it is a
 38098  * typing, or false otherwise. A keydown is considered eligible if it is a
 38518  * text navigation without shift active.
 38099  * text navigation without shift active.
 38519  *
 38100  *
 38521  *
 38102  *
 38522  * @return {boolean} Whether event is eligible to start typing.
 38103  * @return {boolean} Whether event is eligible to start typing.
 38523  */
 38104  */
 38524 
 38105 
 38525 function isKeyDownEligibleForStartTyping(event) {
 38106 function isKeyDownEligibleForStartTyping(event) {
 38526   var keyCode = event.keyCode,
 38107   const {
 38527       shiftKey = event.shiftKey;
 38108     keyCode,
 38528   return !shiftKey && KEY_DOWN_ELIGIBLE_KEY_CODES.includes(keyCode);
 38109     shiftKey
 38529 }
 38110   } = event;
 38530 
 38111   return !shiftKey && KEY_DOWN_ELIGIBLE_KEY_CODES.has(keyCode);
 38531 function ObserveTyping(_ref) {
 38112 }
 38532   var children = _ref.children,
 38113 /**
 38533       setSafeTimeout = _ref.setTimeout;
 38114  * Removes the `isTyping` flag when the mouse moves in the document of the given
 38534   var typingContainer = Object(external_this_wp_element_["useRef"])();
 38115  * element.
 38535   var lastMouseMove = Object(external_this_wp_element_["useRef"])();
 38116  */
 38536   var isTyping = Object(external_this_wp_data_["useSelect"])(function (select) {
 38117 
 38537     return select('core/block-editor').isTyping();
 38118 
 38538   });
 38119 function useMouseMoveTypingReset() {
 38539 
 38120   const isTyping = Object(external_wp_data_["useSelect"])(select => select(store).isTyping());
 38540   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
 38121   const {
 38541       startTyping = _useDispatch.startTyping,
 38122     stopTyping
 38542       stopTyping = _useDispatch.stopTyping;
 38123   } = Object(external_wp_data_["useDispatch"])(store);
 38543 
 38124   return Object(external_wp_compose_["useRefEffect"])(node => {
 38544   Object(external_this_wp_element_["useEffect"])(function () {
 38125     if (!isTyping) {
 38545     toggleEventBindings(isTyping);
 38126       return;
 38546     return function () {
 38127     }
 38547       return toggleEventBindings(false);
 38128 
 38548     };
 38129     const {
 38549   }, [isTyping]);
 38130       ownerDocument
 38550   /**
 38131     } = node;
 38551    * Bind or unbind events to the document when typing has started or stopped
 38132     let lastClientX;
 38552    * respectively, or when component has become unmounted.
 38133     let lastClientY;
 38553    *
 38134     /**
 38554    * @param {boolean} isBound Whether event bindings should be applied.
 38135      * On mouse move, unset typing flag if user has moved cursor.
 38555    */
 38136      *
 38556 
 38137      * @param {MouseEvent} event Mousemove event.
 38557   function toggleEventBindings(isBound) {
 38138      */
 38558     var bindFn = isBound ? 'addEventListener' : 'removeEventListener';
 38139 
 38559     document[bindFn]('selectionchange', stopTypingOnSelectionUncollapse);
 38140     function stopTypingOnMouseMove(event) {
 38560     document[bindFn]('mousemove', stopTypingOnMouseMove);
 38141       const {
 38561   }
 38142         clientX,
 38562   /**
 38143         clientY
 38563    * On mouse move, unset typing flag if user has moved cursor.
 38144       } = event; // We need to check that the mouse really moved because Safari
 38564    *
 38145       // triggers mousemove events when shift or ctrl are pressed.
 38565    * @param {MouseEvent} event Mousemove event.
 38146 
 38566    */
 38147       if (lastClientX && lastClientY && (lastClientX !== clientX || lastClientY !== clientY)) {
 38567 
       
 38568 
       
 38569   function stopTypingOnMouseMove(event) {
       
 38570     var clientX = event.clientX,
       
 38571         clientY = event.clientY; // We need to check that the mouse really moved because Safari triggers
       
 38572     // mousemove events when shift or ctrl are pressed.
       
 38573 
       
 38574     if (lastMouseMove.current) {
       
 38575       var _lastMouseMove$curren = lastMouseMove.current,
       
 38576           lastClientX = _lastMouseMove$curren.clientX,
       
 38577           lastClientY = _lastMouseMove$curren.clientY;
       
 38578 
       
 38579       if (lastClientX !== clientX || lastClientY !== clientY) {
       
 38580         stopTyping();
 38148         stopTyping();
 38581       }
 38149       }
 38582     }
 38150 
 38583 
 38151       lastClientX = clientX;
 38584     lastMouseMove.current = {
 38152       lastClientY = clientY;
 38585       clientX: clientX,
 38153     }
 38586       clientY: clientY
 38154 
       
 38155     ownerDocument.addEventListener('mousemove', stopTypingOnMouseMove);
       
 38156     return () => {
       
 38157       ownerDocument.removeEventListener('mousemove', stopTypingOnMouseMove);
 38587     };
 38158     };
 38588   }
 38159   }, [isTyping, stopTyping]);
 38589   /**
 38160 }
 38590    * On selection change, unset typing flag if user has made an uncollapsed
 38161 /**
 38591    * (shift) selection.
 38162  * Sets and removes the `isTyping` flag based on user actions:
 38592    */
 38163  *
 38593 
 38164  * - Sets the flag if the user types within the given element.
 38594 
 38165  * - Removes the flag when the user selects some text, focusses a non-text
 38595   function stopTypingOnSelectionUncollapse() {
 38166  *   field, presses ESC or TAB, or moves the mouse in the document.
 38596     var selection = window.getSelection();
 38167  */
 38597     var isCollapsed = selection.rangeCount > 0 && selection.getRangeAt(0).collapsed;
 38168 
 38598 
 38169 function useTypingObserver() {
 38599     if (!isCollapsed) {
 38170   const isTyping = Object(external_wp_data_["useSelect"])(select => select(store).isTyping());
 38600       stopTyping();
 38171   const {
 38601     }
 38172     startTyping,
 38602   }
 38173     stopTyping
 38603   /**
 38174   } = Object(external_wp_data_["useDispatch"])(store);
 38604    * Unsets typing flag if user presses Escape while typing flag is active.
 38175   const ref1 = useMouseMoveTypingReset();
 38605    *
 38176   const ref2 = Object(external_wp_compose_["useRefEffect"])(node => {
 38606    * @param {KeyboardEvent} event Keypress or keydown event to interpret.
 38177     const {
 38607    */
 38178       ownerDocument
 38608 
 38179     } = node;
 38609 
 38180     const {
 38610   function stopTypingOnEscapeKey(event) {
 38181       defaultView
 38611     if (isTyping && (event.keyCode === external_this_wp_keycodes_["ESCAPE"] || event.keyCode === external_this_wp_keycodes_["TAB"])) {
 38182     } = ownerDocument; // Listeners to stop typing should only be added when typing.
 38612       stopTyping();
 38183     // Listeners to start typing should only be added when not typing.
 38613     }
 38184 
 38614   }
 38185     if (isTyping) {
 38615   /**
 38186       let timerId;
 38616    * Handles a keypress or keydown event to infer intention to start typing.
 38187       /**
 38617    *
 38188        * Stops typing when focus transitions to a non-text field element.
 38618    * @param {KeyboardEvent} event Keypress or keydown event to interpret.
 38189        *
 38619    */
 38190        * @param {FocusEvent} event Focus event.
 38620 
 38191        */
 38621 
 38192 
 38622   function startTypingInTextField(event) {
 38193       function stopTypingOnNonTextField(event) {
 38623     var type = event.type,
 38194         const {
 38624         target = event.target; // Abort early if already typing, or key press is incurred outside a
 38195           target
 38625     // text field (e.g. arrow-ing through toolbar buttons).
 38196         } = event; // Since focus to a non-text field via arrow key will trigger
 38626     // Ignore typing if outside the current DOM container
 38197         // before the keydown event, wait until after current stack
 38627 
 38198         // before evaluating whether typing is to be stopped. Otherwise,
 38628     if (isTyping || !Object(external_this_wp_dom_["isTextField"])(target) || !typingContainer.current.contains(target)) {
 38199         // typing will re-start.
 38629       return;
 38200 
 38630     } // Special-case keydown because certain keys do not emit a keypress
 38201         timerId = defaultView.setTimeout(() => {
 38631     // event. Conversely avoid keydown as the canonical event since there
 38202           if (!Object(external_wp_dom_["isTextField"])(target)) {
 38632     // are many keydown which are explicitly not targeted for typing.
 38203             stopTyping();
 38633 
 38204           }
 38634 
 38205         });
 38635     if (type === 'keydown' && !isKeyDownEligibleForStartTyping(event)) {
       
 38636       return;
       
 38637     }
       
 38638 
       
 38639     startTyping();
       
 38640   }
       
 38641   /**
       
 38642    * Stops typing when focus transitions to a non-text field element.
       
 38643    *
       
 38644    * @param {FocusEvent} event Focus event.
       
 38645    */
       
 38646 
       
 38647 
       
 38648   function stopTypingOnNonTextField(event) {
       
 38649     var target = event.target; // Since focus to a non-text field via arrow key will trigger before
       
 38650     // the keydown event, wait until after current stack before evaluating
       
 38651     // whether typing is to be stopped. Otherwise, typing will re-start.
       
 38652 
       
 38653     setSafeTimeout(function () {
       
 38654       if (isTyping && !Object(external_this_wp_dom_["isTextField"])(target)) {
       
 38655         stopTyping();
       
 38656       }
 38206       }
 38657     });
 38207       /**
 38658   } // Disable reason: This component is responsible for capturing bubbled
 38208        * Unsets typing flag if user presses Escape while typing flag is
 38659   // keyboard events which are interpreted as typing intent.
 38209        * active.
 38660 
 38210        *
 38661   /* eslint-disable jsx-a11y/no-static-element-interactions */
 38211        * @param {KeyboardEvent} event Keypress or keydown event to
 38662 
 38212        *                              interpret.
 38663 
 38213        */
 38664   return Object(external_this_wp_element_["createElement"])("div", {
 38214 
 38665     ref: typingContainer,
 38215 
 38666     onFocus: stopTypingOnNonTextField,
 38216       function stopTypingOnEscapeKey(event) {
 38667     onKeyPress: startTypingInTextField,
 38217         const {
 38668     onKeyDown: Object(external_this_lodash_["over"])([startTypingInTextField, stopTypingOnEscapeKey])
 38218           keyCode
       
 38219         } = event;
       
 38220 
       
 38221         if (keyCode === external_wp_keycodes_["ESCAPE"] || keyCode === external_wp_keycodes_["TAB"]) {
       
 38222           stopTyping();
       
 38223         }
       
 38224       }
       
 38225       /**
       
 38226        * On selection change, unset typing flag if user has made an
       
 38227        * uncollapsed (shift) selection.
       
 38228        */
       
 38229 
       
 38230 
       
 38231       function stopTypingOnSelectionUncollapse() {
       
 38232         const selection = defaultView.getSelection();
       
 38233         const isCollapsed = selection.rangeCount > 0 && selection.getRangeAt(0).collapsed;
       
 38234 
       
 38235         if (!isCollapsed) {
       
 38236           stopTyping();
       
 38237         }
       
 38238       }
       
 38239 
       
 38240       node.addEventListener('focus', stopTypingOnNonTextField);
       
 38241       node.addEventListener('keydown', stopTypingOnEscapeKey);
       
 38242       ownerDocument.addEventListener('selectionchange', stopTypingOnSelectionUncollapse);
       
 38243       return () => {
       
 38244         defaultView.clearTimeout(timerId);
       
 38245         node.removeEventListener('focus', stopTypingOnNonTextField);
       
 38246         node.removeEventListener('keydown', stopTypingOnEscapeKey);
       
 38247         ownerDocument.removeEventListener('selectionchange', stopTypingOnSelectionUncollapse);
       
 38248       };
       
 38249     }
       
 38250     /**
       
 38251      * Handles a keypress or keydown event to infer intention to start
       
 38252      * typing.
       
 38253      *
       
 38254      * @param {KeyboardEvent} event Keypress or keydown event to interpret.
       
 38255      */
       
 38256 
       
 38257 
       
 38258     function startTypingInTextField(event) {
       
 38259       const {
       
 38260         type,
       
 38261         target
       
 38262       } = event; // Abort early if already typing, or key press is incurred outside a
       
 38263       // text field (e.g. arrow-ing through toolbar buttons).
       
 38264       // Ignore typing if outside the current DOM container
       
 38265 
       
 38266       if (!Object(external_wp_dom_["isTextField"])(target) || !node.contains(target)) {
       
 38267         return;
       
 38268       } // Special-case keydown because certain keys do not emit a keypress
       
 38269       // event. Conversely avoid keydown as the canonical event since
       
 38270       // there are many keydown which are explicitly not targeted for
       
 38271       // typing.
       
 38272 
       
 38273 
       
 38274       if (type === 'keydown' && !isKeyDownEligibleForStartTyping(event)) {
       
 38275         return;
       
 38276       }
       
 38277 
       
 38278       startTyping();
       
 38279     }
       
 38280 
       
 38281     node.addEventListener('keypress', startTypingInTextField);
       
 38282     node.addEventListener('keydown', startTypingInTextField);
       
 38283     return () => {
       
 38284       node.removeEventListener('keypress', startTypingInTextField);
       
 38285       node.removeEventListener('keydown', startTypingInTextField);
       
 38286     };
       
 38287   }, [isTyping, startTyping, stopTyping]);
       
 38288   return Object(external_wp_compose_["useMergeRefs"])([ref1, ref2]);
       
 38289 }
       
 38290 
       
 38291 function ObserveTyping({
       
 38292   children
       
 38293 }) {
       
 38294   return Object(external_wp_element_["createElement"])("div", {
       
 38295     ref: useTypingObserver()
 38669   }, children);
 38296   }, children);
 38670   /* eslint-enable jsx-a11y/no-static-element-interactions */
 38297 }
 38671 }
 38298 /**
 38672 /**
 38299  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/observe-typing/README.md
 38673  * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/observe-typing/README.md
 38300  */
 38674  */
 38301 
 38675 
 38302 
 38676 
 38303 /* harmony default export */ var observe_typing = (ObserveTyping);
 38677 /* harmony default export */ var observe_typing = (Object(external_this_wp_compose_["withSafeTimeout"])(ObserveTyping));
       
 38678 
 38304 
 38679 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/preserve-scroll-in-reorder/index.js
 38305 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/preserve-scroll-in-reorder/index.js
 38680 /**
 38306 /**
 38681  * WordPress dependencies
 38307  * WordPress dependencies
 38682  */
 38308  */
 38683 
 38309 
 38684 function PreserveScrollInReorder() {
 38310 function PreserveScrollInReorder() {
 38685   external_this_wp_deprecated_default()('PreserveScrollInReorder component', {
 38311   external_wp_deprecated_default()('PreserveScrollInReorder component', {
       
 38312     since: '5.4',
 38686     hint: 'This behavior is now built-in the block list'
 38313     hint: 'This behavior is now built-in the block list'
 38687   });
 38314   });
 38688   return null;
 38315   return null;
 38689 }
 38316 }
 38690 
 38317 
 38691 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/typewriter/index.js
 38318 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/typewriter/index.js
 38692 
 38319 
 38693 
 38320 
 38694 
       
 38695 
       
 38696 
       
 38697 
       
 38698 
       
 38699 
       
 38700 function typewriter_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (typewriter_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
 38701 
       
 38702 function typewriter_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
 38703 
       
 38704 /**
 38321 /**
 38705  * WordPress dependencies
 38322  * WordPress dependencies
 38706  */
 38323  */
 38707 
 38324 
 38708 
 38325 
 38709 
 38326 
 38710 
 38327 
 38711 /** @typedef {import('@wordpress/element').WPSyntheticEvent} WPSyntheticEvent */
 38328 /**
 38712 
 38329  * Internal dependencies
 38713 var isIE = window.navigator.userAgent.indexOf('Trident') !== -1;
 38330  */
 38714 var arrowKeyCodes = new Set([external_this_wp_keycodes_["UP"], external_this_wp_keycodes_["DOWN"], external_this_wp_keycodes_["LEFT"], external_this_wp_keycodes_["RIGHT"]]);
 38331 
 38715 var initialTriggerPercentage = 0.75;
 38332 
 38716 
 38333 const isIE = window.navigator.userAgent.indexOf('Trident') !== -1;
 38717 var typewriter_Typewriter = /*#__PURE__*/function (_Component) {
 38334 const arrowKeyCodes = new Set([external_wp_keycodes_["UP"], external_wp_keycodes_["DOWN"], external_wp_keycodes_["LEFT"], external_wp_keycodes_["RIGHT"]]);
 38718   Object(inherits["a" /* default */])(Typewriter, _Component);
 38335 const initialTriggerPercentage = 0.75;
 38719 
 38336 function useTypewriter() {
 38720   var _super = typewriter_createSuper(Typewriter);
 38337   const hasSelectedBlock = Object(external_wp_data_["useSelect"])(select => select(store).hasSelectedBlock());
 38721 
 38338   return Object(external_wp_compose_["useRefEffect"])(node => {
 38722   function Typewriter() {
 38339     if (!hasSelectedBlock) {
 38723     var _this;
 38340       return;
 38724 
 38341     }
 38725     Object(classCallCheck["a" /* default */])(this, Typewriter);
 38342 
 38726 
 38343     const {
 38727     _this = _super.apply(this, arguments);
 38344       ownerDocument
 38728     _this.ref = Object(external_this_wp_element_["createRef"])();
 38345     } = node;
 38729     _this.onKeyDown = _this.onKeyDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
 38346     const {
 38730     _this.addSelectionChangeListener = _this.addSelectionChangeListener.bind(Object(assertThisInitialized["a" /* default */])(_this));
 38347       defaultView
 38731     _this.computeCaretRectOnSelectionChange = _this.computeCaretRectOnSelectionChange.bind(Object(assertThisInitialized["a" /* default */])(_this));
 38348     } = ownerDocument;
 38732     _this.maintainCaretPosition = _this.maintainCaretPosition.bind(Object(assertThisInitialized["a" /* default */])(_this));
 38349     let scrollResizeRafId;
 38733     _this.computeCaretRect = _this.computeCaretRect.bind(Object(assertThisInitialized["a" /* default */])(_this));
 38350     let onKeyDownRafId;
 38734     _this.onScrollResize = _this.onScrollResize.bind(Object(assertThisInitialized["a" /* default */])(_this));
 38351     let caretRect;
 38735     _this.isSelectionEligibleForScroll = _this.isSelectionEligibleForScroll.bind(Object(assertThisInitialized["a" /* default */])(_this));
 38352 
 38736     return _this;
 38353     function onScrollResize() {
 38737   }
 38354       if (scrollResizeRafId) {
 38738 
 38355         return;
 38739   Object(createClass["a" /* default */])(Typewriter, [{
       
 38740     key: "componentDidMount",
       
 38741     value: function componentDidMount() {
       
 38742       // When the user scrolls or resizes, the scroll position should be
       
 38743       // reset.
       
 38744       window.addEventListener('scroll', this.onScrollResize, true);
       
 38745       window.addEventListener('resize', this.onScrollResize, true);
       
 38746     }
       
 38747   }, {
       
 38748     key: "componentWillUnmount",
       
 38749     value: function componentWillUnmount() {
       
 38750       window.removeEventListener('scroll', this.onScrollResize, true);
       
 38751       window.removeEventListener('resize', this.onScrollResize, true);
       
 38752       document.removeEventListener('selectionchange', this.computeCaretRectOnSelectionChange);
       
 38753 
       
 38754       if (this.onScrollResize.rafId) {
       
 38755         window.cancelAnimationFrame(this.onScrollResize.rafId);
       
 38756       }
 38356       }
 38757 
 38357 
 38758       if (this.onKeyDown.rafId) {
 38358       scrollResizeRafId = defaultView.requestAnimationFrame(() => {
 38759         window.cancelAnimationFrame(this.onKeyDown.rafId);
 38359         computeCaretRectangle();
       
 38360         scrollResizeRafId = null;
       
 38361       });
       
 38362     }
       
 38363 
       
 38364     function onKeyDown(event) {
       
 38365       // Ensure the any remaining request is cancelled.
       
 38366       if (onKeyDownRafId) {
       
 38367         defaultView.cancelAnimationFrame(onKeyDownRafId);
       
 38368       } // Use an animation frame for a smooth result.
       
 38369 
       
 38370 
       
 38371       onKeyDownRafId = defaultView.requestAnimationFrame(() => {
       
 38372         maintainCaretPosition(event);
       
 38373         onKeyDownRafId = null;
       
 38374       });
       
 38375     }
       
 38376     /**
       
 38377      * Maintains the scroll position after a selection change caused by a
       
 38378      * keyboard event.
       
 38379      *
       
 38380      * @param {KeyboardEvent} event Keyboard event.
       
 38381      */
       
 38382 
       
 38383 
       
 38384     function maintainCaretPosition({
       
 38385       keyCode
       
 38386     }) {
       
 38387       if (!isSelectionEligibleForScroll()) {
       
 38388         return;
 38760       }
 38389       }
       
 38390 
       
 38391       const currentCaretRect = Object(external_wp_dom_["computeCaretRect"])(defaultView);
       
 38392 
       
 38393       if (!currentCaretRect) {
       
 38394         return;
       
 38395       } // If for some reason there is no position set to be scrolled to, let
       
 38396       // this be the position to be scrolled to in the future.
       
 38397 
       
 38398 
       
 38399       if (!caretRect) {
       
 38400         caretRect = currentCaretRect;
       
 38401         return;
       
 38402       } // Even though enabling the typewriter effect for arrow keys results in
       
 38403       // a pleasant experience, it may not be the case for everyone, so, for
       
 38404       // now, let's disable it.
       
 38405 
       
 38406 
       
 38407       if (arrowKeyCodes.has(keyCode)) {
       
 38408         // Reset the caret position to maintain.
       
 38409         caretRect = currentCaretRect;
       
 38410         return;
       
 38411       }
       
 38412 
       
 38413       const diff = currentCaretRect.top - caretRect.top;
       
 38414 
       
 38415       if (diff === 0) {
       
 38416         return;
       
 38417       }
       
 38418 
       
 38419       const scrollContainer = Object(external_wp_dom_["getScrollContainer"])(node); // The page must be scrollable.
       
 38420 
       
 38421       if (!scrollContainer) {
       
 38422         return;
       
 38423       }
       
 38424 
       
 38425       const windowScroll = scrollContainer === ownerDocument.body;
       
 38426       const scrollY = windowScroll ? defaultView.scrollY : scrollContainer.scrollTop;
       
 38427       const scrollContainerY = windowScroll ? 0 : scrollContainer.getBoundingClientRect().top;
       
 38428       const relativeScrollPosition = windowScroll ? caretRect.top / defaultView.innerHeight : (caretRect.top - scrollContainerY) / (defaultView.innerHeight - scrollContainerY); // If the scroll position is at the start, the active editable element
       
 38429       // is the last one, and the caret is positioned within the initial
       
 38430       // trigger percentage of the page, do not scroll the page.
       
 38431       // The typewriter effect should not kick in until an empty page has been
       
 38432       // filled with the initial trigger percentage or the user scrolls
       
 38433       // intentionally down.
       
 38434 
       
 38435       if (scrollY === 0 && relativeScrollPosition < initialTriggerPercentage && isLastEditableNode()) {
       
 38436         // Reset the caret position to maintain.
       
 38437         caretRect = currentCaretRect;
       
 38438         return;
       
 38439       }
       
 38440 
       
 38441       const scrollContainerHeight = windowScroll ? defaultView.innerHeight : scrollContainer.clientHeight; // Abort if the target scroll position would scroll the caret out of
       
 38442       // view.
       
 38443 
       
 38444       if ( // The caret is under the lower fold.
       
 38445       caretRect.top + caretRect.height > scrollContainerY + scrollContainerHeight || // The caret is above the upper fold.
       
 38446       caretRect.top < scrollContainerY) {
       
 38447         // Reset the caret position to maintain.
       
 38448         caretRect = currentCaretRect;
       
 38449         return;
       
 38450       }
       
 38451 
       
 38452       if (windowScroll) {
       
 38453         defaultView.scrollBy(0, diff);
       
 38454       } else {
       
 38455         scrollContainer.scrollTop += diff;
       
 38456       }
 38761     }
 38457     }
 38762     /**
 38458     /**
 38763      * Resets the scroll position to be maintained.
 38459      * Adds a `selectionchange` listener to reset the scroll position to be
       
 38460      * maintained.
 38764      */
 38461      */
 38765 
 38462 
 38766   }, {
 38463 
 38767     key: "computeCaretRect",
 38464     function addSelectionChangeListener() {
 38768     value: function computeCaretRect() {
 38465       ownerDocument.addEventListener('selectionchange', computeCaretRectOnSelectionChange);
 38769       if (this.isSelectionEligibleForScroll()) {
       
 38770         this.caretRect = Object(external_this_wp_dom_["computeCaretRect"])();
       
 38771       }
       
 38772     }
 38466     }
 38773     /**
 38467     /**
 38774      * Resets the scroll position to be maintained during a `selectionchange`
 38468      * Resets the scroll position to be maintained during a `selectionchange`
 38775      * event. Also removes the listener, so it acts as a one-time listener.
 38469      * event. Also removes the listener, so it acts as a one-time listener.
 38776      */
 38470      */
 38777 
 38471 
 38778   }, {
 38472 
 38779     key: "computeCaretRectOnSelectionChange",
 38473     function computeCaretRectOnSelectionChange() {
 38780     value: function computeCaretRectOnSelectionChange() {
 38474       ownerDocument.removeEventListener('selectionchange', computeCaretRectOnSelectionChange);
 38781       document.removeEventListener('selectionchange', this.computeCaretRectOnSelectionChange);
 38475       computeCaretRectangle();
 38782       this.computeCaretRect();
 38476     }
 38783     }
 38477     /**
 38784   }, {
 38478      * Resets the scroll position to be maintained.
 38785     key: "onScrollResize",
 38479      */
 38786     value: function onScrollResize() {
 38480 
 38787       var _this2 = this;
 38481 
 38788 
 38482     function computeCaretRectangle() {
 38789       if (this.onScrollResize.rafId) {
 38483       if (isSelectionEligibleForScroll()) {
 38790         return;
 38484         caretRect = Object(external_wp_dom_["computeCaretRect"])(defaultView);
 38791       }
 38485       }
 38792 
       
 38793       this.onScrollResize.rafId = window.requestAnimationFrame(function () {
       
 38794         _this2.computeCaretRect();
       
 38795 
       
 38796         delete _this2.onScrollResize.rafId;
       
 38797       });
       
 38798     }
 38486     }
 38799     /**
 38487     /**
 38800      * Checks if the current situation is elegible for scroll:
 38488      * Checks if the current situation is elegible for scroll:
 38801      * - There should be one and only one block selected.
 38489      * - There should be one and only one block selected.
 38802      * - The component must contain the selection.
 38490      * - The component must contain the selection.
 38803      * - The active element must be contenteditable.
 38491      * - The active element must be contenteditable.
 38804      */
 38492      */
 38805 
 38493 
 38806   }, {
 38494 
 38807     key: "isSelectionEligibleForScroll",
 38495     function isSelectionEligibleForScroll() {
 38808     value: function isSelectionEligibleForScroll() {
 38496       return node.contains(ownerDocument.activeElement) && ownerDocument.activeElement.isContentEditable;
 38809       return this.props.selectedBlockClientId && this.ref.current.contains(document.activeElement) && document.activeElement.isContentEditable;
 38497     }
 38810     }
 38498 
 38811   }, {
 38499     function isLastEditableNode() {
 38812     key: "isLastEditableNode",
 38500       const editableNodes = node.querySelectorAll('[contenteditable="true"]');
 38813     value: function isLastEditableNode() {
 38501       const lastEditableNode = editableNodes[editableNodes.length - 1];
 38814       var editableNodes = this.ref.current.querySelectorAll('[contenteditable="true"]');
 38502       return lastEditableNode === ownerDocument.activeElement;
 38815       var lastEditableNode = editableNodes[editableNodes.length - 1];
 38503     } // When the user scrolls or resizes, the scroll position should be
 38816       return lastEditableNode === document.activeElement;
 38504     // reset.
 38817     }
 38505 
 38818     /**
 38506 
 38819      * Maintains the scroll position after a selection change caused by a
 38507     defaultView.addEventListener('scroll', onScrollResize, true);
 38820      * keyboard event.
 38508     defaultView.addEventListener('resize', onScrollResize, true);
 38821      *
 38509     node.addEventListener('keydown', onKeyDown);
 38822      * @param {WPSyntheticEvent} event Synthetic keyboard event.
 38510     node.addEventListener('keyup', maintainCaretPosition);
 38823      */
 38511     node.addEventListener('mousedown', addSelectionChangeListener);
 38824 
 38512     node.addEventListener('touchstart', addSelectionChangeListener);
 38825   }, {
 38513     return () => {
 38826     key: "maintainCaretPosition",
 38514       defaultView.removeEventListener('scroll', onScrollResize, true);
 38827     value: function maintainCaretPosition(_ref) {
 38515       defaultView.removeEventListener('resize', onScrollResize, true);
 38828       var keyCode = _ref.keyCode;
 38516       node.removeEventListener('keydown', onKeyDown);
 38829 
 38517       node.removeEventListener('keyup', maintainCaretPosition);
 38830       if (!this.isSelectionEligibleForScroll()) {
 38518       node.removeEventListener('mousedown', addSelectionChangeListener);
 38831         return;
 38519       node.removeEventListener('touchstart', addSelectionChangeListener);
 38832       }
 38520       ownerDocument.removeEventListener('selectionchange', computeCaretRectOnSelectionChange);
 38833 
 38521       defaultView.cancelAnimationFrame(scrollResizeRafId);
 38834       var currentCaretRect = Object(external_this_wp_dom_["computeCaretRect"])();
 38522       defaultView.cancelAnimationFrame(onKeyDownRafId);
 38835 
 38523     };
 38836       if (!currentCaretRect) {
 38524   }, [hasSelectedBlock]);
 38837         return;
 38525 }
 38838       } // If for some reason there is no position set to be scrolled to, let
 38526 
 38839       // this be the position to be scrolled to in the future.
 38527 function Typewriter({
 38840 
 38528   children
 38841 
 38529 }) {
 38842       if (!this.caretRect) {
 38530   return Object(external_wp_element_["createElement"])("div", {
 38843         this.caretRect = currentCaretRect;
 38531     ref: useTypewriter(),
 38844         return;
 38532     className: "block-editor__typewriter"
 38845       } // Even though enabling the typewriter effect for arrow keys results in
 38533   }, children);
 38846       // a pleasant experience, it may not be the case for everyone, so, for
 38534 }
 38847       // now, let's disable it.
       
 38848 
       
 38849 
       
 38850       if (arrowKeyCodes.has(keyCode)) {
       
 38851         // Reset the caret position to maintain.
       
 38852         this.caretRect = currentCaretRect;
       
 38853         return;
       
 38854       }
       
 38855 
       
 38856       var diff = currentCaretRect.top - this.caretRect.top;
       
 38857 
       
 38858       if (diff === 0) {
       
 38859         return;
       
 38860       }
       
 38861 
       
 38862       var scrollContainer = Object(external_this_wp_dom_["getScrollContainer"])(this.ref.current); // The page must be scrollable.
       
 38863 
       
 38864       if (!scrollContainer) {
       
 38865         return;
       
 38866       }
       
 38867 
       
 38868       var windowScroll = scrollContainer === document.body;
       
 38869       var scrollY = windowScroll ? window.scrollY : scrollContainer.scrollTop;
       
 38870       var scrollContainerY = windowScroll ? 0 : scrollContainer.getBoundingClientRect().top;
       
 38871       var relativeScrollPosition = windowScroll ? this.caretRect.top / window.innerHeight : (this.caretRect.top - scrollContainerY) / (window.innerHeight - scrollContainerY); // If the scroll position is at the start, the active editable element
       
 38872       // is the last one, and the caret is positioned within the initial
       
 38873       // trigger percentage of the page, do not scroll the page.
       
 38874       // The typewriter effect should not kick in until an empty page has been
       
 38875       // filled with the initial trigger percentage or the user scrolls
       
 38876       // intentionally down.
       
 38877 
       
 38878       if (scrollY === 0 && relativeScrollPosition < initialTriggerPercentage && this.isLastEditableNode()) {
       
 38879         // Reset the caret position to maintain.
       
 38880         this.caretRect = currentCaretRect;
       
 38881         return;
       
 38882       }
       
 38883 
       
 38884       var scrollContainerHeight = windowScroll ? window.innerHeight : scrollContainer.clientHeight; // Abort if the target scroll position would scroll the caret out of
       
 38885       // view.
       
 38886 
       
 38887       if ( // The caret is under the lower fold.
       
 38888       this.caretRect.top + this.caretRect.height > scrollContainerY + scrollContainerHeight || // The caret is above the upper fold.
       
 38889       this.caretRect.top < scrollContainerY) {
       
 38890         // Reset the caret position to maintain.
       
 38891         this.caretRect = currentCaretRect;
       
 38892         return;
       
 38893       }
       
 38894 
       
 38895       if (windowScroll) {
       
 38896         window.scrollBy(0, diff);
       
 38897       } else {
       
 38898         scrollContainer.scrollTop += diff;
       
 38899       }
       
 38900     }
       
 38901     /**
       
 38902      * Adds a `selectionchange` listener to reset the scroll position to be
       
 38903      * maintained.
       
 38904      */
       
 38905 
       
 38906   }, {
       
 38907     key: "addSelectionChangeListener",
       
 38908     value: function addSelectionChangeListener() {
       
 38909       document.addEventListener('selectionchange', this.computeCaretRectOnSelectionChange);
       
 38910     }
       
 38911   }, {
       
 38912     key: "onKeyDown",
       
 38913     value: function onKeyDown(event) {
       
 38914       var _this3 = this;
       
 38915 
       
 38916       event.persist(); // Ensure the any remaining request is cancelled.
       
 38917 
       
 38918       if (this.onKeyDown.rafId) {
       
 38919         window.cancelAnimationFrame(this.onKeyDown.rafId);
       
 38920       } // Use an animation frame for a smooth result.
       
 38921 
       
 38922 
       
 38923       this.onKeyDown.rafId = window.requestAnimationFrame(function () {
       
 38924         _this3.maintainCaretPosition(event);
       
 38925 
       
 38926         delete _this3.onKeyDown.rafId;
       
 38927       });
       
 38928     }
       
 38929   }, {
       
 38930     key: "render",
       
 38931     value: function render() {
       
 38932       // Disable reason: Wrapper itself is non-interactive, but must capture
       
 38933       // bubbling events from children to determine focus transition intents.
       
 38934 
       
 38935       /* eslint-disable jsx-a11y/no-static-element-interactions */
       
 38936       return Object(external_this_wp_element_["createElement"])("div", {
       
 38937         ref: this.ref,
       
 38938         onKeyDown: this.onKeyDown,
       
 38939         onKeyUp: this.maintainCaretPosition,
       
 38940         onMouseDown: this.addSelectionChangeListener,
       
 38941         onTouchStart: this.addSelectionChangeListener,
       
 38942         className: "block-editor__typewriter"
       
 38943       }, this.props.children);
       
 38944       /* eslint-enable jsx-a11y/no-static-element-interactions */
       
 38945     }
       
 38946   }]);
       
 38947 
       
 38948   return Typewriter;
       
 38949 }(external_this_wp_element_["Component"]);
       
 38950 /**
 38535 /**
 38951  * The exported component. The implementation of Typewriter faced technical
 38536  * The exported component. The implementation of Typewriter faced technical
 38952  * challenges in Internet Explorer, and is simply skipped, rendering the given
 38537  * challenges in Internet Explorer, and is simply skipped, rendering the given
 38953  * props children instead.
 38538  * props children instead.
 38954  *
 38539  *
 38955  * @type {WPComponent}
 38540  * @type {WPComponent}
 38956  */
 38541  */
 38957 
 38542 
 38958 
 38543 
 38959 var TypewriterOrIEBypass = isIE ? function (props) {
 38544 const TypewriterOrIEBypass = isIE ? props => props.children : Typewriter;
 38960   return props.children;
       
 38961 } : Object(external_this_wp_data_["withSelect"])(function (select) {
       
 38962   var _select = select('core/block-editor'),
       
 38963       getSelectedBlockClientId = _select.getSelectedBlockClientId;
       
 38964 
       
 38965   return {
       
 38966     selectedBlockClientId: getSelectedBlockClientId()
       
 38967   };
       
 38968 })(typewriter_Typewriter);
       
 38969 /**
 38545 /**
 38970  * Ensures that the text selection keeps the same vertical distance from the
 38546  * Ensures that the text selection keeps the same vertical distance from the
 38971  * viewport during keyboard events within this component. The vertical distance
 38547  * viewport during keyboard events within this component. The vertical distance
 38972  * can vary. It is the last clicked or scrolled to position.
 38548  * can vary. It is the last clicked or scrolled to position.
 38973  */
 38549  */
 38974 
 38550 
 38975 /* harmony default export */ var typewriter = (TypewriterOrIEBypass);
 38551 /* harmony default export */ var typewriter = (TypewriterOrIEBypass);
 38976 
 38552 
 38977 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-editor-feature/index.js
 38553 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/writing-flow/use-multi-selection.js
 38978 /**
 38554 /**
 38979  * External dependencies
 38555  * External dependencies
 38980  */
 38556  */
 38981 
 38557 
 38982 /**
 38558 /**
 38983  * WordPress dependencies
 38559  * WordPress dependencies
 38984  */
 38560  */
 38985 
 38561 
 38986 
 38562 
       
 38563 
 38987 /**
 38564 /**
 38988  * Internal dependencies
 38565  * Internal dependencies
 38989  */
 38566  */
 38990 
 38567 
 38991 
 38568 
 38992 /**
 38569 
 38993  * Hook that retrieves the setting for the given editor feature.
 38570 
 38994  * It works with nested objects using by finding the value at path.
 38571 function use_multi_selection_toggleRichText(container, toggle) {
 38995  *
 38572   Array.from(container.querySelectorAll('.rich-text')).forEach(node => {
 38996  * @param {string} featurePath  The path to the feature.
 38573     if (toggle) {
 38997  *
 38574       node.setAttribute('contenteditable', true);
 38998  * @return {any} Returns the value defined for the setting.
 38575     } else {
 38999  *
 38576       node.removeAttribute('contenteditable');
 39000  * @example
 38577     }
 39001  * ```js
 38578   });
 39002  * const isEnabled = useEditorFeature( 'typography.dropCap' );
 38579 }
 39003  * ```
 38580 /**
 39004  */
 38581  * Returns for the deepest node at the start or end of a container node. Ignores
 39005 
 38582  * any text nodes that only contain HTML formatting whitespace.
 39006 function useEditorFeature(featurePath) {
 38583  *
 39007   var _useBlockEditContext = useBlockEditContext(),
 38584  * @param {Element} node Container to search.
 39008       blockName = _useBlockEditContext.name;
 38585  * @param {string} type 'start' or 'end'.
 39009 
 38586  */
 39010   var path = "__experimentalFeatures.".concat(featurePath);
 38587 
 39011   var setting = Object(external_this_wp_data_["useSelect"])(function (select) {
 38588 
 39012     var _select = select('core/blocks'),
 38589 function getDeepestNode(node, type) {
 39013         getBlockSupport = _select.getBlockSupport;
 38590   const child = type === 'start' ? 'firstChild' : 'lastChild';
 39014 
 38591   const sibling = type === 'start' ? 'nextSibling' : 'previousSibling';
 39015     var blockSupportValue = getBlockSupport(blockName, path);
 38592 
 39016 
 38593   while (node[child]) {
 39017     if (blockSupportValue !== undefined) {
 38594     node = node[child];
 39018       return blockSupportValue;
 38595 
 39019     }
 38596     while (node.nodeType === node.TEXT_NODE && /^[ \t\n]*$/.test(node.data) && node[sibling]) {
 39020 
 38597       node = node[sibling];
 39021     var _select2 = select('core/block-editor'),
 38598     }
 39022         getSettings = _select2.getSettings;
 38599   }
 39023 
 38600 
 39024     return Object(external_this_lodash_["get"])(getSettings(), path);
 38601   return node;
 39025   }, [blockName, path]);
 38602 }
 39026   return setting;
 38603 
       
 38604 function use_multi_selection_selector(select) {
       
 38605   const {
       
 38606     isMultiSelecting,
       
 38607     getMultiSelectedBlockClientIds,
       
 38608     hasMultiSelection,
       
 38609     getSelectedBlockClientId
       
 38610   } = select(store);
       
 38611   return {
       
 38612     isMultiSelecting: isMultiSelecting(),
       
 38613     multiSelectedBlockClientIds: getMultiSelectedBlockClientIds(),
       
 38614     hasMultiSelection: hasMultiSelection(),
       
 38615     selectedBlockClientId: getSelectedBlockClientId()
       
 38616   };
       
 38617 }
       
 38618 
       
 38619 function use_multi_selection_useMultiSelection() {
       
 38620   const ref = Object(external_wp_element_["useRef"])();
       
 38621   const {
       
 38622     isMultiSelecting,
       
 38623     multiSelectedBlockClientIds,
       
 38624     hasMultiSelection,
       
 38625     selectedBlockClientId
       
 38626   } = Object(external_wp_data_["useSelect"])(use_multi_selection_selector, []);
       
 38627   const {
       
 38628     selectBlock
       
 38629   } = Object(external_wp_data_["useDispatch"])(store);
       
 38630   const selectedRef = useBlockRef(selectedBlockClientId); // These must be in the right DOM order.
       
 38631 
       
 38632   const startRef = useBlockRef(Object(external_lodash_["first"])(multiSelectedBlockClientIds));
       
 38633   const endRef = useBlockRef(Object(external_lodash_["last"])(multiSelectedBlockClientIds));
       
 38634   /**
       
 38635    * When the component updates, and there is multi selection, we need to
       
 38636    * select the entire block contents.
       
 38637    */
       
 38638 
       
 38639   Object(external_wp_element_["useEffect"])(() => {
       
 38640     const {
       
 38641       ownerDocument
       
 38642     } = ref.current;
       
 38643     const {
       
 38644       defaultView
       
 38645     } = ownerDocument;
       
 38646 
       
 38647     if (!hasMultiSelection || isMultiSelecting) {
       
 38648       if (!selectedBlockClientId || isMultiSelecting) {
       
 38649         return;
       
 38650       }
       
 38651 
       
 38652       const selection = defaultView.getSelection();
       
 38653 
       
 38654       if (selection.rangeCount && !selection.isCollapsed) {
       
 38655         const blockNode = selectedRef.current;
       
 38656         const {
       
 38657           startContainer,
       
 38658           endContainer
       
 38659         } = selection.getRangeAt(0);
       
 38660 
       
 38661         if (!!blockNode && (!blockNode.contains(startContainer) || !blockNode.contains(endContainer))) {
       
 38662           selection.removeAllRanges();
       
 38663         }
       
 38664       }
       
 38665 
       
 38666       return;
       
 38667     }
       
 38668 
       
 38669     const {
       
 38670       length
       
 38671     } = multiSelectedBlockClientIds;
       
 38672 
       
 38673     if (length < 2) {
       
 38674       return;
       
 38675     } // For some browsers, like Safari, it is important that focus happens
       
 38676     // BEFORE selection.
       
 38677 
       
 38678 
       
 38679     ref.current.focus();
       
 38680     const selection = defaultView.getSelection();
       
 38681     const range = ownerDocument.createRange(); // These must be in the right DOM order.
       
 38682     // The most stable way to select the whole block contents is to start
       
 38683     // and end at the deepest points.
       
 38684 
       
 38685     const startNode = getDeepestNode(startRef.current, 'start');
       
 38686     const endNode = getDeepestNode(endRef.current, 'end'); // While rich text will be disabled with a delay when there is a multi
       
 38687     // selection, we must do it immediately because it's not possible to set
       
 38688     // selection across editable hosts.
       
 38689 
       
 38690     use_multi_selection_toggleRichText(ref.current, false);
       
 38691     range.setStartBefore(startNode);
       
 38692     range.setEndAfter(endNode);
       
 38693     selection.removeAllRanges();
       
 38694     selection.addRange(range);
       
 38695   }, [hasMultiSelection, isMultiSelecting, multiSelectedBlockClientIds, selectBlock, selectedBlockClientId]);
       
 38696   return ref;
       
 38697 }
       
 38698 
       
 38699 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/writing-flow/use-tab-nav.js
       
 38700 
       
 38701 
       
 38702 /**
       
 38703  * WordPress dependencies
       
 38704  */
       
 38705 
       
 38706 
       
 38707 
       
 38708 
       
 38709 
       
 38710 /**
       
 38711  * Internal dependencies
       
 38712  */
       
 38713 
       
 38714 
       
 38715 
       
 38716 function isFormElement(element) {
       
 38717   const {
       
 38718     tagName
       
 38719   } = element;
       
 38720   return tagName === 'INPUT' || tagName === 'BUTTON' || tagName === 'SELECT' || tagName === 'TEXTAREA';
       
 38721 }
       
 38722 
       
 38723 function useTabNav() {
       
 38724   const container = Object(external_wp_element_["useRef"])();
       
 38725   const focusCaptureBeforeRef = Object(external_wp_element_["useRef"])();
       
 38726   const focusCaptureAfterRef = Object(external_wp_element_["useRef"])();
       
 38727   const lastFocus = Object(external_wp_element_["useRef"])();
       
 38728   const {
       
 38729     hasMultiSelection,
       
 38730     getSelectedBlockClientId
       
 38731   } = Object(external_wp_data_["useSelect"])(store);
       
 38732   const {
       
 38733     setNavigationMode
       
 38734   } = Object(external_wp_data_["useDispatch"])(store);
       
 38735   const isNavigationMode = Object(external_wp_data_["useSelect"])(select => select(store).isNavigationMode(), []); // Don't allow tabbing to this element in Navigation mode.
       
 38736 
       
 38737   const focusCaptureTabIndex = !isNavigationMode ? '0' : undefined; // Reference that holds the a flag for enabling or disabling
       
 38738   // capturing on the focus capture elements.
       
 38739 
       
 38740   const noCapture = Object(external_wp_element_["useRef"])();
       
 38741 
       
 38742   function onFocusCapture(event) {
       
 38743     // Do not capture incoming focus if set by us in WritingFlow.
       
 38744     if (noCapture.current) {
       
 38745       noCapture.current = null;
       
 38746     } else if (hasMultiSelection()) {
       
 38747       container.current.focus();
       
 38748     } else if (getSelectedBlockClientId()) {
       
 38749       lastFocus.current.focus();
       
 38750     } else {
       
 38751       setNavigationMode(true);
       
 38752       const isBefore = // eslint-disable-next-line no-bitwise
       
 38753       event.target.compareDocumentPosition(container.current) & event.target.DOCUMENT_POSITION_FOLLOWING;
       
 38754       const action = isBefore ? 'findNext' : 'findPrevious';
       
 38755       external_wp_dom_["focus"].tabbable[action](event.target).focus();
       
 38756     }
       
 38757   }
       
 38758 
       
 38759   const before = Object(external_wp_element_["createElement"])("div", {
       
 38760     ref: focusCaptureBeforeRef,
       
 38761     tabIndex: focusCaptureTabIndex,
       
 38762     onFocus: onFocusCapture
       
 38763   });
       
 38764   const after = Object(external_wp_element_["createElement"])("div", {
       
 38765     ref: focusCaptureAfterRef,
       
 38766     tabIndex: focusCaptureTabIndex,
       
 38767     onFocus: onFocusCapture
       
 38768   });
       
 38769   const ref = Object(external_wp_compose_["useRefEffect"])(node => {
       
 38770     function onKeyDown(event) {
       
 38771       if (event.keyCode === external_wp_keycodes_["ESCAPE"] && !hasMultiSelection()) {
       
 38772         event.stopPropagation();
       
 38773         event.preventDefault();
       
 38774         setNavigationMode(true);
       
 38775         return;
       
 38776       } // In Edit mode, Tab should focus the first tabbable element after
       
 38777       // the content, which is normally the sidebar (with block controls)
       
 38778       // and Shift+Tab should focus the first tabbable element before the
       
 38779       // content, which is normally the block toolbar.
       
 38780       // Arrow keys can be used, and Tab and arrow keys can be used in
       
 38781       // Navigation mode (press Esc), to navigate through blocks.
       
 38782 
       
 38783 
       
 38784       if (event.keyCode !== external_wp_keycodes_["TAB"]) {
       
 38785         return;
       
 38786       }
       
 38787 
       
 38788       const isShift = event.shiftKey;
       
 38789       const direction = isShift ? 'findPrevious' : 'findNext';
       
 38790 
       
 38791       if (!hasMultiSelection() && !getSelectedBlockClientId()) {
       
 38792         // Preserve the behaviour of entering navigation mode when
       
 38793         // tabbing into the content without a block selection.
       
 38794         // `onFocusCapture` already did this previously, but we need to
       
 38795         // do it again here because after clearing block selection,
       
 38796         // focus land on the writing flow container and pressing Tab
       
 38797         // will no longer send focus through the focus capture element.
       
 38798         if (event.target === node) setNavigationMode(true);
       
 38799         return;
       
 38800       } // Allow tabbing between form elements rendered in a block,
       
 38801       // such as inside a placeholder. Form elements are generally
       
 38802       // meant to be UI rather than part of the content. Ideally
       
 38803       // these are not rendered in the content and perhaps in the
       
 38804       // future they can be rendered in an iframe or shadow DOM.
       
 38805 
       
 38806 
       
 38807       if (isFormElement(event.target) && isFormElement(external_wp_dom_["focus"].tabbable[direction](event.target))) {
       
 38808         return;
       
 38809       }
       
 38810 
       
 38811       const next = isShift ? focusCaptureBeforeRef : focusCaptureAfterRef; // Disable focus capturing on the focus capture element, so it
       
 38812       // doesn't refocus this block and so it allows default behaviour
       
 38813       // (moving focus to the next tabbable element).
       
 38814 
       
 38815       noCapture.current = true; // Focusing the focus capture element, which is located above and
       
 38816       // below the editor, should not scroll the page all the way up or
       
 38817       // down.
       
 38818 
       
 38819       next.current.focus({
       
 38820         preventScroll: true
       
 38821       });
       
 38822     }
       
 38823 
       
 38824     function onFocusOut(event) {
       
 38825       lastFocus.current = event.target;
       
 38826     } // When tabbing back to an element in block list, this event handler prevents scrolling if the
       
 38827     // focus capture divs (before/after) are outside of the viewport. (For example shift+tab back to a paragraph
       
 38828     // when focus is on a sidebar element. This prevents the scrollable writing area from jumping either to the
       
 38829     // top or bottom of the document.
       
 38830     //
       
 38831     // Note that it isn't possible to disable scrolling in the onFocus event. We need to intercept this
       
 38832     // earlier in the keypress handler, and call focus( { preventScroll: true } ) instead.
       
 38833     // https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus#parameters
       
 38834 
       
 38835 
       
 38836     function preventScrollOnTab(event) {
       
 38837       var _event$target;
       
 38838 
       
 38839       if (event.keyCode !== external_wp_keycodes_["TAB"]) {
       
 38840         return;
       
 38841       }
       
 38842 
       
 38843       if (((_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.getAttribute('role')) === 'region') {
       
 38844         return;
       
 38845       }
       
 38846 
       
 38847       if (container.current === event.target) {
       
 38848         return;
       
 38849       }
       
 38850 
       
 38851       const isShift = event.shiftKey;
       
 38852       const direction = isShift ? 'findPrevious' : 'findNext';
       
 38853       const target = external_wp_dom_["focus"].tabbable[direction](event.target); // only do something when the next tabbable is a focus capture div (before/after)
       
 38854 
       
 38855       if (target === focusCaptureBeforeRef.current || target === focusCaptureAfterRef.current) {
       
 38856         event.preventDefault();
       
 38857         target.focus({
       
 38858           preventScroll: true
       
 38859         });
       
 38860       }
       
 38861     }
       
 38862 
       
 38863     node.ownerDocument.defaultView.addEventListener('keydown', preventScrollOnTab);
       
 38864     node.addEventListener('keydown', onKeyDown);
       
 38865     node.addEventListener('focusout', onFocusOut);
       
 38866     return () => {
       
 38867       node.ownerDocument.defaultView.removeEventListener('keydown', preventScrollOnTab);
       
 38868       node.removeEventListener('keydown', onKeyDown);
       
 38869       node.removeEventListener('focusout', onFocusOut);
       
 38870     };
       
 38871   }, []);
       
 38872   const mergedRefs = Object(external_wp_compose_["useMergeRefs"])([container, ref]);
       
 38873   return [before, mergedRefs, after];
       
 38874 }
       
 38875 
       
 38876 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/writing-flow/use-arrow-nav.js
       
 38877 /**
       
 38878  * External dependencies
       
 38879  */
       
 38880 
       
 38881 /**
       
 38882  * WordPress dependencies
       
 38883  */
       
 38884 
       
 38885 
       
 38886 
       
 38887 
       
 38888 
       
 38889 /**
       
 38890  * Internal dependencies
       
 38891  */
       
 38892 
       
 38893 
       
 38894 
       
 38895 /**
       
 38896  * Returns true if the element should consider edge navigation upon a keyboard
       
 38897  * event of the given directional key code, or false otherwise.
       
 38898  *
       
 38899  * @param {Element} element     HTML element to test.
       
 38900  * @param {number}  keyCode     KeyboardEvent keyCode to test.
       
 38901  * @param {boolean} hasModifier Whether a modifier is pressed.
       
 38902  *
       
 38903  * @return {boolean} Whether element should consider edge navigation.
       
 38904  */
       
 38905 
       
 38906 function isNavigationCandidate(element, keyCode, hasModifier) {
       
 38907   const isVertical = keyCode === external_wp_keycodes_["UP"] || keyCode === external_wp_keycodes_["DOWN"]; // Currently, all elements support unmodified vertical navigation.
       
 38908 
       
 38909   if (isVertical && !hasModifier) {
       
 38910     return true;
       
 38911   } // Native inputs should not navigate horizontally.
       
 38912 
       
 38913 
       
 38914   const {
       
 38915     tagName
       
 38916   } = element;
       
 38917   return tagName !== 'INPUT' && tagName !== 'TEXTAREA';
       
 38918 }
       
 38919 /**
       
 38920  * Returns the optimal tab target from the given focused element in the desired
       
 38921  * direction. A preference is made toward text fields, falling back to the block
       
 38922  * focus stop if no other candidates exist for the block.
       
 38923  *
       
 38924  * @param {Element} target           Currently focused text field.
       
 38925  * @param {boolean} isReverse        True if considering as the first field.
       
 38926  * @param {Element} containerElement Element containing all blocks.
       
 38927  * @param {boolean} onlyVertical     Whether to only consider tabbable elements
       
 38928  *                                   that are visually above or under the
       
 38929  *                                   target.
       
 38930  *
       
 38931  * @return {?Element} Optimal tab target, if one exists.
       
 38932  */
       
 38933 
       
 38934 function getClosestTabbable(target, isReverse, containerElement, onlyVertical) {
       
 38935   // Since the current focus target is not guaranteed to be a text field, find
       
 38936   // all focusables. Tabbability is considered later.
       
 38937   let focusableNodes = external_wp_dom_["focus"].focusable.find(containerElement);
       
 38938 
       
 38939   if (isReverse) {
       
 38940     focusableNodes = Object(external_lodash_["reverse"])(focusableNodes);
       
 38941   } // Consider as candidates those focusables after the current target. It's
       
 38942   // assumed this can only be reached if the target is focusable (on its
       
 38943   // keydown event), so no need to verify it exists in the set.
       
 38944 
       
 38945 
       
 38946   focusableNodes = focusableNodes.slice(focusableNodes.indexOf(target) + 1);
       
 38947   let targetRect;
       
 38948 
       
 38949   if (onlyVertical) {
       
 38950     targetRect = target.getBoundingClientRect();
       
 38951   }
       
 38952 
       
 38953   function isTabCandidate(node) {
       
 38954     // Not a candidate if the node is not tabbable.
       
 38955     if (!external_wp_dom_["focus"].tabbable.isTabbableIndex(node)) {
       
 38956       return false;
       
 38957     } // Skip focusable elements such as links within content editable nodes.
       
 38958 
       
 38959 
       
 38960     if (node.isContentEditable && node.contentEditable !== 'true') {
       
 38961       return false;
       
 38962     }
       
 38963 
       
 38964     if (onlyVertical) {
       
 38965       const nodeRect = node.getBoundingClientRect();
       
 38966 
       
 38967       if (nodeRect.left >= targetRect.right || nodeRect.right <= targetRect.left) {
       
 38968         return false;
       
 38969       }
       
 38970     }
       
 38971 
       
 38972     return true;
       
 38973   }
       
 38974 
       
 38975   return Object(external_lodash_["find"])(focusableNodes, isTabCandidate);
       
 38976 }
       
 38977 function useArrowNav() {
       
 38978   const {
       
 38979     getSelectedBlockClientId,
       
 38980     getMultiSelectedBlocksStartClientId,
       
 38981     getMultiSelectedBlocksEndClientId,
       
 38982     getPreviousBlockClientId,
       
 38983     getNextBlockClientId,
       
 38984     getFirstMultiSelectedBlockClientId,
       
 38985     getLastMultiSelectedBlockClientId,
       
 38986     getSettings,
       
 38987     hasMultiSelection
       
 38988   } = Object(external_wp_data_["useSelect"])(store);
       
 38989   const {
       
 38990     multiSelect,
       
 38991     selectBlock
       
 38992   } = Object(external_wp_data_["useDispatch"])(store);
       
 38993   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 38994     // Here a DOMRect is stored while moving the caret vertically so
       
 38995     // vertical position of the start position can be restored. This is to
       
 38996     // recreate browser behaviour across blocks.
       
 38997     let verticalRect;
       
 38998 
       
 38999     function onMouseDown() {
       
 39000       verticalRect = null;
       
 39001     }
       
 39002 
       
 39003     function expandSelection(isReverse) {
       
 39004       const selectedBlockClientId = getSelectedBlockClientId();
       
 39005       const selectionStartClientId = getMultiSelectedBlocksStartClientId();
       
 39006       const selectionEndClientId = getMultiSelectedBlocksEndClientId();
       
 39007       const selectionBeforeEndClientId = getPreviousBlockClientId(selectionEndClientId || selectedBlockClientId);
       
 39008       const selectionAfterEndClientId = getNextBlockClientId(selectionEndClientId || selectedBlockClientId);
       
 39009       const nextSelectionEndClientId = isReverse ? selectionBeforeEndClientId : selectionAfterEndClientId;
       
 39010 
       
 39011       if (nextSelectionEndClientId) {
       
 39012         if (selectionStartClientId === nextSelectionEndClientId) {
       
 39013           selectBlock(nextSelectionEndClientId);
       
 39014         } else {
       
 39015           multiSelect(selectionStartClientId || selectedBlockClientId, nextSelectionEndClientId);
       
 39016         }
       
 39017       }
       
 39018     }
       
 39019 
       
 39020     function moveSelection(isReverse) {
       
 39021       const selectedFirstClientId = getFirstMultiSelectedBlockClientId();
       
 39022       const selectedLastClientId = getLastMultiSelectedBlockClientId();
       
 39023       const focusedBlockClientId = isReverse ? selectedFirstClientId : selectedLastClientId;
       
 39024 
       
 39025       if (focusedBlockClientId) {
       
 39026         selectBlock(focusedBlockClientId);
       
 39027       }
       
 39028     }
       
 39029     /**
       
 39030      * Returns true if the given target field is the last in its block which
       
 39031      * can be considered for tab transition. For example, in a block with
       
 39032      * two text fields, this would return true when reversing from the first
       
 39033      * of the two fields, but false when reversing from the second.
       
 39034      *
       
 39035      * @param {Element} target    Currently focused text field.
       
 39036      * @param {boolean} isReverse True if considering as the first field.
       
 39037      *
       
 39038      * @return {boolean} Whether field is at edge for tab transition.
       
 39039      */
       
 39040 
       
 39041 
       
 39042     function isTabbableEdge(target, isReverse) {
       
 39043       const closestTabbable = getClosestTabbable(target, isReverse, node);
       
 39044       return !closestTabbable || !isInSameBlock(target, closestTabbable);
       
 39045     }
       
 39046 
       
 39047     function onKeyDown(event) {
       
 39048       const {
       
 39049         keyCode,
       
 39050         target
       
 39051       } = event;
       
 39052       const isUp = keyCode === external_wp_keycodes_["UP"];
       
 39053       const isDown = keyCode === external_wp_keycodes_["DOWN"];
       
 39054       const isLeft = keyCode === external_wp_keycodes_["LEFT"];
       
 39055       const isRight = keyCode === external_wp_keycodes_["RIGHT"];
       
 39056       const isReverse = isUp || isLeft;
       
 39057       const isHorizontal = isLeft || isRight;
       
 39058       const isVertical = isUp || isDown;
       
 39059       const isNav = isHorizontal || isVertical;
       
 39060       const isShift = event.shiftKey;
       
 39061       const hasModifier = isShift || event.ctrlKey || event.altKey || event.metaKey;
       
 39062       const isNavEdge = isVertical ? external_wp_dom_["isVerticalEdge"] : external_wp_dom_["isHorizontalEdge"];
       
 39063       const {
       
 39064         ownerDocument
       
 39065       } = node;
       
 39066       const {
       
 39067         defaultView
       
 39068       } = ownerDocument;
       
 39069 
       
 39070       if (hasMultiSelection()) {
       
 39071         if (isNav) {
       
 39072           const action = isShift ? expandSelection : moveSelection;
       
 39073           action(isReverse);
       
 39074           event.preventDefault();
       
 39075         }
       
 39076 
       
 39077         return;
       
 39078       } // When presing any key other than up or down, the initial vertical
       
 39079       // position must ALWAYS be reset. The vertical position is saved so
       
 39080       // it can be restored as well as possible on sebsequent vertical
       
 39081       // arrow key presses. It may not always be possible to restore the
       
 39082       // exact same position (such as at an empty line), so it wouldn't be
       
 39083       // good to compute the position right before any vertical arrow key
       
 39084       // press.
       
 39085 
       
 39086 
       
 39087       if (!isVertical) {
       
 39088         verticalRect = null;
       
 39089       } else if (!verticalRect) {
       
 39090         verticalRect = Object(external_wp_dom_["computeCaretRect"])(defaultView);
       
 39091       } // Abort if navigation has already been handled (e.g. RichText
       
 39092       // inline boundaries).
       
 39093 
       
 39094 
       
 39095       if (event.defaultPrevented) {
       
 39096         return;
       
 39097       }
       
 39098 
       
 39099       if (!isNav) {
       
 39100         return;
       
 39101       } // Abort if our current target is not a candidate for navigation
       
 39102       // (e.g. preserve native input behaviors).
       
 39103 
       
 39104 
       
 39105       if (!isNavigationCandidate(target, keyCode, hasModifier)) {
       
 39106         return;
       
 39107       } // In the case of RTL scripts, right means previous and left means
       
 39108       // next, which is the exact reverse of LTR.
       
 39109 
       
 39110 
       
 39111       const isReverseDir = Object(external_wp_dom_["isRTL"])(target) ? !isReverse : isReverse;
       
 39112       const {
       
 39113         keepCaretInsideBlock
       
 39114       } = getSettings();
       
 39115       const selectedBlockClientId = getSelectedBlockClientId();
       
 39116 
       
 39117       if (isShift) {
       
 39118         const selectionEndClientId = getMultiSelectedBlocksEndClientId();
       
 39119         const selectionBeforeEndClientId = getPreviousBlockClientId(selectionEndClientId || selectedBlockClientId);
       
 39120         const selectionAfterEndClientId = getNextBlockClientId(selectionEndClientId || selectedBlockClientId);
       
 39121 
       
 39122         if ( // Ensure that there is a target block.
       
 39123         (isReverse && selectionBeforeEndClientId || !isReverse && selectionAfterEndClientId) && isTabbableEdge(target, isReverse) && isNavEdge(target, isReverse)) {
       
 39124           // Shift key is down, and there is multi selection or we're
       
 39125           // at the end of the current block.
       
 39126           expandSelection(isReverse);
       
 39127           event.preventDefault();
       
 39128         }
       
 39129       } else if (isVertical && Object(external_wp_dom_["isVerticalEdge"])(target, isReverse) && !keepCaretInsideBlock) {
       
 39130         const closestTabbable = getClosestTabbable(target, isReverse, node, true);
       
 39131 
       
 39132         if (closestTabbable) {
       
 39133           Object(external_wp_dom_["placeCaretAtVerticalEdge"])(closestTabbable, isReverse, verticalRect);
       
 39134           event.preventDefault();
       
 39135         }
       
 39136       } else if (isHorizontal && defaultView.getSelection().isCollapsed && Object(external_wp_dom_["isHorizontalEdge"])(target, isReverseDir) && !keepCaretInsideBlock) {
       
 39137         const closestTabbable = getClosestTabbable(target, isReverseDir, node);
       
 39138         Object(external_wp_dom_["placeCaretAtHorizontalEdge"])(closestTabbable, isReverse);
       
 39139         event.preventDefault();
       
 39140       }
       
 39141     }
       
 39142 
       
 39143     node.addEventListener('mousedown', onMouseDown);
       
 39144     node.addEventListener('keydown', onKeyDown);
       
 39145     return () => {
       
 39146       node.removeEventListener('mousedown', onMouseDown);
       
 39147       node.removeEventListener('keydown', onKeyDown);
       
 39148     };
       
 39149   }, []);
       
 39150 }
       
 39151 
       
 39152 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/writing-flow/use-select-all.js
       
 39153 /**
       
 39154  * External dependencies
       
 39155  */
       
 39156 
       
 39157 /**
       
 39158  * WordPress dependencies
       
 39159  */
       
 39160 
       
 39161 
       
 39162 
       
 39163 
       
 39164 
       
 39165 /**
       
 39166  * Internal dependencies
       
 39167  */
       
 39168 
       
 39169 
       
 39170 function useSelectAll() {
       
 39171   const {
       
 39172     getBlockOrder,
       
 39173     getSelectedBlockClientIds,
       
 39174     getBlockRootClientId
       
 39175   } = Object(external_wp_data_["useSelect"])(store);
       
 39176   const {
       
 39177     multiSelect
       
 39178   } = Object(external_wp_data_["useDispatch"])(store);
       
 39179   const isMatch = Object(external_wp_keyboardShortcuts_["__unstableUseShortcutEventMatch"])();
       
 39180   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 39181     function onKeyDown(event) {
       
 39182       if (!isMatch('core/block-editor/select-all', event)) {
       
 39183         return;
       
 39184       }
       
 39185 
       
 39186       if (!Object(external_wp_dom_["isEntirelySelected"])(event.target)) {
       
 39187         return;
       
 39188       }
       
 39189 
       
 39190       const selectedClientIds = getSelectedBlockClientIds();
       
 39191       const [firstSelectedClientId] = selectedClientIds;
       
 39192       const rootClientId = getBlockRootClientId(firstSelectedClientId);
       
 39193       let blockClientIds = getBlockOrder(rootClientId); // If we have selected all sibling nested blocks, try selecting up a
       
 39194       // level. See: https://github.com/WordPress/gutenberg/pull/31859/
       
 39195 
       
 39196       if (selectedClientIds.length === blockClientIds.length) {
       
 39197         blockClientIds = getBlockOrder(getBlockRootClientId(rootClientId));
       
 39198       }
       
 39199 
       
 39200       const firstClientId = Object(external_lodash_["first"])(blockClientIds);
       
 39201       const lastClientId = Object(external_lodash_["last"])(blockClientIds);
       
 39202 
       
 39203       if (firstClientId === lastClientId) {
       
 39204         return;
       
 39205       }
       
 39206 
       
 39207       multiSelect(firstClientId, lastClientId);
       
 39208       event.preventDefault();
       
 39209     }
       
 39210 
       
 39211     node.addEventListener('keydown', onKeyDown);
       
 39212     return () => {
       
 39213       node.removeEventListener('keydown', onKeyDown);
       
 39214     };
       
 39215   });
       
 39216 }
       
 39217 
       
 39218 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/writing-flow/index.js
       
 39219 
       
 39220 
       
 39221 
       
 39222 /**
       
 39223  * External dependencies
       
 39224  */
       
 39225 
       
 39226 /**
       
 39227  * WordPress dependencies
       
 39228  */
       
 39229 
       
 39230 
       
 39231 
       
 39232 
       
 39233 
       
 39234 /**
       
 39235  * Internal dependencies
       
 39236  */
       
 39237 
       
 39238 
       
 39239 
       
 39240 
       
 39241 
       
 39242 
       
 39243 
       
 39244 function WritingFlow({
       
 39245   children,
       
 39246   ...props
       
 39247 }, forwardedRef) {
       
 39248   const [before, ref, after] = useTabNav();
       
 39249   const hasMultiSelection = Object(external_wp_data_["useSelect"])(select => select(store).hasMultiSelection(), []);
       
 39250   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, before, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, props, {
       
 39251     ref: Object(external_wp_compose_["useMergeRefs"])([forwardedRef, ref, use_multi_selection_useMultiSelection(), useSelectAll(), useArrowNav()]),
       
 39252     className: classnames_default()(props.className, 'block-editor-writing-flow'),
       
 39253     tabIndex: -1,
       
 39254     "aria-label": hasMultiSelection ? Object(external_wp_i18n_["__"])('Multiple selected blocks') : undefined
       
 39255   }), children), after);
       
 39256 }
       
 39257 /**
       
 39258  * Handles selection and navigation across blocks. This component should be
       
 39259  * wrapped around BlockList.
       
 39260  *
       
 39261  * @param {Object}    props          Component properties.
       
 39262  * @param {WPElement} props.children Children to be rendered.
       
 39263  */
       
 39264 
       
 39265 
       
 39266 /* harmony default export */ var writing_flow = (Object(external_wp_element_["forwardRef"])(WritingFlow));
       
 39267 
       
 39268 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-canvas-click-redirect/index.js
       
 39269 /**
       
 39270  * External dependencies
       
 39271  */
       
 39272 
       
 39273 /**
       
 39274  * WordPress dependencies
       
 39275  */
       
 39276 
       
 39277 
       
 39278 
       
 39279 /**
       
 39280  * Given an element, returns true if the element is a tabbable text field, or
       
 39281  * false otherwise.
       
 39282  *
       
 39283  * @param {Element} element Element to test.
       
 39284  *
       
 39285  * @return {boolean} Whether element is a tabbable text field.
       
 39286  */
       
 39287 
       
 39288 const isTabbableTextField = Object(external_lodash_["overEvery"])([external_wp_dom_["isTextField"], external_wp_dom_["focus"].tabbable.isTabbableIndex]);
       
 39289 function useCanvasClickRedirect() {
       
 39290   return Object(external_wp_compose_["useRefEffect"])(node => {
       
 39291     function onMouseDown(event) {
       
 39292       // Only handle clicks on the canvas, not the content.
       
 39293       if (event.target !== node) {
       
 39294         return;
       
 39295       }
       
 39296 
       
 39297       const focusableNodes = external_wp_dom_["focus"].focusable.find(node);
       
 39298       const target = Object(external_lodash_["findLast"])(focusableNodes, isTabbableTextField);
       
 39299 
       
 39300       if (!target) {
       
 39301         return;
       
 39302       }
       
 39303 
       
 39304       const {
       
 39305         bottom
       
 39306       } = target.getBoundingClientRect(); // Ensure the click is below the last block.
       
 39307 
       
 39308       if (event.clientY < bottom) {
       
 39309         return;
       
 39310       }
       
 39311 
       
 39312       Object(external_wp_dom_["placeCaretAtHorizontalEdge"])(target, true);
       
 39313       event.preventDefault();
       
 39314     }
       
 39315 
       
 39316     node.addEventListener('mousedown', onMouseDown);
       
 39317     return () => {
       
 39318       node.addEventListener('mousedown', onMouseDown);
       
 39319     };
       
 39320   }, []);
       
 39321 }
       
 39322 
       
 39323 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/iframe/index.js
       
 39324 
       
 39325 
       
 39326 
       
 39327 /**
       
 39328  * WordPress dependencies
       
 39329  */
       
 39330 
       
 39331 
       
 39332 
       
 39333 
       
 39334 /**
       
 39335  * Internal dependencies
       
 39336  */
       
 39337 
       
 39338 
       
 39339 const BODY_CLASS_NAME = 'editor-styles-wrapper';
       
 39340 const BLOCK_PREFIX = 'wp-block';
       
 39341 /**
       
 39342  * Clones stylesheets targetting the editor canvas to the given document. A
       
 39343  * stylesheet is considered targetting the editor a canvas if it contains the
       
 39344  * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors.
       
 39345  *
       
 39346  * Ideally, this hook should be removed in the future and styles should be added
       
 39347  * explicitly as editor styles.
       
 39348  *
       
 39349  * @param {Document} doc The document to append cloned stylesheets to.
       
 39350  */
       
 39351 
       
 39352 function styleSheetsCompat(doc) {
       
 39353   // Search the document for stylesheets targetting the editor canvas.
       
 39354   Array.from(document.styleSheets).forEach(styleSheet => {
       
 39355     try {
       
 39356       // May fail for external styles.
       
 39357       // eslint-disable-next-line no-unused-expressions
       
 39358       styleSheet.cssRules;
       
 39359     } catch (e) {
       
 39360       return;
       
 39361     }
       
 39362 
       
 39363     const {
       
 39364       ownerNode,
       
 39365       cssRules
       
 39366     } = styleSheet;
       
 39367 
       
 39368     if (!cssRules) {
       
 39369       return;
       
 39370     } // Generally, ignore inline styles. We add inline styles belonging to a
       
 39371     // stylesheet later, which may or may not match the selectors.
       
 39372 
       
 39373 
       
 39374     if (ownerNode.tagName !== 'LINK') {
       
 39375       return;
       
 39376     } // Don't try to add the reset styles, which were removed as a dependency
       
 39377     // from `edit-blocks` for the iframe since we don't need to reset admin
       
 39378     // styles.
       
 39379 
       
 39380 
       
 39381     if (ownerNode.id === 'wp-reset-editor-styles-css') {
       
 39382       return;
       
 39383     }
       
 39384 
       
 39385     const isMatch = Array.from(cssRules).find(({
       
 39386       selectorText
       
 39387     }) => selectorText && (selectorText.includes(`.${BODY_CLASS_NAME}`) || selectorText.includes(`.${BLOCK_PREFIX}`)));
       
 39388 
       
 39389     if (isMatch && !doc.getElementById(ownerNode.id)) {
       
 39390       // eslint-disable-next-line no-console
       
 39391       console.error(`Stylesheet ${ownerNode.id} was not properly added.
       
 39392 For blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).
       
 39393 For themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`, ownerNode.outerHTML);
       
 39394       doc.head.appendChild(ownerNode.cloneNode(true)); // Add inline styles belonging to the stylesheet.
       
 39395 
       
 39396       const inlineCssId = ownerNode.id.replace('-css', '-inline-css');
       
 39397       const inlineCssElement = document.getElementById(inlineCssId);
       
 39398 
       
 39399       if (inlineCssElement) {
       
 39400         doc.head.appendChild(inlineCssElement.cloneNode(true));
       
 39401       }
       
 39402     }
       
 39403   });
       
 39404 }
       
 39405 /**
       
 39406  * Bubbles some event types (keydown, keypress, and dragover) to parent document
       
 39407  * document to ensure that the keyboard shortcuts and drag and drop work.
       
 39408  *
       
 39409  * Ideally, we should remove event bubbling in the future. Keyboard shortcuts
       
 39410  * should be context dependent, e.g. actions on blocks like Cmd+A should not
       
 39411  * work globally outside the block editor.
       
 39412  *
       
 39413  * @param {Document} doc Document to attach listeners to.
       
 39414  */
       
 39415 
       
 39416 
       
 39417 function bubbleEvents(doc) {
       
 39418   const {
       
 39419     defaultView
       
 39420   } = doc;
       
 39421   const {
       
 39422     frameElement
       
 39423   } = defaultView;
       
 39424 
       
 39425   function bubbleEvent(event) {
       
 39426     const prototype = Object.getPrototypeOf(event);
       
 39427     const constructorName = prototype.constructor.name;
       
 39428     const Constructor = window[constructorName];
       
 39429     const init = {};
       
 39430 
       
 39431     for (const key in event) {
       
 39432       init[key] = event[key];
       
 39433     }
       
 39434 
       
 39435     if (event instanceof defaultView.MouseEvent) {
       
 39436       const rect = frameElement.getBoundingClientRect();
       
 39437       init.clientX += rect.left;
       
 39438       init.clientY += rect.top;
       
 39439     }
       
 39440 
       
 39441     const newEvent = new Constructor(event.type, init);
       
 39442     const cancelled = !frameElement.dispatchEvent(newEvent);
       
 39443 
       
 39444     if (cancelled) {
       
 39445       event.preventDefault();
       
 39446     }
       
 39447   }
       
 39448 
       
 39449   const eventTypes = ['keydown', 'keypress', 'dragover'];
       
 39450 
       
 39451   for (const name of eventTypes) {
       
 39452     doc.addEventListener(name, bubbleEvent);
       
 39453   }
       
 39454 }
       
 39455 /**
       
 39456  * Sets the document direction.
       
 39457  *
       
 39458  * Sets the `editor-styles-wrapper` class name on the body.
       
 39459  *
       
 39460  * Copies the `admin-color-*` class name to the body so that the admin color
       
 39461  * scheme applies to components in the iframe.
       
 39462  *
       
 39463  * @param {Document} doc Document to add class name to.
       
 39464  */
       
 39465 
       
 39466 
       
 39467 function setBodyClassName(doc) {
       
 39468   doc.dir = document.dir;
       
 39469   doc.body.className = BODY_CLASS_NAME;
       
 39470 
       
 39471   for (const name of document.body.classList) {
       
 39472     if (name.startsWith('admin-color-')) {
       
 39473       doc.body.classList.add(name);
       
 39474     } else if (name === 'wp-embed-responsive') {
       
 39475       // Ideally ALL classes that are added through get_body_class should
       
 39476       // be added in the editor too, which we'll somehow have to get from
       
 39477       // the server in the future (which will run the PHP filters).
       
 39478       doc.body.classList.add('wp-embed-responsive');
       
 39479     }
       
 39480   }
       
 39481 }
       
 39482 
       
 39483 function useParsedAssets(html) {
       
 39484   return Object(external_wp_element_["useMemo"])(() => {
       
 39485     const doc = document.implementation.createHTMLDocument('');
       
 39486     doc.body.innerHTML = html;
       
 39487     return Array.from(doc.body.children);
       
 39488   }, [html]);
       
 39489 }
       
 39490 
       
 39491 async function loadScript(doc, {
       
 39492   id,
       
 39493   src
       
 39494 }) {
       
 39495   return new Promise((resolve, reject) => {
       
 39496     const script = doc.createElement('script');
       
 39497     script.id = id;
       
 39498 
       
 39499     if (src) {
       
 39500       script.src = src;
       
 39501 
       
 39502       script.onload = () => resolve();
       
 39503 
       
 39504       script.onerror = () => reject();
       
 39505     } else {
       
 39506       resolve();
       
 39507     }
       
 39508 
       
 39509     doc.head.appendChild(script);
       
 39510   });
       
 39511 }
       
 39512 
       
 39513 function Iframe({
       
 39514   contentRef,
       
 39515   children,
       
 39516   head,
       
 39517   ...props
       
 39518 }, ref) {
       
 39519   const [, forceRender] = Object(external_wp_element_["useReducer"])(() => ({}));
       
 39520   const [iframeDocument, setIframeDocument] = Object(external_wp_element_["useState"])();
       
 39521   const styles = useParsedAssets(window.__editorAssets.styles);
       
 39522   const scripts = useParsedAssets(window.__editorAssets.scripts);
       
 39523   const clearerRef = useBlockSelectionClearer();
       
 39524   const setRef = Object(external_wp_element_["useCallback"])(node => {
       
 39525     if (!node) {
       
 39526       return;
       
 39527     }
       
 39528 
       
 39529     function setDocumentIfReady() {
       
 39530       const {
       
 39531         contentDocument
       
 39532       } = node;
       
 39533       const {
       
 39534         readyState,
       
 39535         body,
       
 39536         documentElement
       
 39537       } = contentDocument;
       
 39538 
       
 39539       if (readyState !== 'interactive' && readyState !== 'complete') {
       
 39540         return false;
       
 39541       }
       
 39542 
       
 39543       if (typeof contentRef === 'function') {
       
 39544         contentRef(body);
       
 39545       } else if (contentRef) {
       
 39546         contentRef.current = body;
       
 39547       }
       
 39548 
       
 39549       setBodyClassName(contentDocument);
       
 39550       bubbleEvents(contentDocument);
       
 39551       setBodyClassName(contentDocument);
       
 39552       setIframeDocument(contentDocument);
       
 39553       clearerRef(documentElement);
       
 39554       clearerRef(body);
       
 39555       scripts.reduce((promise, script) => promise.then(() => loadScript(contentDocument, script)), Promise.resolve()).finally(() => {
       
 39556         // When script are loaded, re-render blocks to allow them
       
 39557         // to initialise.
       
 39558         forceRender();
       
 39559       });
       
 39560       return true;
       
 39561     }
       
 39562 
       
 39563     if (setDocumentIfReady()) {
       
 39564       return;
       
 39565     } // Document is not immediately loaded in Firefox.
       
 39566 
       
 39567 
       
 39568     node.addEventListener('load', () => {
       
 39569       setDocumentIfReady();
       
 39570     });
       
 39571   }, []);
       
 39572   Object(external_wp_element_["useEffect"])(() => {
       
 39573     if (iframeDocument) {
       
 39574       styleSheetsCompat(iframeDocument);
       
 39575     }
       
 39576   }, [iframeDocument]);
       
 39577   head = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("style", null, 'body{margin:0}'), styles.map(({
       
 39578     tagName,
       
 39579     href,
       
 39580     id,
       
 39581     rel,
       
 39582     media,
       
 39583     textContent
       
 39584   }) => {
       
 39585     const TagName = tagName.toLowerCase();
       
 39586 
       
 39587     if (TagName === 'style') {
       
 39588       return Object(external_wp_element_["createElement"])(TagName, {
       
 39589         id,
       
 39590         key: id
       
 39591       }, textContent);
       
 39592     }
       
 39593 
       
 39594     return Object(external_wp_element_["createElement"])(TagName, {
       
 39595       href,
       
 39596       id,
       
 39597       rel,
       
 39598       media,
       
 39599       key: id
       
 39600     });
       
 39601   }), head);
       
 39602   return Object(external_wp_element_["createElement"])("iframe", Object(esm_extends["a" /* default */])({}, props, {
       
 39603     ref: Object(external_wp_compose_["useMergeRefs"])([ref, setRef]),
       
 39604     tabIndex: "0",
       
 39605     title: Object(external_wp_i18n_["__"])('Editor canvas'),
       
 39606     name: "editor-canvas"
       
 39607   }), iframeDocument && Object(external_wp_element_["createPortal"])(Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalStyleProvider"], {
       
 39608     document: iframeDocument
       
 39609   }, children), iframeDocument.body), iframeDocument && Object(external_wp_element_["createPortal"])(head, iframeDocument.head));
       
 39610 }
       
 39611 
       
 39612 /* harmony default export */ var iframe = (Object(external_wp_element_["forwardRef"])(Iframe));
       
 39613 
       
 39614 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-no-recursive-renders/index.js
       
 39615 
       
 39616 
       
 39617 /**
       
 39618  * WordPress dependencies
       
 39619  */
       
 39620 
       
 39621 /**
       
 39622  * Internal dependencies
       
 39623  */
       
 39624 
       
 39625 
       
 39626 const RenderedRefsContext = Object(external_wp_element_["createContext"])({});
       
 39627 /**
       
 39628  * Immutably adds an unique identifier to a set scoped for a given block type.
       
 39629  *
       
 39630  * @param {Object} renderedBlocks Rendered blocks grouped by block name
       
 39631  * @param {string} blockName      Name of the block.
       
 39632  * @param {*} uniqueId            Any value that acts as a unique identifier for a block instance.
       
 39633  *
       
 39634  * @return {Object} The list of rendered blocks grouped by block name.
       
 39635  */
       
 39636 
       
 39637 function addToBlockType(renderedBlocks, blockName, uniqueId) {
       
 39638   const result = { ...renderedBlocks,
       
 39639     [blockName]: renderedBlocks[blockName] ? new Set(renderedBlocks[blockName]) : new Set()
       
 39640   };
       
 39641   result[blockName].add(uniqueId);
       
 39642   return result;
       
 39643 }
       
 39644 /**
       
 39645  * A React hook for keeping track of blocks previously rendered up in the block
       
 39646  * tree. Blocks susceptible to recursion can use this hook in their `Edit`
       
 39647  * function to prevent said recursion.
       
 39648  *
       
 39649  * @param {*}      uniqueId  Any value that acts as a unique identifier for a block instance.
       
 39650  * @param {string} blockName Optional block name.
       
 39651  *
       
 39652  * @return {[boolean, Function]} A tuple of:
       
 39653  *                               - a boolean describing whether the provided id
       
 39654  *                                 has already been rendered;
       
 39655  *                               - a React context provider to be used to wrap
       
 39656  *                                 other elements.
       
 39657  */
       
 39658 
       
 39659 
       
 39660 function useNoRecursiveRenders(uniqueId, blockName = '') {
       
 39661   var _previouslyRenderedBl;
       
 39662 
       
 39663   const previouslyRenderedBlocks = Object(external_wp_element_["useContext"])(RenderedRefsContext);
       
 39664   const {
       
 39665     name
       
 39666   } = useBlockEditContext();
       
 39667   blockName = blockName || name;
       
 39668   const hasAlreadyRendered = Boolean((_previouslyRenderedBl = previouslyRenderedBlocks[blockName]) === null || _previouslyRenderedBl === void 0 ? void 0 : _previouslyRenderedBl.has(uniqueId));
       
 39669   const newRenderedBlocks = Object(external_wp_element_["useMemo"])(() => addToBlockType(previouslyRenderedBlocks, blockName, uniqueId), [previouslyRenderedBlocks, blockName, uniqueId]);
       
 39670   const Provider = Object(external_wp_element_["useCallback"])(({
       
 39671     children
       
 39672   }) => Object(external_wp_element_["createElement"])(RenderedRefsContext.Provider, {
       
 39673     value: newRenderedBlocks
       
 39674   }, children), [newRenderedBlocks]);
       
 39675   return [hasAlreadyRendered, Provider];
 39027 }
 39676 }
 39028 
 39677 
 39029 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/index.js
 39678 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/index.js
 39030 /*
 39679 /*
 39031  * Block Creation Components
 39680  * Block Creation Components
 39078 
 39727 
 39079 
 39728 
 39080 
 39729 
 39081 
 39730 
 39082 
 39731 
       
 39732 
       
 39733 
       
 39734 
       
 39735 
       
 39736 
       
 39737 
       
 39738 
       
 39739 
       
 39740 
       
 39741 
 39083 /*
 39742 /*
 39084  * Content Related Components
 39743  * Content Related Components
 39085  */
 39744  */
 39086 
 39745 
 39087 
 39746 
 39111 
 39770 
 39112 
 39771 
 39113 
 39772 
 39114 
 39773 
 39115 
 39774 
       
 39775 
       
 39776 
       
 39777 
       
 39778 
       
 39779 
       
 39780 
 39116 /*
 39781 /*
 39117  * State Related Components
 39782  * State Related Components
 39118  */
 39783  */
 39119 
 39784 
 39120 
 39785 
 39121 
 39786 
 39122 
 39787 
 39123 
 39788 
       
 39789 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/theme.js
       
 39790 /**
       
 39791  * Internal dependencies
       
 39792  */
       
 39793 
       
 39794 /**
       
 39795  * Given an array of theme colors checks colors for validity
       
 39796  *
       
 39797  * @param {Array}   colors  The array of theme colors
       
 39798  *
       
 39799  * @return {Array} The array of valid theme colors or the default colors
       
 39800  */
       
 39801 
       
 39802 function validateThemeColors(colors) {
       
 39803   if (colors === undefined) {
       
 39804     colors = SETTINGS_DEFAULTS.colors;
       
 39805   } else {
       
 39806     const validColors = colors.filter(c => c.color);
       
 39807 
       
 39808     if (validColors.length === 0) {
       
 39809       colors = SETTINGS_DEFAULTS.colors;
       
 39810     } else if (validColors.length < colors.length) {
       
 39811       // Filter out invalid colors
       
 39812       colors = validColors;
       
 39813     }
       
 39814   }
       
 39815 
       
 39816   return colors;
       
 39817 }
       
 39818 /**
       
 39819  * Given an array of theme gradients checks gradients for validity
       
 39820  *
       
 39821  * @param {Array}   gradients  The array of theme gradients
       
 39822  *
       
 39823  * @return {Array} The array of valid theme gradients or the default gradients
       
 39824  */
       
 39825 
       
 39826 function validateThemeGradients(gradients) {
       
 39827   if (gradients === undefined) {
       
 39828     gradients = SETTINGS_DEFAULTS.gradients;
       
 39829   } else {
       
 39830     const validGradients = gradients.filter(c => c.gradient);
       
 39831 
       
 39832     if (validGradients.length === 0) {
       
 39833       gradients = SETTINGS_DEFAULTS.gradients;
       
 39834     } else if (validGradients.length < gradients.length) {
       
 39835       // Filter out invalid gradients
       
 39836       gradients = validGradients;
       
 39837     }
       
 39838   }
       
 39839 
       
 39840   return gradients;
       
 39841 }
       
 39842 
 39124 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/index.js
 39843 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/index.js
 39125 
 39844 
 39126 
 39845 
       
 39846 
       
 39847 
 39127 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/index.js
 39848 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/index.js
 39128 /**
 39849 /**
 39129  * WordPress dependencies
 39850  * WordPress dependencies
 39130  */
 39851  */
 39131 
 39852 
 39132 
       
 39133 
       
 39134 
       
 39135 
       
 39136 /**
 39853 /**
 39137  * Internal dependencies
 39854  * Internal dependencies
 39138  */
 39855  */
 39139 
 39856 
 39140 
 39857 
 39143 
 39860 
 39144 
 39861 
 39145 
 39862 
 39146 
 39863 
 39147 
 39864 
       
 39865 /***/ }),
       
 39866 
       
 39867 /***/ "w95h":
       
 39868 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 39869 
       
 39870 "use strict";
       
 39871 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
 39872 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 39873 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
 39874 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 39875 
       
 39876 
       
 39877 /**
       
 39878  * WordPress dependencies
       
 39879  */
       
 39880 
       
 39881 const close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 39882   xmlns: "http://www.w3.org/2000/svg",
       
 39883   viewBox: "0 0 24 24"
       
 39884 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 39885   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"
       
 39886 }));
       
 39887 /* harmony default export */ __webpack_exports__["a"] = (close);
       
 39888 
       
 39889 
       
 39890 /***/ }),
       
 39891 
       
 39892 /***/ "wx14":
       
 39893 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 39894 
       
 39895 "use strict";
       
 39896 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
       
 39897 function _extends() {
       
 39898   _extends = Object.assign || function (target) {
       
 39899     for (var i = 1; i < arguments.length; i++) {
       
 39900       var source = arguments[i];
       
 39901 
       
 39902       for (var key in source) {
       
 39903         if (Object.prototype.hasOwnProperty.call(source, key)) {
       
 39904           target[key] = source[key];
       
 39905         }
       
 39906       }
       
 39907     }
       
 39908 
       
 39909     return target;
       
 39910   };
       
 39911 
       
 39912   return _extends.apply(this, arguments);
       
 39913 }
       
 39914 
       
 39915 /***/ }),
       
 39916 
       
 39917 /***/ "xTGt":
       
 39918 /***/ (function(module, exports) {
       
 39919 
       
 39920 (function() { module.exports = window["wp"]["blob"]; }());
       
 39921 
       
 39922 /***/ }),
       
 39923 
       
 39924 /***/ "ziDm":
       
 39925 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 39926 
       
 39927 "use strict";
       
 39928 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
 39929 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 39930 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
 39931 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 39932 
       
 39933 
       
 39934 /**
       
 39935  * WordPress dependencies
       
 39936  */
       
 39937 
       
 39938 const alignRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 39939   xmlns: "http://www.w3.org/2000/svg",
       
 39940   viewBox: "0 0 24 24"
       
 39941 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 39942   d: "M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"
       
 39943 }));
       
 39944 /* harmony default export */ __webpack_exports__["a"] = (alignRight);
       
 39945 
       
 39946 
       
 39947 /***/ }),
       
 39948 
       
 39949 /***/ "zt9T":
       
 39950 /***/ (function(module, exports, __webpack_require__) {
       
 39951 
       
 39952 "use strict";
       
 39953 
       
 39954 
       
 39955 var util = __webpack_require__("jB5C");
       
 39956 
       
 39957 function scrollIntoView(elem, container, config) {
       
 39958   config = config || {};
       
 39959   // document 归一化到 window
       
 39960   if (container.nodeType === 9) {
       
 39961     container = util.getWindow(container);
       
 39962   }
       
 39963 
       
 39964   var allowHorizontalScroll = config.allowHorizontalScroll;
       
 39965   var onlyScrollIfNeeded = config.onlyScrollIfNeeded;
       
 39966   var alignWithTop = config.alignWithTop;
       
 39967   var alignWithLeft = config.alignWithLeft;
       
 39968   var offsetTop = config.offsetTop || 0;
       
 39969   var offsetLeft = config.offsetLeft || 0;
       
 39970   var offsetBottom = config.offsetBottom || 0;
       
 39971   var offsetRight = config.offsetRight || 0;
       
 39972 
       
 39973   allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll;
       
 39974 
       
 39975   var isWin = util.isWindow(container);
       
 39976   var elemOffset = util.offset(elem);
       
 39977   var eh = util.outerHeight(elem);
       
 39978   var ew = util.outerWidth(elem);
       
 39979   var containerOffset = undefined;
       
 39980   var ch = undefined;
       
 39981   var cw = undefined;
       
 39982   var containerScroll = undefined;
       
 39983   var diffTop = undefined;
       
 39984   var diffBottom = undefined;
       
 39985   var win = undefined;
       
 39986   var winScroll = undefined;
       
 39987   var ww = undefined;
       
 39988   var wh = undefined;
       
 39989 
       
 39990   if (isWin) {
       
 39991     win = container;
       
 39992     wh = util.height(win);
       
 39993     ww = util.width(win);
       
 39994     winScroll = {
       
 39995       left: util.scrollLeft(win),
       
 39996       top: util.scrollTop(win)
       
 39997     };
       
 39998     // elem 相对 container 可视视窗的距离
       
 39999     diffTop = {
       
 40000       left: elemOffset.left - winScroll.left - offsetLeft,
       
 40001       top: elemOffset.top - winScroll.top - offsetTop
       
 40002     };
       
 40003     diffBottom = {
       
 40004       left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight,
       
 40005       top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom
       
 40006     };
       
 40007     containerScroll = winScroll;
       
 40008   } else {
       
 40009     containerOffset = util.offset(container);
       
 40010     ch = container.clientHeight;
       
 40011     cw = container.clientWidth;
       
 40012     containerScroll = {
       
 40013       left: container.scrollLeft,
       
 40014       top: container.scrollTop
       
 40015     };
       
 40016     // elem 相对 container 可视视窗的距离
       
 40017     // 注意边框, offset 是边框到根节点
       
 40018     diffTop = {
       
 40019       left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft,
       
 40020       top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop
       
 40021     };
       
 40022     diffBottom = {
       
 40023       left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight,
       
 40024       top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom
       
 40025     };
       
 40026   }
       
 40027 
       
 40028   if (diffTop.top < 0 || diffBottom.top > 0) {
       
 40029     // 强制向上
       
 40030     if (alignWithTop === true) {
       
 40031       util.scrollTop(container, containerScroll.top + diffTop.top);
       
 40032     } else if (alignWithTop === false) {
       
 40033       util.scrollTop(container, containerScroll.top + diffBottom.top);
       
 40034     } else {
       
 40035       // 自动调整
       
 40036       if (diffTop.top < 0) {
       
 40037         util.scrollTop(container, containerScroll.top + diffTop.top);
       
 40038       } else {
       
 40039         util.scrollTop(container, containerScroll.top + diffBottom.top);
       
 40040       }
       
 40041     }
       
 40042   } else {
       
 40043     if (!onlyScrollIfNeeded) {
       
 40044       alignWithTop = alignWithTop === undefined ? true : !!alignWithTop;
       
 40045       if (alignWithTop) {
       
 40046         util.scrollTop(container, containerScroll.top + diffTop.top);
       
 40047       } else {
       
 40048         util.scrollTop(container, containerScroll.top + diffBottom.top);
       
 40049       }
       
 40050     }
       
 40051   }
       
 40052 
       
 40053   if (allowHorizontalScroll) {
       
 40054     if (diffTop.left < 0 || diffBottom.left > 0) {
       
 40055       // 强制向上
       
 40056       if (alignWithLeft === true) {
       
 40057         util.scrollLeft(container, containerScroll.left + diffTop.left);
       
 40058       } else if (alignWithLeft === false) {
       
 40059         util.scrollLeft(container, containerScroll.left + diffBottom.left);
       
 40060       } else {
       
 40061         // 自动调整
       
 40062         if (diffTop.left < 0) {
       
 40063           util.scrollLeft(container, containerScroll.left + diffTop.left);
       
 40064         } else {
       
 40065           util.scrollLeft(container, containerScroll.left + diffBottom.left);
       
 40066         }
       
 40067       }
       
 40068     } else {
       
 40069       if (!onlyScrollIfNeeded) {
       
 40070         alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft;
       
 40071         if (alignWithLeft) {
       
 40072           util.scrollLeft(container, containerScroll.left + diffTop.left);
       
 40073         } else {
       
 40074           util.scrollLeft(container, containerScroll.left + diffBottom.left);
       
 40075         }
       
 40076       }
       
 40077     }
       
 40078   }
       
 40079 }
       
 40080 
       
 40081 module.exports = scrollIntoView;
       
 40082 
 39148 /***/ })
 40083 /***/ })
 39149 /******/ ]);
 40084 
       
 40085 /******/ });