9
|
1 |
this["wp"] = this["wp"] || {}; this["wp"]["nux"] = |
|
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 |
16
|
85 |
/******/ return __webpack_require__(__webpack_require__.s = 458); |
9
|
86 |
/******/ }) |
|
87 |
/************************************************************************/ |
|
88 |
/******/ ({ |
|
89 |
|
|
90 |
/***/ 0: |
|
91 |
/***/ (function(module, exports) { |
|
92 |
|
|
93 |
(function() { module.exports = this["wp"]["element"]; }()); |
|
94 |
|
|
95 |
/***/ }), |
|
96 |
|
|
97 |
/***/ 1: |
|
98 |
/***/ (function(module, exports) { |
|
99 |
|
|
100 |
(function() { module.exports = this["wp"]["i18n"]; }()); |
|
101 |
|
|
102 |
/***/ }), |
|
103 |
|
16
|
104 |
/***/ 14: |
9
|
105 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
106 |
|
|
107 |
"use strict"; |
|
108 |
|
16
|
109 |
// EXPORTS |
|
110 |
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; }); |
9
|
111 |
|
|
112 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js |
16
|
113 |
var arrayWithHoles = __webpack_require__(38); |
9
|
114 |
|
|
115 |
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js |
|
116 |
function _iterableToArrayLimit(arr, i) { |
16
|
117 |
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; |
9
|
118 |
var _arr = []; |
|
119 |
var _n = true; |
|
120 |
var _d = false; |
|
121 |
var _e = undefined; |
|
122 |
|
|
123 |
try { |
|
124 |
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { |
|
125 |
_arr.push(_s.value); |
|
126 |
|
|
127 |
if (i && _arr.length === i) break; |
|
128 |
} |
|
129 |
} catch (err) { |
|
130 |
_d = true; |
|
131 |
_e = err; |
|
132 |
} finally { |
|
133 |
try { |
|
134 |
if (!_n && _i["return"] != null) _i["return"](); |
|
135 |
} finally { |
|
136 |
if (_d) throw _e; |
|
137 |
} |
|
138 |
} |
|
139 |
|
|
140 |
return _arr; |
|
141 |
} |
16
|
142 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js |
|
143 |
var unsupportedIterableToArray = __webpack_require__(29); |
|
144 |
|
9
|
145 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js |
16
|
146 |
var nonIterableRest = __webpack_require__(39); |
9
|
147 |
|
|
148 |
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js |
16
|
149 |
|
9
|
150 |
|
|
151 |
|
|
152 |
|
|
153 |
function _slicedToArray(arr, i) { |
16
|
154 |
return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])(); |
|
155 |
} |
|
156 |
|
|
157 |
/***/ }), |
|
158 |
|
|
159 |
/***/ 154: |
|
160 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
161 |
|
|
162 |
"use strict"; |
|
163 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); |
|
164 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
165 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); |
|
166 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
167 |
|
|
168 |
|
|
169 |
/** |
|
170 |
* WordPress dependencies |
|
171 |
*/ |
|
172 |
|
|
173 |
var close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
174 |
xmlns: "http://www.w3.org/2000/svg", |
|
175 |
viewBox: "0 0 24 24" |
|
176 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
177 |
d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" |
|
178 |
})); |
|
179 |
/* harmony default export */ __webpack_exports__["a"] = (close); |
|
180 |
|
|
181 |
|
|
182 |
/***/ }), |
|
183 |
|
|
184 |
/***/ 18: |
|
185 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
186 |
|
|
187 |
"use strict"; |
|
188 |
|
|
189 |
// EXPORTS |
|
190 |
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); |
|
191 |
|
|
192 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js |
|
193 |
var arrayLikeToArray = __webpack_require__(26); |
|
194 |
|
|
195 |
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js |
|
196 |
|
|
197 |
function _arrayWithoutHoles(arr) { |
|
198 |
if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); |
|
199 |
} |
|
200 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js |
|
201 |
var iterableToArray = __webpack_require__(35); |
|
202 |
|
|
203 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js |
|
204 |
var unsupportedIterableToArray = __webpack_require__(29); |
|
205 |
|
|
206 |
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js |
|
207 |
function _nonIterableSpread() { |
|
208 |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|
209 |
} |
|
210 |
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js |
|
211 |
|
|
212 |
|
|
213 |
|
|
214 |
|
|
215 |
function _toConsumableArray(arr) { |
|
216 |
return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); |
9
|
217 |
} |
|
218 |
|
|
219 |
/***/ }), |
|
220 |
|
16
|
221 |
/***/ 2: |
|
222 |
/***/ (function(module, exports) { |
|
223 |
|
|
224 |
(function() { module.exports = this["lodash"]; }()); |
|
225 |
|
|
226 |
/***/ }), |
|
227 |
|
|
228 |
/***/ 26: |
|
229 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
230 |
|
|
231 |
"use strict"; |
|
232 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); |
|
233 |
function _arrayLikeToArray(arr, len) { |
|
234 |
if (len == null || len > arr.length) len = arr.length; |
|
235 |
|
|
236 |
for (var i = 0, arr2 = new Array(len); i < len; i++) { |
|
237 |
arr2[i] = arr[i]; |
|
238 |
} |
|
239 |
|
|
240 |
return arr2; |
|
241 |
} |
|
242 |
|
|
243 |
/***/ }), |
|
244 |
|
|
245 |
/***/ 29: |
|
246 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
247 |
|
|
248 |
"use strict"; |
|
249 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); |
|
250 |
/* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26); |
|
251 |
|
|
252 |
function _unsupportedIterableToArray(o, minLen) { |
|
253 |
if (!o) return; |
|
254 |
if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); |
|
255 |
var n = Object.prototype.toString.call(o).slice(8, -1); |
|
256 |
if (n === "Object" && o.constructor) n = o.constructor.name; |
|
257 |
if (n === "Map" || n === "Set") return Array.from(o); |
|
258 |
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); |
|
259 |
} |
|
260 |
|
|
261 |
/***/ }), |
|
262 |
|
|
263 |
/***/ 3: |
|
264 |
/***/ (function(module, exports) { |
|
265 |
|
|
266 |
(function() { module.exports = this["wp"]["components"]; }()); |
|
267 |
|
|
268 |
/***/ }), |
|
269 |
|
|
270 |
/***/ 35: |
|
271 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
272 |
|
|
273 |
"use strict"; |
|
274 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; }); |
|
275 |
function _iterableToArray(iter) { |
|
276 |
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); |
|
277 |
} |
|
278 |
|
|
279 |
/***/ }), |
|
280 |
|
|
281 |
/***/ 37: |
|
282 |
/***/ (function(module, exports) { |
|
283 |
|
|
284 |
(function() { module.exports = this["wp"]["deprecated"]; }()); |
|
285 |
|
|
286 |
/***/ }), |
|
287 |
|
|
288 |
/***/ 38: |
|
289 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
290 |
|
|
291 |
"use strict"; |
|
292 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; }); |
|
293 |
function _arrayWithHoles(arr) { |
|
294 |
if (Array.isArray(arr)) return arr; |
|
295 |
} |
|
296 |
|
|
297 |
/***/ }), |
|
298 |
|
|
299 |
/***/ 39: |
|
300 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
301 |
|
|
302 |
"use strict"; |
|
303 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; }); |
|
304 |
function _nonIterableRest() { |
|
305 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|
306 |
} |
|
307 |
|
|
308 |
/***/ }), |
|
309 |
|
|
310 |
/***/ 4: |
|
311 |
/***/ (function(module, exports) { |
|
312 |
|
|
313 |
(function() { module.exports = this["wp"]["data"]; }()); |
|
314 |
|
|
315 |
/***/ }), |
|
316 |
|
|
317 |
/***/ 42: |
9
|
318 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
319 |
|
|
320 |
"use strict"; |
|
321 |
|
|
322 |
|
|
323 |
var LEAF_KEY, hasWeakMap; |
|
324 |
|
|
325 |
/** |
|
326 |
* Arbitrary value used as key for referencing cache object in WeakMap tree. |
|
327 |
* |
|
328 |
* @type {Object} |
|
329 |
*/ |
|
330 |
LEAF_KEY = {}; |
|
331 |
|
|
332 |
/** |
|
333 |
* Whether environment supports WeakMap. |
|
334 |
* |
|
335 |
* @type {boolean} |
|
336 |
*/ |
|
337 |
hasWeakMap = typeof WeakMap !== 'undefined'; |
|
338 |
|
|
339 |
/** |
|
340 |
* Returns the first argument as the sole entry in an array. |
|
341 |
* |
|
342 |
* @param {*} value Value to return. |
|
343 |
* |
|
344 |
* @return {Array} Value returned as entry in array. |
|
345 |
*/ |
|
346 |
function arrayOf( value ) { |
|
347 |
return [ value ]; |
|
348 |
} |
|
349 |
|
|
350 |
/** |
|
351 |
* Returns true if the value passed is object-like, or false otherwise. A value |
|
352 |
* is object-like if it can support property assignment, e.g. object or array. |
|
353 |
* |
|
354 |
* @param {*} value Value to test. |
|
355 |
* |
|
356 |
* @return {boolean} Whether value is object-like. |
|
357 |
*/ |
|
358 |
function isObjectLike( value ) { |
|
359 |
return !! value && 'object' === typeof value; |
|
360 |
} |
|
361 |
|
|
362 |
/** |
|
363 |
* Creates and returns a new cache object. |
|
364 |
* |
|
365 |
* @return {Object} Cache object. |
|
366 |
*/ |
|
367 |
function createCache() { |
|
368 |
var cache = { |
|
369 |
clear: function() { |
|
370 |
cache.head = null; |
|
371 |
}, |
|
372 |
}; |
|
373 |
|
|
374 |
return cache; |
|
375 |
} |
|
376 |
|
|
377 |
/** |
|
378 |
* Returns true if entries within the two arrays are strictly equal by |
|
379 |
* reference from a starting index. |
|
380 |
* |
|
381 |
* @param {Array} a First array. |
|
382 |
* @param {Array} b Second array. |
|
383 |
* @param {number} fromIndex Index from which to start comparison. |
|
384 |
* |
|
385 |
* @return {boolean} Whether arrays are shallowly equal. |
|
386 |
*/ |
|
387 |
function isShallowEqual( a, b, fromIndex ) { |
|
388 |
var i; |
|
389 |
|
|
390 |
if ( a.length !== b.length ) { |
|
391 |
return false; |
|
392 |
} |
|
393 |
|
|
394 |
for ( i = fromIndex; i < a.length; i++ ) { |
|
395 |
if ( a[ i ] !== b[ i ] ) { |
|
396 |
return false; |
|
397 |
} |
|
398 |
} |
|
399 |
|
|
400 |
return true; |
|
401 |
} |
|
402 |
|
|
403 |
/** |
|
404 |
* Returns a memoized selector function. The getDependants function argument is |
|
405 |
* called before the memoized selector and is expected to return an immutable |
|
406 |
* reference or array of references on which the selector depends for computing |
|
407 |
* its own return value. The memoize cache is preserved only as long as those |
|
408 |
* dependant references remain the same. If getDependants returns a different |
|
409 |
* reference(s), the cache is cleared and the selector value regenerated. |
|
410 |
* |
|
411 |
* @param {Function} selector Selector function. |
|
412 |
* @param {Function} getDependants Dependant getter returning an immutable |
|
413 |
* reference or array of reference used in |
|
414 |
* cache bust consideration. |
|
415 |
* |
|
416 |
* @return {Function} Memoized selector. |
|
417 |
*/ |
|
418 |
/* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) { |
|
419 |
var rootCache, getCache; |
|
420 |
|
|
421 |
// Use object source as dependant if getter not provided |
|
422 |
if ( ! getDependants ) { |
|
423 |
getDependants = arrayOf; |
|
424 |
} |
|
425 |
|
|
426 |
/** |
|
427 |
* Returns the root cache. If WeakMap is supported, this is assigned to the |
|
428 |
* root WeakMap cache set, otherwise it is a shared instance of the default |
|
429 |
* cache object. |
|
430 |
* |
|
431 |
* @return {(WeakMap|Object)} Root cache object. |
|
432 |
*/ |
|
433 |
function getRootCache() { |
|
434 |
return rootCache; |
|
435 |
} |
|
436 |
|
|
437 |
/** |
|
438 |
* Returns the cache for a given dependants array. When possible, a WeakMap |
|
439 |
* will be used to create a unique cache for each set of dependants. This |
|
440 |
* is feasible due to the nature of WeakMap in allowing garbage collection |
|
441 |
* to occur on entries where the key object is no longer referenced. Since |
|
442 |
* WeakMap requires the key to be an object, this is only possible when the |
|
443 |
* dependant is object-like. The root cache is created as a hierarchy where |
|
444 |
* each top-level key is the first entry in a dependants set, the value a |
|
445 |
* WeakMap where each key is the next dependant, and so on. This continues |
|
446 |
* so long as the dependants are object-like. If no dependants are object- |
|
447 |
* like, then the cache is shared across all invocations. |
|
448 |
* |
|
449 |
* @see isObjectLike |
|
450 |
* |
|
451 |
* @param {Array} dependants Selector dependants. |
|
452 |
* |
|
453 |
* @return {Object} Cache object. |
|
454 |
*/ |
|
455 |
function getWeakMapCache( dependants ) { |
|
456 |
var caches = rootCache, |
|
457 |
isUniqueByDependants = true, |
|
458 |
i, dependant, map, cache; |
|
459 |
|
|
460 |
for ( i = 0; i < dependants.length; i++ ) { |
|
461 |
dependant = dependants[ i ]; |
|
462 |
|
|
463 |
// Can only compose WeakMap from object-like key. |
|
464 |
if ( ! isObjectLike( dependant ) ) { |
|
465 |
isUniqueByDependants = false; |
|
466 |
break; |
|
467 |
} |
|
468 |
|
|
469 |
// Does current segment of cache already have a WeakMap? |
|
470 |
if ( caches.has( dependant ) ) { |
|
471 |
// Traverse into nested WeakMap. |
|
472 |
caches = caches.get( dependant ); |
|
473 |
} else { |
|
474 |
// Create, set, and traverse into a new one. |
|
475 |
map = new WeakMap(); |
|
476 |
caches.set( dependant, map ); |
|
477 |
caches = map; |
|
478 |
} |
|
479 |
} |
|
480 |
|
|
481 |
// We use an arbitrary (but consistent) object as key for the last item |
|
482 |
// in the WeakMap to serve as our running cache. |
|
483 |
if ( ! caches.has( LEAF_KEY ) ) { |
|
484 |
cache = createCache(); |
|
485 |
cache.isUniqueByDependants = isUniqueByDependants; |
|
486 |
caches.set( LEAF_KEY, cache ); |
|
487 |
} |
|
488 |
|
|
489 |
return caches.get( LEAF_KEY ); |
|
490 |
} |
|
491 |
|
|
492 |
// Assign cache handler by availability of WeakMap |
|
493 |
getCache = hasWeakMap ? getWeakMapCache : getRootCache; |
|
494 |
|
|
495 |
/** |
|
496 |
* Resets root memoization cache. |
|
497 |
*/ |
|
498 |
function clear() { |
|
499 |
rootCache = hasWeakMap ? new WeakMap() : createCache(); |
|
500 |
} |
|
501 |
|
|
502 |
// eslint-disable-next-line jsdoc/check-param-names |
|
503 |
/** |
|
504 |
* The augmented selector call, considering first whether dependants have |
|
505 |
* changed before passing it to underlying memoize function. |
|
506 |
* |
|
507 |
* @param {Object} source Source object for derivation. |
|
508 |
* @param {...*} extraArgs Additional arguments to pass to selector. |
|
509 |
* |
|
510 |
* @return {*} Selector result. |
|
511 |
*/ |
|
512 |
function callSelector( /* source, ...extraArgs */ ) { |
|
513 |
var len = arguments.length, |
|
514 |
cache, node, i, args, dependants; |
|
515 |
|
|
516 |
// Create copy of arguments (avoid leaking deoptimization). |
|
517 |
args = new Array( len ); |
|
518 |
for ( i = 0; i < len; i++ ) { |
|
519 |
args[ i ] = arguments[ i ]; |
|
520 |
} |
|
521 |
|
|
522 |
dependants = getDependants.apply( null, args ); |
|
523 |
cache = getCache( dependants ); |
|
524 |
|
|
525 |
// If not guaranteed uniqueness by dependants (primitive type or lack |
|
526 |
// of WeakMap support), shallow compare against last dependants and, if |
|
527 |
// references have changed, destroy cache to recalculate result. |
|
528 |
if ( ! cache.isUniqueByDependants ) { |
|
529 |
if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) { |
|
530 |
cache.clear(); |
|
531 |
} |
|
532 |
|
|
533 |
cache.lastDependants = dependants; |
|
534 |
} |
|
535 |
|
|
536 |
node = cache.head; |
|
537 |
while ( node ) { |
|
538 |
// Check whether node arguments match arguments |
|
539 |
if ( ! isShallowEqual( node.args, args, 1 ) ) { |
|
540 |
node = node.next; |
|
541 |
continue; |
|
542 |
} |
|
543 |
|
|
544 |
// At this point we can assume we've found a match |
|
545 |
|
|
546 |
// Surface matched node to head if not already |
|
547 |
if ( node !== cache.head ) { |
|
548 |
// Adjust siblings to point to each other. |
|
549 |
node.prev.next = node.next; |
|
550 |
if ( node.next ) { |
|
551 |
node.next.prev = node.prev; |
|
552 |
} |
|
553 |
|
|
554 |
node.next = cache.head; |
|
555 |
node.prev = null; |
|
556 |
cache.head.prev = node; |
|
557 |
cache.head = node; |
|
558 |
} |
|
559 |
|
|
560 |
// Return immediately |
|
561 |
return node.val; |
|
562 |
} |
|
563 |
|
|
564 |
// No cached value found. Continue to insertion phase: |
|
565 |
|
|
566 |
node = { |
|
567 |
// Generate the result from original function |
|
568 |
val: selector.apply( null, args ), |
|
569 |
}; |
|
570 |
|
|
571 |
// Avoid including the source object in the cache. |
|
572 |
args[ 0 ] = null; |
|
573 |
node.args = args; |
|
574 |
|
|
575 |
// Don't need to check whether node is already head, since it would |
|
576 |
// have been returned above already if it was |
|
577 |
|
|
578 |
// Shift existing head down list |
|
579 |
if ( cache.head ) { |
|
580 |
cache.head.prev = node; |
|
581 |
node.next = cache.head; |
|
582 |
} |
|
583 |
|
|
584 |
cache.head = node; |
|
585 |
|
|
586 |
return node.val; |
|
587 |
} |
|
588 |
|
|
589 |
callSelector.getDependants = getDependants; |
|
590 |
callSelector.clear = clear; |
|
591 |
clear(); |
|
592 |
|
|
593 |
return callSelector; |
|
594 |
}); |
|
595 |
|
|
596 |
|
|
597 |
/***/ }), |
|
598 |
|
16
|
599 |
/***/ 458: |
9
|
600 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
601 |
|
|
602 |
"use strict"; |
16
|
603 |
// ESM COMPAT FLAG |
|
604 |
__webpack_require__.r(__webpack_exports__); |
9
|
605 |
|
16
|
606 |
// EXPORTS |
|
607 |
__webpack_require__.d(__webpack_exports__, "DotTip", function() { return /* reexport */ dot_tip; }); |
9
|
608 |
|
16
|
609 |
// NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/actions.js |
9
|
610 |
var actions_namespaceObject = {}; |
|
611 |
__webpack_require__.r(actions_namespaceObject); |
|
612 |
__webpack_require__.d(actions_namespaceObject, "triggerGuide", function() { return triggerGuide; }); |
|
613 |
__webpack_require__.d(actions_namespaceObject, "dismissTip", function() { return dismissTip; }); |
|
614 |
__webpack_require__.d(actions_namespaceObject, "disableTips", function() { return disableTips; }); |
|
615 |
__webpack_require__.d(actions_namespaceObject, "enableTips", function() { return enableTips; }); |
16
|
616 |
|
|
617 |
// NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/selectors.js |
9
|
618 |
var selectors_namespaceObject = {}; |
|
619 |
__webpack_require__.r(selectors_namespaceObject); |
|
620 |
__webpack_require__.d(selectors_namespaceObject, "getAssociatedGuide", function() { return getAssociatedGuide; }); |
|
621 |
__webpack_require__.d(selectors_namespaceObject, "isTipVisible", function() { return isTipVisible; }); |
|
622 |
__webpack_require__.d(selectors_namespaceObject, "areTipsEnabled", function() { return selectors_areTipsEnabled; }); |
|
623 |
|
16
|
624 |
// EXTERNAL MODULE: external {"this":["wp","deprecated"]} |
|
625 |
var external_this_wp_deprecated_ = __webpack_require__(37); |
|
626 |
var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_); |
|
627 |
|
9
|
628 |
// EXTERNAL MODULE: external {"this":["wp","data"]} |
16
|
629 |
var external_this_wp_data_ = __webpack_require__(4); |
9
|
630 |
|
|
631 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js |
16
|
632 |
var defineProperty = __webpack_require__(5); |
9
|
633 |
|
|
634 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules |
16
|
635 |
var toConsumableArray = __webpack_require__(18); |
9
|
636 |
|
|
637 |
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/reducer.js |
|
638 |
|
|
639 |
|
|
640 |
|
16
|
641 |
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; } |
|
642 |
|
|
643 |
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; } |
9
|
644 |
|
|
645 |
/** |
|
646 |
* WordPress dependencies |
|
647 |
*/ |
|
648 |
|
|
649 |
/** |
|
650 |
* Reducer that tracks which tips are in a guide. Each guide is represented by |
|
651 |
* an array which contains the tip identifiers contained within that guide. |
|
652 |
* |
|
653 |
* @param {Array} state Current state. |
|
654 |
* @param {Object} action Dispatched action. |
|
655 |
* |
|
656 |
* @return {Array} Updated state. |
|
657 |
*/ |
|
658 |
|
|
659 |
function guides() { |
|
660 |
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; |
|
661 |
var action = arguments.length > 1 ? arguments[1] : undefined; |
|
662 |
|
|
663 |
switch (action.type) { |
|
664 |
case 'TRIGGER_GUIDE': |
|
665 |
return [].concat(Object(toConsumableArray["a" /* default */])(state), [action.tipIds]); |
|
666 |
} |
|
667 |
|
|
668 |
return state; |
|
669 |
} |
|
670 |
/** |
|
671 |
* Reducer that tracks whether or not tips are globally enabled. |
|
672 |
* |
|
673 |
* @param {boolean} state Current state. |
|
674 |
* @param {Object} action Dispatched action. |
|
675 |
* |
|
676 |
* @return {boolean} Updated state. |
|
677 |
*/ |
|
678 |
|
|
679 |
function areTipsEnabled() { |
|
680 |
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; |
|
681 |
var action = arguments.length > 1 ? arguments[1] : undefined; |
|
682 |
|
|
683 |
switch (action.type) { |
|
684 |
case 'DISABLE_TIPS': |
|
685 |
return false; |
|
686 |
|
|
687 |
case 'ENABLE_TIPS': |
|
688 |
return true; |
|
689 |
} |
|
690 |
|
|
691 |
return state; |
|
692 |
} |
|
693 |
/** |
|
694 |
* Reducer that tracks which tips have been dismissed. If the state object |
|
695 |
* contains a tip identifier, then that tip is dismissed. |
|
696 |
* |
|
697 |
* @param {Object} state Current state. |
|
698 |
* @param {Object} action Dispatched action. |
|
699 |
* |
|
700 |
* @return {Object} Updated state. |
|
701 |
*/ |
|
702 |
|
|
703 |
function dismissedTips() { |
|
704 |
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
|
705 |
var action = arguments.length > 1 ? arguments[1] : undefined; |
|
706 |
|
|
707 |
switch (action.type) { |
|
708 |
case 'DISMISS_TIP': |
16
|
709 |
return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.id, true)); |
9
|
710 |
|
|
711 |
case 'ENABLE_TIPS': |
|
712 |
return {}; |
|
713 |
} |
|
714 |
|
|
715 |
return state; |
|
716 |
} |
|
717 |
var preferences = Object(external_this_wp_data_["combineReducers"])({ |
|
718 |
areTipsEnabled: areTipsEnabled, |
|
719 |
dismissedTips: dismissedTips |
|
720 |
}); |
|
721 |
/* harmony default export */ var reducer = (Object(external_this_wp_data_["combineReducers"])({ |
|
722 |
guides: guides, |
|
723 |
preferences: preferences |
|
724 |
})); |
|
725 |
|
|
726 |
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/actions.js |
|
727 |
/** |
|
728 |
* Returns an action object that, when dispatched, presents a guide that takes |
|
729 |
* the user through a series of tips step by step. |
|
730 |
* |
|
731 |
* @param {string[]} tipIds Which tips to show in the guide. |
|
732 |
* |
|
733 |
* @return {Object} Action object. |
|
734 |
*/ |
|
735 |
function triggerGuide(tipIds) { |
|
736 |
return { |
|
737 |
type: 'TRIGGER_GUIDE', |
|
738 |
tipIds: tipIds |
|
739 |
}; |
|
740 |
} |
|
741 |
/** |
|
742 |
* Returns an action object that, when dispatched, dismisses the given tip. A |
|
743 |
* dismissed tip will not show again. |
|
744 |
* |
|
745 |
* @param {string} id The tip to dismiss. |
|
746 |
* |
|
747 |
* @return {Object} Action object. |
|
748 |
*/ |
|
749 |
|
|
750 |
function dismissTip(id) { |
|
751 |
return { |
|
752 |
type: 'DISMISS_TIP', |
|
753 |
id: id |
|
754 |
}; |
|
755 |
} |
|
756 |
/** |
|
757 |
* Returns an action object that, when dispatched, prevents all tips from |
|
758 |
* showing again. |
|
759 |
* |
|
760 |
* @return {Object} Action object. |
|
761 |
*/ |
|
762 |
|
|
763 |
function disableTips() { |
|
764 |
return { |
|
765 |
type: 'DISABLE_TIPS' |
|
766 |
}; |
|
767 |
} |
|
768 |
/** |
|
769 |
* Returns an action object that, when dispatched, makes all tips show again. |
|
770 |
* |
|
771 |
* @return {Object} Action object. |
|
772 |
*/ |
|
773 |
|
|
774 |
function enableTips() { |
|
775 |
return { |
|
776 |
type: 'ENABLE_TIPS' |
|
777 |
}; |
|
778 |
} |
|
779 |
|
|
780 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules |
16
|
781 |
var slicedToArray = __webpack_require__(14); |
9
|
782 |
|
|
783 |
// EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js |
16
|
784 |
var rememo = __webpack_require__(42); |
9
|
785 |
|
16
|
786 |
// EXTERNAL MODULE: external {"this":"lodash"} |
|
787 |
var external_this_lodash_ = __webpack_require__(2); |
9
|
788 |
|
|
789 |
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/selectors.js |
|
790 |
|
|
791 |
|
16
|
792 |
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { 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 it, 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; } } }; } |
|
793 |
|
|
794 |
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(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } |
|
795 |
|
|
796 |
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; } |
|
797 |
|
9
|
798 |
/** |
|
799 |
* External dependencies |
|
800 |
*/ |
|
801 |
|
|
802 |
|
|
803 |
/** |
|
804 |
* An object containing information about a guide. |
|
805 |
* |
16
|
806 |
* @typedef {Object} NUXGuideInfo |
9
|
807 |
* @property {string[]} tipIds Which tips the guide contains. |
|
808 |
* @property {?string} currentTipId The guide's currently showing tip. |
|
809 |
* @property {?string} nextTipId The guide's next tip to show. |
|
810 |
*/ |
|
811 |
|
|
812 |
/** |
|
813 |
* Returns an object describing the guide, if any, that the given tip is a part |
|
814 |
* of. |
|
815 |
* |
|
816 |
* @param {Object} state Global application state. |
|
817 |
* @param {string} tipId The tip to query. |
|
818 |
* |
16
|
819 |
* @return {?NUXGuideInfo} Information about the associated guide. |
9
|
820 |
*/ |
|
821 |
|
|
822 |
var getAssociatedGuide = Object(rememo["a" /* default */])(function (state, tipId) { |
16
|
823 |
var _iterator = _createForOfIteratorHelper(state.guides), |
|
824 |
_step; |
9
|
825 |
|
|
826 |
try { |
16
|
827 |
for (_iterator.s(); !(_step = _iterator.n()).done;) { |
9
|
828 |
var tipIds = _step.value; |
|
829 |
|
16
|
830 |
if (Object(external_this_lodash_["includes"])(tipIds, tipId)) { |
|
831 |
var nonDismissedTips = Object(external_this_lodash_["difference"])(tipIds, Object(external_this_lodash_["keys"])(state.preferences.dismissedTips)); |
9
|
832 |
|
|
833 |
var _nonDismissedTips = Object(slicedToArray["a" /* default */])(nonDismissedTips, 2), |
|
834 |
_nonDismissedTips$ = _nonDismissedTips[0], |
|
835 |
currentTipId = _nonDismissedTips$ === void 0 ? null : _nonDismissedTips$, |
|
836 |
_nonDismissedTips$2 = _nonDismissedTips[1], |
|
837 |
nextTipId = _nonDismissedTips$2 === void 0 ? null : _nonDismissedTips$2; |
|
838 |
|
|
839 |
return { |
|
840 |
tipIds: tipIds, |
|
841 |
currentTipId: currentTipId, |
|
842 |
nextTipId: nextTipId |
|
843 |
}; |
|
844 |
} |
|
845 |
} |
|
846 |
} catch (err) { |
16
|
847 |
_iterator.e(err); |
9
|
848 |
} finally { |
16
|
849 |
_iterator.f(); |
9
|
850 |
} |
|
851 |
|
|
852 |
return null; |
|
853 |
}, function (state) { |
|
854 |
return [state.guides, state.preferences.dismissedTips]; |
|
855 |
}); |
|
856 |
/** |
|
857 |
* Determines whether or not the given tip is showing. Tips are hidden if they |
|
858 |
* are disabled, have been dismissed, or are not the current tip in any |
|
859 |
* guide that they have been added to. |
|
860 |
* |
|
861 |
* @param {Object} state Global application state. |
|
862 |
* @param {string} tipId The tip to query. |
|
863 |
* |
|
864 |
* @return {boolean} Whether or not the given tip is showing. |
|
865 |
*/ |
|
866 |
|
|
867 |
function isTipVisible(state, tipId) { |
|
868 |
if (!state.preferences.areTipsEnabled) { |
|
869 |
return false; |
|
870 |
} |
|
871 |
|
16
|
872 |
if (Object(external_this_lodash_["has"])(state.preferences.dismissedTips, [tipId])) { |
9
|
873 |
return false; |
|
874 |
} |
|
875 |
|
|
876 |
var associatedGuide = getAssociatedGuide(state, tipId); |
|
877 |
|
|
878 |
if (associatedGuide && associatedGuide.currentTipId !== tipId) { |
|
879 |
return false; |
|
880 |
} |
|
881 |
|
|
882 |
return true; |
|
883 |
} |
|
884 |
/** |
|
885 |
* Returns whether or not tips are globally enabled. |
|
886 |
* |
|
887 |
* @param {Object} state Global application state. |
|
888 |
* |
|
889 |
* @return {boolean} Whether tips are globally enabled. |
|
890 |
*/ |
|
891 |
|
|
892 |
function selectors_areTipsEnabled(state) { |
|
893 |
return state.preferences.areTipsEnabled; |
|
894 |
} |
|
895 |
|
|
896 |
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/index.js |
|
897 |
/** |
|
898 |
* WordPress dependencies |
|
899 |
*/ |
|
900 |
|
|
901 |
/** |
|
902 |
* Internal dependencies |
|
903 |
*/ |
|
904 |
|
|
905 |
|
|
906 |
|
|
907 |
|
|
908 |
var store = Object(external_this_wp_data_["registerStore"])('core/nux', { |
|
909 |
reducer: reducer, |
|
910 |
actions: actions_namespaceObject, |
|
911 |
selectors: selectors_namespaceObject, |
|
912 |
persist: ['preferences'] |
|
913 |
}); |
|
914 |
/* harmony default export */ var build_module_store = (store); |
|
915 |
|
|
916 |
// EXTERNAL MODULE: external {"this":["wp","element"]} |
|
917 |
var external_this_wp_element_ = __webpack_require__(0); |
|
918 |
|
|
919 |
// EXTERNAL MODULE: external {"this":["wp","compose"]} |
16
|
920 |
var external_this_wp_compose_ = __webpack_require__(9); |
9
|
921 |
|
|
922 |
// EXTERNAL MODULE: external {"this":["wp","components"]} |
16
|
923 |
var external_this_wp_components_ = __webpack_require__(3); |
9
|
924 |
|
|
925 |
// EXTERNAL MODULE: external {"this":["wp","i18n"]} |
|
926 |
var external_this_wp_i18n_ = __webpack_require__(1); |
|
927 |
|
16
|
928 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js |
|
929 |
var library_close = __webpack_require__(154); |
|
930 |
|
9
|
931 |
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/components/dot-tip/index.js |
|
932 |
|
|
933 |
|
|
934 |
/** |
|
935 |
* WordPress dependencies |
|
936 |
*/ |
|
937 |
|
|
938 |
|
|
939 |
|
|
940 |
|
|
941 |
|
16
|
942 |
|
9
|
943 |
|
|
944 |
function onClick(event) { |
|
945 |
// Tips are often nested within buttons. We stop propagation so that clicking |
|
946 |
// on a tip doesn't result in the button being clicked. |
|
947 |
event.stopPropagation(); |
|
948 |
} |
|
949 |
|
|
950 |
function DotTip(_ref) { |
16
|
951 |
var _ref$position = _ref.position, |
|
952 |
position = _ref$position === void 0 ? 'middle right' : _ref$position, |
|
953 |
children = _ref.children, |
9
|
954 |
isVisible = _ref.isVisible, |
|
955 |
hasNextTip = _ref.hasNextTip, |
|
956 |
onDismiss = _ref.onDismiss, |
|
957 |
onDisable = _ref.onDisable; |
16
|
958 |
var anchorParent = Object(external_this_wp_element_["useRef"])(null); |
|
959 |
var onFocusOutsideCallback = Object(external_this_wp_element_["useCallback"])(function (event) { |
|
960 |
if (!anchorParent.current) { |
|
961 |
return; |
|
962 |
} |
|
963 |
|
|
964 |
if (anchorParent.current.contains(event.relatedTarget)) { |
|
965 |
return; |
|
966 |
} |
|
967 |
|
|
968 |
onDisable(); |
|
969 |
}, [onDisable, anchorParent]); |
9
|
970 |
|
|
971 |
if (!isVisible) { |
|
972 |
return null; |
|
973 |
} |
|
974 |
|
|
975 |
return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Popover"], { |
|
976 |
className: "nux-dot-tip", |
16
|
977 |
position: position, |
9
|
978 |
noArrow: true, |
|
979 |
focusOnMount: "container", |
16
|
980 |
shouldAnchorIncludePadding: true, |
9
|
981 |
role: "dialog", |
|
982 |
"aria-label": Object(external_this_wp_i18n_["__"])('Editor tips'), |
16
|
983 |
onClick: onClick, |
|
984 |
onFocusOutside: onFocusOutsideCallback |
9
|
985 |
}, Object(external_this_wp_element_["createElement"])("p", null, children), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], { |
|
986 |
isLink: true, |
|
987 |
onClick: onDismiss |
16
|
988 |
}, hasNextTip ? Object(external_this_wp_i18n_["__"])('See next tip') : Object(external_this_wp_i18n_["__"])('Got it'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], { |
9
|
989 |
className: "nux-dot-tip__disable", |
16
|
990 |
icon: library_close["a" /* default */], |
9
|
991 |
label: Object(external_this_wp_i18n_["__"])('Disable tips'), |
|
992 |
onClick: onDisable |
|
993 |
})); |
|
994 |
} |
|
995 |
/* harmony default export */ var dot_tip = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select, _ref2) { |
|
996 |
var tipId = _ref2.tipId; |
|
997 |
|
|
998 |
var _select = select('core/nux'), |
|
999 |
isTipVisible = _select.isTipVisible, |
|
1000 |
getAssociatedGuide = _select.getAssociatedGuide; |
|
1001 |
|
|
1002 |
var associatedGuide = getAssociatedGuide(tipId); |
|
1003 |
return { |
|
1004 |
isVisible: isTipVisible(tipId), |
|
1005 |
hasNextTip: !!(associatedGuide && associatedGuide.nextTipId) |
|
1006 |
}; |
|
1007 |
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref3) { |
|
1008 |
var tipId = _ref3.tipId; |
|
1009 |
|
|
1010 |
var _dispatch = dispatch('core/nux'), |
|
1011 |
dismissTip = _dispatch.dismissTip, |
|
1012 |
disableTips = _dispatch.disableTips; |
|
1013 |
|
|
1014 |
return { |
|
1015 |
onDismiss: function onDismiss() { |
|
1016 |
dismissTip(tipId); |
|
1017 |
}, |
|
1018 |
onDisable: function onDisable() { |
|
1019 |
disableTips(); |
|
1020 |
} |
|
1021 |
}; |
|
1022 |
}))(DotTip)); |
|
1023 |
|
|
1024 |
// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/index.js |
16
|
1025 |
/** |
|
1026 |
* WordPress dependencies |
|
1027 |
*/ |
|
1028 |
|
9
|
1029 |
/** |
|
1030 |
* Internal dependencies |
|
1031 |
*/ |
|
1032 |
|
|
1033 |
|
|
1034 |
|
16
|
1035 |
external_this_wp_deprecated_default()('wp.nux', { |
|
1036 |
hint: 'wp.components.Guide can be used to show a user guide.' |
|
1037 |
}); |
9
|
1038 |
|
|
1039 |
|
|
1040 |
/***/ }), |
|
1041 |
|
|
1042 |
/***/ 5: |
16
|
1043 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
9
|
1044 |
|
16
|
1045 |
"use strict"; |
|
1046 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); |
|
1047 |
function _defineProperty(obj, key, value) { |
|
1048 |
if (key in obj) { |
|
1049 |
Object.defineProperty(obj, key, { |
|
1050 |
value: value, |
|
1051 |
enumerable: true, |
|
1052 |
configurable: true, |
|
1053 |
writable: true |
|
1054 |
}); |
|
1055 |
} else { |
|
1056 |
obj[key] = value; |
|
1057 |
} |
|
1058 |
|
|
1059 |
return obj; |
|
1060 |
} |
9
|
1061 |
|
|
1062 |
/***/ }), |
|
1063 |
|
|
1064 |
/***/ 6: |
|
1065 |
/***/ (function(module, exports) { |
|
1066 |
|
16
|
1067 |
(function() { module.exports = this["wp"]["primitives"]; }()); |
9
|
1068 |
|
|
1069 |
/***/ }), |
|
1070 |
|
16
|
1071 |
/***/ 9: |
|
1072 |
/***/ (function(module, exports) { |
9
|
1073 |
|
16
|
1074 |
(function() { module.exports = this["wp"]["compose"]; }()); |
9
|
1075 |
|
|
1076 |
/***/ }) |
|
1077 |
|
|
1078 |
/******/ }); |