[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  this["wp"] = this["wp"] || {}; this["wp"]["url"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 445);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 115:
  91  /***/ (function(module, exports, __webpack_require__) {
  92  
  93  "use strict";
  94  
  95  
  96  var stringify = __webpack_require__(434);
  97  var parse = __webpack_require__(435);
  98  var formats = __webpack_require__(258);
  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  /***/ 257:
 117  /***/ (function(module, exports, __webpack_require__) {
 118  
 119  "use strict";
 120  
 121  
 122  var has = Object.prototype.hasOwnProperty;
 123  var isArray = Array.isArray;
 124  
 125  var hexTable = (function () {
 126      var array = [];
 127      for (var i = 0; i < 256; ++i) {
 128          array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
 129      }
 130  
 131      return array;
 132  }());
 133  
 134  var compactQueue = function compactQueue(queue) {
 135      while (queue.length > 1) {
 136          var item = queue.pop();
 137          var obj = item.obj[item.prop];
 138  
 139          if (isArray(obj)) {
 140              var compacted = [];
 141  
 142              for (var j = 0; j < obj.length; ++j) {
 143                  if (typeof obj[j] !== 'undefined') {
 144                      compacted.push(obj[j]);
 145                  }
 146              }
 147  
 148              item.obj[item.prop] = compacted;
 149          }
 150      }
 151  };
 152  
 153  var arrayToObject = function arrayToObject(source, options) {
 154      var obj = options && options.plainObjects ? Object.create(null) : {};
 155      for (var i = 0; i < source.length; ++i) {
 156          if (typeof source[i] !== 'undefined') {
 157              obj[i] = source[i];
 158          }
 159      }
 160  
 161      return obj;
 162  };
 163  
 164  var merge = function merge(target, source, options) {
 165      if (!source) {
 166          return target;
 167      }
 168  
 169      if (typeof source !== 'object') {
 170          if (isArray(target)) {
 171              target.push(source);
 172          } else if (target && typeof target === 'object') {
 173              if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
 174                  target[source] = true;
 175              }
 176          } else {
 177              return [target, source];
 178          }
 179  
 180          return target;
 181      }
 182  
 183      if (!target || typeof target !== 'object') {
 184          return [target].concat(source);
 185      }
 186  
 187      var mergeTarget = target;
 188      if (isArray(target) && !isArray(source)) {
 189          mergeTarget = arrayToObject(target, options);
 190      }
 191  
 192      if (isArray(target) && isArray(source)) {
 193          source.forEach(function (item, i) {
 194              if (has.call(target, i)) {
 195                  var targetItem = target[i];
 196                  if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
 197                      target[i] = merge(targetItem, item, options);
 198                  } else {
 199                      target.push(item);
 200                  }
 201              } else {
 202                  target[i] = item;
 203              }
 204          });
 205          return target;
 206      }
 207  
 208      return Object.keys(source).reduce(function (acc, key) {
 209          var value = source[key];
 210  
 211          if (has.call(acc, key)) {
 212              acc[key] = merge(acc[key], value, options);
 213          } else {
 214              acc[key] = value;
 215          }
 216          return acc;
 217      }, mergeTarget);
 218  };
 219  
 220  var assign = function assignSingleSource(target, source) {
 221      return Object.keys(source).reduce(function (acc, key) {
 222          acc[key] = source[key];
 223          return acc;
 224      }, target);
 225  };
 226  
 227  var decode = function (str, decoder, charset) {
 228      var strWithoutPlus = str.replace(/\+/g, ' ');
 229      if (charset === 'iso-8859-1') {
 230          // unescape never throws, no try...catch needed:
 231          return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
 232      }
 233      // utf-8
 234      try {
 235          return decodeURIComponent(strWithoutPlus);
 236      } catch (e) {
 237          return strWithoutPlus;
 238      }
 239  };
 240  
 241  var encode = function encode(str, defaultEncoder, charset) {
 242      // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
 243      // It has been adapted here for stricter adherence to RFC 3986
 244      if (str.length === 0) {
 245          return str;
 246      }
 247  
 248      var string = typeof str === 'string' ? str : String(str);
 249  
 250      if (charset === 'iso-8859-1') {
 251          return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
 252              return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
 253          });
 254      }
 255  
 256      var out = '';
 257      for (var i = 0; i < string.length; ++i) {
 258          var c = string.charCodeAt(i);
 259  
 260          if (
 261              c === 0x2D // -
 262              || c === 0x2E // .
 263              || c === 0x5F // _
 264              || c === 0x7E // ~
 265              || (c >= 0x30 && c <= 0x39) // 0-9
 266              || (c >= 0x41 && c <= 0x5A) // a-z
 267              || (c >= 0x61 && c <= 0x7A) // A-Z
 268          ) {
 269              out += string.charAt(i);
 270              continue;
 271          }
 272  
 273          if (c < 0x80) {
 274              out = out + hexTable[c];
 275              continue;
 276          }
 277  
 278          if (c < 0x800) {
 279              out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
 280              continue;
 281          }
 282  
 283          if (c < 0xD800 || c >= 0xE000) {
 284              out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
 285              continue;
 286          }
 287  
 288          i += 1;
 289          c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
 290          out += hexTable[0xF0 | (c >> 18)]
 291              + hexTable[0x80 | ((c >> 12) & 0x3F)]
 292              + hexTable[0x80 | ((c >> 6) & 0x3F)]
 293              + hexTable[0x80 | (c & 0x3F)];
 294      }
 295  
 296      return out;
 297  };
 298  
 299  var compact = function compact(value) {
 300      var queue = [{ obj: { o: value }, prop: 'o' }];
 301      var refs = [];
 302  
 303      for (var i = 0; i < queue.length; ++i) {
 304          var item = queue[i];
 305          var obj = item.obj[item.prop];
 306  
 307          var keys = Object.keys(obj);
 308          for (var j = 0; j < keys.length; ++j) {
 309              var key = keys[j];
 310              var val = obj[key];
 311              if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
 312                  queue.push({ obj: obj, prop: key });
 313                  refs.push(val);
 314              }
 315          }
 316      }
 317  
 318      compactQueue(queue);
 319  
 320      return value;
 321  };
 322  
 323  var isRegExp = function isRegExp(obj) {
 324      return Object.prototype.toString.call(obj) === '[object RegExp]';
 325  };
 326  
 327  var isBuffer = function isBuffer(obj) {
 328      if (!obj || typeof obj !== 'object') {
 329          return false;
 330      }
 331  
 332      return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
 333  };
 334  
 335  var combine = function combine(a, b) {
 336      return [].concat(a, b);
 337  };
 338  
 339  module.exports = {
 340      arrayToObject: arrayToObject,
 341      assign: assign,
 342      combine: combine,
 343      compact: compact,
 344      decode: decode,
 345      encode: encode,
 346      isBuffer: isBuffer,
 347      isRegExp: isRegExp,
 348      merge: merge
 349  };
 350  
 351  
 352  /***/ }),
 353  
 354  /***/ 258:
 355  /***/ (function(module, exports, __webpack_require__) {
 356  
 357  "use strict";
 358  
 359  
 360  var replace = String.prototype.replace;
 361  var percentTwenties = /%20/g;
 362  
 363  module.exports = {
 364      'default': 'RFC3986',
 365      formatters: {
 366          RFC1738: function (value) {
 367              return replace.call(value, percentTwenties, '+');
 368          },
 369          RFC3986: function (value) {
 370              return value;
 371          }
 372      },
 373      RFC1738: 'RFC1738',
 374      RFC3986: 'RFC3986'
 375  };
 376  
 377  
 378  /***/ }),
 379  
 380  /***/ 434:
 381  /***/ (function(module, exports, __webpack_require__) {
 382  
 383  "use strict";
 384  
 385  
 386  var utils = __webpack_require__(257);
 387  var formats = __webpack_require__(258);
 388  var has = Object.prototype.hasOwnProperty;
 389  
 390  var arrayPrefixGenerators = {
 391      brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
 392          return prefix + '[]';
 393      },
 394      comma: 'comma',
 395      indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
 396          return prefix + '[' + key + ']';
 397      },
 398      repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
 399          return prefix;
 400      }
 401  };
 402  
 403  var isArray = Array.isArray;
 404  var push = Array.prototype.push;
 405  var pushToArray = function (arr, valueOrArray) {
 406      push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
 407  };
 408  
 409  var toISO = Date.prototype.toISOString;
 410  
 411  var defaults = {
 412      addQueryPrefix: false,
 413      allowDots: false,
 414      charset: 'utf-8',
 415      charsetSentinel: false,
 416      delimiter: '&',
 417      encode: true,
 418      encoder: utils.encode,
 419      encodeValuesOnly: false,
 420      formatter: formats.formatters[formats['default']],
 421      // deprecated
 422      indices: false,
 423      serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
 424          return toISO.call(date);
 425      },
 426      skipNulls: false,
 427      strictNullHandling: false
 428  };
 429  
 430  var stringify = function stringify( // eslint-disable-line func-name-matching
 431      object,
 432      prefix,
 433      generateArrayPrefix,
 434      strictNullHandling,
 435      skipNulls,
 436      encoder,
 437      filter,
 438      sort,
 439      allowDots,
 440      serializeDate,
 441      formatter,
 442      encodeValuesOnly,
 443      charset
 444  ) {
 445      var obj = object;
 446      if (typeof filter === 'function') {
 447          obj = filter(prefix, obj);
 448      } else if (obj instanceof Date) {
 449          obj = serializeDate(obj);
 450      } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
 451          obj = obj.join(',');
 452      }
 453  
 454      if (obj === null) {
 455          if (strictNullHandling) {
 456              return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset) : prefix;
 457          }
 458  
 459          obj = '';
 460      }
 461  
 462      if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
 463          if (encoder) {
 464              var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset);
 465              return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset))];
 466          }
 467          return [formatter(prefix) + '=' + formatter(String(obj))];
 468      }
 469  
 470      var values = [];
 471  
 472      if (typeof obj === 'undefined') {
 473          return values;
 474      }
 475  
 476      var objKeys;
 477      if (isArray(filter)) {
 478          objKeys = filter;
 479      } else {
 480          var keys = Object.keys(obj);
 481          objKeys = sort ? keys.sort(sort) : keys;
 482      }
 483  
 484      for (var i = 0; i < objKeys.length; ++i) {
 485          var key = objKeys[i];
 486  
 487          if (skipNulls && obj[key] === null) {
 488              continue;
 489          }
 490  
 491          if (isArray(obj)) {
 492              pushToArray(values, stringify(
 493                  obj[key],
 494                  typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix,
 495                  generateArrayPrefix,
 496                  strictNullHandling,
 497                  skipNulls,
 498                  encoder,
 499                  filter,
 500                  sort,
 501                  allowDots,
 502                  serializeDate,
 503                  formatter,
 504                  encodeValuesOnly,
 505                  charset
 506              ));
 507          } else {
 508              pushToArray(values, stringify(
 509                  obj[key],
 510                  prefix + (allowDots ? '.' + key : '[' + key + ']'),
 511                  generateArrayPrefix,
 512                  strictNullHandling,
 513                  skipNulls,
 514                  encoder,
 515                  filter,
 516                  sort,
 517                  allowDots,
 518                  serializeDate,
 519                  formatter,
 520                  encodeValuesOnly,
 521                  charset
 522              ));
 523          }
 524      }
 525  
 526      return values;
 527  };
 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  
 575  module.exports = function (object, opts) {
 576      var obj = object;
 577      var options = normalizeStringifyOptions(opts);
 578  
 579      var objKeys;
 580      var filter;
 581  
 582      if (typeof options.filter === 'function') {
 583          filter = options.filter;
 584          obj = filter('', obj);
 585      } else if (isArray(options.filter)) {
 586          filter = options.filter;
 587          objKeys = filter;
 588      }
 589  
 590      var keys = [];
 591  
 592      if (typeof obj !== 'object' || obj === null) {
 593          return '';
 594      }
 595  
 596      var arrayFormat;
 597      if (opts && opts.arrayFormat in arrayPrefixGenerators) {
 598          arrayFormat = opts.arrayFormat;
 599      } else if (opts && 'indices' in opts) {
 600          arrayFormat = opts.indices ? 'indices' : 'repeat';
 601      } else {
 602          arrayFormat = 'indices';
 603      }
 604  
 605      var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
 606  
 607      if (!objKeys) {
 608          objKeys = Object.keys(obj);
 609      }
 610  
 611      if (options.sort) {
 612          objKeys.sort(options.sort);
 613      }
 614  
 615      for (var i = 0; i < objKeys.length; ++i) {
 616          var key = objKeys[i];
 617  
 618          if (options.skipNulls && obj[key] === null) {
 619              continue;
 620          }
 621          pushToArray(keys, stringify(
 622              obj[key],
 623              key,
 624              generateArrayPrefix,
 625              options.strictNullHandling,
 626              options.skipNulls,
 627              options.encode ? options.encoder : null,
 628              options.filter,
 629              options.sort,
 630              options.allowDots,
 631              options.serializeDate,
 632              options.formatter,
 633              options.encodeValuesOnly,
 634              options.charset
 635          ));
 636      }
 637  
 638      var joined = keys.join(options.delimiter);
 639      var prefix = options.addQueryPrefix === true ? '?' : '';
 640  
 641      if (options.charsetSentinel) {
 642          if (options.charset === 'iso-8859-1') {
 643              // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
 644              prefix += 'utf8=%26%2310003%3B&';
 645          } else {
 646              // encodeURIComponent('✓')
 647              prefix += 'utf8=%E2%9C%93&';
 648          }
 649      }
 650  
 651      return joined.length > 0 ? prefix + joined : '';
 652  };
 653  
 654  
 655  /***/ }),
 656  
 657  /***/ 435:
 658  /***/ (function(module, exports, __webpack_require__) {
 659  
 660  "use strict";
 661  
 662  
 663  var utils = __webpack_require__(257);
 664  
 665  var has = Object.prototype.hasOwnProperty;
 666  
 667  var defaults = {
 668      allowDots: false,
 669      allowPrototypes: false,
 670      arrayLimit: 20,
 671      charset: 'utf-8',
 672      charsetSentinel: false,
 673      comma: false,
 674      decoder: utils.decode,
 675      delimiter: '&',
 676      depth: 5,
 677      ignoreQueryPrefix: false,
 678      interpretNumericEntities: false,
 679      parameterLimit: 1000,
 680      parseArrays: true,
 681      plainObjects: false,
 682      strictNullHandling: false
 683  };
 684  
 685  var interpretNumericEntities = function (str) {
 686      return str.replace(/&#(\d+);/g, function ($0, numberStr) {
 687          return String.fromCharCode(parseInt(numberStr, 10));
 688      });
 689  };
 690  
 691  // This is what browsers will submit when the ✓ character occurs in an
 692  // application/x-www-form-urlencoded body and the encoding of the page containing
 693  // the form is iso-8859-1, or when the submitted form has an accept-charset
 694  // attribute of iso-8859-1. Presumably also with other charsets that do not contain
 695  // the ✓ character, such as us-ascii.
 696  var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
 697  
 698  // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
 699  var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
 700  
 701  var parseValues = function parseQueryStringValues(str, options) {
 702      var obj = {};
 703      var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
 704      var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
 705      var parts = cleanStr.split(options.delimiter, limit);
 706      var skipIndex = -1; // Keep track of where the utf8 sentinel was found
 707      var i;
 708  
 709      var charset = options.charset;
 710      if (options.charsetSentinel) {
 711          for (i = 0; i < parts.length; ++i) {
 712              if (parts[i].indexOf('utf8=') === 0) {
 713                  if (parts[i] === charsetSentinel) {
 714                      charset = 'utf-8';
 715                  } else if (parts[i] === isoSentinel) {
 716                      charset = 'iso-8859-1';
 717                  }
 718                  skipIndex = i;
 719                  i = parts.length; // The eslint settings do not allow break;
 720              }
 721          }
 722      }
 723  
 724      for (i = 0; i < parts.length; ++i) {
 725          if (i === skipIndex) {
 726              continue;
 727          }
 728          var part = parts[i];
 729  
 730          var bracketEqualsPos = part.indexOf(']=');
 731          var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
 732  
 733          var key, val;
 734          if (pos === -1) {
 735              key = options.decoder(part, defaults.decoder, charset);
 736              val = options.strictNullHandling ? null : '';
 737          } else {
 738              key = options.decoder(part.slice(0, pos), defaults.decoder, charset);
 739              val = options.decoder(part.slice(pos + 1), defaults.decoder, charset);
 740          }
 741  
 742          if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
 743              val = interpretNumericEntities(val);
 744          }
 745  
 746          if (val && options.comma && val.indexOf(',') > -1) {
 747              val = val.split(',');
 748          }
 749  
 750          if (has.call(obj, key)) {
 751              obj[key] = utils.combine(obj[key], val);
 752          } else {
 753              obj[key] = val;
 754          }
 755      }
 756  
 757      return obj;
 758  };
 759  
 760  var parseObject = function (chain, val, options) {
 761      var leaf = val;
 762  
 763      for (var i = chain.length - 1; i >= 0; --i) {
 764          var obj;
 765          var root = chain[i];
 766  
 767          if (root === '[]' && options.parseArrays) {
 768              obj = [].concat(leaf);
 769          } else {
 770              obj = options.plainObjects ? Object.create(null) : {};
 771              var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
 772              var index = parseInt(cleanRoot, 10);
 773              if (!options.parseArrays && cleanRoot === '') {
 774                  obj = { 0: leaf };
 775              } else if (
 776                  !isNaN(index)
 777                  && root !== cleanRoot
 778                  && String(index) === cleanRoot
 779                  && index >= 0
 780                  && (options.parseArrays && index <= options.arrayLimit)
 781              ) {
 782                  obj = [];
 783                  obj[index] = leaf;
 784              } else {
 785                  obj[cleanRoot] = leaf;
 786              }
 787          }
 788  
 789          leaf = obj;
 790      }
 791  
 792      return leaf;
 793  };
 794  
 795  var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
 796      if (!givenKey) {
 797          return;
 798      }
 799  
 800      // Transform dot notation to bracket notation
 801      var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
 802  
 803      // The regex chunks
 804  
 805      var brackets = /(\[[^[\]]*])/;
 806      var child = /(\[[^[\]]*])/g;
 807  
 808      // Get the parent
 809  
 810      var segment = brackets.exec(key);
 811      var parent = segment ? key.slice(0, segment.index) : key;
 812  
 813      // Stash the parent if it exists
 814  
 815      var keys = [];
 816      if (parent) {
 817          // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
 818          if (!options.plainObjects && has.call(Object.prototype, parent)) {
 819              if (!options.allowPrototypes) {
 820                  return;
 821              }
 822          }
 823  
 824          keys.push(parent);
 825      }
 826  
 827      // Loop through children appending to the array until we hit depth
 828  
 829      var i = 0;
 830      while ((segment = child.exec(key)) !== null && i < options.depth) {
 831          i += 1;
 832          if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
 833              if (!options.allowPrototypes) {
 834                  return;
 835              }
 836          }
 837          keys.push(segment[1]);
 838      }
 839  
 840      // If there's a remainder, just add whatever is left
 841  
 842      if (segment) {
 843          keys.push('[' + key.slice(segment.index) + ']');
 844      }
 845  
 846      return parseObject(keys, val, options);
 847  };
 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  
 882  module.exports = function (str, opts) {
 883      var options = normalizeParseOptions(opts);
 884  
 885      if (str === '' || str === null || typeof str === 'undefined') {
 886          return options.plainObjects ? Object.create(null) : {};
 887      }
 888  
 889      var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
 890      var obj = options.plainObjects ? Object.create(null) : {};
 891  
 892      // Iterate over the keys and setup the new object
 893  
 894      var keys = Object.keys(tempObj);
 895      for (var i = 0; i < keys.length; ++i) {
 896          var key = keys[i];
 897          var newObj = parseKeys(key, tempObj[key], options);
 898          obj = utils.merge(obj, newObj, options);
 899      }
 900  
 901      return utils.compact(obj);
 902  };
 903  
 904  
 905  /***/ }),
 906  
 907  /***/ 445:
 908  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 909  
 910  "use strict";
 911  // ESM COMPAT FLAG
 912  __webpack_require__.r(__webpack_exports__);
 913  
 914  // EXPORTS
 915  __webpack_require__.d(__webpack_exports__, "isURL", function() { return /* reexport */ isURL; });
 916  __webpack_require__.d(__webpack_exports__, "isEmail", function() { return /* reexport */ isEmail; });
 917  __webpack_require__.d(__webpack_exports__, "getProtocol", function() { return /* reexport */ getProtocol; });
 918  __webpack_require__.d(__webpack_exports__, "isValidProtocol", function() { return /* reexport */ isValidProtocol; });
 919  __webpack_require__.d(__webpack_exports__, "getAuthority", function() { return /* reexport */ getAuthority; });
 920  __webpack_require__.d(__webpack_exports__, "isValidAuthority", function() { return /* reexport */ isValidAuthority; });
 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  
1529  
1530  
1531  /***/ })
1532  
1533  /******/ });


Generated: Wed Aug 12 01:00:03 2020 Cross-referenced by PHPXref 0.7.1