: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ // Return the exports of the module
/******/ return module.exports;
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ __webpack_require__.d(getter, { a: getter });
/******/ /* webpack/runtime/define property getters */
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ /* webpack/runtime/make namespace object */
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
addQueryArgs: () => (/* reexport */ addQueryArgs),
buildQueryString: () => (/* reexport */ buildQueryString),
cleanForSlug: () => (/* reexport */ cleanForSlug),
filterURLForDisplay: () => (/* reexport */ filterURLForDisplay),
getAuthority: () => (/* reexport */ getAuthority),
getFilename: () => (/* reexport */ getFilename),
getFragment: () => (/* reexport */ getFragment),
getPath: () => (/* reexport */ getPath),
getPathAndQueryString: () => (/* reexport */ getPathAndQueryString),
getProtocol: () => (/* reexport */ getProtocol),
getQueryArg: () => (/* reexport */ getQueryArg),
getQueryArgs: () => (/* reexport */ getQueryArgs),
getQueryString: () => (/* reexport */ getQueryString),
hasQueryArg: () => (/* reexport */ hasQueryArg),
isEmail: () => (/* reexport */ isEmail),
isURL: () => (/* reexport */ isURL),
isValidAuthority: () => (/* reexport */ isValidAuthority),
isValidFragment: () => (/* reexport */ isValidFragment),
isValidPath: () => (/* reexport */ isValidPath),
isValidProtocol: () => (/* reexport */ isValidProtocol),
isValidQueryString: () => (/* reexport */ isValidQueryString),
normalizePath: () => (/* reexport */ normalizePath),
prependHTTP: () => (/* reexport */ prependHTTP),
prependHTTPS: () => (/* reexport */ prependHTTPS),
removeQueryArgs: () => (/* reexport */ removeQueryArgs),
safeDecodeURI: () => (/* reexport */ safeDecodeURI),
safeDecodeURIComponent: () => (/* reexport */ safeDecodeURIComponent)
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-url.js
* Determines whether the given string looks like a URL.
* @param {string} url The string to scrutinise.
* const isURL = isURL( 'https://wordpress.org' ); // true
* @see https://url.spec.whatwg.org/
* @see https://url.spec.whatwg.org/#valid-url-string
* @return {boolean} Whether or not it looks like a URL.
// A URL can be considered value if the `URL` constructor is able to parse
// it. The constructor throws an error for an invalid URL.
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-email.js
const EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
* Determines whether the given string looks like an email.
* @param {string} email The string to scrutinise.
* const isEmail = isEmail( 'hello@wordpress.org' ); // true
* @return {boolean} Whether or not it looks like an email.
function isEmail(email) {
return EMAIL_REGEXP.test(email);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-protocol.js
* Returns the protocol part of the URL.
* @param {string} url The full URL.
* const protocol1 = getProtocol( 'tel:012345678' ); // 'tel:'
* const protocol2 = getProtocol( 'https://wordpress.org' ); // 'https:'
* @return {string|void} The protocol part of the URL.
function getProtocol(url) {
const matches = /^([^\s:]+:)/.exec(url);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-protocol.js
* Tests if a url protocol is valid.
* @param {string} protocol The url protocol.
* const isValid = isValidProtocol( 'https:' ); // true
* const isNotValid = isValidProtocol( 'https :' ); // false
* @return {boolean} True if the argument is a valid protocol (e.g. http:, tel:).
function isValidProtocol(protocol) {
return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-authority.js
* Returns the authority part of the URL.
* @param {string} url The full URL.
* const authority1 = getAuthority( 'https://wordpress.org/help/' ); // 'wordpress.org'
* const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080'
* @return {string|void} The authority part of the URL.
function getAuthority(url) {
const matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(url);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-authority.js
* Checks for invalid characters within the provided authority.
* @param {string} authority A string containing the URL authority.
* const isValid = isValidAuthority( 'wordpress.org' ); // true
* const isNotValid = isValidAuthority( 'wordpress#org' ); // false
* @return {boolean} True if the argument contains a valid authority.
function isValidAuthority(authority) {
return /^[^\s#?]+$/.test(authority);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path.js
* Returns the path part of the URL.
* @param {string} url The full URL.
* const path1 = getPath( 'http://localhost:8080/this/is/a/test?query=true' ); // 'this/is/a/test'
* const path2 = getPath( 'https://wordpress.org/help/faq/' ); // 'help/faq'
* @return {string|void} The path part of the URL.
const matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-path.js
* Checks for invalid characters within the provided path.
* @param {string} path The URL path.
* const isValid = isValidPath( 'test/path/' ); // true
* const isNotValid = isValidPath( '/invalid?test/path/' ); // false
* @return {boolean} True if the argument contains a valid path
function isValidPath(path) {
return /^[^\s#?]+$/.test(path);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-string.js
* Returns the query string part of the URL.
* @param {string} url The full URL.
* const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'
* @return {string|void} The query string part of the URL.
function getQueryString(url) {
query = new URL(url, 'http://example.com').search.substring(1);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/build-query-string.js
* Generates URL-encoded query string using input query data.
* It is intended to behave equivalent as PHP's `http_build_query`, configured
* with encoding type PHP_QUERY_RFC3986 (spaces as `%20`).
* const queryString = buildQueryString( {
* arrays: [ 'are', 'fine', 'too' ],
* // "simple=is%20ok&arrays%5B0%5D=are&arrays%5B1%5D=fine&arrays%5B2%5D=too&objects%5BevenNested%5D%5Bok%5D=yes"
* @param {Record<string,*>} data Data to encode.
* @return {string} Query string.
function buildQueryString(data) {
const stack = Object.entries(data);
while (pair = stack.shift()) {
// Support building deeply nested data, from array or object values.
const hasNestedData = Array.isArray(value) || value && value.constructor === Object;
// Push array or object values onto the stack as composed of their
// original key and nested index or key, retaining order by a
// combination of Array#reverse and Array#unshift onto the stack.
const valuePairs = Object.entries(value).reverse();
for (const [member, memberValue] of valuePairs) {
stack.unshift([`${key}[${member}]`, memberValue]);
} else if (value !== undefined) {
// Null is treated as special case, equivalent to empty string.
string += '&' + [key, value].map(encodeURIComponent).join('=');
// Loop will concatenate with leading `&`, but it's only expected for all
// but the first query parameter. This strips the leading `&`, while still
// accounting for the case that the string may in-fact be empty.
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-query-string.js
* Checks for invalid characters within the provided query string.
* @param {string} queryString The query string.
* const isValid = isValidQueryString( 'query=true&another=false' ); // true
* const isNotValid = isValidQueryString( 'query=true?another=false' ); // false
* @return {boolean} True if the argument contains a valid query string.
function isValidQueryString(queryString) {
return /^[^\s#?\/]+$/.test(queryString);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path-and-query-string.js
* Returns the path part and query string part of the URL.
* @param {string} url The full URL.
* const pathAndQueryString1 = getPathAndQueryString( 'http://localhost:8080/this/is/a/test?query=true' ); // '/this/is/a/test?query=true'
* const pathAndQueryString2 = getPathAndQueryString( 'https://wordpress.org/help/faq/' ); // '/help/faq'
* @return {string} The path part and query string part of the URL.
function getPathAndQueryString(url) {
const path = getPath(url);
const queryString = getQueryString(url);
value += `?${queryString}`;
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-fragment.js
* Returns the fragment part of the URL.
* @param {string} url The full URL
* const fragment1 = getFragment( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // '#fragment'
* const fragment2 = getFragment( 'https://wordpress.org#another-fragment?query=true' ); // '#another-fragment'
* @return {string|void} The fragment part of the URL.
function getFragment(url) {
const matches = /^\S+?(#[^\s\?]*)/.exec(url);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-fragment.js
* Checks for invalid characters within the provided fragment.
* @param {string} fragment The url fragment.
* const isValid = isValidFragment( '#valid-fragment' ); // true
* const isNotValid = isValidFragment( '#invalid-#fragment' ); // false
* @return {boolean} True if the argument contains a valid fragment.
function isValidFragment(fragment) {
return /^#[^\s#?\/]*$/.test(fragment);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri-component.js
* Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
* `decodeURIComponent` throws an error.
* @param {string} uriComponent URI component to decode.
* @return {string} Decoded URI component if possible.
function safeDecodeURIComponent(uriComponent) {
return decodeURIComponent(uriComponent);
} catch (uriComponentError) {
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-args.js
/** @typedef {import('./get-query-arg').QueryArgParsed} QueryArgParsed */
* @typedef {Record<string,QueryArgParsed>} QueryArgs
* Sets a value in object deeply by a given array of path segments. Mutates the
* @param {Record<string,*>} object Object in which to assign.
* @param {string[]} path Path segment at which to set value.
* @param {*} value Value to set.
function setPath(object, path, value) {
const length = path.length;
const lastIndex = length - 1;
for (let i = 0; i < length; i++) {
if (!key && Array.isArray(object)) {
// If key is empty string and next value is array, derive key from
// the current length of the array.
key = object.length.toString();
key = ['__proto__', 'constructor', 'prototype'].includes(key) ? key.toUpperCase() : key;
// If the next key in the path is numeric (or empty string), it will be
// created as an array. Otherwise, it will be created as an object.
const isNextKeyArrayIndex = !isNaN(Number(path[i + 1]));
object[key] = i === lastIndex ?
// If at end of path, assign the intended value.