this["wp"] = this["wp"] || {}; this["wp"]["nux"] =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "51Wn");
/************************************************************************/
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["data"]; }());
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
/***/ (function(module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
__webpack_require__.d(__webpack_exports__, "DotTip", function() { return /* reexport */ dot_tip; });
// NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/actions.js
var actions_namespaceObject = {};
__webpack_require__.r(actions_namespaceObject);
__webpack_require__.d(actions_namespaceObject, "triggerGuide", function() { return triggerGuide; });
__webpack_require__.d(actions_namespaceObject, "dismissTip", function() { return dismissTip; });
__webpack_require__.d(actions_namespaceObject, "disableTips", function() { return disableTips; });
__webpack_require__.d(actions_namespaceObject, "enableTips", function() { return enableTips; });
// NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/selectors.js
var selectors_namespaceObject = {};
__webpack_require__.r(selectors_namespaceObject);
__webpack_require__.d(selectors_namespaceObject, "getAssociatedGuide", function() { return getAssociatedGuide; });
__webpack_require__.d(selectors_namespaceObject, "isTipVisible", function() { return isTipVisible; });
__webpack_require__.d(selectors_namespaceObject, "areTipsEnabled", function() { return selectors_areTipsEnabled; });
// EXTERNAL MODULE: external ["wp","deprecated"]
var external_wp_deprecated_ = __webpack_require__("NMb1");
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
// EXTERNAL MODULE: external ["wp","data"]
var external_wp_data_ = __webpack_require__("1ZqX");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("KQm4");
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/reducer.js
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
* Reducer that tracks which tips are in a guide. Each guide is represented by
* an array which contains the tip identifiers contained within that guide.
* @param {Array} state Current state.
* @param {Object} action Dispatched action.
* @return {Array} Updated state.
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var action = arguments.length > 1 ? arguments[1] : undefined;
return [].concat(Object(toConsumableArray["a" /* default */])(state), [action.tipIds]);
* Reducer that tracks whether or not tips are globally enabled.
* @param {boolean} state Current state.
* @param {Object} action Dispatched action.
* @return {boolean} Updated state.
function areTipsEnabled() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var action = arguments.length > 1 ? arguments[1] : undefined;
* Reducer that tracks which tips have been dismissed. If the state object
* contains a tip identifier, then that tip is dismissed.
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
function dismissedTips() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments.length > 1 ? arguments[1] : undefined;
return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, action.id, true));
var preferences = Object(external_wp_data_["combineReducers"])({
areTipsEnabled: areTipsEnabled,
dismissedTips: dismissedTips
/* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/actions.js
* Returns an action object that, when dispatched, presents a guide that takes
* the user through a series of tips step by step.
* @param {string[]} tipIds Which tips to show in the guide.
* @return {Object} Action object.
function triggerGuide(tipIds) {
* Returns an action object that, when dispatched, dismisses the given tip. A
* dismissed tip will not show again.
* @param {string} id The tip to dismiss.
* @return {Object} Action object.
function dismissTip(id) {
* Returns an action object that, when dispatched, prevents all tips from
* @return {Object} Action object.
* Returns an action object that, when dispatched, makes all tips show again.
* @return {Object} Action object.
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("ODXe");
// EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
var rememo = __webpack_require__("pPDe");
// EXTERNAL MODULE: external "lodash"
var external_lodash_ = __webpack_require__("YLtl");
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/selectors.js
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
* An object containing information about a guide.
* @typedef {Object} NUXGuideInfo
* @property {string[]} tipIds Which tips the guide contains.
* @property {?string} currentTipId The guide's currently showing tip.
* @property {?string} nextTipId The guide's next tip to show.
* Returns an object describing the guide, if any, that the given tip is a part
* @param {Object} state Global application state.
* @param {string} tipId The tip to query.
* @return {?NUXGuideInfo} Information about the associated guide.
var getAssociatedGuide = Object(rememo["a" /* default */])(function (state, tipId) {
var _iterator = _createForOfIteratorHelper(state.guides),
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var tipIds = _step.value;
if (Object(external_lodash_["includes"])(tipIds, tipId)) {
var nonDismissedTips = Object(external_lodash_["difference"])(tipIds, Object(external_lodash_["keys"])(state.preferences.dismissedTips));
var _nonDismissedTips = Object(slicedToArray["a" /* default */])(nonDismissedTips, 2),
_nonDismissedTips$ = _nonDismissedTips[0],
currentTipId = _nonDismissedTips$ === void 0 ? null : _nonDismissedTips$,
_nonDismissedTips$2 = _nonDismissedTips[1],
nextTipId = _nonDismissedTips$2 === void 0 ? null : _nonDismissedTips$2;
currentTipId: currentTipId,
return [state.guides, state.preferences.dismissedTips];
* Determines whether or not the given tip is showing. Tips are hidden if they
* are disabled, have been dismissed, or are not the current tip in any
* guide that they have been added to.
* @param {Object} state Global application state.
* @param {string} tipId The tip to query.
* @return {boolean} Whether or not the given tip is showing.
function isTipVisible(state, tipId) {
if (!state.preferences.areTipsEnabled) {
if (Object(external_lodash_["has"])(state.preferences.dismissedTips, [tipId])) {
var associatedGuide = getAssociatedGuide(state, tipId);
if (associatedGuide && associatedGuide.currentTipId !== tipId) {
* Returns whether or not tips are globally enabled.
* @param {Object} state Global application state.
* @return {boolean} Whether tips are globally enabled.
function selectors_areTipsEnabled(state) {
return state.preferences.areTipsEnabled;
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/index.js
var STORE_NAME = 'core/nux';
* Store definition for the nux namespace.
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
var store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, {
actions: actions_namespaceObject,
selectors: selectors_namespaceObject,
}); // Once we build a more generic persistence plugin that works across types of stores
// we'd be able to replace this with a register call.
Object(external_wp_data_["registerStore"])(STORE_NAME, {
actions: actions_namespaceObject,
selectors: selectors_namespaceObject,
// EXTERNAL MODULE: external ["wp","element"]
var external_wp_element_ = __webpack_require__("GRId");
// EXTERNAL MODULE: external ["wp","compose"]
var external_wp_compose_ = __webpack_require__("K9lf");
// EXTERNAL MODULE: external ["wp","components"]
var external_wp_components_ = __webpack_require__("tI+e");
// EXTERNAL MODULE: external ["wp","i18n"]
var external_wp_i18n_ = __webpack_require__("l3Sj");
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
var library_close = __webpack_require__("w95h");
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/components/dot-tip/index.js
function onClick(event) {
// Tips are often nested within buttons. We stop propagation so that clicking
// on a tip doesn't result in the button being clicked.
var _ref$position = _ref.position,
position = _ref$position === void 0 ? 'middle right' : _ref$position,
children = _ref.children,
isVisible = _ref.isVisible,
hasNextTip = _ref.hasNextTip,
onDismiss = _ref.onDismiss,
onDisable = _ref.onDisable;
var anchorParent = Object(external_wp_element_["useRef"])(null);
var onFocusOutsideCallback = Object(external_wp_element_["useCallback"])(function (event) {
if (!anchorParent.current) {
if (anchorParent.current.contains(event.relatedTarget)) {
}, [onDisable, anchorParent]);