: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/******/ (() => { // webpackBootstrap
/******/ // The require scope
/******/ var __webpack_require__ = {};
/************************************************************************/
/******/ /* 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__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
store: () => (/* reexport */ store)
// NAMESPACE OBJECT: ./node_modules/@wordpress/notices/build-module/store/actions.js
var actions_namespaceObject = {};
__webpack_require__.r(actions_namespaceObject);
__webpack_require__.d(actions_namespaceObject, {
createErrorNotice: () => (createErrorNotice),
createInfoNotice: () => (createInfoNotice),
createNotice: () => (createNotice),
createSuccessNotice: () => (createSuccessNotice),
createWarningNotice: () => (createWarningNotice),
removeAllNotices: () => (removeAllNotices),
removeNotice: () => (removeNotice),
removeNotices: () => (removeNotices)
// NAMESPACE OBJECT: ./node_modules/@wordpress/notices/build-module/store/selectors.js
var selectors_namespaceObject = {};
__webpack_require__.r(selectors_namespaceObject);
__webpack_require__.d(selectors_namespaceObject, {
getNotices: () => (getNotices)
;// CONCATENATED MODULE: external ["wp","data"]
const external_wp_data_namespaceObject = window["wp"]["data"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/utils/on-sub-key.js
* Higher-order reducer creator which creates a combined reducer object, keyed
* by a property on the action object.
* @param {string} actionProperty Action property by which to key object.
* @return {Function} Higher-order reducer.
const onSubKey = actionProperty => reducer => (state = {}, action) => {
// Retrieve subkey from action. Do not track if undefined; useful for cases
// where reducer is scoped by action shape.
const key = action[actionProperty];
// Avoid updating state if unchanged. Note that this also accounts for a
// reducer which returns undefined on a key which is not yet tracked.
const nextKeyState = reducer(state[key], action);
if (nextKeyState === state[key]) {
/* harmony default export */ const on_sub_key = (onSubKey);
;// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/reducer.js
* Reducer returning the next notices state. The notices state is an object
* where each key is a context, its value an array of notice objects.
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
const notices = on_sub_key('context')((state = [], action) => {
// Avoid duplicates on ID.
return [...state.filter(({
}) => id !== action.notice.id), action.notice];
}) => !action.ids.includes(id));
case 'REMOVE_ALL_NOTICES':
}) => type !== action.noticeType);
/* harmony default export */ const reducer = (notices);
;// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/constants.js
* Default context to use for notice grouping when not otherwise specified. Its
* specific value doesn't hold much meaning, but it must be reasonably unique
* and, more importantly, referenced consistently in the store implementation.
const DEFAULT_CONTEXT = 'global';
const DEFAULT_STATUS = 'info';
;// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/actions.js
* @typedef {Object} WPNoticeAction Object describing a user action option associated with a notice.
* @property {string} label Message to use as action label.
* @property {?string} url Optional URL of resource if action incurs
* @property {?Function} onClick Optional function to invoke when action is
* Returns an action object used in signalling that a notice is to be created.
* @param {string|undefined} status Notice status ("info" if undefined is passed).
* @param {string} content Notice message.
* @param {Object} [options] Notice options.
* @param {string} [options.context='global'] Context under which to
* @param {string} [options.id] Identifier for notice.
* @param {boolean} [options.isDismissible=true] Whether the notice can
* @param {string} [options.type='default'] Type of notice, one of
* `default`, or `snackbar`.
* @param {boolean} [options.speak=true] Whether the notice
* @param {Array<WPNoticeAction>} [options.actions] User actions to be
* @param {string} [options.icon] An icon displayed with the notice.
* Only used when type is set to `snackbar`.
* @param {boolean} [options.explicitDismiss] Whether the notice includes
* an explicit dismiss button and
* can't be dismissed by clicking
* the body of the notice. Only applies
* when type is set to `snackbar`.
* @param {Function} [options.onDismiss] Called when the notice is dismissed.
* import { __ } from '@wordpress/i18n';
* import { useDispatch } from '@wordpress/data';
* import { store as noticesStore } from '@wordpress/notices';
* import { Button } from '@wordpress/components';
* const ExampleComponent = () => {
* const { createNotice } = useDispatch( noticesStore );
* onClick={ () => createNotice( 'success', __( 'Notice message' ) ) }
* { __( 'Generate a success notice!' ) }
* @return {Object} Action object.
function createNotice(status = DEFAULT_STATUS, content, options = {}) {
context = DEFAULT_CONTEXT,
id = `${context}${++uniqueId}`,
// The supported value shape of content is currently limited to plain text
// strings. To avoid setting expectation that e.g. a React Element could be
// supported, cast to a string.
content = String(content);
spokenMessage: speak ? content : null,
* Returns an action object used in signalling that a success notice is to be
* created. Refer to `createNotice` for options documentation.
* @param {string} content Notice message.
* @param {Object} [options] Optional notice options.
* import { __ } from '@wordpress/i18n';
* import { useDispatch } from '@wordpress/data';
* import { store as noticesStore } from '@wordpress/notices';
* import { Button } from '@wordpress/components';
* const ExampleComponent = () => {
* const { createSuccessNotice } = useDispatch( noticesStore );
* createSuccessNotice( __( 'Success!' ), {
* { __( 'Generate a snackbar success notice!' ) }
* @return {Object} Action object.
function createSuccessNotice(content, options) {
return createNotice('success', content, options);
* Returns an action object used in signalling that an info notice is to be
* created. Refer to `createNotice` for options documentation.
* @param {string} content Notice message.
* @param {Object} [options] Optional notice options.
* import { __ } from '@wordpress/i18n';
* import { useDispatch } from '@wordpress/data';
* import { store as noticesStore } from '@wordpress/notices';
* import { Button } from '@wordpress/components';
* const ExampleComponent = () => {
* const { createInfoNotice } = useDispatch( noticesStore );
* createInfoNotice( __( 'Something happened!' ), {
* { __( 'Generate a notice that cannot be dismissed.' ) }
* @return {Object} Action object.
function createInfoNotice(content, options) {
return createNotice('info', content, options);
* Returns an action object used in signalling that an error notice is to be
* created. Refer to `createNotice` for options documentation.
* @param {string} content Notice message.
* @param {Object} [options] Optional notice options.
* import { __ } from '@wordpress/i18n';
* import { useDispatch } from '@wordpress/data';
* import { store as noticesStore } from '@wordpress/notices';
* import { Button } from '@wordpress/components';
* const ExampleComponent = () => {
* const { createErrorNotice } = useDispatch( noticesStore );
* createErrorNotice( __( 'An error occurred!' ), {
* 'Generate an snackbar error notice with explicit dismiss button.'
* @return {Object} Action object.
function createErrorNotice(content, options) {
return createNotice('error', content, options);
* Returns an action object used in signalling that a warning notice is to be
* created. Refer to `createNotice` for options documentation.
* @param {string} content Notice message.
* @param {Object} [options] Optional notice options.
* import { __ } from '@wordpress/i18n';
* import { useDispatch } from '@wordpress/data';
* import { store as noticesStore } from '@wordpress/notices';
* import { Button } from '@wordpress/components';
* const ExampleComponent = () => {
* const { createWarningNotice, createInfoNotice } = useDispatch( noticesStore );
* createWarningNotice( __( 'Warning!' ), {
* __( 'The warning has been dismissed!' )
* { __( 'Generates a warning notice with onDismiss callback' ) }
* @return {Object} Action object.
function createWarningNotice(content, options) {
return createNotice('warning', content, options);
* Returns an action object used in signalling that a notice is to be removed.
* @param {string} id Notice unique identifier.
* @param {string} [context='global'] Optional context (grouping) in which the notice is
* intended to appear. Defaults to default context.
* import { __ } from '@wordpress/i18n';
* import { useDispatch } from '@wordpress/data';
* import { store as noticesStore } from '@wordpress/notices';
* import { Button } from '@wordpress/components';
* const ExampleComponent = () => {
* const notices = useSelect( ( select ) => select( noticesStore ).getNotices() );
* const { createWarningNotice, removeNotice } = useDispatch( noticesStore );
* createWarningNotice( __( 'Warning!' ), {
* { __( 'Generate a notice' ) }
* { notices.length > 0 && (
* <Button onClick={ () => removeNotice( notices[ 0 ].id ) }>
* { __( 'Remove the notice' ) }
* @return {Object} Action object.
function removeNotice(id, context = DEFAULT_CONTEXT) {
* Removes all notices from a given context. Defaults to the default context.
* @param {string} noticeType The context to remove all notices from.
* @param {string} context The context to remove all notices from.
* import { __ } from '@wordpress/i18n';
* import { useDispatch, useSelect } from '@wordpress/data';
* import { store as noticesStore } from '@wordpress/notices';
* import { Button } from '@wordpress/components';
* export const ExampleComponent = () => {
* const notices = useSelect( ( select ) =>
* select( noticesStore ).getNotices()
* const { removeAllNotices } = useDispatch( noticesStore );
* { notices.map( ( notice ) => (
* <li key={ notice.id }>{ notice.content }</li>
* { __( 'Clear all notices', 'woo-gutenberg-products-block' ) }