wp/wp-includes/js/dist/url.js
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    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 = 354);
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 444);
    86 /******/ })
    86 /******/ })
    87 /************************************************************************/
    87 /************************************************************************/
    88 /******/ ({
    88 /******/ ({
    89 
    89 
    90 /***/ 201:
    90 /***/ 115:
    91 /***/ (function(module, exports, __webpack_require__) {
    91 /***/ (function(module, exports, __webpack_require__) {
    92 
    92 
    93 "use strict";
    93 "use strict";
    94 
    94 
    95 
    95 
       
    96 var stringify = __webpack_require__(433);
       
    97 var parse = __webpack_require__(434);
       
    98 var formats = __webpack_require__(259);
       
    99 
       
   100 module.exports = {
       
   101     formats: formats,
       
   102     parse: parse,
       
   103     stringify: stringify
       
   104 };
       
   105 
       
   106 
       
   107 /***/ }),
       
   108 
       
   109 /***/ 2:
       
   110 /***/ (function(module, exports) {
       
   111 
       
   112 (function() { module.exports = this["lodash"]; }());
       
   113 
       
   114 /***/ }),
       
   115 
       
   116 /***/ 258:
       
   117 /***/ (function(module, exports, __webpack_require__) {
       
   118 
       
   119 "use strict";
       
   120 
       
   121 
    96 var has = Object.prototype.hasOwnProperty;
   122 var has = Object.prototype.hasOwnProperty;
       
   123 var isArray = Array.isArray;
    97 
   124 
    98 var hexTable = (function () {
   125 var hexTable = (function () {
    99     var array = [];
   126     var array = [];
   100     for (var i = 0; i < 256; ++i) {
   127     for (var i = 0; i < 256; ++i) {
   101         array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
   128         array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
   107 var compactQueue = function compactQueue(queue) {
   134 var compactQueue = function compactQueue(queue) {
   108     while (queue.length > 1) {
   135     while (queue.length > 1) {
   109         var item = queue.pop();
   136         var item = queue.pop();
   110         var obj = item.obj[item.prop];
   137         var obj = item.obj[item.prop];
   111 
   138 
   112         if (Array.isArray(obj)) {
   139         if (isArray(obj)) {
   113             var compacted = [];
   140             var compacted = [];
   114 
   141 
   115             for (var j = 0; j < obj.length; ++j) {
   142             for (var j = 0; j < obj.length; ++j) {
   116                 if (typeof obj[j] !== 'undefined') {
   143                 if (typeof obj[j] !== 'undefined') {
   117                     compacted.push(obj[j]);
   144                     compacted.push(obj[j]);
   138     if (!source) {
   165     if (!source) {
   139         return target;
   166         return target;
   140     }
   167     }
   141 
   168 
   142     if (typeof source !== 'object') {
   169     if (typeof source !== 'object') {
   143         if (Array.isArray(target)) {
   170         if (isArray(target)) {
   144             target.push(source);
   171             target.push(source);
   145         } else if (typeof target === 'object') {
   172         } else if (target && typeof target === 'object') {
   146             if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
   173             if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
   147                 target[source] = true;
   174                 target[source] = true;
   148             }
   175             }
   149         } else {
   176         } else {
   150             return [target, source];
   177             return [target, source];
   151         }
   178         }
   152 
   179 
   153         return target;
   180         return target;
   154     }
   181     }
   155 
   182 
   156     if (typeof target !== 'object') {
   183     if (!target || typeof target !== 'object') {
   157         return [target].concat(source);
   184         return [target].concat(source);
   158     }
   185     }
   159 
   186 
   160     var mergeTarget = target;
   187     var mergeTarget = target;
   161     if (Array.isArray(target) && !Array.isArray(source)) {
   188     if (isArray(target) && !isArray(source)) {
   162         mergeTarget = arrayToObject(target, options);
   189         mergeTarget = arrayToObject(target, options);
   163     }
   190     }
   164 
   191 
   165     if (Array.isArray(target) && Array.isArray(source)) {
   192     if (isArray(target) && isArray(source)) {
   166         source.forEach(function (item, i) {
   193         source.forEach(function (item, i) {
   167             if (has.call(target, i)) {
   194             if (has.call(target, i)) {
   168                 if (target[i] && typeof target[i] === 'object') {
   195                 var targetItem = target[i];
   169                     target[i] = merge(target[i], item, options);
   196                 if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
       
   197                     target[i] = merge(targetItem, item, options);
   170                 } else {
   198                 } else {
   171                     target.push(item);
   199                     target.push(item);
   172                 }
   200                 }
   173             } else {
   201             } else {
   174                 target[i] = item;
   202                 target[i] = item;
   295 var isRegExp = function isRegExp(obj) {
   323 var isRegExp = function isRegExp(obj) {
   296     return Object.prototype.toString.call(obj) === '[object RegExp]';
   324     return Object.prototype.toString.call(obj) === '[object RegExp]';
   297 };
   325 };
   298 
   326 
   299 var isBuffer = function isBuffer(obj) {
   327 var isBuffer = function isBuffer(obj) {
   300     if (obj === null || typeof obj === 'undefined') {
   328     if (!obj || typeof obj !== 'object') {
   301         return false;
   329         return false;
   302     }
   330     }
   303 
   331 
   304     return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
   332     return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
   305 };
   333 };
   321 };
   349 };
   322 
   350 
   323 
   351 
   324 /***/ }),
   352 /***/ }),
   325 
   353 
   326 /***/ 202:
   354 /***/ 259:
   327 /***/ (function(module, exports, __webpack_require__) {
   355 /***/ (function(module, exports, __webpack_require__) {
   328 
   356 
   329 "use strict";
   357 "use strict";
   330 
   358 
   331 
   359 
   347 };
   375 };
   348 
   376 
   349 
   377 
   350 /***/ }),
   378 /***/ }),
   351 
   379 
   352 /***/ 354:
   380 /***/ 433:
   353 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   381 /***/ (function(module, exports, __webpack_require__) {
   354 
   382 
   355 "use strict";
   383 "use strict";
   356 __webpack_require__.r(__webpack_exports__);
   384 
   357 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isURL", function() { return isURL; });
   385 
   358 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProtocol", function() { return getProtocol; });
   386 var utils = __webpack_require__(258);
   359 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidProtocol", function() { return isValidProtocol; });
   387 var formats = __webpack_require__(259);
   360 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAuthority", function() { return getAuthority; });
   388 var has = Object.prototype.hasOwnProperty;
   361 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidAuthority", function() { return isValidAuthority; });
       
   362 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPath", function() { return getPath; });
       
   363 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidPath", function() { return isValidPath; });
       
   364 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getQueryString", function() { return getQueryString; });
       
   365 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidQueryString", function() { return isValidQueryString; });
       
   366 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFragment", function() { return getFragment; });
       
   367 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidFragment", function() { return isValidFragment; });
       
   368 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addQueryArgs", function() { return addQueryArgs; });
       
   369 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getQueryArg", function() { return getQueryArg; });
       
   370 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasQueryArg", function() { return hasQueryArg; });
       
   371 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeQueryArgs", function() { return removeQueryArgs; });
       
   372 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prependHTTP", function() { return prependHTTP; });
       
   373 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "safeDecodeURI", function() { return safeDecodeURI; });
       
   374 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterURLForDisplay", function() { return filterURLForDisplay; });
       
   375 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "safeDecodeURIComponent", function() { return safeDecodeURIComponent; });
       
   376 /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86);
       
   377 /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_0__);
       
   378 /**
       
   379  * External dependencies
       
   380  */
       
   381 
       
   382 var URL_REGEXP = /^(?:https?:)?\/\/\S+$/i;
       
   383 var EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
       
   384 var USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i;
       
   385 /**
       
   386  * Determines whether the given string looks like a URL.
       
   387  *
       
   388  * @param {string} url The string to scrutinise.
       
   389  *
       
   390  * @example
       
   391  * ```js
       
   392  * const isURL = isURL( 'https://wordpress.org' ); // true
       
   393  * ```
       
   394  *
       
   395  * @return {boolean} Whether or not it looks like a URL.
       
   396  */
       
   397 
       
   398 function isURL(url) {
       
   399   return URL_REGEXP.test(url);
       
   400 }
       
   401 /**
       
   402  * Returns the protocol part of the URL.
       
   403  *
       
   404  * @param {string} url The full URL.
       
   405  *
       
   406  * @example
       
   407  * ```js
       
   408  * const protocol1 = getProtocol( 'tel:012345678' ); // 'tel:'
       
   409  * const protocol2 = getProtocol( 'https://wordpress.org' ); // 'https:'
       
   410  * ```
       
   411  *
       
   412  * @return {?string} The protocol part of the URL.
       
   413  */
       
   414 
       
   415 function getProtocol(url) {
       
   416   var matches = /^([^\s:]+:)/.exec(url);
       
   417 
       
   418   if (matches) {
       
   419     return matches[1];
       
   420   }
       
   421 }
       
   422 /**
       
   423  * Tests if a url protocol is valid.
       
   424  *
       
   425  * @param {string} protocol The url protocol.
       
   426  *
       
   427  * @example
       
   428  * ```js
       
   429  * const isValid = isValidProtocol( 'https:' ); // true
       
   430  * const isNotValid = isValidProtocol( 'https :' ); // false
       
   431  * ```
       
   432  *
       
   433  * @return {boolean} True if the argument is a valid protocol (e.g. http:, tel:).
       
   434  */
       
   435 
       
   436 function isValidProtocol(protocol) {
       
   437   if (!protocol) {
       
   438     return false;
       
   439   }
       
   440 
       
   441   return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol);
       
   442 }
       
   443 /**
       
   444  * Returns the authority part of the URL.
       
   445  *
       
   446  * @param {string} url The full URL.
       
   447  *
       
   448  * @example
       
   449  * ```js
       
   450  * const authority1 = getAuthority( 'https://wordpress.org/help/' ); // 'wordpress.org'
       
   451  * const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080'
       
   452  * ```
       
   453  *
       
   454  * @return {?string} The authority part of the URL.
       
   455  */
       
   456 
       
   457 function getAuthority(url) {
       
   458   var matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(url);
       
   459 
       
   460   if (matches) {
       
   461     return matches[1];
       
   462   }
       
   463 }
       
   464 /**
       
   465  * Checks for invalid characters within the provided authority.
       
   466  *
       
   467  * @param {string} authority A string containing the URL authority.
       
   468  *
       
   469  * @example
       
   470  * ```js
       
   471  * const isValid = isValidAuthority( 'wordpress.org' ); // true
       
   472  * const isNotValid = isValidAuthority( 'wordpress#org' ); // false
       
   473  * ```
       
   474  *
       
   475  * @return {boolean} True if the argument contains a valid authority.
       
   476  */
       
   477 
       
   478 function isValidAuthority(authority) {
       
   479   if (!authority) {
       
   480     return false;
       
   481   }
       
   482 
       
   483   return /^[^\s#?]+$/.test(authority);
       
   484 }
       
   485 /**
       
   486  * Returns the path part of the URL.
       
   487  *
       
   488  * @param {string} url The full URL.
       
   489  *
       
   490  * @example
       
   491  * ```js
       
   492  * const path1 = getPath( 'http://localhost:8080/this/is/a/test?query=true' ); // 'this/is/a/test'
       
   493  * const path2 = getPath( 'https://wordpress.org/help/faq/' ); // 'help/faq'
       
   494  * ```
       
   495  *
       
   496  * @return {?string} The path part of the URL.
       
   497  */
       
   498 
       
   499 function getPath(url) {
       
   500   var matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url);
       
   501 
       
   502   if (matches) {
       
   503     return matches[1];
       
   504   }
       
   505 }
       
   506 /**
       
   507  * Checks for invalid characters within the provided path.
       
   508  *
       
   509  * @param {string} path The URL path.
       
   510  *
       
   511  * @example
       
   512  * ```js
       
   513  * const isValid = isValidPath( 'test/path/' ); // true
       
   514  * const isNotValid = isValidPath( '/invalid?test/path/' ); // false
       
   515  * ```
       
   516  *
       
   517  * @return {boolean} True if the argument contains a valid path
       
   518  */
       
   519 
       
   520 function isValidPath(path) {
       
   521   if (!path) {
       
   522     return false;
       
   523   }
       
   524 
       
   525   return /^[^\s#?]+$/.test(path);
       
   526 }
       
   527 /**
       
   528  * Returns the query string part of the URL.
       
   529  *
       
   530  * @param {string} url The full URL.
       
   531  *
       
   532  * @example
       
   533  * ```js
       
   534  * const queryString1 = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'
       
   535  * const queryString2 = getQueryString( 'https://wordpress.org#fragment?query=false&search=hello' ); // 'query=false&search=hello'
       
   536  * ```
       
   537  *
       
   538  * @return {?string} The query string part of the URL.
       
   539  */
       
   540 
       
   541 function getQueryString(url) {
       
   542   var matches = /^\S+?\?([^\s#]+)/.exec(url);
       
   543 
       
   544   if (matches) {
       
   545     return matches[1];
       
   546   }
       
   547 }
       
   548 /**
       
   549  * Checks for invalid characters within the provided query string.
       
   550  *
       
   551  * @param {string} queryString The query string.
       
   552  *
       
   553  * @example
       
   554  * ```js
       
   555  * const isValid = isValidQueryString( 'query=true&another=false' ); // true
       
   556  * const isNotValid = isValidQueryString( 'query=true?another=false' ); // false
       
   557  * ```
       
   558  *
       
   559  * @return {boolean} True if the argument contains a valid query string.
       
   560  */
       
   561 
       
   562 function isValidQueryString(queryString) {
       
   563   if (!queryString) {
       
   564     return false;
       
   565   }
       
   566 
       
   567   return /^[^\s#?\/]+$/.test(queryString);
       
   568 }
       
   569 /**
       
   570  * Returns the fragment part of the URL.
       
   571  *
       
   572  * @param {string} url The full URL
       
   573  *
       
   574  * @example
       
   575  * ```js
       
   576  * const fragment1 = getFragment( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // '#fragment'
       
   577  * const fragment2 = getFragment( 'https://wordpress.org#another-fragment?query=true' ); // '#another-fragment'
       
   578  * ```
       
   579  *
       
   580  * @return {?string} The fragment part of the URL.
       
   581  */
       
   582 
       
   583 function getFragment(url) {
       
   584   var matches = /^\S+?(#[^\s\?]*)/.exec(url);
       
   585 
       
   586   if (matches) {
       
   587     return matches[1];
       
   588   }
       
   589 }
       
   590 /**
       
   591  * Checks for invalid characters within the provided fragment.
       
   592  *
       
   593  * @param {string} fragment The url fragment.
       
   594  *
       
   595  * @example
       
   596  * ```js
       
   597  * const isValid = isValidFragment( '#valid-fragment' ); // true
       
   598  * const isNotValid = isValidFragment( '#invalid-#fragment' ); // false
       
   599  * ```
       
   600  *
       
   601  * @return {boolean} True if the argument contains a valid fragment.
       
   602  */
       
   603 
       
   604 function isValidFragment(fragment) {
       
   605   if (!fragment) {
       
   606     return false;
       
   607   }
       
   608 
       
   609   return /^#[^\s#?\/]*$/.test(fragment);
       
   610 }
       
   611 /**
       
   612  * Appends arguments as querystring to the provided URL. If the URL already
       
   613  * includes query arguments, the arguments are merged with (and take precedent
       
   614  * over) the existing set.
       
   615  *
       
   616  * @param {?string} url  URL to which arguments should be appended. If omitted,
       
   617  *                       only the resulting querystring is returned.
       
   618  * @param {Object}  args Query arguments to apply to URL.
       
   619  *
       
   620  * @example
       
   621  * ```js
       
   622  * const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test
       
   623  * ```
       
   624  *
       
   625  * @return {string} URL with arguments applied.
       
   626  */
       
   627 
       
   628 function addQueryArgs() {
       
   629   var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
       
   630   var args = arguments.length > 1 ? arguments[1] : undefined;
       
   631 
       
   632   // If no arguments are to be appended, return original URL.
       
   633   if (!args || !Object.keys(args).length) {
       
   634     return url;
       
   635   }
       
   636 
       
   637   var baseUrl = url; // Determine whether URL already had query arguments.
       
   638 
       
   639   var queryStringIndex = url.indexOf('?');
       
   640 
       
   641   if (queryStringIndex !== -1) {
       
   642     // Merge into existing query arguments.
       
   643     args = Object.assign(Object(qs__WEBPACK_IMPORTED_MODULE_0__["parse"])(url.substr(queryStringIndex + 1)), args); // Change working base URL to omit previous query arguments.
       
   644 
       
   645     baseUrl = baseUrl.substr(0, queryStringIndex);
       
   646   }
       
   647 
       
   648   return baseUrl + '?' + Object(qs__WEBPACK_IMPORTED_MODULE_0__["stringify"])(args);
       
   649 }
       
   650 /**
       
   651  * Returns a single query argument of the url
       
   652  *
       
   653  * @param {string} url URL
       
   654  * @param {string} arg Query arg name
       
   655  *
       
   656  * @example
       
   657  * ```js
       
   658  * const foo = getQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'foo' ); // bar
       
   659  * ```
       
   660  *
       
   661  * @return {Array|string} Query arg value.
       
   662  */
       
   663 
       
   664 function getQueryArg(url, arg) {
       
   665   var queryStringIndex = url.indexOf('?');
       
   666   var query = queryStringIndex !== -1 ? Object(qs__WEBPACK_IMPORTED_MODULE_0__["parse"])(url.substr(queryStringIndex + 1)) : {};
       
   667   return query[arg];
       
   668 }
       
   669 /**
       
   670  * Determines whether the URL contains a given query arg.
       
   671  *
       
   672  * @param {string} url URL
       
   673  * @param {string} arg Query arg name
       
   674  *
       
   675  * @example
       
   676  * ```js
       
   677  * const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true
       
   678  * ```
       
   679  *
       
   680  * @return {boolean} Whether or not the URL contains the query arg.
       
   681  */
       
   682 
       
   683 function hasQueryArg(url, arg) {
       
   684   return getQueryArg(url, arg) !== undefined;
       
   685 }
       
   686 /**
       
   687  * Removes arguments from the query string of the url
       
   688  *
       
   689  * @param {string} url  URL
       
   690  * @param {...string} args Query Args
       
   691  *
       
   692  * @example
       
   693  * ```js
       
   694  * const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar
       
   695  * ```
       
   696  *
       
   697  * @return {string} Updated URL
       
   698  */
       
   699 
       
   700 function removeQueryArgs(url) {
       
   701   var queryStringIndex = url.indexOf('?');
       
   702   var query = queryStringIndex !== -1 ? Object(qs__WEBPACK_IMPORTED_MODULE_0__["parse"])(url.substr(queryStringIndex + 1)) : {};
       
   703   var baseUrl = queryStringIndex !== -1 ? url.substr(0, queryStringIndex) : url;
       
   704 
       
   705   for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
   706     args[_key - 1] = arguments[_key];
       
   707   }
       
   708 
       
   709   args.forEach(function (arg) {
       
   710     return delete query[arg];
       
   711   });
       
   712   return baseUrl + '?' + Object(qs__WEBPACK_IMPORTED_MODULE_0__["stringify"])(query);
       
   713 }
       
   714 /**
       
   715  * Prepends "http://" to a url, if it looks like something that is meant to be a TLD.
       
   716  *
       
   717  * @param  {string} url The URL to test
       
   718  *
       
   719  * @example
       
   720  * ```js
       
   721  * const actualURL = prependHTTP( 'wordpress.org' ); // http://wordpress.org
       
   722  * ```
       
   723  *
       
   724  * @return {string}     The updated URL
       
   725  */
       
   726 
       
   727 function prependHTTP(url) {
       
   728   if (!USABLE_HREF_REGEXP.test(url) && !EMAIL_REGEXP.test(url)) {
       
   729     return 'http://' + url;
       
   730   }
       
   731 
       
   732   return url;
       
   733 }
       
   734 /**
       
   735  * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if
       
   736  * `decodeURI` throws an error.
       
   737  *
       
   738  * @param {string} uri URI to decode.
       
   739  *
       
   740  * @example
       
   741  * ```js
       
   742  * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'
       
   743  * ```
       
   744  *
       
   745  * @return {string} Decoded URI if possible.
       
   746  */
       
   747 
       
   748 function safeDecodeURI(uri) {
       
   749   try {
       
   750     return decodeURI(uri);
       
   751   } catch (uriError) {
       
   752     return uri;
       
   753   }
       
   754 }
       
   755 /**
       
   756  * Returns a URL for display.
       
   757  *
       
   758  * @param {string} url Original URL.
       
   759  *
       
   760  * @example
       
   761  * ```js
       
   762  * const displayUrl = filterURLForDisplay( 'https://www.wordpress.org/gutenberg/' ); // wordpress.org/gutenberg
       
   763  * ```
       
   764  *
       
   765  * @return {string} Displayed URL.
       
   766  */
       
   767 
       
   768 function filterURLForDisplay(url) {
       
   769   // Remove protocol and www prefixes.
       
   770   var filteredURL = url.replace(/^(?:https?:)\/\/(?:www\.)?/, ''); // Ends with / and only has that single slash, strip it.
       
   771 
       
   772   if (filteredURL.match(/^[^\/]+\/$/)) {
       
   773     return filteredURL.replace('/', '');
       
   774   }
       
   775 
       
   776   return filteredURL;
       
   777 }
       
   778 /**
       
   779  * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
       
   780  * `decodeURIComponent` throws an error.
       
   781  *
       
   782  * @param {string} uriComponent URI component to decode.
       
   783  *
       
   784  * @return {string} Decoded URI component if possible.
       
   785  */
       
   786 
       
   787 function safeDecodeURIComponent(uriComponent) {
       
   788   try {
       
   789     return decodeURIComponent(uriComponent);
       
   790   } catch (uriComponentError) {
       
   791     return uriComponent;
       
   792   }
       
   793 }
       
   794 
       
   795 
       
   796 /***/ }),
       
   797 
       
   798 /***/ 355:
       
   799 /***/ (function(module, exports, __webpack_require__) {
       
   800 
       
   801 "use strict";
       
   802 
       
   803 
       
   804 var utils = __webpack_require__(201);
       
   805 var formats = __webpack_require__(202);
       
   806 
   389 
   807 var arrayPrefixGenerators = {
   390 var arrayPrefixGenerators = {
   808     brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
   391     brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
   809         return prefix + '[]';
   392         return prefix + '[]';
   810     },
   393     },
       
   394     comma: 'comma',
   811     indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
   395     indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
   812         return prefix + '[' + key + ']';
   396         return prefix + '[' + key + ']';
   813     },
   397     },
   814     repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
   398     repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
   815         return prefix;
   399         return prefix;
   831     charsetSentinel: false,
   415     charsetSentinel: false,
   832     delimiter: '&',
   416     delimiter: '&',
   833     encode: true,
   417     encode: true,
   834     encoder: utils.encode,
   418     encoder: utils.encode,
   835     encodeValuesOnly: false,
   419     encodeValuesOnly: false,
       
   420     formatter: formats.formatters[formats['default']],
   836     // deprecated
   421     // deprecated
   837     indices: false,
   422     indices: false,
   838     serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
   423     serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
   839         return toISO.call(date);
   424         return toISO.call(date);
   840     },
   425     },
   860     var obj = object;
   445     var obj = object;
   861     if (typeof filter === 'function') {
   446     if (typeof filter === 'function') {
   862         obj = filter(prefix, obj);
   447         obj = filter(prefix, obj);
   863     } else if (obj instanceof Date) {
   448     } else if (obj instanceof Date) {
   864         obj = serializeDate(obj);
   449         obj = serializeDate(obj);
       
   450     } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
       
   451         obj = obj.join(',');
   865     }
   452     }
   866 
   453 
   867     if (obj === null) {
   454     if (obj === null) {
   868         if (strictNullHandling) {
   455         if (strictNullHandling) {
   869             return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset) : prefix;
   456             return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset) : prefix;
   885     if (typeof obj === 'undefined') {
   472     if (typeof obj === 'undefined') {
   886         return values;
   473         return values;
   887     }
   474     }
   888 
   475 
   889     var objKeys;
   476     var objKeys;
   890     if (Array.isArray(filter)) {
   477     if (isArray(filter)) {
   891         objKeys = filter;
   478         objKeys = filter;
   892     } else {
   479     } else {
   893         var keys = Object.keys(obj);
   480         var keys = Object.keys(obj);
   894         objKeys = sort ? keys.sort(sort) : keys;
   481         objKeys = sort ? keys.sort(sort) : keys;
   895     }
   482     }
   899 
   486 
   900         if (skipNulls && obj[key] === null) {
   487         if (skipNulls && obj[key] === null) {
   901             continue;
   488             continue;
   902         }
   489         }
   903 
   490 
   904         if (Array.isArray(obj)) {
   491         if (isArray(obj)) {
   905             pushToArray(values, stringify(
   492             pushToArray(values, stringify(
   906                 obj[key],
   493                 obj[key],
   907                 generateArrayPrefix(prefix, key),
   494                 typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix,
   908                 generateArrayPrefix,
   495                 generateArrayPrefix,
   909                 strictNullHandling,
   496                 strictNullHandling,
   910                 skipNulls,
   497                 skipNulls,
   911                 encoder,
   498                 encoder,
   912                 filter,
   499                 filter,
   937     }
   524     }
   938 
   525 
   939     return values;
   526     return values;
   940 };
   527 };
   941 
   528 
       
   529 var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
       
   530     if (!opts) {
       
   531         return defaults;
       
   532     }
       
   533 
       
   534     if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
       
   535         throw new TypeError('Encoder has to be a function.');
       
   536     }
       
   537 
       
   538     var charset = opts.charset || defaults.charset;
       
   539     if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
       
   540         throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
       
   541     }
       
   542 
       
   543     var format = formats['default'];
       
   544     if (typeof opts.format !== 'undefined') {
       
   545         if (!has.call(formats.formatters, opts.format)) {
       
   546             throw new TypeError('Unknown format option provided.');
       
   547         }
       
   548         format = opts.format;
       
   549     }
       
   550     var formatter = formats.formatters[format];
       
   551 
       
   552     var filter = defaults.filter;
       
   553     if (typeof opts.filter === 'function' || isArray(opts.filter)) {
       
   554         filter = opts.filter;
       
   555     }
       
   556 
       
   557     return {
       
   558         addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
       
   559         allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
       
   560         charset: charset,
       
   561         charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
       
   562         delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
       
   563         encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
       
   564         encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
       
   565         encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
       
   566         filter: filter,
       
   567         formatter: formatter,
       
   568         serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
       
   569         skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
       
   570         sort: typeof opts.sort === 'function' ? opts.sort : null,
       
   571         strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
       
   572     };
       
   573 };
       
   574 
   942 module.exports = function (object, opts) {
   575 module.exports = function (object, opts) {
   943     var obj = object;
   576     var obj = object;
   944     var options = opts ? utils.assign({}, opts) : {};
   577     var options = normalizeStringifyOptions(opts);
   945 
   578 
   946     if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
       
   947         throw new TypeError('Encoder has to be a function.');
       
   948     }
       
   949 
       
   950     var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
       
   951     var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
       
   952     var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
       
   953     var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
       
   954     var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
       
   955     var sort = typeof options.sort === 'function' ? options.sort : null;
       
   956     var allowDots = typeof options.allowDots === 'undefined' ? defaults.allowDots : !!options.allowDots;
       
   957     var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
       
   958     var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
       
   959     var charset = options.charset || defaults.charset;
       
   960     if (typeof options.charset !== 'undefined' && options.charset !== 'utf-8' && options.charset !== 'iso-8859-1') {
       
   961         throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined');
       
   962     }
       
   963 
       
   964     if (typeof options.format === 'undefined') {
       
   965         options.format = formats['default'];
       
   966     } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
       
   967         throw new TypeError('Unknown format option provided.');
       
   968     }
       
   969     var formatter = formats.formatters[options.format];
       
   970     var objKeys;
   579     var objKeys;
   971     var filter;
   580     var filter;
   972 
   581 
   973     if (typeof options.filter === 'function') {
   582     if (typeof options.filter === 'function') {
   974         filter = options.filter;
   583         filter = options.filter;
   975         obj = filter('', obj);
   584         obj = filter('', obj);
   976     } else if (Array.isArray(options.filter)) {
   585     } else if (isArray(options.filter)) {
   977         filter = options.filter;
   586         filter = options.filter;
   978         objKeys = filter;
   587         objKeys = filter;
   979     }
   588     }
   980 
   589 
   981     var keys = [];
   590     var keys = [];
   983     if (typeof obj !== 'object' || obj === null) {
   592     if (typeof obj !== 'object' || obj === null) {
   984         return '';
   593         return '';
   985     }
   594     }
   986 
   595 
   987     var arrayFormat;
   596     var arrayFormat;
   988     if (options.arrayFormat in arrayPrefixGenerators) {
   597     if (opts && opts.arrayFormat in arrayPrefixGenerators) {
   989         arrayFormat = options.arrayFormat;
   598         arrayFormat = opts.arrayFormat;
   990     } else if ('indices' in options) {
   599     } else if (opts && 'indices' in opts) {
   991         arrayFormat = options.indices ? 'indices' : 'repeat';
   600         arrayFormat = opts.indices ? 'indices' : 'repeat';
   992     } else {
   601     } else {
   993         arrayFormat = 'indices';
   602         arrayFormat = 'indices';
   994     }
   603     }
   995 
   604 
   996     var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
   605     var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
   997 
   606 
   998     if (!objKeys) {
   607     if (!objKeys) {
   999         objKeys = Object.keys(obj);
   608         objKeys = Object.keys(obj);
  1000     }
   609     }
  1001 
   610 
  1002     if (sort) {
   611     if (options.sort) {
  1003         objKeys.sort(sort);
   612         objKeys.sort(options.sort);
  1004     }
   613     }
  1005 
   614 
  1006     for (var i = 0; i < objKeys.length; ++i) {
   615     for (var i = 0; i < objKeys.length; ++i) {
  1007         var key = objKeys[i];
   616         var key = objKeys[i];
  1008 
   617 
  1009         if (skipNulls && obj[key] === null) {
   618         if (options.skipNulls && obj[key] === null) {
  1010             continue;
   619             continue;
  1011         }
   620         }
  1012         pushToArray(keys, stringify(
   621         pushToArray(keys, stringify(
  1013             obj[key],
   622             obj[key],
  1014             key,
   623             key,
  1015             generateArrayPrefix,
   624             generateArrayPrefix,
  1016             strictNullHandling,
   625             options.strictNullHandling,
  1017             skipNulls,
   626             options.skipNulls,
  1018             encode ? encoder : null,
   627             options.encode ? options.encoder : null,
  1019             filter,
   628             options.filter,
  1020             sort,
   629             options.sort,
  1021             allowDots,
   630             options.allowDots,
  1022             serializeDate,
   631             options.serializeDate,
  1023             formatter,
   632             options.formatter,
  1024             encodeValuesOnly,
   633             options.encodeValuesOnly,
  1025             charset
   634             options.charset
  1026         ));
   635         ));
  1027     }
   636     }
  1028 
   637 
  1029     var joined = keys.join(delimiter);
   638     var joined = keys.join(options.delimiter);
  1030     var prefix = options.addQueryPrefix === true ? '?' : '';
   639     var prefix = options.addQueryPrefix === true ? '?' : '';
  1031 
   640 
  1032     if (options.charsetSentinel) {
   641     if (options.charsetSentinel) {
  1033         if (charset === 'iso-8859-1') {
   642         if (options.charset === 'iso-8859-1') {
  1034             // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
   643             // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
  1035             prefix += 'utf8=%26%2310003%3B&';
   644             prefix += 'utf8=%26%2310003%3B&';
  1036         } else {
   645         } else {
  1037             // encodeURIComponent('✓')
   646             // encodeURIComponent('✓')
  1038             prefix += 'utf8=%E2%9C%93&';
   647             prefix += 'utf8=%E2%9C%93&';
  1043 };
   652 };
  1044 
   653 
  1045 
   654 
  1046 /***/ }),
   655 /***/ }),
  1047 
   656 
  1048 /***/ 356:
   657 /***/ 434:
  1049 /***/ (function(module, exports, __webpack_require__) {
   658 /***/ (function(module, exports, __webpack_require__) {
  1050 
   659 
  1051 "use strict";
   660 "use strict";
  1052 
   661 
  1053 
   662 
  1054 var utils = __webpack_require__(201);
   663 var utils = __webpack_require__(258);
  1055 
   664 
  1056 var has = Object.prototype.hasOwnProperty;
   665 var has = Object.prototype.hasOwnProperty;
  1057 
   666 
  1058 var defaults = {
   667 var defaults = {
  1059     allowDots: false,
   668     allowDots: false,
  1060     allowPrototypes: false,
   669     allowPrototypes: false,
  1061     arrayLimit: 20,
   670     arrayLimit: 20,
  1062     charset: 'utf-8',
   671     charset: 'utf-8',
  1063     charsetSentinel: false,
   672     charsetSentinel: false,
       
   673     comma: false,
  1064     decoder: utils.decode,
   674     decoder: utils.decode,
  1065     delimiter: '&',
   675     delimiter: '&',
  1066     depth: 5,
   676     depth: 5,
  1067     ignoreQueryPrefix: false,
   677     ignoreQueryPrefix: false,
  1068     interpretNumericEntities: false,
   678     interpretNumericEntities: false,
  1130         }
   740         }
  1131 
   741 
  1132         if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
   742         if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
  1133             val = interpretNumericEntities(val);
   743             val = interpretNumericEntities(val);
  1134         }
   744         }
       
   745 
       
   746         if (val && options.comma && val.indexOf(',') > -1) {
       
   747             val = val.split(',');
       
   748         }
       
   749 
  1135         if (has.call(obj, key)) {
   750         if (has.call(obj, key)) {
  1136             obj[key] = utils.combine(obj[key], val);
   751             obj[key] = utils.combine(obj[key], val);
  1137         } else {
   752         } else {
  1138             obj[key] = val;
   753             obj[key] = val;
  1139         }
   754         }
  1229     }
   844     }
  1230 
   845 
  1231     return parseObject(keys, val, options);
   846     return parseObject(keys, val, options);
  1232 };
   847 };
  1233 
   848 
       
   849 var normalizeParseOptions = function normalizeParseOptions(opts) {
       
   850     if (!opts) {
       
   851         return defaults;
       
   852     }
       
   853 
       
   854     if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
       
   855         throw new TypeError('Decoder has to be a function.');
       
   856     }
       
   857 
       
   858     if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
       
   859         throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined');
       
   860     }
       
   861     var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
       
   862 
       
   863     return {
       
   864         allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
       
   865         allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
       
   866         arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
       
   867         charset: charset,
       
   868         charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
       
   869         comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
       
   870         decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
       
   871         delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
       
   872         depth: typeof opts.depth === 'number' ? opts.depth : defaults.depth,
       
   873         ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
       
   874         interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
       
   875         parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
       
   876         parseArrays: opts.parseArrays !== false,
       
   877         plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
       
   878         strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
       
   879     };
       
   880 };
       
   881 
  1234 module.exports = function (str, opts) {
   882 module.exports = function (str, opts) {
  1235     var options = opts ? utils.assign({}, opts) : {};
   883     var options = normalizeParseOptions(opts);
  1236 
       
  1237     if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
       
  1238         throw new TypeError('Decoder has to be a function.');
       
  1239     }
       
  1240 
       
  1241     options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
       
  1242     options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
       
  1243     options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
       
  1244     options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
       
  1245     options.parseArrays = options.parseArrays !== false;
       
  1246     options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
       
  1247     options.allowDots = typeof options.allowDots === 'undefined' ? defaults.allowDots : !!options.allowDots;
       
  1248     options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
       
  1249     options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
       
  1250     options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
       
  1251     options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
       
  1252 
       
  1253     if (typeof options.charset !== 'undefined' && options.charset !== 'utf-8' && options.charset !== 'iso-8859-1') {
       
  1254         throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined');
       
  1255     }
       
  1256     if (typeof options.charset === 'undefined') {
       
  1257         options.charset = defaults.charset;
       
  1258     }
       
  1259 
   884 
  1260     if (str === '' || str === null || typeof str === 'undefined') {
   885     if (str === '' || str === null || typeof str === 'undefined') {
  1261         return options.plainObjects ? Object.create(null) : {};
   886         return options.plainObjects ? Object.create(null) : {};
  1262     }
   887     }
  1263 
   888 
  1277 };
   902 };
  1278 
   903 
  1279 
   904 
  1280 /***/ }),
   905 /***/ }),
  1281 
   906 
  1282 /***/ 86:
   907 /***/ 444:
  1283 /***/ (function(module, exports, __webpack_require__) {
   908 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1284 
   909 
  1285 "use strict";
   910 "use strict";
  1286 
   911 // ESM COMPAT FLAG
  1287 
   912 __webpack_require__.r(__webpack_exports__);
  1288 var stringify = __webpack_require__(355);
   913 
  1289 var parse = __webpack_require__(356);
   914 // EXPORTS
  1290 var formats = __webpack_require__(202);
   915 __webpack_require__.d(__webpack_exports__, "isURL", function() { return /* reexport */ isURL; });
  1291 
   916 __webpack_require__.d(__webpack_exports__, "isEmail", function() { return /* reexport */ isEmail; });
  1292 module.exports = {
   917 __webpack_require__.d(__webpack_exports__, "getProtocol", function() { return /* reexport */ getProtocol; });
  1293     formats: formats,
   918 __webpack_require__.d(__webpack_exports__, "isValidProtocol", function() { return /* reexport */ isValidProtocol; });
  1294     parse: parse,
   919 __webpack_require__.d(__webpack_exports__, "getAuthority", function() { return /* reexport */ getAuthority; });
  1295     stringify: stringify
   920 __webpack_require__.d(__webpack_exports__, "isValidAuthority", function() { return /* reexport */ isValidAuthority; });
  1296 };
   921 __webpack_require__.d(__webpack_exports__, "getPath", function() { return /* reexport */ getPath; });
       
   922 __webpack_require__.d(__webpack_exports__, "isValidPath", function() { return /* reexport */ isValidPath; });
       
   923 __webpack_require__.d(__webpack_exports__, "getQueryString", function() { return /* reexport */ getQueryString; });
       
   924 __webpack_require__.d(__webpack_exports__, "isValidQueryString", function() { return /* reexport */ isValidQueryString; });
       
   925 __webpack_require__.d(__webpack_exports__, "getPathAndQueryString", function() { return /* reexport */ getPathAndQueryString; });
       
   926 __webpack_require__.d(__webpack_exports__, "getFragment", function() { return /* reexport */ getFragment; });
       
   927 __webpack_require__.d(__webpack_exports__, "isValidFragment", function() { return /* reexport */ isValidFragment; });
       
   928 __webpack_require__.d(__webpack_exports__, "addQueryArgs", function() { return /* reexport */ addQueryArgs; });
       
   929 __webpack_require__.d(__webpack_exports__, "getQueryArg", function() { return /* reexport */ getQueryArg; });
       
   930 __webpack_require__.d(__webpack_exports__, "hasQueryArg", function() { return /* reexport */ hasQueryArg; });
       
   931 __webpack_require__.d(__webpack_exports__, "removeQueryArgs", function() { return /* reexport */ removeQueryArgs; });
       
   932 __webpack_require__.d(__webpack_exports__, "prependHTTP", function() { return /* reexport */ prependHTTP; });
       
   933 __webpack_require__.d(__webpack_exports__, "safeDecodeURI", function() { return /* reexport */ safeDecodeURI; });
       
   934 __webpack_require__.d(__webpack_exports__, "safeDecodeURIComponent", function() { return /* reexport */ safeDecodeURIComponent; });
       
   935 __webpack_require__.d(__webpack_exports__, "filterURLForDisplay", function() { return /* reexport */ filterURLForDisplay; });
       
   936 __webpack_require__.d(__webpack_exports__, "cleanForSlug", function() { return /* reexport */ cleanForSlug; });
       
   937 
       
   938 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-url.js
       
   939 /**
       
   940  * Determines whether the given string looks like a URL.
       
   941  *
       
   942  * @param {string} url The string to scrutinise.
       
   943  *
       
   944  * @example
       
   945  * ```js
       
   946  * const isURL = isURL( 'https://wordpress.org' ); // true
       
   947  * ```
       
   948  *
       
   949  * @see https://url.spec.whatwg.org/
       
   950  * @see https://url.spec.whatwg.org/#valid-url-string
       
   951  *
       
   952  * @return {boolean} Whether or not it looks like a URL.
       
   953  */
       
   954 function isURL(url) {
       
   955   // A URL can be considered value if the `URL` constructor is able to parse
       
   956   // it. The constructor throws an error for an invalid URL.
       
   957   try {
       
   958     new URL(url);
       
   959     return true;
       
   960   } catch (_unused) {
       
   961     return false;
       
   962   }
       
   963 }
       
   964 
       
   965 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-email.js
       
   966 var EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
       
   967 /**
       
   968  * Determines whether the given string looks like an email.
       
   969  *
       
   970  * @param {string} email The string to scrutinise.
       
   971  *
       
   972  * @example
       
   973  * ```js
       
   974  * const isEmail = isEmail( 'hello@wordpress.org' ); // true
       
   975  * ```
       
   976  *
       
   977  * @return {boolean} Whether or not it looks like an email.
       
   978  */
       
   979 
       
   980 function isEmail(email) {
       
   981   return EMAIL_REGEXP.test(email);
       
   982 }
       
   983 
       
   984 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-protocol.js
       
   985 /**
       
   986  * Returns the protocol part of the URL.
       
   987  *
       
   988  * @param {string} url The full URL.
       
   989  *
       
   990  * @example
       
   991  * ```js
       
   992  * const protocol1 = getProtocol( 'tel:012345678' ); // 'tel:'
       
   993  * const protocol2 = getProtocol( 'https://wordpress.org' ); // 'https:'
       
   994  * ```
       
   995  *
       
   996  * @return {string|void} The protocol part of the URL.
       
   997  */
       
   998 function getProtocol(url) {
       
   999   var matches = /^([^\s:]+:)/.exec(url);
       
  1000 
       
  1001   if (matches) {
       
  1002     return matches[1];
       
  1003   }
       
  1004 }
       
  1005 
       
  1006 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-protocol.js
       
  1007 /**
       
  1008  * Tests if a url protocol is valid.
       
  1009  *
       
  1010  * @param {string} protocol The url protocol.
       
  1011  *
       
  1012  * @example
       
  1013  * ```js
       
  1014  * const isValid = isValidProtocol( 'https:' ); // true
       
  1015  * const isNotValid = isValidProtocol( 'https :' ); // false
       
  1016  * ```
       
  1017  *
       
  1018  * @return {boolean} True if the argument is a valid protocol (e.g. http:, tel:).
       
  1019  */
       
  1020 function isValidProtocol(protocol) {
       
  1021   if (!protocol) {
       
  1022     return false;
       
  1023   }
       
  1024 
       
  1025   return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol);
       
  1026 }
       
  1027 
       
  1028 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-authority.js
       
  1029 /**
       
  1030  * Returns the authority part of the URL.
       
  1031  *
       
  1032  * @param {string} url The full URL.
       
  1033  *
       
  1034  * @example
       
  1035  * ```js
       
  1036  * const authority1 = getAuthority( 'https://wordpress.org/help/' ); // 'wordpress.org'
       
  1037  * const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080'
       
  1038  * ```
       
  1039  *
       
  1040  * @return {string|void} The authority part of the URL.
       
  1041  */
       
  1042 function getAuthority(url) {
       
  1043   var matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(url);
       
  1044 
       
  1045   if (matches) {
       
  1046     return matches[1];
       
  1047   }
       
  1048 }
       
  1049 
       
  1050 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-authority.js
       
  1051 /**
       
  1052  * Checks for invalid characters within the provided authority.
       
  1053  *
       
  1054  * @param {string} authority A string containing the URL authority.
       
  1055  *
       
  1056  * @example
       
  1057  * ```js
       
  1058  * const isValid = isValidAuthority( 'wordpress.org' ); // true
       
  1059  * const isNotValid = isValidAuthority( 'wordpress#org' ); // false
       
  1060  * ```
       
  1061  *
       
  1062  * @return {boolean} True if the argument contains a valid authority.
       
  1063  */
       
  1064 function isValidAuthority(authority) {
       
  1065   if (!authority) {
       
  1066     return false;
       
  1067   }
       
  1068 
       
  1069   return /^[^\s#?]+$/.test(authority);
       
  1070 }
       
  1071 
       
  1072 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path.js
       
  1073 /**
       
  1074  * Returns the path part of the URL.
       
  1075  *
       
  1076  * @param {string} url The full URL.
       
  1077  *
       
  1078  * @example
       
  1079  * ```js
       
  1080  * const path1 = getPath( 'http://localhost:8080/this/is/a/test?query=true' ); // 'this/is/a/test'
       
  1081  * const path2 = getPath( 'https://wordpress.org/help/faq/' ); // 'help/faq'
       
  1082  * ```
       
  1083  *
       
  1084  * @return {string|void} The path part of the URL.
       
  1085  */
       
  1086 function getPath(url) {
       
  1087   var matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url);
       
  1088 
       
  1089   if (matches) {
       
  1090     return matches[1];
       
  1091   }
       
  1092 }
       
  1093 
       
  1094 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-path.js
       
  1095 /**
       
  1096  * Checks for invalid characters within the provided path.
       
  1097  *
       
  1098  * @param {string} path The URL path.
       
  1099  *
       
  1100  * @example
       
  1101  * ```js
       
  1102  * const isValid = isValidPath( 'test/path/' ); // true
       
  1103  * const isNotValid = isValidPath( '/invalid?test/path/' ); // false
       
  1104  * ```
       
  1105  *
       
  1106  * @return {boolean} True if the argument contains a valid path
       
  1107  */
       
  1108 function isValidPath(path) {
       
  1109   if (!path) {
       
  1110     return false;
       
  1111   }
       
  1112 
       
  1113   return /^[^\s#?]+$/.test(path);
       
  1114 }
       
  1115 
       
  1116 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-string.js
       
  1117 /**
       
  1118  * Returns the query string part of the URL.
       
  1119  *
       
  1120  * @param {string} url The full URL.
       
  1121  *
       
  1122  * @example
       
  1123  * ```js
       
  1124  * const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'
       
  1125  * ```
       
  1126  *
       
  1127  * @return {string|void} The query string part of the URL.
       
  1128  */
       
  1129 function getQueryString(url) {
       
  1130   var query;
       
  1131 
       
  1132   try {
       
  1133     query = new URL(url).search.substring(1);
       
  1134   } catch (error) {}
       
  1135 
       
  1136   if (query) {
       
  1137     return query;
       
  1138   }
       
  1139 }
       
  1140 
       
  1141 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-query-string.js
       
  1142 /**
       
  1143  * Checks for invalid characters within the provided query string.
       
  1144  *
       
  1145  * @param {string} queryString The query string.
       
  1146  *
       
  1147  * @example
       
  1148  * ```js
       
  1149  * const isValid = isValidQueryString( 'query=true&another=false' ); // true
       
  1150  * const isNotValid = isValidQueryString( 'query=true?another=false' ); // false
       
  1151  * ```
       
  1152  *
       
  1153  * @return {boolean} True if the argument contains a valid query string.
       
  1154  */
       
  1155 function isValidQueryString(queryString) {
       
  1156   if (!queryString) {
       
  1157     return false;
       
  1158   }
       
  1159 
       
  1160   return /^[^\s#?\/]+$/.test(queryString);
       
  1161 }
       
  1162 
       
  1163 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path-and-query-string.js
       
  1164 /**
       
  1165  * Internal dependencies
       
  1166  */
       
  1167 
       
  1168 /**
       
  1169  * Returns the path part and query string part of the URL.
       
  1170  *
       
  1171  * @param {string} url The full URL.
       
  1172  *
       
  1173  * @example
       
  1174  * ```js
       
  1175  * const pathAndQueryString1 = getPathAndQueryString( 'http://localhost:8080/this/is/a/test?query=true' ); // '/this/is/a/test?query=true'
       
  1176  * const pathAndQueryString2 = getPathAndQueryString( 'https://wordpress.org/help/faq/' ); // '/help/faq'
       
  1177  * ```
       
  1178  *
       
  1179  * @return {string} The path part and query string part of the URL.
       
  1180  */
       
  1181 
       
  1182 function getPathAndQueryString(url) {
       
  1183   var path = getPath(url);
       
  1184   var queryString = getQueryString(url);
       
  1185   var value = '/';
       
  1186   if (path) value += path;
       
  1187   if (queryString) value += "?".concat(queryString);
       
  1188   return value;
       
  1189 }
       
  1190 
       
  1191 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-fragment.js
       
  1192 /**
       
  1193  * Returns the fragment part of the URL.
       
  1194  *
       
  1195  * @param {string} url The full URL
       
  1196  *
       
  1197  * @example
       
  1198  * ```js
       
  1199  * const fragment1 = getFragment( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // '#fragment'
       
  1200  * const fragment2 = getFragment( 'https://wordpress.org#another-fragment?query=true' ); // '#another-fragment'
       
  1201  * ```
       
  1202  *
       
  1203  * @return {string|void} The fragment part of the URL.
       
  1204  */
       
  1205 function getFragment(url) {
       
  1206   var matches = /^\S+?(#[^\s\?]*)/.exec(url);
       
  1207 
       
  1208   if (matches) {
       
  1209     return matches[1];
       
  1210   }
       
  1211 }
       
  1212 
       
  1213 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-fragment.js
       
  1214 /**
       
  1215  * Checks for invalid characters within the provided fragment.
       
  1216  *
       
  1217  * @param {string} fragment The url fragment.
       
  1218  *
       
  1219  * @example
       
  1220  * ```js
       
  1221  * const isValid = isValidFragment( '#valid-fragment' ); // true
       
  1222  * const isNotValid = isValidFragment( '#invalid-#fragment' ); // false
       
  1223  * ```
       
  1224  *
       
  1225  * @return {boolean} True if the argument contains a valid fragment.
       
  1226  */
       
  1227 function isValidFragment(fragment) {
       
  1228   if (!fragment) {
       
  1229     return false;
       
  1230   }
       
  1231 
       
  1232   return /^#[^\s#?\/]*$/.test(fragment);
       
  1233 }
       
  1234 
       
  1235 // EXTERNAL MODULE: ./node_modules/qs/lib/index.js
       
  1236 var lib = __webpack_require__(115);
       
  1237 
       
  1238 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/add-query-args.js
       
  1239 /**
       
  1240  * External dependencies
       
  1241  */
       
  1242 
       
  1243 /**
       
  1244  * Appends arguments as querystring to the provided URL. If the URL already
       
  1245  * includes query arguments, the arguments are merged with (and take precedent
       
  1246  * over) the existing set.
       
  1247  *
       
  1248  * @param {string} [url='']  URL to which arguments should be appended. If omitted,
       
  1249  *                           only the resulting querystring is returned.
       
  1250  * @param {Object} [args]    Query arguments to apply to URL.
       
  1251  *
       
  1252  * @example
       
  1253  * ```js
       
  1254  * const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test
       
  1255  * ```
       
  1256  *
       
  1257  * @return {string} URL with arguments applied.
       
  1258  */
       
  1259 
       
  1260 function addQueryArgs() {
       
  1261   var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
       
  1262   var args = arguments.length > 1 ? arguments[1] : undefined;
       
  1263 
       
  1264   // If no arguments are to be appended, return original URL.
       
  1265   if (!args || !Object.keys(args).length) {
       
  1266     return url;
       
  1267   }
       
  1268 
       
  1269   var baseUrl = url; // Determine whether URL already had query arguments.
       
  1270 
       
  1271   var queryStringIndex = url.indexOf('?');
       
  1272 
       
  1273   if (queryStringIndex !== -1) {
       
  1274     // Merge into existing query arguments.
       
  1275     args = Object.assign(Object(lib["parse"])(url.substr(queryStringIndex + 1)), args); // Change working base URL to omit previous query arguments.
       
  1276 
       
  1277     baseUrl = baseUrl.substr(0, queryStringIndex);
       
  1278   }
       
  1279 
       
  1280   return baseUrl + '?' + Object(lib["stringify"])(args);
       
  1281 }
       
  1282 
       
  1283 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-arg.js
       
  1284 /**
       
  1285  * External dependencies
       
  1286  */
       
  1287 
       
  1288 /* eslint-disable jsdoc/valid-types */
       
  1289 
       
  1290 /**
       
  1291  * @typedef {{[key: string]: QueryArgParsed}} QueryArgObject
       
  1292  */
       
  1293 
       
  1294 /* eslint-enable */
       
  1295 
       
  1296 /**
       
  1297  * @typedef {string|string[]|QueryArgObject} QueryArgParsed
       
  1298  */
       
  1299 
       
  1300 /**
       
  1301  * Returns a single query argument of the url
       
  1302  *
       
  1303  * @param {string} url URL.
       
  1304  * @param {string} arg Query arg name.
       
  1305  *
       
  1306  * @example
       
  1307  * ```js
       
  1308  * const foo = getQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'foo' ); // bar
       
  1309  * ```
       
  1310  *
       
  1311  * @return {QueryArgParsed|undefined} Query arg value.
       
  1312  */
       
  1313 
       
  1314 function getQueryArg(url, arg) {
       
  1315   var queryStringIndex = url.indexOf('?');
       
  1316   var query = queryStringIndex !== -1 ? Object(lib["parse"])(url.substr(queryStringIndex + 1)) : {};
       
  1317   return query[arg];
       
  1318 }
       
  1319 
       
  1320 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/has-query-arg.js
       
  1321 /**
       
  1322  * Internal dependencies
       
  1323  */
       
  1324 
       
  1325 /**
       
  1326  * Determines whether the URL contains a given query arg.
       
  1327  *
       
  1328  * @param {string} url URL.
       
  1329  * @param {string} arg Query arg name.
       
  1330  *
       
  1331  * @example
       
  1332  * ```js
       
  1333  * const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true
       
  1334  * ```
       
  1335  *
       
  1336  * @return {boolean} Whether or not the URL contains the query arg.
       
  1337  */
       
  1338 
       
  1339 function hasQueryArg(url, arg) {
       
  1340   return getQueryArg(url, arg) !== undefined;
       
  1341 }
       
  1342 
       
  1343 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/remove-query-args.js
       
  1344 /**
       
  1345  * External dependencies
       
  1346  */
       
  1347 
       
  1348 /**
       
  1349  * Removes arguments from the query string of the url
       
  1350  *
       
  1351  * @param {string}    url  URL.
       
  1352  * @param {...string} args Query Args.
       
  1353  *
       
  1354  * @example
       
  1355  * ```js
       
  1356  * const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar
       
  1357  * ```
       
  1358  *
       
  1359  * @return {string} Updated URL.
       
  1360  */
       
  1361 
       
  1362 function removeQueryArgs(url) {
       
  1363   var queryStringIndex = url.indexOf('?');
       
  1364   var query = queryStringIndex !== -1 ? Object(lib["parse"])(url.substr(queryStringIndex + 1)) : {};
       
  1365   var baseUrl = queryStringIndex !== -1 ? url.substr(0, queryStringIndex) : url;
       
  1366 
       
  1367   for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
  1368     args[_key - 1] = arguments[_key];
       
  1369   }
       
  1370 
       
  1371   args.forEach(function (arg) {
       
  1372     return delete query[arg];
       
  1373   });
       
  1374   return baseUrl + '?' + Object(lib["stringify"])(query);
       
  1375 }
       
  1376 
       
  1377 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/prepend-http.js
       
  1378 /**
       
  1379  * Internal dependencies
       
  1380  */
       
  1381 
       
  1382 var USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i;
       
  1383 /**
       
  1384  * Prepends "http://" to a url, if it looks like something that is meant to be a TLD.
       
  1385  *
       
  1386  * @param {string} url The URL to test.
       
  1387  *
       
  1388  * @example
       
  1389  * ```js
       
  1390  * const actualURL = prependHTTP( 'wordpress.org' ); // http://wordpress.org
       
  1391  * ```
       
  1392  *
       
  1393  * @return {string} The updated URL.
       
  1394  */
       
  1395 
       
  1396 function prependHTTP(url) {
       
  1397   if (!url) {
       
  1398     return url;
       
  1399   }
       
  1400 
       
  1401   url = url.trim();
       
  1402 
       
  1403   if (!USABLE_HREF_REGEXP.test(url) && !isEmail(url)) {
       
  1404     return 'http://' + url;
       
  1405   }
       
  1406 
       
  1407   return url;
       
  1408 }
       
  1409 
       
  1410 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri.js
       
  1411 /**
       
  1412  * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if
       
  1413  * `decodeURI` throws an error.
       
  1414  *
       
  1415  * @param {string} uri URI to decode.
       
  1416  *
       
  1417  * @example
       
  1418  * ```js
       
  1419  * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'
       
  1420  * ```
       
  1421  *
       
  1422  * @return {string} Decoded URI if possible.
       
  1423  */
       
  1424 function safeDecodeURI(uri) {
       
  1425   try {
       
  1426     return decodeURI(uri);
       
  1427   } catch (uriError) {
       
  1428     return uri;
       
  1429   }
       
  1430 }
       
  1431 
       
  1432 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri-component.js
       
  1433 /**
       
  1434  * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
       
  1435  * `decodeURIComponent` throws an error.
       
  1436  *
       
  1437  * @param {string} uriComponent URI component to decode.
       
  1438  *
       
  1439  * @return {string} Decoded URI component if possible.
       
  1440  */
       
  1441 function safeDecodeURIComponent(uriComponent) {
       
  1442   try {
       
  1443     return decodeURIComponent(uriComponent);
       
  1444   } catch (uriComponentError) {
       
  1445     return uriComponent;
       
  1446   }
       
  1447 }
       
  1448 
       
  1449 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/filter-url-for-display.js
       
  1450 /**
       
  1451  * Returns a URL for display.
       
  1452  *
       
  1453  * @param {string} url Original URL.
       
  1454  *
       
  1455  * @example
       
  1456  * ```js
       
  1457  * const displayUrl = filterURLForDisplay( 'https://www.wordpress.org/gutenberg/' ); // wordpress.org/gutenberg
       
  1458  * ```
       
  1459  *
       
  1460  * @return {string} Displayed URL.
       
  1461  */
       
  1462 function filterURLForDisplay(url) {
       
  1463   // Remove protocol and www prefixes.
       
  1464   var filteredURL = url.replace(/^(?:https?:)\/\/(?:www\.)?/, ''); // Ends with / and only has that single slash, strip it.
       
  1465 
       
  1466   if (filteredURL.match(/^[^\/]+\/$/)) {
       
  1467     return filteredURL.replace('/', '');
       
  1468   }
       
  1469 
       
  1470   return filteredURL;
       
  1471 }
       
  1472 
       
  1473 // EXTERNAL MODULE: external {"this":"lodash"}
       
  1474 var external_this_lodash_ = __webpack_require__(2);
       
  1475 
       
  1476 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/clean-for-slug.js
       
  1477 /**
       
  1478  * External dependencies
       
  1479  */
       
  1480 
       
  1481 /**
       
  1482  * Performs some basic cleanup of a string for use as a post slug.
       
  1483  *
       
  1484  * This replicates some of what `sanitize_title()` does in WordPress core, but
       
  1485  * is only designed to approximate what the slug will be.
       
  1486  *
       
  1487  * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin
       
  1488  * letters. Removes combining diacritical marks. Converts whitespace, periods,
       
  1489  * and forward slashes to hyphens. Removes any remaining non-word characters
       
  1490  * except hyphens. Converts remaining string to lowercase. It does not account
       
  1491  * for octets, HTML entities, or other encoded characters.
       
  1492  *
       
  1493  * @param {string} string Title or slug to be processed.
       
  1494  *
       
  1495  * @return {string} Processed string.
       
  1496  */
       
  1497 
       
  1498 function cleanForSlug(string) {
       
  1499   if (!string) {
       
  1500     return '';
       
  1501   }
       
  1502 
       
  1503   return Object(external_this_lodash_["trim"])(Object(external_this_lodash_["deburr"])(string).replace(/[\s\./]+/g, '-').replace(/[^\w-]+/g, '').toLowerCase(), '-');
       
  1504 }
       
  1505 
       
  1506 // CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/index.js
       
  1507 
       
  1508 
       
  1509 
       
  1510 
       
  1511 
       
  1512 
       
  1513 
       
  1514 
       
  1515 
       
  1516 
       
  1517 
       
  1518 
       
  1519 
       
  1520 
       
  1521 
       
  1522 
       
  1523 
       
  1524 
       
  1525 
       
  1526 
       
  1527 
       
  1528 
  1297 
  1529 
  1298 
  1530 
  1299 /***/ })
  1531 /***/ })
  1300 
  1532 
  1301 /******/ });
  1533 /******/ });